@kubb/core 3.0.0-alpha.0 → 3.0.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/FileManager-BW--rO8q.d.ts +437 -0
- package/dist/FileManager-Bw-FNS3q.d.cts +437 -0
- package/dist/{chunk-XRC6KXC3.cjs → chunk-67C6RBGQ.cjs} +5 -5
- package/dist/{chunk-XRC6KXC3.cjs.map → chunk-67C6RBGQ.cjs.map} +1 -1
- package/dist/{chunk-Y3LLJA4H.cjs → chunk-ADC5UNZ5.cjs} +145 -145
- package/dist/{chunk-Y3LLJA4H.cjs.map → chunk-ADC5UNZ5.cjs.map} +1 -1
- package/dist/{chunk-XRUOSVKX.cjs → chunk-LM2YQC3T.cjs} +12 -12
- package/dist/{chunk-XRUOSVKX.cjs.map → chunk-LM2YQC3T.cjs.map} +1 -1
- package/dist/{chunk-DKW7IBJV.cjs → chunk-PZT4CTBV.cjs} +18 -18
- package/dist/{chunk-DKW7IBJV.cjs.map → chunk-PZT4CTBV.cjs.map} +1 -1
- package/dist/{chunk-LKXUCYWU.cjs → chunk-XCPFG6DO.cjs} +3 -3
- package/dist/chunk-XCPFG6DO.cjs.map +1 -0
- package/dist/{chunk-OPOT6TCT.cjs → chunk-YTSNYMHW.cjs} +28 -28
- package/dist/{chunk-OPOT6TCT.cjs.map → chunk-YTSNYMHW.cjs.map} +1 -1
- package/dist/index.cjs +152 -196
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -465
- package/dist/index.d.ts +10 -465
- package/dist/index.js +11 -55
- package/dist/index.js.map +1 -1
- package/dist/logger.cjs +3 -3
- package/dist/mocks.cjs +8 -8
- package/dist/mocks.d.cts +1 -1
- package/dist/mocks.d.ts +1 -1
- package/dist/transformers.cjs +4 -4
- package/dist/utils.cjs +4 -4
- package/package.json +9 -12
- package/src/PluginManager.ts +10 -19
- package/src/build.ts +3 -52
- package/src/index.ts +0 -3
- package/src/plugin.ts +1 -1
- package/src/types.ts +12 -37
- package/dist/chunk-LKXUCYWU.cjs.map +0 -1
- package/globals.d.ts +0 -49
- package/src/kubb.ts +0 -11
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunkPZT4CTBVcjs = require('./chunk-PZT4CTBV.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkYTSNYMHWcjs = require('./chunk-YTSNYMHW.cjs');
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunk67C6RBGQcjs = require('./chunk-67C6RBGQ.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
|
@@ -19,13 +19,13 @@ var _chunkXRC6KXC3cjs = require('./chunk-XRC6KXC3.cjs');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkXCPFG6DOcjs = require('./chunk-XCPFG6DO.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 = _chunkXCPFG6DOcjs.__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
|
+
_chunkXCPFG6DOcjs.init_cjs_shims.call(void 0, );
|
|
29
29
|
var has = Object.prototype.hasOwnProperty;
|
|
30
30
|
var prefix = "~";
|
|
31
31
|
function Events() {
|
|
@@ -185,19 +185,19 @@ var require_eventemitter3 = _chunkLKXUCYWUcjs.__commonJS.call(void 0, {
|
|
|
185
185
|
});
|
|
186
186
|
|
|
187
187
|
// src/FileManager.ts
|
|
188
|
-
|
|
188
|
+
_chunkXCPFG6DOcjs.init_cjs_shims.call(void 0, );
|
|
189
189
|
var _crypto = require('crypto'); var _crypto2 = _interopRequireDefault(_crypto);
|
|
190
190
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
191
191
|
|
|
192
192
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.js
|
|
193
|
-
|
|
193
|
+
_chunkXCPFG6DOcjs.init_cjs_shims.call(void 0, );
|
|
194
194
|
|
|
195
195
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
|
|
196
|
-
|
|
197
|
-
var import_index =
|
|
196
|
+
_chunkXCPFG6DOcjs.init_cjs_shims.call(void 0, );
|
|
197
|
+
var import_index = _chunkXCPFG6DOcjs.__toESM.call(void 0, require_eventemitter3(), 1);
|
|
198
198
|
|
|
199
199
|
// ../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js
|
|
200
|
-
|
|
200
|
+
_chunkXCPFG6DOcjs.init_cjs_shims.call(void 0, );
|
|
201
201
|
var TimeoutError = class extends Error {
|
|
202
202
|
constructor(message) {
|
|
203
203
|
super(message);
|
|
@@ -282,10 +282,10 @@ function pTimeout(promise, options) {
|
|
|
282
282
|
}
|
|
283
283
|
|
|
284
284
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.js
|
|
285
|
-
|
|
285
|
+
_chunkXCPFG6DOcjs.init_cjs_shims.call(void 0, );
|
|
286
286
|
|
|
287
287
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.js
|
|
288
|
-
|
|
288
|
+
_chunkXCPFG6DOcjs.init_cjs_shims.call(void 0, );
|
|
289
289
|
function lowerBound(array, value, comparator) {
|
|
290
290
|
let first = 0;
|
|
291
291
|
let count = array.length;
|
|
@@ -306,7 +306,7 @@ function lowerBound(array, value, comparator) {
|
|
|
306
306
|
var _queue;
|
|
307
307
|
var PriorityQueue = class {
|
|
308
308
|
constructor() {
|
|
309
|
-
|
|
309
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _queue, []);
|
|
310
310
|
}
|
|
311
311
|
enqueue(run, options) {
|
|
312
312
|
options = {
|
|
@@ -317,22 +317,22 @@ var PriorityQueue = class {
|
|
|
317
317
|
priority: options.priority,
|
|
318
318
|
run
|
|
319
319
|
};
|
|
320
|
-
if (this.size &&
|
|
321
|
-
|
|
320
|
+
if (this.size && _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue)[this.size - 1].priority >= options.priority) {
|
|
321
|
+
_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue).push(element);
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
|
-
const index = lowerBound(
|
|
325
|
-
|
|
324
|
+
const index = lowerBound(_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue), element, (a, b) => b.priority - a.priority);
|
|
325
|
+
_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue).splice(index, 0, element);
|
|
326
326
|
}
|
|
327
327
|
dequeue() {
|
|
328
|
-
const item =
|
|
328
|
+
const item = _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue).shift();
|
|
329
329
|
return _optionalChain([item, 'optionalAccess', _2 => _2.run]);
|
|
330
330
|
}
|
|
331
331
|
filter(options) {
|
|
332
|
-
return
|
|
332
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue).filter((element) => element.priority === options.priority).map((element) => element.run);
|
|
333
333
|
}
|
|
334
334
|
get size() {
|
|
335
|
-
return
|
|
335
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue).length;
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
_queue = new WeakMap();
|
|
@@ -343,28 +343,28 @@ var PQueue = class extends import_index.default {
|
|
|
343
343
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
344
344
|
constructor(options) {
|
|
345
345
|
super();
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
346
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _PQueue_instances);
|
|
347
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _carryoverConcurrencyCount);
|
|
348
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _isIntervalIgnored);
|
|
349
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _intervalCount, 0);
|
|
350
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _intervalCap);
|
|
351
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _interval);
|
|
352
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _intervalEnd, 0);
|
|
353
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _intervalId);
|
|
354
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _timeoutId);
|
|
355
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _queue2);
|
|
356
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _queueClass);
|
|
357
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _pending, 0);
|
|
358
358
|
// The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
359
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _concurrency);
|
|
360
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _isPaused);
|
|
361
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _throwOnTimeout);
|
|
362
362
|
/**
|
|
363
363
|
Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
|
|
364
364
|
|
|
365
365
|
Applies to each future operation.
|
|
366
366
|
*/
|
|
367
|
-
|
|
367
|
+
_chunkXCPFG6DOcjs.__publicField.call(void 0, this, "timeout");
|
|
368
368
|
options = {
|
|
369
369
|
carryoverConcurrencyCount: false,
|
|
370
370
|
intervalCap: Number.POSITIVE_INFINITY,
|
|
@@ -380,37 +380,37 @@ var PQueue = class extends import_index.default {
|
|
|
380
380
|
if (options.interval === void 0 || !(Number.isFinite(options.interval) && options.interval >= 0)) {
|
|
381
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})`);
|
|
382
382
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
383
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _carryoverConcurrencyCount, options.carryoverConcurrencyCount);
|
|
384
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _isIntervalIgnored, options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0);
|
|
385
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _intervalCap, options.intervalCap);
|
|
386
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _interval, options.interval);
|
|
387
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _queue2, new options.queueClass());
|
|
388
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _queueClass, options.queueClass);
|
|
389
389
|
this.concurrency = options.concurrency;
|
|
390
390
|
this.timeout = options.timeout;
|
|
391
|
-
|
|
392
|
-
|
|
391
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _throwOnTimeout, options.throwOnTimeout === true);
|
|
392
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _isPaused, options.autoStart === false);
|
|
393
393
|
}
|
|
394
394
|
get concurrency() {
|
|
395
|
-
return
|
|
395
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _concurrency);
|
|
396
396
|
}
|
|
397
397
|
set concurrency(newConcurrency) {
|
|
398
398
|
if (!(typeof newConcurrency === "number" && newConcurrency >= 1)) {
|
|
399
399
|
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${newConcurrency}\` (${typeof newConcurrency})`);
|
|
400
400
|
}
|
|
401
|
-
|
|
402
|
-
|
|
401
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _concurrency, newConcurrency);
|
|
402
|
+
_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, processQueue_fn).call(this);
|
|
403
403
|
}
|
|
404
404
|
async add(function_, options = {}) {
|
|
405
405
|
options = {
|
|
406
406
|
timeout: this.timeout,
|
|
407
|
-
throwOnTimeout:
|
|
407
|
+
throwOnTimeout: _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _throwOnTimeout),
|
|
408
408
|
...options
|
|
409
409
|
};
|
|
410
410
|
return new Promise((resolve2, reject) => {
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
411
|
+
_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue2).enqueue(async () => {
|
|
412
|
+
_chunkXCPFG6DOcjs.__privateWrapper.call(void 0, this, _pending)._++;
|
|
413
|
+
_chunkXCPFG6DOcjs.__privateWrapper.call(void 0, this, _intervalCount)._++;
|
|
414
414
|
try {
|
|
415
415
|
_optionalChain([options, 'access', _9 => _9.signal, 'optionalAccess', _10 => _10.throwIfAborted, 'call', _11 => _11()]);
|
|
416
416
|
let operation = function_({ signal: options.signal });
|
|
@@ -418,7 +418,7 @@ var PQueue = class extends import_index.default {
|
|
|
418
418
|
operation = pTimeout(Promise.resolve(operation), { milliseconds: options.timeout });
|
|
419
419
|
}
|
|
420
420
|
if (options.signal) {
|
|
421
|
-
operation = Promise.race([operation,
|
|
421
|
+
operation = Promise.race([operation, _chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, throwOnAbort_fn).call(this, options.signal)]);
|
|
422
422
|
}
|
|
423
423
|
const result = await operation;
|
|
424
424
|
resolve2(result);
|
|
@@ -431,11 +431,11 @@ var PQueue = class extends import_index.default {
|
|
|
431
431
|
reject(error);
|
|
432
432
|
this.emit("error", error);
|
|
433
433
|
} finally {
|
|
434
|
-
|
|
434
|
+
_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, next_fn).call(this);
|
|
435
435
|
}
|
|
436
436
|
}, options);
|
|
437
437
|
this.emit("add");
|
|
438
|
-
|
|
438
|
+
_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, tryToStartAnother_fn).call(this);
|
|
439
439
|
});
|
|
440
440
|
}
|
|
441
441
|
async addAll(functions, options) {
|
|
@@ -445,24 +445,24 @@ var PQueue = class extends import_index.default {
|
|
|
445
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.)
|
|
446
446
|
*/
|
|
447
447
|
start() {
|
|
448
|
-
if (!
|
|
448
|
+
if (!_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _isPaused)) {
|
|
449
449
|
return this;
|
|
450
450
|
}
|
|
451
|
-
|
|
452
|
-
|
|
451
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _isPaused, false);
|
|
452
|
+
_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, processQueue_fn).call(this);
|
|
453
453
|
return this;
|
|
454
454
|
}
|
|
455
455
|
/**
|
|
456
456
|
Put queue execution on hold.
|
|
457
457
|
*/
|
|
458
458
|
pause() {
|
|
459
|
-
|
|
459
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _isPaused, true);
|
|
460
460
|
}
|
|
461
461
|
/**
|
|
462
462
|
Clear the queue.
|
|
463
463
|
*/
|
|
464
464
|
clear() {
|
|
465
|
-
|
|
465
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _queue2, new (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queueClass))());
|
|
466
466
|
}
|
|
467
467
|
/**
|
|
468
468
|
Can be called multiple times. Useful if you for example add additional items at a later time.
|
|
@@ -470,10 +470,10 @@ var PQueue = class extends import_index.default {
|
|
|
470
470
|
@returns A promise that settles when the queue becomes empty.
|
|
471
471
|
*/
|
|
472
472
|
async onEmpty() {
|
|
473
|
-
if (
|
|
473
|
+
if (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
474
474
|
return;
|
|
475
475
|
}
|
|
476
|
-
await
|
|
476
|
+
await _chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, onEvent_fn).call(this, "empty");
|
|
477
477
|
}
|
|
478
478
|
/**
|
|
479
479
|
@returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
|
|
@@ -483,10 +483,10 @@ var PQueue = class extends import_index.default {
|
|
|
483
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.
|
|
484
484
|
*/
|
|
485
485
|
async onSizeLessThan(limit) {
|
|
486
|
-
if (
|
|
486
|
+
if (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue2).size < limit) {
|
|
487
487
|
return;
|
|
488
488
|
}
|
|
489
|
-
await
|
|
489
|
+
await _chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, onEvent_fn).call(this, "next", () => _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue2).size < limit);
|
|
490
490
|
}
|
|
491
491
|
/**
|
|
492
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.
|
|
@@ -494,16 +494,16 @@ var PQueue = class extends import_index.default {
|
|
|
494
494
|
@returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
|
|
495
495
|
*/
|
|
496
496
|
async onIdle() {
|
|
497
|
-
if (
|
|
497
|
+
if (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _pending) === 0 && _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
498
498
|
return;
|
|
499
499
|
}
|
|
500
|
-
await
|
|
500
|
+
await _chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, onEvent_fn).call(this, "idle");
|
|
501
501
|
}
|
|
502
502
|
/**
|
|
503
503
|
Size of the queue, the number of queued items waiting to run.
|
|
504
504
|
*/
|
|
505
505
|
get size() {
|
|
506
|
-
return
|
|
506
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue2).size;
|
|
507
507
|
}
|
|
508
508
|
/**
|
|
509
509
|
Size of the queue, filtered by the given options.
|
|
@@ -511,19 +511,19 @@ var PQueue = class extends import_index.default {
|
|
|
511
511
|
For example, this can be used to find the number of items remaining in the queue with a specific priority level.
|
|
512
512
|
*/
|
|
513
513
|
sizeBy(options) {
|
|
514
|
-
return
|
|
514
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue2).filter(options).length;
|
|
515
515
|
}
|
|
516
516
|
/**
|
|
517
517
|
Number of running items (no longer in the queue).
|
|
518
518
|
*/
|
|
519
519
|
get pending() {
|
|
520
|
-
return
|
|
520
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _pending);
|
|
521
521
|
}
|
|
522
522
|
/**
|
|
523
523
|
Whether the queue is currently paused.
|
|
524
524
|
*/
|
|
525
525
|
get isPaused() {
|
|
526
|
-
return
|
|
526
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _isPaused);
|
|
527
527
|
}
|
|
528
528
|
};
|
|
529
529
|
_carryoverConcurrencyCount = new WeakMap();
|
|
@@ -542,31 +542,31 @@ _isPaused = new WeakMap();
|
|
|
542
542
|
_throwOnTimeout = new WeakMap();
|
|
543
543
|
_PQueue_instances = new WeakSet();
|
|
544
544
|
doesIntervalAllowAnother_get = function() {
|
|
545
|
-
return
|
|
545
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _intervalCount) < _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _intervalCap);
|
|
546
546
|
};
|
|
547
547
|
doesConcurrentAllowAnother_get = function() {
|
|
548
|
-
return
|
|
548
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _pending) < _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _concurrency);
|
|
549
549
|
};
|
|
550
550
|
next_fn = function() {
|
|
551
|
-
|
|
552
|
-
|
|
551
|
+
_chunkXCPFG6DOcjs.__privateWrapper.call(void 0, this, _pending)._--;
|
|
552
|
+
_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, tryToStartAnother_fn).call(this);
|
|
553
553
|
this.emit("next");
|
|
554
554
|
};
|
|
555
555
|
onResumeInterval_fn = function() {
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
556
|
+
_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, onInterval_fn).call(this);
|
|
557
|
+
_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, initializeIntervalIfNeeded_fn).call(this);
|
|
558
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _timeoutId, void 0);
|
|
559
559
|
};
|
|
560
560
|
isIntervalPaused_get = function() {
|
|
561
561
|
const now = Date.now();
|
|
562
|
-
if (
|
|
563
|
-
const delay =
|
|
562
|
+
if (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _intervalId) === void 0) {
|
|
563
|
+
const delay = _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _intervalEnd) - now;
|
|
564
564
|
if (delay < 0) {
|
|
565
|
-
|
|
565
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _intervalCount, _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _pending) : 0);
|
|
566
566
|
} else {
|
|
567
|
-
if (
|
|
568
|
-
|
|
569
|
-
|
|
567
|
+
if (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _timeoutId) === void 0) {
|
|
568
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _timeoutId, setTimeout(() => {
|
|
569
|
+
_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, onResumeInterval_fn).call(this);
|
|
570
570
|
}, delay));
|
|
571
571
|
}
|
|
572
572
|
return true;
|
|
@@ -575,28 +575,28 @@ isIntervalPaused_get = function() {
|
|
|
575
575
|
return false;
|
|
576
576
|
};
|
|
577
577
|
tryToStartAnother_fn = function() {
|
|
578
|
-
if (
|
|
579
|
-
if (
|
|
580
|
-
clearInterval(
|
|
578
|
+
if (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
579
|
+
if (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _intervalId)) {
|
|
580
|
+
clearInterval(_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _intervalId));
|
|
581
581
|
}
|
|
582
|
-
|
|
582
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _intervalId, void 0);
|
|
583
583
|
this.emit("empty");
|
|
584
|
-
if (
|
|
584
|
+
if (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _pending) === 0) {
|
|
585
585
|
this.emit("idle");
|
|
586
586
|
}
|
|
587
587
|
return false;
|
|
588
588
|
}
|
|
589
|
-
if (!
|
|
590
|
-
const canInitializeInterval = !
|
|
591
|
-
if (
|
|
592
|
-
const job =
|
|
589
|
+
if (!_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _isPaused)) {
|
|
590
|
+
const canInitializeInterval = !_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _PQueue_instances, isIntervalPaused_get);
|
|
591
|
+
if (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _PQueue_instances, doesIntervalAllowAnother_get) && _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _PQueue_instances, doesConcurrentAllowAnother_get)) {
|
|
592
|
+
const job = _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue2).dequeue();
|
|
593
593
|
if (!job) {
|
|
594
594
|
return false;
|
|
595
595
|
}
|
|
596
596
|
this.emit("active");
|
|
597
597
|
job();
|
|
598
598
|
if (canInitializeInterval) {
|
|
599
|
-
|
|
599
|
+
_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, initializeIntervalIfNeeded_fn).call(this);
|
|
600
600
|
}
|
|
601
601
|
return true;
|
|
602
602
|
}
|
|
@@ -604,27 +604,27 @@ tryToStartAnother_fn = function() {
|
|
|
604
604
|
return false;
|
|
605
605
|
};
|
|
606
606
|
initializeIntervalIfNeeded_fn = function() {
|
|
607
|
-
if (
|
|
607
|
+
if (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _intervalId) !== void 0) {
|
|
608
608
|
return;
|
|
609
609
|
}
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
},
|
|
613
|
-
|
|
610
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _intervalId, setInterval(() => {
|
|
611
|
+
_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, onInterval_fn).call(this);
|
|
612
|
+
}, _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _interval)));
|
|
613
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _intervalEnd, Date.now() + _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _interval));
|
|
614
614
|
};
|
|
615
615
|
onInterval_fn = function() {
|
|
616
|
-
if (
|
|
617
|
-
clearInterval(
|
|
618
|
-
|
|
616
|
+
if (_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _intervalCount) === 0 && _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _pending) === 0 && _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _intervalId)) {
|
|
617
|
+
clearInterval(_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _intervalId));
|
|
618
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _intervalId, void 0);
|
|
619
619
|
}
|
|
620
|
-
|
|
621
|
-
|
|
620
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _intervalCount, _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _pending) : 0);
|
|
621
|
+
_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, processQueue_fn).call(this);
|
|
622
622
|
};
|
|
623
623
|
/**
|
|
624
624
|
Executes all queued functions until it reaches the limit.
|
|
625
625
|
*/
|
|
626
626
|
processQueue_fn = function() {
|
|
627
|
-
while (
|
|
627
|
+
while (_chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _PQueue_instances, tryToStartAnother_fn).call(this)) {
|
|
628
628
|
}
|
|
629
629
|
};
|
|
630
630
|
throwOnAbort_fn = async function(signal) {
|
|
@@ -652,12 +652,12 @@ var _remeda = require('remeda');
|
|
|
652
652
|
var _fs = require('@kubb/fs');
|
|
653
653
|
|
|
654
654
|
// src/BarrelManager.ts
|
|
655
|
-
|
|
655
|
+
_chunkXCPFG6DOcjs.init_cjs_shims.call(void 0, );
|
|
656
656
|
var _parserts = require('@kubb/parser-ts');
|
|
657
657
|
|
|
658
658
|
|
|
659
659
|
// src/utils/TreeNode.ts
|
|
660
|
-
|
|
660
|
+
_chunkXCPFG6DOcjs.init_cjs_shims.call(void 0, );
|
|
661
661
|
var _directorytree = require('directory-tree'); var _directorytree2 = _interopRequireDefault(_directorytree);
|
|
662
662
|
var TreeNode = class _TreeNode {
|
|
663
663
|
constructor(data, parent) {
|
|
@@ -760,8 +760,8 @@ var TreeNode = class _TreeNode {
|
|
|
760
760
|
var _options;
|
|
761
761
|
var BarrelManager = class {
|
|
762
762
|
constructor(options = {}) {
|
|
763
|
-
|
|
764
|
-
|
|
763
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _options);
|
|
764
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _options, options);
|
|
765
765
|
return this;
|
|
766
766
|
}
|
|
767
767
|
getNamedExport(root, item) {
|
|
@@ -801,7 +801,7 @@ var BarrelManager = class {
|
|
|
801
801
|
})]);
|
|
802
802
|
}
|
|
803
803
|
getIndexes(root) {
|
|
804
|
-
const { treeNode = {}, isTypeOnly, extName } =
|
|
804
|
+
const { treeNode = {}, isTypeOnly, extName } = _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _options);
|
|
805
805
|
const tree = TreeNode.build(root, treeNode);
|
|
806
806
|
if (!tree) {
|
|
807
807
|
return null;
|
|
@@ -813,7 +813,7 @@ var BarrelManager = class {
|
|
|
813
813
|
if (treeNode2.children.length > 1) {
|
|
814
814
|
const indexPath = _path2.default.resolve(treeNode2.data.path, "index.ts");
|
|
815
815
|
const exports = treeNode2.children.filter(Boolean).map((file) => {
|
|
816
|
-
const importPath = file.data.type === "split" ? `./${file.data.name}/index` : `./${
|
|
816
|
+
const importPath = file.data.type === "split" ? `./${file.data.name}/index` : `./${_chunkPZT4CTBVcjs.trimExtName.call(void 0, file.data.name)}`;
|
|
817
817
|
if (importPath.endsWith("index") && file.data.type === "single") {
|
|
818
818
|
return void 0;
|
|
819
819
|
}
|
|
@@ -832,7 +832,7 @@ var BarrelManager = class {
|
|
|
832
832
|
} else if (treeNode2.children.length === 1) {
|
|
833
833
|
const [treeNodeChild] = treeNode2.children;
|
|
834
834
|
const indexPath = _path2.default.resolve(treeNode2.data.path, "index.ts");
|
|
835
|
-
const importPath = treeNodeChild.data.type === "split" ? `./${treeNodeChild.data.name}/index` : `./${
|
|
835
|
+
const importPath = treeNodeChild.data.type === "split" ? `./${treeNodeChild.data.name}/index` : `./${_chunkPZT4CTBVcjs.trimExtName.call(void 0, treeNodeChild.data.name)}`;
|
|
836
836
|
const exports = [
|
|
837
837
|
{
|
|
838
838
|
path: extName ? `${importPath}${extName}` : importPath,
|
|
@@ -861,30 +861,30 @@ _options = new WeakMap();
|
|
|
861
861
|
var _cache, _task, _queue3, _FileManager_instances, add_fn, addOrAppend_fn;
|
|
862
862
|
var _FileManager = class _FileManager {
|
|
863
863
|
constructor({ task = async (file) => file, queue = new PQueue() } = {}) {
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
864
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _FileManager_instances);
|
|
865
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _cache, /* @__PURE__ */ new Map());
|
|
866
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _task);
|
|
867
|
+
_chunkXCPFG6DOcjs.__privateAdd.call(void 0, this, _queue3);
|
|
868
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _task, task);
|
|
869
|
+
_chunkXCPFG6DOcjs.__privateSet.call(void 0, this, _queue3, queue);
|
|
870
870
|
return this;
|
|
871
871
|
}
|
|
872
872
|
get files() {
|
|
873
873
|
const files = [];
|
|
874
|
-
|
|
874
|
+
_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _cache).forEach((item) => {
|
|
875
875
|
files.push(...item.flat(1));
|
|
876
876
|
});
|
|
877
877
|
return files;
|
|
878
878
|
}
|
|
879
879
|
get isExecuting() {
|
|
880
|
-
return
|
|
880
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue3).size !== 0 && _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue3).pending !== 0;
|
|
881
881
|
}
|
|
882
882
|
async add(...files) {
|
|
883
883
|
const promises = combineFiles(files).map((file) => {
|
|
884
884
|
if (file.override) {
|
|
885
|
-
return
|
|
885
|
+
return _chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _FileManager_instances, add_fn).call(this, file);
|
|
886
886
|
}
|
|
887
|
-
return
|
|
887
|
+
return _chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _FileManager_instances, addOrAppend_fn).call(this, file);
|
|
888
888
|
});
|
|
889
889
|
const resolvedFiles = await Promise.all(promises);
|
|
890
890
|
if (files.length > 1) {
|
|
@@ -898,11 +898,11 @@ var _FileManager = class _FileManager {
|
|
|
898
898
|
return void 0;
|
|
899
899
|
}
|
|
900
900
|
const pathToBuildFrom = _path.resolve.call(void 0, root, output.path);
|
|
901
|
-
if (
|
|
901
|
+
if (_chunkPZT4CTBVcjs.transformers_default.trimExtName(pathToBuildFrom).endsWith("index")) {
|
|
902
902
|
logger.emit("warning", "Output has the same fileName as the barrelFiles, please disable barrel generation");
|
|
903
903
|
return;
|
|
904
904
|
}
|
|
905
|
-
const exportPath = output.path.startsWith("./") ?
|
|
905
|
+
const exportPath = output.path.startsWith("./") ? _chunkPZT4CTBVcjs.trimExtName.call(void 0, output.path) : `./${_chunkPZT4CTBVcjs.trimExtName.call(void 0, output.path)}`;
|
|
906
906
|
const mode = _FileManager.getMode(output.path);
|
|
907
907
|
const barrelManager = new BarrelManager({
|
|
908
908
|
extName: output.extName,
|
|
@@ -925,7 +925,7 @@ var _FileManager = class _FileManager {
|
|
|
925
925
|
}
|
|
926
926
|
await Promise.all(
|
|
927
927
|
files.map((file) => {
|
|
928
|
-
return
|
|
928
|
+
return _chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _FileManager_instances, addOrAppend_fn).call(this, {
|
|
929
929
|
...file,
|
|
930
930
|
meta: meta ? meta : file.meta
|
|
931
931
|
});
|
|
@@ -952,27 +952,27 @@ var _FileManager = class _FileManager {
|
|
|
952
952
|
if (exportType === "barrelNamed" && !output.exportAs && _optionalChain([rootFile, 'access', _32 => _32.exports, 'optionalAccess', _33 => _33[0]])) {
|
|
953
953
|
rootFile.exports = barrelManager.getNamedExport(root, rootFile.exports[0]);
|
|
954
954
|
}
|
|
955
|
-
await
|
|
955
|
+
await _chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _FileManager_instances, addOrAppend_fn).call(this, {
|
|
956
956
|
...rootFile,
|
|
957
957
|
meta: meta ? meta : rootFile.meta
|
|
958
958
|
});
|
|
959
959
|
}
|
|
960
960
|
getCacheByUUID(UUID) {
|
|
961
961
|
let cache;
|
|
962
|
-
|
|
962
|
+
_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _cache).forEach((files) => {
|
|
963
963
|
cache = files.find((item) => item.id === UUID);
|
|
964
964
|
});
|
|
965
965
|
return cache;
|
|
966
966
|
}
|
|
967
967
|
get(path2) {
|
|
968
|
-
return
|
|
968
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _cache).get(path2);
|
|
969
969
|
}
|
|
970
970
|
remove(path2) {
|
|
971
971
|
const cacheItem = this.get(path2);
|
|
972
972
|
if (!cacheItem) {
|
|
973
973
|
return;
|
|
974
974
|
}
|
|
975
|
-
|
|
975
|
+
_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _cache).delete(path2);
|
|
976
976
|
}
|
|
977
977
|
async write(...params) {
|
|
978
978
|
return _fs.write.call(void 0, ...params);
|
|
@@ -1008,7 +1008,7 @@ add_fn = async function(file) {
|
|
|
1008
1008
|
const controller = new AbortController();
|
|
1009
1009
|
const resolvedFile = {
|
|
1010
1010
|
id: _crypto2.default.randomUUID(),
|
|
1011
|
-
name:
|
|
1011
|
+
name: _chunkPZT4CTBVcjs.trimExtName.call(void 0, file.baseName),
|
|
1012
1012
|
...file
|
|
1013
1013
|
};
|
|
1014
1014
|
if (_optionalChain([resolvedFile, 'access', _34 => _34.exports, 'optionalAccess', _35 => _35.length])) {
|
|
@@ -1021,21 +1021,21 @@ add_fn = async function(file) {
|
|
|
1021
1021
|
return true;
|
|
1022
1022
|
});
|
|
1023
1023
|
}
|
|
1024
|
-
|
|
1025
|
-
return
|
|
1024
|
+
_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _cache).set(resolvedFile.path, [{ cancel: () => controller.abort(), ...resolvedFile }]);
|
|
1025
|
+
return _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _queue3).add(
|
|
1026
1026
|
async () => {
|
|
1027
1027
|
var _a;
|
|
1028
|
-
return (_a =
|
|
1028
|
+
return (_a = _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _task)) == null ? void 0 : _a.call(this, resolvedFile);
|
|
1029
1029
|
},
|
|
1030
1030
|
{ signal: controller.signal }
|
|
1031
1031
|
);
|
|
1032
1032
|
};
|
|
1033
1033
|
addOrAppend_fn = async function(file) {
|
|
1034
|
-
const previousCaches =
|
|
1034
|
+
const previousCaches = _chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _cache).get(file.path);
|
|
1035
1035
|
const previousCache = previousCaches ? previousCaches.at(previousCaches.length - 1) : void 0;
|
|
1036
1036
|
if (previousCache) {
|
|
1037
|
-
|
|
1038
|
-
return
|
|
1037
|
+
_chunkXCPFG6DOcjs.__privateGet.call(void 0, this, _cache).delete(previousCache.path);
|
|
1038
|
+
return _chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _FileManager_instances, add_fn).call(this, {
|
|
1039
1039
|
...file,
|
|
1040
1040
|
source: previousCache.source && file.source ? `${previousCache.source}
|
|
1041
1041
|
${file.source}` : "",
|
|
@@ -1044,7 +1044,7 @@ ${file.source}` : "",
|
|
|
1044
1044
|
env: { ...previousCache.env || {}, ...file.env || {} }
|
|
1045
1045
|
});
|
|
1046
1046
|
}
|
|
1047
|
-
return
|
|
1047
|
+
return _chunkXCPFG6DOcjs.__privateMethod.call(void 0, this, _FileManager_instances, add_fn).call(this, file);
|
|
1048
1048
|
};
|
|
1049
1049
|
var FileManager = _FileManager;
|
|
1050
1050
|
function combineFiles(files) {
|
|
@@ -1082,12 +1082,12 @@ async function getSource(file) {
|
|
|
1082
1082
|
if (file.language ? !["typescript", "javascript"].includes(file.language) : !FileManager.isJavascript(file.baseName)) {
|
|
1083
1083
|
return file.source;
|
|
1084
1084
|
}
|
|
1085
|
-
const parser = await
|
|
1085
|
+
const parser = await _chunkYTSNYMHWcjs.getParser.call(void 0, file.language);
|
|
1086
1086
|
const exports = file.exports ? combineExports(file.exports) : [];
|
|
1087
1087
|
const imports = file.imports && file.source ? combineImports(file.imports, exports, file.source) : [];
|
|
1088
1088
|
const importNodes = imports.filter((item) => {
|
|
1089
1089
|
const path2 = item.root ? _fs.getRelativePath.call(void 0, item.root, item.path) : item.path;
|
|
1090
|
-
return path2 !==
|
|
1090
|
+
return path2 !== _chunkPZT4CTBVcjs.trimExtName.call(void 0, file.path);
|
|
1091
1091
|
}).map((item) => {
|
|
1092
1092
|
const path2 = item.root ? _fs.getRelativePath.call(void 0, item.root, item.path) : item.path;
|
|
1093
1093
|
return parser.factory.createImportDeclaration({
|
|
@@ -1108,7 +1108,7 @@ async function getSource(file) {
|
|
|
1108
1108
|
return parser.print([], { source, noEmitHelpers: false });
|
|
1109
1109
|
}
|
|
1110
1110
|
function combineExports(exports) {
|
|
1111
|
-
const combinedExports =
|
|
1111
|
+
const combinedExports = _chunk67C6RBGQcjs.orderBy.call(void 0, exports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
|
|
1112
1112
|
(prev, curr) => {
|
|
1113
1113
|
const name = curr.name;
|
|
1114
1114
|
const prevByPath = prev.findLast((imp) => imp.path === curr.path);
|
|
@@ -1139,10 +1139,10 @@ function combineExports(exports) {
|
|
|
1139
1139
|
},
|
|
1140
1140
|
[]
|
|
1141
1141
|
);
|
|
1142
|
-
return
|
|
1142
|
+
return _chunk67C6RBGQcjs.orderBy.call(void 0, combinedExports, [(v) => !v.isTypeOnly, (v) => v.asAlias], ["desc", "desc"]);
|
|
1143
1143
|
}
|
|
1144
1144
|
function combineImports(imports, exports, source) {
|
|
1145
|
-
const combinedImports =
|
|
1145
|
+
const combinedImports = _chunk67C6RBGQcjs.orderBy.call(void 0, imports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
|
|
1146
1146
|
(prev, curr) => {
|
|
1147
1147
|
let name = Array.isArray(curr.name) ? [...new Set(curr.name)] : curr.name;
|
|
1148
1148
|
const hasImportInSource = (importName) => {
|
|
@@ -1187,7 +1187,7 @@ function combineImports(imports, exports, source) {
|
|
|
1187
1187
|
},
|
|
1188
1188
|
[]
|
|
1189
1189
|
);
|
|
1190
|
-
return
|
|
1190
|
+
return _chunk67C6RBGQcjs.orderBy.call(void 0, combinedImports, [(v) => !v.isTypeOnly], ["desc"]);
|
|
1191
1191
|
}
|
|
1192
1192
|
function getEnvSource(source, env) {
|
|
1193
1193
|
if (!env) {
|
|
@@ -1204,13 +1204,13 @@ function getEnvSource(source, env) {
|
|
|
1204
1204
|
throw new TypeError(`Environment should be in upperCase for ${key}`);
|
|
1205
1205
|
}
|
|
1206
1206
|
if (typeof replaceBy === "string") {
|
|
1207
|
-
prev =
|
|
1207
|
+
prev = _chunkPZT4CTBVcjs.searchAndReplace.call(void 0, {
|
|
1208
1208
|
text: prev.replaceAll(`process.env.${key}`, replaceBy),
|
|
1209
1209
|
replaceBy,
|
|
1210
1210
|
prefix: "process.env",
|
|
1211
1211
|
key
|
|
1212
1212
|
});
|
|
1213
|
-
prev =
|
|
1213
|
+
prev = _chunkPZT4CTBVcjs.searchAndReplace.call(void 0, {
|
|
1214
1214
|
text: prev.replaceAll(/(declare const).*\n/gi, ""),
|
|
1215
1215
|
replaceBy,
|
|
1216
1216
|
key
|
|
@@ -1224,4 +1224,4 @@ function getEnvSource(source, env) {
|
|
|
1224
1224
|
|
|
1225
1225
|
|
|
1226
1226
|
exports.PQueue = PQueue; exports.FileManager = FileManager;
|
|
1227
|
-
//# sourceMappingURL=chunk-
|
|
1227
|
+
//# sourceMappingURL=chunk-ADC5UNZ5.cjs.map
|