@kubb/core 2.18.6 → 2.18.7
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.
- package/dist/{chunk-7TB4GNKF.cjs → chunk-43IC6DSU.cjs} +156 -156
- package/dist/{chunk-FWUA552W.cjs → chunk-4RS4YXDV.cjs} +29 -29
- package/dist/{chunk-TCFN5BZ6.cjs → chunk-5RQZTPY4.cjs} +3 -3
- package/dist/{chunk-TCFN5BZ6.cjs.map → chunk-5RQZTPY4.cjs.map} +1 -1
- package/dist/{chunk-JI763CHT.cjs → chunk-A52Q24EG.cjs} +18 -18
- package/dist/{chunk-M6VNU2SJ.cjs → chunk-K2LTMGMS.cjs} +12 -12
- package/dist/{chunk-BE4KSMB4.cjs → chunk-LH6XB2NB.cjs} +5 -5
- package/dist/index.cjs +137 -137
- package/dist/logger.cjs +3 -3
- package/dist/mocks.cjs +8 -8
- package/dist/transformers.cjs +4 -4
- package/dist/utils.cjs +4 -4
- package/package.json +7 -7
- /package/dist/{chunk-7TB4GNKF.cjs.map → chunk-43IC6DSU.cjs.map} +0 -0
- /package/dist/{chunk-FWUA552W.cjs.map → chunk-4RS4YXDV.cjs.map} +0 -0
- /package/dist/{chunk-JI763CHT.cjs.map → chunk-A52Q24EG.cjs.map} +0 -0
- /package/dist/{chunk-M6VNU2SJ.cjs.map → chunk-K2LTMGMS.cjs.map} +0 -0
- /package/dist/{chunk-BE4KSMB4.cjs.map → chunk-LH6XB2NB.cjs.map} +0 -0
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkA52Q24EGcjs = require('./chunk-A52Q24EG.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunk4RS4YXDVcjs = require('./chunk-4RS4YXDV.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkLH6XB2NBcjs = require('./chunk-LH6XB2NB.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -19,13 +19,13 @@ var _chunkBE4KSMB4cjs = require('./chunk-BE4KSMB4.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunk5RQZTPY4cjs = require('./chunk-5RQZTPY4.cjs');
|
|
23
23
|
|
|
24
24
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js
|
|
25
|
-
var require_eventemitter3 =
|
|
25
|
+
var require_eventemitter3 = _chunk5RQZTPY4cjs.__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
|
-
|
|
28
|
+
_chunk5RQZTPY4cjs.init_cjs_shims.call(void 0, );
|
|
29
29
|
var has = Object.prototype.hasOwnProperty;
|
|
30
30
|
var prefix = "~";
|
|
31
31
|
function Events() {
|
|
@@ -205,19 +205,19 @@ var require_eventemitter3 = _chunkTCFN5BZ6cjs.__commonJS.call(void 0, {
|
|
|
205
205
|
});
|
|
206
206
|
|
|
207
207
|
// src/FileManager.ts
|
|
208
|
-
|
|
208
|
+
_chunk5RQZTPY4cjs.init_cjs_shims.call(void 0, );
|
|
209
209
|
var _crypto = require('crypto'); var _crypto2 = _interopRequireDefault(_crypto);
|
|
210
210
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
211
211
|
|
|
212
212
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.js
|
|
213
|
-
|
|
213
|
+
_chunk5RQZTPY4cjs.init_cjs_shims.call(void 0, );
|
|
214
214
|
|
|
215
215
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
|
|
216
|
-
|
|
217
|
-
var import_index =
|
|
216
|
+
_chunk5RQZTPY4cjs.init_cjs_shims.call(void 0, );
|
|
217
|
+
var import_index = _chunk5RQZTPY4cjs.__toESM.call(void 0, require_eventemitter3(), 1);
|
|
218
218
|
|
|
219
219
|
// ../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js
|
|
220
|
-
|
|
220
|
+
_chunk5RQZTPY4cjs.init_cjs_shims.call(void 0, );
|
|
221
221
|
var TimeoutError = class extends Error {
|
|
222
222
|
constructor(message) {
|
|
223
223
|
super(message);
|
|
@@ -302,10 +302,10 @@ function pTimeout(promise, options) {
|
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.js
|
|
305
|
-
|
|
305
|
+
_chunk5RQZTPY4cjs.init_cjs_shims.call(void 0, );
|
|
306
306
|
|
|
307
307
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.js
|
|
308
|
-
|
|
308
|
+
_chunk5RQZTPY4cjs.init_cjs_shims.call(void 0, );
|
|
309
309
|
function lowerBound(array, value, comparator) {
|
|
310
310
|
let first = 0;
|
|
311
311
|
let count = array.length;
|
|
@@ -326,7 +326,7 @@ function lowerBound(array, value, comparator) {
|
|
|
326
326
|
var _queue;
|
|
327
327
|
var PriorityQueue = class {
|
|
328
328
|
constructor() {
|
|
329
|
-
|
|
329
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _queue, []);
|
|
330
330
|
}
|
|
331
331
|
enqueue(run, options) {
|
|
332
332
|
options = {
|
|
@@ -337,22 +337,22 @@ var PriorityQueue = class {
|
|
|
337
337
|
priority: options.priority,
|
|
338
338
|
run
|
|
339
339
|
};
|
|
340
|
-
if (this.size &&
|
|
341
|
-
|
|
340
|
+
if (this.size && _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue)[this.size - 1].priority >= options.priority) {
|
|
341
|
+
_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue).push(element);
|
|
342
342
|
return;
|
|
343
343
|
}
|
|
344
|
-
const index = lowerBound(
|
|
345
|
-
|
|
344
|
+
const index = lowerBound(_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue), element, (a, b) => b.priority - a.priority);
|
|
345
|
+
_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue).splice(index, 0, element);
|
|
346
346
|
}
|
|
347
347
|
dequeue() {
|
|
348
|
-
const item =
|
|
348
|
+
const item = _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue).shift();
|
|
349
349
|
return _optionalChain([item, 'optionalAccess', _2 => _2.run]);
|
|
350
350
|
}
|
|
351
351
|
filter(options) {
|
|
352
|
-
return
|
|
352
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue).filter((element) => element.priority === options.priority).map((element) => element.run);
|
|
353
353
|
}
|
|
354
354
|
get size() {
|
|
355
|
-
return
|
|
355
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue).length;
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
358
|
_queue = new WeakMap();
|
|
@@ -363,41 +363,41 @@ var PQueue = class extends import_index.default {
|
|
|
363
363
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
364
364
|
constructor(options) {
|
|
365
365
|
super();
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
366
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _doesIntervalAllowAnother);
|
|
367
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _doesConcurrentAllowAnother);
|
|
368
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _next);
|
|
369
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _onResumeInterval);
|
|
370
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _isIntervalPaused);
|
|
371
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _tryToStartAnother);
|
|
372
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _initializeIntervalIfNeeded);
|
|
373
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _onInterval);
|
|
374
374
|
/**
|
|
375
375
|
Executes all queued functions until it reaches the limit.
|
|
376
376
|
*/
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
377
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _processQueue);
|
|
378
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _throwOnAbort);
|
|
379
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _onEvent);
|
|
380
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _carryoverConcurrencyCount, void 0);
|
|
381
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _isIntervalIgnored, void 0);
|
|
382
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _intervalCount, 0);
|
|
383
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _intervalCap, void 0);
|
|
384
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _interval, void 0);
|
|
385
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _intervalEnd, 0);
|
|
386
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _intervalId, void 0);
|
|
387
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _timeoutId, void 0);
|
|
388
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _queue2, void 0);
|
|
389
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _queueClass, void 0);
|
|
390
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _pending, 0);
|
|
391
391
|
// The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
392
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _concurrency, void 0);
|
|
393
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _isPaused, void 0);
|
|
394
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _throwOnTimeout, void 0);
|
|
395
395
|
/**
|
|
396
396
|
Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
|
|
397
397
|
|
|
398
398
|
Applies to each future operation.
|
|
399
399
|
*/
|
|
400
|
-
|
|
400
|
+
_chunk5RQZTPY4cjs.__publicField.call(void 0, this, "timeout");
|
|
401
401
|
options = {
|
|
402
402
|
carryoverConcurrencyCount: false,
|
|
403
403
|
intervalCap: Number.POSITIVE_INFINITY,
|
|
@@ -413,37 +413,37 @@ var PQueue = class extends import_index.default {
|
|
|
413
413
|
if (options.interval === void 0 || !(Number.isFinite(options.interval) && options.interval >= 0)) {
|
|
414
414
|
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
415
|
}
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
416
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _carryoverConcurrencyCount, options.carryoverConcurrencyCount);
|
|
417
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _isIntervalIgnored, options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0);
|
|
418
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _intervalCap, options.intervalCap);
|
|
419
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _interval, options.interval);
|
|
420
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _queue2, new options.queueClass());
|
|
421
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _queueClass, options.queueClass);
|
|
422
422
|
this.concurrency = options.concurrency;
|
|
423
423
|
this.timeout = options.timeout;
|
|
424
|
-
|
|
425
|
-
|
|
424
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _throwOnTimeout, options.throwOnTimeout === true);
|
|
425
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _isPaused, options.autoStart === false);
|
|
426
426
|
}
|
|
427
427
|
get concurrency() {
|
|
428
|
-
return
|
|
428
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _concurrency);
|
|
429
429
|
}
|
|
430
430
|
set concurrency(newConcurrency) {
|
|
431
431
|
if (!(typeof newConcurrency === "number" && newConcurrency >= 1)) {
|
|
432
432
|
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${newConcurrency}\` (${typeof newConcurrency})`);
|
|
433
433
|
}
|
|
434
|
-
|
|
435
|
-
|
|
434
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _concurrency, newConcurrency);
|
|
435
|
+
_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
|
|
436
436
|
}
|
|
437
437
|
async add(function_, options = {}) {
|
|
438
438
|
options = {
|
|
439
439
|
timeout: this.timeout,
|
|
440
|
-
throwOnTimeout:
|
|
440
|
+
throwOnTimeout: _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _throwOnTimeout),
|
|
441
441
|
...options
|
|
442
442
|
};
|
|
443
443
|
return new Promise((resolve2, reject) => {
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
444
|
+
_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue2).enqueue(async () => {
|
|
445
|
+
_chunk5RQZTPY4cjs.__privateWrapper.call(void 0, this, _pending)._++;
|
|
446
|
+
_chunk5RQZTPY4cjs.__privateWrapper.call(void 0, this, _intervalCount)._++;
|
|
447
447
|
try {
|
|
448
448
|
_optionalChain([options, 'access', _9 => _9.signal, 'optionalAccess', _10 => _10.throwIfAborted, 'call', _11 => _11()]);
|
|
449
449
|
let operation = function_({ signal: options.signal });
|
|
@@ -451,7 +451,7 @@ var PQueue = class extends import_index.default {
|
|
|
451
451
|
operation = pTimeout(Promise.resolve(operation), { milliseconds: options.timeout });
|
|
452
452
|
}
|
|
453
453
|
if (options.signal) {
|
|
454
|
-
operation = Promise.race([operation,
|
|
454
|
+
operation = Promise.race([operation, _chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _throwOnAbort, throwOnAbort_fn).call(this, options.signal)]);
|
|
455
455
|
}
|
|
456
456
|
const result = await operation;
|
|
457
457
|
resolve2(result);
|
|
@@ -464,11 +464,11 @@ var PQueue = class extends import_index.default {
|
|
|
464
464
|
reject(error);
|
|
465
465
|
this.emit("error", error);
|
|
466
466
|
} finally {
|
|
467
|
-
|
|
467
|
+
_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _next, next_fn).call(this);
|
|
468
468
|
}
|
|
469
469
|
}, options);
|
|
470
470
|
this.emit("add");
|
|
471
|
-
|
|
471
|
+
_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this);
|
|
472
472
|
});
|
|
473
473
|
}
|
|
474
474
|
async addAll(functions, options) {
|
|
@@ -478,24 +478,24 @@ var PQueue = class extends import_index.default {
|
|
|
478
478
|
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
479
|
*/
|
|
480
480
|
start() {
|
|
481
|
-
if (!
|
|
481
|
+
if (!_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _isPaused)) {
|
|
482
482
|
return this;
|
|
483
483
|
}
|
|
484
|
-
|
|
485
|
-
|
|
484
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _isPaused, false);
|
|
485
|
+
_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
|
|
486
486
|
return this;
|
|
487
487
|
}
|
|
488
488
|
/**
|
|
489
489
|
Put queue execution on hold.
|
|
490
490
|
*/
|
|
491
491
|
pause() {
|
|
492
|
-
|
|
492
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _isPaused, true);
|
|
493
493
|
}
|
|
494
494
|
/**
|
|
495
495
|
Clear the queue.
|
|
496
496
|
*/
|
|
497
497
|
clear() {
|
|
498
|
-
|
|
498
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _queue2, new (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queueClass))());
|
|
499
499
|
}
|
|
500
500
|
/**
|
|
501
501
|
Can be called multiple times. Useful if you for example add additional items at a later time.
|
|
@@ -503,10 +503,10 @@ var PQueue = class extends import_index.default {
|
|
|
503
503
|
@returns A promise that settles when the queue becomes empty.
|
|
504
504
|
*/
|
|
505
505
|
async onEmpty() {
|
|
506
|
-
if (
|
|
506
|
+
if (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
507
507
|
return;
|
|
508
508
|
}
|
|
509
|
-
await
|
|
509
|
+
await _chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "empty");
|
|
510
510
|
}
|
|
511
511
|
/**
|
|
512
512
|
@returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
|
|
@@ -516,10 +516,10 @@ var PQueue = class extends import_index.default {
|
|
|
516
516
|
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
517
|
*/
|
|
518
518
|
async onSizeLessThan(limit) {
|
|
519
|
-
if (
|
|
519
|
+
if (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue2).size < limit) {
|
|
520
520
|
return;
|
|
521
521
|
}
|
|
522
|
-
await
|
|
522
|
+
await _chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "next", () => _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue2).size < limit);
|
|
523
523
|
}
|
|
524
524
|
/**
|
|
525
525
|
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 +527,16 @@ var PQueue = class extends import_index.default {
|
|
|
527
527
|
@returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
|
|
528
528
|
*/
|
|
529
529
|
async onIdle() {
|
|
530
|
-
if (
|
|
530
|
+
if (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _pending) === 0 && _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
531
531
|
return;
|
|
532
532
|
}
|
|
533
|
-
await
|
|
533
|
+
await _chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "idle");
|
|
534
534
|
}
|
|
535
535
|
/**
|
|
536
536
|
Size of the queue, the number of queued items waiting to run.
|
|
537
537
|
*/
|
|
538
538
|
get size() {
|
|
539
|
-
return
|
|
539
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue2).size;
|
|
540
540
|
}
|
|
541
541
|
/**
|
|
542
542
|
Size of the queue, filtered by the given options.
|
|
@@ -544,19 +544,19 @@ var PQueue = class extends import_index.default {
|
|
|
544
544
|
For example, this can be used to find the number of items remaining in the queue with a specific priority level.
|
|
545
545
|
*/
|
|
546
546
|
sizeBy(options) {
|
|
547
|
-
return
|
|
547
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue2).filter(options).length;
|
|
548
548
|
}
|
|
549
549
|
/**
|
|
550
550
|
Number of running items (no longer in the queue).
|
|
551
551
|
*/
|
|
552
552
|
get pending() {
|
|
553
|
-
return
|
|
553
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _pending);
|
|
554
554
|
}
|
|
555
555
|
/**
|
|
556
556
|
Whether the queue is currently paused.
|
|
557
557
|
*/
|
|
558
558
|
get isPaused() {
|
|
559
|
-
return
|
|
559
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _isPaused);
|
|
560
560
|
}
|
|
561
561
|
};
|
|
562
562
|
_carryoverConcurrencyCount = new WeakMap();
|
|
@@ -575,35 +575,35 @@ _isPaused = new WeakMap();
|
|
|
575
575
|
_throwOnTimeout = new WeakMap();
|
|
576
576
|
_doesIntervalAllowAnother = new WeakSet();
|
|
577
577
|
doesIntervalAllowAnother_get = function() {
|
|
578
|
-
return
|
|
578
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _intervalCount) < _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _intervalCap);
|
|
579
579
|
};
|
|
580
580
|
_doesConcurrentAllowAnother = new WeakSet();
|
|
581
581
|
doesConcurrentAllowAnother_get = function() {
|
|
582
|
-
return
|
|
582
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _pending) < _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _concurrency);
|
|
583
583
|
};
|
|
584
584
|
_next = new WeakSet();
|
|
585
585
|
next_fn = function() {
|
|
586
|
-
|
|
587
|
-
|
|
586
|
+
_chunk5RQZTPY4cjs.__privateWrapper.call(void 0, this, _pending)._--;
|
|
587
|
+
_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this);
|
|
588
588
|
this.emit("next");
|
|
589
589
|
};
|
|
590
590
|
_onResumeInterval = new WeakSet();
|
|
591
591
|
onResumeInterval_fn = function() {
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
592
|
+
_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _onInterval, onInterval_fn).call(this);
|
|
593
|
+
_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _initializeIntervalIfNeeded, initializeIntervalIfNeeded_fn).call(this);
|
|
594
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _timeoutId, void 0);
|
|
595
595
|
};
|
|
596
596
|
_isIntervalPaused = new WeakSet();
|
|
597
597
|
isIntervalPaused_get = function() {
|
|
598
598
|
const now = Date.now();
|
|
599
|
-
if (
|
|
600
|
-
const delay =
|
|
599
|
+
if (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _intervalId) === void 0) {
|
|
600
|
+
const delay = _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _intervalEnd) - now;
|
|
601
601
|
if (delay < 0) {
|
|
602
|
-
|
|
602
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _intervalCount, _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _pending) : 0);
|
|
603
603
|
} else {
|
|
604
|
-
if (
|
|
605
|
-
|
|
606
|
-
|
|
604
|
+
if (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _timeoutId) === void 0) {
|
|
605
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _timeoutId, setTimeout(() => {
|
|
606
|
+
_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _onResumeInterval, onResumeInterval_fn).call(this);
|
|
607
607
|
}, delay));
|
|
608
608
|
}
|
|
609
609
|
return true;
|
|
@@ -613,28 +613,28 @@ isIntervalPaused_get = function() {
|
|
|
613
613
|
};
|
|
614
614
|
_tryToStartAnother = new WeakSet();
|
|
615
615
|
tryToStartAnother_fn = function() {
|
|
616
|
-
if (
|
|
617
|
-
if (
|
|
618
|
-
clearInterval(
|
|
616
|
+
if (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
617
|
+
if (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _intervalId)) {
|
|
618
|
+
clearInterval(_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _intervalId));
|
|
619
619
|
}
|
|
620
|
-
|
|
620
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _intervalId, void 0);
|
|
621
621
|
this.emit("empty");
|
|
622
|
-
if (
|
|
622
|
+
if (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _pending) === 0) {
|
|
623
623
|
this.emit("idle");
|
|
624
624
|
}
|
|
625
625
|
return false;
|
|
626
626
|
}
|
|
627
|
-
if (!
|
|
628
|
-
const canInitializeInterval = !
|
|
629
|
-
if (
|
|
630
|
-
const job =
|
|
627
|
+
if (!_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _isPaused)) {
|
|
628
|
+
const canInitializeInterval = !_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _isIntervalPaused, isIntervalPaused_get);
|
|
629
|
+
if (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _doesIntervalAllowAnother, doesIntervalAllowAnother_get) && _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _doesConcurrentAllowAnother, doesConcurrentAllowAnother_get)) {
|
|
630
|
+
const job = _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue2).dequeue();
|
|
631
631
|
if (!job) {
|
|
632
632
|
return false;
|
|
633
633
|
}
|
|
634
634
|
this.emit("active");
|
|
635
635
|
job();
|
|
636
636
|
if (canInitializeInterval) {
|
|
637
|
-
|
|
637
|
+
_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _initializeIntervalIfNeeded, initializeIntervalIfNeeded_fn).call(this);
|
|
638
638
|
}
|
|
639
639
|
return true;
|
|
640
640
|
}
|
|
@@ -643,26 +643,26 @@ tryToStartAnother_fn = function() {
|
|
|
643
643
|
};
|
|
644
644
|
_initializeIntervalIfNeeded = new WeakSet();
|
|
645
645
|
initializeIntervalIfNeeded_fn = function() {
|
|
646
|
-
if (
|
|
646
|
+
if (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _intervalId) !== void 0) {
|
|
647
647
|
return;
|
|
648
648
|
}
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
},
|
|
652
|
-
|
|
649
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _intervalId, setInterval(() => {
|
|
650
|
+
_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _onInterval, onInterval_fn).call(this);
|
|
651
|
+
}, _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _interval)));
|
|
652
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _intervalEnd, Date.now() + _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _interval));
|
|
653
653
|
};
|
|
654
654
|
_onInterval = new WeakSet();
|
|
655
655
|
onInterval_fn = function() {
|
|
656
|
-
if (
|
|
657
|
-
clearInterval(
|
|
658
|
-
|
|
656
|
+
if (_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _intervalCount) === 0 && _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _pending) === 0 && _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _intervalId)) {
|
|
657
|
+
clearInterval(_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _intervalId));
|
|
658
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _intervalId, void 0);
|
|
659
659
|
}
|
|
660
|
-
|
|
661
|
-
|
|
660
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _intervalCount, _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _pending) : 0);
|
|
661
|
+
_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
|
|
662
662
|
};
|
|
663
663
|
_processQueue = new WeakSet();
|
|
664
664
|
processQueue_fn = function() {
|
|
665
|
-
while (
|
|
665
|
+
while (_chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this)) {
|
|
666
666
|
}
|
|
667
667
|
};
|
|
668
668
|
_throwOnAbort = new WeakSet();
|
|
@@ -692,12 +692,12 @@ var _remeda = require('remeda');
|
|
|
692
692
|
var _fs = require('@kubb/fs');
|
|
693
693
|
|
|
694
694
|
// src/BarrelManager.ts
|
|
695
|
-
|
|
695
|
+
_chunk5RQZTPY4cjs.init_cjs_shims.call(void 0, );
|
|
696
696
|
var _parserts = require('@kubb/parser-ts');
|
|
697
697
|
|
|
698
698
|
|
|
699
699
|
// src/utils/TreeNode.ts
|
|
700
|
-
|
|
700
|
+
_chunk5RQZTPY4cjs.init_cjs_shims.call(void 0, );
|
|
701
701
|
var _directorytree = require('directory-tree'); var _directorytree2 = _interopRequireDefault(_directorytree);
|
|
702
702
|
var TreeNode = class _TreeNode {
|
|
703
703
|
constructor(data, parent) {
|
|
@@ -800,8 +800,8 @@ var TreeNode = class _TreeNode {
|
|
|
800
800
|
var _options;
|
|
801
801
|
var BarrelManager = class {
|
|
802
802
|
constructor(options = {}) {
|
|
803
|
-
|
|
804
|
-
|
|
803
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _options, void 0);
|
|
804
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _options, options);
|
|
805
805
|
return this;
|
|
806
806
|
}
|
|
807
807
|
getNamedExport(root, item) {
|
|
@@ -841,7 +841,7 @@ var BarrelManager = class {
|
|
|
841
841
|
})]);
|
|
842
842
|
}
|
|
843
843
|
getIndexes(root) {
|
|
844
|
-
const { treeNode = {}, isTypeOnly, extName } =
|
|
844
|
+
const { treeNode = {}, isTypeOnly, extName } = _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _options);
|
|
845
845
|
const tree = TreeNode.build(root, treeNode);
|
|
846
846
|
if (!tree) {
|
|
847
847
|
return null;
|
|
@@ -853,7 +853,7 @@ var BarrelManager = class {
|
|
|
853
853
|
if (treeNode2.children.length > 1) {
|
|
854
854
|
const indexPath = _path2.default.resolve(treeNode2.data.path, "index.ts");
|
|
855
855
|
const exports = treeNode2.children.filter(Boolean).map((file) => {
|
|
856
|
-
const importPath = file.data.type === "split" ? `./${file.data.name}/index` : `./${
|
|
856
|
+
const importPath = file.data.type === "split" ? `./${file.data.name}/index` : `./${_chunkA52Q24EGcjs.trimExtName.call(void 0, file.data.name)}`;
|
|
857
857
|
if (importPath.endsWith("index") && file.data.type === "single") {
|
|
858
858
|
return void 0;
|
|
859
859
|
}
|
|
@@ -872,7 +872,7 @@ var BarrelManager = class {
|
|
|
872
872
|
} else if (treeNode2.children.length === 1) {
|
|
873
873
|
const [treeNodeChild] = treeNode2.children;
|
|
874
874
|
const indexPath = _path2.default.resolve(treeNode2.data.path, "index.ts");
|
|
875
|
-
const importPath = treeNodeChild.data.type === "split" ? `./${treeNodeChild.data.name}/index` : `./${
|
|
875
|
+
const importPath = treeNodeChild.data.type === "split" ? `./${treeNodeChild.data.name}/index` : `./${_chunkA52Q24EGcjs.trimExtName.call(void 0, treeNodeChild.data.name)}`;
|
|
876
876
|
const exports = [
|
|
877
877
|
{
|
|
878
878
|
path: extName ? `${importPath}${extName}` : importPath,
|
|
@@ -901,31 +901,31 @@ _options = new WeakMap();
|
|
|
901
901
|
var _cache, _task, _queue3, _add, add_fn, _addOrAppend, addOrAppend_fn;
|
|
902
902
|
var _FileManager = class _FileManager {
|
|
903
903
|
constructor({ task = async (file) => file, queue = new PQueue() } = {}) {
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
904
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _add);
|
|
905
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _addOrAppend);
|
|
906
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _cache, /* @__PURE__ */ new Map());
|
|
907
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _task, void 0);
|
|
908
|
+
_chunk5RQZTPY4cjs.__privateAdd.call(void 0, this, _queue3, void 0);
|
|
909
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _task, task);
|
|
910
|
+
_chunk5RQZTPY4cjs.__privateSet.call(void 0, this, _queue3, queue);
|
|
911
911
|
return this;
|
|
912
912
|
}
|
|
913
913
|
get files() {
|
|
914
914
|
const files = [];
|
|
915
|
-
|
|
915
|
+
_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _cache).forEach((item) => {
|
|
916
916
|
files.push(...item.flat(1));
|
|
917
917
|
});
|
|
918
918
|
return files;
|
|
919
919
|
}
|
|
920
920
|
get isExecuting() {
|
|
921
|
-
return
|
|
921
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue3).size !== 0 && _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue3).pending !== 0;
|
|
922
922
|
}
|
|
923
923
|
async add(...files) {
|
|
924
924
|
const promises = combineFiles(files).map((file) => {
|
|
925
925
|
if (file.override) {
|
|
926
|
-
return
|
|
926
|
+
return _chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, file);
|
|
927
927
|
}
|
|
928
|
-
return
|
|
928
|
+
return _chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, file);
|
|
929
929
|
});
|
|
930
930
|
const resolvedFiles = await Promise.all(promises);
|
|
931
931
|
if (files.length > 1) {
|
|
@@ -939,11 +939,11 @@ var _FileManager = class _FileManager {
|
|
|
939
939
|
return void 0;
|
|
940
940
|
}
|
|
941
941
|
const pathToBuildFrom = _path.resolve.call(void 0, root, output.path);
|
|
942
|
-
if (
|
|
942
|
+
if (_chunkA52Q24EGcjs.transformers_default.trimExtName(pathToBuildFrom).endsWith("index")) {
|
|
943
943
|
logger.emit("warning", "Output has the same fileName as the barrelFiles, please disable barrel generation");
|
|
944
944
|
return;
|
|
945
945
|
}
|
|
946
|
-
const exportPath = output.path.startsWith("./") ?
|
|
946
|
+
const exportPath = output.path.startsWith("./") ? _chunkA52Q24EGcjs.trimExtName.call(void 0, output.path) : `./${_chunkA52Q24EGcjs.trimExtName.call(void 0, output.path)}`;
|
|
947
947
|
const mode = _FileManager.getMode(output.path);
|
|
948
948
|
const barrelManager = new BarrelManager({
|
|
949
949
|
extName: output.extName,
|
|
@@ -966,7 +966,7 @@ var _FileManager = class _FileManager {
|
|
|
966
966
|
}
|
|
967
967
|
await Promise.all(
|
|
968
968
|
files.map((file) => {
|
|
969
|
-
return
|
|
969
|
+
return _chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, {
|
|
970
970
|
...file,
|
|
971
971
|
meta: meta ? meta : file.meta
|
|
972
972
|
});
|
|
@@ -993,27 +993,27 @@ var _FileManager = class _FileManager {
|
|
|
993
993
|
if (exportType === "barrelNamed" && !output.exportAs && _optionalChain([rootFile, 'access', _32 => _32.exports, 'optionalAccess', _33 => _33[0]])) {
|
|
994
994
|
rootFile.exports = barrelManager.getNamedExport(root, rootFile.exports[0]);
|
|
995
995
|
}
|
|
996
|
-
await
|
|
996
|
+
await _chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, {
|
|
997
997
|
...rootFile,
|
|
998
998
|
meta: meta ? meta : rootFile.meta
|
|
999
999
|
});
|
|
1000
1000
|
}
|
|
1001
1001
|
getCacheByUUID(UUID) {
|
|
1002
1002
|
let cache;
|
|
1003
|
-
|
|
1003
|
+
_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _cache).forEach((files) => {
|
|
1004
1004
|
cache = files.find((item) => item.id === UUID);
|
|
1005
1005
|
});
|
|
1006
1006
|
return cache;
|
|
1007
1007
|
}
|
|
1008
1008
|
get(path2) {
|
|
1009
|
-
return
|
|
1009
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _cache).get(path2);
|
|
1010
1010
|
}
|
|
1011
1011
|
remove(path2) {
|
|
1012
1012
|
const cacheItem = this.get(path2);
|
|
1013
1013
|
if (!cacheItem) {
|
|
1014
1014
|
return;
|
|
1015
1015
|
}
|
|
1016
|
-
|
|
1016
|
+
_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _cache).delete(path2);
|
|
1017
1017
|
}
|
|
1018
1018
|
async write(...params) {
|
|
1019
1019
|
return _fs.write.call(void 0, ...params);
|
|
@@ -1049,7 +1049,7 @@ add_fn = async function(file) {
|
|
|
1049
1049
|
const controller = new AbortController();
|
|
1050
1050
|
const resolvedFile = {
|
|
1051
1051
|
id: _crypto2.default.randomUUID(),
|
|
1052
|
-
name:
|
|
1052
|
+
name: _chunkA52Q24EGcjs.trimExtName.call(void 0, file.baseName),
|
|
1053
1053
|
...file
|
|
1054
1054
|
};
|
|
1055
1055
|
if (_optionalChain([resolvedFile, 'access', _34 => _34.exports, 'optionalAccess', _35 => _35.length])) {
|
|
@@ -1062,22 +1062,22 @@ add_fn = async function(file) {
|
|
|
1062
1062
|
return true;
|
|
1063
1063
|
});
|
|
1064
1064
|
}
|
|
1065
|
-
|
|
1066
|
-
return
|
|
1065
|
+
_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _cache).set(resolvedFile.path, [{ cancel: () => controller.abort(), ...resolvedFile }]);
|
|
1066
|
+
return _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _queue3).add(
|
|
1067
1067
|
async () => {
|
|
1068
1068
|
var _a;
|
|
1069
|
-
return (_a =
|
|
1069
|
+
return (_a = _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _task)) == null ? void 0 : _a.call(this, resolvedFile);
|
|
1070
1070
|
},
|
|
1071
1071
|
{ signal: controller.signal }
|
|
1072
1072
|
);
|
|
1073
1073
|
};
|
|
1074
1074
|
_addOrAppend = new WeakSet();
|
|
1075
1075
|
addOrAppend_fn = async function(file) {
|
|
1076
|
-
const previousCaches =
|
|
1076
|
+
const previousCaches = _chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _cache).get(file.path);
|
|
1077
1077
|
const previousCache = previousCaches ? previousCaches.at(previousCaches.length - 1) : void 0;
|
|
1078
1078
|
if (previousCache) {
|
|
1079
|
-
|
|
1080
|
-
return
|
|
1079
|
+
_chunk5RQZTPY4cjs.__privateGet.call(void 0, this, _cache).delete(previousCache.path);
|
|
1080
|
+
return _chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, {
|
|
1081
1081
|
...file,
|
|
1082
1082
|
source: previousCache.source && file.source ? `${previousCache.source}
|
|
1083
1083
|
${file.source}` : "",
|
|
@@ -1086,7 +1086,7 @@ ${file.source}` : "",
|
|
|
1086
1086
|
env: { ...previousCache.env || {}, ...file.env || {} }
|
|
1087
1087
|
});
|
|
1088
1088
|
}
|
|
1089
|
-
return
|
|
1089
|
+
return _chunk5RQZTPY4cjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, file);
|
|
1090
1090
|
};
|
|
1091
1091
|
var FileManager = _FileManager;
|
|
1092
1092
|
function combineFiles(files) {
|
|
@@ -1124,12 +1124,12 @@ async function getSource(file) {
|
|
|
1124
1124
|
if (file.language ? !["typescript", "javascript"].includes(file.language) : !FileManager.isJavascript(file.baseName)) {
|
|
1125
1125
|
return file.source;
|
|
1126
1126
|
}
|
|
1127
|
-
const parser = await
|
|
1127
|
+
const parser = await _chunk4RS4YXDVcjs.getParser.call(void 0, file.language);
|
|
1128
1128
|
const exports = file.exports ? combineExports(file.exports) : [];
|
|
1129
1129
|
const imports = file.imports && file.source ? combineImports(file.imports, exports, file.source) : [];
|
|
1130
1130
|
const importNodes = imports.filter((item) => {
|
|
1131
1131
|
const path2 = item.root ? _fs.getRelativePath.call(void 0, item.root, item.path) : item.path;
|
|
1132
|
-
return path2 !==
|
|
1132
|
+
return path2 !== _chunkA52Q24EGcjs.trimExtName.call(void 0, file.path);
|
|
1133
1133
|
}).map((item) => {
|
|
1134
1134
|
return parser.factory.createImportDeclaration({
|
|
1135
1135
|
name: item.name,
|
|
@@ -1149,7 +1149,7 @@ async function getSource(file) {
|
|
|
1149
1149
|
return parser.print([], { source, noEmitHelpers: false });
|
|
1150
1150
|
}
|
|
1151
1151
|
function combineExports(exports) {
|
|
1152
|
-
const combinedExports =
|
|
1152
|
+
const combinedExports = _chunkLH6XB2NBcjs.orderBy.call(void 0, exports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
|
|
1153
1153
|
(prev, curr) => {
|
|
1154
1154
|
const name = curr.name;
|
|
1155
1155
|
const prevByPath = prev.findLast((imp) => imp.path === curr.path);
|
|
@@ -1180,10 +1180,10 @@ function combineExports(exports) {
|
|
|
1180
1180
|
},
|
|
1181
1181
|
[]
|
|
1182
1182
|
);
|
|
1183
|
-
return
|
|
1183
|
+
return _chunkLH6XB2NBcjs.orderBy.call(void 0, combinedExports, [(v) => !v.isTypeOnly, (v) => v.asAlias], ["desc", "desc"]);
|
|
1184
1184
|
}
|
|
1185
1185
|
function combineImports(imports, exports, source) {
|
|
1186
|
-
const combinedImports =
|
|
1186
|
+
const combinedImports = _chunkLH6XB2NBcjs.orderBy.call(void 0, imports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
|
|
1187
1187
|
(prev, curr) => {
|
|
1188
1188
|
let name = Array.isArray(curr.name) ? [...new Set(curr.name)] : curr.name;
|
|
1189
1189
|
const hasImportInSource = (importName) => {
|
|
@@ -1228,7 +1228,7 @@ function combineImports(imports, exports, source) {
|
|
|
1228
1228
|
},
|
|
1229
1229
|
[]
|
|
1230
1230
|
);
|
|
1231
|
-
return
|
|
1231
|
+
return _chunkLH6XB2NBcjs.orderBy.call(void 0, combinedImports, [(v) => !v.isTypeOnly], ["desc"]);
|
|
1232
1232
|
}
|
|
1233
1233
|
function getEnvSource(source, env) {
|
|
1234
1234
|
if (!env) {
|
|
@@ -1245,13 +1245,13 @@ function getEnvSource(source, env) {
|
|
|
1245
1245
|
throw new TypeError(`Environment should be in upperCase for ${key}`);
|
|
1246
1246
|
}
|
|
1247
1247
|
if (typeof replaceBy === "string") {
|
|
1248
|
-
prev =
|
|
1248
|
+
prev = _chunkA52Q24EGcjs.searchAndReplace.call(void 0, {
|
|
1249
1249
|
text: prev.replaceAll(`process.env.${key}`, replaceBy),
|
|
1250
1250
|
replaceBy,
|
|
1251
1251
|
prefix: "process.env",
|
|
1252
1252
|
key
|
|
1253
1253
|
});
|
|
1254
|
-
prev =
|
|
1254
|
+
prev = _chunkA52Q24EGcjs.searchAndReplace.call(void 0, {
|
|
1255
1255
|
text: prev.replaceAll(/(declare const).*\n/gi, ""),
|
|
1256
1256
|
replaceBy,
|
|
1257
1257
|
key
|
|
@@ -1265,4 +1265,4 @@ function getEnvSource(source, env) {
|
|
|
1265
1265
|
|
|
1266
1266
|
|
|
1267
1267
|
exports.PQueue = PQueue; exports.FileManager = FileManager;
|
|
1268
|
-
//# sourceMappingURL=chunk-
|
|
1268
|
+
//# sourceMappingURL=chunk-43IC6DSU.cjs.map
|