@chainlink/external-adapter-framework 2.11.0 → 2.11.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 (25) hide show
  1. package/config/index.js +1 -1
  2. package/generator-adapter/node_modules/.yarn-integrity +8 -8
  3. package/generator-adapter/node_modules/@types/node/README.md +1 -1
  4. package/generator-adapter/node_modules/@types/node/package.json +2 -2
  5. package/generator-adapter/node_modules/@types/node/process.d.ts +7 -0
  6. package/generator-adapter/node_modules/@yeoman/adapter/dist/queued-adapter.js +1 -3
  7. package/generator-adapter/node_modules/@yeoman/adapter/dist/queued-adapter.js.map +1 -1
  8. package/generator-adapter/node_modules/@yeoman/adapter/package.json +3 -3
  9. package/generator-adapter/node_modules/@yeoman/types/package.json +3 -3
  10. package/generator-adapter/node_modules/p-queue/dist/index.d.ts +181 -11
  11. package/generator-adapter/node_modules/p-queue/dist/index.js +366 -45
  12. package/generator-adapter/node_modules/p-queue/dist/options copy.d.ts +121 -0
  13. package/generator-adapter/node_modules/p-queue/dist/options copy.js +1 -0
  14. package/generator-adapter/node_modules/p-queue/dist/options.d.ts +26 -7
  15. package/generator-adapter/node_modules/p-queue/dist/priority-queue.d.ts +1 -0
  16. package/generator-adapter/node_modules/p-queue/dist/priority-queue.js +12 -6
  17. package/generator-adapter/node_modules/p-queue/dist/queue.d.ts +1 -0
  18. package/generator-adapter/node_modules/p-queue/package.json +19 -27
  19. package/generator-adapter/node_modules/p-queue/readme.md +541 -19
  20. package/generator-adapter/node_modules/p-timeout/index.d.ts +2 -4
  21. package/generator-adapter/node_modules/p-timeout/index.js +23 -50
  22. package/generator-adapter/node_modules/p-timeout/package.json +11 -9
  23. package/generator-adapter/node_modules/p-timeout/readme.md +11 -9
  24. package/generator-adapter/package.json +3 -3
  25. package/package.json +6 -6
package/config/index.js CHANGED
@@ -48,7 +48,7 @@ exports.BaseSettingsDefinition = {
48
48
  type: 'number',
49
49
  description: 'The maximum number of items that remain in the cache',
50
50
  default: 10000,
51
- validate: utils_1.validator.integer({ min: 1000, max: 10000 }),
51
+ validate: utils_1.validator.integer({ min: 1000, max: 50000 }),
52
52
  },
53
53
  CACHE_REDIS_CONNECTION_TIMEOUT: {
54
54
  description: 'Connection timeout for redis client',
@@ -6,9 +6,9 @@
6
6
  "flags": [],
7
7
  "linkedModules": [],
8
8
  "topLevelPatterns": [
9
- "@types/node@24.10.0",
10
- "@yeoman/adapter@3.1.0",
11
- "@yeoman/types@1.8.0",
9
+ "@types/node@24.10.1",
10
+ "@yeoman/adapter@3.1.1",
11
+ "@yeoman/types@1.9.1",
12
12
  "mem-fs@4.1.2",
13
13
  "yeoman-generator@7.5.1"
14
14
  ],
@@ -60,14 +60,14 @@
60
60
  "@types/lodash-es@^4.17.9": "https://registry.yarnpkg.com/@types/lodash-es/-/lodash-es-4.17.12.tgz#65f6d1e5f80539aa7cfbfc962de5def0cf4f341b",
61
61
  "@types/lodash@*": "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.13.tgz#786e2d67cfd95e32862143abe7463a7f90c300eb",
62
62
  "@types/node@*": "https://registry.yarnpkg.com/@types/node/-/node-22.10.1.tgz#41ffeee127b8975a05f8c4f83fb89bcb2987d766",
63
- "@types/node@24.10.0": "https://registry.yarnpkg.com/@types/node/-/node-24.10.0.tgz#6b79086b0dfc54e775a34ba8114dcc4e0221f31f",
63
+ "@types/node@24.10.1": "https://registry.yarnpkg.com/@types/node/-/node-24.10.1.tgz#91e92182c93db8bd6224fca031e2370cef9a8f01",
64
64
  "@types/node@>=18": "https://registry.yarnpkg.com/@types/node/-/node-22.10.1.tgz#41ffeee127b8975a05f8c4f83fb89bcb2987d766",
65
65
  "@types/normalize-package-data@^2.4.3": "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901",
66
66
  "@types/vinyl@^2.0.7": "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.12.tgz#17642ca9a8ae10f3db018e9f885da4188db4c6e6",
67
67
  "@types/vinyl@^2.0.8": "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.12.tgz#17642ca9a8ae10f3db018e9f885da4188db4c6e6",
68
- "@yeoman/adapter@3.1.0": "https://registry.yarnpkg.com/@yeoman/adapter/-/adapter-3.1.0.tgz#036821c1dcf5e3e399cabbcba6b683c8ea4a6c0d",
68
+ "@yeoman/adapter@3.1.1": "https://registry.yarnpkg.com/@yeoman/adapter/-/adapter-3.1.1.tgz#1ba3a3c5b82fe52bc00d9fe595be8458cfc895d4",
69
69
  "@yeoman/namespace@^1.0.0": "https://registry.yarnpkg.com/@yeoman/namespace/-/namespace-1.0.1.tgz#8034277c4a62bdf41e05e2d890bc674bc320eb99",
70
- "@yeoman/types@1.8.0": "https://registry.yarnpkg.com/@yeoman/types/-/types-1.8.0.tgz#122ff50a1b966221f5652bcee7e91610e57dfd2c",
70
+ "@yeoman/types@1.9.1": "https://registry.yarnpkg.com/@yeoman/types/-/types-1.9.1.tgz#7752af2c0e3a4cdbbc98840235a56cb36da25259",
71
71
  "ansi-escapes@^4.3.2": "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e",
72
72
  "ansi-regex@^5.0.1": "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304",
73
73
  "ansi-regex@^6.0.1": "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-6.1.0.tgz#95ec409c69619d6cb1b8b34f14b660ef28ebd654",
@@ -174,8 +174,8 @@
174
174
  "onetime@^7.0.0": "https://registry.yarnpkg.com/onetime/-/onetime-7.0.0.tgz#9f16c92d8c9ef5120e3acd9dd9957cceecc1ab60",
175
175
  "ora@^9.0.0": "https://registry.yarnpkg.com/ora/-/ora-9.0.0.tgz#945236f5ce78a024cf4c25df6c46ecd09ab6e685",
176
176
  "os-tmpdir@~1.0.2": "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274",
177
- "p-queue@^8.0.1": "https://registry.yarnpkg.com/p-queue/-/p-queue-8.0.1.tgz#718b7f83836922ef213ddec263ff4223ce70bef8",
178
- "p-timeout@^6.1.2": "https://registry.yarnpkg.com/p-timeout/-/p-timeout-6.1.3.tgz#9635160c4e10c7b4c3db45b7d5d26f911d9fd853",
177
+ "p-queue@^9.0.0": "https://registry.yarnpkg.com/p-queue/-/p-queue-9.0.1.tgz#a9d4aaaf0251473615db14424be48e055f3e1db0",
178
+ "p-timeout@^7.0.0": "https://registry.yarnpkg.com/p-timeout/-/p-timeout-7.0.1.tgz#95680a6aa693c530f14ac337b8bd32d4ec6ae4f0",
179
179
  "package-json@^10.0.0": "https://registry.yarnpkg.com/package-json/-/package-json-10.0.1.tgz#e49ee07b8de63b638e7f1b5bb353733e428fe7d7",
180
180
  "parse-json@^8.0.0": "https://registry.yarnpkg.com/parse-json/-/parse-json-8.1.0.tgz#91cdc7728004e955af9cb734de5684733b24a717",
181
181
  "path-key@^3.1.0": "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375",
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 03 Nov 2025 01:29:59 GMT
11
+ * Last updated: Tue, 11 Nov 2025 23:33:13 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "24.10.0",
3
+ "version": "24.10.1",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -150,6 +150,6 @@
150
150
  "undici-types": "~7.16.0"
151
151
  },
152
152
  "peerDependencies": {},
153
- "typesPublisherContentHash": "520eb7d36290a7656940213fbf34026408b9af9ff538455bf669b4ea7a21d5bf",
153
+ "typesPublisherContentHash": "bf541e42e173a984f57b649839d3371001c98469b0e8944f7762074aed2acd2f",
154
154
  "typeScriptVersion": "5.2"
155
155
  }
@@ -1969,6 +1969,7 @@ declare module "process" {
1969
1969
  addListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1970
1970
  addListener(event: "warning", listener: WarningListener): this;
1971
1971
  addListener(event: "message", listener: MessageListener): this;
1972
+ addListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
1972
1973
  addListener(event: Signals, listener: SignalsListener): this;
1973
1974
  addListener(event: "multipleResolves", listener: MultipleResolveListener): this;
1974
1975
  addListener(event: "worker", listener: WorkerListener): this;
@@ -1981,6 +1982,7 @@ declare module "process" {
1981
1982
  emit(event: "unhandledRejection", reason: unknown, promise: Promise<unknown>): boolean;
1982
1983
  emit(event: "warning", warning: Error): boolean;
1983
1984
  emit(event: "message", message: unknown, sendHandle: SendHandle): this;
1985
+ emit(event: "workerMessage", value: any, source: number): this;
1984
1986
  emit(event: Signals, signal?: Signals): boolean;
1985
1987
  emit(
1986
1988
  event: "multipleResolves",
@@ -1998,6 +2000,7 @@ declare module "process" {
1998
2000
  on(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
1999
2001
  on(event: "warning", listener: WarningListener): this;
2000
2002
  on(event: "message", listener: MessageListener): this;
2003
+ on(event: "workerMessage", listener: (value: any, source: number) => void): this;
2001
2004
  on(event: Signals, listener: SignalsListener): this;
2002
2005
  on(event: "multipleResolves", listener: MultipleResolveListener): this;
2003
2006
  on(event: "worker", listener: WorkerListener): this;
@@ -2011,6 +2014,7 @@ declare module "process" {
2011
2014
  once(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2012
2015
  once(event: "warning", listener: WarningListener): this;
2013
2016
  once(event: "message", listener: MessageListener): this;
2017
+ once(event: "workerMessage", listener: (value: any, source: number) => void): this;
2014
2018
  once(event: Signals, listener: SignalsListener): this;
2015
2019
  once(event: "multipleResolves", listener: MultipleResolveListener): this;
2016
2020
  once(event: "worker", listener: WorkerListener): this;
@@ -2024,6 +2028,7 @@ declare module "process" {
2024
2028
  prependListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2025
2029
  prependListener(event: "warning", listener: WarningListener): this;
2026
2030
  prependListener(event: "message", listener: MessageListener): this;
2031
+ prependListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2027
2032
  prependListener(event: Signals, listener: SignalsListener): this;
2028
2033
  prependListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2029
2034
  prependListener(event: "worker", listener: WorkerListener): this;
@@ -2036,6 +2041,7 @@ declare module "process" {
2036
2041
  prependOnceListener(event: "unhandledRejection", listener: UnhandledRejectionListener): this;
2037
2042
  prependOnceListener(event: "warning", listener: WarningListener): this;
2038
2043
  prependOnceListener(event: "message", listener: MessageListener): this;
2044
+ prependOnceListener(event: "workerMessage", listener: (value: any, source: number) => void): this;
2039
2045
  prependOnceListener(event: Signals, listener: SignalsListener): this;
2040
2046
  prependOnceListener(event: "multipleResolves", listener: MultipleResolveListener): this;
2041
2047
  prependOnceListener(event: "worker", listener: WorkerListener): this;
@@ -2048,6 +2054,7 @@ declare module "process" {
2048
2054
  listeners(event: "unhandledRejection"): UnhandledRejectionListener[];
2049
2055
  listeners(event: "warning"): WarningListener[];
2050
2056
  listeners(event: "message"): MessageListener[];
2057
+ listeners(event: "workerMessage"): ((value: any, source: number) => void)[];
2051
2058
  listeners(event: Signals): SignalsListener[];
2052
2059
  listeners(event: "multipleResolves"): MultipleResolveListener[];
2053
2060
  listeners(event: "worker"): WorkerListener[];
@@ -78,7 +78,6 @@ export class QueuedAdapter {
78
78
  async prompt(questions, initialAnswers) {
79
79
  return this.#queue.add(async () => this.actualAdapter.prompt(questions, initialAnswers), {
80
80
  priority: PROMPT_PRIORITY + this.delta,
81
- throwOnTimeout: true,
82
81
  signal: this.signal,
83
82
  });
84
83
  }
@@ -93,7 +92,6 @@ export class QueuedAdapter {
93
92
  async queue(function_) {
94
93
  return this.#queue.add(() => function_(this.actualAdapter), {
95
94
  priority: BLOCKING_PRIORITY + this.delta,
96
- throwOnTimeout: true,
97
95
  signal: this.signal,
98
96
  });
99
97
  }
@@ -103,7 +101,7 @@ export class QueuedAdapter {
103
101
  * @returns
104
102
  */
105
103
  async queueLog(function_) {
106
- return this.#queue.add(() => function_(this.actualAdapter), { priority: LOG_PRIORITY + this.delta, throwOnTimeout: true });
104
+ return this.#queue.add(() => function_(this.actualAdapter), { priority: LOG_PRIORITY + this.delta });
107
105
  }
108
106
  /**
109
107
  * Progress is blocking, but will be skipped if the queue is not empty.
@@ -1 +1 @@
1
- {"version":3,"file":"queued-adapter.js","sourceRoot":"","sources":["../src/queued-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,GAAiB,MAAM,KAAK,CAAC;AACpC,OAAO,MAAM,MAAM,SAAS,CAAC;AAU7B,OAAO,EAAE,eAAe,EAA+B,MAAM,cAAc,CAAC;AAI5E,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAC7B,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,MAAM,qBAAqB,GAAG,IAAI,CAAC;AAYnC,MAAM,OAAO,aAAa;IACxB,MAAM,CAAS;IACf,aAAa,CAAqB;IAClC,KAAK,CAAS;IACd,GAAG,CAAS;IACZ,kBAAkB,CAAS;IAC3B,IAAI,CAAM;IACV,SAAS,CAAiC;IACjC,MAAM,CAAc;IAE7B;;;;;;;;OAQG;IACH,YAAY,OAA8B;QACxC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,cAAc,EAAE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AC,OAAO,EAAE,IAAI,CAAC,CAAC;aAClC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeoman/adapter",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "private": false,
5
5
  "description": "Input Output adapter for yeoman's generator/environment stack",
6
6
  "keywords": [
@@ -45,7 +45,7 @@
45
45
  "inquirer": "^12.0.0",
46
46
  "log-symbols": "^7.0.0",
47
47
  "ora": "^9.0.0",
48
- "p-queue": "^8.0.1",
48
+ "p-queue": "^9.0.0",
49
49
  "text-table": "^0.2.0"
50
50
  },
51
51
  "devDependencies": {
@@ -60,5 +60,5 @@
60
60
  "access": "public",
61
61
  "registry": "https://registry.npmjs.org/"
62
62
  },
63
- "gitHead": "543f0ff807df6e8969fcec27d996dcd6a4f975aa"
63
+ "gitHead": "b4772c9280ef72d5e26dd244b892c6e09ef82e56"
64
64
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeoman/types",
3
- "version": "1.8.0",
3
+ "version": "1.9.1",
4
4
  "private": false,
5
5
  "description": "Common API for yeoman's generator/environment stack",
6
6
  "keywords": [
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@types/node": ">=16.18.26",
35
- "@yeoman/adapter": "^1.6.0 || ^2.0.0-beta.0 || ^3.0.0",
35
+ "@yeoman/adapter": "^1.6.0 || ^2.0.0-beta.0 || ^3.0.0 || ^4.0.0",
36
36
  "mem-fs": "^3.0.0 || ^4.0.0-beta.1",
37
37
  "mem-fs-editor": "^10.0.2 || >=10.0.2"
38
38
  },
@@ -54,5 +54,5 @@
54
54
  "access": "public",
55
55
  "registry": "https://registry.npmjs.org/"
56
56
  },
57
- "gitHead": "c29335cbc7b242990164375574220e9ba61c7d14"
57
+ "gitHead": "3ad74f9fc8d3014757b50fdc10426403b2cbec96"
58
58
  }
@@ -3,37 +3,78 @@ import { type Queue, type RunFunction } from './queue.js';
3
3
  import PriorityQueue from './priority-queue.js';
4
4
  import { type QueueAddOptions, type Options, type TaskOptions } from './options.js';
5
5
  type Task<TaskResultType> = ((options: TaskOptions) => PromiseLike<TaskResultType>) | ((options: TaskOptions) => TaskResultType);
6
- type EventName = 'active' | 'idle' | 'empty' | 'add' | 'next' | 'completed' | 'error';
6
+ type EventName = 'active' | 'idle' | 'empty' | 'add' | 'next' | 'completed' | 'error' | 'pendingZero' | 'rateLimit' | 'rateLimitCleared';
7
7
  /**
8
8
  Promise queue with concurrency control.
9
9
  */
10
10
  export default class PQueue<QueueType extends Queue<RunFunction, EnqueueOptionsType> = PriorityQueue, EnqueueOptionsType extends QueueAddOptions = QueueAddOptions> extends EventEmitter<EventName> {
11
11
  #private;
12
12
  /**
13
- Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
13
+ Get or set the default timeout for all tasks. Can be changed at runtime.
14
14
 
15
- Applies to each future operation.
15
+ Operations will throw a `TimeoutError` if they don't complete within the specified time.
16
+
17
+ The timeout begins when the operation is dequeued and starts execution, not while it's waiting in the queue.
18
+
19
+ @example
20
+ ```
21
+ const queue = new PQueue({timeout: 5000});
22
+
23
+ // Change timeout for all future tasks
24
+ queue.timeout = 10000;
25
+ ```
16
26
  */
17
27
  timeout?: number;
18
28
  constructor(options?: Options<QueueType, EnqueueOptionsType>);
19
29
  get concurrency(): number;
20
30
  set concurrency(newConcurrency: number);
21
31
  /**
32
+ Updates the priority of a promise function by its id, affecting its execution order. Requires a defined concurrency limit to take effect.
33
+
34
+ For example, this can be used to prioritize a promise function to run earlier.
35
+
36
+ ```js
37
+ import PQueue from 'p-queue';
38
+
39
+ const queue = new PQueue({concurrency: 1});
40
+
41
+ queue.add(async () => '🦄', {priority: 1});
42
+ queue.add(async () => '🦀', {priority: 0, id: '🦀'});
43
+ queue.add(async () => '🦄', {priority: 1});
44
+ queue.add(async () => '🦄', {priority: 1});
45
+
46
+ queue.setPriority('🦀', 2);
47
+ ```
48
+
49
+ In this case, the promise function with `id: '🦀'` runs second.
50
+
51
+ You can also deprioritize a promise function to delay its execution:
52
+
53
+ ```js
54
+ import PQueue from 'p-queue';
55
+
56
+ const queue = new PQueue({concurrency: 1});
57
+
58
+ queue.add(async () => '🦄', {priority: 1});
59
+ queue.add(async () => '🦀', {priority: 1, id: '🦀'});
60
+ queue.add(async () => '🦄');
61
+ queue.add(async () => '🦄', {priority: 0});
62
+
63
+ queue.setPriority('🦀', -1);
64
+ ```
65
+ Here, the promise function with `id: '🦀'` executes last.
66
+ */
67
+ setPriority(id: string, priority: number): void;
68
+ /**
22
69
  Adds a sync or async task to the queue. Always returns a promise.
23
70
  */
24
- add<TaskResultType>(function_: Task<TaskResultType>, options: {
25
- throwOnTimeout: true;
26
- } & Exclude<EnqueueOptionsType, 'throwOnTimeout'>): Promise<TaskResultType>;
27
- add<TaskResultType>(function_: Task<TaskResultType>, options?: Partial<EnqueueOptionsType>): Promise<TaskResultType | void>;
71
+ add<TaskResultType>(function_: Task<TaskResultType>, options?: Partial<EnqueueOptionsType>): Promise<TaskResultType>;
28
72
  /**
29
73
  Same as `.add()`, but accepts an array of sync or async functions.
30
74
 
31
75
  @returns A promise that resolves when all functions are resolved.
32
76
  */
33
- addAll<TaskResultsType>(functions: ReadonlyArray<Task<TaskResultsType>>, options?: {
34
- throwOnTimeout: true;
35
- } & Partial<Exclude<EnqueueOptionsType, 'throwOnTimeout'>>): Promise<TaskResultsType[]>;
36
- addAll<TaskResultsType>(functions: ReadonlyArray<Task<TaskResultsType>>, options?: Partial<EnqueueOptionsType>): Promise<Array<TaskResultsType | void>>;
77
+ addAll<TaskResultsType>(functions: ReadonlyArray<Task<TaskResultsType>>, options?: Partial<EnqueueOptionsType>): Promise<TaskResultsType[]>;
37
78
  /**
38
79
  Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via `options.autoStart = false` or by `.pause()` method.)
39
80
  */
@@ -67,6 +108,50 @@ export default class PQueue<QueueType extends Queue<RunFunction, EnqueueOptionsT
67
108
  */
68
109
  onIdle(): Promise<void>;
69
110
  /**
111
+ The difference with `.onIdle` is that `.onPendingZero` only waits for currently running tasks to finish, ignoring queued tasks.
112
+
113
+ @returns A promise that settles when all currently running tasks have completed; `queue.pending === 0`.
114
+ */
115
+ onPendingZero(): Promise<void>;
116
+ /**
117
+ @returns A promise that settles when the queue becomes rate-limited due to intervalCap.
118
+ */
119
+ onRateLimit(): Promise<void>;
120
+ /**
121
+ @returns A promise that settles when the queue is no longer rate-limited.
122
+ */
123
+ onRateLimitCleared(): Promise<void>;
124
+ /**
125
+ @returns A promise that rejects when any task in the queue errors.
126
+
127
+ Use with `Promise.race([queue.onError(), queue.onIdle()])` to fail fast on the first error while still resolving normally when the queue goes idle.
128
+
129
+ Important: The promise returned by `add()` still rejects. You must handle each `add()` promise (for example, `.catch(() => {})`) to avoid unhandled rejections.
130
+
131
+ @example
132
+ ```
133
+ import PQueue from 'p-queue';
134
+
135
+ const queue = new PQueue({concurrency: 2});
136
+
137
+ queue.add(() => fetchData(1)).catch(() => {});
138
+ queue.add(() => fetchData(2)).catch(() => {});
139
+ queue.add(() => fetchData(3)).catch(() => {});
140
+
141
+ // Stop processing on first error
142
+ try {
143
+ await Promise.race([
144
+ queue.onError(),
145
+ queue.onIdle()
146
+ ]);
147
+ } catch (error) {
148
+ queue.pause(); // Stop processing remaining tasks
149
+ console.error('Queue failed:', error);
150
+ }
151
+ ```
152
+ */
153
+ onError(): Promise<never>;
154
+ /**
70
155
  Size of the queue, the number of queued items waiting to run.
71
156
  */
72
157
  get size(): number;
@@ -84,6 +169,91 @@ export default class PQueue<QueueType extends Queue<RunFunction, EnqueueOptionsT
84
169
  Whether the queue is currently paused.
85
170
  */
86
171
  get isPaused(): boolean;
172
+ /**
173
+ Whether the queue is currently rate-limited due to intervalCap.
174
+ */
175
+ get isRateLimited(): boolean;
176
+ /**
177
+ Whether the queue is saturated. Returns `true` when:
178
+ - All concurrency slots are occupied and tasks are waiting, OR
179
+ - The queue is rate-limited and tasks are waiting
180
+
181
+ Useful for detecting backpressure and potential hanging tasks.
182
+
183
+ ```js
184
+ import PQueue from 'p-queue';
185
+
186
+ const queue = new PQueue({concurrency: 2});
187
+
188
+ // Backpressure handling
189
+ if (queue.isSaturated) {
190
+ console.log('Queue is saturated, waiting for capacity...');
191
+ await queue.onSizeLessThan(queue.concurrency);
192
+ }
193
+
194
+ // Monitoring for stuck tasks
195
+ setInterval(() => {
196
+ if (queue.isSaturated) {
197
+ console.warn(`Queue saturated: ${queue.pending} running, ${queue.size} waiting`);
198
+ }
199
+ }, 60000);
200
+ ```
201
+ */
202
+ get isSaturated(): boolean;
203
+ /**
204
+ The tasks currently being executed. Each task includes its `id`, `priority`, `startTime`, and `timeout` (if set).
205
+
206
+ Returns an array of task info objects.
207
+
208
+ ```js
209
+ import PQueue from 'p-queue';
210
+
211
+ const queue = new PQueue({concurrency: 2});
212
+
213
+ // Add tasks with IDs for better debugging
214
+ queue.add(() => fetchUser(123), {id: 'user-123'});
215
+ queue.add(() => fetchPosts(456), {id: 'posts-456', priority: 1});
216
+
217
+ // Check what's running
218
+ console.log(queue.runningTasks);
219
+ // => [{
220
+ // id: 'user-123',
221
+ // priority: 0,
222
+ // startTime: 1759253001716,
223
+ // timeout: undefined
224
+ // }, {
225
+ // id: 'posts-456',
226
+ // priority: 1,
227
+ // startTime: 1759253001916,
228
+ // timeout: undefined
229
+ // }]
230
+ ```
231
+ */
232
+ get runningTasks(): ReadonlyArray<{
233
+ readonly id?: string;
234
+ readonly priority: number;
235
+ readonly startTime: number;
236
+ readonly timeout?: number;
237
+ }>;
87
238
  }
88
239
  export type { Queue } from './queue.js';
89
240
  export { type QueueAddOptions, type Options } from './options.js';
241
+ /**
242
+ Error thrown when a task times out.
243
+
244
+ @example
245
+ ```
246
+ import PQueue, {TimeoutError} from 'p-queue';
247
+
248
+ const queue = new PQueue({timeout: 1000});
249
+
250
+ try {
251
+ await queue.add(() => someTask());
252
+ } catch (error) {
253
+ if (error instanceof TimeoutError) {
254
+ console.log('Task timed out');
255
+ }
256
+ }
257
+ ```
258
+ */
259
+ export { TimeoutError } from 'p-timeout';