@kubb/core 2.18.1 → 2.18.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/{chunk-SU2W2A6V.cjs → chunk-CURDPCUG.cjs} +14 -14
- package/dist/{chunk-OCUNVJPQ.cjs → chunk-I6K57NKM.cjs} +18 -18
- package/dist/{chunk-3PQTRXZD.js → chunk-J7SXH3YG.js} +2 -2
- package/dist/{chunk-3PQTRXZD.js.map → chunk-J7SXH3YG.js.map} +1 -1
- package/dist/{chunk-2OWVHAMB.cjs → chunk-KSXPJNIA.cjs} +294 -294
- package/dist/chunk-KSXPJNIA.cjs.map +1 -0
- package/dist/{chunk-I64YA7CN.cjs → chunk-LSRMKE3Q.cjs} +29 -29
- package/dist/{chunk-2H4XNW5D.cjs → chunk-RPDYCQHF.cjs} +90 -90
- package/dist/{chunk-OOZTXU7F.cjs → chunk-SJLROYQM.cjs} +3 -3
- package/dist/{chunk-OOZTXU7F.cjs.map → chunk-SJLROYQM.cjs.map} +1 -1
- package/dist/{chunk-7HFYOZ7F.cjs → chunk-U2XQEWRF.cjs} +7 -7
- package/dist/{chunk-5T2QA53B.cjs → chunk-WNT5FJKX.cjs} +5 -5
- package/dist/fs.cjs +5 -5
- package/dist/index.cjs +9 -9
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/logger.cjs +4 -4
- package/dist/mocks.cjs +12 -12
- package/dist/mocks.js +1 -1
- package/dist/transformers.cjs +4 -4
- package/dist/utils.cjs +4 -4
- package/package.json +7 -7
- package/src/plugin.ts +4 -2
- package/dist/chunk-2OWVHAMB.cjs.map +0 -1
- /package/dist/{chunk-SU2W2A6V.cjs.map → chunk-CURDPCUG.cjs.map} +0 -0
- /package/dist/{chunk-OCUNVJPQ.cjs.map → chunk-I6K57NKM.cjs.map} +0 -0
- /package/dist/{chunk-I64YA7CN.cjs.map → chunk-LSRMKE3Q.cjs.map} +0 -0
- /package/dist/{chunk-2H4XNW5D.cjs.map → chunk-RPDYCQHF.cjs.map} +0 -0
- /package/dist/{chunk-7HFYOZ7F.cjs.map → chunk-U2XQEWRF.cjs.map} +0 -0
- /package/dist/{chunk-5T2QA53B.cjs.map → chunk-WNT5FJKX.cjs.map} +0 -0
|
@@ -3,31 +3,31 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkI6K57NKMcjs = require('./chunk-I6K57NKM.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
var
|
|
11
|
+
var _chunkLSRMKE3Qcjs = require('./chunk-LSRMKE3Q.cjs');
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _chunkWNT5FJKXcjs = require('./chunk-WNT5FJKX.cjs');
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
var
|
|
21
|
+
var _chunkCURDPCUGcjs = require('./chunk-CURDPCUG.cjs');
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
var
|
|
27
|
+
var _chunkU2XQEWRFcjs = require('./chunk-U2XQEWRF.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
|
-
var
|
|
30
|
+
var _chunkRPDYCQHFcjs = require('./chunk-RPDYCQHF.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
33
|
|
|
@@ -38,13 +38,13 @@ var _chunk2H4XNW5Dcjs = require('./chunk-2H4XNW5D.cjs');
|
|
|
38
38
|
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _chunkSJLROYQMcjs = require('./chunk-SJLROYQM.cjs');
|
|
42
42
|
|
|
43
43
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js
|
|
44
|
-
var require_eventemitter3 =
|
|
44
|
+
var require_eventemitter3 = _chunkSJLROYQMcjs.__commonJS.call(void 0, {
|
|
45
45
|
"../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js"(exports, module) {
|
|
46
46
|
"use strict";
|
|
47
|
-
|
|
47
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
48
48
|
var has = Object.prototype.hasOwnProperty;
|
|
49
49
|
var prefix = "~";
|
|
50
50
|
function Events() {
|
|
@@ -224,25 +224,25 @@ var require_eventemitter3 = _chunkOOZTXU7Fcjs.__commonJS.call(void 0, {
|
|
|
224
224
|
});
|
|
225
225
|
|
|
226
226
|
// src/index.ts
|
|
227
|
-
|
|
227
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
228
228
|
|
|
229
229
|
// src/build.ts
|
|
230
|
-
|
|
230
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
231
231
|
|
|
232
232
|
// src/FileManager.ts
|
|
233
|
-
|
|
233
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
234
234
|
var _crypto = require('crypto'); var _crypto2 = _interopRequireDefault(_crypto);
|
|
235
235
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
236
236
|
|
|
237
237
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.js
|
|
238
|
-
|
|
238
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
239
239
|
|
|
240
240
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
|
|
241
|
-
|
|
242
|
-
var import_index =
|
|
241
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
242
|
+
var import_index = _chunkSJLROYQMcjs.__toESM.call(void 0, require_eventemitter3(), 1);
|
|
243
243
|
|
|
244
244
|
// ../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js
|
|
245
|
-
|
|
245
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
246
246
|
var TimeoutError = class extends Error {
|
|
247
247
|
constructor(message) {
|
|
248
248
|
super(message);
|
|
@@ -327,10 +327,10 @@ function pTimeout(promise, options) {
|
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.js
|
|
330
|
-
|
|
330
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
331
331
|
|
|
332
332
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.js
|
|
333
|
-
|
|
333
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
334
334
|
function lowerBound(array, value, comparator) {
|
|
335
335
|
let first = 0;
|
|
336
336
|
let count = array.length;
|
|
@@ -351,7 +351,7 @@ function lowerBound(array, value, comparator) {
|
|
|
351
351
|
var _queue;
|
|
352
352
|
var PriorityQueue = class {
|
|
353
353
|
constructor() {
|
|
354
|
-
|
|
354
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _queue, []);
|
|
355
355
|
}
|
|
356
356
|
enqueue(run, options) {
|
|
357
357
|
options = {
|
|
@@ -362,22 +362,22 @@ var PriorityQueue = class {
|
|
|
362
362
|
priority: options.priority,
|
|
363
363
|
run
|
|
364
364
|
};
|
|
365
|
-
if (this.size &&
|
|
366
|
-
|
|
365
|
+
if (this.size && _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue)[this.size - 1].priority >= options.priority) {
|
|
366
|
+
_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue).push(element);
|
|
367
367
|
return;
|
|
368
368
|
}
|
|
369
|
-
const index = lowerBound(
|
|
370
|
-
|
|
369
|
+
const index = lowerBound(_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue), element, (a, b) => b.priority - a.priority);
|
|
370
|
+
_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue).splice(index, 0, element);
|
|
371
371
|
}
|
|
372
372
|
dequeue() {
|
|
373
|
-
const item =
|
|
373
|
+
const item = _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue).shift();
|
|
374
374
|
return _optionalChain([item, 'optionalAccess', _2 => _2.run]);
|
|
375
375
|
}
|
|
376
376
|
filter(options) {
|
|
377
|
-
return
|
|
377
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue).filter((element) => element.priority === options.priority).map((element) => element.run);
|
|
378
378
|
}
|
|
379
379
|
get size() {
|
|
380
|
-
return
|
|
380
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue).length;
|
|
381
381
|
}
|
|
382
382
|
};
|
|
383
383
|
_queue = new WeakMap();
|
|
@@ -388,41 +388,41 @@ var PQueue = class extends import_index.default {
|
|
|
388
388
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
389
389
|
constructor(options) {
|
|
390
390
|
super();
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
391
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _doesIntervalAllowAnother);
|
|
392
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _doesConcurrentAllowAnother);
|
|
393
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _next);
|
|
394
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _onResumeInterval);
|
|
395
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _isIntervalPaused);
|
|
396
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _tryToStartAnother);
|
|
397
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _initializeIntervalIfNeeded);
|
|
398
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _onInterval);
|
|
399
399
|
/**
|
|
400
400
|
Executes all queued functions until it reaches the limit.
|
|
401
401
|
*/
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
402
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _processQueue);
|
|
403
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _throwOnAbort);
|
|
404
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _onEvent);
|
|
405
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _carryoverConcurrencyCount, void 0);
|
|
406
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _isIntervalIgnored, void 0);
|
|
407
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _intervalCount, 0);
|
|
408
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _intervalCap, void 0);
|
|
409
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _interval, void 0);
|
|
410
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _intervalEnd, 0);
|
|
411
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _intervalId, void 0);
|
|
412
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _timeoutId, void 0);
|
|
413
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _queue2, void 0);
|
|
414
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _queueClass, void 0);
|
|
415
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _pending, 0);
|
|
416
416
|
// The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
417
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _concurrency, void 0);
|
|
418
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _isPaused, void 0);
|
|
419
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _throwOnTimeout, void 0);
|
|
420
420
|
/**
|
|
421
421
|
Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
|
|
422
422
|
|
|
423
423
|
Applies to each future operation.
|
|
424
424
|
*/
|
|
425
|
-
|
|
425
|
+
_chunkSJLROYQMcjs.__publicField.call(void 0, this, "timeout");
|
|
426
426
|
options = {
|
|
427
427
|
carryoverConcurrencyCount: false,
|
|
428
428
|
intervalCap: Number.POSITIVE_INFINITY,
|
|
@@ -438,37 +438,37 @@ var PQueue = class extends import_index.default {
|
|
|
438
438
|
if (options.interval === void 0 || !(Number.isFinite(options.interval) && options.interval >= 0)) {
|
|
439
439
|
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})`);
|
|
440
440
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
441
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _carryoverConcurrencyCount, options.carryoverConcurrencyCount);
|
|
442
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _isIntervalIgnored, options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0);
|
|
443
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _intervalCap, options.intervalCap);
|
|
444
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _interval, options.interval);
|
|
445
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _queue2, new options.queueClass());
|
|
446
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _queueClass, options.queueClass);
|
|
447
447
|
this.concurrency = options.concurrency;
|
|
448
448
|
this.timeout = options.timeout;
|
|
449
|
-
|
|
450
|
-
|
|
449
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _throwOnTimeout, options.throwOnTimeout === true);
|
|
450
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _isPaused, options.autoStart === false);
|
|
451
451
|
}
|
|
452
452
|
get concurrency() {
|
|
453
|
-
return
|
|
453
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _concurrency);
|
|
454
454
|
}
|
|
455
455
|
set concurrency(newConcurrency) {
|
|
456
456
|
if (!(typeof newConcurrency === "number" && newConcurrency >= 1)) {
|
|
457
457
|
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${newConcurrency}\` (${typeof newConcurrency})`);
|
|
458
458
|
}
|
|
459
|
-
|
|
460
|
-
|
|
459
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _concurrency, newConcurrency);
|
|
460
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
|
|
461
461
|
}
|
|
462
462
|
async add(function_, options = {}) {
|
|
463
463
|
options = {
|
|
464
464
|
timeout: this.timeout,
|
|
465
|
-
throwOnTimeout:
|
|
465
|
+
throwOnTimeout: _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _throwOnTimeout),
|
|
466
466
|
...options
|
|
467
467
|
};
|
|
468
468
|
return new Promise((resolve2, reject) => {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
469
|
+
_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue2).enqueue(async () => {
|
|
470
|
+
_chunkSJLROYQMcjs.__privateWrapper.call(void 0, this, _pending)._++;
|
|
471
|
+
_chunkSJLROYQMcjs.__privateWrapper.call(void 0, this, _intervalCount)._++;
|
|
472
472
|
try {
|
|
473
473
|
_optionalChain([options, 'access', _9 => _9.signal, 'optionalAccess', _10 => _10.throwIfAborted, 'call', _11 => _11()]);
|
|
474
474
|
let operation = function_({ signal: options.signal });
|
|
@@ -476,7 +476,7 @@ var PQueue = class extends import_index.default {
|
|
|
476
476
|
operation = pTimeout(Promise.resolve(operation), { milliseconds: options.timeout });
|
|
477
477
|
}
|
|
478
478
|
if (options.signal) {
|
|
479
|
-
operation = Promise.race([operation,
|
|
479
|
+
operation = Promise.race([operation, _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _throwOnAbort, throwOnAbort_fn).call(this, options.signal)]);
|
|
480
480
|
}
|
|
481
481
|
const result = await operation;
|
|
482
482
|
resolve2(result);
|
|
@@ -489,11 +489,11 @@ var PQueue = class extends import_index.default {
|
|
|
489
489
|
reject(error);
|
|
490
490
|
this.emit("error", error);
|
|
491
491
|
} finally {
|
|
492
|
-
|
|
492
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _next, next_fn).call(this);
|
|
493
493
|
}
|
|
494
494
|
}, options);
|
|
495
495
|
this.emit("add");
|
|
496
|
-
|
|
496
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this);
|
|
497
497
|
});
|
|
498
498
|
}
|
|
499
499
|
async addAll(functions, options) {
|
|
@@ -503,24 +503,24 @@ var PQueue = class extends import_index.default {
|
|
|
503
503
|
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.)
|
|
504
504
|
*/
|
|
505
505
|
start() {
|
|
506
|
-
if (!
|
|
506
|
+
if (!_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _isPaused)) {
|
|
507
507
|
return this;
|
|
508
508
|
}
|
|
509
|
-
|
|
510
|
-
|
|
509
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _isPaused, false);
|
|
510
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
|
|
511
511
|
return this;
|
|
512
512
|
}
|
|
513
513
|
/**
|
|
514
514
|
Put queue execution on hold.
|
|
515
515
|
*/
|
|
516
516
|
pause() {
|
|
517
|
-
|
|
517
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _isPaused, true);
|
|
518
518
|
}
|
|
519
519
|
/**
|
|
520
520
|
Clear the queue.
|
|
521
521
|
*/
|
|
522
522
|
clear() {
|
|
523
|
-
|
|
523
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _queue2, new (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queueClass))());
|
|
524
524
|
}
|
|
525
525
|
/**
|
|
526
526
|
Can be called multiple times. Useful if you for example add additional items at a later time.
|
|
@@ -528,10 +528,10 @@ var PQueue = class extends import_index.default {
|
|
|
528
528
|
@returns A promise that settles when the queue becomes empty.
|
|
529
529
|
*/
|
|
530
530
|
async onEmpty() {
|
|
531
|
-
if (
|
|
531
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
532
532
|
return;
|
|
533
533
|
}
|
|
534
|
-
await
|
|
534
|
+
await _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "empty");
|
|
535
535
|
}
|
|
536
536
|
/**
|
|
537
537
|
@returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
|
|
@@ -541,10 +541,10 @@ var PQueue = class extends import_index.default {
|
|
|
541
541
|
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.
|
|
542
542
|
*/
|
|
543
543
|
async onSizeLessThan(limit) {
|
|
544
|
-
if (
|
|
544
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue2).size < limit) {
|
|
545
545
|
return;
|
|
546
546
|
}
|
|
547
|
-
await
|
|
547
|
+
await _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "next", () => _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue2).size < limit);
|
|
548
548
|
}
|
|
549
549
|
/**
|
|
550
550
|
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.
|
|
@@ -552,16 +552,16 @@ var PQueue = class extends import_index.default {
|
|
|
552
552
|
@returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
|
|
553
553
|
*/
|
|
554
554
|
async onIdle() {
|
|
555
|
-
if (
|
|
555
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _pending) === 0 && _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
556
556
|
return;
|
|
557
557
|
}
|
|
558
|
-
await
|
|
558
|
+
await _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "idle");
|
|
559
559
|
}
|
|
560
560
|
/**
|
|
561
561
|
Size of the queue, the number of queued items waiting to run.
|
|
562
562
|
*/
|
|
563
563
|
get size() {
|
|
564
|
-
return
|
|
564
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue2).size;
|
|
565
565
|
}
|
|
566
566
|
/**
|
|
567
567
|
Size of the queue, filtered by the given options.
|
|
@@ -569,19 +569,19 @@ var PQueue = class extends import_index.default {
|
|
|
569
569
|
For example, this can be used to find the number of items remaining in the queue with a specific priority level.
|
|
570
570
|
*/
|
|
571
571
|
sizeBy(options) {
|
|
572
|
-
return
|
|
572
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue2).filter(options).length;
|
|
573
573
|
}
|
|
574
574
|
/**
|
|
575
575
|
Number of running items (no longer in the queue).
|
|
576
576
|
*/
|
|
577
577
|
get pending() {
|
|
578
|
-
return
|
|
578
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _pending);
|
|
579
579
|
}
|
|
580
580
|
/**
|
|
581
581
|
Whether the queue is currently paused.
|
|
582
582
|
*/
|
|
583
583
|
get isPaused() {
|
|
584
|
-
return
|
|
584
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _isPaused);
|
|
585
585
|
}
|
|
586
586
|
};
|
|
587
587
|
_carryoverConcurrencyCount = new WeakMap();
|
|
@@ -600,35 +600,35 @@ _isPaused = new WeakMap();
|
|
|
600
600
|
_throwOnTimeout = new WeakMap();
|
|
601
601
|
_doesIntervalAllowAnother = new WeakSet();
|
|
602
602
|
doesIntervalAllowAnother_get = function() {
|
|
603
|
-
return
|
|
603
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _intervalCount) < _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _intervalCap);
|
|
604
604
|
};
|
|
605
605
|
_doesConcurrentAllowAnother = new WeakSet();
|
|
606
606
|
doesConcurrentAllowAnother_get = function() {
|
|
607
|
-
return
|
|
607
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _pending) < _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _concurrency);
|
|
608
608
|
};
|
|
609
609
|
_next = new WeakSet();
|
|
610
610
|
next_fn = function() {
|
|
611
|
-
|
|
612
|
-
|
|
611
|
+
_chunkSJLROYQMcjs.__privateWrapper.call(void 0, this, _pending)._--;
|
|
612
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this);
|
|
613
613
|
this.emit("next");
|
|
614
614
|
};
|
|
615
615
|
_onResumeInterval = new WeakSet();
|
|
616
616
|
onResumeInterval_fn = function() {
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
617
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _onInterval, onInterval_fn).call(this);
|
|
618
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _initializeIntervalIfNeeded, initializeIntervalIfNeeded_fn).call(this);
|
|
619
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _timeoutId, void 0);
|
|
620
620
|
};
|
|
621
621
|
_isIntervalPaused = new WeakSet();
|
|
622
622
|
isIntervalPaused_get = function() {
|
|
623
623
|
const now = Date.now();
|
|
624
|
-
if (
|
|
625
|
-
const delay =
|
|
624
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _intervalId) === void 0) {
|
|
625
|
+
const delay = _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _intervalEnd) - now;
|
|
626
626
|
if (delay < 0) {
|
|
627
|
-
|
|
627
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _intervalCount, _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _pending) : 0);
|
|
628
628
|
} else {
|
|
629
|
-
if (
|
|
630
|
-
|
|
631
|
-
|
|
629
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _timeoutId) === void 0) {
|
|
630
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _timeoutId, setTimeout(() => {
|
|
631
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _onResumeInterval, onResumeInterval_fn).call(this);
|
|
632
632
|
}, delay));
|
|
633
633
|
}
|
|
634
634
|
return true;
|
|
@@ -638,28 +638,28 @@ isIntervalPaused_get = function() {
|
|
|
638
638
|
};
|
|
639
639
|
_tryToStartAnother = new WeakSet();
|
|
640
640
|
tryToStartAnother_fn = function() {
|
|
641
|
-
if (
|
|
642
|
-
if (
|
|
643
|
-
clearInterval(
|
|
641
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
642
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _intervalId)) {
|
|
643
|
+
clearInterval(_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _intervalId));
|
|
644
644
|
}
|
|
645
|
-
|
|
645
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _intervalId, void 0);
|
|
646
646
|
this.emit("empty");
|
|
647
|
-
if (
|
|
647
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _pending) === 0) {
|
|
648
648
|
this.emit("idle");
|
|
649
649
|
}
|
|
650
650
|
return false;
|
|
651
651
|
}
|
|
652
|
-
if (!
|
|
653
|
-
const canInitializeInterval = !
|
|
654
|
-
if (
|
|
655
|
-
const job =
|
|
652
|
+
if (!_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _isPaused)) {
|
|
653
|
+
const canInitializeInterval = !_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _isIntervalPaused, isIntervalPaused_get);
|
|
654
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _doesIntervalAllowAnother, doesIntervalAllowAnother_get) && _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _doesConcurrentAllowAnother, doesConcurrentAllowAnother_get)) {
|
|
655
|
+
const job = _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue2).dequeue();
|
|
656
656
|
if (!job) {
|
|
657
657
|
return false;
|
|
658
658
|
}
|
|
659
659
|
this.emit("active");
|
|
660
660
|
job();
|
|
661
661
|
if (canInitializeInterval) {
|
|
662
|
-
|
|
662
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _initializeIntervalIfNeeded, initializeIntervalIfNeeded_fn).call(this);
|
|
663
663
|
}
|
|
664
664
|
return true;
|
|
665
665
|
}
|
|
@@ -668,26 +668,26 @@ tryToStartAnother_fn = function() {
|
|
|
668
668
|
};
|
|
669
669
|
_initializeIntervalIfNeeded = new WeakSet();
|
|
670
670
|
initializeIntervalIfNeeded_fn = function() {
|
|
671
|
-
if (
|
|
671
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _intervalId) !== void 0) {
|
|
672
672
|
return;
|
|
673
673
|
}
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
},
|
|
677
|
-
|
|
674
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _intervalId, setInterval(() => {
|
|
675
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _onInterval, onInterval_fn).call(this);
|
|
676
|
+
}, _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _interval)));
|
|
677
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _intervalEnd, Date.now() + _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _interval));
|
|
678
678
|
};
|
|
679
679
|
_onInterval = new WeakSet();
|
|
680
680
|
onInterval_fn = function() {
|
|
681
|
-
if (
|
|
682
|
-
clearInterval(
|
|
683
|
-
|
|
681
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _intervalCount) === 0 && _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _pending) === 0 && _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _intervalId)) {
|
|
682
|
+
clearInterval(_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _intervalId));
|
|
683
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _intervalId, void 0);
|
|
684
684
|
}
|
|
685
|
-
|
|
686
|
-
|
|
685
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _intervalCount, _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _pending) : 0);
|
|
686
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
|
|
687
687
|
};
|
|
688
688
|
_processQueue = new WeakSet();
|
|
689
689
|
processQueue_fn = function() {
|
|
690
|
-
while (
|
|
690
|
+
while (_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this)) {
|
|
691
691
|
}
|
|
692
692
|
};
|
|
693
693
|
_throwOnAbort = new WeakSet();
|
|
@@ -716,12 +716,12 @@ onEvent_fn = async function(event, filter) {
|
|
|
716
716
|
var _remeda = require('remeda');
|
|
717
717
|
|
|
718
718
|
// src/BarrelManager.ts
|
|
719
|
-
|
|
719
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
720
720
|
var _parserts = require('@kubb/parser-ts');
|
|
721
721
|
|
|
722
722
|
|
|
723
723
|
// src/utils/TreeNode.ts
|
|
724
|
-
|
|
724
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
725
725
|
var _directorytree = require('directory-tree'); var _directorytree2 = _interopRequireDefault(_directorytree);
|
|
726
726
|
var TreeNode = class _TreeNode {
|
|
727
727
|
constructor(data, parent) {
|
|
@@ -824,8 +824,8 @@ var TreeNode = class _TreeNode {
|
|
|
824
824
|
var _options;
|
|
825
825
|
var BarrelManager = class {
|
|
826
826
|
constructor(options = {}) {
|
|
827
|
-
|
|
828
|
-
|
|
827
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _options, void 0);
|
|
828
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _options, options);
|
|
829
829
|
return this;
|
|
830
830
|
}
|
|
831
831
|
getNamedExport(root, item) {
|
|
@@ -865,7 +865,7 @@ var BarrelManager = class {
|
|
|
865
865
|
})]);
|
|
866
866
|
}
|
|
867
867
|
getIndexes(root) {
|
|
868
|
-
const { treeNode = {}, isTypeOnly, extName } =
|
|
868
|
+
const { treeNode = {}, isTypeOnly, extName } = _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _options);
|
|
869
869
|
const tree = TreeNode.build(root, treeNode);
|
|
870
870
|
if (!tree) {
|
|
871
871
|
return null;
|
|
@@ -877,7 +877,7 @@ var BarrelManager = class {
|
|
|
877
877
|
if (treeNode2.children.length > 1) {
|
|
878
878
|
const indexPath = _path2.default.resolve(treeNode2.data.path, "index.ts");
|
|
879
879
|
const exports = treeNode2.children.filter(Boolean).map((file) => {
|
|
880
|
-
const importPath = file.data.type === "split" ? `./${file.data.name}/index` : `./${
|
|
880
|
+
const importPath = file.data.type === "split" ? `./${file.data.name}/index` : `./${_chunkI6K57NKMcjs.trimExtName.call(void 0, file.data.name)}`;
|
|
881
881
|
if (importPath.endsWith("index") && file.data.type === "single") {
|
|
882
882
|
return void 0;
|
|
883
883
|
}
|
|
@@ -896,7 +896,7 @@ var BarrelManager = class {
|
|
|
896
896
|
} else if (treeNode2.children.length === 1) {
|
|
897
897
|
const [treeNodeChild] = treeNode2.children;
|
|
898
898
|
const indexPath = _path2.default.resolve(treeNode2.data.path, "index.ts");
|
|
899
|
-
const importPath = treeNodeChild.data.type === "split" ? `./${treeNodeChild.data.name}/index` : `./${
|
|
899
|
+
const importPath = treeNodeChild.data.type === "split" ? `./${treeNodeChild.data.name}/index` : `./${_chunkI6K57NKMcjs.trimExtName.call(void 0, treeNodeChild.data.name)}`;
|
|
900
900
|
const exports = [
|
|
901
901
|
{
|
|
902
902
|
path: extName ? `${importPath}${extName}` : importPath,
|
|
@@ -928,31 +928,31 @@ var KubbFile;
|
|
|
928
928
|
var _cache, _task, _queue3, _add, add_fn, _addOrAppend, addOrAppend_fn;
|
|
929
929
|
var _FileManager = class _FileManager {
|
|
930
930
|
constructor({ task = async (file) => file, queue = new PQueue() } = {}) {
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
931
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _add);
|
|
932
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _addOrAppend);
|
|
933
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _cache, /* @__PURE__ */ new Map());
|
|
934
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _task, void 0);
|
|
935
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _queue3, void 0);
|
|
936
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _task, task);
|
|
937
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _queue3, queue);
|
|
938
938
|
return this;
|
|
939
939
|
}
|
|
940
940
|
get files() {
|
|
941
941
|
const files = [];
|
|
942
|
-
|
|
942
|
+
_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cache).forEach((item) => {
|
|
943
943
|
files.push(...item.flat(1));
|
|
944
944
|
});
|
|
945
945
|
return files;
|
|
946
946
|
}
|
|
947
947
|
get isExecuting() {
|
|
948
|
-
return
|
|
948
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue3).size !== 0 && _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue3).pending !== 0;
|
|
949
949
|
}
|
|
950
950
|
async add(...files) {
|
|
951
951
|
const promises = combineFiles(files).map((file) => {
|
|
952
952
|
if (file.override) {
|
|
953
|
-
return
|
|
953
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, file);
|
|
954
954
|
}
|
|
955
|
-
return
|
|
955
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, file);
|
|
956
956
|
});
|
|
957
957
|
const resolvedFiles = await Promise.all(promises);
|
|
958
958
|
if (files.length > 1) {
|
|
@@ -966,11 +966,11 @@ var _FileManager = class _FileManager {
|
|
|
966
966
|
return void 0;
|
|
967
967
|
}
|
|
968
968
|
const pathToBuildFrom = _path.resolve.call(void 0, root, output.path);
|
|
969
|
-
if (
|
|
969
|
+
if (_chunkI6K57NKMcjs.transformers_default.trimExtName(pathToBuildFrom).endsWith("index")) {
|
|
970
970
|
logger.emit("warning", "Output has the same fileName as the barrelFiles, please disable barrel generation");
|
|
971
971
|
return;
|
|
972
972
|
}
|
|
973
|
-
const exportPath = output.path.startsWith("./") ?
|
|
973
|
+
const exportPath = output.path.startsWith("./") ? _chunkI6K57NKMcjs.trimExtName.call(void 0, output.path) : `./${_chunkI6K57NKMcjs.trimExtName.call(void 0, output.path)}`;
|
|
974
974
|
const mode = _FileManager.getMode(output.path);
|
|
975
975
|
const barrelManager = new BarrelManager({
|
|
976
976
|
extName: output.extName,
|
|
@@ -993,7 +993,7 @@ var _FileManager = class _FileManager {
|
|
|
993
993
|
}
|
|
994
994
|
await Promise.all(
|
|
995
995
|
files.map((file) => {
|
|
996
|
-
return
|
|
996
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, {
|
|
997
997
|
...file,
|
|
998
998
|
meta: meta ? meta : file.meta
|
|
999
999
|
});
|
|
@@ -1020,33 +1020,33 @@ var _FileManager = class _FileManager {
|
|
|
1020
1020
|
if (exportType === "barrelNamed" && !output.exportAs && _optionalChain([rootFile, 'access', _32 => _32.exports, 'optionalAccess', _33 => _33[0]])) {
|
|
1021
1021
|
rootFile.exports = barrelManager.getNamedExport(root, rootFile.exports[0]);
|
|
1022
1022
|
}
|
|
1023
|
-
await
|
|
1023
|
+
await _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, {
|
|
1024
1024
|
...rootFile,
|
|
1025
1025
|
meta: meta ? meta : rootFile.meta
|
|
1026
1026
|
});
|
|
1027
1027
|
}
|
|
1028
1028
|
getCacheByUUID(UUID) {
|
|
1029
1029
|
let cache;
|
|
1030
|
-
|
|
1030
|
+
_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cache).forEach((files) => {
|
|
1031
1031
|
cache = files.find((item) => item.id === UUID);
|
|
1032
1032
|
});
|
|
1033
1033
|
return cache;
|
|
1034
1034
|
}
|
|
1035
1035
|
get(path5) {
|
|
1036
|
-
return
|
|
1036
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cache).get(path5);
|
|
1037
1037
|
}
|
|
1038
1038
|
remove(path5) {
|
|
1039
1039
|
const cacheItem = this.get(path5);
|
|
1040
1040
|
if (!cacheItem) {
|
|
1041
1041
|
return;
|
|
1042
1042
|
}
|
|
1043
|
-
|
|
1043
|
+
_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cache).delete(path5);
|
|
1044
1044
|
}
|
|
1045
1045
|
async write(...params) {
|
|
1046
|
-
return
|
|
1046
|
+
return _chunkRPDYCQHFcjs.write.call(void 0, ...params);
|
|
1047
1047
|
}
|
|
1048
1048
|
async read(...params) {
|
|
1049
|
-
return
|
|
1049
|
+
return _chunkU2XQEWRFcjs.read.call(void 0, ...params);
|
|
1050
1050
|
}
|
|
1051
1051
|
// statics
|
|
1052
1052
|
static async getSource(file) {
|
|
@@ -1076,7 +1076,7 @@ add_fn = async function(file) {
|
|
|
1076
1076
|
const controller = new AbortController();
|
|
1077
1077
|
const resolvedFile = {
|
|
1078
1078
|
id: _crypto2.default.randomUUID(),
|
|
1079
|
-
name:
|
|
1079
|
+
name: _chunkI6K57NKMcjs.trimExtName.call(void 0, file.baseName),
|
|
1080
1080
|
...file
|
|
1081
1081
|
};
|
|
1082
1082
|
if (_optionalChain([resolvedFile, 'access', _34 => _34.exports, 'optionalAccess', _35 => _35.length])) {
|
|
@@ -1089,22 +1089,22 @@ add_fn = async function(file) {
|
|
|
1089
1089
|
return true;
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
1092
|
-
|
|
1093
|
-
return
|
|
1092
|
+
_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cache).set(resolvedFile.path, [{ cancel: () => controller.abort(), ...resolvedFile }]);
|
|
1093
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _queue3).add(
|
|
1094
1094
|
async () => {
|
|
1095
1095
|
var _a;
|
|
1096
|
-
return (_a =
|
|
1096
|
+
return (_a = _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _task)) == null ? void 0 : _a.call(this, resolvedFile);
|
|
1097
1097
|
},
|
|
1098
1098
|
{ signal: controller.signal }
|
|
1099
1099
|
);
|
|
1100
1100
|
};
|
|
1101
1101
|
_addOrAppend = new WeakSet();
|
|
1102
1102
|
addOrAppend_fn = async function(file) {
|
|
1103
|
-
const previousCaches =
|
|
1103
|
+
const previousCaches = _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cache).get(file.path);
|
|
1104
1104
|
const previousCache = previousCaches ? previousCaches.at(previousCaches.length - 1) : void 0;
|
|
1105
1105
|
if (previousCache) {
|
|
1106
|
-
|
|
1107
|
-
return
|
|
1106
|
+
_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cache).delete(previousCache.path);
|
|
1107
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, {
|
|
1108
1108
|
...file,
|
|
1109
1109
|
source: previousCache.source && file.source ? `${previousCache.source}
|
|
1110
1110
|
${file.source}` : "",
|
|
@@ -1113,7 +1113,7 @@ ${file.source}` : "",
|
|
|
1113
1113
|
env: { ...previousCache.env || {}, ...file.env || {} }
|
|
1114
1114
|
});
|
|
1115
1115
|
}
|
|
1116
|
-
return
|
|
1116
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, file);
|
|
1117
1117
|
};
|
|
1118
1118
|
var FileManager = _FileManager;
|
|
1119
1119
|
function combineFiles(files) {
|
|
@@ -1151,16 +1151,16 @@ async function getSource(file) {
|
|
|
1151
1151
|
if (file.language ? !["typescript", "javascript"].includes(file.language) : !FileManager.isJavascript(file.baseName)) {
|
|
1152
1152
|
return file.source;
|
|
1153
1153
|
}
|
|
1154
|
-
const parser = await
|
|
1154
|
+
const parser = await _chunkLSRMKE3Qcjs.getParser.call(void 0, file.language);
|
|
1155
1155
|
const exports = file.exports ? combineExports(file.exports) : [];
|
|
1156
1156
|
const imports = file.imports && file.source ? combineImports(file.imports, exports, file.source) : [];
|
|
1157
1157
|
const importNodes = imports.filter((item) => {
|
|
1158
|
-
const path5 = item.root ?
|
|
1159
|
-
return path5 !==
|
|
1158
|
+
const path5 = item.root ? _chunkU2XQEWRFcjs.getRelativePath.call(void 0, item.root, item.path) : item.path;
|
|
1159
|
+
return path5 !== _chunkI6K57NKMcjs.trimExtName.call(void 0, file.path);
|
|
1160
1160
|
}).map((item) => {
|
|
1161
1161
|
return parser.factory.createImportDeclaration({
|
|
1162
1162
|
name: item.name,
|
|
1163
|
-
path: item.root ?
|
|
1163
|
+
path: item.root ? _chunkU2XQEWRFcjs.getRelativePath.call(void 0, item.root, item.path) : item.path,
|
|
1164
1164
|
isTypeOnly: item.isTypeOnly
|
|
1165
1165
|
});
|
|
1166
1166
|
});
|
|
@@ -1176,7 +1176,7 @@ async function getSource(file) {
|
|
|
1176
1176
|
return parser.print([], { source, noEmitHelpers: false });
|
|
1177
1177
|
}
|
|
1178
1178
|
function combineExports(exports) {
|
|
1179
|
-
const combinedExports =
|
|
1179
|
+
const combinedExports = _chunkWNT5FJKXcjs.orderBy.call(void 0, exports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
|
|
1180
1180
|
(prev, curr) => {
|
|
1181
1181
|
const name = curr.name;
|
|
1182
1182
|
const prevByPath = prev.findLast((imp) => imp.path === curr.path);
|
|
@@ -1207,10 +1207,10 @@ function combineExports(exports) {
|
|
|
1207
1207
|
},
|
|
1208
1208
|
[]
|
|
1209
1209
|
);
|
|
1210
|
-
return
|
|
1210
|
+
return _chunkWNT5FJKXcjs.orderBy.call(void 0, combinedExports, [(v) => !v.isTypeOnly, (v) => v.asAlias], ["desc", "desc"]);
|
|
1211
1211
|
}
|
|
1212
1212
|
function combineImports(imports, exports, source) {
|
|
1213
|
-
const combinedImports =
|
|
1213
|
+
const combinedImports = _chunkWNT5FJKXcjs.orderBy.call(void 0, imports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
|
|
1214
1214
|
(prev, curr) => {
|
|
1215
1215
|
let name = Array.isArray(curr.name) ? [...new Set(curr.name)] : curr.name;
|
|
1216
1216
|
const hasImportInSource = (importName) => {
|
|
@@ -1255,7 +1255,7 @@ function combineImports(imports, exports, source) {
|
|
|
1255
1255
|
},
|
|
1256
1256
|
[]
|
|
1257
1257
|
);
|
|
1258
|
-
return
|
|
1258
|
+
return _chunkWNT5FJKXcjs.orderBy.call(void 0, combinedImports, [(v) => !v.isTypeOnly], ["desc"]);
|
|
1259
1259
|
}
|
|
1260
1260
|
function getEnvSource(source, env) {
|
|
1261
1261
|
if (!env) {
|
|
@@ -1272,13 +1272,13 @@ function getEnvSource(source, env) {
|
|
|
1272
1272
|
throw new TypeError(`Environment should be in upperCase for ${key}`);
|
|
1273
1273
|
}
|
|
1274
1274
|
if (typeof replaceBy === "string") {
|
|
1275
|
-
prev =
|
|
1275
|
+
prev = _chunkI6K57NKMcjs.searchAndReplace.call(void 0, {
|
|
1276
1276
|
text: prev.replaceAll(`process.env.${key}`, replaceBy),
|
|
1277
1277
|
replaceBy,
|
|
1278
1278
|
prefix: "process.env",
|
|
1279
1279
|
key
|
|
1280
1280
|
});
|
|
1281
|
-
prev =
|
|
1281
|
+
prev = _chunkI6K57NKMcjs.searchAndReplace.call(void 0, {
|
|
1282
1282
|
text: prev.replaceAll(/(declare const).*\n/gi, ""),
|
|
1283
1283
|
replaceBy,
|
|
1284
1284
|
key
|
|
@@ -1289,13 +1289,13 @@ function getEnvSource(source, env) {
|
|
|
1289
1289
|
}
|
|
1290
1290
|
|
|
1291
1291
|
// src/PluginManager.ts
|
|
1292
|
-
|
|
1292
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
1293
1293
|
|
|
1294
1294
|
// src/PromiseManager.ts
|
|
1295
|
-
|
|
1295
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
1296
1296
|
|
|
1297
1297
|
// src/utils/executeStrategies.ts
|
|
1298
|
-
|
|
1298
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
1299
1299
|
function hookSeq(promises) {
|
|
1300
1300
|
return promises.filter(Boolean).reduce(
|
|
1301
1301
|
(promise, func) => {
|
|
@@ -1333,8 +1333,8 @@ function hookParallel(promises) {
|
|
|
1333
1333
|
var _options2;
|
|
1334
1334
|
var PromiseManager = class {
|
|
1335
1335
|
constructor(options = {}) {
|
|
1336
|
-
|
|
1337
|
-
|
|
1336
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _options2, {});
|
|
1337
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _options2, options);
|
|
1338
1338
|
return this;
|
|
1339
1339
|
}
|
|
1340
1340
|
run(strategy, promises) {
|
|
@@ -1342,7 +1342,7 @@ var PromiseManager = class {
|
|
|
1342
1342
|
return hookSeq(promises);
|
|
1343
1343
|
}
|
|
1344
1344
|
if (strategy === "first") {
|
|
1345
|
-
return hookFirst(promises,
|
|
1345
|
+
return hookFirst(promises, _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _options2).nullCheck);
|
|
1346
1346
|
}
|
|
1347
1347
|
if (strategy === "parallel") {
|
|
1348
1348
|
return hookParallel(promises);
|
|
@@ -1359,7 +1359,7 @@ function isPromiseRejectedResult(result) {
|
|
|
1359
1359
|
}
|
|
1360
1360
|
|
|
1361
1361
|
// src/errors.ts
|
|
1362
|
-
|
|
1362
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
1363
1363
|
var Warning = class extends Error {
|
|
1364
1364
|
constructor(message, options) {
|
|
1365
1365
|
super(message, { cause: _optionalChain([options, 'optionalAccess', _42 => _42.cause]) });
|
|
@@ -1370,11 +1370,11 @@ var ValidationPluginError = class extends Error {
|
|
|
1370
1370
|
};
|
|
1371
1371
|
|
|
1372
1372
|
// src/plugin.ts
|
|
1373
|
-
|
|
1373
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
1374
1374
|
|
|
1375
1375
|
|
|
1376
1376
|
// src/utils/cache.ts
|
|
1377
|
-
|
|
1377
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
1378
1378
|
function createPluginCache(Store = /* @__PURE__ */ Object.create(null)) {
|
|
1379
1379
|
return {
|
|
1380
1380
|
set(id, value) {
|
|
@@ -1404,7 +1404,7 @@ function createPluginCache(Store = /* @__PURE__ */ Object.create(null)) {
|
|
|
1404
1404
|
|
|
1405
1405
|
// src/plugin.ts
|
|
1406
1406
|
function createPlugin(factory) {
|
|
1407
|
-
return (options) => {
|
|
1407
|
+
return (options = {}) => {
|
|
1408
1408
|
return factory(options);
|
|
1409
1409
|
};
|
|
1410
1410
|
}
|
|
@@ -1454,8 +1454,8 @@ var pluginCore = createPlugin((options) => {
|
|
|
1454
1454
|
var _core, _usedPluginNames, _promiseManager, _getSortedPlugins, getSortedPlugins_fn, _addExecutedToCallStack, addExecutedToCallStack_fn, _execute, execute_fn, _executeSync, executeSync_fn, _catcher, catcher_fn, _parse, parse_fn;
|
|
1455
1455
|
var PluginManager = class {
|
|
1456
1456
|
constructor(config, options) {
|
|
1457
|
-
|
|
1458
|
-
|
|
1457
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _getSortedPlugins);
|
|
1458
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _addExecutedToCallStack);
|
|
1459
1459
|
/**
|
|
1460
1460
|
* Run an async plugin hook and return the result.
|
|
1461
1461
|
* @param hookName Name of the plugin hook. Must be either in `PluginHooks` or `OutputPluginValueHooks`.
|
|
@@ -1463,7 +1463,7 @@ var PluginManager = class {
|
|
|
1463
1463
|
* @param plugin The actual pluginObject to run.
|
|
1464
1464
|
*/
|
|
1465
1465
|
// Implementation signature
|
|
1466
|
-
|
|
1466
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _execute);
|
|
1467
1467
|
/**
|
|
1468
1468
|
* Run a sync plugin hook and return the result.
|
|
1469
1469
|
* @param hookName Name of the plugin hook. Must be in `PluginHooks`.
|
|
@@ -1471,14 +1471,14 @@ var PluginManager = class {
|
|
|
1471
1471
|
* @param plugin The acutal plugin
|
|
1472
1472
|
* @param replaceContext When passed, the plugin context can be overridden.
|
|
1473
1473
|
*/
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
this.events = new (0,
|
|
1474
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _executeSync);
|
|
1475
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _catcher);
|
|
1476
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _parse);
|
|
1477
|
+
this.events = new (0, _chunkCURDPCUGcjs.EventEmitter)();
|
|
1478
1478
|
this.executed = [];
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1479
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _core, void 0);
|
|
1480
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _usedPluginNames, {});
|
|
1481
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _promiseManager, void 0);
|
|
1482
1482
|
this.resolvePath = (params) => {
|
|
1483
1483
|
if (params.pluginKey) {
|
|
1484
1484
|
const paths = this.hookForPluginSync({
|
|
@@ -1520,13 +1520,13 @@ Falling back on the first item.
|
|
|
1520
1520
|
`
|
|
1521
1521
|
]);
|
|
1522
1522
|
}
|
|
1523
|
-
return
|
|
1523
|
+
return _chunkI6K57NKMcjs.transformReservedWord.call(void 0, _optionalChain([names, 'optionalAccess', _47 => _47.at, 'call', _48 => _48(0)]) || params.name);
|
|
1524
1524
|
}
|
|
1525
1525
|
const name = this.hookFirstSync({
|
|
1526
1526
|
hookName: "resolveName",
|
|
1527
1527
|
parameters: [params.name, params.type]
|
|
1528
1528
|
}).result;
|
|
1529
|
-
return
|
|
1529
|
+
return _chunkI6K57NKMcjs.transformReservedWord.call(void 0, name);
|
|
1530
1530
|
};
|
|
1531
1531
|
this.config = config;
|
|
1532
1532
|
this.logger = options.logger;
|
|
@@ -1535,7 +1535,7 @@ Falling back on the first item.
|
|
|
1535
1535
|
task: options.task,
|
|
1536
1536
|
queue: this.queue
|
|
1537
1537
|
});
|
|
1538
|
-
|
|
1538
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _promiseManager, new PromiseManager({
|
|
1539
1539
|
nullCheck: (state) => !!_optionalChain([state, 'optionalAccess', _49 => _49.result])
|
|
1540
1540
|
}));
|
|
1541
1541
|
const plugins = config.plugins || [];
|
|
@@ -1546,11 +1546,11 @@ Falling back on the first item.
|
|
|
1546
1546
|
fileManager: this.fileManager,
|
|
1547
1547
|
resolvePath: this.resolvePath.bind(this),
|
|
1548
1548
|
resolveName: this.resolveName.bind(this),
|
|
1549
|
-
getPlugins:
|
|
1549
|
+
getPlugins: _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).bind(this)
|
|
1550
1550
|
});
|
|
1551
|
-
|
|
1552
|
-
this.plugins = [
|
|
1553
|
-
return
|
|
1551
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _core, _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _parse, parse_fn).call(this, core, this, core.api.call(null)));
|
|
1552
|
+
this.plugins = [_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _core), ...plugins].map((plugin) => {
|
|
1553
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _parse, parse_fn).call(this, plugin, this, _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _core).api);
|
|
1554
1554
|
});
|
|
1555
1555
|
return this;
|
|
1556
1556
|
}
|
|
@@ -1562,7 +1562,7 @@ Falling back on the first item.
|
|
|
1562
1562
|
throw new Error(`Filepath should be defined for resolvedName "${name}" and pluginKey [${JSON.stringify(pluginKey)}]`);
|
|
1563
1563
|
}
|
|
1564
1564
|
try {
|
|
1565
|
-
source =
|
|
1565
|
+
source = _chunkU2XQEWRFcjs.readSync.call(void 0, path5);
|
|
1566
1566
|
} catch (_e) {
|
|
1567
1567
|
}
|
|
1568
1568
|
return {
|
|
@@ -1590,7 +1590,7 @@ Falling back on the first item.
|
|
|
1590
1590
|
}) {
|
|
1591
1591
|
const plugins = this.getPluginsByKey(hookName, pluginKey);
|
|
1592
1592
|
const promises = plugins.map((plugin) => {
|
|
1593
|
-
return
|
|
1593
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1594
1594
|
strategy: "hookFirst",
|
|
1595
1595
|
hookName,
|
|
1596
1596
|
parameters,
|
|
@@ -1609,7 +1609,7 @@ Falling back on the first item.
|
|
|
1609
1609
|
}) {
|
|
1610
1610
|
const plugins = this.getPluginsByKey(hookName, pluginKey);
|
|
1611
1611
|
return plugins.map((plugin) => {
|
|
1612
|
-
return
|
|
1612
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _executeSync, executeSync_fn).call(this, {
|
|
1613
1613
|
strategy: "hookFirst",
|
|
1614
1614
|
hookName,
|
|
1615
1615
|
parameters,
|
|
@@ -1625,11 +1625,11 @@ Falling back on the first item.
|
|
|
1625
1625
|
parameters,
|
|
1626
1626
|
skipped
|
|
1627
1627
|
}) {
|
|
1628
|
-
const promises =
|
|
1628
|
+
const promises = _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this).filter((plugin) => {
|
|
1629
1629
|
return skipped ? skipped.has(plugin) : true;
|
|
1630
1630
|
}).map((plugin) => {
|
|
1631
1631
|
return async () => {
|
|
1632
|
-
const value = await
|
|
1632
|
+
const value = await _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1633
1633
|
strategy: "hookFirst",
|
|
1634
1634
|
hookName,
|
|
1635
1635
|
parameters,
|
|
@@ -1641,7 +1641,7 @@ Falling back on the first item.
|
|
|
1641
1641
|
});
|
|
1642
1642
|
};
|
|
1643
1643
|
});
|
|
1644
|
-
return
|
|
1644
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _promiseManager).run("first", promises);
|
|
1645
1645
|
}
|
|
1646
1646
|
/**
|
|
1647
1647
|
* First non-null result stops and will return it's value.
|
|
@@ -1652,12 +1652,12 @@ Falling back on the first item.
|
|
|
1652
1652
|
skipped
|
|
1653
1653
|
}) {
|
|
1654
1654
|
let parseResult = null;
|
|
1655
|
-
for (const plugin of
|
|
1655
|
+
for (const plugin of _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this)) {
|
|
1656
1656
|
if (_optionalChain([skipped, 'optionalAccess', _50 => _50.has, 'call', _51 => _51(plugin)])) {
|
|
1657
1657
|
continue;
|
|
1658
1658
|
}
|
|
1659
1659
|
parseResult = {
|
|
1660
|
-
result:
|
|
1660
|
+
result: _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _executeSync, executeSync_fn).call(this, {
|
|
1661
1661
|
strategy: "hookFirst",
|
|
1662
1662
|
hookName,
|
|
1663
1663
|
parameters,
|
|
@@ -1678,19 +1678,19 @@ Falling back on the first item.
|
|
|
1678
1678
|
hookName,
|
|
1679
1679
|
parameters
|
|
1680
1680
|
}) {
|
|
1681
|
-
const promises =
|
|
1682
|
-
return () =>
|
|
1681
|
+
const promises = _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this).map((plugin) => {
|
|
1682
|
+
return () => _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1683
1683
|
strategy: "hookParallel",
|
|
1684
1684
|
hookName,
|
|
1685
1685
|
parameters,
|
|
1686
1686
|
plugin
|
|
1687
1687
|
});
|
|
1688
1688
|
});
|
|
1689
|
-
const results = await
|
|
1689
|
+
const results = await _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _promiseManager).run("parallel", promises);
|
|
1690
1690
|
results.forEach((result, index) => {
|
|
1691
1691
|
if (isPromiseRejectedResult(result)) {
|
|
1692
|
-
const plugin =
|
|
1693
|
-
|
|
1692
|
+
const plugin = _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this)[index];
|
|
1693
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _catcher, catcher_fn).call(this, result.reason, plugin, hookName);
|
|
1694
1694
|
}
|
|
1695
1695
|
});
|
|
1696
1696
|
return results.filter((result) => result.status === "fulfilled").map((result) => result.value);
|
|
@@ -1705,16 +1705,16 @@ Falling back on the first item.
|
|
|
1705
1705
|
}) {
|
|
1706
1706
|
const [argument0, ...rest] = parameters;
|
|
1707
1707
|
let promise = Promise.resolve(argument0);
|
|
1708
|
-
for (const plugin of
|
|
1708
|
+
for (const plugin of _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this)) {
|
|
1709
1709
|
promise = promise.then((arg0) => {
|
|
1710
|
-
const value =
|
|
1710
|
+
const value = _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1711
1711
|
strategy: "hookReduceArg0",
|
|
1712
1712
|
hookName,
|
|
1713
1713
|
parameters: [arg0, ...rest],
|
|
1714
1714
|
plugin
|
|
1715
1715
|
});
|
|
1716
1716
|
return value;
|
|
1717
|
-
}).then((result) => reduce.call(
|
|
1717
|
+
}).then((result) => reduce.call(_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _core).api, argument0, result, plugin));
|
|
1718
1718
|
}
|
|
1719
1719
|
return promise;
|
|
1720
1720
|
}
|
|
@@ -1722,15 +1722,15 @@ Falling back on the first item.
|
|
|
1722
1722
|
* Chains plugins
|
|
1723
1723
|
*/
|
|
1724
1724
|
async hookSeq({ hookName, parameters }) {
|
|
1725
|
-
const promises =
|
|
1726
|
-
return () =>
|
|
1725
|
+
const promises = _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this).map((plugin) => {
|
|
1726
|
+
return () => _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1727
1727
|
strategy: "hookSeq",
|
|
1728
1728
|
hookName,
|
|
1729
1729
|
parameters,
|
|
1730
1730
|
plugin
|
|
1731
1731
|
});
|
|
1732
1732
|
});
|
|
1733
|
-
return
|
|
1733
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _promiseManager).run("seq", promises);
|
|
1734
1734
|
}
|
|
1735
1735
|
getPluginsByKey(hookName, pluginKey) {
|
|
1736
1736
|
const plugins = [...this.plugins];
|
|
@@ -1781,7 +1781,7 @@ _getSortedPlugins = new WeakSet();
|
|
|
1781
1781
|
getSortedPlugins_fn = function(hookName) {
|
|
1782
1782
|
const plugins = [...this.plugins].filter((plugin) => plugin.name !== "core");
|
|
1783
1783
|
if (hookName) {
|
|
1784
|
-
if (this.logger.logLevel ===
|
|
1784
|
+
if (this.logger.logLevel === _chunkCURDPCUGcjs.LogLevel.info) {
|
|
1785
1785
|
const containsHookName = plugins.some((item) => item[hookName]);
|
|
1786
1786
|
if (!containsHookName) {
|
|
1787
1787
|
this.logger.emit("warning", `No hook ${hookName} found`);
|
|
@@ -1829,7 +1829,7 @@ execute_fn = function({
|
|
|
1829
1829
|
this.events.emit("execute", { strategy, hookName, parameters, plugin });
|
|
1830
1830
|
const task = Promise.resolve().then(() => {
|
|
1831
1831
|
if (typeof hook === "function") {
|
|
1832
|
-
const possiblePromiseResult = hook.apply({ ...
|
|
1832
|
+
const possiblePromiseResult = hook.apply({ ..._chunkSJLROYQMcjs.__privateGet.call(void 0, this, _core).api, plugin }, parameters);
|
|
1833
1833
|
if (isPromise(possiblePromiseResult)) {
|
|
1834
1834
|
return Promise.resolve(possiblePromiseResult);
|
|
1835
1835
|
}
|
|
@@ -1838,7 +1838,7 @@ execute_fn = function({
|
|
|
1838
1838
|
return hook;
|
|
1839
1839
|
}).then((result) => {
|
|
1840
1840
|
output = result;
|
|
1841
|
-
|
|
1841
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _addExecutedToCallStack, addExecutedToCallStack_fn).call(this, {
|
|
1842
1842
|
parameters,
|
|
1843
1843
|
output,
|
|
1844
1844
|
strategy,
|
|
@@ -1847,7 +1847,7 @@ execute_fn = function({
|
|
|
1847
1847
|
});
|
|
1848
1848
|
return result;
|
|
1849
1849
|
}).catch((e) => {
|
|
1850
|
-
|
|
1850
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _catcher, catcher_fn).call(this, e, plugin, hookName);
|
|
1851
1851
|
return null;
|
|
1852
1852
|
});
|
|
1853
1853
|
return task;
|
|
@@ -1867,12 +1867,12 @@ executeSync_fn = function({
|
|
|
1867
1867
|
this.events.emit("execute", { strategy, hookName, parameters, plugin });
|
|
1868
1868
|
try {
|
|
1869
1869
|
if (typeof hook === "function") {
|
|
1870
|
-
const fn = hook.apply({ ...
|
|
1870
|
+
const fn = hook.apply({ ..._chunkSJLROYQMcjs.__privateGet.call(void 0, this, _core).api, plugin }, parameters);
|
|
1871
1871
|
output = fn;
|
|
1872
1872
|
return fn;
|
|
1873
1873
|
}
|
|
1874
1874
|
output = hook;
|
|
1875
|
-
|
|
1875
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _addExecutedToCallStack, addExecutedToCallStack_fn).call(this, {
|
|
1876
1876
|
parameters,
|
|
1877
1877
|
output,
|
|
1878
1878
|
strategy,
|
|
@@ -1881,7 +1881,7 @@ executeSync_fn = function({
|
|
|
1881
1881
|
});
|
|
1882
1882
|
return hook;
|
|
1883
1883
|
} catch (e) {
|
|
1884
|
-
|
|
1884
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _catcher, catcher_fn).call(this, e, plugin, hookName);
|
|
1885
1885
|
return null;
|
|
1886
1886
|
}
|
|
1887
1887
|
};
|
|
@@ -1893,8 +1893,8 @@ catcher_fn = function(cause, plugin, hookName) {
|
|
|
1893
1893
|
};
|
|
1894
1894
|
_parse = new WeakSet();
|
|
1895
1895
|
parse_fn = function(plugin, pluginManager, context) {
|
|
1896
|
-
const usedPluginNames =
|
|
1897
|
-
|
|
1896
|
+
const usedPluginNames = _chunkSJLROYQMcjs.__privateGet.call(void 0, pluginManager, _usedPluginNames);
|
|
1897
|
+
_chunkLSRMKE3Qcjs.setUniqueName.call(void 0, plugin.name, usedPluginNames);
|
|
1898
1898
|
const key = [plugin.name, usedPluginNames[plugin.name]].filter(Boolean);
|
|
1899
1899
|
if (!plugin.transform) {
|
|
1900
1900
|
plugin.transform = function transform(code) {
|
|
@@ -1916,7 +1916,7 @@ parse_fn = function(plugin, pluginManager, context) {
|
|
|
1916
1916
|
};
|
|
1917
1917
|
|
|
1918
1918
|
// src/config.ts
|
|
1919
|
-
|
|
1919
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
1920
1920
|
function defineConfig(options) {
|
|
1921
1921
|
return options;
|
|
1922
1922
|
}
|
|
@@ -1929,16 +1929,16 @@ async function transformReducer(_previousCode, result, _plugin) {
|
|
|
1929
1929
|
return result;
|
|
1930
1930
|
}
|
|
1931
1931
|
async function setup(options) {
|
|
1932
|
-
const { config, logger =
|
|
1932
|
+
const { config, logger = _chunkCURDPCUGcjs.createLogger.call(void 0, { logLevel: _chunkCURDPCUGcjs.LogLevel.silent }) } = options;
|
|
1933
1933
|
let count = 0;
|
|
1934
1934
|
try {
|
|
1935
|
-
if (isInputPath(config) && !new (0,
|
|
1936
|
-
await
|
|
1935
|
+
if (isInputPath(config) && !new (0, _chunkLSRMKE3Qcjs.URLPath)(config.input.path).isURL) {
|
|
1936
|
+
await _chunkU2XQEWRFcjs.read.call(void 0, config.input.path);
|
|
1937
1937
|
}
|
|
1938
1938
|
} catch (e) {
|
|
1939
1939
|
if (isInputPath(config)) {
|
|
1940
1940
|
throw new Error(
|
|
1941
|
-
`Cannot read file/URL defined in \`input.path\` or set with \`kubb generate PATH\` in the CLI of your Kubb config ${
|
|
1941
|
+
`Cannot read file/URL defined in \`input.path\` or set with \`kubb generate PATH\` in the CLI of your Kubb config ${_chunkCURDPCUGcjs.p.dim(config.input.path)}`,
|
|
1942
1942
|
{
|
|
1943
1943
|
cause: e
|
|
1944
1944
|
}
|
|
@@ -1946,7 +1946,7 @@ async function setup(options) {
|
|
|
1946
1946
|
}
|
|
1947
1947
|
}
|
|
1948
1948
|
if (config.output.clean) {
|
|
1949
|
-
await
|
|
1949
|
+
await _chunkU2XQEWRFcjs.clean.call(void 0, config.output.path);
|
|
1950
1950
|
}
|
|
1951
1951
|
const task = async (file) => {
|
|
1952
1952
|
const { path: path5 } = file;
|
|
@@ -1991,14 +1991,14 @@ async function setup(options) {
|
|
|
1991
1991
|
const { hookName, parameters, plugin } = executer;
|
|
1992
1992
|
if (hookName === "writeFile") {
|
|
1993
1993
|
const [code] = parameters;
|
|
1994
|
-
logger.emit("debug", [`PluginKey ${
|
|
1994
|
+
logger.emit("debug", [`PluginKey ${_chunkCURDPCUGcjs.p.dim(JSON.stringify(plugin.key))}
|
|
1995
1995
|
with source
|
|
1996
1996
|
|
|
1997
1997
|
${code}`]);
|
|
1998
1998
|
}
|
|
1999
1999
|
});
|
|
2000
2000
|
pluginManager.queue.on("add", () => {
|
|
2001
|
-
if (logger.logLevel !==
|
|
2001
|
+
if (logger.logLevel !== _chunkCURDPCUGcjs.LogLevel.info) {
|
|
2002
2002
|
return;
|
|
2003
2003
|
}
|
|
2004
2004
|
if (count === 0) {
|
|
@@ -2006,31 +2006,31 @@ ${code}`]);
|
|
|
2006
2006
|
}
|
|
2007
2007
|
});
|
|
2008
2008
|
pluginManager.queue.on("active", () => {
|
|
2009
|
-
if (logger.logLevel !==
|
|
2009
|
+
if (logger.logLevel !== _chunkCURDPCUGcjs.LogLevel.info) {
|
|
2010
2010
|
return;
|
|
2011
2011
|
}
|
|
2012
2012
|
if (logger.spinner && pluginManager.queue.size > 0) {
|
|
2013
2013
|
const text = `Item: ${count} Size: ${pluginManager.queue.size} Pending: ${pluginManager.queue.pending}`;
|
|
2014
|
-
logger.spinner.suffixText =
|
|
2014
|
+
logger.spinner.suffixText = _chunkCURDPCUGcjs.p.dim(text);
|
|
2015
2015
|
}
|
|
2016
2016
|
++count;
|
|
2017
2017
|
});
|
|
2018
2018
|
pluginManager.queue.on("completed", () => {
|
|
2019
|
-
if (logger.logLevel !==
|
|
2019
|
+
if (logger.logLevel !== _chunkCURDPCUGcjs.LogLevel.info) {
|
|
2020
2020
|
return;
|
|
2021
2021
|
}
|
|
2022
2022
|
if (logger.spinner) {
|
|
2023
2023
|
const text = `Item: ${count} Size: ${pluginManager.queue.size} Pending: ${pluginManager.queue.pending}`;
|
|
2024
|
-
logger.spinner.suffixText =
|
|
2024
|
+
logger.spinner.suffixText = _chunkCURDPCUGcjs.p.dim(text);
|
|
2025
2025
|
}
|
|
2026
2026
|
});
|
|
2027
2027
|
pluginManager.on("executed", (executer) => {
|
|
2028
2028
|
const { hookName, plugin, output, parameters } = executer;
|
|
2029
2029
|
const logs = [
|
|
2030
|
-
`${
|
|
2031
|
-
parameters && `${
|
|
2030
|
+
`${_chunkCURDPCUGcjs.randomCliColour.call(void 0, plugin.name)} Executing ${hookName}`,
|
|
2031
|
+
parameters && `${_chunkCURDPCUGcjs.p.bgWhite("Parameters")} ${_chunkCURDPCUGcjs.randomCliColour.call(void 0, plugin.name)} ${hookName}`,
|
|
2032
2032
|
JSON.stringify(parameters, void 0, 2),
|
|
2033
|
-
output && `${
|
|
2033
|
+
output && `${_chunkCURDPCUGcjs.p.bgWhite("Output")} ${_chunkCURDPCUGcjs.randomCliColour.call(void 0, plugin.name)} ${hookName}`,
|
|
2034
2034
|
output
|
|
2035
2035
|
].filter(Boolean);
|
|
2036
2036
|
logger.emit("debug", logs);
|
|
@@ -2045,7 +2045,7 @@ async function build(options) {
|
|
|
2045
2045
|
parameters: [options.config]
|
|
2046
2046
|
});
|
|
2047
2047
|
await pluginManager.hookParallel({ hookName: "buildEnd" });
|
|
2048
|
-
if (logger.logLevel ===
|
|
2048
|
+
if (logger.logLevel === _chunkCURDPCUGcjs.LogLevel.info) {
|
|
2049
2049
|
logger.emit("end", "\u{1F4BE} Writing completed");
|
|
2050
2050
|
}
|
|
2051
2051
|
const files = await Promise.all(
|
|
@@ -2068,7 +2068,7 @@ async function safeBuild(options) {
|
|
|
2068
2068
|
parameters: [options.config]
|
|
2069
2069
|
});
|
|
2070
2070
|
await pluginManager.hookParallel({ hookName: "buildEnd" });
|
|
2071
|
-
if (logger.logLevel ===
|
|
2071
|
+
if (logger.logLevel === _chunkCURDPCUGcjs.LogLevel.info) {
|
|
2072
2072
|
logger.emit("end", "\u{1F4BE} Writing completed");
|
|
2073
2073
|
}
|
|
2074
2074
|
} catch (e) {
|
|
@@ -2097,103 +2097,103 @@ async function safeBuild(options) {
|
|
|
2097
2097
|
}
|
|
2098
2098
|
|
|
2099
2099
|
// src/Generator.ts
|
|
2100
|
-
|
|
2100
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2101
2101
|
var _options3, _context;
|
|
2102
2102
|
var Generator = class {
|
|
2103
2103
|
constructor(options, context) {
|
|
2104
|
-
|
|
2105
|
-
|
|
2104
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _options3, {});
|
|
2105
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _context, {});
|
|
2106
2106
|
if (context) {
|
|
2107
|
-
|
|
2107
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _context, context);
|
|
2108
2108
|
}
|
|
2109
2109
|
if (options) {
|
|
2110
|
-
|
|
2110
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _options3, options);
|
|
2111
2111
|
}
|
|
2112
2112
|
return this;
|
|
2113
2113
|
}
|
|
2114
2114
|
get options() {
|
|
2115
|
-
return
|
|
2115
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _options3);
|
|
2116
2116
|
}
|
|
2117
2117
|
get context() {
|
|
2118
|
-
return
|
|
2118
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _context);
|
|
2119
2119
|
}
|
|
2120
2120
|
set options(options) {
|
|
2121
|
-
|
|
2121
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _options3, { ..._chunkSJLROYQMcjs.__privateGet.call(void 0, this, _options3), ...options });
|
|
2122
2122
|
}
|
|
2123
2123
|
};
|
|
2124
2124
|
_options3 = new WeakMap();
|
|
2125
2125
|
_context = new WeakMap();
|
|
2126
2126
|
|
|
2127
2127
|
// src/PackageManager.ts
|
|
2128
|
-
|
|
2128
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2129
2129
|
var _module = require('module'); var _module2 = _interopRequireDefault(_module);
|
|
2130
2130
|
var _os = require('os'); var _os2 = _interopRequireDefault(_os);
|
|
2131
2131
|
var _url = require('url');
|
|
2132
2132
|
|
|
2133
2133
|
// ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
|
|
2134
|
-
|
|
2134
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2135
2135
|
|
|
2136
2136
|
|
|
2137
2137
|
// ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
|
|
2138
|
-
|
|
2138
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2139
2139
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
2140
2140
|
|
|
2141
2141
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
2142
2142
|
|
|
2143
2143
|
|
|
2144
2144
|
// ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
|
|
2145
|
-
|
|
2145
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2146
2146
|
|
|
2147
2147
|
// ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
|
|
2148
|
-
|
|
2148
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2149
2149
|
|
|
2150
2150
|
// ../../node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
|
|
2151
|
-
|
|
2151
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2152
2152
|
var Node = class {
|
|
2153
2153
|
constructor(value) {
|
|
2154
|
-
|
|
2155
|
-
|
|
2154
|
+
_chunkSJLROYQMcjs.__publicField.call(void 0, this, "value");
|
|
2155
|
+
_chunkSJLROYQMcjs.__publicField.call(void 0, this, "next");
|
|
2156
2156
|
this.value = value;
|
|
2157
2157
|
}
|
|
2158
2158
|
};
|
|
2159
2159
|
var _head, _tail, _size;
|
|
2160
2160
|
var Queue = class {
|
|
2161
2161
|
constructor() {
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2162
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _head, void 0);
|
|
2163
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _tail, void 0);
|
|
2164
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _size, void 0);
|
|
2165
2165
|
this.clear();
|
|
2166
2166
|
}
|
|
2167
2167
|
enqueue(value) {
|
|
2168
2168
|
const node = new Node(value);
|
|
2169
|
-
if (
|
|
2170
|
-
|
|
2171
|
-
|
|
2169
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _head)) {
|
|
2170
|
+
_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _tail).next = node;
|
|
2171
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _tail, node);
|
|
2172
2172
|
} else {
|
|
2173
|
-
|
|
2174
|
-
|
|
2173
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _head, node);
|
|
2174
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _tail, node);
|
|
2175
2175
|
}
|
|
2176
|
-
|
|
2176
|
+
_chunkSJLROYQMcjs.__privateWrapper.call(void 0, this, _size)._++;
|
|
2177
2177
|
}
|
|
2178
2178
|
dequeue() {
|
|
2179
|
-
const current =
|
|
2179
|
+
const current = _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _head);
|
|
2180
2180
|
if (!current) {
|
|
2181
2181
|
return;
|
|
2182
2182
|
}
|
|
2183
|
-
|
|
2184
|
-
|
|
2183
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _head, _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _head).next);
|
|
2184
|
+
_chunkSJLROYQMcjs.__privateWrapper.call(void 0, this, _size)._--;
|
|
2185
2185
|
return current.value;
|
|
2186
2186
|
}
|
|
2187
2187
|
clear() {
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2188
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _head, void 0);
|
|
2189
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _tail, void 0);
|
|
2190
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _size, 0);
|
|
2191
2191
|
}
|
|
2192
2192
|
get size() {
|
|
2193
|
-
return
|
|
2193
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _size);
|
|
2194
2194
|
}
|
|
2195
2195
|
*[Symbol.iterator]() {
|
|
2196
|
-
let current =
|
|
2196
|
+
let current = _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _head);
|
|
2197
2197
|
while (current) {
|
|
2198
2198
|
yield current.value;
|
|
2199
2199
|
current = current.next;
|
|
@@ -2344,14 +2344,14 @@ function locatePathSync(paths, {
|
|
|
2344
2344
|
}
|
|
2345
2345
|
|
|
2346
2346
|
// ../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js
|
|
2347
|
-
|
|
2347
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2348
2348
|
|
|
2349
2349
|
function toPath2(urlOrPath) {
|
|
2350
2350
|
return urlOrPath instanceof URL ? _url.fileURLToPath.call(void 0, urlOrPath) : urlOrPath;
|
|
2351
2351
|
}
|
|
2352
2352
|
|
|
2353
2353
|
// ../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js
|
|
2354
|
-
|
|
2354
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2355
2355
|
|
|
2356
2356
|
|
|
2357
2357
|
// ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
|
|
@@ -2434,30 +2434,30 @@ var _semver = require('semver');
|
|
|
2434
2434
|
var _cache2, _cwd, _SLASHES, _match, match_fn;
|
|
2435
2435
|
var _PackageManager = class _PackageManager {
|
|
2436
2436
|
constructor(workspace) {
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2437
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _match);
|
|
2438
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _cwd, void 0);
|
|
2439
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _SLASHES, /* @__PURE__ */ new Set(["/", "\\"]));
|
|
2440
2440
|
if (workspace) {
|
|
2441
|
-
|
|
2441
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _cwd, workspace);
|
|
2442
2442
|
}
|
|
2443
2443
|
return this;
|
|
2444
2444
|
}
|
|
2445
2445
|
set workspace(workspace) {
|
|
2446
|
-
|
|
2446
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _cwd, workspace);
|
|
2447
2447
|
}
|
|
2448
2448
|
get workspace() {
|
|
2449
|
-
return
|
|
2449
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cwd);
|
|
2450
2450
|
}
|
|
2451
2451
|
normalizeDirectory(directory) {
|
|
2452
|
-
if (!
|
|
2452
|
+
if (!_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _SLASHES).has(directory[directory.length - 1])) {
|
|
2453
2453
|
return `${directory}/`;
|
|
2454
2454
|
}
|
|
2455
2455
|
return directory;
|
|
2456
2456
|
}
|
|
2457
2457
|
getLocation(path5) {
|
|
2458
2458
|
let location = path5;
|
|
2459
|
-
if (
|
|
2460
|
-
const require2 = _module2.default.createRequire(this.normalizeDirectory(
|
|
2459
|
+
if (_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cwd)) {
|
|
2460
|
+
const require2 = _module2.default.createRequire(this.normalizeDirectory(_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cwd)));
|
|
2461
2461
|
location = require2.resolve(path5);
|
|
2462
2462
|
}
|
|
2463
2463
|
return location;
|
|
@@ -2477,46 +2477,46 @@ var _PackageManager = class _PackageManager {
|
|
|
2477
2477
|
}
|
|
2478
2478
|
async getPackageJSON() {
|
|
2479
2479
|
const pkgPath = await findUp(["package.json"], {
|
|
2480
|
-
cwd:
|
|
2480
|
+
cwd: _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cwd)
|
|
2481
2481
|
});
|
|
2482
2482
|
if (!pkgPath) {
|
|
2483
2483
|
return void 0;
|
|
2484
2484
|
}
|
|
2485
|
-
const json = await
|
|
2485
|
+
const json = await _chunkU2XQEWRFcjs.read.call(void 0, pkgPath);
|
|
2486
2486
|
return JSON.parse(json);
|
|
2487
2487
|
}
|
|
2488
2488
|
getPackageJSONSync() {
|
|
2489
2489
|
const pkgPath = findUpSync(["package.json"], {
|
|
2490
|
-
cwd:
|
|
2490
|
+
cwd: _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cwd)
|
|
2491
2491
|
});
|
|
2492
2492
|
if (!pkgPath) {
|
|
2493
2493
|
return void 0;
|
|
2494
2494
|
}
|
|
2495
|
-
const json =
|
|
2495
|
+
const json = _chunkU2XQEWRFcjs.readSync.call(void 0, pkgPath);
|
|
2496
2496
|
return JSON.parse(json);
|
|
2497
2497
|
}
|
|
2498
2498
|
static setVersion(dependency, version) {
|
|
2499
|
-
|
|
2499
|
+
_chunkSJLROYQMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency] = version;
|
|
2500
2500
|
}
|
|
2501
2501
|
async getVersion(dependency) {
|
|
2502
|
-
if (typeof dependency === "string" &&
|
|
2503
|
-
return
|
|
2502
|
+
if (typeof dependency === "string" && _chunkSJLROYQMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency]) {
|
|
2503
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency];
|
|
2504
2504
|
}
|
|
2505
2505
|
const packageJSON = await this.getPackageJSON();
|
|
2506
2506
|
if (!packageJSON) {
|
|
2507
2507
|
return void 0;
|
|
2508
2508
|
}
|
|
2509
|
-
return
|
|
2509
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _match, match_fn).call(this, packageJSON, dependency);
|
|
2510
2510
|
}
|
|
2511
2511
|
getVersionSync(dependency) {
|
|
2512
|
-
if (typeof dependency === "string" &&
|
|
2513
|
-
return
|
|
2512
|
+
if (typeof dependency === "string" && _chunkSJLROYQMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency]) {
|
|
2513
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency];
|
|
2514
2514
|
}
|
|
2515
2515
|
const packageJSON = this.getPackageJSONSync();
|
|
2516
2516
|
if (!packageJSON) {
|
|
2517
2517
|
return void 0;
|
|
2518
2518
|
}
|
|
2519
|
-
return
|
|
2519
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _match, match_fn).call(this, packageJSON, dependency);
|
|
2520
2520
|
}
|
|
2521
2521
|
async isValid(dependency, version) {
|
|
2522
2522
|
const packageVersion = await this.getVersion(dependency);
|
|
@@ -2559,12 +2559,12 @@ match_fn = function(packageJSON, dependency) {
|
|
|
2559
2559
|
const matchedDependency = Object.keys(dependencies).find((dep) => dep.match(dependency));
|
|
2560
2560
|
return matchedDependency ? dependencies[matchedDependency] : void 0;
|
|
2561
2561
|
};
|
|
2562
|
-
|
|
2562
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, _PackageManager, _cache2, {});
|
|
2563
2563
|
var PackageManager = _PackageManager;
|
|
2564
2564
|
|
|
2565
2565
|
// src/kubb.ts
|
|
2566
2566
|
var kubb_exports = {};
|
|
2567
|
-
|
|
2567
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2568
2568
|
|
|
2569
2569
|
|
|
2570
2570
|
|
|
@@ -2581,4 +2581,4 @@ _chunkOOZTXU7Fcjs.init_cjs_shims.call(void 0, );
|
|
|
2581
2581
|
|
|
2582
2582
|
|
|
2583
2583
|
exports.KubbFile = KubbFile; exports.FileManager = FileManager; exports.PromiseManager = PromiseManager; exports.Warning = Warning; exports.createPlugin = createPlugin; exports.PluginManager = PluginManager; exports.defineConfig = defineConfig; exports.isInputPath = isInputPath; exports.build = build; exports.safeBuild = safeBuild; exports.Generator = Generator; exports.PackageManager = PackageManager; exports.kubb_exports = kubb_exports;
|
|
2584
|
-
//# sourceMappingURL=chunk-
|
|
2584
|
+
//# sourceMappingURL=chunk-KSXPJNIA.cjs.map
|