cloudstructs 0.4.2 → 0.4.6

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 (160) hide show
  1. package/.gitattributes +3 -0
  2. package/.jsii +121 -4
  3. package/API.md +43 -0
  4. package/README.md +3 -0
  5. package/assets/toolkit-cleaner/clean-images.lambda/index.js +77 -0
  6. package/assets/toolkit-cleaner/clean-objects.lambda/index.js +85 -0
  7. package/assets/toolkit-cleaner/docker/Dockerfile +3 -0
  8. package/assets/toolkit-cleaner/docker/dummy.txt +0 -0
  9. package/assets/toolkit-cleaner/get-stack-names.lambda/index.js +49 -0
  10. package/changelog.md +6 -1
  11. package/lib/codecommit-mirror/index.js +2 -2
  12. package/lib/ecs-service-roller/index.js +2 -2
  13. package/lib/email-receiver/receiver.js +1 -1
  14. package/lib/index.d.ts +1 -0
  15. package/lib/index.js +2 -1
  16. package/lib/saml-identity-provider/index.js +2 -2
  17. package/lib/slack-app/manifest.js +1 -1
  18. package/lib/slack-app/slack-app.js +2 -2
  19. package/lib/slack-events/index.js +1 -1
  20. package/lib/slack-textract/index.js +1 -1
  21. package/lib/state-machine-cr-provider/index.js +1 -1
  22. package/lib/static-website/index.js +7 -3
  23. package/lib/toolkit-cleaner/clean-images-function.d.ts +13 -0
  24. package/lib/toolkit-cleaner/clean-images-function.js +22 -0
  25. package/lib/toolkit-cleaner/clean-images.lambda.d.ts +4 -0
  26. package/lib/toolkit-cleaner/clean-images.lambda.js +49 -0
  27. package/lib/toolkit-cleaner/clean-objects-function.d.ts +13 -0
  28. package/lib/toolkit-cleaner/clean-objects-function.js +22 -0
  29. package/lib/toolkit-cleaner/clean-objects.lambda.d.ts +4 -0
  30. package/lib/toolkit-cleaner/clean-objects.lambda.js +52 -0
  31. package/lib/toolkit-cleaner/get-stack-names-function.d.ts +13 -0
  32. package/lib/toolkit-cleaner/get-stack-names-function.js +22 -0
  33. package/lib/toolkit-cleaner/get-stack-names.lambda.d.ts +1 -0
  34. package/lib/toolkit-cleaner/get-stack-names.lambda.js +22 -0
  35. package/lib/toolkit-cleaner/index.d.ts +41 -0
  36. package/lib/toolkit-cleaner/index.js +118 -0
  37. package/lib/url-shortener/index.js +1 -1
  38. package/node_modules/@sindresorhus/is/dist/index.d.ts +4 -2
  39. package/node_modules/@sindresorhus/is/dist/index.js +3 -1
  40. package/node_modules/@sindresorhus/is/package.json +1 -1
  41. package/node_modules/@sindresorhus/is/readme.md +23 -0
  42. package/node_modules/@slack/logger/node_modules/@types/node/README.md +2 -2
  43. package/node_modules/@slack/logger/node_modules/@types/node/assert.d.ts +1 -1
  44. package/node_modules/@slack/logger/node_modules/@types/node/async_hooks.d.ts +7 -3
  45. package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +9 -9
  46. package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +1 -1
  47. package/node_modules/@slack/logger/node_modules/@types/node/cluster.d.ts +1 -1
  48. package/node_modules/@slack/logger/node_modules/@types/node/console.d.ts +1 -1
  49. package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +2 -2
  50. package/node_modules/@slack/logger/node_modules/@types/node/dgram.d.ts +2 -2
  51. package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
  52. package/node_modules/@slack/logger/node_modules/@types/node/dns/promises.d.ts +12 -10
  53. package/node_modules/@slack/logger/node_modules/@types/node/dns.d.ts +17 -12
  54. package/node_modules/@slack/logger/node_modules/@types/node/domain.d.ts +1 -1
  55. package/node_modules/@slack/logger/node_modules/@types/node/events.d.ts +2 -2
  56. package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +5 -5
  57. package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +62 -11
  58. package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +3 -3
  59. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +31 -4
  60. package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +6 -6
  61. package/node_modules/@slack/logger/node_modules/@types/node/https.d.ts +1 -1
  62. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +1 -2
  63. package/node_modules/@slack/logger/node_modules/@types/node/inspector.d.ts +4 -5
  64. package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +15 -14
  65. package/node_modules/@slack/logger/node_modules/@types/node/os.d.ts +1 -1
  66. package/node_modules/@slack/logger/node_modules/@types/node/package.json +2 -7
  67. package/node_modules/@slack/logger/node_modules/@types/node/path.d.ts +9 -1
  68. package/node_modules/@slack/logger/node_modules/@types/node/perf_hooks.d.ts +6 -4
  69. package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +1 -1
  70. package/node_modules/@slack/logger/node_modules/@types/node/punycode.d.ts +1 -1
  71. package/node_modules/@slack/logger/node_modules/@types/node/querystring.d.ts +1 -1
  72. package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +121 -14
  73. package/node_modules/@slack/logger/node_modules/@types/node/repl.d.ts +1 -1
  74. package/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +3 -65
  75. package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +10 -10
  76. package/node_modules/@slack/logger/node_modules/@types/node/string_decoder.d.ts +1 -1
  77. package/node_modules/@slack/logger/node_modules/@types/node/timers.d.ts +1 -1
  78. package/node_modules/@slack/logger/node_modules/@types/node/tls.d.ts +3 -2
  79. package/node_modules/@slack/logger/node_modules/@types/node/trace_events.d.ts +1 -1
  80. package/node_modules/@slack/logger/node_modules/@types/node/tty.d.ts +1 -1
  81. package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +58 -18
  82. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +3 -3
  83. package/node_modules/@slack/logger/node_modules/@types/node/v8.d.ts +3 -3
  84. package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +1 -1
  85. package/node_modules/@slack/logger/node_modules/@types/node/wasi.d.ts +1 -1
  86. package/node_modules/@slack/logger/node_modules/@types/node/worker_threads.d.ts +4 -4
  87. package/node_modules/@slack/logger/node_modules/@types/node/zlib.d.ts +1 -1
  88. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +2 -2
  89. package/node_modules/@slack/web-api/node_modules/@types/node/assert.d.ts +1 -1
  90. package/node_modules/@slack/web-api/node_modules/@types/node/async_hooks.d.ts +7 -3
  91. package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +9 -9
  92. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +1 -1
  93. package/node_modules/@slack/web-api/node_modules/@types/node/cluster.d.ts +1 -1
  94. package/node_modules/@slack/web-api/node_modules/@types/node/console.d.ts +1 -1
  95. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +2 -2
  96. package/node_modules/@slack/web-api/node_modules/@types/node/dgram.d.ts +2 -2
  97. package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +1 -1
  98. package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +12 -10
  99. package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +17 -12
  100. package/node_modules/@slack/web-api/node_modules/@types/node/domain.d.ts +1 -1
  101. package/node_modules/@slack/web-api/node_modules/@types/node/events.d.ts +2 -2
  102. package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +5 -5
  103. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +62 -11
  104. package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +3 -3
  105. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +31 -4
  106. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +6 -6
  107. package/node_modules/@slack/web-api/node_modules/@types/node/https.d.ts +1 -1
  108. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +1 -2
  109. package/node_modules/@slack/web-api/node_modules/@types/node/inspector.d.ts +4 -5
  110. package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +15 -14
  111. package/node_modules/@slack/web-api/node_modules/@types/node/os.d.ts +1 -1
  112. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +2 -7
  113. package/node_modules/@slack/web-api/node_modules/@types/node/path.d.ts +9 -1
  114. package/node_modules/@slack/web-api/node_modules/@types/node/perf_hooks.d.ts +6 -4
  115. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +1 -1
  116. package/node_modules/@slack/web-api/node_modules/@types/node/punycode.d.ts +1 -1
  117. package/node_modules/@slack/web-api/node_modules/@types/node/querystring.d.ts +1 -1
  118. package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +121 -14
  119. package/node_modules/@slack/web-api/node_modules/@types/node/repl.d.ts +1 -1
  120. package/node_modules/@slack/web-api/node_modules/@types/node/stream/web.d.ts +3 -65
  121. package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +10 -10
  122. package/node_modules/@slack/web-api/node_modules/@types/node/string_decoder.d.ts +1 -1
  123. package/node_modules/@slack/web-api/node_modules/@types/node/timers.d.ts +1 -1
  124. package/node_modules/@slack/web-api/node_modules/@types/node/tls.d.ts +3 -2
  125. package/node_modules/@slack/web-api/node_modules/@types/node/trace_events.d.ts +1 -1
  126. package/node_modules/@slack/web-api/node_modules/@types/node/tty.d.ts +1 -1
  127. package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +58 -18
  128. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +3 -3
  129. package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +3 -3
  130. package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +1 -1
  131. package/node_modules/@slack/web-api/node_modules/@types/node/wasi.d.ts +1 -1
  132. package/node_modules/@slack/web-api/node_modules/@types/node/worker_threads.d.ts +4 -4
  133. package/node_modules/@slack/web-api/node_modules/@types/node/zlib.d.ts +1 -1
  134. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
  135. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +0 -1
  136. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +2 -7
  137. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +2 -2
  138. package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +0 -1
  139. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +2 -7
  140. package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
  141. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +0 -1
  142. package/node_modules/@types/keyv/node_modules/@types/node/package.json +2 -7
  143. package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
  144. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +0 -1
  145. package/node_modules/@types/responselike/node_modules/@types/node/package.json +2 -7
  146. package/node_modules/follow-redirects/index.js +2 -2
  147. package/node_modules/follow-redirects/package.json +1 -1
  148. package/node_modules/keyv/.nyc_output/37411020-4142-4b08-b825-343ba2427bf7.json +1 -0
  149. package/node_modules/keyv/.nyc_output/cd79f2de-c8b8-4493-bc15-b2bde28efa4b.json +1 -0
  150. package/node_modules/keyv/.nyc_output/processinfo/37411020-4142-4b08-b825-343ba2427bf7.json +1 -0
  151. package/node_modules/keyv/.nyc_output/processinfo/cd79f2de-c8b8-4493-bc15-b2bde28efa4b.json +1 -0
  152. package/node_modules/keyv/.nyc_output/processinfo/index.json +1 -0
  153. package/node_modules/keyv/README.md +9 -8
  154. package/node_modules/keyv/package.json +5 -7
  155. package/node_modules/keyv/test/test.js +132 -0
  156. package/node_modules/keyv/test/testdb.sqlite +0 -0
  157. package/package.json +24 -11
  158. package/releasetag.txt +1 -1
  159. package/version.txt +1 -1
  160. package/node_modules/keyv/LICENSE +0 -21
@@ -16,7 +16,7 @@
16
16
  *
17
17
  * All file system operations have synchronous, callback, and promise-based
18
18
  * forms, and are accessible using both CommonJS syntax and ES6 Modules (ESM).
19
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/fs.js)
19
+ * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/fs.js)
20
20
  */
21
21
  declare module 'fs' {
22
22
  import * as stream from 'node:stream';
@@ -268,18 +268,22 @@ declare module 'fs' {
268
268
  */
269
269
  export interface StatWatcher extends EventEmitter {
270
270
  /**
271
+ * When called, requests that the Node.js event loop _not_ exit so long as the `fs.StatWatcher` is active. Calling `watcher.ref()` multiple times will have
272
+ * no effect.
273
+ *
274
+ * By default, all `fs.StatWatcher` objects are "ref'ed", making it normally
275
+ * unnecessary to call `watcher.ref()` unless `watcher.unref()` had been
276
+ * called previously.
271
277
  * @since v14.3.0, v12.20.0
272
- * When called, requests that the Node.js event loop not exit so long as the `fs.StatWatcher` is active.
273
- * Calling `watcher.ref()` multiple times will have no effect.
274
- * By default, all `fs.StatWatcher`` objects are "ref'ed", making it normally unnecessary to call `watcher.ref()`
275
- * unless `watcher.unref()` had been called previously.
276
278
  */
277
279
  ref(): this;
278
280
  /**
281
+ * When called, the active `fs.StatWatcher` object will not require the Node.js
282
+ * event loop to remain active. If there is no other activity keeping the
283
+ * event loop running, the process may exit before the `fs.StatWatcher` object's
284
+ * callback is invoked. Calling `watcher.unref()` multiple times will have
285
+ * no effect.
279
286
  * @since v14.3.0, v12.20.0
280
- * When called, the active `fs.StatWatcher`` object will not require the Node.js event loop to remain active.
281
- * If there is no other activity keeping the event loop running, the process may exit before the `fs.StatWatcher`` object's callback is invoked.
282
- * `Calling watcher.unref()` multiple times will have no effect.
283
287
  */
284
288
  unref(): this;
285
289
  }
@@ -1014,8 +1018,10 @@ declare module 'fs' {
1014
1018
  function __promisify__(fd: number, options?: StatOptions): Promise<Stats | BigIntStats>;
1015
1019
  }
1016
1020
  /**
1017
- * Synchronous fstat(2) - Get file status.
1018
- * @param fd A file descriptor.
1021
+ * Retrieves the `fs.Stats` for the file descriptor.
1022
+ *
1023
+ * See the POSIX [`fstat(2)`](http://man7.org/linux/man-pages/man2/fstat.2.html) documentation for more detail.
1024
+ * @since v0.1.95
1019
1025
  */
1020
1026
  export function fstatSync(
1021
1027
  fd: number,
@@ -1030,7 +1036,6 @@ declare module 'fs' {
1030
1036
  }
1031
1037
  ): BigIntStats;
1032
1038
  export function fstatSync(fd: number, options?: StatOptions): Stats | BigIntStats;
1033
-
1034
1039
  /**
1035
1040
  * Retrieves the `fs.Stats` for the symbolic link referred to by the path.
1036
1041
  * The callback gets two arguments `(err, stats)` where `stats` is a `fs.Stats` object. `lstat()` is identical to `stat()`, except that if `path` is a symbolic
@@ -2812,6 +2817,52 @@ declare module 'fs' {
2812
2817
  persistent?: boolean | undefined;
2813
2818
  interval?: number | undefined;
2814
2819
  }
2820
+ /**
2821
+ * Watch for changes on `filename`. The callback `listener` will be called each
2822
+ * time the file is accessed.
2823
+ *
2824
+ * The `options` argument may be omitted. If provided, it should be an object. The`options` object may contain a boolean named `persistent` that indicates
2825
+ * whether the process should continue to run as long as files are being watched.
2826
+ * The `options` object may specify an `interval` property indicating how often the
2827
+ * target should be polled in milliseconds.
2828
+ *
2829
+ * The `listener` gets two arguments the current stat object and the previous
2830
+ * stat object:
2831
+ *
2832
+ * ```js
2833
+ * import { watchFile } from 'fs';
2834
+ *
2835
+ * watchFile('message.text', (curr, prev) => {
2836
+ * console.log(`the current mtime is: ${curr.mtime}`);
2837
+ * console.log(`the previous mtime was: ${prev.mtime}`);
2838
+ * });
2839
+ * ```
2840
+ *
2841
+ * These stat objects are instances of `fs.Stat`. If the `bigint` option is `true`,
2842
+ * the numeric values in these objects are specified as `BigInt`s.
2843
+ *
2844
+ * To be notified when the file was modified, not just accessed, it is necessary
2845
+ * to compare `curr.mtimeMs` and `prev.mtimeMs`.
2846
+ *
2847
+ * When an `fs.watchFile` operation results in an `ENOENT` error, it
2848
+ * will invoke the listener once, with all the fields zeroed (or, for dates, the
2849
+ * Unix Epoch). If the file is created later on, the listener will be called
2850
+ * again, with the latest stat objects. This is a change in functionality since
2851
+ * v0.10.
2852
+ *
2853
+ * Using {@link watch} is more efficient than `fs.watchFile` and`fs.unwatchFile`. `fs.watch` should be used instead of `fs.watchFile` and`fs.unwatchFile` when possible.
2854
+ *
2855
+ * When a file being watched by `fs.watchFile()` disappears and reappears,
2856
+ * then the contents of `previous` in the second callback event (the file's
2857
+ * reappearance) will be the same as the contents of `previous` in the first
2858
+ * callback event (its disappearance).
2859
+ *
2860
+ * This happens when:
2861
+ *
2862
+ * * the file is deleted, followed by a restore
2863
+ * * the file is renamed and then renamed a second time back to its original name
2864
+ * @since v0.1.31
2865
+ */
2815
2866
  export function watchFile(
2816
2867
  filename: PathLike,
2817
2868
  options:
@@ -205,9 +205,9 @@ declare namespace NodeJS {
205
205
  writable: boolean;
206
206
  write(buffer: Uint8Array | string, cb?: (err?: Error | null) => void): boolean;
207
207
  write(str: string, encoding?: BufferEncoding, cb?: (err?: Error | null) => void): boolean;
208
- end(cb?: () => void): void;
209
- end(data: string | Uint8Array, cb?: () => void): void;
210
- end(str: string, encoding?: BufferEncoding, cb?: () => void): void;
208
+ end(cb?: () => void): this;
209
+ end(data: string | Uint8Array, cb?: () => void): this;
210
+ end(str: string, encoding?: BufferEncoding, cb?: () => void): this;
211
211
  }
212
212
 
213
213
  interface ReadWriteStream extends ReadableStream, WritableStream { }
@@ -37,7 +37,7 @@
37
37
  * 'Host', 'mysite.com',
38
38
  * 'accepT', '*' ]
39
39
  * ```
40
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http.js)
40
+ * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/http.js)
41
41
  */
42
42
  declare module 'http' {
43
43
  import * as stream from 'node:stream';
@@ -341,7 +341,7 @@ declare module 'http' {
341
341
  /**
342
342
  * Aliases of `outgoingMessage.socket`
343
343
  * @since v0.3.0
344
- * @deprecated Since v15.12.0 - Use `socket` instead.
344
+ * @deprecated Since v15.12.0,v14.17.1 - Use `socket` instead.
345
345
  */
346
346
  readonly connection: Socket | null;
347
347
  /**
@@ -608,6 +608,7 @@ declare module 'http' {
608
608
  * The `request.aborted` property will be `true` if the request has
609
609
  * been aborted.
610
610
  * @since v0.11.14
611
+ * @deprecated Since v17.0.0 - Check `destroyed` instead.
611
612
  */
612
613
  aborted: boolean;
613
614
  /**
@@ -620,6 +621,16 @@ declare module 'http' {
620
621
  * @since v14.5.0, v12.19.0
621
622
  */
622
623
  protocol: string;
624
+ /**
625
+ * Whether the request is send through a reused socket.
626
+ * @since v13.0.0, v12.16.0
627
+ */
628
+ reusedSocket: boolean;
629
+ /**
630
+ * Limits maximum response headers count. If set to 0, no limit will be applied.
631
+ * @default 2000
632
+ */
633
+ maxHeadersCount: number;
623
634
  constructor(url: string | URL | ClientRequestArgs, cb?: (res: IncomingMessage) => void);
624
635
  /**
625
636
  * The request method.
@@ -667,9 +678,12 @@ declare module 'http' {
667
678
  * const headerNames = request.getRawHeaderNames();
668
679
  * // headerNames === ['Foo', 'Set-Cookie']
669
680
  * ```
670
- * @since v15.13.0
681
+ * @since v15.13.0, v14.17.0
671
682
  */
672
683
  getRawHeaderNames(): string[];
684
+ /**
685
+ * @deprecated
686
+ */
673
687
  addListener(event: 'abort', listener: () => void): this;
674
688
  addListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
675
689
  addListener(event: 'continue', listener: () => void): this;
@@ -685,6 +699,9 @@ declare module 'http' {
685
699
  addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
686
700
  addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
687
701
  addListener(event: string | symbol, listener: (...args: any[]) => void): this;
702
+ /**
703
+ * @deprecated
704
+ */
688
705
  on(event: 'abort', listener: () => void): this;
689
706
  on(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
690
707
  on(event: 'continue', listener: () => void): this;
@@ -700,6 +717,9 @@ declare module 'http' {
700
717
  on(event: 'pipe', listener: (src: stream.Readable) => void): this;
701
718
  on(event: 'unpipe', listener: (src: stream.Readable) => void): this;
702
719
  on(event: string | symbol, listener: (...args: any[]) => void): this;
720
+ /**
721
+ * @deprecated
722
+ */
703
723
  once(event: 'abort', listener: () => void): this;
704
724
  once(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
705
725
  once(event: 'continue', listener: () => void): this;
@@ -715,6 +735,9 @@ declare module 'http' {
715
735
  once(event: 'pipe', listener: (src: stream.Readable) => void): this;
716
736
  once(event: 'unpipe', listener: (src: stream.Readable) => void): this;
717
737
  once(event: string | symbol, listener: (...args: any[]) => void): this;
738
+ /**
739
+ * @deprecated
740
+ */
718
741
  prependListener(event: 'abort', listener: () => void): this;
719
742
  prependListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
720
743
  prependListener(event: 'continue', listener: () => void): this;
@@ -730,6 +753,9 @@ declare module 'http' {
730
753
  prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
731
754
  prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
732
755
  prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
756
+ /**
757
+ * @deprecated
758
+ */
733
759
  prependOnceListener(event: 'abort', listener: () => void): this;
734
760
  prependOnceListener(event: 'connect', listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void): this;
735
761
  prependOnceListener(event: 'continue', listener: () => void): this;
@@ -762,6 +788,7 @@ declare module 'http' {
762
788
  * The `message.aborted` property will be `true` if the request has
763
789
  * been aborted.
764
790
  * @since v10.1.0
791
+ * @deprecated Since v17.0.0 - Check `message.destroyed` from [stream.Readable](https://nodejs.org/dist/latest-v17.x/docs/api/stream.html#class-streamreadable).
765
792
  */
766
793
  aborted: boolean;
767
794
  /**
@@ -949,7 +976,7 @@ declare module 'http' {
949
976
  * as an argument to any listeners on the event.
950
977
  * @since v0.3.0
951
978
  */
952
- destroy(error?: Error): void;
979
+ destroy(error?: Error): this;
953
980
  }
954
981
  interface AgentOptions extends Partial<TcpSocketConnectOpts> {
955
982
  /**
@@ -6,7 +6,7 @@
6
6
  * const http2 = require('http2');
7
7
  * ```
8
8
  * @since v8.4.0
9
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/http2.js)
9
+ * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/http2.js)
10
10
  */
11
11
  declare module 'http2' {
12
12
  import EventEmitter = require('node:events');
@@ -757,7 +757,7 @@ declare module 'http2' {
757
757
  * session.setLocalWindowSize(expectedWindowSize);
758
758
  * });
759
759
  * ```
760
- * @since v15.3.0
760
+ * @since v15.3.0, v14.18.0
761
761
  */
762
762
  setLocalWindowSize(windowSize: number): void;
763
763
  /**
@@ -1349,7 +1349,7 @@ declare module 'http2' {
1349
1349
  * ```
1350
1350
  * @since v8.4.0
1351
1351
  */
1352
- readonly url: string;
1352
+ url: string;
1353
1353
  /**
1354
1354
  * Sets the `Http2Stream`'s timeout value to `msecs`. If a callback is
1355
1355
  * provided, then it is added as a listener on the `'timeout'` event on
@@ -1516,9 +1516,9 @@ declare module 'http2' {
1516
1516
  * is finished.
1517
1517
  * @since v8.4.0
1518
1518
  */
1519
- end(callback?: () => void): void;
1520
- end(data: string | Uint8Array, callback?: () => void): void;
1521
- end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): void;
1519
+ end(callback?: () => void): this;
1520
+ end(data: string | Uint8Array, callback?: () => void): this;
1521
+ end(data: string | Uint8Array, encoding: BufferEncoding, callback?: () => void): this;
1522
1522
  /**
1523
1523
  * Reads out a header that has already been queued but not sent to the client.
1524
1524
  * The name is case-insensitive.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * HTTPS is the HTTP protocol over TLS/SSL. In Node.js this is implemented as a
3
3
  * separate module.
4
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/https.js)
4
+ * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/https.js)
5
5
  */
6
6
  declare module 'https' {
7
7
  import { Duplex } from 'node:stream';
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 16.11
1
+ // Type definitions for non-npm package Node.js 17.0
2
2
  // Project: https://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
@@ -34,7 +34,6 @@
34
34
  // Junxiao Shi <https://github.com/yoursunny>
35
35
  // Ilia Baryshnikov <https://github.com/qwelias>
36
36
  // ExE Boss <https://github.com/ExE-Boss>
37
- // Surasak Chaisurin <https://github.com/Ryan-Willpower>
38
37
  // Piotr Błażejewicz <https://github.com/peterblazejewicz>
39
38
  // Anna Henningsen <https://github.com/addaleax>
40
39
  // Victor Perin <https://github.com/victorperin>
@@ -15,7 +15,7 @@
15
15
  * ```js
16
16
  * const inspector = require('inspector');
17
17
  * ```
18
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/inspector.js)
18
+ * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/inspector.js)
19
19
  */
20
20
  declare module 'inspector' {
21
21
  import EventEmitter = require('node:events');
@@ -1779,10 +1779,9 @@ declare module 'inspector' {
1779
1779
  */
1780
1780
  connect(): void;
1781
1781
  /**
1782
- * Connects a session to the main thread inspector back-end.
1783
- * An exception will be thrown if this API was not called on a Worker
1784
- * thread.
1785
- * @since 12.11.0
1782
+ * Connects a session to the main thread inspector back-end. An exception will
1783
+ * be thrown if this API was not called on a Worker thread.
1784
+ * @since v12.11.0
1786
1785
  */
1787
1786
  connectToMainThread(): void;
1788
1787
  /**
@@ -10,7 +10,7 @@
10
10
  * ```js
11
11
  * const net = require('net');
12
12
  * ```
13
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/net.js)
13
+ * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/net.js)
14
14
  */
15
15
  declare module 'net' {
16
16
  import * as stream from 'node:stream';
@@ -27,6 +27,7 @@ declare module 'net' {
27
27
  allowHalfOpen?: boolean | undefined;
28
28
  readable?: boolean | undefined;
29
29
  writable?: boolean | undefined;
30
+ signal?: AbortSignal;
30
31
  }
31
32
  interface OnReadOpts {
32
33
  buffer: Uint8Array | (() => Uint8Array);
@@ -287,9 +288,9 @@ declare module 'net' {
287
288
  * @param callback Optional callback for when the socket is finished.
288
289
  * @return The socket itself.
289
290
  */
290
- end(callback?: () => void): void;
291
- end(buffer: Uint8Array | string, callback?: () => void): void;
292
- end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): void;
291
+ end(callback?: () => void): this;
292
+ end(buffer: Uint8Array | string, callback?: () => void): this;
293
+ end(str: Uint8Array | string, encoding?: BufferEncoding, callback?: () => void): this;
293
294
  /**
294
295
  * events.EventEmitter
295
296
  * 1. close
@@ -560,12 +561,12 @@ declare module 'net' {
560
561
  * The `BlockList` object can be used with some network APIs to specify rules for
561
562
  * disabling inbound or outbound access to specific IP addresses, IP ranges, or
562
563
  * IP subnets.
563
- * @since v15.0.0
564
+ * @since v15.0.0, v14.18.0
564
565
  */
565
566
  class BlockList {
566
567
  /**
567
568
  * Adds a rule to block the given IP address.
568
- * @since v15.0.0
569
+ * @since v15.0.0, v14.18.0
569
570
  * @param address An IPv4 or IPv6 address.
570
571
  * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
571
572
  */
@@ -573,7 +574,7 @@ declare module 'net' {
573
574
  addAddress(address: SocketAddress): void;
574
575
  /**
575
576
  * Adds a rule to block a range of IP addresses from `start` (inclusive) to`end` (inclusive).
576
- * @since v15.0.0
577
+ * @since v15.0.0, v14.18.0
577
578
  * @param start The starting IPv4 or IPv6 address in the range.
578
579
  * @param end The ending IPv4 or IPv6 address in the range.
579
580
  * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
@@ -582,7 +583,7 @@ declare module 'net' {
582
583
  addRange(start: SocketAddress, end: SocketAddress): void;
583
584
  /**
584
585
  * Adds a rule to block a range of IP addresses specified as a subnet mask.
585
- * @since v15.0.0
586
+ * @since v15.0.0, v14.18.0
586
587
  * @param net The network IPv4 or IPv6 address.
587
588
  * @param prefix The number of CIDR prefix bits. For IPv4, this must be a value between `0` and `32`. For IPv6, this must be between `0` and `128`.
588
589
  * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
@@ -606,7 +607,7 @@ declare module 'net' {
606
607
  * console.log(blockList.check('::ffff:7b7b:7b7b', 'ipv6')); // Prints: true
607
608
  * console.log(blockList.check('::ffff:123.123.123.123', 'ipv6')); // Prints: true
608
609
  * ```
609
- * @since v15.0.0
610
+ * @since v15.0.0, v14.18.0
610
611
  * @param address The IP address to check
611
612
  * @param [type='ipv4'] Either `'ipv4'` or `'ipv6'`.
612
613
  */
@@ -754,26 +755,26 @@ declare module 'net' {
754
755
  port?: number | undefined;
755
756
  }
756
757
  /**
757
- * @since v15.14.0
758
+ * @since v15.14.0, v14.18.0
758
759
  */
759
760
  class SocketAddress {
760
761
  constructor(options: SocketAddressInitOptions);
761
762
  /**
762
763
  * Either \`'ipv4'\` or \`'ipv6'\`.
763
- * @since v15.14.0
764
+ * @since v15.14.0, v14.18.0
764
765
  */
765
766
  readonly address: string;
766
767
  /**
767
768
  * Either \`'ipv4'\` or \`'ipv6'\`.
768
- * @since v15.14.0
769
+ * @since v15.14.0, v14.18.0
769
770
  */
770
771
  readonly family: IPVersion;
771
772
  /**
772
- * @since v15.14.0
773
+ * @since v15.14.0, v14.18.0
773
774
  */
774
775
  readonly port: number;
775
776
  /**
776
- * @since v15.14.0
777
+ * @since v15.14.0, v14.18.0
777
778
  */
778
779
  readonly flowlabel: number;
779
780
  }
@@ -5,7 +5,7 @@
5
5
  * ```js
6
6
  * const os = require('os');
7
7
  * ```
8
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/os.js)
8
+ * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/os.js)
9
9
  */
10
10
  declare module 'os' {
11
11
  interface CpuInfo {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "16.11.12",
3
+ "version": "17.0.10",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -175,11 +175,6 @@
175
175
  "url": "https://github.com/ExE-Boss",
176
176
  "githubUsername": "ExE-Boss"
177
177
  },
178
- {
179
- "name": "Surasak Chaisurin",
180
- "url": "https://github.com/Ryan-Willpower",
181
- "githubUsername": "Ryan-Willpower"
182
- },
183
178
  {
184
179
  "name": "Piotr Błażejewicz",
185
180
  "url": "https://github.com/peterblazejewicz",
@@ -225,6 +220,6 @@
225
220
  },
226
221
  "scripts": {},
227
222
  "dependencies": {},
228
- "typesPublisherContentHash": "66478bcf856b451a83d797fa3c4495aeb7e18e217db90d6545b2711843bfe71c",
223
+ "typesPublisherContentHash": "a2e243404f102a5fd5fbcaefab0a775ffcb1db4d09832612decbd69815f1890b",
229
224
  "typeScriptVersion": "3.8"
230
225
  }
@@ -13,7 +13,7 @@ declare module 'path/win32' {
13
13
  * ```js
14
14
  * const path = require('path');
15
15
  * ```
16
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/path.js)
16
+ * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/path.js)
17
17
  */
18
18
  declare module 'path' {
19
19
  namespace path {
@@ -170,3 +170,11 @@ declare module 'node:path' {
170
170
  import path = require('path');
171
171
  export = path;
172
172
  }
173
+ declare module 'node:path/posix' {
174
+ import path = require('path/posix');
175
+ export = path;
176
+ }
177
+ declare module 'node:path/win32' {
178
+ import path = require('path/win32');
179
+ export = path;
180
+ }
@@ -26,7 +26,7 @@
26
26
  * performance.measure('A to B', 'A', 'B');
27
27
  * });
28
28
  * ```
29
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/perf_hooks.js)
29
+ * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/perf_hooks.js)
30
30
  */
31
31
  declare module 'perf_hooks' {
32
32
  import { AsyncResource } from 'node:async_hooks';
@@ -397,9 +397,11 @@ declare module 'perf_hooks' {
397
397
  options:
398
398
  | {
399
399
  entryTypes: ReadonlyArray<EntryType>;
400
+ buffered?: boolean | undefined;
400
401
  }
401
402
  | {
402
403
  type: EntryType;
404
+ buffered?: boolean | undefined;
403
405
  }
404
406
  ): void;
405
407
  }
@@ -485,7 +487,7 @@ declare module 'perf_hooks' {
485
487
  }
486
488
  interface RecordableHistogram extends Histogram {
487
489
  /**
488
- * @since v15.9.0
490
+ * @since v15.9.0, v14.18.0
489
491
  * @param val The amount to record in the histogram.
490
492
  */
491
493
  record(val: number | bigint): void;
@@ -494,7 +496,7 @@ declare module 'perf_hooks' {
494
496
  * previous call to `recordDelta()` and records that amount in the histogram.
495
497
  *
496
498
  * ## Examples
497
- * @since v15.9.0
499
+ * @since v15.9.0, v14.18.0
498
500
  */
499
501
  recordDelta(): void;
500
502
  }
@@ -546,7 +548,7 @@ declare module 'perf_hooks' {
546
548
  }
547
549
  /**
548
550
  * Returns a `RecordableHistogram`.
549
- * @since v15.9.0
551
+ * @since v15.9.0, v14.18.0
550
552
  */
551
553
  function createHistogram(options?: CreateHistogramOptions): RecordableHistogram;
552
554
  }
@@ -146,7 +146,7 @@ declare module 'process' {
146
146
  /**
147
147
  * If true, a diagnostic report is generated when the process
148
148
  * receives the signal specified by process.report.signal.
149
- * @defaul false
149
+ * @default false
150
150
  */
151
151
  reportOnSignal: boolean;
152
152
  /**
@@ -24,7 +24,7 @@
24
24
  * made available to developers as a convenience. Fixes or other modifications to
25
25
  * the module must be directed to the [Punycode.js](https://github.com/bestiejs/punycode.js) project.
26
26
  * @deprecated Since v7.0.0 - Deprecated
27
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/punycode.js)
27
+ * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/punycode.js)
28
28
  */
29
29
  declare module 'punycode' {
30
30
  /**
@@ -9,7 +9,7 @@
9
9
  * The `querystring` API is considered Legacy. While it is still maintained,
10
10
  * new code should use the `URLSearchParams` API instead.
11
11
  * @deprecated Legacy
12
- * @see [source](https://github.com/nodejs/node/blob/v16.9.0/lib/querystring.js)
12
+ * @see [source](https://github.com/nodejs/node/blob/v17.0.0/lib/querystring.js)
13
13
  */
14
14
  declare module 'querystring' {
15
15
  interface StringifyOptions {