@kubb/core 2.19.4 → 2.19.6

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 (41) hide show
  1. package/dist/{chunk-FRT5NM5I.js → chunk-5JZNFPUP.js} +13 -15
  2. package/dist/{chunk-FRT5NM5I.js.map → chunk-5JZNFPUP.js.map} +1 -1
  3. package/dist/{chunk-7UMWFPXG.js → chunk-6D7EFD2R.js} +2 -2
  4. package/dist/{chunk-4QO27EB2.cjs → chunk-ESX7D52D.cjs} +174 -216
  5. package/dist/chunk-ESX7D52D.cjs.map +1 -0
  6. package/dist/{chunk-PNAWM6V2.cjs → chunk-FVW4VDVD.cjs} +5 -5
  7. package/dist/chunk-HMLY7DHA.js +16 -0
  8. package/dist/{chunk-JA6UN4AZ.cjs → chunk-OCFABH5L.cjs} +30 -32
  9. package/dist/chunk-OCFABH5L.cjs.map +1 -0
  10. package/dist/{chunk-WQ7GB7MO.cjs → chunk-Q7VRQ7E7.cjs} +12 -12
  11. package/dist/{chunk-EPAC7V2R.js → chunk-SV4UDYSR.js} +16 -18
  12. package/dist/{chunk-EPAC7V2R.js.map → chunk-SV4UDYSR.js.map} +1 -1
  13. package/dist/{chunk-CCA5OKGM.cjs → chunk-WSIG7TWQ.cjs} +19 -19
  14. package/dist/chunk-WSIG7TWQ.cjs.map +1 -0
  15. package/dist/{chunk-UCKFXEKM.js → chunk-XC6QIAQL.js} +2 -2
  16. package/dist/{chunk-UCKFXEKM.js.map → chunk-XC6QIAQL.js.map} +1 -1
  17. package/dist/{chunk-4DTSZ2MS.cjs → chunk-ZG4WVJOZ.cjs} +13 -30
  18. package/dist/chunk-ZG4WVJOZ.cjs.map +1 -0
  19. package/dist/index.cjs +150 -160
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.js +51 -61
  22. package/dist/index.js.map +1 -1
  23. package/dist/logger.cjs +3 -3
  24. package/dist/logger.js +2 -2
  25. package/dist/mocks.cjs +8 -8
  26. package/dist/mocks.js +4 -4
  27. package/dist/transformers.cjs +4 -4
  28. package/dist/transformers.js +2 -2
  29. package/dist/utils.cjs +4 -4
  30. package/dist/utils.js +2 -2
  31. package/package.json +10 -10
  32. package/src/transformers/stringify.ts +1 -1
  33. package/dist/chunk-4DTSZ2MS.cjs.map +0 -1
  34. package/dist/chunk-4QO27EB2.cjs.map +0 -1
  35. package/dist/chunk-CCA5OKGM.cjs.map +0 -1
  36. package/dist/chunk-JA6UN4AZ.cjs.map +0 -1
  37. package/dist/chunk-Z4BLTVTB.js +0 -30
  38. /package/dist/{chunk-7UMWFPXG.js.map → chunk-6D7EFD2R.js.map} +0 -0
  39. /package/dist/{chunk-PNAWM6V2.cjs.map → chunk-FVW4VDVD.cjs.map} +0 -0
  40. /package/dist/{chunk-Z4BLTVTB.js.map → chunk-HMLY7DHA.js.map} +0 -0
  41. /package/dist/{chunk-WQ7GB7MO.cjs.map → chunk-Q7VRQ7E7.cjs.map} +0 -0
@@ -2,13 +2,13 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkCCA5OKGMcjs = require('./chunk-CCA5OKGM.cjs');
5
+ var _chunkWSIG7TWQcjs = require('./chunk-WSIG7TWQ.cjs');
6
6
 
7
7
 
8
- var _chunkJA6UN4AZcjs = require('./chunk-JA6UN4AZ.cjs');
8
+ var _chunkOCFABH5Lcjs = require('./chunk-OCFABH5L.cjs');
9
9
 
10
10
 
11
- var _chunkPNAWM6V2cjs = require('./chunk-PNAWM6V2.cjs');
11
+ var _chunkFVW4VDVDcjs = require('./chunk-FVW4VDVD.cjs');
12
12
 
13
13
 
14
14
 
@@ -19,21 +19,20 @@ var _chunkPNAWM6V2cjs = require('./chunk-PNAWM6V2.cjs');
19
19
 
20
20
 
21
21
 
22
- var _chunk4DTSZ2MScjs = require('./chunk-4DTSZ2MS.cjs');
22
+ var _chunkZG4WVJOZcjs = require('./chunk-ZG4WVJOZ.cjs');
23
23
 
24
24
  // ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js
25
- var require_eventemitter3 = _chunk4DTSZ2MScjs.__commonJS.call(void 0, {
25
+ var require_eventemitter3 = _chunkZG4WVJOZcjs.__commonJS.call(void 0, {
26
26
  "../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js"(exports, module) {
27
27
  "use strict";
28
- _chunk4DTSZ2MScjs.init_cjs_shims.call(void 0, );
28
+ _chunkZG4WVJOZcjs.init_cjs_shims.call(void 0, );
29
29
  var has = Object.prototype.hasOwnProperty;
30
30
  var prefix = "~";
31
31
  function Events() {
32
32
  }
33
33
  if (Object.create) {
34
34
  Events.prototype = /* @__PURE__ */ Object.create(null);
35
- if (!new Events().__proto__)
36
- prefix = false;
35
+ if (!new Events().__proto__) prefix = false;
37
36
  }
38
37
  function EE(fn, context, once) {
39
38
  this.fn = fn;
@@ -45,19 +44,14 @@ var require_eventemitter3 = _chunk4DTSZ2MScjs.__commonJS.call(void 0, {
45
44
  throw new TypeError("The listener must be a function");
46
45
  }
47
46
  var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;
48
- if (!emitter._events[evt])
49
- emitter._events[evt] = listener, emitter._eventsCount++;
50
- else if (!emitter._events[evt].fn)
51
- emitter._events[evt].push(listener);
52
- else
53
- emitter._events[evt] = [emitter._events[evt], listener];
47
+ if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;
48
+ else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);
49
+ else emitter._events[evt] = [emitter._events[evt], listener];
54
50
  return emitter;
55
51
  }
56
52
  function clearEvent(emitter, evt) {
57
- if (--emitter._eventsCount === 0)
58
- emitter._events = new Events();
59
- else
60
- delete emitter._events[evt];
53
+ if (--emitter._eventsCount === 0) emitter._events = new Events();
54
+ else delete emitter._events[evt];
61
55
  }
62
56
  function EventEmitter2() {
63
57
  this._events = new Events();
@@ -65,11 +59,9 @@ var require_eventemitter3 = _chunk4DTSZ2MScjs.__commonJS.call(void 0, {
65
59
  }
66
60
  EventEmitter2.prototype.eventNames = function eventNames() {
67
61
  var names = [], events, name;
68
- if (this._eventsCount === 0)
69
- return names;
62
+ if (this._eventsCount === 0) return names;
70
63
  for (name in events = this._events) {
71
- if (has.call(events, name))
72
- names.push(prefix ? name.slice(1) : name);
64
+ if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);
73
65
  }
74
66
  if (Object.getOwnPropertySymbols) {
75
67
  return names.concat(Object.getOwnPropertySymbols(events));
@@ -78,10 +70,8 @@ var require_eventemitter3 = _chunk4DTSZ2MScjs.__commonJS.call(void 0, {
78
70
  };
79
71
  EventEmitter2.prototype.listeners = function listeners(event) {
80
72
  var evt = prefix ? prefix + event : event, handlers = this._events[evt];
81
- if (!handlers)
82
- return [];
83
- if (handlers.fn)
84
- return [handlers.fn];
73
+ if (!handlers) return [];
74
+ if (handlers.fn) return [handlers.fn];
85
75
  for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {
86
76
  ee[i] = handlers[i].fn;
87
77
  }
@@ -89,20 +79,16 @@ var require_eventemitter3 = _chunk4DTSZ2MScjs.__commonJS.call(void 0, {
89
79
  };
90
80
  EventEmitter2.prototype.listenerCount = function listenerCount(event) {
91
81
  var evt = prefix ? prefix + event : event, listeners = this._events[evt];
92
- if (!listeners)
93
- return 0;
94
- if (listeners.fn)
95
- return 1;
82
+ if (!listeners) return 0;
83
+ if (listeners.fn) return 1;
96
84
  return listeners.length;
97
85
  };
98
86
  EventEmitter2.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {
99
87
  var evt = prefix ? prefix + event : event;
100
- if (!this._events[evt])
101
- return false;
88
+ if (!this._events[evt]) return false;
102
89
  var listeners = this._events[evt], len = arguments.length, args, i;
103
90
  if (listeners.fn) {
104
- if (listeners.once)
105
- this.removeListener(event, listeners.fn, void 0, true);
91
+ if (listeners.once) this.removeListener(event, listeners.fn, void 0, true);
106
92
  switch (len) {
107
93
  case 1:
108
94
  return listeners.fn.call(listeners.context), true;
@@ -124,8 +110,7 @@ var require_eventemitter3 = _chunk4DTSZ2MScjs.__commonJS.call(void 0, {
124
110
  } else {
125
111
  var length = listeners.length, j;
126
112
  for (i = 0; i < length; i++) {
127
- if (listeners[i].once)
128
- this.removeListener(event, listeners[i].fn, void 0, true);
113
+ if (listeners[i].once) this.removeListener(event, listeners[i].fn, void 0, true);
129
114
  switch (len) {
130
115
  case 1:
131
116
  listeners[i].fn.call(listeners[i].context);
@@ -140,10 +125,9 @@ var require_eventemitter3 = _chunk4DTSZ2MScjs.__commonJS.call(void 0, {
140
125
  listeners[i].fn.call(listeners[i].context, a1, a2, a3);
141
126
  break;
142
127
  default:
143
- if (!args)
144
- for (j = 1, args = new Array(len - 1); j < len; j++) {
145
- args[j - 1] = arguments[j];
146
- }
128
+ if (!args) for (j = 1, args = new Array(len - 1); j < len; j++) {
129
+ args[j - 1] = arguments[j];
130
+ }
147
131
  listeners[i].fn.apply(listeners[i].context, args);
148
132
  }
149
133
  }
@@ -158,8 +142,7 @@ var require_eventemitter3 = _chunk4DTSZ2MScjs.__commonJS.call(void 0, {
158
142
  };
159
143
  EventEmitter2.prototype.removeListener = function removeListener(event, fn, context, once) {
160
144
  var evt = prefix ? prefix + event : event;
161
- if (!this._events[evt])
162
- return this;
145
+ if (!this._events[evt]) return this;
163
146
  if (!fn) {
164
147
  clearEvent(this, evt);
165
148
  return this;
@@ -175,10 +158,8 @@ var require_eventemitter3 = _chunk4DTSZ2MScjs.__commonJS.call(void 0, {
175
158
  events.push(listeners[i]);
176
159
  }
177
160
  }
178
- if (events.length)
179
- this._events[evt] = events.length === 1 ? events[0] : events;
180
- else
181
- clearEvent(this, evt);
161
+ if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;
162
+ else clearEvent(this, evt);
182
163
  }
183
164
  return this;
184
165
  };
@@ -186,8 +167,7 @@ var require_eventemitter3 = _chunk4DTSZ2MScjs.__commonJS.call(void 0, {
186
167
  var evt;
187
168
  if (event) {
188
169
  evt = prefix ? prefix + event : event;
189
- if (this._events[evt])
190
- clearEvent(this, evt);
170
+ if (this._events[evt]) clearEvent(this, evt);
191
171
  } else {
192
172
  this._events = new Events();
193
173
  this._eventsCount = 0;
@@ -205,19 +185,19 @@ var require_eventemitter3 = _chunk4DTSZ2MScjs.__commonJS.call(void 0, {
205
185
  });
206
186
 
207
187
  // src/FileManager.ts
208
- _chunk4DTSZ2MScjs.init_cjs_shims.call(void 0, );
188
+ _chunkZG4WVJOZcjs.init_cjs_shims.call(void 0, );
209
189
  var _crypto = require('crypto'); var _crypto2 = _interopRequireDefault(_crypto);
210
190
  var _path = require('path'); var _path2 = _interopRequireDefault(_path);
211
191
 
212
192
  // ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.js
213
- _chunk4DTSZ2MScjs.init_cjs_shims.call(void 0, );
193
+ _chunkZG4WVJOZcjs.init_cjs_shims.call(void 0, );
214
194
 
215
195
  // ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
216
- _chunk4DTSZ2MScjs.init_cjs_shims.call(void 0, );
217
- var import_index = _chunk4DTSZ2MScjs.__toESM.call(void 0, require_eventemitter3(), 1);
196
+ _chunkZG4WVJOZcjs.init_cjs_shims.call(void 0, );
197
+ var import_index = _chunkZG4WVJOZcjs.__toESM.call(void 0, require_eventemitter3(), 1);
218
198
 
219
199
  // ../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js
220
- _chunk4DTSZ2MScjs.init_cjs_shims.call(void 0, );
200
+ _chunkZG4WVJOZcjs.init_cjs_shims.call(void 0, );
221
201
  var TimeoutError = class extends Error {
222
202
  constructor(message) {
223
203
  super(message);
@@ -302,10 +282,10 @@ function pTimeout(promise, options) {
302
282
  }
303
283
 
304
284
  // ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.js
305
- _chunk4DTSZ2MScjs.init_cjs_shims.call(void 0, );
285
+ _chunkZG4WVJOZcjs.init_cjs_shims.call(void 0, );
306
286
 
307
287
  // ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.js
308
- _chunk4DTSZ2MScjs.init_cjs_shims.call(void 0, );
288
+ _chunkZG4WVJOZcjs.init_cjs_shims.call(void 0, );
309
289
  function lowerBound(array, value, comparator) {
310
290
  let first = 0;
311
291
  let count = array.length;
@@ -326,7 +306,7 @@ function lowerBound(array, value, comparator) {
326
306
  var _queue;
327
307
  var PriorityQueue = class {
328
308
  constructor() {
329
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _queue, []);
309
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _queue, []);
330
310
  }
331
311
  enqueue(run, options) {
332
312
  options = {
@@ -337,67 +317,54 @@ var PriorityQueue = class {
337
317
  priority: options.priority,
338
318
  run
339
319
  };
340
- if (this.size && _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue)[this.size - 1].priority >= options.priority) {
341
- _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue).push(element);
320
+ if (this.size && _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue)[this.size - 1].priority >= options.priority) {
321
+ _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue).push(element);
342
322
  return;
343
323
  }
344
- const index = lowerBound(_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue), element, (a, b) => b.priority - a.priority);
345
- _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue).splice(index, 0, element);
324
+ const index = lowerBound(_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue), element, (a, b) => b.priority - a.priority);
325
+ _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue).splice(index, 0, element);
346
326
  }
347
327
  dequeue() {
348
- const item = _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue).shift();
328
+ const item = _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue).shift();
349
329
  return _optionalChain([item, 'optionalAccess', _2 => _2.run]);
350
330
  }
351
331
  filter(options) {
352
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue).filter((element) => element.priority === options.priority).map((element) => element.run);
332
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue).filter((element) => element.priority === options.priority).map((element) => element.run);
353
333
  }
354
334
  get size() {
355
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue).length;
335
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue).length;
356
336
  }
357
337
  };
358
338
  _queue = new WeakMap();
359
339
 
360
340
  // ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.js
361
- var _carryoverConcurrencyCount, _isIntervalIgnored, _intervalCount, _intervalCap, _interval, _intervalEnd, _intervalId, _timeoutId, _queue2, _queueClass, _pending, _concurrency, _isPaused, _throwOnTimeout, _doesIntervalAllowAnother, doesIntervalAllowAnother_get, _doesConcurrentAllowAnother, doesConcurrentAllowAnother_get, _next, next_fn, _onResumeInterval, onResumeInterval_fn, _isIntervalPaused, isIntervalPaused_get, _tryToStartAnother, tryToStartAnother_fn, _initializeIntervalIfNeeded, initializeIntervalIfNeeded_fn, _onInterval, onInterval_fn, _processQueue, processQueue_fn, _throwOnAbort, throwOnAbort_fn, _onEvent, onEvent_fn;
341
+ var _carryoverConcurrencyCount, _isIntervalIgnored, _intervalCount, _intervalCap, _interval, _intervalEnd, _intervalId, _timeoutId, _queue2, _queueClass, _pending, _concurrency, _isPaused, _throwOnTimeout, _PQueue_instances, doesIntervalAllowAnother_get, doesConcurrentAllowAnother_get, next_fn, onResumeInterval_fn, isIntervalPaused_get, tryToStartAnother_fn, initializeIntervalIfNeeded_fn, onInterval_fn, processQueue_fn, throwOnAbort_fn, onEvent_fn;
362
342
  var PQueue = class extends import_index.default {
363
343
  // TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
364
344
  constructor(options) {
365
345
  super();
366
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _doesIntervalAllowAnother);
367
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _doesConcurrentAllowAnother);
368
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _next);
369
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _onResumeInterval);
370
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _isIntervalPaused);
371
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _tryToStartAnother);
372
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _initializeIntervalIfNeeded);
373
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _onInterval);
374
- /**
375
- Executes all queued functions until it reaches the limit.
376
- */
377
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _processQueue);
378
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _throwOnAbort);
379
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _onEvent);
380
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _carryoverConcurrencyCount, void 0);
381
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _isIntervalIgnored, void 0);
382
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _intervalCount, 0);
383
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _intervalCap, void 0);
384
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _interval, void 0);
385
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _intervalEnd, 0);
386
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _intervalId, void 0);
387
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _timeoutId, void 0);
388
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _queue2, void 0);
389
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _queueClass, void 0);
390
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _pending, 0);
346
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _PQueue_instances);
347
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _carryoverConcurrencyCount);
348
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _isIntervalIgnored);
349
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _intervalCount, 0);
350
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _intervalCap);
351
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _interval);
352
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _intervalEnd, 0);
353
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _intervalId);
354
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _timeoutId);
355
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _queue2);
356
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _queueClass);
357
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _pending, 0);
391
358
  // The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
392
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _concurrency, void 0);
393
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _isPaused, void 0);
394
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _throwOnTimeout, void 0);
359
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _concurrency);
360
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _isPaused);
361
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _throwOnTimeout);
395
362
  /**
396
363
  Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
397
364
 
398
365
  Applies to each future operation.
399
366
  */
400
- _chunk4DTSZ2MScjs.__publicField.call(void 0, this, "timeout");
367
+ _chunkZG4WVJOZcjs.__publicField.call(void 0, this, "timeout");
401
368
  options = {
402
369
  carryoverConcurrencyCount: false,
403
370
  intervalCap: Number.POSITIVE_INFINITY,
@@ -413,37 +380,37 @@ var PQueue = class extends import_index.default {
413
380
  if (options.interval === void 0 || !(Number.isFinite(options.interval) && options.interval >= 0)) {
414
381
  throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${_nullishCoalesce(_optionalChain([options, 'access', _6 => _6.interval, 'optionalAccess', _7 => _7.toString, 'call', _8 => _8()]), () => ( ""))}\` (${typeof options.interval})`);
415
382
  }
416
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _carryoverConcurrencyCount, options.carryoverConcurrencyCount);
417
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _isIntervalIgnored, options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0);
418
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _intervalCap, options.intervalCap);
419
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _interval, options.interval);
420
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _queue2, new options.queueClass());
421
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _queueClass, options.queueClass);
383
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _carryoverConcurrencyCount, options.carryoverConcurrencyCount);
384
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _isIntervalIgnored, options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0);
385
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _intervalCap, options.intervalCap);
386
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _interval, options.interval);
387
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _queue2, new options.queueClass());
388
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _queueClass, options.queueClass);
422
389
  this.concurrency = options.concurrency;
423
390
  this.timeout = options.timeout;
424
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _throwOnTimeout, options.throwOnTimeout === true);
425
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _isPaused, options.autoStart === false);
391
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _throwOnTimeout, options.throwOnTimeout === true);
392
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _isPaused, options.autoStart === false);
426
393
  }
427
394
  get concurrency() {
428
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _concurrency);
395
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _concurrency);
429
396
  }
430
397
  set concurrency(newConcurrency) {
431
398
  if (!(typeof newConcurrency === "number" && newConcurrency >= 1)) {
432
399
  throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${newConcurrency}\` (${typeof newConcurrency})`);
433
400
  }
434
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _concurrency, newConcurrency);
435
- _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
401
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _concurrency, newConcurrency);
402
+ _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, processQueue_fn).call(this);
436
403
  }
437
404
  async add(function_, options = {}) {
438
405
  options = {
439
406
  timeout: this.timeout,
440
- throwOnTimeout: _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _throwOnTimeout),
407
+ throwOnTimeout: _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _throwOnTimeout),
441
408
  ...options
442
409
  };
443
410
  return new Promise((resolve2, reject) => {
444
- _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue2).enqueue(async () => {
445
- _chunk4DTSZ2MScjs.__privateWrapper.call(void 0, this, _pending)._++;
446
- _chunk4DTSZ2MScjs.__privateWrapper.call(void 0, this, _intervalCount)._++;
411
+ _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue2).enqueue(async () => {
412
+ _chunkZG4WVJOZcjs.__privateWrapper.call(void 0, this, _pending)._++;
413
+ _chunkZG4WVJOZcjs.__privateWrapper.call(void 0, this, _intervalCount)._++;
447
414
  try {
448
415
  _optionalChain([options, 'access', _9 => _9.signal, 'optionalAccess', _10 => _10.throwIfAborted, 'call', _11 => _11()]);
449
416
  let operation = function_({ signal: options.signal });
@@ -451,7 +418,7 @@ var PQueue = class extends import_index.default {
451
418
  operation = pTimeout(Promise.resolve(operation), { milliseconds: options.timeout });
452
419
  }
453
420
  if (options.signal) {
454
- operation = Promise.race([operation, _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _throwOnAbort, throwOnAbort_fn).call(this, options.signal)]);
421
+ operation = Promise.race([operation, _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, throwOnAbort_fn).call(this, options.signal)]);
455
422
  }
456
423
  const result = await operation;
457
424
  resolve2(result);
@@ -464,11 +431,11 @@ var PQueue = class extends import_index.default {
464
431
  reject(error);
465
432
  this.emit("error", error);
466
433
  } finally {
467
- _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _next, next_fn).call(this);
434
+ _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, next_fn).call(this);
468
435
  }
469
436
  }, options);
470
437
  this.emit("add");
471
- _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this);
438
+ _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, tryToStartAnother_fn).call(this);
472
439
  });
473
440
  }
474
441
  async addAll(functions, options) {
@@ -478,24 +445,24 @@ var PQueue = class extends import_index.default {
478
445
  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.)
479
446
  */
480
447
  start() {
481
- if (!_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _isPaused)) {
448
+ if (!_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _isPaused)) {
482
449
  return this;
483
450
  }
484
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _isPaused, false);
485
- _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
451
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _isPaused, false);
452
+ _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, processQueue_fn).call(this);
486
453
  return this;
487
454
  }
488
455
  /**
489
456
  Put queue execution on hold.
490
457
  */
491
458
  pause() {
492
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _isPaused, true);
459
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _isPaused, true);
493
460
  }
494
461
  /**
495
462
  Clear the queue.
496
463
  */
497
464
  clear() {
498
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _queue2, new (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queueClass))());
465
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _queue2, new (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queueClass))());
499
466
  }
500
467
  /**
501
468
  Can be called multiple times. Useful if you for example add additional items at a later time.
@@ -503,10 +470,10 @@ var PQueue = class extends import_index.default {
503
470
  @returns A promise that settles when the queue becomes empty.
504
471
  */
505
472
  async onEmpty() {
506
- if (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue2).size === 0) {
473
+ if (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
507
474
  return;
508
475
  }
509
- await _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "empty");
476
+ await _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, onEvent_fn).call(this, "empty");
510
477
  }
511
478
  /**
512
479
  @returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
@@ -516,10 +483,10 @@ var PQueue = class extends import_index.default {
516
483
  Note that this only limits the number of items waiting to start. There could still be up to `concurrency` jobs already running that this call does not include in its calculation.
517
484
  */
518
485
  async onSizeLessThan(limit) {
519
- if (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue2).size < limit) {
486
+ if (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue2).size < limit) {
520
487
  return;
521
488
  }
522
- await _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "next", () => _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue2).size < limit);
489
+ await _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, onEvent_fn).call(this, "next", () => _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue2).size < limit);
523
490
  }
524
491
  /**
525
492
  The difference with `.onEmpty` is that `.onIdle` guarantees that all work from the queue has finished. `.onEmpty` merely signals that the queue is empty, but it could mean that some promises haven't completed yet.
@@ -527,16 +494,16 @@ var PQueue = class extends import_index.default {
527
494
  @returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
528
495
  */
529
496
  async onIdle() {
530
- if (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _pending) === 0 && _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue2).size === 0) {
497
+ if (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _pending) === 0 && _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
531
498
  return;
532
499
  }
533
- await _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "idle");
500
+ await _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, onEvent_fn).call(this, "idle");
534
501
  }
535
502
  /**
536
503
  Size of the queue, the number of queued items waiting to run.
537
504
  */
538
505
  get size() {
539
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue2).size;
506
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue2).size;
540
507
  }
541
508
  /**
542
509
  Size of the queue, filtered by the given options.
@@ -544,19 +511,19 @@ var PQueue = class extends import_index.default {
544
511
  For example, this can be used to find the number of items remaining in the queue with a specific priority level.
545
512
  */
546
513
  sizeBy(options) {
547
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue2).filter(options).length;
514
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue2).filter(options).length;
548
515
  }
549
516
  /**
550
517
  Number of running items (no longer in the queue).
551
518
  */
552
519
  get pending() {
553
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _pending);
520
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _pending);
554
521
  }
555
522
  /**
556
523
  Whether the queue is currently paused.
557
524
  */
558
525
  get isPaused() {
559
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _isPaused);
526
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _isPaused);
560
527
  }
561
528
  };
562
529
  _carryoverConcurrencyCount = new WeakMap();
@@ -573,37 +540,33 @@ _pending = new WeakMap();
573
540
  _concurrency = new WeakMap();
574
541
  _isPaused = new WeakMap();
575
542
  _throwOnTimeout = new WeakMap();
576
- _doesIntervalAllowAnother = new WeakSet();
543
+ _PQueue_instances = new WeakSet();
577
544
  doesIntervalAllowAnother_get = function() {
578
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _intervalCount) < _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _intervalCap);
545
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _intervalCount) < _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _intervalCap);
579
546
  };
580
- _doesConcurrentAllowAnother = new WeakSet();
581
547
  doesConcurrentAllowAnother_get = function() {
582
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _pending) < _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _concurrency);
548
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _pending) < _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _concurrency);
583
549
  };
584
- _next = new WeakSet();
585
550
  next_fn = function() {
586
- _chunk4DTSZ2MScjs.__privateWrapper.call(void 0, this, _pending)._--;
587
- _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this);
551
+ _chunkZG4WVJOZcjs.__privateWrapper.call(void 0, this, _pending)._--;
552
+ _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, tryToStartAnother_fn).call(this);
588
553
  this.emit("next");
589
554
  };
590
- _onResumeInterval = new WeakSet();
591
555
  onResumeInterval_fn = function() {
592
- _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _onInterval, onInterval_fn).call(this);
593
- _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _initializeIntervalIfNeeded, initializeIntervalIfNeeded_fn).call(this);
594
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _timeoutId, void 0);
556
+ _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, onInterval_fn).call(this);
557
+ _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, initializeIntervalIfNeeded_fn).call(this);
558
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _timeoutId, void 0);
595
559
  };
596
- _isIntervalPaused = new WeakSet();
597
560
  isIntervalPaused_get = function() {
598
561
  const now = Date.now();
599
- if (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _intervalId) === void 0) {
600
- const delay = _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _intervalEnd) - now;
562
+ if (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _intervalId) === void 0) {
563
+ const delay = _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _intervalEnd) - now;
601
564
  if (delay < 0) {
602
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _intervalCount, _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _pending) : 0);
565
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _intervalCount, _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _pending) : 0);
603
566
  } else {
604
- if (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _timeoutId) === void 0) {
605
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _timeoutId, setTimeout(() => {
606
- _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _onResumeInterval, onResumeInterval_fn).call(this);
567
+ if (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _timeoutId) === void 0) {
568
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _timeoutId, setTimeout(() => {
569
+ _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, onResumeInterval_fn).call(this);
607
570
  }, delay));
608
571
  }
609
572
  return true;
@@ -611,61 +574,59 @@ isIntervalPaused_get = function() {
611
574
  }
612
575
  return false;
613
576
  };
614
- _tryToStartAnother = new WeakSet();
615
577
  tryToStartAnother_fn = function() {
616
- if (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue2).size === 0) {
617
- if (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _intervalId)) {
618
- clearInterval(_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _intervalId));
578
+ if (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
579
+ if (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _intervalId)) {
580
+ clearInterval(_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _intervalId));
619
581
  }
620
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _intervalId, void 0);
582
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _intervalId, void 0);
621
583
  this.emit("empty");
622
- if (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _pending) === 0) {
584
+ if (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _pending) === 0) {
623
585
  this.emit("idle");
624
586
  }
625
587
  return false;
626
588
  }
627
- if (!_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _isPaused)) {
628
- const canInitializeInterval = !_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _isIntervalPaused, isIntervalPaused_get);
629
- if (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _doesIntervalAllowAnother, doesIntervalAllowAnother_get) && _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _doesConcurrentAllowAnother, doesConcurrentAllowAnother_get)) {
630
- const job = _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue2).dequeue();
589
+ if (!_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _isPaused)) {
590
+ const canInitializeInterval = !_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _PQueue_instances, isIntervalPaused_get);
591
+ if (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _PQueue_instances, doesIntervalAllowAnother_get) && _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _PQueue_instances, doesConcurrentAllowAnother_get)) {
592
+ const job = _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue2).dequeue();
631
593
  if (!job) {
632
594
  return false;
633
595
  }
634
596
  this.emit("active");
635
597
  job();
636
598
  if (canInitializeInterval) {
637
- _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _initializeIntervalIfNeeded, initializeIntervalIfNeeded_fn).call(this);
599
+ _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, initializeIntervalIfNeeded_fn).call(this);
638
600
  }
639
601
  return true;
640
602
  }
641
603
  }
642
604
  return false;
643
605
  };
644
- _initializeIntervalIfNeeded = new WeakSet();
645
606
  initializeIntervalIfNeeded_fn = function() {
646
- if (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _intervalId) !== void 0) {
607
+ if (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _intervalId) !== void 0) {
647
608
  return;
648
609
  }
649
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _intervalId, setInterval(() => {
650
- _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _onInterval, onInterval_fn).call(this);
651
- }, _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _interval)));
652
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _intervalEnd, Date.now() + _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _interval));
610
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _intervalId, setInterval(() => {
611
+ _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, onInterval_fn).call(this);
612
+ }, _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _interval)));
613
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _intervalEnd, Date.now() + _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _interval));
653
614
  };
654
- _onInterval = new WeakSet();
655
615
  onInterval_fn = function() {
656
- if (_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _intervalCount) === 0 && _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _pending) === 0 && _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _intervalId)) {
657
- clearInterval(_chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _intervalId));
658
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _intervalId, void 0);
616
+ if (_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _intervalCount) === 0 && _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _pending) === 0 && _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _intervalId)) {
617
+ clearInterval(_chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _intervalId));
618
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _intervalId, void 0);
659
619
  }
660
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _intervalCount, _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _pending) : 0);
661
- _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
620
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _intervalCount, _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _pending) : 0);
621
+ _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, processQueue_fn).call(this);
662
622
  };
663
- _processQueue = new WeakSet();
623
+ /**
624
+ Executes all queued functions until it reaches the limit.
625
+ */
664
626
  processQueue_fn = function() {
665
- while (_chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this)) {
627
+ while (_chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _PQueue_instances, tryToStartAnother_fn).call(this)) {
666
628
  }
667
629
  };
668
- _throwOnAbort = new WeakSet();
669
630
  throwOnAbort_fn = async function(signal) {
670
631
  return new Promise((_resolve, reject) => {
671
632
  signal.addEventListener("abort", () => {
@@ -673,7 +634,6 @@ throwOnAbort_fn = async function(signal) {
673
634
  }, { once: true });
674
635
  });
675
636
  };
676
- _onEvent = new WeakSet();
677
637
  onEvent_fn = async function(event, filter) {
678
638
  return new Promise((resolve2) => {
679
639
  const listener = () => {
@@ -692,12 +652,12 @@ var _remeda = require('remeda');
692
652
  var _fs = require('@kubb/fs');
693
653
 
694
654
  // src/BarrelManager.ts
695
- _chunk4DTSZ2MScjs.init_cjs_shims.call(void 0, );
655
+ _chunkZG4WVJOZcjs.init_cjs_shims.call(void 0, );
696
656
  var _parserts = require('@kubb/parser-ts');
697
657
 
698
658
 
699
659
  // src/utils/TreeNode.ts
700
- _chunk4DTSZ2MScjs.init_cjs_shims.call(void 0, );
660
+ _chunkZG4WVJOZcjs.init_cjs_shims.call(void 0, );
701
661
  var _directorytree = require('directory-tree'); var _directorytree2 = _interopRequireDefault(_directorytree);
702
662
  var TreeNode = class _TreeNode {
703
663
  constructor(data, parent) {
@@ -800,8 +760,8 @@ var TreeNode = class _TreeNode {
800
760
  var _options;
801
761
  var BarrelManager = class {
802
762
  constructor(options = {}) {
803
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _options, void 0);
804
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _options, options);
763
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _options);
764
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _options, options);
805
765
  return this;
806
766
  }
807
767
  getNamedExport(root, item) {
@@ -841,7 +801,7 @@ var BarrelManager = class {
841
801
  })]);
842
802
  }
843
803
  getIndexes(root) {
844
- const { treeNode = {}, isTypeOnly, extName } = _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _options);
804
+ const { treeNode = {}, isTypeOnly, extName } = _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _options);
845
805
  const tree = TreeNode.build(root, treeNode);
846
806
  if (!tree) {
847
807
  return null;
@@ -853,7 +813,7 @@ var BarrelManager = class {
853
813
  if (treeNode2.children.length > 1) {
854
814
  const indexPath = _path2.default.resolve(treeNode2.data.path, "index.ts");
855
815
  const exports = treeNode2.children.filter(Boolean).map((file) => {
856
- const importPath = file.data.type === "split" ? `./${file.data.name}/index` : `./${_chunkCCA5OKGMcjs.trimExtName.call(void 0, file.data.name)}`;
816
+ const importPath = file.data.type === "split" ? `./${file.data.name}/index` : `./${_chunkWSIG7TWQcjs.trimExtName.call(void 0, file.data.name)}`;
857
817
  if (importPath.endsWith("index") && file.data.type === "single") {
858
818
  return void 0;
859
819
  }
@@ -872,7 +832,7 @@ var BarrelManager = class {
872
832
  } else if (treeNode2.children.length === 1) {
873
833
  const [treeNodeChild] = treeNode2.children;
874
834
  const indexPath = _path2.default.resolve(treeNode2.data.path, "index.ts");
875
- const importPath = treeNodeChild.data.type === "split" ? `./${treeNodeChild.data.name}/index` : `./${_chunkCCA5OKGMcjs.trimExtName.call(void 0, treeNodeChild.data.name)}`;
835
+ const importPath = treeNodeChild.data.type === "split" ? `./${treeNodeChild.data.name}/index` : `./${_chunkWSIG7TWQcjs.trimExtName.call(void 0, treeNodeChild.data.name)}`;
876
836
  const exports = [
877
837
  {
878
838
  path: extName ? `${importPath}${extName}` : importPath,
@@ -898,34 +858,33 @@ var BarrelManager = class {
898
858
  _options = new WeakMap();
899
859
 
900
860
  // src/FileManager.ts
901
- var _cache, _task, _queue3, _add, add_fn, _addOrAppend, addOrAppend_fn;
861
+ var _cache, _task, _queue3, _FileManager_instances, add_fn, addOrAppend_fn;
902
862
  var _FileManager = class _FileManager {
903
863
  constructor({ task = async (file) => file, queue = new PQueue() } = {}) {
904
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _add);
905
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _addOrAppend);
906
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _cache, /* @__PURE__ */ new Map());
907
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _task, void 0);
908
- _chunk4DTSZ2MScjs.__privateAdd.call(void 0, this, _queue3, void 0);
909
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _task, task);
910
- _chunk4DTSZ2MScjs.__privateSet.call(void 0, this, _queue3, queue);
864
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _FileManager_instances);
865
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _cache, /* @__PURE__ */ new Map());
866
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _task);
867
+ _chunkZG4WVJOZcjs.__privateAdd.call(void 0, this, _queue3);
868
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _task, task);
869
+ _chunkZG4WVJOZcjs.__privateSet.call(void 0, this, _queue3, queue);
911
870
  return this;
912
871
  }
913
872
  get files() {
914
873
  const files = [];
915
- _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _cache).forEach((item) => {
874
+ _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _cache).forEach((item) => {
916
875
  files.push(...item.flat(1));
917
876
  });
918
877
  return files;
919
878
  }
920
879
  get isExecuting() {
921
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue3).size !== 0 && _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue3).pending !== 0;
880
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue3).size !== 0 && _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue3).pending !== 0;
922
881
  }
923
882
  async add(...files) {
924
883
  const promises = combineFiles(files).map((file) => {
925
884
  if (file.override) {
926
- return _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, file);
885
+ return _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _FileManager_instances, add_fn).call(this, file);
927
886
  }
928
- return _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, file);
887
+ return _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _FileManager_instances, addOrAppend_fn).call(this, file);
929
888
  });
930
889
  const resolvedFiles = await Promise.all(promises);
931
890
  if (files.length > 1) {
@@ -939,11 +898,11 @@ var _FileManager = class _FileManager {
939
898
  return void 0;
940
899
  }
941
900
  const pathToBuildFrom = _path.resolve.call(void 0, root, output.path);
942
- if (_chunkCCA5OKGMcjs.transformers_default.trimExtName(pathToBuildFrom).endsWith("index")) {
901
+ if (_chunkWSIG7TWQcjs.transformers_default.trimExtName(pathToBuildFrom).endsWith("index")) {
943
902
  logger.emit("warning", "Output has the same fileName as the barrelFiles, please disable barrel generation");
944
903
  return;
945
904
  }
946
- const exportPath = output.path.startsWith("./") ? _chunkCCA5OKGMcjs.trimExtName.call(void 0, output.path) : `./${_chunkCCA5OKGMcjs.trimExtName.call(void 0, output.path)}`;
905
+ const exportPath = output.path.startsWith("./") ? _chunkWSIG7TWQcjs.trimExtName.call(void 0, output.path) : `./${_chunkWSIG7TWQcjs.trimExtName.call(void 0, output.path)}`;
947
906
  const mode = _FileManager.getMode(output.path);
948
907
  const barrelManager = new BarrelManager({
949
908
  extName: output.extName,
@@ -966,7 +925,7 @@ var _FileManager = class _FileManager {
966
925
  }
967
926
  await Promise.all(
968
927
  files.map((file) => {
969
- return _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, {
928
+ return _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _FileManager_instances, addOrAppend_fn).call(this, {
970
929
  ...file,
971
930
  meta: meta ? meta : file.meta
972
931
  });
@@ -993,27 +952,27 @@ var _FileManager = class _FileManager {
993
952
  if (exportType === "barrelNamed" && !output.exportAs && _optionalChain([rootFile, 'access', _32 => _32.exports, 'optionalAccess', _33 => _33[0]])) {
994
953
  rootFile.exports = barrelManager.getNamedExport(root, rootFile.exports[0]);
995
954
  }
996
- await _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, {
955
+ await _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _FileManager_instances, addOrAppend_fn).call(this, {
997
956
  ...rootFile,
998
957
  meta: meta ? meta : rootFile.meta
999
958
  });
1000
959
  }
1001
960
  getCacheByUUID(UUID) {
1002
961
  let cache;
1003
- _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _cache).forEach((files) => {
962
+ _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _cache).forEach((files) => {
1004
963
  cache = files.find((item) => item.id === UUID);
1005
964
  });
1006
965
  return cache;
1007
966
  }
1008
967
  get(path2) {
1009
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _cache).get(path2);
968
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _cache).get(path2);
1010
969
  }
1011
970
  remove(path2) {
1012
971
  const cacheItem = this.get(path2);
1013
972
  if (!cacheItem) {
1014
973
  return;
1015
974
  }
1016
- _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _cache).delete(path2);
975
+ _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _cache).delete(path2);
1017
976
  }
1018
977
  async write(...params) {
1019
978
  return _fs.write.call(void 0, ...params);
@@ -1044,12 +1003,12 @@ var _FileManager = class _FileManager {
1044
1003
  _cache = new WeakMap();
1045
1004
  _task = new WeakMap();
1046
1005
  _queue3 = new WeakMap();
1047
- _add = new WeakSet();
1006
+ _FileManager_instances = new WeakSet();
1048
1007
  add_fn = async function(file) {
1049
1008
  const controller = new AbortController();
1050
1009
  const resolvedFile = {
1051
1010
  id: _crypto2.default.randomUUID(),
1052
- name: _chunkCCA5OKGMcjs.trimExtName.call(void 0, file.baseName),
1011
+ name: _chunkWSIG7TWQcjs.trimExtName.call(void 0, file.baseName),
1053
1012
  ...file
1054
1013
  };
1055
1014
  if (_optionalChain([resolvedFile, 'access', _34 => _34.exports, 'optionalAccess', _35 => _35.length])) {
@@ -1062,22 +1021,21 @@ add_fn = async function(file) {
1062
1021
  return true;
1063
1022
  });
1064
1023
  }
1065
- _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _cache).set(resolvedFile.path, [{ cancel: () => controller.abort(), ...resolvedFile }]);
1066
- return _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _queue3).add(
1024
+ _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _cache).set(resolvedFile.path, [{ cancel: () => controller.abort(), ...resolvedFile }]);
1025
+ return _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _queue3).add(
1067
1026
  async () => {
1068
1027
  var _a;
1069
- return (_a = _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _task)) == null ? void 0 : _a.call(this, resolvedFile);
1028
+ return (_a = _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _task)) == null ? void 0 : _a.call(this, resolvedFile);
1070
1029
  },
1071
1030
  { signal: controller.signal }
1072
1031
  );
1073
1032
  };
1074
- _addOrAppend = new WeakSet();
1075
1033
  addOrAppend_fn = async function(file) {
1076
- const previousCaches = _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _cache).get(file.path);
1034
+ const previousCaches = _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _cache).get(file.path);
1077
1035
  const previousCache = previousCaches ? previousCaches.at(previousCaches.length - 1) : void 0;
1078
1036
  if (previousCache) {
1079
- _chunk4DTSZ2MScjs.__privateGet.call(void 0, this, _cache).delete(previousCache.path);
1080
- return _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, {
1037
+ _chunkZG4WVJOZcjs.__privateGet.call(void 0, this, _cache).delete(previousCache.path);
1038
+ return _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _FileManager_instances, add_fn).call(this, {
1081
1039
  ...file,
1082
1040
  source: previousCache.source && file.source ? `${previousCache.source}
1083
1041
  ${file.source}` : "",
@@ -1086,7 +1044,7 @@ ${file.source}` : "",
1086
1044
  env: { ...previousCache.env || {}, ...file.env || {} }
1087
1045
  });
1088
1046
  }
1089
- return _chunk4DTSZ2MScjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, file);
1047
+ return _chunkZG4WVJOZcjs.__privateMethod.call(void 0, this, _FileManager_instances, add_fn).call(this, file);
1090
1048
  };
1091
1049
  var FileManager = _FileManager;
1092
1050
  function combineFiles(files) {
@@ -1124,12 +1082,12 @@ async function getSource(file) {
1124
1082
  if (file.language ? !["typescript", "javascript"].includes(file.language) : !FileManager.isJavascript(file.baseName)) {
1125
1083
  return file.source;
1126
1084
  }
1127
- const parser = await _chunkJA6UN4AZcjs.getParser.call(void 0, file.language);
1085
+ const parser = await _chunkOCFABH5Lcjs.getParser.call(void 0, file.language);
1128
1086
  const exports = file.exports ? combineExports(file.exports) : [];
1129
1087
  const imports = file.imports && file.source ? combineImports(file.imports, exports, file.source) : [];
1130
1088
  const importNodes = imports.filter((item) => {
1131
1089
  const path2 = item.root ? _fs.getRelativePath.call(void 0, item.root, item.path) : item.path;
1132
- return path2 !== _chunkCCA5OKGMcjs.trimExtName.call(void 0, file.path);
1090
+ return path2 !== _chunkWSIG7TWQcjs.trimExtName.call(void 0, file.path);
1133
1091
  }).map((item) => {
1134
1092
  return parser.factory.createImportDeclaration({
1135
1093
  name: item.name,
@@ -1149,7 +1107,7 @@ async function getSource(file) {
1149
1107
  return parser.print([], { source, noEmitHelpers: false });
1150
1108
  }
1151
1109
  function combineExports(exports) {
1152
- const combinedExports = _chunkPNAWM6V2cjs.orderBy.call(void 0, exports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
1110
+ const combinedExports = _chunkFVW4VDVDcjs.orderBy.call(void 0, exports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
1153
1111
  (prev, curr) => {
1154
1112
  const name = curr.name;
1155
1113
  const prevByPath = prev.findLast((imp) => imp.path === curr.path);
@@ -1180,10 +1138,10 @@ function combineExports(exports) {
1180
1138
  },
1181
1139
  []
1182
1140
  );
1183
- return _chunkPNAWM6V2cjs.orderBy.call(void 0, combinedExports, [(v) => !v.isTypeOnly, (v) => v.asAlias], ["desc", "desc"]);
1141
+ return _chunkFVW4VDVDcjs.orderBy.call(void 0, combinedExports, [(v) => !v.isTypeOnly, (v) => v.asAlias], ["desc", "desc"]);
1184
1142
  }
1185
1143
  function combineImports(imports, exports, source) {
1186
- const combinedImports = _chunkPNAWM6V2cjs.orderBy.call(void 0, imports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
1144
+ const combinedImports = _chunkFVW4VDVDcjs.orderBy.call(void 0, imports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
1187
1145
  (prev, curr) => {
1188
1146
  let name = Array.isArray(curr.name) ? [...new Set(curr.name)] : curr.name;
1189
1147
  const hasImportInSource = (importName) => {
@@ -1228,7 +1186,7 @@ function combineImports(imports, exports, source) {
1228
1186
  },
1229
1187
  []
1230
1188
  );
1231
- return _chunkPNAWM6V2cjs.orderBy.call(void 0, combinedImports, [(v) => !v.isTypeOnly], ["desc"]);
1189
+ return _chunkFVW4VDVDcjs.orderBy.call(void 0, combinedImports, [(v) => !v.isTypeOnly], ["desc"]);
1232
1190
  }
1233
1191
  function getEnvSource(source, env) {
1234
1192
  if (!env) {
@@ -1245,13 +1203,13 @@ function getEnvSource(source, env) {
1245
1203
  throw new TypeError(`Environment should be in upperCase for ${key}`);
1246
1204
  }
1247
1205
  if (typeof replaceBy === "string") {
1248
- prev = _chunkCCA5OKGMcjs.searchAndReplace.call(void 0, {
1206
+ prev = _chunkWSIG7TWQcjs.searchAndReplace.call(void 0, {
1249
1207
  text: prev.replaceAll(`process.env.${key}`, replaceBy),
1250
1208
  replaceBy,
1251
1209
  prefix: "process.env",
1252
1210
  key
1253
1211
  });
1254
- prev = _chunkCCA5OKGMcjs.searchAndReplace.call(void 0, {
1212
+ prev = _chunkWSIG7TWQcjs.searchAndReplace.call(void 0, {
1255
1213
  text: prev.replaceAll(/(declare const).*\n/gi, ""),
1256
1214
  replaceBy,
1257
1215
  key
@@ -1265,4 +1223,4 @@ function getEnvSource(source, env) {
1265
1223
 
1266
1224
 
1267
1225
  exports.PQueue = PQueue; exports.FileManager = FileManager;
1268
- //# sourceMappingURL=chunk-4QO27EB2.cjs.map
1226
+ //# sourceMappingURL=chunk-ESX7D52D.cjs.map