cloudstructs 0.1.40 → 0.2.1

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 (180) hide show
  1. package/.gitattributes +19 -19
  2. package/.jsii +2743 -1551
  3. package/API.md +71 -71
  4. package/README.md +2 -0
  5. package/lib/codecommit-mirror/index.d.ts +6 -6
  6. package/lib/codecommit-mirror/index.js +13 -12
  7. package/lib/ecs-service-roller/index.d.ts +5 -5
  8. package/lib/ecs-service-roller/index.js +10 -9
  9. package/lib/email-receiver/receiver.d.ts +5 -5
  10. package/lib/email-receiver/receiver.js +15 -14
  11. package/lib/saml-identity-provider/index.d.ts +4 -4
  12. package/lib/saml-identity-provider/index.js +10 -9
  13. package/lib/slack-events/index.d.ts +5 -4
  14. package/lib/slack-events/index.js +13 -14
  15. package/lib/slack-textract/index.d.ts +6 -5
  16. package/lib/slack-textract/index.js +12 -11
  17. package/lib/state-machine-cr-provider/index.d.ts +2 -1
  18. package/lib/state-machine-cr-provider/index.js +14 -13
  19. package/lib/static-website/index.d.ts +6 -6
  20. package/lib/static-website/index.js +16 -15
  21. package/lib/url-shortener/index.d.ts +8 -7
  22. package/lib/url-shortener/index.handler.js +2 -1
  23. package/lib/url-shortener/index.js +19 -18
  24. package/node_modules/@slack/logger/node_modules/@types/node/README.md +2 -2
  25. package/node_modules/@slack/logger/node_modules/@types/node/buffer.d.ts +1 -1
  26. package/node_modules/@slack/logger/node_modules/@types/node/child_process.d.ts +19 -16
  27. package/node_modules/@slack/logger/node_modules/@types/node/console.d.ts +5 -0
  28. package/node_modules/@slack/logger/node_modules/@types/node/crypto.d.ts +51 -3
  29. package/node_modules/@slack/logger/node_modules/@types/node/dgram.d.ts +8 -8
  30. package/node_modules/@slack/logger/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
  31. package/node_modules/@slack/logger/node_modules/@types/node/dns/promises.d.ts +11 -0
  32. package/node_modules/@slack/logger/node_modules/@types/node/dns.d.ts +11 -0
  33. package/node_modules/@slack/logger/node_modules/@types/node/fs/promises.d.ts +90 -3
  34. package/node_modules/@slack/logger/node_modules/@types/node/fs.d.ts +92 -39
  35. package/node_modules/@slack/logger/node_modules/@types/node/http.d.ts +17 -6
  36. package/node_modules/@slack/logger/node_modules/@types/node/index.d.ts +2 -3
  37. package/node_modules/@slack/logger/node_modules/@types/node/inspector.d.ts +7 -0
  38. package/node_modules/@slack/logger/node_modules/@types/node/net.d.ts +2 -2
  39. package/node_modules/@slack/logger/node_modules/@types/node/package.json +8 -13
  40. package/node_modules/@slack/logger/node_modules/@types/node/process.d.ts +5 -1
  41. package/node_modules/@slack/logger/node_modules/@types/node/readline.d.ts +1 -0
  42. package/node_modules/@slack/logger/node_modules/@types/node/stream/web.d.ts +385 -0
  43. package/node_modules/@slack/logger/node_modules/@types/node/stream.d.ts +26 -6
  44. package/node_modules/@slack/logger/node_modules/@types/node/tty.d.ts +1 -3
  45. package/node_modules/@slack/logger/node_modules/@types/node/url.d.ts +24 -1
  46. package/node_modules/@slack/logger/node_modules/@types/node/util.d.ts +31 -0
  47. package/node_modules/@slack/web-api/node_modules/@types/node/README.md +2 -2
  48. package/node_modules/@slack/web-api/node_modules/@types/node/buffer.d.ts +1 -1
  49. package/node_modules/@slack/web-api/node_modules/@types/node/child_process.d.ts +19 -16
  50. package/node_modules/@slack/web-api/node_modules/@types/node/console.d.ts +5 -0
  51. package/node_modules/@slack/web-api/node_modules/@types/node/crypto.d.ts +51 -3
  52. package/node_modules/@slack/web-api/node_modules/@types/node/dgram.d.ts +8 -8
  53. package/node_modules/@slack/web-api/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
  54. package/node_modules/@slack/web-api/node_modules/@types/node/dns/promises.d.ts +11 -0
  55. package/node_modules/@slack/web-api/node_modules/@types/node/dns.d.ts +11 -0
  56. package/node_modules/@slack/web-api/node_modules/@types/node/fs/promises.d.ts +90 -3
  57. package/node_modules/@slack/web-api/node_modules/@types/node/fs.d.ts +92 -39
  58. package/node_modules/@slack/web-api/node_modules/@types/node/http.d.ts +17 -6
  59. package/node_modules/@slack/web-api/node_modules/@types/node/index.d.ts +2 -3
  60. package/node_modules/@slack/web-api/node_modules/@types/node/inspector.d.ts +7 -0
  61. package/node_modules/@slack/web-api/node_modules/@types/node/net.d.ts +2 -2
  62. package/node_modules/@slack/web-api/node_modules/@types/node/package.json +8 -13
  63. package/node_modules/@slack/web-api/node_modules/@types/node/process.d.ts +5 -1
  64. package/node_modules/@slack/web-api/node_modules/@types/node/readline.d.ts +1 -0
  65. package/node_modules/@slack/web-api/node_modules/@types/node/stream/web.d.ts +385 -0
  66. package/node_modules/@slack/web-api/node_modules/@types/node/stream.d.ts +26 -6
  67. package/node_modules/@slack/web-api/node_modules/@types/node/tty.d.ts +1 -3
  68. package/node_modules/@slack/web-api/node_modules/@types/node/url.d.ts +24 -1
  69. package/node_modules/@slack/web-api/node_modules/@types/node/util.d.ts +31 -0
  70. package/node_modules/@types/cacheable-request/node_modules/@types/node/README.md +2 -2
  71. package/node_modules/@types/cacheable-request/node_modules/@types/node/buffer.d.ts +1 -1
  72. package/node_modules/@types/cacheable-request/node_modules/@types/node/child_process.d.ts +19 -16
  73. package/node_modules/@types/cacheable-request/node_modules/@types/node/console.d.ts +5 -0
  74. package/node_modules/@types/cacheable-request/node_modules/@types/node/crypto.d.ts +51 -3
  75. package/node_modules/@types/cacheable-request/node_modules/@types/node/dgram.d.ts +8 -8
  76. package/node_modules/@types/cacheable-request/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
  77. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns/promises.d.ts +11 -0
  78. package/node_modules/@types/cacheable-request/node_modules/@types/node/dns.d.ts +11 -0
  79. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs/promises.d.ts +90 -3
  80. package/node_modules/@types/cacheable-request/node_modules/@types/node/fs.d.ts +92 -39
  81. package/node_modules/@types/cacheable-request/node_modules/@types/node/http.d.ts +17 -6
  82. package/node_modules/@types/cacheable-request/node_modules/@types/node/index.d.ts +2 -3
  83. package/node_modules/@types/cacheable-request/node_modules/@types/node/inspector.d.ts +7 -0
  84. package/node_modules/@types/cacheable-request/node_modules/@types/node/net.d.ts +2 -2
  85. package/node_modules/@types/cacheable-request/node_modules/@types/node/package.json +8 -13
  86. package/node_modules/@types/cacheable-request/node_modules/@types/node/process.d.ts +5 -1
  87. package/node_modules/@types/cacheable-request/node_modules/@types/node/readline.d.ts +1 -0
  88. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream/web.d.ts +385 -0
  89. package/node_modules/@types/cacheable-request/node_modules/@types/node/stream.d.ts +26 -6
  90. package/node_modules/@types/cacheable-request/node_modules/@types/node/tty.d.ts +1 -3
  91. package/node_modules/@types/cacheable-request/node_modules/@types/node/url.d.ts +24 -1
  92. package/node_modules/@types/cacheable-request/node_modules/@types/node/util.d.ts +31 -0
  93. package/node_modules/@types/is-stream/node_modules/@types/node/README.md +2 -2
  94. package/node_modules/@types/is-stream/node_modules/@types/node/buffer.d.ts +1 -1
  95. package/node_modules/@types/is-stream/node_modules/@types/node/child_process.d.ts +19 -16
  96. package/node_modules/@types/is-stream/node_modules/@types/node/console.d.ts +5 -0
  97. package/node_modules/@types/is-stream/node_modules/@types/node/crypto.d.ts +51 -3
  98. package/node_modules/@types/is-stream/node_modules/@types/node/dgram.d.ts +8 -8
  99. package/node_modules/@types/is-stream/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
  100. package/node_modules/@types/is-stream/node_modules/@types/node/dns/promises.d.ts +11 -0
  101. package/node_modules/@types/is-stream/node_modules/@types/node/dns.d.ts +11 -0
  102. package/node_modules/@types/is-stream/node_modules/@types/node/fs/promises.d.ts +90 -3
  103. package/node_modules/@types/is-stream/node_modules/@types/node/fs.d.ts +92 -39
  104. package/node_modules/@types/is-stream/node_modules/@types/node/http.d.ts +17 -6
  105. package/node_modules/@types/is-stream/node_modules/@types/node/index.d.ts +2 -3
  106. package/node_modules/@types/is-stream/node_modules/@types/node/inspector.d.ts +7 -0
  107. package/node_modules/@types/is-stream/node_modules/@types/node/net.d.ts +2 -2
  108. package/node_modules/@types/is-stream/node_modules/@types/node/package.json +8 -13
  109. package/node_modules/@types/is-stream/node_modules/@types/node/process.d.ts +5 -1
  110. package/node_modules/@types/is-stream/node_modules/@types/node/readline.d.ts +1 -0
  111. package/node_modules/@types/is-stream/node_modules/@types/node/stream/web.d.ts +385 -0
  112. package/node_modules/@types/is-stream/node_modules/@types/node/stream.d.ts +26 -6
  113. package/node_modules/@types/is-stream/node_modules/@types/node/tty.d.ts +1 -3
  114. package/node_modules/@types/is-stream/node_modules/@types/node/url.d.ts +24 -1
  115. package/node_modules/@types/is-stream/node_modules/@types/node/util.d.ts +31 -0
  116. package/node_modules/@types/keyv/node_modules/@types/node/README.md +2 -2
  117. package/node_modules/@types/keyv/node_modules/@types/node/buffer.d.ts +1 -1
  118. package/node_modules/@types/keyv/node_modules/@types/node/child_process.d.ts +19 -16
  119. package/node_modules/@types/keyv/node_modules/@types/node/console.d.ts +5 -0
  120. package/node_modules/@types/keyv/node_modules/@types/node/crypto.d.ts +51 -3
  121. package/node_modules/@types/keyv/node_modules/@types/node/dgram.d.ts +8 -8
  122. package/node_modules/@types/keyv/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
  123. package/node_modules/@types/keyv/node_modules/@types/node/dns/promises.d.ts +11 -0
  124. package/node_modules/@types/keyv/node_modules/@types/node/dns.d.ts +11 -0
  125. package/node_modules/@types/keyv/node_modules/@types/node/fs/promises.d.ts +90 -3
  126. package/node_modules/@types/keyv/node_modules/@types/node/fs.d.ts +92 -39
  127. package/node_modules/@types/keyv/node_modules/@types/node/http.d.ts +17 -6
  128. package/node_modules/@types/keyv/node_modules/@types/node/index.d.ts +2 -3
  129. package/node_modules/@types/keyv/node_modules/@types/node/inspector.d.ts +7 -0
  130. package/node_modules/@types/keyv/node_modules/@types/node/net.d.ts +2 -2
  131. package/node_modules/@types/keyv/node_modules/@types/node/package.json +8 -13
  132. package/node_modules/@types/keyv/node_modules/@types/node/process.d.ts +5 -1
  133. package/node_modules/@types/keyv/node_modules/@types/node/readline.d.ts +1 -0
  134. package/node_modules/@types/keyv/node_modules/@types/node/stream/web.d.ts +385 -0
  135. package/node_modules/@types/keyv/node_modules/@types/node/stream.d.ts +26 -6
  136. package/node_modules/@types/keyv/node_modules/@types/node/tty.d.ts +1 -3
  137. package/node_modules/@types/keyv/node_modules/@types/node/url.d.ts +24 -1
  138. package/node_modules/@types/keyv/node_modules/@types/node/util.d.ts +31 -0
  139. package/node_modules/@types/responselike/node_modules/@types/node/README.md +2 -2
  140. package/node_modules/@types/responselike/node_modules/@types/node/buffer.d.ts +1 -1
  141. package/node_modules/@types/responselike/node_modules/@types/node/child_process.d.ts +19 -16
  142. package/node_modules/@types/responselike/node_modules/@types/node/console.d.ts +5 -0
  143. package/node_modules/@types/responselike/node_modules/@types/node/crypto.d.ts +51 -3
  144. package/node_modules/@types/responselike/node_modules/@types/node/dgram.d.ts +8 -8
  145. package/node_modules/@types/responselike/node_modules/@types/node/diagnostics_channel.d.ts +6 -0
  146. package/node_modules/@types/responselike/node_modules/@types/node/dns/promises.d.ts +11 -0
  147. package/node_modules/@types/responselike/node_modules/@types/node/dns.d.ts +11 -0
  148. package/node_modules/@types/responselike/node_modules/@types/node/fs/promises.d.ts +90 -3
  149. package/node_modules/@types/responselike/node_modules/@types/node/fs.d.ts +92 -39
  150. package/node_modules/@types/responselike/node_modules/@types/node/http.d.ts +17 -6
  151. package/node_modules/@types/responselike/node_modules/@types/node/index.d.ts +2 -3
  152. package/node_modules/@types/responselike/node_modules/@types/node/inspector.d.ts +7 -0
  153. package/node_modules/@types/responselike/node_modules/@types/node/net.d.ts +2 -2
  154. package/node_modules/@types/responselike/node_modules/@types/node/package.json +8 -13
  155. package/node_modules/@types/responselike/node_modules/@types/node/process.d.ts +5 -1
  156. package/node_modules/@types/responselike/node_modules/@types/node/readline.d.ts +1 -0
  157. package/node_modules/@types/responselike/node_modules/@types/node/stream/web.d.ts +385 -0
  158. package/node_modules/@types/responselike/node_modules/@types/node/stream.d.ts +26 -6
  159. package/node_modules/@types/responselike/node_modules/@types/node/tty.d.ts +1 -3
  160. package/node_modules/@types/responselike/node_modules/@types/node/url.d.ts +24 -1
  161. package/node_modules/@types/responselike/node_modules/@types/node/util.d.ts +31 -0
  162. package/node_modules/follow-redirects/index.js +45 -14
  163. package/node_modules/follow-redirects/package.json +1 -1
  164. package/node_modules/got/dist/source/as-promise/parse-body.d.ts +1 -1
  165. package/node_modules/got/dist/source/as-promise/types.js +2 -0
  166. package/node_modules/got/dist/source/core/index.d.ts +1 -1
  167. package/node_modules/got/dist/source/core/index.js +9 -3
  168. package/node_modules/got/dist/source/types.d.ts +14 -12
  169. package/node_modules/got/package.json +2 -2
  170. package/node_modules/got/readme.md +11 -10
  171. package/node_modules/keyv/LICENSE +1 -1
  172. package/node_modules/keyv/README.md +12 -10
  173. package/node_modules/keyv/package.json +17 -12
  174. package/node_modules/keyv/src/index.js +14 -16
  175. package/node_modules/mime-db/HISTORY.md +13 -0
  176. package/node_modules/mime-db/db.json +54 -0
  177. package/node_modules/mime-db/package.json +7 -7
  178. package/node_modules/mime-types/HISTORY.md +13 -3
  179. package/node_modules/mime-types/package.json +7 -7
  180. package/package.json +29 -80
@@ -789,6 +789,7 @@ declare module 'child_process' {
789
789
  function spawn(command: string, args: ReadonlyArray<string>, options: SpawnOptions): ChildProcess;
790
790
  interface ExecOptions extends CommonOptions {
791
791
  shell?: string | undefined;
792
+ signal?: AbortSignal | undefined;
792
793
  maxBuffer?: number | undefined;
793
794
  killSignal?: NodeJS.Signals | number | undefined;
794
795
  }
@@ -1279,12 +1280,13 @@ declare module 'child_process' {
1279
1280
  * @param args List of string arguments.
1280
1281
  */
1281
1282
  function spawnSync(command: string): SpawnSyncReturns<Buffer>;
1282
- function spawnSync(command: string, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1283
- function spawnSync(command: string, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1284
- function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
1285
- function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1286
- function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1287
- function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<Buffer>;
1283
+ function spawnSync(command: string, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1284
+ function spawnSync(command: string, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1285
+ function spawnSync(command: string, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
1286
+ function spawnSync(command: string, args: ReadonlyArray<string>): SpawnSyncReturns<Buffer>;
1287
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithStringEncoding): SpawnSyncReturns<string>;
1288
+ function spawnSync(command: string, args: ReadonlyArray<string>, options: SpawnSyncOptionsWithBufferEncoding): SpawnSyncReturns<Buffer>;
1289
+ function spawnSync(command: string, args?: ReadonlyArray<string>, options?: SpawnSyncOptions): SpawnSyncReturns<string | Buffer>;
1288
1290
  interface CommonExecOptions extends CommonOptions {
1289
1291
  input?: string | NodeJS.ArrayBufferView | undefined;
1290
1292
  stdio?: StdioOptions | undefined;
@@ -1318,9 +1320,9 @@ declare module 'child_process' {
1318
1320
  * @return The stdout from the command.
1319
1321
  */
1320
1322
  function execSync(command: string): Buffer;
1321
- function execSync(command: string, options?: ExecSyncOptionsWithStringEncoding): string;
1322
- function execSync(command: string, options?: ExecSyncOptionsWithBufferEncoding): Buffer;
1323
- function execSync(command: string, options?: ExecSyncOptions): Buffer;
1323
+ function execSync(command: string, options: ExecSyncOptionsWithStringEncoding): string;
1324
+ function execSync(command: string, options: ExecSyncOptionsWithBufferEncoding): Buffer;
1325
+ function execSync(command: string, options?: ExecSyncOptions): string | Buffer;
1324
1326
  interface ExecFileSyncOptions extends CommonExecOptions {
1325
1327
  shell?: boolean | string | undefined;
1326
1328
  }
@@ -1328,7 +1330,7 @@ declare module 'child_process' {
1328
1330
  encoding: BufferEncoding;
1329
1331
  }
1330
1332
  interface ExecFileSyncOptionsWithBufferEncoding extends ExecFileSyncOptions {
1331
- encoding: BufferEncoding; // specify `null`.
1333
+ encoding?: 'buffer' | null; // specify `null`.
1332
1334
  }
1333
1335
  /**
1334
1336
  * The `child_process.execFileSync()` method is generally identical to {@link execFile} with the exception that the method will not
@@ -1351,12 +1353,13 @@ declare module 'child_process' {
1351
1353
  * @return The stdout from the command.
1352
1354
  */
1353
1355
  function execFileSync(file: string): Buffer;
1354
- function execFileSync(file: string, options?: ExecFileSyncOptionsWithStringEncoding): string;
1355
- function execFileSync(file: string, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1356
- function execFileSync(file: string, options?: ExecFileSyncOptions): Buffer;
1357
- function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithStringEncoding): string;
1358
- function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1359
- function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): Buffer;
1356
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithStringEncoding): string;
1357
+ function execFileSync(file: string, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1358
+ function execFileSync(file: string, options?: ExecFileSyncOptions): string | Buffer;
1359
+ function execFileSync(file: string, args: ReadonlyArray<string>): Buffer;
1360
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithStringEncoding): string;
1361
+ function execFileSync(file: string, args: ReadonlyArray<string>, options: ExecFileSyncOptionsWithBufferEncoding): Buffer;
1362
+ function execFileSync(file: string, args?: ReadonlyArray<string>, options?: ExecFileSyncOptions): string | Buffer;
1360
1363
  }
1361
1364
  declare module 'node:child_process' {
1362
1365
  export * from 'child_process';
@@ -394,6 +394,11 @@ declare module 'node:console' {
394
394
  ignoreErrors?: boolean | undefined;
395
395
  colorMode?: boolean | 'auto' | undefined;
396
396
  inspectOptions?: InspectOptions | undefined;
397
+ /**
398
+ * Set group indentation
399
+ * @default 2
400
+ */
401
+ groupIndentation?: number | undefined;
397
402
  }
398
403
  interface ConsoleConstructor {
399
404
  prototype: Console;
@@ -250,7 +250,7 @@ declare module 'crypto' {
250
250
  */
251
251
  function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
252
252
  // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
253
- type BinaryToTextEncoding = 'base64' | 'hex';
253
+ type BinaryToTextEncoding = 'base64' | 'base64url' | 'hex';
254
254
  type CharacterEncoding = 'utf8' | 'utf-8' | 'utf16le' | 'latin1';
255
255
  type LegacyCharacterEncoding = 'ascii' | 'binary' | 'ucs2' | 'ucs-2';
256
256
  type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
@@ -1167,6 +1167,26 @@ declare module 'crypto' {
1167
1167
  },
1168
1168
  callback: (err: Error | null, key: KeyObject) => void
1169
1169
  ): void;
1170
+ /**
1171
+ * Synchronously generates a new random secret key of the given `length`. The`type` will determine which validations will be performed on the `length`.
1172
+ *
1173
+ * ```js
1174
+ * const {
1175
+ * generateKeySync
1176
+ * } = await import('crypto');
1177
+ *
1178
+ * const key = generateKeySync('hmac', { length: 64 });
1179
+ * console.log(key.export().toString('hex')); // e89..........41e
1180
+ * ```
1181
+ * @since v15.0.0
1182
+ * @param type The intended use of the generated secret key. Currently accepted values are `'hmac'` and `'aes'`.
1183
+ */
1184
+ function generateKeySync(
1185
+ type: 'hmac' | 'aes',
1186
+ options: {
1187
+ length: number;
1188
+ }
1189
+ ): KeyObject;
1170
1190
  interface JsonWebKeyInput {
1171
1191
  key: JsonWebKey;
1172
1192
  format: 'jwk';
@@ -2140,7 +2160,7 @@ declare module 'crypto' {
2140
2160
  key: BinaryLike,
2141
2161
  curve: string,
2142
2162
  inputEncoding?: BinaryToTextEncoding,
2143
- outputEncoding?: 'latin1' | 'hex' | 'base64',
2163
+ outputEncoding?: 'latin1' | 'hex' | 'base64' | 'base64url',
2144
2164
  format?: 'uncompressed' | 'compressed' | 'hybrid'
2145
2165
  ): Buffer | string;
2146
2166
  /**
@@ -2259,7 +2279,7 @@ declare module 'crypto' {
2259
2279
  interface X448KeyPairKeyObjectOptions {}
2260
2280
  interface ECKeyPairKeyObjectOptions {
2261
2281
  /**
2262
- * Name of the curve to use.
2282
+ * Name of the curve to use
2263
2283
  */
2264
2284
  namedCurve: string;
2265
2285
  }
@@ -2269,6 +2289,7 @@ declare module 'crypto' {
2269
2289
  */
2270
2290
  modulusLength: number;
2271
2291
  /**
2292
+ * Public exponent
2272
2293
  * @default 0x10001
2273
2294
  */
2274
2295
  publicExponent?: number | undefined;
@@ -2279,9 +2300,22 @@ declare module 'crypto' {
2279
2300
  */
2280
2301
  modulusLength: number;
2281
2302
  /**
2303
+ * Public exponent
2282
2304
  * @default 0x10001
2283
2305
  */
2284
2306
  publicExponent?: number | undefined;
2307
+ /**
2308
+ * Name of the message digest
2309
+ */
2310
+ hashAlgorithm?: string;
2311
+ /**
2312
+ * Name of the message digest used by MGF1
2313
+ */
2314
+ mgf1HashAlgorithm?: string;
2315
+ /**
2316
+ * Minimal salt length in bytes
2317
+ */
2318
+ saltLength?: string;
2285
2319
  }
2286
2320
  interface DSAKeyPairKeyObjectOptions {
2287
2321
  /**
@@ -2299,6 +2333,7 @@ declare module 'crypto' {
2299
2333
  */
2300
2334
  modulusLength: number;
2301
2335
  /**
2336
+ * Public exponent
2302
2337
  * @default 0x10001
2303
2338
  */
2304
2339
  publicExponent?: number | undefined;
@@ -2316,9 +2351,22 @@ declare module 'crypto' {
2316
2351
  */
2317
2352
  modulusLength: number;
2318
2353
  /**
2354
+ * Public exponent
2319
2355
  * @default 0x10001
2320
2356
  */
2321
2357
  publicExponent?: number | undefined;
2358
+ /**
2359
+ * Name of the message digest
2360
+ */
2361
+ hashAlgorithm?: string;
2362
+ /**
2363
+ * Name of the message digest used by MGF1
2364
+ */
2365
+ mgf1HashAlgorithm?: string;
2366
+ /**
2367
+ * Minimal salt length in bytes
2368
+ */
2369
+ saltLength?: string;
2322
2370
  publicKeyEncoding: {
2323
2371
  type: 'spki';
2324
2372
  format: PubF;
@@ -166,17 +166,17 @@ declare module 'dgram' {
166
166
  * @since v0.1.99
167
167
  * @param callback with no parameters. Called when binding is complete.
168
168
  */
169
- bind(port?: number, address?: string, callback?: () => void): void;
170
- bind(port?: number, callback?: () => void): void;
171
- bind(callback?: () => void): void;
172
- bind(options: BindOptions, callback?: () => void): void;
169
+ bind(port?: number, address?: string, callback?: () => void): this;
170
+ bind(port?: number, callback?: () => void): this;
171
+ bind(callback?: () => void): this;
172
+ bind(options: BindOptions, callback?: () => void): this;
173
173
  /**
174
174
  * Close the underlying socket and stop listening for data on it. If a callback is
175
175
  * provided, it is added as a listener for the `'close'` event.
176
176
  * @since v0.1.99
177
177
  * @param callback Called when the socket has been closed.
178
178
  */
179
- close(callback?: () => void): void;
179
+ close(callback?: () => void): this;
180
180
  /**
181
181
  * Associates the `dgram.Socket` to a remote address and port. Every
182
182
  * message sent by this handle is automatically sent to that destination. Also,
@@ -414,7 +414,7 @@ declare module 'dgram' {
414
414
  * This method throws `EBADF` if called on an unbound socket.
415
415
  * @since v0.3.8
416
416
  */
417
- setMulticastLoopback(flag: boolean): void;
417
+ setMulticastLoopback(flag: boolean): boolean;
418
418
  /**
419
419
  * Sets the `IP_MULTICAST_TTL` socket option. While TTL generally stands for
420
420
  * "Time to Live", in this context it specifies the number of IP hops that a
@@ -427,7 +427,7 @@ declare module 'dgram' {
427
427
  * This method throws `EBADF` if called on an unbound socket.
428
428
  * @since v0.3.8
429
429
  */
430
- setMulticastTTL(ttl: number): void;
430
+ setMulticastTTL(ttl: number): number;
431
431
  /**
432
432
  * Sets the `SO_RCVBUF` socket option. Sets the maximum socket receive buffer
433
433
  * in bytes.
@@ -457,7 +457,7 @@ declare module 'dgram' {
457
457
  * This method throws `EBADF` if called on an unbound socket.
458
458
  * @since v0.1.101
459
459
  */
460
- setTTL(ttl: number): void;
460
+ setTTL(ttl: number): number;
461
461
  /**
462
462
  * By default, binding a socket will cause it to block the Node.js process from
463
463
  * exiting as long as the socket is open. The `socket.unref()` method can be used
@@ -37,6 +37,7 @@ declare module 'diagnostics_channel' {
37
37
  * // There are subscribers, prepare and publish message
38
38
  * }
39
39
  * ```
40
+ * @since v15.1.0, v14.17.0
40
41
  * @param name The channel name
41
42
  * @return If there are active subscribers
42
43
  */
@@ -51,6 +52,7 @@ declare module 'diagnostics_channel' {
51
52
  *
52
53
  * const channel = diagnostics_channel.channel('my-channel');
53
54
  * ```
55
+ * @since v15.1.0, v14.17.0
54
56
  * @param name The channel name
55
57
  * @return The named channel object
56
58
  */
@@ -63,6 +65,7 @@ declare module 'diagnostics_channel' {
63
65
  * lookups at publish time, enabling very fast publish speeds and allowing
64
66
  * for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly
65
67
  * with `new Channel(name)` is not supported.
68
+ * @since v15.1.0, v14.17.0
66
69
  */
67
70
  class Channel {
68
71
  readonly name: string;
@@ -82,6 +85,7 @@ declare module 'diagnostics_channel' {
82
85
  * // There are subscribers, prepare and publish message
83
86
  * }
84
87
  * ```
88
+ * @since v15.1.0, v14.17.0
85
89
  */
86
90
  readonly hasSubscribers: boolean;
87
91
  private constructor(name: string);
@@ -99,6 +103,7 @@ declare module 'diagnostics_channel' {
99
103
  * // Received data
100
104
  * });
101
105
  * ```
106
+ * @since v15.1.0, v14.17.0
102
107
  * @param onMessage The handler to receive channel messages
103
108
  */
104
109
  subscribe(onMessage: ChannelListener): void;
@@ -118,6 +123,7 @@ declare module 'diagnostics_channel' {
118
123
  *
119
124
  * channel.unsubscribe(onMessage);
120
125
  * ```
126
+ * @since v15.1.0, v14.17.0
121
127
  * @param onMessage The previous subscribed handler to remove
122
128
  */
123
129
  unsubscribe(onMessage: ChannelListener): void;
@@ -331,6 +331,17 @@ declare module 'dns/promises' {
331
331
  * @param servers array of `RFC 5952` formatted addresses
332
332
  */
333
333
  function setServers(servers: ReadonlyArray<string>): void;
334
+ /**
335
+ * Set the default value of `verbatim` in {@link lookup}. The value could be:
336
+ * - `ipv4first`: sets default `verbatim` `false`.
337
+ * - `verbatim`: sets default `verbatim` `true`.
338
+ *
339
+ * The default is `ipv4first` and {@link setDefaultResultOrder} have higher priority than `--dns-result-order`.
340
+ * When using worker threads, {@link setDefaultResultOrder} from the main thread won't affect the default dns orders in workers.
341
+ * @since v14.18.0
342
+ * @param order must be 'ipv4first' or 'verbatim'.
343
+ */
344
+ function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
334
345
  class Resolver {
335
346
  constructor(options?: ResolverOptions);
336
347
  cancel(): void;
@@ -526,6 +526,17 @@ declare module 'dns' {
526
526
  * @since v0.11.3
527
527
  */
528
528
  export function getServers(): string[];
529
+ /**
530
+ * Set the default value of `verbatim` in {@link lookup}. The value could be:
531
+ * - `ipv4first`: sets default `verbatim` `false`.
532
+ * - `verbatim`: sets default `verbatim` `true`.
533
+ *
534
+ * The default is `ipv4first` and {@link setDefaultResultOrder} have higher priority than `--dns-result-order`.
535
+ * When using worker threads, {@link setDefaultResultOrder} from the main thread won't affect the default dns orders in workers.
536
+ * @since v14.18.0
537
+ * @param order must be 'ipv4first' or 'verbatim'.
538
+ */
539
+ export function setDefaultResultOrder(order: 'ipv4first' | 'verbatim'): void;
529
540
  // Error codes
530
541
  export const NODATA: string;
531
542
  export const FORMERR: string;
@@ -31,6 +31,8 @@ declare module 'fs/promises' {
31
31
  WatchOptions,
32
32
  WatchEventType,
33
33
  CopyOptions,
34
+ ReadStream,
35
+ WriteStream,
34
36
  } from 'node:fs';
35
37
  interface FileChangeInfo<T extends string | Buffer> {
36
38
  eventType: WatchEventType;
@@ -59,6 +61,20 @@ declare module 'fs/promises' {
59
61
  length?: number | null;
60
62
  position?: number | null;
61
63
  }
64
+ interface CreateReadStreamOptions {
65
+ encoding?: BufferEncoding | null | undefined;
66
+ autoClose?: boolean | undefined;
67
+ emitClose?: boolean | undefined;
68
+ start?: number | undefined;
69
+ end?: number | undefined;
70
+ highWaterMark?: number | undefined;
71
+ }
72
+ interface CreateWriteStreamOptions {
73
+ encoding?: BufferEncoding | null | undefined;
74
+ autoClose?: boolean | undefined;
75
+ emitClose?: boolean | undefined;
76
+ start?: number | undefined;
77
+ }
62
78
  // TODO: Add `EventEmitter` close
63
79
  interface FileHandle {
64
80
  /**
@@ -90,6 +106,77 @@ declare module 'fs/promises' {
90
106
  * @return Fulfills with `undefined` upon success.
91
107
  */
92
108
  chmod(mode: Mode): Promise<void>;
109
+ /**
110
+ * Unlike the 16 kb default `highWaterMark` for a `stream.Readable`, the stream
111
+ * returned by this method has a default `highWaterMark` of 64 kb.
112
+ *
113
+ * `options` can include `start` and `end` values to read a range of bytes from
114
+ * the file instead of the entire file. Both `start` and `end` are inclusive and
115
+ * start counting at 0, allowed values are in the
116
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. If `start` is
117
+ * omitted or `undefined`, `filehandle.createReadStream()` reads sequentially from
118
+ * the current file position. The `encoding` can be any one of those accepted by `Buffer`.
119
+ *
120
+ * If the `FileHandle` points to a character device that only supports blocking
121
+ * reads (such as keyboard or sound card), read operations do not finish until data
122
+ * is available. This can prevent the process from exiting and the stream from
123
+ * closing naturally.
124
+ *
125
+ * By default, the stream will emit a `'close'` event after it has been
126
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
127
+ *
128
+ * ```js
129
+ * import { open } from 'fs/promises';
130
+ *
131
+ * const fd = await open('/dev/input/event0');
132
+ * // Create a stream from some character device.
133
+ * const stream = fd.createReadStream();
134
+ * setTimeout(() => {
135
+ * stream.close(); // This may not close the stream.
136
+ * // Artificially marking end-of-stream, as if the underlying resource had
137
+ * // indicated end-of-file by itself, allows the stream to close.
138
+ * // This does not cancel pending read operations, and if there is such an
139
+ * // operation, the process may still not be able to exit successfully
140
+ * // until it finishes.
141
+ * stream.push(null);
142
+ * stream.read(0);
143
+ * }, 100);
144
+ * ```
145
+ *
146
+ * If `autoClose` is false, then the file descriptor won't be closed, even if
147
+ * there's an error. It is the application's responsibility to close it and make
148
+ * sure there's no file descriptor leak. If `autoClose` is set to true (default
149
+ * behavior), on `'error'` or `'end'` the file descriptor will be closed
150
+ * automatically.
151
+ *
152
+ * An example to read the last 10 bytes of a file which is 100 bytes long:
153
+ *
154
+ * ```js
155
+ * import { open } from 'fs/promises';
156
+ *
157
+ * const fd = await open('sample.txt');
158
+ * fd.createReadStream({ start: 90, end: 99 });
159
+ * ```
160
+ * @since v16.11.0
161
+ */
162
+ createReadStream(options?: CreateReadStreamOptions): ReadStream;
163
+ /**
164
+ * `options` may also include a `start` option to allow writing data at some
165
+ * position past the beginning of the file, allowed values are in the
166
+ * \[0, [`Number.MAX_SAFE_INTEGER`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER)\] range. Modifying a file rather than replacing
167
+ * it may require the `flags` `open` option to be set to `r+` rather than the
168
+ * default `r`. The `encoding` can be any one of those accepted by `Buffer`.
169
+ *
170
+ * If `autoClose` is set to true (default behavior) on `'error'` or `'finish'`the file descriptor will be closed automatically. If `autoClose` is false,
171
+ * then the file descriptor won't be closed, even if there's an error.
172
+ * It is the application's responsibility to close it and make sure there's no
173
+ * file descriptor leak.
174
+ *
175
+ * By default, the stream will emit a `'close'` event after it has been
176
+ * destroyed. Set the `emitClose` option to `false` to change this behavior.
177
+ * @since v16.11.0
178
+ */
179
+ createWriteStream(options?: CreateWriteStreamOptions): WriteStream;
93
180
  /**
94
181
  * Forces all currently queued I/O operations associated with the file to the
95
182
  * operating system's synchronized I/O completion state. Refer to the POSIX [`fdatasync(2)`](http://man7.org/linux/man-pages/man2/fdatasync.2.html) documentation for details.
@@ -114,8 +201,8 @@ declare module 'fs/promises' {
114
201
  * number of bytes read is zero.
115
202
  * @since v10.0.0
116
203
  * @param buffer A buffer that will be filled with the file data read.
117
- * @param [offset=0] The location in the buffer at which to start filling.
118
- * @param [length=buffer.byteLength] The number of bytes to read.
204
+ * @param offset The location in the buffer at which to start filling.
205
+ * @param length The number of bytes to read.
119
206
  * @param position The location where to begin reading data from the file. If `null`, data will be read from the current file position, and the position will be updated. If `position` is an
120
207
  * integer, the current file position will remain unchanged.
121
208
  * @return Fulfills upon success with an object with two properties:
@@ -928,7 +1015,7 @@ declare module 'fs/promises' {
928
1015
  * @since v12.12.0
929
1016
  * @return Fulfills with an {fs.Dir}.
930
1017
  */
931
- function opendir(path: string, options?: OpenDirOptions): Promise<Dir>;
1018
+ function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
932
1019
  /**
933
1020
  * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
934
1021
  *