@chainlink/external-adapter-framework 2.7.0 → 2.7.2

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 (127) hide show
  1. package/README.md +1 -1
  2. package/adapter/basic.js +1 -1
  3. package/adapter/basic.js.map +1 -1
  4. package/adapter/types.d.ts +1 -0
  5. package/generator-adapter/node_modules/.yarn-integrity +14 -13
  6. package/generator-adapter/node_modules/@types/node/README.md +2 -2
  7. package/generator-adapter/node_modules/@types/node/buffer.d.ts +1 -2
  8. package/generator-adapter/node_modules/@types/node/child_process.d.ts +26 -122
  9. package/generator-adapter/node_modules/@types/node/crypto.d.ts +17 -1
  10. package/generator-adapter/node_modules/@types/node/fs/promises.d.ts +41 -37
  11. package/generator-adapter/node_modules/@types/node/fs.d.ts +55 -44
  12. package/generator-adapter/node_modules/@types/node/globals.d.ts +150 -344
  13. package/generator-adapter/node_modules/@types/node/http.d.ts +6 -6
  14. package/generator-adapter/node_modules/@types/node/http2.d.ts +12 -1
  15. package/generator-adapter/node_modules/@types/node/https.d.ts +5 -0
  16. package/generator-adapter/node_modules/@types/node/index.d.ts +7 -3
  17. package/generator-adapter/node_modules/@types/node/{inspector.d.ts → inspector.generated.d.ts} +219 -10
  18. package/generator-adapter/node_modules/@types/node/module.d.ts +24 -0
  19. package/generator-adapter/node_modules/@types/node/package.json +3 -83
  20. package/generator-adapter/node_modules/@types/node/process.d.ts +3 -2
  21. package/generator-adapter/node_modules/@types/node/readline/promises.d.ts +0 -1
  22. package/generator-adapter/node_modules/@types/node/sqlite.d.ts +35 -0
  23. package/generator-adapter/node_modules/@types/node/stream/web.d.ts +4 -0
  24. package/generator-adapter/node_modules/@types/node/stream.d.ts +0 -11
  25. package/generator-adapter/node_modules/@types/node/test.d.ts +8 -0
  26. package/generator-adapter/node_modules/@types/node/ts5.6/index.d.ts +7 -3
  27. package/generator-adapter/node_modules/@types/node/url.d.ts +12 -3
  28. package/generator-adapter/node_modules/@types/node/util.d.ts +5 -2
  29. package/generator-adapter/node_modules/@types/node/v8.d.ts +27 -30
  30. package/generator-adapter/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
  31. package/generator-adapter/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
  32. package/generator-adapter/node_modules/@types/node/{dom-events.d.ts → web-globals/events.d.ts} +47 -52
  33. package/generator-adapter/node_modules/@types/node/web-globals/fetch.d.ts +46 -0
  34. package/generator-adapter/node_modules/@types/node/web-globals/navigator.d.ts +22 -0
  35. package/generator-adapter/node_modules/@types/node/web-globals/storage.d.ts +24 -0
  36. package/generator-adapter/node_modules/@types/node/worker_threads.d.ts +39 -3
  37. package/generator-adapter/node_modules/@types/node/zlib.d.ts +8 -2
  38. package/generator-adapter/node_modules/@yeoman/adapter/dist/adapter.d.ts +3 -0
  39. package/generator-adapter/node_modules/@yeoman/adapter/dist/adapter.js +12 -2
  40. package/generator-adapter/node_modules/@yeoman/adapter/dist/adapter.js.map +1 -1
  41. package/generator-adapter/node_modules/@yeoman/adapter/dist/queued-adapter.d.ts +3 -0
  42. package/generator-adapter/node_modules/@yeoman/adapter/dist/queued-adapter.js +12 -2
  43. package/generator-adapter/node_modules/@yeoman/adapter/dist/queued-adapter.js.map +1 -1
  44. package/generator-adapter/node_modules/@yeoman/adapter/dist/testing/test-adapter.d.ts +3 -0
  45. package/generator-adapter/node_modules/@yeoman/adapter/dist/testing/test-adapter.js +12 -2
  46. package/generator-adapter/node_modules/@yeoman/adapter/dist/testing/test-adapter.js.map +1 -1
  47. package/generator-adapter/node_modules/@yeoman/adapter/package.json +4 -4
  48. package/generator-adapter/node_modules/@yeoman/adapter/types/adapter.d.ts +12 -1
  49. package/generator-adapter/node_modules/@yeoman/types/package.json +3 -3
  50. package/generator-adapter/node_modules/@yeoman/types/types/environment/environment.d.ts +4 -1
  51. package/generator-adapter/node_modules/@yeoman/types/types/environment/methods-options.d.ts +7 -3
  52. package/generator-adapter/node_modules/@yeoman/types/types/generator/generator.d.ts +8 -5
  53. package/generator-adapter/node_modules/@yeoman/types/types/generator/utils.d.ts +1 -0
  54. package/generator-adapter/node_modules/ansi-regex/index.d.ts +9 -13
  55. package/generator-adapter/node_modules/ansi-regex/index.js +6 -6
  56. package/generator-adapter/node_modules/ansi-regex/license +1 -1
  57. package/generator-adapter/node_modules/ansi-regex/package.json +12 -6
  58. package/generator-adapter/node_modules/ansi-regex/readme.md +4 -22
  59. package/generator-adapter/node_modules/cli-spinners/index.d.ts +122 -111
  60. package/generator-adapter/node_modules/cli-spinners/index.js +7 -11
  61. package/generator-adapter/node_modules/cli-spinners/package.json +15 -9
  62. package/generator-adapter/node_modules/cli-spinners/readme.md +23 -3
  63. package/generator-adapter/node_modules/cli-spinners/spinners.json +44 -1
  64. package/generator-adapter/node_modules/emoji-regex/README.md +14 -48
  65. package/generator-adapter/node_modules/emoji-regex/index.d.ts +21 -1
  66. package/generator-adapter/node_modules/emoji-regex/index.js +5 -3
  67. package/generator-adapter/node_modules/emoji-regex/package.json +12 -7
  68. package/generator-adapter/node_modules/get-east-asian-width/index.js +2 -3
  69. package/generator-adapter/node_modules/get-east-asian-width/lookup.js +11 -11
  70. package/generator-adapter/node_modules/get-east-asian-width/package.json +1 -1
  71. package/generator-adapter/node_modules/ora/index.d.ts +3 -3
  72. package/generator-adapter/node_modules/ora/index.js +67 -48
  73. package/generator-adapter/node_modules/ora/node_modules/chalk/package.json +83 -0
  74. package/generator-adapter/node_modules/ora/node_modules/chalk/readme.md +297 -0
  75. package/generator-adapter/node_modules/ora/node_modules/chalk/source/index.d.ts +325 -0
  76. package/generator-adapter/node_modules/ora/node_modules/chalk/source/index.js +225 -0
  77. package/generator-adapter/node_modules/ora/node_modules/chalk/source/utilities.js +33 -0
  78. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.d.ts +236 -0
  79. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/ansi-styles/index.js +223 -0
  80. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.d.ts +1 -0
  81. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/supports-color/browser.js +34 -0
  82. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.d.ts +55 -0
  83. package/generator-adapter/node_modules/ora/node_modules/chalk/source/vendor/supports-color/index.js +190 -0
  84. package/generator-adapter/node_modules/ora/node_modules/log-symbols/browser-symbols.js +4 -0
  85. package/generator-adapter/node_modules/ora/node_modules/log-symbols/browser.js +1 -8
  86. package/generator-adapter/node_modules/ora/node_modules/log-symbols/index.js +1 -20
  87. package/generator-adapter/node_modules/ora/node_modules/log-symbols/package.json +10 -7
  88. package/generator-adapter/node_modules/ora/node_modules/log-symbols/symbols.js +14 -0
  89. package/generator-adapter/node_modules/ora/node_modules/strip-ansi/package.json +3 -1
  90. package/generator-adapter/node_modules/ora/node_modules/strip-ansi/readme.md +5 -9
  91. package/generator-adapter/node_modules/ora/package.json +13 -13
  92. package/generator-adapter/node_modules/ora/readme.md +49 -3
  93. package/generator-adapter/node_modules/string-width/index.js +52 -45
  94. package/generator-adapter/node_modules/string-width/package.json +8 -7
  95. package/generator-adapter/node_modules/{string-width → strip-ansi}/node_modules/ansi-regex/index.d.ts +13 -9
  96. package/generator-adapter/node_modules/strip-ansi/node_modules/ansi-regex/index.js +10 -0
  97. package/generator-adapter/node_modules/{ora/node_modules/log-symbols/node_modules/is-unicode-supported → strip-ansi/node_modules/ansi-regex}/license +1 -1
  98. package/generator-adapter/node_modules/{string-width → strip-ansi}/node_modules/ansi-regex/package.json +6 -12
  99. package/generator-adapter/node_modules/{ora → strip-ansi}/node_modules/ansi-regex/readme.md +22 -4
  100. package/generator-adapter/package.json +3 -3
  101. package/package.json +15 -14
  102. package/rate-limiting/index.d.ts +1 -1
  103. package/rate-limiting/index.js +5 -1
  104. package/rate-limiting/index.js.map +1 -1
  105. package/transports/http.d.ts +1 -2
  106. package/transports/websocket.js +53 -17
  107. package/transports/websocket.js.map +1 -1
  108. package/generator-adapter/node_modules/emoji-regex/index.mjs +0 -4
  109. package/generator-adapter/node_modules/ora/node_modules/ansi-regex/index.d.ts +0 -33
  110. package/generator-adapter/node_modules/ora/node_modules/ansi-regex/index.js +0 -10
  111. package/generator-adapter/node_modules/ora/node_modules/ansi-regex/package.json +0 -61
  112. package/generator-adapter/node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported/index.d.ts +0 -12
  113. package/generator-adapter/node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported/index.js +0 -17
  114. package/generator-adapter/node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported/package.json +0 -43
  115. package/generator-adapter/node_modules/ora/node_modules/log-symbols/node_modules/is-unicode-supported/readme.md +0 -35
  116. package/generator-adapter/node_modules/string-width/node_modules/ansi-regex/index.js +0 -10
  117. package/generator-adapter/node_modules/string-width/node_modules/ansi-regex/license +0 -9
  118. package/generator-adapter/node_modules/string-width/node_modules/ansi-regex/readme.md +0 -60
  119. package/generator-adapter/node_modules/wrap-ansi/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
  120. package/generator-adapter/node_modules/wrap-ansi/node_modules/emoji-regex/README.md +0 -73
  121. package/generator-adapter/node_modules/wrap-ansi/node_modules/emoji-regex/index.d.ts +0 -23
  122. package/generator-adapter/node_modules/wrap-ansi/node_modules/emoji-regex/index.js +0 -6
  123. package/generator-adapter/node_modules/wrap-ansi/node_modules/emoji-regex/package.json +0 -50
  124. /package/generator-adapter/node_modules/{wrap-ansi/node_modules/emoji-regex → emoji-regex}/es2015/index.js +0 -0
  125. /package/generator-adapter/node_modules/{wrap-ansi/node_modules/emoji-regex → emoji-regex}/es2015/text.js +0 -0
  126. /package/generator-adapter/node_modules/{wrap-ansi/node_modules/emoji-regex → emoji-regex}/text.js +0 -0
  127. /package/generator-adapter/node_modules/ora/node_modules/{ansi-regex → chalk}/license +0 -0
@@ -40,7 +40,7 @@ declare module "fs/promises" {
40
40
  StatsFs,
41
41
  TimeLike,
42
42
  WatchEventType,
43
- WatchOptions,
43
+ WatchOptions as _WatchOptions,
44
44
  WriteStream,
45
45
  WriteVResult,
46
46
  } from "node:fs";
@@ -88,6 +88,9 @@ declare module "fs/promises" {
88
88
  highWaterMark?: number | undefined;
89
89
  flush?: boolean | undefined;
90
90
  }
91
+ interface ReadableWebStreamOptions {
92
+ autoClose?: boolean | undefined;
93
+ }
91
94
  // TODO: Add `EventEmitter` close
92
95
  interface FileHandle {
93
96
  /**
@@ -260,9 +263,8 @@ declare module "fs/promises" {
260
263
  * While the `ReadableStream` will read the file to completion, it will not
261
264
  * close the `FileHandle` automatically. User code must still call the`fileHandle.close()` method.
262
265
  * @since v17.0.0
263
- * @experimental
264
266
  */
265
- readableWebStream(): ReadableStream;
267
+ readableWebStream(options?: ReadableWebStreamOptions): ReadableStream;
266
268
  /**
267
269
  * Asynchronously reads the entire contents of a file.
268
270
  *
@@ -475,7 +477,8 @@ declare module "fs/promises" {
475
477
  */
476
478
  close(): Promise<void>;
477
479
  /**
478
- * An alias for {@link FileHandle.close()}.
480
+ * Calls `filehandle.close()` and returns a promise that fulfills when the
481
+ * filehandle is closed.
479
482
  * @since v20.4.0
480
483
  */
481
484
  [Symbol.asyncDispose](): Promise<void>;
@@ -1179,6 +1182,16 @@ declare module "fs/promises" {
1179
1182
  * @return Fulfills with an {fs.Dir}.
1180
1183
  */
1181
1184
  function opendir(path: PathLike, options?: OpenDirOptions): Promise<Dir>;
1185
+ interface WatchOptions extends _WatchOptions {
1186
+ maxQueue?: number | undefined;
1187
+ overflow?: "ignore" | "throw" | undefined;
1188
+ }
1189
+ interface WatchOptionsWithBufferEncoding extends WatchOptions {
1190
+ encoding: "buffer";
1191
+ }
1192
+ interface WatchOptionsWithStringEncoding extends WatchOptions {
1193
+ encoding?: BufferEncoding | undefined;
1194
+ }
1182
1195
  /**
1183
1196
  * Returns an async iterator that watches for changes on `filename`, where `filename`is either a file or a directory.
1184
1197
  *
@@ -1211,33 +1224,16 @@ declare module "fs/promises" {
1211
1224
  */
1212
1225
  function watch(
1213
1226
  filename: PathLike,
1214
- options:
1215
- | (WatchOptions & {
1216
- encoding: "buffer";
1217
- })
1218
- | "buffer",
1219
- ): AsyncIterable<FileChangeInfo<Buffer>>;
1220
- /**
1221
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1222
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1223
- * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1224
- * If `encoding` is not supplied, the default of `'utf8'` is used.
1225
- * If `persistent` is not supplied, the default of `true` is used.
1226
- * If `recursive` is not supplied, the default of `false` is used.
1227
- */
1228
- function watch(filename: PathLike, options?: WatchOptions | BufferEncoding): AsyncIterable<FileChangeInfo<string>>;
1229
- /**
1230
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
1231
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
1232
- * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
1233
- * If `encoding` is not supplied, the default of `'utf8'` is used.
1234
- * If `persistent` is not supplied, the default of `true` is used.
1235
- * If `recursive` is not supplied, the default of `false` is used.
1236
- */
1227
+ options?: WatchOptionsWithStringEncoding | BufferEncoding,
1228
+ ): NodeJS.AsyncIterator<FileChangeInfo<string>>;
1237
1229
  function watch(
1238
1230
  filename: PathLike,
1239
- options: WatchOptions | string,
1240
- ): AsyncIterable<FileChangeInfo<string>> | AsyncIterable<FileChangeInfo<Buffer>>;
1231
+ options: WatchOptionsWithBufferEncoding | "buffer",
1232
+ ): NodeJS.AsyncIterator<FileChangeInfo<Buffer>>;
1233
+ function watch(
1234
+ filename: PathLike,
1235
+ options: WatchOptions | BufferEncoding | "buffer",
1236
+ ): NodeJS.AsyncIterator<FileChangeInfo<string | Buffer>>;
1241
1237
  /**
1242
1238
  * Asynchronously copies the entire directory structure from `src` to `dest`,
1243
1239
  * including subdirectories and files.
@@ -1252,20 +1248,28 @@ declare module "fs/promises" {
1252
1248
  */
1253
1249
  function cp(source: string | URL, destination: string | URL, opts?: CopyOptions): Promise<void>;
1254
1250
  /**
1255
- * Retrieves the files matching the specified pattern.
1251
+ * ```js
1252
+ * import { glob } from 'node:fs/promises';
1253
+ *
1254
+ * for await (const entry of glob('*.js'))
1255
+ * console.log(entry);
1256
+ * ```
1257
+ * @since v22.0.0
1258
+ * @returns An AsyncIterator that yields the paths of files
1259
+ * that match the pattern.
1256
1260
  */
1257
- function glob(pattern: string | string[]): NodeJS.AsyncIterator<string>;
1261
+ function glob(pattern: string | readonly string[]): NodeJS.AsyncIterator<string>;
1258
1262
  function glob(
1259
- pattern: string | string[],
1260
- opt: GlobOptionsWithFileTypes,
1263
+ pattern: string | readonly string[],
1264
+ options: GlobOptionsWithFileTypes,
1261
1265
  ): NodeJS.AsyncIterator<Dirent>;
1262
1266
  function glob(
1263
- pattern: string | string[],
1264
- opt: GlobOptionsWithoutFileTypes,
1267
+ pattern: string | readonly string[],
1268
+ options: GlobOptionsWithoutFileTypes,
1265
1269
  ): NodeJS.AsyncIterator<string>;
1266
1270
  function glob(
1267
- pattern: string | string[],
1268
- opt: GlobOptions,
1271
+ pattern: string | readonly string[],
1272
+ options: GlobOptions,
1269
1273
  ): NodeJS.AsyncIterator<Dirent | string>;
1270
1274
  }
1271
1275
  declare module "node:fs/promises" {
@@ -243,8 +243,8 @@ declare module "fs" {
243
243
  */
244
244
  name: Name;
245
245
  /**
246
- * The base path that this `fs.Dirent` object refers to.
247
- * @since v20.12.0
246
+ * The path to the parent directory of the file this `fs.Dirent` object refers to.
247
+ * @since v20.12.0, v18.20.0
248
248
  */
249
249
  parentPath: string;
250
250
  /**
@@ -328,6 +328,20 @@ declare module "fs" {
328
328
  * @since v12.12.0
329
329
  */
330
330
  readSync(): Dirent | null;
331
+ /**
332
+ * Calls `dir.close()` if the directory handle is open, and returns a promise that
333
+ * fulfills when disposal is complete.
334
+ * @since v22.17.0
335
+ * @experimental
336
+ */
337
+ [Symbol.asyncDispose](): Promise<void>;
338
+ /**
339
+ * Calls `dir.closeSync()` if the directory handle is open, and returns
340
+ * `undefined`.
341
+ * @since v22.17.0
342
+ * @experimental
343
+ */
344
+ [Symbol.dispose](): void;
331
345
  }
332
346
  /**
333
347
  * Class: fs.StatWatcher
@@ -3327,6 +3341,12 @@ declare module "fs" {
3327
3341
  persistent?: boolean | undefined;
3328
3342
  recursive?: boolean | undefined;
3329
3343
  }
3344
+ export interface WatchOptionsWithBufferEncoding extends WatchOptions {
3345
+ encoding: "buffer";
3346
+ }
3347
+ export interface WatchOptionsWithStringEncoding extends WatchOptions {
3348
+ encoding?: BufferEncoding | undefined;
3349
+ }
3330
3350
  export type WatchEventType = "rename" | "change";
3331
3351
  export type WatchListener<T> = (event: WatchEventType, filename: T | null) => void;
3332
3352
  export type StatsListener = (curr: Stats, prev: Stats) => void;
@@ -3353,44 +3373,20 @@ declare module "fs" {
3353
3373
  */
3354
3374
  export function watch(
3355
3375
  filename: PathLike,
3356
- options:
3357
- | (WatchOptions & {
3358
- encoding: "buffer";
3359
- })
3360
- | "buffer",
3361
- listener?: WatchListener<Buffer>,
3376
+ options?: WatchOptionsWithStringEncoding | BufferEncoding | null,
3377
+ listener?: WatchListener<string>,
3362
3378
  ): FSWatcher;
3363
- /**
3364
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
3365
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
3366
- * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
3367
- * If `encoding` is not supplied, the default of `'utf8'` is used.
3368
- * If `persistent` is not supplied, the default of `true` is used.
3369
- * If `recursive` is not supplied, the default of `false` is used.
3370
- */
3371
3379
  export function watch(
3372
3380
  filename: PathLike,
3373
- options?: WatchOptions | BufferEncoding | null,
3374
- listener?: WatchListener<string>,
3381
+ options: WatchOptionsWithBufferEncoding | "buffer",
3382
+ listener: WatchListener<Buffer>,
3375
3383
  ): FSWatcher;
3376
- /**
3377
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
3378
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
3379
- * @param options Either the encoding for the filename provided to the listener, or an object optionally specifying encoding, persistent, and recursive options.
3380
- * If `encoding` is not supplied, the default of `'utf8'` is used.
3381
- * If `persistent` is not supplied, the default of `true` is used.
3382
- * If `recursive` is not supplied, the default of `false` is used.
3383
- */
3384
3384
  export function watch(
3385
3385
  filename: PathLike,
3386
- options: WatchOptions | string,
3387
- listener?: WatchListener<string | Buffer>,
3386
+ options: WatchOptions | BufferEncoding | "buffer" | null,
3387
+ listener: WatchListener<string | Buffer>,
3388
3388
  ): FSWatcher;
3389
- /**
3390
- * Watch for changes on `filename`, where `filename` is either a file or a directory, returning an `FSWatcher`.
3391
- * @param filename A path to a file or directory. If a URL is provided, it must use the `file:` protocol.
3392
- */
3393
- export function watch(filename: PathLike, listener?: WatchListener<string>): FSWatcher;
3389
+ export function watch(filename: PathLike, listener: WatchListener<string>): FSWatcher;
3394
3390
  /**
3395
3391
  * Test whether or not the given path exists by checking with the file system.
3396
3392
  * Then call the `callback` argument with either true or false:
@@ -4200,7 +4196,6 @@ declare module "fs" {
4200
4196
  * blob.stream();
4201
4197
  * ```
4202
4198
  * @since v19.8.0
4203
- * @experimental
4204
4199
  */
4205
4200
  export function openAsBlob(path: PathLike, options?: OpenAsBlobOptions): Promise<Blob>;
4206
4201
 
@@ -4361,7 +4356,7 @@ declare module "fs" {
4361
4356
  * Current working directory.
4362
4357
  * @default process.cwd()
4363
4358
  */
4364
- cwd?: string | undefined;
4359
+ cwd?: string | URL | undefined;
4365
4360
  /**
4366
4361
  * `true` if the glob should return paths as `Dirent`s, `false` otherwise.
4367
4362
  * @default false
@@ -4386,13 +4381,23 @@ declare module "fs" {
4386
4381
 
4387
4382
  /**
4388
4383
  * Retrieves the files matching the specified pattern.
4384
+ *
4385
+ * ```js
4386
+ * import { glob } from 'node:fs';
4387
+ *
4388
+ * glob('*.js', (err, matches) => {
4389
+ * if (err) throw err;
4390
+ * console.log(matches);
4391
+ * });
4392
+ * ```
4393
+ * @since v22.0.0
4389
4394
  */
4390
4395
  export function glob(
4391
- pattern: string | string[],
4396
+ pattern: string | readonly string[],
4392
4397
  callback: (err: NodeJS.ErrnoException | null, matches: string[]) => void,
4393
4398
  ): void;
4394
4399
  export function glob(
4395
- pattern: string | string[],
4400
+ pattern: string | readonly string[],
4396
4401
  options: GlobOptionsWithFileTypes,
4397
4402
  callback: (
4398
4403
  err: NodeJS.ErrnoException | null,
@@ -4400,7 +4405,7 @@ declare module "fs" {
4400
4405
  ) => void,
4401
4406
  ): void;
4402
4407
  export function glob(
4403
- pattern: string | string[],
4408
+ pattern: string | readonly string[],
4404
4409
  options: GlobOptionsWithoutFileTypes,
4405
4410
  callback: (
4406
4411
  err: NodeJS.ErrnoException | null,
@@ -4408,7 +4413,7 @@ declare module "fs" {
4408
4413
  ) => void,
4409
4414
  ): void;
4410
4415
  export function glob(
4411
- pattern: string | string[],
4416
+ pattern: string | readonly string[],
4412
4417
  options: GlobOptions,
4413
4418
  callback: (
4414
4419
  err: NodeJS.ErrnoException | null,
@@ -4416,19 +4421,25 @@ declare module "fs" {
4416
4421
  ) => void,
4417
4422
  ): void;
4418
4423
  /**
4419
- * Retrieves the files matching the specified pattern.
4424
+ * ```js
4425
+ * import { globSync } from 'node:fs';
4426
+ *
4427
+ * console.log(globSync('*.js'));
4428
+ * ```
4429
+ * @since v22.0.0
4430
+ * @returns paths of files that match the pattern.
4420
4431
  */
4421
- export function globSync(pattern: string | string[]): string[];
4432
+ export function globSync(pattern: string | readonly string[]): string[];
4422
4433
  export function globSync(
4423
- pattern: string | string[],
4434
+ pattern: string | readonly string[],
4424
4435
  options: GlobOptionsWithFileTypes,
4425
4436
  ): Dirent[];
4426
4437
  export function globSync(
4427
- pattern: string | string[],
4438
+ pattern: string | readonly string[],
4428
4439
  options: GlobOptionsWithoutFileTypes,
4429
4440
  ): string[];
4430
4441
  export function globSync(
4431
- pattern: string | string[],
4442
+ pattern: string | readonly string[],
4432
4443
  options: GlobOptions,
4433
4444
  ): Dirent[] | string[];
4434
4445
  }