@chainlink/external-adapter-framework 2.6.0 → 2.7.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 (160) hide show
  1. package/README.md +1 -1
  2. package/adapter/types.d.ts +1 -1
  3. package/config/index.d.ts +4 -0
  4. package/config/index.js +4 -0
  5. package/config/index.js.map +1 -1
  6. package/debug/router.js +7 -36
  7. package/debug/router.js.map +1 -1
  8. package/debug/settings-page.d.ts +1 -7
  9. package/debug/settings-page.js +0 -22
  10. package/debug/settings-page.js.map +1 -1
  11. package/generator-adapter/generators/app/index.js +11 -5
  12. package/generator-adapter/node_modules/.yarn-integrity +14 -13
  13. package/generator-adapter/node_modules/@types/node/README.md +3 -3
  14. package/generator-adapter/node_modules/@types/node/async_hooks.d.ts +65 -1
  15. package/generator-adapter/node_modules/@types/node/buffer.buffer.d.ts +2 -0
  16. package/generator-adapter/node_modules/@types/node/buffer.d.ts +8 -4
  17. package/generator-adapter/node_modules/@types/node/child_process.d.ts +26 -122
  18. package/generator-adapter/node_modules/@types/node/cluster.d.ts +1 -1
  19. package/generator-adapter/node_modules/@types/node/compatibility/disposable.d.ts +0 -2
  20. package/generator-adapter/node_modules/@types/node/compatibility/indexable.d.ts +0 -3
  21. package/generator-adapter/node_modules/@types/node/compatibility/iterators.d.ts +0 -1
  22. package/generator-adapter/node_modules/@types/node/crypto.d.ts +17 -1
  23. package/generator-adapter/node_modules/@types/node/diagnostics_channel.d.ts +37 -13
  24. package/generator-adapter/node_modules/@types/node/dns/promises.d.ts +36 -9
  25. package/generator-adapter/node_modules/@types/node/dns.d.ts +73 -20
  26. package/generator-adapter/node_modules/@types/node/events.d.ts +0 -1
  27. package/generator-adapter/node_modules/@types/node/fs/promises.d.ts +62 -54
  28. package/generator-adapter/node_modules/@types/node/fs.d.ts +149 -54
  29. package/generator-adapter/node_modules/@types/node/globals.d.ts +137 -478
  30. package/generator-adapter/node_modules/@types/node/http.d.ts +93 -6
  31. package/generator-adapter/node_modules/@types/node/http2.d.ts +81 -2
  32. package/generator-adapter/node_modules/@types/node/https.d.ts +5 -0
  33. package/generator-adapter/node_modules/@types/node/index.d.ts +7 -3
  34. package/generator-adapter/node_modules/@types/node/{inspector.d.ts → inspector.generated.d.ts} +219 -10
  35. package/generator-adapter/node_modules/@types/node/module.d.ts +136 -17
  36. package/generator-adapter/node_modules/@types/node/net.d.ts +15 -9
  37. package/generator-adapter/node_modules/@types/node/package.json +3 -83
  38. package/generator-adapter/node_modules/@types/node/perf_hooks.d.ts +2 -2
  39. package/generator-adapter/node_modules/@types/node/process.d.ts +3 -4
  40. package/generator-adapter/node_modules/@types/node/querystring.d.ts +2 -3
  41. package/generator-adapter/node_modules/@types/node/readline/promises.d.ts +0 -1
  42. package/generator-adapter/node_modules/@types/node/repl.d.ts +3 -5
  43. package/generator-adapter/node_modules/@types/node/sqlite.d.ts +207 -0
  44. package/generator-adapter/node_modules/@types/node/stream/web.d.ts +11 -3
  45. package/generator-adapter/node_modules/@types/node/stream.d.ts +5 -10
  46. package/generator-adapter/node_modules/@types/node/test.d.ts +1873 -1970
  47. package/generator-adapter/node_modules/@types/node/tls.d.ts +1 -1
  48. package/generator-adapter/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +2 -0
  49. package/generator-adapter/node_modules/@types/node/ts5.6/index.d.ts +7 -3
  50. package/generator-adapter/node_modules/@types/node/url.d.ts +12 -3
  51. package/generator-adapter/node_modules/@types/node/util.d.ts +33 -5
  52. package/generator-adapter/node_modules/@types/node/v8.d.ts +60 -30
  53. package/generator-adapter/node_modules/@types/node/vm.d.ts +61 -8
  54. package/generator-adapter/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  55. package/generator-adapter/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  56. package/generator-adapter/node_modules/@types/node/web-globals/events.d.ts +94 -0
  57. package/generator-adapter/node_modules/@types/node/web-globals/fetch.d.ts +46 -0
  58. package/generator-adapter/node_modules/@types/node/web-globals/navigator.d.ts +22 -0
  59. package/generator-adapter/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  60. package/generator-adapter/node_modules/@types/node/worker_threads.d.ts +87 -28
  61. package/generator-adapter/node_modules/@types/node/zlib.d.ts +8 -2
  62. package/generator-adapter/node_modules/@yeoman/adapter/dist/adapter.d.ts +3 -0
  63. package/generator-adapter/node_modules/@yeoman/adapter/dist/adapter.js +12 -2
  64. package/generator-adapter/node_modules/@yeoman/adapter/dist/adapter.js.map +1 -1
  65. package/generator-adapter/node_modules/@yeoman/adapter/dist/queued-adapter.d.ts +3 -0
  66. package/generator-adapter/node_modules/@yeoman/adapter/dist/queued-adapter.js +12 -2
  67. package/generator-adapter/node_modules/@yeoman/adapter/dist/queued-adapter.js.map +1 -1
  68. package/generator-adapter/node_modules/@yeoman/adapter/dist/testing/test-adapter.d.ts +3 -0
  69. package/generator-adapter/node_modules/@yeoman/adapter/dist/testing/test-adapter.js +12 -2
  70. package/generator-adapter/node_modules/@yeoman/adapter/dist/testing/test-adapter.js.map +1 -1
  71. package/generator-adapter/node_modules/@yeoman/adapter/package.json +4 -4
  72. package/generator-adapter/node_modules/@yeoman/adapter/types/adapter.d.ts +12 -1
  73. package/generator-adapter/node_modules/@yeoman/types/package.json +3 -3
  74. package/generator-adapter/node_modules/@yeoman/types/types/environment/environment.d.ts +4 -1
  75. package/generator-adapter/node_modules/@yeoman/types/types/environment/methods-options.d.ts +7 -3
  76. package/generator-adapter/node_modules/@yeoman/types/types/generator/generator.d.ts +8 -5
  77. package/generator-adapter/node_modules/@yeoman/types/types/generator/utils.d.ts +1 -0
  78. package/generator-adapter/node_modules/ansi-regex/index.d.ts +9 -13
  79. package/generator-adapter/node_modules/ansi-regex/index.js +6 -6
  80. package/generator-adapter/node_modules/ansi-regex/license +1 -1
  81. package/generator-adapter/node_modules/ansi-regex/package.json +12 -6
  82. package/generator-adapter/node_modules/ansi-regex/readme.md +4 -22
  83. package/generator-adapter/node_modules/cli-spinners/index.d.ts +122 -111
  84. package/generator-adapter/node_modules/cli-spinners/index.js +7 -11
  85. package/generator-adapter/node_modules/cli-spinners/package.json +15 -9
  86. package/generator-adapter/node_modules/cli-spinners/readme.md +23 -3
  87. package/generator-adapter/node_modules/cli-spinners/spinners.json +44 -1
  88. package/generator-adapter/node_modules/emoji-regex/README.md +14 -48
  89. package/generator-adapter/node_modules/emoji-regex/index.d.ts +21 -1
  90. package/generator-adapter/node_modules/emoji-regex/index.js +5 -3
  91. package/generator-adapter/node_modules/emoji-regex/package.json +12 -7
  92. package/generator-adapter/node_modules/get-east-asian-width/index.js +2 -3
  93. package/generator-adapter/node_modules/get-east-asian-width/lookup.js +11 -11
  94. package/generator-adapter/node_modules/get-east-asian-width/package.json +1 -1
  95. package/generator-adapter/node_modules/ora/index.d.ts +3 -3
  96. package/generator-adapter/node_modules/ora/index.js +67 -48
  97. package/generator-adapter/node_modules/ora/node_modules/chalk/package.json +83 -0
  98. package/generator-adapter/node_modules/ora/node_modules/chalk/readme.md +297 -0
  99. package/generator-adapter/node_modules/ora/node_modules/chalk/source/index.d.ts +325 -0
  100. package/generator-adapter/node_modules/ora/node_modules/chalk/source/index.js +225 -0
  101. package/generator-adapter/node_modules/ora/node_modules/chalk/source/utilities.js +33 -0
  102. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  103. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  104. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  105. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
  106. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  107. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
  108. package/generator-adapter/node_modules/ora/node_modules/log-symbols/browser-symbols.js +4 -0
  109. package/generator-adapter/node_modules/ora/node_modules/log-symbols/browser.js +1 -8
  110. package/generator-adapter/node_modules/ora/node_modules/log-symbols/index.js +1 -20
  111. package/generator-adapter/node_modules/ora/node_modules/log-symbols/package.json +10 -7
  112. package/generator-adapter/node_modules/ora/node_modules/log-symbols/symbols.js +14 -0
  113. package/generator-adapter/node_modules/ora/node_modules/strip-ansi/package.json +3 -1
  114. package/generator-adapter/node_modules/ora/node_modules/strip-ansi/readme.md +5 -9
  115. package/generator-adapter/node_modules/ora/package.json +13 -13
  116. package/generator-adapter/node_modules/ora/readme.md +49 -3
  117. package/generator-adapter/node_modules/string-width/index.js +52 -45
  118. package/generator-adapter/node_modules/string-width/package.json +8 -7
  119. package/generator-adapter/node_modules/{string-width → strip-ansi}/node_modules/ansi-regex/index.d.ts +13 -9
  120. package/generator-adapter/node_modules/strip-ansi/node_modules/ansi-regex/index.js +10 -0
  121. package/generator-adapter/node_modules/{ora/node_modules/log-symbols/node_modules/is-unicode-supported → strip-ansi/node_modules/ansi-regex}/license +1 -1
  122. package/generator-adapter/node_modules/{string-width → strip-ansi}/node_modules/ansi-regex/package.json +6 -12
  123. package/generator-adapter/node_modules/{ora → strip-ansi}/node_modules/ansi-regex/readme.md +22 -4
  124. package/generator-adapter/package.json +3 -3
  125. package/index.js +3 -0
  126. package/index.js.map +1 -1
  127. package/package.json +19 -19
  128. package/status/router.d.ts +49 -0
  129. package/status/router.js +55 -0
  130. package/status/router.js.map +1 -0
  131. package/transports/http.d.ts +1 -2
  132. package/transports/sse.d.ts +2 -2
  133. package/transports/sse.js +2 -5
  134. package/transports/sse.js.map +1 -1
  135. package/transports/websocket.js +53 -17
  136. package/transports/websocket.js.map +1 -1
  137. package/util/settings.d.ts +11 -0
  138. package/util/settings.js +29 -0
  139. package/util/settings.js.map +1 -0
  140. package/generator-adapter/node_modules/@types/node/dom-events.d.ts +0 -124
  141. package/generator-adapter/node_modules/emoji-regex/index.mjs +0 -4
  142. package/generator-adapter/node_modules/ora/node_modules/ansi-regex/index.d.ts +0 -33
  143. package/generator-adapter/node_modules/ora/node_modules/ansi-regex/index.js +0 -10
  144. package/generator-adapter/node_modules/ora/node_modules/ansi-regex/package.json +0 -61
  145. package/generator-adapter/node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported/index.d.ts +0 -12
  146. package/generator-adapter/node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported/index.js +0 -17
  147. package/generator-adapter/node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported/package.json +0 -43
  148. package/generator-adapter/node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported/readme.md +0 -35
  149. package/generator-adapter/node_modules/string-width/node_modules/ansi-regex/index.js +0 -10
  150. package/generator-adapter/node_modules/string-width/node_modules/ansi-regex/license +0 -9
  151. package/generator-adapter/node_modules/string-width/node_modules/ansi-regex/readme.md +0 -60
  152. package/generator-adapter/node_modules/wrap-ansi/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  153. package/generator-adapter/node_modules/wrap-ansi/node_modules/emoji-regex/README.md +0 -73
  154. package/generator-adapter/node_modules/wrap-ansi/node_modules/emoji-regex/index.d.ts +0 -23
  155. package/generator-adapter/node_modules/wrap-ansi/node_modules/emoji-regex/index.js +0 -6
  156. package/generator-adapter/node_modules/wrap-ansi/node_modules/emoji-regex/package.json +0 -50
  157. /package/generator-adapter/node_modules/{wrap-ansi/node_modules/emoji-regex → emoji-regex}/es2015/index.js +0 -0
  158. /package/generator-adapter/node_modules/{wrap-ansi/node_modules/emoji-regex → emoji-regex}/es2015/text.js +0 -0
  159. /package/generator-adapter/node_modules/{wrap-ansi/node_modules/emoji-regex → emoji-regex}/text.js +0 -0
  160. /package/generator-adapter/node_modules/ora/node_modules/{ansi-regex → chalk}/license +0 -0
@@ -24,7 +24,7 @@
24
24
  * the parent Node.js process and the spawned subprocess. These pipes have
25
25
  * limited (and platform-specific) capacity. If the subprocess writes to
26
26
  * stdout in excess of that limit without the output being captured, the
27
- * subprocess blocks waiting for the pipe buffer to accept more data. This is
27
+ * subprocess blocks, waiting for the pipe buffer to accept more data. This is
28
28
  * identical to the behavior of pipes in the shell. Use the `{ stdio: 'ignore' }` option if the output will not be consumed.
29
29
  *
30
30
  * The command lookup is performed using the `options.env.PATH` environment
@@ -66,7 +66,6 @@
66
66
  * @see [source](https://github.com/nodejs/node/blob/v22.x/lib/child_process.js)
67
67
  */
68
68
  declare module "child_process" {
69
- import { ObjectEncodingOptions } from "node:fs";
70
69
  import { Abortable, EventEmitter } from "node:events";
71
70
  import * as dgram from "node:dgram";
72
71
  import * as net from "node:net";
@@ -887,12 +886,13 @@ declare module "child_process" {
887
886
  signal?: AbortSignal | undefined;
888
887
  maxBuffer?: number | undefined;
889
888
  killSignal?: NodeJS.Signals | number | undefined;
889
+ encoding?: string | null | undefined;
890
890
  }
891
891
  interface ExecOptionsWithStringEncoding extends ExecOptions {
892
- encoding: BufferEncoding;
892
+ encoding?: BufferEncoding | undefined;
893
893
  }
894
894
  interface ExecOptionsWithBufferEncoding extends ExecOptions {
895
- encoding: BufferEncoding | null; // specify `null`.
895
+ encoding: "buffer" | null; // specify `null`.
896
896
  }
897
897
  interface ExecException extends Error {
898
898
  cmd?: string | undefined;
@@ -995,38 +995,19 @@ declare module "child_process" {
995
995
  // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
996
996
  function exec(
997
997
  command: string,
998
- options: {
999
- encoding: "buffer" | null;
1000
- } & ExecOptions,
998
+ options: ExecOptionsWithBufferEncoding,
1001
999
  callback?: (error: ExecException | null, stdout: Buffer, stderr: Buffer) => void,
1002
1000
  ): ChildProcess;
1003
- // `options` with well known `encoding` means stdout/stderr are definitely `string`.
1004
- function exec(
1005
- command: string,
1006
- options: {
1007
- encoding: BufferEncoding;
1008
- } & ExecOptions,
1009
- callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
1010
- ): ChildProcess;
1011
- // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
1012
- // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
1013
- function exec(
1014
- command: string,
1015
- options: {
1016
- encoding: BufferEncoding;
1017
- } & ExecOptions,
1018
- callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
1019
- ): ChildProcess;
1020
- // `options` without an `encoding` means stdout/stderr are definitely `string`.
1001
+ // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
1021
1002
  function exec(
1022
1003
  command: string,
1023
- options: ExecOptions,
1004
+ options: ExecOptionsWithStringEncoding,
1024
1005
  callback?: (error: ExecException | null, stdout: string, stderr: string) => void,
1025
1006
  ): ChildProcess;
1026
1007
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
1027
1008
  function exec(
1028
1009
  command: string,
1029
- options: (ObjectEncodingOptions & ExecOptions) | undefined | null,
1010
+ options: ExecOptions | undefined | null,
1030
1011
  callback?: (error: ExecException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
1031
1012
  ): ChildProcess;
1032
1013
  interface PromiseWithChild<T> extends Promise<T> {
@@ -1039,32 +1020,21 @@ declare module "child_process" {
1039
1020
  }>;
1040
1021
  function __promisify__(
1041
1022
  command: string,
1042
- options: {
1043
- encoding: "buffer" | null;
1044
- } & ExecOptions,
1023
+ options: ExecOptionsWithBufferEncoding,
1045
1024
  ): PromiseWithChild<{
1046
1025
  stdout: Buffer;
1047
1026
  stderr: Buffer;
1048
1027
  }>;
1049
1028
  function __promisify__(
1050
1029
  command: string,
1051
- options: {
1052
- encoding: BufferEncoding;
1053
- } & ExecOptions,
1030
+ options: ExecOptionsWithStringEncoding,
1054
1031
  ): PromiseWithChild<{
1055
1032
  stdout: string;
1056
1033
  stderr: string;
1057
1034
  }>;
1058
1035
  function __promisify__(
1059
1036
  command: string,
1060
- options: ExecOptions,
1061
- ): PromiseWithChild<{
1062
- stdout: string;
1063
- stderr: string;
1064
- }>;
1065
- function __promisify__(
1066
- command: string,
1067
- options?: (ObjectEncodingOptions & ExecOptions) | null,
1037
+ options: ExecOptions | undefined | null,
1068
1038
  ): PromiseWithChild<{
1069
1039
  stdout: string | Buffer;
1070
1040
  stderr: string | Buffer;
@@ -1076,16 +1046,16 @@ declare module "child_process" {
1076
1046
  windowsVerbatimArguments?: boolean | undefined;
1077
1047
  shell?: boolean | string | undefined;
1078
1048
  signal?: AbortSignal | undefined;
1049
+ encoding?: string | null | undefined;
1079
1050
  }
1080
1051
  interface ExecFileOptionsWithStringEncoding extends ExecFileOptions {
1081
- encoding: BufferEncoding;
1052
+ encoding?: BufferEncoding | undefined;
1082
1053
  }
1083
1054
  interface ExecFileOptionsWithBufferEncoding extends ExecFileOptions {
1084
1055
  encoding: "buffer" | null;
1085
1056
  }
1086
- interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {
1087
- encoding: BufferEncoding;
1088
- }
1057
+ /** @deprecated Use `ExecFileOptions` instead. */
1058
+ interface ExecFileOptionsWithOtherEncoding extends ExecFileOptions {}
1089
1059
  type ExecFileException =
1090
1060
  & Omit<ExecException, "code">
1091
1061
  & Omit<NodeJS.ErrnoException, "code">
@@ -1154,80 +1124,44 @@ declare module "child_process" {
1154
1124
  * @param args List of string arguments.
1155
1125
  * @param callback Called with the output when process terminates.
1156
1126
  */
1157
- function execFile(file: string): ChildProcess;
1158
- function execFile(
1159
- file: string,
1160
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1161
- ): ChildProcess;
1162
- function execFile(file: string, args?: readonly string[] | null): ChildProcess;
1163
- function execFile(
1164
- file: string,
1165
- args: readonly string[] | undefined | null,
1166
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1167
- ): ChildProcess;
1168
1127
  // no `options` definitely means stdout/stderr are `string`.
1169
1128
  function execFile(
1170
1129
  file: string,
1171
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1130
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1172
1131
  ): ChildProcess;
1173
1132
  function execFile(
1174
1133
  file: string,
1175
1134
  args: readonly string[] | undefined | null,
1176
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1135
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1177
1136
  ): ChildProcess;
1178
1137
  // `options` with `"buffer"` or `null` for `encoding` means stdout/stderr are definitely `Buffer`.
1179
1138
  function execFile(
1180
1139
  file: string,
1181
1140
  options: ExecFileOptionsWithBufferEncoding,
1182
- callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
1141
+ callback?: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
1183
1142
  ): ChildProcess;
1184
1143
  function execFile(
1185
1144
  file: string,
1186
1145
  args: readonly string[] | undefined | null,
1187
1146
  options: ExecFileOptionsWithBufferEncoding,
1188
- callback: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
1147
+ callback?: (error: ExecFileException | null, stdout: Buffer, stderr: Buffer) => void,
1189
1148
  ): ChildProcess;
1190
- // `options` with well known `encoding` means stdout/stderr are definitely `string`.
1149
+ // `options` with well-known or absent `encoding` means stdout/stderr are definitely `string`.
1191
1150
  function execFile(
1192
1151
  file: string,
1193
1152
  options: ExecFileOptionsWithStringEncoding,
1194
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1153
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1195
1154
  ): ChildProcess;
1196
1155
  function execFile(
1197
1156
  file: string,
1198
1157
  args: readonly string[] | undefined | null,
1199
1158
  options: ExecFileOptionsWithStringEncoding,
1200
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1201
- ): ChildProcess;
1202
- // `options` with an `encoding` whose type is `string` means stdout/stderr could either be `Buffer` or `string`.
1203
- // There is no guarantee the `encoding` is unknown as `string` is a superset of `BufferEncoding`.
1204
- function execFile(
1205
- file: string,
1206
- options: ExecFileOptionsWithOtherEncoding,
1207
- callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
1208
- ): ChildProcess;
1209
- function execFile(
1210
- file: string,
1211
- args: readonly string[] | undefined | null,
1212
- options: ExecFileOptionsWithOtherEncoding,
1213
- callback: (error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void,
1214
- ): ChildProcess;
1215
- // `options` without an `encoding` means stdout/stderr are definitely `string`.
1216
- function execFile(
1217
- file: string,
1218
- options: ExecFileOptions,
1219
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1220
- ): ChildProcess;
1221
- function execFile(
1222
- file: string,
1223
- args: readonly string[] | undefined | null,
1224
- options: ExecFileOptions,
1225
- callback: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1159
+ callback?: (error: ExecFileException | null, stdout: string, stderr: string) => void,
1226
1160
  ): ChildProcess;
1227
1161
  // fallback if nothing else matches. Worst case is always `string | Buffer`.
1228
1162
  function execFile(
1229
1163
  file: string,
1230
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1164
+ options: ExecFileOptions | undefined | null,
1231
1165
  callback:
1232
1166
  | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
1233
1167
  | undefined
@@ -1236,7 +1170,7 @@ declare module "child_process" {
1236
1170
  function execFile(
1237
1171
  file: string,
1238
1172
  args: readonly string[] | undefined | null,
1239
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1173
+ options: ExecFileOptions | undefined | null,
1240
1174
  callback:
1241
1175
  | ((error: ExecFileException | null, stdout: string | Buffer, stderr: string | Buffer) => void)
1242
1176
  | undefined
@@ -1286,37 +1220,7 @@ declare module "child_process" {
1286
1220
  }>;
1287
1221
  function __promisify__(
1288
1222
  file: string,
1289
- options: ExecFileOptionsWithOtherEncoding,
1290
- ): PromiseWithChild<{
1291
- stdout: string | Buffer;
1292
- stderr: string | Buffer;
1293
- }>;
1294
- function __promisify__(
1295
- file: string,
1296
- args: readonly string[] | undefined | null,
1297
- options: ExecFileOptionsWithOtherEncoding,
1298
- ): PromiseWithChild<{
1299
- stdout: string | Buffer;
1300
- stderr: string | Buffer;
1301
- }>;
1302
- function __promisify__(
1303
- file: string,
1304
- options: ExecFileOptions,
1305
- ): PromiseWithChild<{
1306
- stdout: string;
1307
- stderr: string;
1308
- }>;
1309
- function __promisify__(
1310
- file: string,
1311
- args: readonly string[] | undefined | null,
1312
- options: ExecFileOptions,
1313
- ): PromiseWithChild<{
1314
- stdout: string;
1315
- stderr: string;
1316
- }>;
1317
- function __promisify__(
1318
- file: string,
1319
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1223
+ options: ExecFileOptions | undefined | null,
1320
1224
  ): PromiseWithChild<{
1321
1225
  stdout: string | Buffer;
1322
1226
  stderr: string | Buffer;
@@ -1324,7 +1228,7 @@ declare module "child_process" {
1324
1228
  function __promisify__(
1325
1229
  file: string,
1326
1230
  args: readonly string[] | undefined | null,
1327
- options: (ObjectEncodingOptions & ExecFileOptions) | undefined | null,
1231
+ options: ExecFileOptions | undefined | null,
1328
1232
  ): PromiseWithChild<{
1329
1233
  stdout: string | Buffer;
1330
1234
  stderr: string | Buffer;
@@ -266,7 +266,7 @@ declare module "cluster" {
266
266
  * @since v0.7.7
267
267
  * @return A reference to `worker`.
268
268
  */
269
- disconnect(): void;
269
+ disconnect(): this;
270
270
  /**
271
271
  * This function returns `true` if the worker is connected to its primary via its
272
272
  * IPC channel, `false` otherwise. A worker is connected to its primary after it
@@ -1,6 +1,4 @@
1
1
  // Polyfills for the explicit resource management types added in TypeScript 5.2.
2
- // TODO: remove once this package no longer supports TS 5.1, and replace with a
3
- // <reference> to TypeScript's disposable library in index.d.ts.
4
2
 
5
3
  interface SymbolConstructor {
6
4
  readonly dispose: unique symbol;
@@ -1,7 +1,4 @@
1
1
  // Polyfill for ES2022's .at() method on string/array prototypes, added to TypeScript in 4.6.
2
- // TODO: these methods are not used within @types/node, and should be removed at the next
3
- // major @types/node version; users should include the es2022 TypeScript libraries
4
- // if they need these features.
5
2
 
6
3
  interface RelativeIndexable<T> {
7
4
  at(index: number): T | undefined;
@@ -3,7 +3,6 @@
3
3
  // are expected (eg. DOM-compatible APIs) if lib.esnext.iterator is loaded.
4
4
  // Also ensures that iterators returned by the Node API, which inherit from Iterator.prototype, correctly expose the iterator helper methods
5
5
  // if lib.esnext.iterator is loaded.
6
- // TODO: remove once this package no longer supports TS 5.5, and replace NodeJS.BuiltinIteratorReturn with BuiltinIteratorReturn.
7
6
 
8
7
  // Placeholders for TS <5.6
9
8
  interface IteratorObject<T, TReturn, TNext> {}
@@ -3764,7 +3764,23 @@ declare module "crypto" {
3764
3764
  */
3765
3765
  checkIP(ip: string): string | undefined;
3766
3766
  /**
3767
- * Checks whether this certificate was issued by the given `otherCert`.
3767
+ * Checks whether this certificate was potentially issued by the given `otherCert`
3768
+ * by comparing the certificate metadata.
3769
+ *
3770
+ * This is useful for pruning a list of possible issuer certificates which have been
3771
+ * selected using a more rudimentary filtering routine, i.e. just based on subject
3772
+ * and issuer names.
3773
+ *
3774
+ * Finally, to verify that this certificate's signature was produced by a private key
3775
+ * corresponding to `otherCert`'s public key use `x509.verify(publicKey)`
3776
+ * with `otherCert`'s public key represented as a `KeyObject`
3777
+ * like so
3778
+ *
3779
+ * ```js
3780
+ * if (!x509.verify(otherCert.publicKey)) {
3781
+ * throw new Error('otherCert did not issue x509');
3782
+ * }
3783
+ * ```
3768
3784
  * @since v15.6.0
3769
3785
  */
3770
3786
  checkIssued(otherCert: X509Certificate): boolean;
@@ -259,7 +259,7 @@ declare module "diagnostics_channel" {
259
259
  * @param store The store to unbind from the channel.
260
260
  * @return `true` if the store was found, `false` otherwise.
261
261
  */
262
- unbindStore(store: any): void;
262
+ unbindStore(store: AsyncLocalStorage<StoreType>): boolean;
263
263
  /**
264
264
  * Applies the given data to any AsyncLocalStorage instances bound to the channel
265
265
  * for the duration of the given function, then publishes to the channel within
@@ -297,7 +297,12 @@ declare module "diagnostics_channel" {
297
297
  * @param thisArg The receiver to be used for the function call.
298
298
  * @param args Optional arguments to pass to the function.
299
299
  */
300
- runStores(): void;
300
+ runStores<ThisArg = any, Args extends any[] = any[], Result = any>(
301
+ context: ContextType,
302
+ fn: (this: ThisArg, ...args: Args) => Result,
303
+ thisArg?: ThisArg,
304
+ ...args: Args
305
+ ): Result;
301
306
  }
302
307
  interface TracingChannelSubscribers<ContextType extends object> {
303
308
  start: (message: ContextType) => void;
@@ -441,12 +446,12 @@ declare module "diagnostics_channel" {
441
446
  * @param args Optional arguments to pass to the function
442
447
  * @return The return value of the given function
443
448
  */
444
- traceSync<ThisArg = any, Args extends any[] = any[]>(
445
- fn: (this: ThisArg, ...args: Args) => any,
449
+ traceSync<ThisArg = any, Args extends any[] = any[], Result = any>(
450
+ fn: (this: ThisArg, ...args: Args) => Result,
446
451
  context?: ContextType,
447
452
  thisArg?: ThisArg,
448
453
  ...args: Args
449
- ): void;
454
+ ): Result;
450
455
  /**
451
456
  * Trace a promise-returning function call. This will always produce a `start event` and `end event` around the synchronous portion of the
452
457
  * function execution, and will produce an `asyncStart event` and `asyncEnd event` when a promise continuation is reached. It may also
@@ -476,12 +481,12 @@ declare module "diagnostics_channel" {
476
481
  * @param args Optional arguments to pass to the function
477
482
  * @return Chained from promise returned by the given function
478
483
  */
479
- tracePromise<ThisArg = any, Args extends any[] = any[]>(
480
- fn: (this: ThisArg, ...args: Args) => Promise<any>,
484
+ tracePromise<ThisArg = any, Args extends any[] = any[], Result = any>(
485
+ fn: (this: ThisArg, ...args: Args) => Promise<Result>,
481
486
  context?: ContextType,
482
487
  thisArg?: ThisArg,
483
488
  ...args: Args
484
- ): void;
489
+ ): Promise<Result>;
485
490
  /**
486
491
  * Trace a callback-receiving function call. This will always produce a `start event` and `end event` around the synchronous portion of the
487
492
  * function execution, and will produce a `asyncStart event` and `asyncEnd event` around the callback execution. It may also produce an `error event` if the given function throws an error or
@@ -540,13 +545,32 @@ declare module "diagnostics_channel" {
540
545
  * @param args Optional arguments to pass to the function
541
546
  * @return The return value of the given function
542
547
  */
543
- traceCallback<Fn extends (this: any, ...args: any[]) => any>(
544
- fn: Fn,
548
+ traceCallback<ThisArg = any, Args extends any[] = any[], Result = any>(
549
+ fn: (this: ThisArg, ...args: Args) => Result,
545
550
  position?: number,
546
551
  context?: ContextType,
547
- thisArg?: any,
548
- ...args: Parameters<Fn>
549
- ): void;
552
+ thisArg?: ThisArg,
553
+ ...args: Args
554
+ ): Result;
555
+ /**
556
+ * `true` if any of the individual channels has a subscriber, `false` if not.
557
+ *
558
+ * This is a helper method available on a {@link TracingChannel} instance to check
559
+ * if any of the [TracingChannel Channels](https://nodejs.org/api/diagnostics_channel.html#tracingchannel-channels) have subscribers.
560
+ * A `true` is returned if any of them have at least one subscriber, a `false` is returned otherwise.
561
+ *
562
+ * ```js
563
+ * const diagnostics_channel = require('node:diagnostics_channel');
564
+ *
565
+ * const channels = diagnostics_channel.tracingChannel('my-channel');
566
+ *
567
+ * if (channels.hasSubscribers) {
568
+ * // Do something
569
+ * }
570
+ * ```
571
+ * @since v22.0.0, v20.13.0
572
+ */
573
+ readonly hasSubscribers: boolean;
550
574
  }
551
575
  }
552
576
  declare module "node:diagnostics_channel" {
@@ -20,6 +20,7 @@ declare module "dns/promises" {
20
20
  ResolveWithTtlOptions,
21
21
  SoaRecord,
22
22
  SrvRecord,
23
+ TlsaRecord,
23
24
  } from "node:dns";
24
25
  /**
25
26
  * Returns an array of IP address strings, formatted according to [RFC 5952](https://tools.ietf.org/html/rfc5952#section-6),
@@ -126,22 +127,26 @@ declare module "dns/promises" {
126
127
  * @param [rrtype='A'] Resource record type.
127
128
  */
128
129
  function resolve(hostname: string): Promise<string[]>;
129
- function resolve(hostname: string, rrtype: "A"): Promise<string[]>;
130
- function resolve(hostname: string, rrtype: "AAAA"): Promise<string[]>;
130
+ function resolve(hostname: string, rrtype: "A" | "AAAA" | "CNAME" | "NS" | "PTR"): Promise<string[]>;
131
131
  function resolve(hostname: string, rrtype: "ANY"): Promise<AnyRecord[]>;
132
132
  function resolve(hostname: string, rrtype: "CAA"): Promise<CaaRecord[]>;
133
- function resolve(hostname: string, rrtype: "CNAME"): Promise<string[]>;
134
133
  function resolve(hostname: string, rrtype: "MX"): Promise<MxRecord[]>;
135
134
  function resolve(hostname: string, rrtype: "NAPTR"): Promise<NaptrRecord[]>;
136
- function resolve(hostname: string, rrtype: "NS"): Promise<string[]>;
137
- function resolve(hostname: string, rrtype: "PTR"): Promise<string[]>;
138
135
  function resolve(hostname: string, rrtype: "SOA"): Promise<SoaRecord>;
139
136
  function resolve(hostname: string, rrtype: "SRV"): Promise<SrvRecord[]>;
137
+ function resolve(hostname: string, rrtype: "TLSA"): Promise<TlsaRecord[]>;
140
138
  function resolve(hostname: string, rrtype: "TXT"): Promise<string[][]>;
141
- function resolve(
142
- hostname: string,
143
- rrtype: string,
144
- ): Promise<string[] | MxRecord[] | NaptrRecord[] | SoaRecord | SrvRecord[] | string[][] | AnyRecord[]>;
139
+ function resolve(hostname: string, rrtype: string): Promise<
140
+ | string[]
141
+ | CaaRecord[]
142
+ | MxRecord[]
143
+ | NaptrRecord[]
144
+ | SoaRecord
145
+ | SrvRecord[]
146
+ | TlsaRecord[]
147
+ | string[][]
148
+ | AnyRecord[]
149
+ >;
145
150
  /**
146
151
  * Uses the DNS protocol to resolve IPv4 addresses (`A` records) for the `hostname`. On success, the `Promise` is resolved with an array of IPv4
147
152
  * addresses (e.g. `['74.125.79.104', '74.125.79.105', '74.125.79.106']`).
@@ -292,6 +297,27 @@ declare module "dns/promises" {
292
297
  * @since v10.6.0
293
298
  */
294
299
  function resolveSrv(hostname: string): Promise<SrvRecord[]>;
300
+ /**
301
+ * Uses the DNS protocol to resolve certificate associations (`TLSA` records) for
302
+ * the `hostname`. On success, the `Promise` is resolved with an array of objectsAdd commentMore actions
303
+ * with these properties:
304
+ *
305
+ * * `certUsage`
306
+ * * `selector`
307
+ * * `match`
308
+ * * `data`
309
+ *
310
+ * ```js
311
+ * {
312
+ * certUsage: 3,
313
+ * selector: 1,
314
+ * match: 1,
315
+ * data: [ArrayBuffer]
316
+ * }
317
+ * ```
318
+ * @since v22.15.0
319
+ */
320
+ function resolveTlsa(hostname: string): Promise<TlsaRecord[]>;
295
321
  /**
296
322
  * Uses the DNS protocol to resolve text queries (`TXT` records) for the `hostname`. On success, the `Promise` is resolved with a two-dimensional array
297
323
  * of the text records available for `hostname` (e.g.`[ ['v=spf1 ip4:0.0.0.0 ', '~all' ] ]`). Each sub-array contains TXT chunks of
@@ -450,6 +476,7 @@ declare module "dns/promises" {
450
476
  resolvePtr: typeof resolvePtr;
451
477
  resolveSoa: typeof resolveSoa;
452
478
  resolveSrv: typeof resolveSrv;
479
+ resolveTlsa: typeof resolveTlsa;
453
480
  resolveTxt: typeof resolveTxt;
454
481
  reverse: typeof reverse;
455
482
  /**