cloudstructs 0.6.26 → 0.6.28

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 (143) hide show
  1. package/.jsii +23 -5
  2. package/API.md +2 -0
  3. package/lib/codecommit-mirror/index.js +2 -2
  4. package/lib/ecs-service-roller/index.js +2 -2
  5. package/lib/email-receiver/receiver.d.ts +6 -0
  6. package/lib/email-receiver/receiver.js +3 -2
  7. package/lib/saml-identity-provider/index.js +2 -2
  8. package/lib/slack-app/manifest.js +1 -1
  9. package/lib/slack-app/slack-app.js +2 -2
  10. package/lib/slack-events/index.js +1 -1
  11. package/lib/slack-textract/index.js +1 -1
  12. package/lib/ssl-server-test/index.js +1 -1
  13. package/lib/state-machine-cr-provider/index.js +1 -1
  14. package/lib/static-website/index.js +1 -1
  15. package/lib/toolkit-cleaner/index.js +1 -1
  16. package/lib/url-shortener/index.js +1 -1
  17. package/node_modules/@slack/logger/node_modules/@types/node/README.md +1 -1
  18. package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +3 -2
  19. package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +39 -0
  20. package/node_modules/@slack/logger/node_modules/@types/node/dns.d.ts +1 -1
  21. package/node_modules/@slack/logger/node_modules/@types/node/globals.d.ts +1 -0
  22. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +7 -0
  23. package/node_modules/@slack/logger/node_modules/@types/node/http2.d.ts +0 -1
  24. package/node_modules/@slack/logger/node_modules/@types/node/package.json +3 -3
  25. package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +6 -0
  26. package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +99 -0
  27. package/node_modules/@slack/logger/node_modules/@types/node/test.d.ts +99 -31
  28. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +40 -1
  29. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/dns.d.ts +1 -1
  30. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/http2.d.ts +0 -1
  31. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/process.d.ts +6 -0
  32. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/stream.d.ts +99 -0
  33. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/test.d.ts +99 -31
  34. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/v8.d.ts +51 -0
  35. package/node_modules/@slack/logger/node_modules/@types/node/ts4.8/vm.d.ts +146 -11
  36. package/node_modules/@slack/logger/node_modules/@types/node/v8.d.ts +51 -0
  37. package/node_modules/@slack/logger/node_modules/@types/node/vm.d.ts +146 -11
  38. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +1 -1
  39. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +3 -2
  40. package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +39 -0
  41. package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +1 -1
  42. package/node_modules/@slack/web-api/node_modules/@types/node/globals.d.ts +1 -0
  43. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +7 -0
  44. package/node_modules/@slack/web-api/node_modules/@types/node/http2.d.ts +0 -1
  45. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +3 -3
  46. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +6 -0
  47. package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +99 -0
  48. package/node_modules/@slack/web-api/node_modules/@types/node/test.d.ts +99 -31
  49. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +40 -1
  50. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/dns.d.ts +1 -1
  51. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/http2.d.ts +0 -1
  52. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/process.d.ts +6 -0
  53. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/stream.d.ts +99 -0
  54. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/test.d.ts +99 -31
  55. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/v8.d.ts +51 -0
  56. package/node_modules/@slack/web-api/node_modules/@types/node/ts4.8/vm.d.ts +146 -11
  57. package/node_modules/@slack/web-api/node_modules/@types/node/v8.d.ts +51 -0
  58. package/node_modules/@slack/web-api/node_modules/@types/node/vm.d.ts +146 -11
  59. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +1 -1
  60. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +3 -2
  61. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +39 -0
  62. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +1 -1
  63. package/node_modules/@types/cacheable-request/node_modules/@types/node/globals.d.ts +1 -0
  64. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +7 -0
  65. package/node_modules/@types/cacheable-request/node_modules/@types/node/http2.d.ts +0 -1
  66. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +3 -3
  67. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +6 -0
  68. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +99 -0
  69. package/node_modules/@types/cacheable-request/node_modules/@types/node/test.d.ts +99 -31
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +40 -1
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/dns.d.ts +1 -1
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/http2.d.ts +0 -1
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/process.d.ts +6 -0
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/stream.d.ts +99 -0
  75. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/test.d.ts +99 -31
  76. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/v8.d.ts +51 -0
  77. package/node_modules/@types/cacheable-request/node_modules/@types/node/ts4.8/vm.d.ts +146 -11
  78. package/node_modules/@types/cacheable-request/node_modules/@types/node/v8.d.ts +51 -0
  79. package/node_modules/@types/cacheable-request/node_modules/@types/node/vm.d.ts +146 -11
  80. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +1 -1
  81. package/node_modules/@types/is-stream/node_modules/@types/node/crypto.d.ts +3 -2
  82. package/node_modules/@types/is-stream/node_modules/@types/node/diagnostics_channel.d.ts +39 -0
  83. package/node_modules/@types/is-stream/node_modules/@types/node/dns.d.ts +1 -1
  84. package/node_modules/@types/is-stream/node_modules/@types/node/globals.d.ts +1 -0
  85. package/node_modules/@types/is-stream/node_modules/@types/node/http.d.ts +7 -0
  86. package/node_modules/@types/is-stream/node_modules/@types/node/http2.d.ts +0 -1
  87. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +3 -3
  88. package/node_modules/@types/is-stream/node_modules/@types/node/process.d.ts +6 -0
  89. package/node_modules/@types/is-stream/node_modules/@types/node/stream.d.ts +99 -0
  90. package/node_modules/@types/is-stream/node_modules/@types/node/test.d.ts +99 -31
  91. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +40 -1
  92. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/dns.d.ts +1 -1
  93. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/http2.d.ts +0 -1
  94. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/process.d.ts +6 -0
  95. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/stream.d.ts +99 -0
  96. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/test.d.ts +99 -31
  97. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/v8.d.ts +51 -0
  98. package/node_modules/@types/is-stream/node_modules/@types/node/ts4.8/vm.d.ts +146 -11
  99. package/node_modules/@types/is-stream/node_modules/@types/node/v8.d.ts +51 -0
  100. package/node_modules/@types/is-stream/node_modules/@types/node/vm.d.ts +146 -11
  101. package/node_modules/@types/keyv/node_modules/@types/node/README.md +1 -1
  102. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +3 -2
  103. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +39 -0
  104. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +1 -1
  105. package/node_modules/@types/keyv/node_modules/@types/node/globals.d.ts +1 -0
  106. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +7 -0
  107. package/node_modules/@types/keyv/node_modules/@types/node/http2.d.ts +0 -1
  108. package/node_modules/@types/keyv/node_modules/@types/node/package.json +3 -3
  109. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +6 -0
  110. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +99 -0
  111. package/node_modules/@types/keyv/node_modules/@types/node/test.d.ts +99 -31
  112. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +40 -1
  113. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/dns.d.ts +1 -1
  114. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/http2.d.ts +0 -1
  115. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/process.d.ts +6 -0
  116. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/stream.d.ts +99 -0
  117. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/test.d.ts +99 -31
  118. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/v8.d.ts +51 -0
  119. package/node_modules/@types/keyv/node_modules/@types/node/ts4.8/vm.d.ts +146 -11
  120. package/node_modules/@types/keyv/node_modules/@types/node/v8.d.ts +51 -0
  121. package/node_modules/@types/keyv/node_modules/@types/node/vm.d.ts +146 -11
  122. package/node_modules/@types/responselike/node_modules/@types/node/README.md +1 -1
  123. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +3 -2
  124. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +39 -0
  125. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +1 -1
  126. package/node_modules/@types/responselike/node_modules/@types/node/globals.d.ts +1 -0
  127. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +7 -0
  128. package/node_modules/@types/responselike/node_modules/@types/node/http2.d.ts +0 -1
  129. package/node_modules/@types/responselike/node_modules/@types/node/package.json +3 -3
  130. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +6 -0
  131. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +99 -0
  132. package/node_modules/@types/responselike/node_modules/@types/node/test.d.ts +99 -31
  133. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +40 -1
  134. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/dns.d.ts +1 -1
  135. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/http2.d.ts +0 -1
  136. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/process.d.ts +6 -0
  137. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/stream.d.ts +99 -0
  138. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/test.d.ts +99 -31
  139. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/v8.d.ts +51 -0
  140. package/node_modules/@types/responselike/node_modules/@types/node/ts4.8/vm.d.ts +146 -11
  141. package/node_modules/@types/responselike/node_modules/@types/node/v8.d.ts +51 -0
  142. package/node_modules/@types/responselike/node_modules/@types/node/vm.d.ts +146 -11
  143. package/package.json +9 -9
@@ -7,16 +7,16 @@ declare module 'node:test' {
7
7
  * Programmatically start the test runner.
8
8
  * @since v18.9.0
9
9
  * @param options Configuration options for running tests.
10
- * @returns A {@link TapStream} that emits events about the test execution.
10
+ * @returns A {@link TestsStream} that emits events about the test execution.
11
11
  */
12
- function run(options?: RunOptions): TapStream;
12
+ function run(options?: RunOptions): TestsStream;
13
13
 
14
14
  /**
15
15
  * The `test()` function is the value imported from the test module. Each invocation of this
16
- * function results in the creation of a test point in the TAP output.
16
+ * function results in reporting the test to the {@link TestsStream}.
17
17
  *
18
18
  * The {@link TestContext} object passed to the fn argument can be used to perform actions
19
- * related to the current test. Examples include skipping the test, adding additional TAP
19
+ * related to the current test. Examples include skipping the test, adding additional
20
20
  * diagnostic information, or creating subtests.
21
21
  *
22
22
  * `test()` returns a {@link Promise} that resolves once the test completes. The return value
@@ -158,54 +158,88 @@ declare module 'node:test' {
158
158
  }
159
159
 
160
160
  /**
161
- * A successful call of the `run()` method will return a new `TapStream` object,
162
- * streaming a [TAP](https://testanything.org/) output.
163
- * `TapStream` will emit events in the order of the tests' definitions.
161
+ * A successful call of the `run()` method will return a new `TestsStream` object,
162
+ * streaming a series of events representing the execution of the tests.
163
+ * `TestsStream` will emit events in the order of the tests' definitions.
164
164
  * @since v18.9.0
165
165
  */
166
- interface TapStream extends NodeJS.ReadableStream {
167
- addListener(event: 'test:diagnostic', listener: (message: string) => void): this;
166
+ interface TestsStream extends NodeJS.ReadableStream {
167
+ addListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
168
168
  addListener(event: 'test:fail', listener: (data: TestFail) => void): this;
169
169
  addListener(event: 'test:pass', listener: (data: TestPass) => void): this;
170
+ addListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
171
+ addListener(event: 'test:start', listener: (data: TestStart) => void): this;
170
172
  addListener(event: string, listener: (...args: any[]) => void): this;
171
- emit(event: 'test:diagnostic', message: string): boolean;
173
+ emit(event: 'test:diagnostic', data: DiagnosticData): boolean;
172
174
  emit(event: 'test:fail', data: TestFail): boolean;
173
175
  emit(event: 'test:pass', data: TestPass): boolean;
176
+ emit(event: 'test:plan', data: TestPlan): boolean;
177
+ emit(event: 'test:start', data: TestStart): boolean;
174
178
  emit(event: string | symbol, ...args: any[]): boolean;
175
- on(event: 'test:diagnostic', listener: (message: string) => void): this;
179
+ on(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
176
180
  on(event: 'test:fail', listener: (data: TestFail) => void): this;
177
181
  on(event: 'test:pass', listener: (data: TestPass) => void): this;
182
+ on(event: 'test:plan', listener: (data: TestPlan) => void): this;
183
+ on(event: 'test:start', listener: (data: TestStart) => void): this;
178
184
  on(event: string, listener: (...args: any[]) => void): this;
179
- once(event: 'test:diagnostic', listener: (message: string) => void): this;
185
+ once(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
180
186
  once(event: 'test:fail', listener: (data: TestFail) => void): this;
181
187
  once(event: 'test:pass', listener: (data: TestPass) => void): this;
188
+ once(event: 'test:plan', listener: (data: TestPlan) => void): this;
189
+ once(event: 'test:start', listener: (data: TestStart) => void): this;
182
190
  once(event: string, listener: (...args: any[]) => void): this;
183
- prependListener(event: 'test:diagnostic', listener: (message: string) => void): this;
191
+ prependListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
184
192
  prependListener(event: 'test:fail', listener: (data: TestFail) => void): this;
185
193
  prependListener(event: 'test:pass', listener: (data: TestPass) => void): this;
194
+ prependListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
195
+ prependListener(event: 'test:start', listener: (data: TestStart) => void): this;
186
196
  prependListener(event: string, listener: (...args: any[]) => void): this;
187
- prependOnceListener(event: 'test:diagnostic', listener: (message: string) => void): this;
197
+ prependOnceListener(event: 'test:diagnostic', listener: (data: DiagnosticData) => void): this;
188
198
  prependOnceListener(event: 'test:fail', listener: (data: TestFail) => void): this;
189
199
  prependOnceListener(event: 'test:pass', listener: (data: TestPass) => void): this;
200
+ prependOnceListener(event: 'test:plan', listener: (data: TestPlan) => void): this;
201
+ prependOnceListener(event: 'test:start', listener: (data: TestStart) => void): this;
190
202
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
191
203
  }
192
204
 
193
- interface TestFail {
205
+ interface DiagnosticData {
206
+ /**
207
+ * The diagnostic message.
208
+ */
209
+ message: string;
210
+
194
211
  /**
195
- * The test duration.
212
+ * The nesting level of the test.
196
213
  */
197
- duration: number;
214
+ nesting: number;
215
+ }
198
216
 
217
+ interface TestFail {
199
218
  /**
200
- * The failure casing test to fail.
219
+ * Additional execution metadata.
201
220
  */
202
- error: Error;
221
+ details: {
222
+ /**
223
+ * The duration of the test in milliseconds.
224
+ */
225
+ duration: number;
226
+
227
+ /**
228
+ * The error thrown by the test.
229
+ */
230
+ error: Error;
231
+ };
203
232
 
204
233
  /**
205
234
  * The test name.
206
235
  */
207
236
  name: string;
208
237
 
238
+ /**
239
+ * The nesting level of the test.
240
+ */
241
+ nesting: number;
242
+
209
243
  /**
210
244
  * The ordinal number of the test.
211
245
  */
@@ -214,25 +248,35 @@ declare module 'node:test' {
214
248
  /**
215
249
  * Present if `context.todo` is called.
216
250
  */
217
- todo?: string;
251
+ todo?: string | boolean;
218
252
 
219
253
  /**
220
254
  * Present if `context.skip` is called.
221
255
  */
222
- skip?: string;
256
+ skip?: string | boolean;
223
257
  }
224
258
 
225
259
  interface TestPass {
226
260
  /**
227
- * The test duration.
261
+ * Additional execution metadata.
228
262
  */
229
- duration: number;
263
+ details: {
264
+ /**
265
+ * The duration of the test in milliseconds.
266
+ */
267
+ duration: number;
268
+ };
230
269
 
231
270
  /**
232
271
  * The test name.
233
272
  */
234
273
  name: string;
235
274
 
275
+ /**
276
+ * The nesting level of the test.
277
+ */
278
+ nesting: number;
279
+
236
280
  /**
237
281
  * The ordinal number of the test.
238
282
  */
@@ -241,12 +285,36 @@ declare module 'node:test' {
241
285
  /**
242
286
  * Present if `context.todo` is called.
243
287
  */
244
- todo?: string;
288
+ todo?: string | boolean;
245
289
 
246
290
  /**
247
291
  * Present if `context.skip` is called.
248
292
  */
249
- skip?: string;
293
+ skip?: string | boolean;
294
+ }
295
+
296
+ interface TestPlan {
297
+ /**
298
+ * The nesting level of the test.
299
+ */
300
+ nesting: number;
301
+
302
+ /**
303
+ * The number of subtests that have ran.
304
+ */
305
+ count: number;
306
+ }
307
+
308
+ interface TestStart {
309
+ /**
310
+ * The test name.
311
+ */
312
+ name: string;
313
+
314
+ /**
315
+ * The nesting level of the test.
316
+ */
317
+ nesting: number;
250
318
  }
251
319
 
252
320
  /**
@@ -283,9 +351,9 @@ declare module 'node:test' {
283
351
  afterEach: typeof afterEach;
284
352
 
285
353
  /**
286
- * This function is used to write TAP diagnostics to the output. Any diagnostic information is
354
+ * This function is used to write diagnostics to the output. Any diagnostic information is
287
355
  * included at the end of the test's results. This function does not return a value.
288
- * @param message Message to be displayed as a TAP diagnostic.
356
+ * @param message Message to be reported.
289
357
  * @since v18.0.0
290
358
  */
291
359
  diagnostic(message: string): void;
@@ -313,18 +381,18 @@ declare module 'node:test' {
313
381
 
314
382
  /**
315
383
  * This function causes the test's output to indicate the test as skipped. If `message` is
316
- * provided, it is included in the TAP output. Calling `skip()` does not terminate execution of
384
+ * provided, it is included in the output. Calling `skip()` does not terminate execution of
317
385
  * the test function. This function does not return a value.
318
- * @param message Optional skip message to be displayed in TAP output.
386
+ * @param message Optional skip message.
319
387
  * @since v18.0.0
320
388
  */
321
389
  skip(message?: string): void;
322
390
 
323
391
  /**
324
392
  * This function adds a `TODO` directive to the test's output. If `message` is provided, it is
325
- * included in the TAP output. Calling `todo()` does not terminate execution of the test
393
+ * included in the output. Calling `todo()` does not terminate execution of the test
326
394
  * function. This function does not return a value.
327
- * @param message Optional `TODO` message to be displayed in TAP output.
395
+ * @param message Optional `TODO` message.
328
396
  * @since v18.0.0
329
397
  */
330
398
  todo(message?: string): void;
@@ -20,7 +20,7 @@
20
20
  * should generally include the module name to avoid collisions with data from
21
21
  * other modules.
22
22
  * @experimental
23
- * @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/diagnostics_channel.js)
23
+ * @see [source](https://github.com/nodejs/node/blob/v18.7.0/lib/diagnostics_channel.js)
24
24
  */
25
25
  declare module 'diagnostics_channel' {
26
26
  /**
@@ -58,6 +58,45 @@ declare module 'diagnostics_channel' {
58
58
  */
59
59
  function channel(name: string | symbol): Channel;
60
60
  type ChannelListener = (message: unknown, name: string | symbol) => void;
61
+ /**
62
+ * Register a message handler to subscribe to this channel. This message handler will be run synchronously
63
+ * whenever a message is published to the channel. Any errors thrown in the message handler will
64
+ * trigger an 'uncaughtException'.
65
+ *
66
+ * ```js
67
+ * import diagnostics_channel from 'diagnostics_channel';
68
+ *
69
+ * diagnostics_channel.subscribe('my-channel', (message, name) => {
70
+ * // Received data
71
+ * });
72
+ * ```
73
+ *
74
+ * @since v18.7.0, v16.17.0
75
+ * @param name The channel name
76
+ * @param onMessage The handler to receive channel messages
77
+ */
78
+ function subscribe(name: string | symbol, onMessage: ChannelListener): void;
79
+ /**
80
+ * Remove a message handler previously registered to this channel with diagnostics_channel.subscribe(name, onMessage).
81
+ *
82
+ * ```js
83
+ * import diagnostics_channel from 'diagnostics_channel';
84
+ *
85
+ * function onMessage(message, name) {
86
+ * // Received data
87
+ * }
88
+ *
89
+ * diagnostics_channel.subscribe('my-channel', onMessage);
90
+ *
91
+ * diagnostics_channel.unsubscribe('my-channel', onMessage);
92
+ * ```
93
+ *
94
+ * @since v18.7.0, v16.17.0
95
+ * @param name The channel name
96
+ * @param onMessage The previous subscribed handler to remove
97
+ * @returns `true` if the handler was found, `false` otherwise
98
+ */
99
+ function unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean;
61
100
  /**
62
101
  * The class `Channel` represents an individual named channel within the data
63
102
  * pipeline. It is use to track subscribers and to publish messages when there
@@ -174,7 +174,7 @@ declare module 'dns' {
174
174
  type: 'AAAA';
175
175
  }
176
176
  export interface CaaRecord {
177
- critial: number;
177
+ critical: number;
178
178
  issue?: string | undefined;
179
179
  issuewild?: string | undefined;
180
180
  iodef?: string | undefined;
@@ -1053,7 +1053,6 @@ declare module 'http2' {
1053
1053
  */
1054
1054
  unknownProtocolTimeout?: number | undefined;
1055
1055
  selectPadding?(frameLen: number, maxFrameLen: number): number;
1056
- createConnection?(authority: url.URL, option: SessionOptions): stream.Duplex;
1057
1056
  }
1058
1057
  export interface ClientSessionOptions extends SessionOptions {
1059
1058
  maxReservedRemoteStreams?: number | undefined;
@@ -1089,6 +1089,12 @@ declare module 'process' {
1089
1089
  */
1090
1090
  mainModule?: Module | undefined;
1091
1091
  memoryUsage: MemoryUsageFn;
1092
+ /**
1093
+ * Gets the amount of memory available to the process (in bytes) based on
1094
+ * limits imposed by the OS. If there is no such constraint, or the constraint
1095
+ * is unknown, `undefined` is returned.
1096
+ */
1097
+ constrainedMemory(): number | undefined;
1092
1098
  /**
1093
1099
  * The `process.cpuUsage()` method returns the user and system CPU time usage of
1094
1100
  * the current process, in an object with properties `user` and `system`, whose
@@ -912,6 +912,105 @@ declare module 'stream' {
912
912
  end(chunk: any, encoding?: BufferEncoding, cb?: () => void): this;
913
913
  cork(): void;
914
914
  uncork(): void;
915
+ /**
916
+ * Event emitter
917
+ * The defined events on documents including:
918
+ * 1. close
919
+ * 2. data
920
+ * 3. drain
921
+ * 4. end
922
+ * 5. error
923
+ * 6. finish
924
+ * 7. pause
925
+ * 8. pipe
926
+ * 9. readable
927
+ * 10. resume
928
+ * 11. unpipe
929
+ */
930
+ addListener(event: 'close', listener: () => void): this;
931
+ addListener(event: 'data', listener: (chunk: any) => void): this;
932
+ addListener(event: 'drain', listener: () => void): this;
933
+ addListener(event: 'end', listener: () => void): this;
934
+ addListener(event: 'error', listener: (err: Error) => void): this;
935
+ addListener(event: 'finish', listener: () => void): this;
936
+ addListener(event: 'pause', listener: () => void): this;
937
+ addListener(event: 'pipe', listener: (src: Readable) => void): this;
938
+ addListener(event: 'readable', listener: () => void): this;
939
+ addListener(event: 'resume', listener: () => void): this;
940
+ addListener(event: 'unpipe', listener: (src: Readable) => void): this;
941
+ addListener(event: string | symbol, listener: (...args: any[]) => void): this;
942
+ emit(event: 'close'): boolean;
943
+ emit(event: 'data', chunk: any): boolean;
944
+ emit(event: 'drain'): boolean;
945
+ emit(event: 'end'): boolean;
946
+ emit(event: 'error', err: Error): boolean;
947
+ emit(event: 'finish'): boolean;
948
+ emit(event: 'pause'): boolean;
949
+ emit(event: 'pipe', src: Readable): boolean;
950
+ emit(event: 'readable'): boolean;
951
+ emit(event: 'resume'): boolean;
952
+ emit(event: 'unpipe', src: Readable): boolean;
953
+ emit(event: string | symbol, ...args: any[]): boolean;
954
+ on(event: 'close', listener: () => void): this;
955
+ on(event: 'data', listener: (chunk: any) => void): this;
956
+ on(event: 'drain', listener: () => void): this;
957
+ on(event: 'end', listener: () => void): this;
958
+ on(event: 'error', listener: (err: Error) => void): this;
959
+ on(event: 'finish', listener: () => void): this;
960
+ on(event: 'pause', listener: () => void): this;
961
+ on(event: 'pipe', listener: (src: Readable) => void): this;
962
+ on(event: 'readable', listener: () => void): this;
963
+ on(event: 'resume', listener: () => void): this;
964
+ on(event: 'unpipe', listener: (src: Readable) => void): this;
965
+ on(event: string | symbol, listener: (...args: any[]) => void): this;
966
+ once(event: 'close', listener: () => void): this;
967
+ once(event: 'data', listener: (chunk: any) => void): this;
968
+ once(event: 'drain', listener: () => void): this;
969
+ once(event: 'end', listener: () => void): this;
970
+ once(event: 'error', listener: (err: Error) => void): this;
971
+ once(event: 'finish', listener: () => void): this;
972
+ once(event: 'pause', listener: () => void): this;
973
+ once(event: 'pipe', listener: (src: Readable) => void): this;
974
+ once(event: 'readable', listener: () => void): this;
975
+ once(event: 'resume', listener: () => void): this;
976
+ once(event: 'unpipe', listener: (src: Readable) => void): this;
977
+ once(event: string | symbol, listener: (...args: any[]) => void): this;
978
+ prependListener(event: 'close', listener: () => void): this;
979
+ prependListener(event: 'data', listener: (chunk: any) => void): this;
980
+ prependListener(event: 'drain', listener: () => void): this;
981
+ prependListener(event: 'end', listener: () => void): this;
982
+ prependListener(event: 'error', listener: (err: Error) => void): this;
983
+ prependListener(event: 'finish', listener: () => void): this;
984
+ prependListener(event: 'pause', listener: () => void): this;
985
+ prependListener(event: 'pipe', listener: (src: Readable) => void): this;
986
+ prependListener(event: 'readable', listener: () => void): this;
987
+ prependListener(event: 'resume', listener: () => void): this;
988
+ prependListener(event: 'unpipe', listener: (src: Readable) => void): this;
989
+ prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
990
+ prependOnceListener(event: 'close', listener: () => void): this;
991
+ prependOnceListener(event: 'data', listener: (chunk: any) => void): this;
992
+ prependOnceListener(event: 'drain', listener: () => void): this;
993
+ prependOnceListener(event: 'end', listener: () => void): this;
994
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
995
+ prependOnceListener(event: 'finish', listener: () => void): this;
996
+ prependOnceListener(event: 'pause', listener: () => void): this;
997
+ prependOnceListener(event: 'pipe', listener: (src: Readable) => void): this;
998
+ prependOnceListener(event: 'readable', listener: () => void): this;
999
+ prependOnceListener(event: 'resume', listener: () => void): this;
1000
+ prependOnceListener(event: 'unpipe', listener: (src: Readable) => void): this;
1001
+ prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
1002
+ removeListener(event: 'close', listener: () => void): this;
1003
+ removeListener(event: 'data', listener: (chunk: any) => void): this;
1004
+ removeListener(event: 'drain', listener: () => void): this;
1005
+ removeListener(event: 'end', listener: () => void): this;
1006
+ removeListener(event: 'error', listener: (err: Error) => void): this;
1007
+ removeListener(event: 'finish', listener: () => void): this;
1008
+ removeListener(event: 'pause', listener: () => void): this;
1009
+ removeListener(event: 'pipe', listener: (src: Readable) => void): this;
1010
+ removeListener(event: 'readable', listener: () => void): this;
1011
+ removeListener(event: 'resume', listener: () => void): this;
1012
+ removeListener(event: 'unpipe', listener: (src: Readable) => void): this;
1013
+ removeListener(event: string | symbol, listener: (...args: any[]) => void): this;
915
1014
  }
916
1015
  type TransformCallback = (error?: Error | null, data?: any) => void;
917
1016
  interface TransformOptions extends DuplexOptions {