@kubb/core 2.18.0 → 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-ECWTIHD5.js → chunk-FRT5NM5I.js} +2 -2
- package/dist/{chunk-ECWTIHD5.js.map → chunk-FRT5NM5I.js.map} +1 -1
- package/dist/{chunk-OCUNVJPQ.cjs → chunk-I6K57NKM.cjs} +18 -18
- package/dist/{chunk-PXP5K73S.js → chunk-J7SXH3YG.js} +11 -13
- package/dist/chunk-J7SXH3YG.js.map +1 -0
- package/dist/{chunk-T6TAUAYN.cjs → chunk-KSXPJNIA.cjs} +304 -306
- package/dist/chunk-KSXPJNIA.cjs.map +1 -0
- package/dist/{chunk-XF35HUZ2.cjs → chunk-LSRMKE3Q.cjs} +30 -30
- package/dist/{chunk-XF35HUZ2.cjs.map → chunk-LSRMKE3Q.cjs.map} +1 -1
- 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 -12
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +2 -5
- package/dist/logger.cjs +4 -4
- package/dist/mocks.cjs +12 -12
- package/dist/mocks.js +2 -2
- package/dist/transformers.cjs +4 -4
- package/dist/utils.cjs +4 -4
- package/dist/utils.d.cts +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/globals.d.ts +9 -12
- package/package.json +7 -7
- package/src/BarrelManager.ts +1 -1
- package/src/PluginManager.ts +6 -6
- package/src/index.ts +1 -1
- package/src/plugin.ts +7 -9
- package/src/types.ts +4 -2
- package/src/utils/getParser.ts +2 -2
- package/dist/chunk-PXP5K73S.js.map +0 -1
- package/dist/chunk-T6TAUAYN.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-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
|
-
|
|
720
|
-
var
|
|
719
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
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,12 +824,12 @@ 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) {
|
|
832
|
-
const exportedNames =
|
|
832
|
+
const exportedNames = _parserts.getExports.call(void 0, _path2.default.resolve(root, item.path));
|
|
833
833
|
if (!exportedNames) {
|
|
834
834
|
return [item];
|
|
835
835
|
}
|
|
@@ -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,15 +1404,14 @@ 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
|
}
|
|
1411
|
-
var
|
|
1412
|
-
var definePlugin = createPlugin((options) => {
|
|
1411
|
+
var pluginCore = createPlugin((options) => {
|
|
1413
1412
|
const { fileManager, pluginManager, resolvePath, resolveName, logger } = options;
|
|
1414
1413
|
return {
|
|
1415
|
-
name:
|
|
1414
|
+
name: "core",
|
|
1416
1415
|
options,
|
|
1417
1416
|
key: ["core"],
|
|
1418
1417
|
api() {
|
|
@@ -1455,8 +1454,8 @@ var definePlugin = createPlugin((options) => {
|
|
|
1455
1454
|
var _core, _usedPluginNames, _promiseManager, _getSortedPlugins, getSortedPlugins_fn, _addExecutedToCallStack, addExecutedToCallStack_fn, _execute, execute_fn, _executeSync, executeSync_fn, _catcher, catcher_fn, _parse, parse_fn;
|
|
1456
1455
|
var PluginManager = class {
|
|
1457
1456
|
constructor(config, options) {
|
|
1458
|
-
|
|
1459
|
-
|
|
1457
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _getSortedPlugins);
|
|
1458
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _addExecutedToCallStack);
|
|
1460
1459
|
/**
|
|
1461
1460
|
* Run an async plugin hook and return the result.
|
|
1462
1461
|
* @param hookName Name of the plugin hook. Must be either in `PluginHooks` or `OutputPluginValueHooks`.
|
|
@@ -1464,7 +1463,7 @@ var PluginManager = class {
|
|
|
1464
1463
|
* @param plugin The actual pluginObject to run.
|
|
1465
1464
|
*/
|
|
1466
1465
|
// Implementation signature
|
|
1467
|
-
|
|
1466
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _execute);
|
|
1468
1467
|
/**
|
|
1469
1468
|
* Run a sync plugin hook and return the result.
|
|
1470
1469
|
* @param hookName Name of the plugin hook. Must be in `PluginHooks`.
|
|
@@ -1472,14 +1471,14 @@ var PluginManager = class {
|
|
|
1472
1471
|
* @param plugin The acutal plugin
|
|
1473
1472
|
* @param replaceContext When passed, the plugin context can be overridden.
|
|
1474
1473
|
*/
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
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)();
|
|
1479
1478
|
this.executed = [];
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
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);
|
|
1483
1482
|
this.resolvePath = (params) => {
|
|
1484
1483
|
if (params.pluginKey) {
|
|
1485
1484
|
const paths = this.hookForPluginSync({
|
|
@@ -1521,13 +1520,13 @@ Falling back on the first item.
|
|
|
1521
1520
|
`
|
|
1522
1521
|
]);
|
|
1523
1522
|
}
|
|
1524
|
-
return
|
|
1523
|
+
return _chunkI6K57NKMcjs.transformReservedWord.call(void 0, _optionalChain([names, 'optionalAccess', _47 => _47.at, 'call', _48 => _48(0)]) || params.name);
|
|
1525
1524
|
}
|
|
1526
1525
|
const name = this.hookFirstSync({
|
|
1527
1526
|
hookName: "resolveName",
|
|
1528
1527
|
parameters: [params.name, params.type]
|
|
1529
1528
|
}).result;
|
|
1530
|
-
return
|
|
1529
|
+
return _chunkI6K57NKMcjs.transformReservedWord.call(void 0, name);
|
|
1531
1530
|
};
|
|
1532
1531
|
this.config = config;
|
|
1533
1532
|
this.logger = options.logger;
|
|
@@ -1536,22 +1535,22 @@ Falling back on the first item.
|
|
|
1536
1535
|
task: options.task,
|
|
1537
1536
|
queue: this.queue
|
|
1538
1537
|
});
|
|
1539
|
-
|
|
1538
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _promiseManager, new PromiseManager({
|
|
1540
1539
|
nullCheck: (state) => !!_optionalChain([state, 'optionalAccess', _49 => _49.result])
|
|
1541
1540
|
}));
|
|
1542
1541
|
const plugins = config.plugins || [];
|
|
1543
|
-
const core =
|
|
1542
|
+
const core = pluginCore({
|
|
1544
1543
|
config,
|
|
1545
1544
|
logger: this.logger,
|
|
1546
1545
|
pluginManager: this,
|
|
1547
1546
|
fileManager: this.fileManager,
|
|
1548
1547
|
resolvePath: this.resolvePath.bind(this),
|
|
1549
1548
|
resolveName: this.resolveName.bind(this),
|
|
1550
|
-
getPlugins:
|
|
1549
|
+
getPlugins: _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).bind(this)
|
|
1551
1550
|
});
|
|
1552
|
-
|
|
1553
|
-
this.plugins = [
|
|
1554
|
-
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);
|
|
1555
1554
|
});
|
|
1556
1555
|
return this;
|
|
1557
1556
|
}
|
|
@@ -1563,7 +1562,7 @@ Falling back on the first item.
|
|
|
1563
1562
|
throw new Error(`Filepath should be defined for resolvedName "${name}" and pluginKey [${JSON.stringify(pluginKey)}]`);
|
|
1564
1563
|
}
|
|
1565
1564
|
try {
|
|
1566
|
-
source =
|
|
1565
|
+
source = _chunkU2XQEWRFcjs.readSync.call(void 0, path5);
|
|
1567
1566
|
} catch (_e) {
|
|
1568
1567
|
}
|
|
1569
1568
|
return {
|
|
@@ -1591,7 +1590,7 @@ Falling back on the first item.
|
|
|
1591
1590
|
}) {
|
|
1592
1591
|
const plugins = this.getPluginsByKey(hookName, pluginKey);
|
|
1593
1592
|
const promises = plugins.map((plugin) => {
|
|
1594
|
-
return
|
|
1593
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1595
1594
|
strategy: "hookFirst",
|
|
1596
1595
|
hookName,
|
|
1597
1596
|
parameters,
|
|
@@ -1610,7 +1609,7 @@ Falling back on the first item.
|
|
|
1610
1609
|
}) {
|
|
1611
1610
|
const plugins = this.getPluginsByKey(hookName, pluginKey);
|
|
1612
1611
|
return plugins.map((plugin) => {
|
|
1613
|
-
return
|
|
1612
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _executeSync, executeSync_fn).call(this, {
|
|
1614
1613
|
strategy: "hookFirst",
|
|
1615
1614
|
hookName,
|
|
1616
1615
|
parameters,
|
|
@@ -1626,11 +1625,11 @@ Falling back on the first item.
|
|
|
1626
1625
|
parameters,
|
|
1627
1626
|
skipped
|
|
1628
1627
|
}) {
|
|
1629
|
-
const promises =
|
|
1628
|
+
const promises = _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this).filter((plugin) => {
|
|
1630
1629
|
return skipped ? skipped.has(plugin) : true;
|
|
1631
1630
|
}).map((plugin) => {
|
|
1632
1631
|
return async () => {
|
|
1633
|
-
const value = await
|
|
1632
|
+
const value = await _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1634
1633
|
strategy: "hookFirst",
|
|
1635
1634
|
hookName,
|
|
1636
1635
|
parameters,
|
|
@@ -1642,7 +1641,7 @@ Falling back on the first item.
|
|
|
1642
1641
|
});
|
|
1643
1642
|
};
|
|
1644
1643
|
});
|
|
1645
|
-
return
|
|
1644
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _promiseManager).run("first", promises);
|
|
1646
1645
|
}
|
|
1647
1646
|
/**
|
|
1648
1647
|
* First non-null result stops and will return it's value.
|
|
@@ -1653,12 +1652,12 @@ Falling back on the first item.
|
|
|
1653
1652
|
skipped
|
|
1654
1653
|
}) {
|
|
1655
1654
|
let parseResult = null;
|
|
1656
|
-
for (const plugin of
|
|
1655
|
+
for (const plugin of _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this)) {
|
|
1657
1656
|
if (_optionalChain([skipped, 'optionalAccess', _50 => _50.has, 'call', _51 => _51(plugin)])) {
|
|
1658
1657
|
continue;
|
|
1659
1658
|
}
|
|
1660
1659
|
parseResult = {
|
|
1661
|
-
result:
|
|
1660
|
+
result: _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _executeSync, executeSync_fn).call(this, {
|
|
1662
1661
|
strategy: "hookFirst",
|
|
1663
1662
|
hookName,
|
|
1664
1663
|
parameters,
|
|
@@ -1679,19 +1678,19 @@ Falling back on the first item.
|
|
|
1679
1678
|
hookName,
|
|
1680
1679
|
parameters
|
|
1681
1680
|
}) {
|
|
1682
|
-
const promises =
|
|
1683
|
-
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, {
|
|
1684
1683
|
strategy: "hookParallel",
|
|
1685
1684
|
hookName,
|
|
1686
1685
|
parameters,
|
|
1687
1686
|
plugin
|
|
1688
1687
|
});
|
|
1689
1688
|
});
|
|
1690
|
-
const results = await
|
|
1689
|
+
const results = await _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _promiseManager).run("parallel", promises);
|
|
1691
1690
|
results.forEach((result, index) => {
|
|
1692
1691
|
if (isPromiseRejectedResult(result)) {
|
|
1693
|
-
const plugin =
|
|
1694
|
-
|
|
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);
|
|
1695
1694
|
}
|
|
1696
1695
|
});
|
|
1697
1696
|
return results.filter((result) => result.status === "fulfilled").map((result) => result.value);
|
|
@@ -1706,16 +1705,16 @@ Falling back on the first item.
|
|
|
1706
1705
|
}) {
|
|
1707
1706
|
const [argument0, ...rest] = parameters;
|
|
1708
1707
|
let promise = Promise.resolve(argument0);
|
|
1709
|
-
for (const plugin of
|
|
1708
|
+
for (const plugin of _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this)) {
|
|
1710
1709
|
promise = promise.then((arg0) => {
|
|
1711
|
-
const value =
|
|
1710
|
+
const value = _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1712
1711
|
strategy: "hookReduceArg0",
|
|
1713
1712
|
hookName,
|
|
1714
1713
|
parameters: [arg0, ...rest],
|
|
1715
1714
|
plugin
|
|
1716
1715
|
});
|
|
1717
1716
|
return value;
|
|
1718
|
-
}).then((result) => reduce.call(
|
|
1717
|
+
}).then((result) => reduce.call(_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _core).api, argument0, result, plugin));
|
|
1719
1718
|
}
|
|
1720
1719
|
return promise;
|
|
1721
1720
|
}
|
|
@@ -1723,15 +1722,15 @@ Falling back on the first item.
|
|
|
1723
1722
|
* Chains plugins
|
|
1724
1723
|
*/
|
|
1725
1724
|
async hookSeq({ hookName, parameters }) {
|
|
1726
|
-
const promises =
|
|
1727
|
-
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, {
|
|
1728
1727
|
strategy: "hookSeq",
|
|
1729
1728
|
hookName,
|
|
1730
1729
|
parameters,
|
|
1731
1730
|
plugin
|
|
1732
1731
|
});
|
|
1733
1732
|
});
|
|
1734
|
-
return
|
|
1733
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _promiseManager).run("seq", promises);
|
|
1735
1734
|
}
|
|
1736
1735
|
getPluginsByKey(hookName, pluginKey) {
|
|
1737
1736
|
const plugins = [...this.plugins];
|
|
@@ -1763,10 +1762,10 @@ Falling back on the first item.
|
|
|
1763
1762
|
} else {
|
|
1764
1763
|
pluginNames = dependedPluginNames;
|
|
1765
1764
|
}
|
|
1766
|
-
return pluginNames.map((
|
|
1767
|
-
const plugin = plugins.find((plugin2) => plugin2.name ===
|
|
1765
|
+
return pluginNames.map((pluginName) => {
|
|
1766
|
+
const plugin = plugins.find((plugin2) => plugin2.name === pluginName);
|
|
1768
1767
|
if (!plugin) {
|
|
1769
|
-
throw new ValidationPluginError(`This plugin depends on the ${
|
|
1768
|
+
throw new ValidationPluginError(`This plugin depends on the ${pluginName} plugin.`);
|
|
1770
1769
|
}
|
|
1771
1770
|
return plugin;
|
|
1772
1771
|
});
|
|
@@ -1782,7 +1781,7 @@ _getSortedPlugins = new WeakSet();
|
|
|
1782
1781
|
getSortedPlugins_fn = function(hookName) {
|
|
1783
1782
|
const plugins = [...this.plugins].filter((plugin) => plugin.name !== "core");
|
|
1784
1783
|
if (hookName) {
|
|
1785
|
-
if (this.logger.logLevel ===
|
|
1784
|
+
if (this.logger.logLevel === _chunkCURDPCUGcjs.LogLevel.info) {
|
|
1786
1785
|
const containsHookName = plugins.some((item) => item[hookName]);
|
|
1787
1786
|
if (!containsHookName) {
|
|
1788
1787
|
this.logger.emit("warning", `No hook ${hookName} found`);
|
|
@@ -1792,7 +1791,7 @@ getSortedPlugins_fn = function(hookName) {
|
|
|
1792
1791
|
}
|
|
1793
1792
|
return plugins.map((plugin) => {
|
|
1794
1793
|
if (plugin.pre) {
|
|
1795
|
-
const isValid = plugin.pre.every((
|
|
1794
|
+
const isValid = plugin.pre.every((pluginName) => plugins.find((pluginToFind) => pluginToFind.name === pluginName));
|
|
1796
1795
|
if (!isValid) {
|
|
1797
1796
|
throw new ValidationPluginError(`This plugin has a pre set that is not valid(${JSON.stringify(plugin.pre, void 0, 2)})`);
|
|
1798
1797
|
}
|
|
@@ -1830,7 +1829,7 @@ execute_fn = function({
|
|
|
1830
1829
|
this.events.emit("execute", { strategy, hookName, parameters, plugin });
|
|
1831
1830
|
const task = Promise.resolve().then(() => {
|
|
1832
1831
|
if (typeof hook === "function") {
|
|
1833
|
-
const possiblePromiseResult = hook.apply({ ...
|
|
1832
|
+
const possiblePromiseResult = hook.apply({ ..._chunkSJLROYQMcjs.__privateGet.call(void 0, this, _core).api, plugin }, parameters);
|
|
1834
1833
|
if (isPromise(possiblePromiseResult)) {
|
|
1835
1834
|
return Promise.resolve(possiblePromiseResult);
|
|
1836
1835
|
}
|
|
@@ -1839,7 +1838,7 @@ execute_fn = function({
|
|
|
1839
1838
|
return hook;
|
|
1840
1839
|
}).then((result) => {
|
|
1841
1840
|
output = result;
|
|
1842
|
-
|
|
1841
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _addExecutedToCallStack, addExecutedToCallStack_fn).call(this, {
|
|
1843
1842
|
parameters,
|
|
1844
1843
|
output,
|
|
1845
1844
|
strategy,
|
|
@@ -1848,7 +1847,7 @@ execute_fn = function({
|
|
|
1848
1847
|
});
|
|
1849
1848
|
return result;
|
|
1850
1849
|
}).catch((e) => {
|
|
1851
|
-
|
|
1850
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _catcher, catcher_fn).call(this, e, plugin, hookName);
|
|
1852
1851
|
return null;
|
|
1853
1852
|
});
|
|
1854
1853
|
return task;
|
|
@@ -1868,12 +1867,12 @@ executeSync_fn = function({
|
|
|
1868
1867
|
this.events.emit("execute", { strategy, hookName, parameters, plugin });
|
|
1869
1868
|
try {
|
|
1870
1869
|
if (typeof hook === "function") {
|
|
1871
|
-
const fn = hook.apply({ ...
|
|
1870
|
+
const fn = hook.apply({ ..._chunkSJLROYQMcjs.__privateGet.call(void 0, this, _core).api, plugin }, parameters);
|
|
1872
1871
|
output = fn;
|
|
1873
1872
|
return fn;
|
|
1874
1873
|
}
|
|
1875
1874
|
output = hook;
|
|
1876
|
-
|
|
1875
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _addExecutedToCallStack, addExecutedToCallStack_fn).call(this, {
|
|
1877
1876
|
parameters,
|
|
1878
1877
|
output,
|
|
1879
1878
|
strategy,
|
|
@@ -1882,7 +1881,7 @@ executeSync_fn = function({
|
|
|
1882
1881
|
});
|
|
1883
1882
|
return hook;
|
|
1884
1883
|
} catch (e) {
|
|
1885
|
-
|
|
1884
|
+
_chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _catcher, catcher_fn).call(this, e, plugin, hookName);
|
|
1886
1885
|
return null;
|
|
1887
1886
|
}
|
|
1888
1887
|
};
|
|
@@ -1894,8 +1893,8 @@ catcher_fn = function(cause, plugin, hookName) {
|
|
|
1894
1893
|
};
|
|
1895
1894
|
_parse = new WeakSet();
|
|
1896
1895
|
parse_fn = function(plugin, pluginManager, context) {
|
|
1897
|
-
const usedPluginNames =
|
|
1898
|
-
|
|
1896
|
+
const usedPluginNames = _chunkSJLROYQMcjs.__privateGet.call(void 0, pluginManager, _usedPluginNames);
|
|
1897
|
+
_chunkLSRMKE3Qcjs.setUniqueName.call(void 0, plugin.name, usedPluginNames);
|
|
1899
1898
|
const key = [plugin.name, usedPluginNames[plugin.name]].filter(Boolean);
|
|
1900
1899
|
if (!plugin.transform) {
|
|
1901
1900
|
plugin.transform = function transform(code) {
|
|
@@ -1917,7 +1916,7 @@ parse_fn = function(plugin, pluginManager, context) {
|
|
|
1917
1916
|
};
|
|
1918
1917
|
|
|
1919
1918
|
// src/config.ts
|
|
1920
|
-
|
|
1919
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
1921
1920
|
function defineConfig(options) {
|
|
1922
1921
|
return options;
|
|
1923
1922
|
}
|
|
@@ -1930,16 +1929,16 @@ async function transformReducer(_previousCode, result, _plugin) {
|
|
|
1930
1929
|
return result;
|
|
1931
1930
|
}
|
|
1932
1931
|
async function setup(options) {
|
|
1933
|
-
const { config, logger =
|
|
1932
|
+
const { config, logger = _chunkCURDPCUGcjs.createLogger.call(void 0, { logLevel: _chunkCURDPCUGcjs.LogLevel.silent }) } = options;
|
|
1934
1933
|
let count = 0;
|
|
1935
1934
|
try {
|
|
1936
|
-
if (isInputPath(config) && !new (0,
|
|
1937
|
-
await
|
|
1935
|
+
if (isInputPath(config) && !new (0, _chunkLSRMKE3Qcjs.URLPath)(config.input.path).isURL) {
|
|
1936
|
+
await _chunkU2XQEWRFcjs.read.call(void 0, config.input.path);
|
|
1938
1937
|
}
|
|
1939
1938
|
} catch (e) {
|
|
1940
1939
|
if (isInputPath(config)) {
|
|
1941
1940
|
throw new Error(
|
|
1942
|
-
`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)}`,
|
|
1943
1942
|
{
|
|
1944
1943
|
cause: e
|
|
1945
1944
|
}
|
|
@@ -1947,7 +1946,7 @@ async function setup(options) {
|
|
|
1947
1946
|
}
|
|
1948
1947
|
}
|
|
1949
1948
|
if (config.output.clean) {
|
|
1950
|
-
await
|
|
1949
|
+
await _chunkU2XQEWRFcjs.clean.call(void 0, config.output.path);
|
|
1951
1950
|
}
|
|
1952
1951
|
const task = async (file) => {
|
|
1953
1952
|
const { path: path5 } = file;
|
|
@@ -1992,14 +1991,14 @@ async function setup(options) {
|
|
|
1992
1991
|
const { hookName, parameters, plugin } = executer;
|
|
1993
1992
|
if (hookName === "writeFile") {
|
|
1994
1993
|
const [code] = parameters;
|
|
1995
|
-
logger.emit("debug", [`PluginKey ${
|
|
1994
|
+
logger.emit("debug", [`PluginKey ${_chunkCURDPCUGcjs.p.dim(JSON.stringify(plugin.key))}
|
|
1996
1995
|
with source
|
|
1997
1996
|
|
|
1998
1997
|
${code}`]);
|
|
1999
1998
|
}
|
|
2000
1999
|
});
|
|
2001
2000
|
pluginManager.queue.on("add", () => {
|
|
2002
|
-
if (logger.logLevel !==
|
|
2001
|
+
if (logger.logLevel !== _chunkCURDPCUGcjs.LogLevel.info) {
|
|
2003
2002
|
return;
|
|
2004
2003
|
}
|
|
2005
2004
|
if (count === 0) {
|
|
@@ -2007,31 +2006,31 @@ ${code}`]);
|
|
|
2007
2006
|
}
|
|
2008
2007
|
});
|
|
2009
2008
|
pluginManager.queue.on("active", () => {
|
|
2010
|
-
if (logger.logLevel !==
|
|
2009
|
+
if (logger.logLevel !== _chunkCURDPCUGcjs.LogLevel.info) {
|
|
2011
2010
|
return;
|
|
2012
2011
|
}
|
|
2013
2012
|
if (logger.spinner && pluginManager.queue.size > 0) {
|
|
2014
2013
|
const text = `Item: ${count} Size: ${pluginManager.queue.size} Pending: ${pluginManager.queue.pending}`;
|
|
2015
|
-
logger.spinner.suffixText =
|
|
2014
|
+
logger.spinner.suffixText = _chunkCURDPCUGcjs.p.dim(text);
|
|
2016
2015
|
}
|
|
2017
2016
|
++count;
|
|
2018
2017
|
});
|
|
2019
2018
|
pluginManager.queue.on("completed", () => {
|
|
2020
|
-
if (logger.logLevel !==
|
|
2019
|
+
if (logger.logLevel !== _chunkCURDPCUGcjs.LogLevel.info) {
|
|
2021
2020
|
return;
|
|
2022
2021
|
}
|
|
2023
2022
|
if (logger.spinner) {
|
|
2024
2023
|
const text = `Item: ${count} Size: ${pluginManager.queue.size} Pending: ${pluginManager.queue.pending}`;
|
|
2025
|
-
logger.spinner.suffixText =
|
|
2024
|
+
logger.spinner.suffixText = _chunkCURDPCUGcjs.p.dim(text);
|
|
2026
2025
|
}
|
|
2027
2026
|
});
|
|
2028
2027
|
pluginManager.on("executed", (executer) => {
|
|
2029
2028
|
const { hookName, plugin, output, parameters } = executer;
|
|
2030
2029
|
const logs = [
|
|
2031
|
-
`${
|
|
2032
|
-
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}`,
|
|
2033
2032
|
JSON.stringify(parameters, void 0, 2),
|
|
2034
|
-
output && `${
|
|
2033
|
+
output && `${_chunkCURDPCUGcjs.p.bgWhite("Output")} ${_chunkCURDPCUGcjs.randomCliColour.call(void 0, plugin.name)} ${hookName}`,
|
|
2035
2034
|
output
|
|
2036
2035
|
].filter(Boolean);
|
|
2037
2036
|
logger.emit("debug", logs);
|
|
@@ -2046,7 +2045,7 @@ async function build(options) {
|
|
|
2046
2045
|
parameters: [options.config]
|
|
2047
2046
|
});
|
|
2048
2047
|
await pluginManager.hookParallel({ hookName: "buildEnd" });
|
|
2049
|
-
if (logger.logLevel ===
|
|
2048
|
+
if (logger.logLevel === _chunkCURDPCUGcjs.LogLevel.info) {
|
|
2050
2049
|
logger.emit("end", "\u{1F4BE} Writing completed");
|
|
2051
2050
|
}
|
|
2052
2051
|
const files = await Promise.all(
|
|
@@ -2069,7 +2068,7 @@ async function safeBuild(options) {
|
|
|
2069
2068
|
parameters: [options.config]
|
|
2070
2069
|
});
|
|
2071
2070
|
await pluginManager.hookParallel({ hookName: "buildEnd" });
|
|
2072
|
-
if (logger.logLevel ===
|
|
2071
|
+
if (logger.logLevel === _chunkCURDPCUGcjs.LogLevel.info) {
|
|
2073
2072
|
logger.emit("end", "\u{1F4BE} Writing completed");
|
|
2074
2073
|
}
|
|
2075
2074
|
} catch (e) {
|
|
@@ -2098,103 +2097,103 @@ async function safeBuild(options) {
|
|
|
2098
2097
|
}
|
|
2099
2098
|
|
|
2100
2099
|
// src/Generator.ts
|
|
2101
|
-
|
|
2100
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2102
2101
|
var _options3, _context;
|
|
2103
2102
|
var Generator = class {
|
|
2104
2103
|
constructor(options, context) {
|
|
2105
|
-
|
|
2106
|
-
|
|
2104
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _options3, {});
|
|
2105
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, this, _context, {});
|
|
2107
2106
|
if (context) {
|
|
2108
|
-
|
|
2107
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _context, context);
|
|
2109
2108
|
}
|
|
2110
2109
|
if (options) {
|
|
2111
|
-
|
|
2110
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _options3, options);
|
|
2112
2111
|
}
|
|
2113
2112
|
return this;
|
|
2114
2113
|
}
|
|
2115
2114
|
get options() {
|
|
2116
|
-
return
|
|
2115
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _options3);
|
|
2117
2116
|
}
|
|
2118
2117
|
get context() {
|
|
2119
|
-
return
|
|
2118
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _context);
|
|
2120
2119
|
}
|
|
2121
2120
|
set options(options) {
|
|
2122
|
-
|
|
2121
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _options3, { ..._chunkSJLROYQMcjs.__privateGet.call(void 0, this, _options3), ...options });
|
|
2123
2122
|
}
|
|
2124
2123
|
};
|
|
2125
2124
|
_options3 = new WeakMap();
|
|
2126
2125
|
_context = new WeakMap();
|
|
2127
2126
|
|
|
2128
2127
|
// src/PackageManager.ts
|
|
2129
|
-
|
|
2128
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2130
2129
|
var _module = require('module'); var _module2 = _interopRequireDefault(_module);
|
|
2131
2130
|
var _os = require('os'); var _os2 = _interopRequireDefault(_os);
|
|
2132
2131
|
var _url = require('url');
|
|
2133
2132
|
|
|
2134
2133
|
// ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
|
|
2135
|
-
|
|
2134
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2136
2135
|
|
|
2137
2136
|
|
|
2138
2137
|
// ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
|
|
2139
|
-
|
|
2138
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2140
2139
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
2141
2140
|
|
|
2142
2141
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
2143
2142
|
|
|
2144
2143
|
|
|
2145
2144
|
// ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
|
|
2146
|
-
|
|
2145
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2147
2146
|
|
|
2148
2147
|
// ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
|
|
2149
|
-
|
|
2148
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2150
2149
|
|
|
2151
2150
|
// ../../node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
|
|
2152
|
-
|
|
2151
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2153
2152
|
var Node = class {
|
|
2154
2153
|
constructor(value) {
|
|
2155
|
-
|
|
2156
|
-
|
|
2154
|
+
_chunkSJLROYQMcjs.__publicField.call(void 0, this, "value");
|
|
2155
|
+
_chunkSJLROYQMcjs.__publicField.call(void 0, this, "next");
|
|
2157
2156
|
this.value = value;
|
|
2158
2157
|
}
|
|
2159
2158
|
};
|
|
2160
2159
|
var _head, _tail, _size;
|
|
2161
2160
|
var Queue = class {
|
|
2162
2161
|
constructor() {
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
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);
|
|
2166
2165
|
this.clear();
|
|
2167
2166
|
}
|
|
2168
2167
|
enqueue(value) {
|
|
2169
2168
|
const node = new Node(value);
|
|
2170
|
-
if (
|
|
2171
|
-
|
|
2172
|
-
|
|
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);
|
|
2173
2172
|
} else {
|
|
2174
|
-
|
|
2175
|
-
|
|
2173
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _head, node);
|
|
2174
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _tail, node);
|
|
2176
2175
|
}
|
|
2177
|
-
|
|
2176
|
+
_chunkSJLROYQMcjs.__privateWrapper.call(void 0, this, _size)._++;
|
|
2178
2177
|
}
|
|
2179
2178
|
dequeue() {
|
|
2180
|
-
const current =
|
|
2179
|
+
const current = _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _head);
|
|
2181
2180
|
if (!current) {
|
|
2182
2181
|
return;
|
|
2183
2182
|
}
|
|
2184
|
-
|
|
2185
|
-
|
|
2183
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _head, _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _head).next);
|
|
2184
|
+
_chunkSJLROYQMcjs.__privateWrapper.call(void 0, this, _size)._--;
|
|
2186
2185
|
return current.value;
|
|
2187
2186
|
}
|
|
2188
2187
|
clear() {
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
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);
|
|
2192
2191
|
}
|
|
2193
2192
|
get size() {
|
|
2194
|
-
return
|
|
2193
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _size);
|
|
2195
2194
|
}
|
|
2196
2195
|
*[Symbol.iterator]() {
|
|
2197
|
-
let current =
|
|
2196
|
+
let current = _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _head);
|
|
2198
2197
|
while (current) {
|
|
2199
2198
|
yield current.value;
|
|
2200
2199
|
current = current.next;
|
|
@@ -2345,14 +2344,14 @@ function locatePathSync(paths, {
|
|
|
2345
2344
|
}
|
|
2346
2345
|
|
|
2347
2346
|
// ../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js
|
|
2348
|
-
|
|
2347
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2349
2348
|
|
|
2350
2349
|
function toPath2(urlOrPath) {
|
|
2351
2350
|
return urlOrPath instanceof URL ? _url.fileURLToPath.call(void 0, urlOrPath) : urlOrPath;
|
|
2352
2351
|
}
|
|
2353
2352
|
|
|
2354
2353
|
// ../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js
|
|
2355
|
-
|
|
2354
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2356
2355
|
|
|
2357
2356
|
|
|
2358
2357
|
// ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
|
|
@@ -2435,30 +2434,30 @@ var _semver = require('semver');
|
|
|
2435
2434
|
var _cache2, _cwd, _SLASHES, _match, match_fn;
|
|
2436
2435
|
var _PackageManager = class _PackageManager {
|
|
2437
2436
|
constructor(workspace) {
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
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(["/", "\\"]));
|
|
2441
2440
|
if (workspace) {
|
|
2442
|
-
|
|
2441
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _cwd, workspace);
|
|
2443
2442
|
}
|
|
2444
2443
|
return this;
|
|
2445
2444
|
}
|
|
2446
2445
|
set workspace(workspace) {
|
|
2447
|
-
|
|
2446
|
+
_chunkSJLROYQMcjs.__privateSet.call(void 0, this, _cwd, workspace);
|
|
2448
2447
|
}
|
|
2449
2448
|
get workspace() {
|
|
2450
|
-
return
|
|
2449
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cwd);
|
|
2451
2450
|
}
|
|
2452
2451
|
normalizeDirectory(directory) {
|
|
2453
|
-
if (!
|
|
2452
|
+
if (!_chunkSJLROYQMcjs.__privateGet.call(void 0, this, _SLASHES).has(directory[directory.length - 1])) {
|
|
2454
2453
|
return `${directory}/`;
|
|
2455
2454
|
}
|
|
2456
2455
|
return directory;
|
|
2457
2456
|
}
|
|
2458
2457
|
getLocation(path5) {
|
|
2459
2458
|
let location = path5;
|
|
2460
|
-
if (
|
|
2461
|
-
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)));
|
|
2462
2461
|
location = require2.resolve(path5);
|
|
2463
2462
|
}
|
|
2464
2463
|
return location;
|
|
@@ -2478,46 +2477,46 @@ var _PackageManager = class _PackageManager {
|
|
|
2478
2477
|
}
|
|
2479
2478
|
async getPackageJSON() {
|
|
2480
2479
|
const pkgPath = await findUp(["package.json"], {
|
|
2481
|
-
cwd:
|
|
2480
|
+
cwd: _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cwd)
|
|
2482
2481
|
});
|
|
2483
2482
|
if (!pkgPath) {
|
|
2484
2483
|
return void 0;
|
|
2485
2484
|
}
|
|
2486
|
-
const json = await
|
|
2485
|
+
const json = await _chunkU2XQEWRFcjs.read.call(void 0, pkgPath);
|
|
2487
2486
|
return JSON.parse(json);
|
|
2488
2487
|
}
|
|
2489
2488
|
getPackageJSONSync() {
|
|
2490
2489
|
const pkgPath = findUpSync(["package.json"], {
|
|
2491
|
-
cwd:
|
|
2490
|
+
cwd: _chunkSJLROYQMcjs.__privateGet.call(void 0, this, _cwd)
|
|
2492
2491
|
});
|
|
2493
2492
|
if (!pkgPath) {
|
|
2494
2493
|
return void 0;
|
|
2495
2494
|
}
|
|
2496
|
-
const json =
|
|
2495
|
+
const json = _chunkU2XQEWRFcjs.readSync.call(void 0, pkgPath);
|
|
2497
2496
|
return JSON.parse(json);
|
|
2498
2497
|
}
|
|
2499
2498
|
static setVersion(dependency, version) {
|
|
2500
|
-
|
|
2499
|
+
_chunkSJLROYQMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency] = version;
|
|
2501
2500
|
}
|
|
2502
2501
|
async getVersion(dependency) {
|
|
2503
|
-
if (typeof dependency === "string" &&
|
|
2504
|
-
return
|
|
2502
|
+
if (typeof dependency === "string" && _chunkSJLROYQMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency]) {
|
|
2503
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency];
|
|
2505
2504
|
}
|
|
2506
2505
|
const packageJSON = await this.getPackageJSON();
|
|
2507
2506
|
if (!packageJSON) {
|
|
2508
2507
|
return void 0;
|
|
2509
2508
|
}
|
|
2510
|
-
return
|
|
2509
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _match, match_fn).call(this, packageJSON, dependency);
|
|
2511
2510
|
}
|
|
2512
2511
|
getVersionSync(dependency) {
|
|
2513
|
-
if (typeof dependency === "string" &&
|
|
2514
|
-
return
|
|
2512
|
+
if (typeof dependency === "string" && _chunkSJLROYQMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency]) {
|
|
2513
|
+
return _chunkSJLROYQMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency];
|
|
2515
2514
|
}
|
|
2516
2515
|
const packageJSON = this.getPackageJSONSync();
|
|
2517
2516
|
if (!packageJSON) {
|
|
2518
2517
|
return void 0;
|
|
2519
2518
|
}
|
|
2520
|
-
return
|
|
2519
|
+
return _chunkSJLROYQMcjs.__privateMethod.call(void 0, this, _match, match_fn).call(this, packageJSON, dependency);
|
|
2521
2520
|
}
|
|
2522
2521
|
async isValid(dependency, version) {
|
|
2523
2522
|
const packageVersion = await this.getVersion(dependency);
|
|
@@ -2560,12 +2559,12 @@ match_fn = function(packageJSON, dependency) {
|
|
|
2560
2559
|
const matchedDependency = Object.keys(dependencies).find((dep) => dep.match(dependency));
|
|
2561
2560
|
return matchedDependency ? dependencies[matchedDependency] : void 0;
|
|
2562
2561
|
};
|
|
2563
|
-
|
|
2562
|
+
_chunkSJLROYQMcjs.__privateAdd.call(void 0, _PackageManager, _cache2, {});
|
|
2564
2563
|
var PackageManager = _PackageManager;
|
|
2565
2564
|
|
|
2566
2565
|
// src/kubb.ts
|
|
2567
2566
|
var kubb_exports = {};
|
|
2568
|
-
|
|
2567
|
+
_chunkSJLROYQMcjs.init_cjs_shims.call(void 0, );
|
|
2569
2568
|
|
|
2570
2569
|
|
|
2571
2570
|
|
|
@@ -2581,6 +2580,5 @@ _chunkOOZTXU7Fcjs.init_cjs_shims.call(void 0, );
|
|
|
2581
2580
|
|
|
2582
2581
|
|
|
2583
2582
|
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
//# sourceMappingURL=chunk-T6TAUAYN.cjs.map
|
|
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-KSXPJNIA.cjs.map
|