@kubb/core 2.15.0 → 2.16.1
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-NT5TMOO2.cjs → chunk-3NPJUYXJ.cjs} +4 -4
- package/dist/{chunk-E2N6ELJH.cjs → chunk-FJJL4FXB.cjs} +14 -14
- package/dist/{chunk-5JJFBKBI.cjs → chunk-GOCMZM5Z.cjs} +5 -5
- package/dist/chunk-J6F7QWGK.cjs +19 -0
- package/dist/{chunk-VIYSO66S.cjs → chunk-N32RRGTX.cjs} +5 -5
- package/dist/{chunk-LT7MMILS.cjs → chunk-N7GFIV72.cjs} +3 -3
- package/dist/{chunk-ZRKR2HKR.cjs → chunk-NET6KXFF.cjs} +88 -88
- package/dist/{chunk-5ECHVUOT.cjs → chunk-O4HDY7JS.cjs} +19 -19
- package/dist/{chunk-VHGMEMCF.cjs → chunk-QAG3ZNOM.cjs} +3 -3
- package/dist/chunk-QAG3ZNOM.cjs.map +1 -0
- package/dist/{chunk-7PQW23Z4.cjs → chunk-SEIE6FAK.cjs} +7 -7
- package/dist/fs.cjs +7 -7
- package/dist/index.cjs +293 -293
- package/dist/logger.cjs +5 -5
- package/dist/mocks.cjs +7 -7
- package/dist/transformers.cjs +5 -5
- package/dist/utils.cjs +26 -26
- package/package.json +4 -4
- package/dist/chunk-VHGMEMCF.cjs.map +0 -1
- package/dist/chunk-X7VSDHLQ.cjs +0 -19
- /package/dist/{chunk-NT5TMOO2.cjs.map → chunk-3NPJUYXJ.cjs.map} +0 -0
- /package/dist/{chunk-E2N6ELJH.cjs.map → chunk-FJJL4FXB.cjs.map} +0 -0
- /package/dist/{chunk-5JJFBKBI.cjs.map → chunk-GOCMZM5Z.cjs.map} +0 -0
- /package/dist/{chunk-X7VSDHLQ.cjs.map → chunk-J6F7QWGK.cjs.map} +0 -0
- /package/dist/{chunk-VIYSO66S.cjs.map → chunk-N32RRGTX.cjs.map} +0 -0
- /package/dist/{chunk-LT7MMILS.cjs.map → chunk-N7GFIV72.cjs.map} +0 -0
- /package/dist/{chunk-ZRKR2HKR.cjs.map → chunk-NET6KXFF.cjs.map} +0 -0
- /package/dist/{chunk-5ECHVUOT.cjs.map → chunk-O4HDY7JS.cjs.map} +0 -0
- /package/dist/{chunk-7PQW23Z4.cjs.map → chunk-SEIE6FAK.cjs.map} +0 -0
package/dist/index.cjs
CHANGED
|
@@ -3,34 +3,34 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkO4HDY7JScjs = require('./chunk-O4HDY7JS.cjs');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkSEIE6FAKcjs = require('./chunk-SEIE6FAK.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkN7GFIV72cjs = require('./chunk-N7GFIV72.cjs');
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _chunkFJJL4FXBcjs = require('./chunk-FJJL4FXB.cjs');
|
|
21
21
|
|
|
22
22
|
|
|
23
|
-
var
|
|
23
|
+
var _chunkJ6F7QWGKcjs = require('./chunk-J6F7QWGK.cjs');
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
var
|
|
27
|
-
require('./chunk-
|
|
26
|
+
var _chunkN32RRGTXcjs = require('./chunk-N32RRGTX.cjs');
|
|
27
|
+
require('./chunk-3NPJUYXJ.cjs');
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
var
|
|
33
|
-
require('./chunk-
|
|
32
|
+
var _chunkGOCMZM5Zcjs = require('./chunk-GOCMZM5Z.cjs');
|
|
33
|
+
require('./chunk-NET6KXFF.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
@@ -41,13 +41,13 @@ require('./chunk-ZRKR2HKR.cjs');
|
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _chunkQAG3ZNOMcjs = require('./chunk-QAG3ZNOM.cjs');
|
|
45
45
|
|
|
46
46
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js
|
|
47
|
-
var require_eventemitter3 =
|
|
47
|
+
var require_eventemitter3 = _chunkQAG3ZNOMcjs.__commonJS.call(void 0, {
|
|
48
48
|
"../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js"(exports, module) {
|
|
49
49
|
"use strict";
|
|
50
|
-
|
|
50
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
51
51
|
var has = Object.prototype.hasOwnProperty;
|
|
52
52
|
var prefix = "~";
|
|
53
53
|
function Events() {
|
|
@@ -227,27 +227,27 @@ var require_eventemitter3 = _chunkVHGMEMCFcjs.__commonJS.call(void 0, {
|
|
|
227
227
|
});
|
|
228
228
|
|
|
229
229
|
// src/index.ts
|
|
230
|
-
|
|
230
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
231
231
|
|
|
232
232
|
// src/build.ts
|
|
233
|
-
|
|
233
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
234
234
|
|
|
235
235
|
// src/FileManager.ts
|
|
236
|
-
|
|
236
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
237
237
|
var _crypto = require('crypto'); var _crypto2 = _interopRequireDefault(_crypto);
|
|
238
238
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
239
239
|
var _parser = require('@kubb/parser');
|
|
240
240
|
var _factory = require('@kubb/parser/factory'); var factory = _interopRequireWildcard(_factory);
|
|
241
241
|
|
|
242
242
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.js
|
|
243
|
-
|
|
243
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
244
244
|
|
|
245
245
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
|
|
246
|
-
|
|
247
|
-
var import_index =
|
|
246
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
247
|
+
var import_index = _chunkQAG3ZNOMcjs.__toESM.call(void 0, require_eventemitter3(), 1);
|
|
248
248
|
|
|
249
249
|
// ../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js
|
|
250
|
-
|
|
250
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
251
251
|
var TimeoutError = class extends Error {
|
|
252
252
|
constructor(message) {
|
|
253
253
|
super(message);
|
|
@@ -332,10 +332,10 @@ function pTimeout(promise, options) {
|
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.js
|
|
335
|
-
|
|
335
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
336
336
|
|
|
337
337
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.js
|
|
338
|
-
|
|
338
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
339
339
|
function lowerBound(array, value, comparator) {
|
|
340
340
|
let first = 0;
|
|
341
341
|
let count = array.length;
|
|
@@ -356,7 +356,7 @@ function lowerBound(array, value, comparator) {
|
|
|
356
356
|
var _queue;
|
|
357
357
|
var PriorityQueue = class {
|
|
358
358
|
constructor() {
|
|
359
|
-
|
|
359
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _queue, []);
|
|
360
360
|
}
|
|
361
361
|
enqueue(run, options) {
|
|
362
362
|
options = {
|
|
@@ -367,22 +367,22 @@ var PriorityQueue = class {
|
|
|
367
367
|
priority: options.priority,
|
|
368
368
|
run
|
|
369
369
|
};
|
|
370
|
-
if (this.size &&
|
|
371
|
-
|
|
370
|
+
if (this.size && _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue)[this.size - 1].priority >= options.priority) {
|
|
371
|
+
_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue).push(element);
|
|
372
372
|
return;
|
|
373
373
|
}
|
|
374
|
-
const index = lowerBound(
|
|
375
|
-
|
|
374
|
+
const index = lowerBound(_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue), element, (a, b) => b.priority - a.priority);
|
|
375
|
+
_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue).splice(index, 0, element);
|
|
376
376
|
}
|
|
377
377
|
dequeue() {
|
|
378
|
-
const item =
|
|
378
|
+
const item = _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue).shift();
|
|
379
379
|
return _optionalChain([item, 'optionalAccess', _2 => _2.run]);
|
|
380
380
|
}
|
|
381
381
|
filter(options) {
|
|
382
|
-
return
|
|
382
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue).filter((element) => element.priority === options.priority).map((element) => element.run);
|
|
383
383
|
}
|
|
384
384
|
get size() {
|
|
385
|
-
return
|
|
385
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue).length;
|
|
386
386
|
}
|
|
387
387
|
};
|
|
388
388
|
_queue = new WeakMap();
|
|
@@ -393,41 +393,41 @@ var PQueue = class extends import_index.default {
|
|
|
393
393
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
394
394
|
constructor(options) {
|
|
395
395
|
super();
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
396
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _doesIntervalAllowAnother);
|
|
397
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _doesConcurrentAllowAnother);
|
|
398
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _next);
|
|
399
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _onResumeInterval);
|
|
400
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _isIntervalPaused);
|
|
401
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _tryToStartAnother);
|
|
402
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _initializeIntervalIfNeeded);
|
|
403
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _onInterval);
|
|
404
404
|
/**
|
|
405
405
|
Executes all queued functions until it reaches the limit.
|
|
406
406
|
*/
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
407
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _processQueue);
|
|
408
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _throwOnAbort);
|
|
409
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _onEvent);
|
|
410
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _carryoverConcurrencyCount, void 0);
|
|
411
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _isIntervalIgnored, void 0);
|
|
412
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _intervalCount, 0);
|
|
413
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _intervalCap, void 0);
|
|
414
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _interval, void 0);
|
|
415
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _intervalEnd, 0);
|
|
416
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _intervalId, void 0);
|
|
417
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _timeoutId, void 0);
|
|
418
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _queue2, void 0);
|
|
419
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _queueClass, void 0);
|
|
420
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _pending, 0);
|
|
421
421
|
// The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
422
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _concurrency, void 0);
|
|
423
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _isPaused, void 0);
|
|
424
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _throwOnTimeout, void 0);
|
|
425
425
|
/**
|
|
426
426
|
Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
|
|
427
427
|
|
|
428
428
|
Applies to each future operation.
|
|
429
429
|
*/
|
|
430
|
-
|
|
430
|
+
_chunkQAG3ZNOMcjs.__publicField.call(void 0, this, "timeout");
|
|
431
431
|
options = {
|
|
432
432
|
carryoverConcurrencyCount: false,
|
|
433
433
|
intervalCap: Number.POSITIVE_INFINITY,
|
|
@@ -443,37 +443,37 @@ var PQueue = class extends import_index.default {
|
|
|
443
443
|
if (options.interval === void 0 || !(Number.isFinite(options.interval) && options.interval >= 0)) {
|
|
444
444
|
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})`);
|
|
445
445
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
446
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _carryoverConcurrencyCount, options.carryoverConcurrencyCount);
|
|
447
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _isIntervalIgnored, options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0);
|
|
448
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _intervalCap, options.intervalCap);
|
|
449
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _interval, options.interval);
|
|
450
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _queue2, new options.queueClass());
|
|
451
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _queueClass, options.queueClass);
|
|
452
452
|
this.concurrency = options.concurrency;
|
|
453
453
|
this.timeout = options.timeout;
|
|
454
|
-
|
|
455
|
-
|
|
454
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _throwOnTimeout, options.throwOnTimeout === true);
|
|
455
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _isPaused, options.autoStart === false);
|
|
456
456
|
}
|
|
457
457
|
get concurrency() {
|
|
458
|
-
return
|
|
458
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _concurrency);
|
|
459
459
|
}
|
|
460
460
|
set concurrency(newConcurrency) {
|
|
461
461
|
if (!(typeof newConcurrency === "number" && newConcurrency >= 1)) {
|
|
462
462
|
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${newConcurrency}\` (${typeof newConcurrency})`);
|
|
463
463
|
}
|
|
464
|
-
|
|
465
|
-
|
|
464
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _concurrency, newConcurrency);
|
|
465
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
|
|
466
466
|
}
|
|
467
467
|
async add(function_, options = {}) {
|
|
468
468
|
options = {
|
|
469
469
|
timeout: this.timeout,
|
|
470
|
-
throwOnTimeout:
|
|
470
|
+
throwOnTimeout: _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _throwOnTimeout),
|
|
471
471
|
...options
|
|
472
472
|
};
|
|
473
473
|
return new Promise((resolve2, reject) => {
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
474
|
+
_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue2).enqueue(async () => {
|
|
475
|
+
_chunkQAG3ZNOMcjs.__privateWrapper.call(void 0, this, _pending)._++;
|
|
476
|
+
_chunkQAG3ZNOMcjs.__privateWrapper.call(void 0, this, _intervalCount)._++;
|
|
477
477
|
try {
|
|
478
478
|
_optionalChain([options, 'access', _9 => _9.signal, 'optionalAccess', _10 => _10.throwIfAborted, 'call', _11 => _11()]);
|
|
479
479
|
let operation = function_({ signal: options.signal });
|
|
@@ -481,7 +481,7 @@ var PQueue = class extends import_index.default {
|
|
|
481
481
|
operation = pTimeout(Promise.resolve(operation), { milliseconds: options.timeout });
|
|
482
482
|
}
|
|
483
483
|
if (options.signal) {
|
|
484
|
-
operation = Promise.race([operation,
|
|
484
|
+
operation = Promise.race([operation, _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _throwOnAbort, throwOnAbort_fn).call(this, options.signal)]);
|
|
485
485
|
}
|
|
486
486
|
const result = await operation;
|
|
487
487
|
resolve2(result);
|
|
@@ -494,11 +494,11 @@ var PQueue = class extends import_index.default {
|
|
|
494
494
|
reject(error);
|
|
495
495
|
this.emit("error", error);
|
|
496
496
|
} finally {
|
|
497
|
-
|
|
497
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _next, next_fn).call(this);
|
|
498
498
|
}
|
|
499
499
|
}, options);
|
|
500
500
|
this.emit("add");
|
|
501
|
-
|
|
501
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this);
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
504
|
async addAll(functions, options) {
|
|
@@ -508,24 +508,24 @@ var PQueue = class extends import_index.default {
|
|
|
508
508
|
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.)
|
|
509
509
|
*/
|
|
510
510
|
start() {
|
|
511
|
-
if (!
|
|
511
|
+
if (!_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _isPaused)) {
|
|
512
512
|
return this;
|
|
513
513
|
}
|
|
514
|
-
|
|
515
|
-
|
|
514
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _isPaused, false);
|
|
515
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
|
|
516
516
|
return this;
|
|
517
517
|
}
|
|
518
518
|
/**
|
|
519
519
|
Put queue execution on hold.
|
|
520
520
|
*/
|
|
521
521
|
pause() {
|
|
522
|
-
|
|
522
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _isPaused, true);
|
|
523
523
|
}
|
|
524
524
|
/**
|
|
525
525
|
Clear the queue.
|
|
526
526
|
*/
|
|
527
527
|
clear() {
|
|
528
|
-
|
|
528
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _queue2, new (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queueClass))());
|
|
529
529
|
}
|
|
530
530
|
/**
|
|
531
531
|
Can be called multiple times. Useful if you for example add additional items at a later time.
|
|
@@ -533,10 +533,10 @@ var PQueue = class extends import_index.default {
|
|
|
533
533
|
@returns A promise that settles when the queue becomes empty.
|
|
534
534
|
*/
|
|
535
535
|
async onEmpty() {
|
|
536
|
-
if (
|
|
536
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
537
537
|
return;
|
|
538
538
|
}
|
|
539
|
-
await
|
|
539
|
+
await _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "empty");
|
|
540
540
|
}
|
|
541
541
|
/**
|
|
542
542
|
@returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
|
|
@@ -546,10 +546,10 @@ var PQueue = class extends import_index.default {
|
|
|
546
546
|
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.
|
|
547
547
|
*/
|
|
548
548
|
async onSizeLessThan(limit) {
|
|
549
|
-
if (
|
|
549
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue2).size < limit) {
|
|
550
550
|
return;
|
|
551
551
|
}
|
|
552
|
-
await
|
|
552
|
+
await _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "next", () => _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue2).size < limit);
|
|
553
553
|
}
|
|
554
554
|
/**
|
|
555
555
|
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.
|
|
@@ -557,16 +557,16 @@ var PQueue = class extends import_index.default {
|
|
|
557
557
|
@returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
|
|
558
558
|
*/
|
|
559
559
|
async onIdle() {
|
|
560
|
-
if (
|
|
560
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _pending) === 0 && _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
561
561
|
return;
|
|
562
562
|
}
|
|
563
|
-
await
|
|
563
|
+
await _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _onEvent, onEvent_fn).call(this, "idle");
|
|
564
564
|
}
|
|
565
565
|
/**
|
|
566
566
|
Size of the queue, the number of queued items waiting to run.
|
|
567
567
|
*/
|
|
568
568
|
get size() {
|
|
569
|
-
return
|
|
569
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue2).size;
|
|
570
570
|
}
|
|
571
571
|
/**
|
|
572
572
|
Size of the queue, filtered by the given options.
|
|
@@ -574,19 +574,19 @@ var PQueue = class extends import_index.default {
|
|
|
574
574
|
For example, this can be used to find the number of items remaining in the queue with a specific priority level.
|
|
575
575
|
*/
|
|
576
576
|
sizeBy(options) {
|
|
577
|
-
return
|
|
577
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue2).filter(options).length;
|
|
578
578
|
}
|
|
579
579
|
/**
|
|
580
580
|
Number of running items (no longer in the queue).
|
|
581
581
|
*/
|
|
582
582
|
get pending() {
|
|
583
|
-
return
|
|
583
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _pending);
|
|
584
584
|
}
|
|
585
585
|
/**
|
|
586
586
|
Whether the queue is currently paused.
|
|
587
587
|
*/
|
|
588
588
|
get isPaused() {
|
|
589
|
-
return
|
|
589
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _isPaused);
|
|
590
590
|
}
|
|
591
591
|
};
|
|
592
592
|
_carryoverConcurrencyCount = new WeakMap();
|
|
@@ -605,35 +605,35 @@ _isPaused = new WeakMap();
|
|
|
605
605
|
_throwOnTimeout = new WeakMap();
|
|
606
606
|
_doesIntervalAllowAnother = new WeakSet();
|
|
607
607
|
doesIntervalAllowAnother_get = function() {
|
|
608
|
-
return
|
|
608
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _intervalCount) < _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _intervalCap);
|
|
609
609
|
};
|
|
610
610
|
_doesConcurrentAllowAnother = new WeakSet();
|
|
611
611
|
doesConcurrentAllowAnother_get = function() {
|
|
612
|
-
return
|
|
612
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _pending) < _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _concurrency);
|
|
613
613
|
};
|
|
614
614
|
_next = new WeakSet();
|
|
615
615
|
next_fn = function() {
|
|
616
|
-
|
|
617
|
-
|
|
616
|
+
_chunkQAG3ZNOMcjs.__privateWrapper.call(void 0, this, _pending)._--;
|
|
617
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this);
|
|
618
618
|
this.emit("next");
|
|
619
619
|
};
|
|
620
620
|
_onResumeInterval = new WeakSet();
|
|
621
621
|
onResumeInterval_fn = function() {
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
622
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _onInterval, onInterval_fn).call(this);
|
|
623
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _initializeIntervalIfNeeded, initializeIntervalIfNeeded_fn).call(this);
|
|
624
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _timeoutId, void 0);
|
|
625
625
|
};
|
|
626
626
|
_isIntervalPaused = new WeakSet();
|
|
627
627
|
isIntervalPaused_get = function() {
|
|
628
628
|
const now = Date.now();
|
|
629
|
-
if (
|
|
630
|
-
const delay =
|
|
629
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _intervalId) === void 0) {
|
|
630
|
+
const delay = _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _intervalEnd) - now;
|
|
631
631
|
if (delay < 0) {
|
|
632
|
-
|
|
632
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _intervalCount, _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _pending) : 0);
|
|
633
633
|
} else {
|
|
634
|
-
if (
|
|
635
|
-
|
|
636
|
-
|
|
634
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _timeoutId) === void 0) {
|
|
635
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _timeoutId, setTimeout(() => {
|
|
636
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _onResumeInterval, onResumeInterval_fn).call(this);
|
|
637
637
|
}, delay));
|
|
638
638
|
}
|
|
639
639
|
return true;
|
|
@@ -643,28 +643,28 @@ isIntervalPaused_get = function() {
|
|
|
643
643
|
};
|
|
644
644
|
_tryToStartAnother = new WeakSet();
|
|
645
645
|
tryToStartAnother_fn = function() {
|
|
646
|
-
if (
|
|
647
|
-
if (
|
|
648
|
-
clearInterval(
|
|
646
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue2).size === 0) {
|
|
647
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _intervalId)) {
|
|
648
|
+
clearInterval(_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _intervalId));
|
|
649
649
|
}
|
|
650
|
-
|
|
650
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _intervalId, void 0);
|
|
651
651
|
this.emit("empty");
|
|
652
|
-
if (
|
|
652
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _pending) === 0) {
|
|
653
653
|
this.emit("idle");
|
|
654
654
|
}
|
|
655
655
|
return false;
|
|
656
656
|
}
|
|
657
|
-
if (!
|
|
658
|
-
const canInitializeInterval = !
|
|
659
|
-
if (
|
|
660
|
-
const job =
|
|
657
|
+
if (!_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _isPaused)) {
|
|
658
|
+
const canInitializeInterval = !_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _isIntervalPaused, isIntervalPaused_get);
|
|
659
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _doesIntervalAllowAnother, doesIntervalAllowAnother_get) && _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _doesConcurrentAllowAnother, doesConcurrentAllowAnother_get)) {
|
|
660
|
+
const job = _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue2).dequeue();
|
|
661
661
|
if (!job) {
|
|
662
662
|
return false;
|
|
663
663
|
}
|
|
664
664
|
this.emit("active");
|
|
665
665
|
job();
|
|
666
666
|
if (canInitializeInterval) {
|
|
667
|
-
|
|
667
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _initializeIntervalIfNeeded, initializeIntervalIfNeeded_fn).call(this);
|
|
668
668
|
}
|
|
669
669
|
return true;
|
|
670
670
|
}
|
|
@@ -673,26 +673,26 @@ tryToStartAnother_fn = function() {
|
|
|
673
673
|
};
|
|
674
674
|
_initializeIntervalIfNeeded = new WeakSet();
|
|
675
675
|
initializeIntervalIfNeeded_fn = function() {
|
|
676
|
-
if (
|
|
676
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _isIntervalIgnored) || _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _intervalId) !== void 0) {
|
|
677
677
|
return;
|
|
678
678
|
}
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
},
|
|
682
|
-
|
|
679
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _intervalId, setInterval(() => {
|
|
680
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _onInterval, onInterval_fn).call(this);
|
|
681
|
+
}, _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _interval)));
|
|
682
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _intervalEnd, Date.now() + _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _interval));
|
|
683
683
|
};
|
|
684
684
|
_onInterval = new WeakSet();
|
|
685
685
|
onInterval_fn = function() {
|
|
686
|
-
if (
|
|
687
|
-
clearInterval(
|
|
688
|
-
|
|
686
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _intervalCount) === 0 && _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _pending) === 0 && _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _intervalId)) {
|
|
687
|
+
clearInterval(_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _intervalId));
|
|
688
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _intervalId, void 0);
|
|
689
689
|
}
|
|
690
|
-
|
|
691
|
-
|
|
690
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _intervalCount, _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _carryoverConcurrencyCount) ? _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _pending) : 0);
|
|
691
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _processQueue, processQueue_fn).call(this);
|
|
692
692
|
};
|
|
693
693
|
_processQueue = new WeakSet();
|
|
694
694
|
processQueue_fn = function() {
|
|
695
|
-
while (
|
|
695
|
+
while (_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _tryToStartAnother, tryToStartAnother_fn).call(this)) {
|
|
696
696
|
}
|
|
697
697
|
};
|
|
698
698
|
_throwOnAbort = new WeakSet();
|
|
@@ -721,12 +721,12 @@ onEvent_fn = async function(event, filter) {
|
|
|
721
721
|
var _remeda = require('remeda');
|
|
722
722
|
|
|
723
723
|
// src/BarrelManager.ts
|
|
724
|
-
|
|
724
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
725
725
|
|
|
726
726
|
|
|
727
727
|
|
|
728
728
|
// src/utils/TreeNode.ts
|
|
729
|
-
|
|
729
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
730
730
|
var _directorytree = require('directory-tree'); var _directorytree2 = _interopRequireDefault(_directorytree);
|
|
731
731
|
var TreeNode = class _TreeNode {
|
|
732
732
|
constructor(data, parent) {
|
|
@@ -829,8 +829,8 @@ var TreeNode = class _TreeNode {
|
|
|
829
829
|
var _options;
|
|
830
830
|
var BarrelManager = class {
|
|
831
831
|
constructor(options = {}) {
|
|
832
|
-
|
|
833
|
-
|
|
832
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _options, void 0);
|
|
833
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _options, options);
|
|
834
834
|
return this;
|
|
835
835
|
}
|
|
836
836
|
getNamedExport(root, item) {
|
|
@@ -870,7 +870,7 @@ var BarrelManager = class {
|
|
|
870
870
|
})]);
|
|
871
871
|
}
|
|
872
872
|
getIndexes(root) {
|
|
873
|
-
const { treeNode = {}, isTypeOnly, extName } =
|
|
873
|
+
const { treeNode = {}, isTypeOnly, extName } = _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _options);
|
|
874
874
|
const tree = TreeNode.build(root, treeNode);
|
|
875
875
|
if (!tree) {
|
|
876
876
|
return null;
|
|
@@ -882,7 +882,7 @@ var BarrelManager = class {
|
|
|
882
882
|
if (treeNode2.children.length > 1) {
|
|
883
883
|
const indexPath = _path2.default.resolve(treeNode2.data.path, "index.ts");
|
|
884
884
|
const exports = treeNode2.children.filter(Boolean).map((file) => {
|
|
885
|
-
const importPath = file.data.type === "split" ? `./${file.data.name}/index` : `./${
|
|
885
|
+
const importPath = file.data.type === "split" ? `./${file.data.name}/index` : `./${_chunkO4HDY7JScjs.trimExtName.call(void 0, file.data.name)}`;
|
|
886
886
|
if (importPath.endsWith("index") && file.data.type === "single") {
|
|
887
887
|
return void 0;
|
|
888
888
|
}
|
|
@@ -901,7 +901,7 @@ var BarrelManager = class {
|
|
|
901
901
|
} else if (treeNode2.children.length === 1) {
|
|
902
902
|
const [treeNodeChild] = treeNode2.children;
|
|
903
903
|
const indexPath = _path2.default.resolve(treeNode2.data.path, "index.ts");
|
|
904
|
-
const importPath = treeNodeChild.data.type === "split" ? `./${treeNodeChild.data.name}/index` : `./${
|
|
904
|
+
const importPath = treeNodeChild.data.type === "split" ? `./${treeNodeChild.data.name}/index` : `./${_chunkO4HDY7JScjs.trimExtName.call(void 0, treeNodeChild.data.name)}`;
|
|
905
905
|
const exports = [
|
|
906
906
|
{
|
|
907
907
|
path: extName ? `${importPath}${extName}` : importPath,
|
|
@@ -933,31 +933,31 @@ var KubbFile;
|
|
|
933
933
|
var _cache, _task, _queue3, _add, add_fn, _addOrAppend, addOrAppend_fn;
|
|
934
934
|
var _FileManager = class _FileManager {
|
|
935
935
|
constructor({ task = async (file) => file, queue = new PQueue() } = {}) {
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
936
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _add);
|
|
937
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _addOrAppend);
|
|
938
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _cache, /* @__PURE__ */ new Map());
|
|
939
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _task, void 0);
|
|
940
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _queue3, void 0);
|
|
941
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _task, task);
|
|
942
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _queue3, queue);
|
|
943
943
|
return this;
|
|
944
944
|
}
|
|
945
945
|
get files() {
|
|
946
946
|
const files = [];
|
|
947
|
-
|
|
947
|
+
_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cache).forEach((item) => {
|
|
948
948
|
files.push(...item.flat(1));
|
|
949
949
|
});
|
|
950
950
|
return files;
|
|
951
951
|
}
|
|
952
952
|
get isExecuting() {
|
|
953
|
-
return
|
|
953
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue3).size !== 0 && _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue3).pending !== 0;
|
|
954
954
|
}
|
|
955
955
|
async add(...files) {
|
|
956
956
|
const promises = combineFiles(files).map((file) => {
|
|
957
957
|
if (file.override) {
|
|
958
|
-
return
|
|
958
|
+
return _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, file);
|
|
959
959
|
}
|
|
960
|
-
return
|
|
960
|
+
return _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, file);
|
|
961
961
|
});
|
|
962
962
|
const resolvedFiles = await Promise.all(promises);
|
|
963
963
|
if (files.length > 1) {
|
|
@@ -971,11 +971,11 @@ var _FileManager = class _FileManager {
|
|
|
971
971
|
return void 0;
|
|
972
972
|
}
|
|
973
973
|
const pathToBuildFrom = _path.resolve.call(void 0, root, output.path);
|
|
974
|
-
if (
|
|
974
|
+
if (_chunkO4HDY7JScjs.transformers_default.trimExtName(pathToBuildFrom).endsWith("index")) {
|
|
975
975
|
logger.emit("warning", "Output has the same fileName as the barrelFiles, please disable barrel generation");
|
|
976
976
|
return;
|
|
977
977
|
}
|
|
978
|
-
const exportPath = output.path.startsWith("./") ?
|
|
978
|
+
const exportPath = output.path.startsWith("./") ? _chunkO4HDY7JScjs.trimExtName.call(void 0, output.path) : `./${_chunkO4HDY7JScjs.trimExtName.call(void 0, output.path)}`;
|
|
979
979
|
const mode = _FileManager.getMode(output.path);
|
|
980
980
|
const barrelManager = new BarrelManager({
|
|
981
981
|
extName: output.extName,
|
|
@@ -998,7 +998,7 @@ var _FileManager = class _FileManager {
|
|
|
998
998
|
}
|
|
999
999
|
await Promise.all(
|
|
1000
1000
|
files.map((file) => {
|
|
1001
|
-
return
|
|
1001
|
+
return _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, {
|
|
1002
1002
|
...file,
|
|
1003
1003
|
meta: meta ? meta : file.meta
|
|
1004
1004
|
});
|
|
@@ -1025,33 +1025,33 @@ var _FileManager = class _FileManager {
|
|
|
1025
1025
|
if (exportType === "barrelNamed" && !output.exportAs && _optionalChain([rootFile, 'access', _32 => _32.exports, 'optionalAccess', _33 => _33[0]])) {
|
|
1026
1026
|
rootFile.exports = barrelManager.getNamedExport(root, rootFile.exports[0]);
|
|
1027
1027
|
}
|
|
1028
|
-
await
|
|
1028
|
+
await _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _addOrAppend, addOrAppend_fn).call(this, {
|
|
1029
1029
|
...rootFile,
|
|
1030
1030
|
meta: meta ? meta : rootFile.meta
|
|
1031
1031
|
});
|
|
1032
1032
|
}
|
|
1033
1033
|
getCacheByUUID(UUID) {
|
|
1034
1034
|
let cache;
|
|
1035
|
-
|
|
1035
|
+
_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cache).forEach((files) => {
|
|
1036
1036
|
cache = files.find((item) => item.id === UUID);
|
|
1037
1037
|
});
|
|
1038
1038
|
return cache;
|
|
1039
1039
|
}
|
|
1040
1040
|
get(path5) {
|
|
1041
|
-
return
|
|
1041
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cache).get(path5);
|
|
1042
1042
|
}
|
|
1043
1043
|
remove(path5) {
|
|
1044
1044
|
const cacheItem = this.get(path5);
|
|
1045
1045
|
if (!cacheItem) {
|
|
1046
1046
|
return;
|
|
1047
1047
|
}
|
|
1048
|
-
|
|
1048
|
+
_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cache).delete(path5);
|
|
1049
1049
|
}
|
|
1050
1050
|
async write(...params) {
|
|
1051
|
-
return
|
|
1051
|
+
return _chunkN32RRGTXcjs.write.call(void 0, ...params);
|
|
1052
1052
|
}
|
|
1053
1053
|
async read(...params) {
|
|
1054
|
-
return
|
|
1054
|
+
return _chunkGOCMZM5Zcjs.read.call(void 0, ...params);
|
|
1055
1055
|
}
|
|
1056
1056
|
// statics
|
|
1057
1057
|
static getSource(file) {
|
|
@@ -1081,7 +1081,7 @@ add_fn = async function(file) {
|
|
|
1081
1081
|
const controller = new AbortController();
|
|
1082
1082
|
const resolvedFile = {
|
|
1083
1083
|
id: _crypto2.default.randomUUID(),
|
|
1084
|
-
name:
|
|
1084
|
+
name: _chunkO4HDY7JScjs.trimExtName.call(void 0, file.baseName),
|
|
1085
1085
|
...file
|
|
1086
1086
|
};
|
|
1087
1087
|
if (_optionalChain([resolvedFile, 'access', _34 => _34.exports, 'optionalAccess', _35 => _35.length])) {
|
|
@@ -1094,22 +1094,22 @@ add_fn = async function(file) {
|
|
|
1094
1094
|
return true;
|
|
1095
1095
|
});
|
|
1096
1096
|
}
|
|
1097
|
-
|
|
1098
|
-
return
|
|
1097
|
+
_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cache).set(resolvedFile.path, [{ cancel: () => controller.abort(), ...resolvedFile }]);
|
|
1098
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _queue3).add(
|
|
1099
1099
|
async () => {
|
|
1100
1100
|
var _a;
|
|
1101
|
-
return (_a =
|
|
1101
|
+
return (_a = _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _task)) == null ? void 0 : _a.call(this, resolvedFile);
|
|
1102
1102
|
},
|
|
1103
1103
|
{ signal: controller.signal }
|
|
1104
1104
|
);
|
|
1105
1105
|
};
|
|
1106
1106
|
_addOrAppend = new WeakSet();
|
|
1107
1107
|
addOrAppend_fn = async function(file) {
|
|
1108
|
-
const previousCaches =
|
|
1108
|
+
const previousCaches = _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cache).get(file.path);
|
|
1109
1109
|
const previousCache = previousCaches ? previousCaches.at(previousCaches.length - 1) : void 0;
|
|
1110
1110
|
if (previousCache) {
|
|
1111
|
-
|
|
1112
|
-
return
|
|
1111
|
+
_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cache).delete(previousCache.path);
|
|
1112
|
+
return _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, {
|
|
1113
1113
|
...file,
|
|
1114
1114
|
source: previousCache.source && file.source ? `${previousCache.source}
|
|
1115
1115
|
${file.source}` : "",
|
|
@@ -1118,7 +1118,7 @@ ${file.source}` : "",
|
|
|
1118
1118
|
env: { ...previousCache.env || {}, ...file.env || {} }
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
|
-
return
|
|
1121
|
+
return _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _add, add_fn).call(this, file);
|
|
1122
1122
|
};
|
|
1123
1123
|
var FileManager = _FileManager;
|
|
1124
1124
|
function combineFiles(files) {
|
|
@@ -1159,11 +1159,11 @@ function getSource(file) {
|
|
|
1159
1159
|
const exports = file.exports ? combineExports(file.exports) : [];
|
|
1160
1160
|
const imports = file.imports && file.source ? combineImports(file.imports, exports, file.source) : [];
|
|
1161
1161
|
const importNodes = imports.filter((item) => {
|
|
1162
|
-
return item.path !==
|
|
1162
|
+
return item.path !== _chunkO4HDY7JScjs.trimExtName.call(void 0, file.path);
|
|
1163
1163
|
}).map((item) => {
|
|
1164
1164
|
return factory.createImportDeclaration({
|
|
1165
1165
|
name: item.name,
|
|
1166
|
-
path: item.root ?
|
|
1166
|
+
path: item.root ? _chunkGOCMZM5Zcjs.getRelativePath.call(void 0, item.root, item.path) : item.path,
|
|
1167
1167
|
isTypeOnly: item.isTypeOnly
|
|
1168
1168
|
});
|
|
1169
1169
|
});
|
|
@@ -1179,7 +1179,7 @@ function getSource(file) {
|
|
|
1179
1179
|
return _parser.print.call(void 0, [], { source, noEmitHelpers: false });
|
|
1180
1180
|
}
|
|
1181
1181
|
function combineExports(exports) {
|
|
1182
|
-
const combinedExports =
|
|
1182
|
+
const combinedExports = _chunkN7GFIV72cjs.orderBy.call(void 0, exports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
|
|
1183
1183
|
(prev, curr) => {
|
|
1184
1184
|
const name = curr.name;
|
|
1185
1185
|
const prevByPath = prev.findLast((imp) => imp.path === curr.path);
|
|
@@ -1210,10 +1210,10 @@ function combineExports(exports) {
|
|
|
1210
1210
|
},
|
|
1211
1211
|
[]
|
|
1212
1212
|
);
|
|
1213
|
-
return
|
|
1213
|
+
return _chunkN7GFIV72cjs.orderBy.call(void 0, combinedExports, [(v) => !v.isTypeOnly, (v) => v.asAlias], ["desc", "desc"]);
|
|
1214
1214
|
}
|
|
1215
1215
|
function combineImports(imports, exports, source) {
|
|
1216
|
-
const combinedImports =
|
|
1216
|
+
const combinedImports = _chunkN7GFIV72cjs.orderBy.call(void 0, imports, [(v) => !v.isTypeOnly], ["asc"]).reduce(
|
|
1217
1217
|
(prev, curr) => {
|
|
1218
1218
|
let name = Array.isArray(curr.name) ? [...new Set(curr.name)] : curr.name;
|
|
1219
1219
|
const hasImportInSource = (importName) => {
|
|
@@ -1255,7 +1255,7 @@ function combineImports(imports, exports, source) {
|
|
|
1255
1255
|
},
|
|
1256
1256
|
[]
|
|
1257
1257
|
);
|
|
1258
|
-
return
|
|
1258
|
+
return _chunkN7GFIV72cjs.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 = _chunkO4HDY7JScjs.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 = _chunkO4HDY7JScjs.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
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
1293
1293
|
|
|
1294
1294
|
// src/PromiseManager.ts
|
|
1295
|
-
|
|
1295
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
1296
1296
|
|
|
1297
1297
|
// src/utils/executeStrategies.ts
|
|
1298
|
-
|
|
1298
|
+
_chunkQAG3ZNOMcjs.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
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _options2, {});
|
|
1337
|
+
_chunkQAG3ZNOMcjs.__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, _chunkQAG3ZNOMcjs.__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
|
+
_chunkQAG3ZNOMcjs.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
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
1374
1374
|
|
|
1375
1375
|
|
|
1376
1376
|
// src/utils/cache.ts
|
|
1377
|
-
|
|
1377
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
1378
1378
|
function createPluginCache(Store = /* @__PURE__ */ Object.create(null)) {
|
|
1379
1379
|
return {
|
|
1380
1380
|
set(id, value) {
|
|
@@ -1455,8 +1455,8 @@ var definePlugin = createPlugin((options) => {
|
|
|
1455
1455
|
var _core, _usedPluginNames, _promiseManager, _getSortedPlugins, getSortedPlugins_fn, _addExecutedToCallStack, addExecutedToCallStack_fn, _execute, execute_fn, _executeSync, executeSync_fn, _catcher, catcher_fn, _parse, parse_fn;
|
|
1456
1456
|
var PluginManager = class {
|
|
1457
1457
|
constructor(config, options) {
|
|
1458
|
-
|
|
1459
|
-
|
|
1458
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _getSortedPlugins);
|
|
1459
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _addExecutedToCallStack);
|
|
1460
1460
|
/**
|
|
1461
1461
|
* Run an async plugin hook and return the result.
|
|
1462
1462
|
* @param hookName Name of the plugin hook. Must be either in `PluginHooks` or `OutputPluginValueHooks`.
|
|
@@ -1464,7 +1464,7 @@ var PluginManager = class {
|
|
|
1464
1464
|
* @param plugin The actual pluginObject to run.
|
|
1465
1465
|
*/
|
|
1466
1466
|
// Implementation signature
|
|
1467
|
-
|
|
1467
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _execute);
|
|
1468
1468
|
/**
|
|
1469
1469
|
* Run a sync plugin hook and return the result.
|
|
1470
1470
|
* @param hookName Name of the plugin hook. Must be in `PluginHooks`.
|
|
@@ -1472,14 +1472,14 @@ var PluginManager = class {
|
|
|
1472
1472
|
* @param plugin The acutal plugin
|
|
1473
1473
|
* @param replaceContext When passed, the plugin context can be overridden.
|
|
1474
1474
|
*/
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
this.events = new (0,
|
|
1475
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _executeSync);
|
|
1476
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _catcher);
|
|
1477
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _parse);
|
|
1478
|
+
this.events = new (0, _chunkFJJL4FXBcjs.EventEmitter)();
|
|
1479
1479
|
this.executed = [];
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1480
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _core, void 0);
|
|
1481
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _usedPluginNames, {});
|
|
1482
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _promiseManager, void 0);
|
|
1483
1483
|
this.resolvePath = (params) => {
|
|
1484
1484
|
if (params.pluginKey) {
|
|
1485
1485
|
const paths = this.hookForPluginSync({
|
|
@@ -1521,13 +1521,13 @@ Falling back on the first item.
|
|
|
1521
1521
|
`
|
|
1522
1522
|
]);
|
|
1523
1523
|
}
|
|
1524
|
-
return
|
|
1524
|
+
return _chunkO4HDY7JScjs.transformReservedWord.call(void 0, _optionalChain([names, 'optionalAccess', _47 => _47.at, 'call', _48 => _48(0)]) || params.name);
|
|
1525
1525
|
}
|
|
1526
1526
|
const name = this.hookFirstSync({
|
|
1527
1527
|
hookName: "resolveName",
|
|
1528
1528
|
parameters: [params.name, params.type]
|
|
1529
1529
|
}).result;
|
|
1530
|
-
return
|
|
1530
|
+
return _chunkO4HDY7JScjs.transformReservedWord.call(void 0, name);
|
|
1531
1531
|
};
|
|
1532
1532
|
this.config = config;
|
|
1533
1533
|
this.logger = options.logger;
|
|
@@ -1536,7 +1536,7 @@ Falling back on the first item.
|
|
|
1536
1536
|
task: options.task,
|
|
1537
1537
|
queue: this.queue
|
|
1538
1538
|
});
|
|
1539
|
-
|
|
1539
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _promiseManager, new PromiseManager({
|
|
1540
1540
|
nullCheck: (state) => !!_optionalChain([state, 'optionalAccess', _49 => _49.result])
|
|
1541
1541
|
}));
|
|
1542
1542
|
const plugins = config.plugins || [];
|
|
@@ -1547,11 +1547,11 @@ Falling back on the first item.
|
|
|
1547
1547
|
fileManager: this.fileManager,
|
|
1548
1548
|
resolvePath: this.resolvePath.bind(this),
|
|
1549
1549
|
resolveName: this.resolveName.bind(this),
|
|
1550
|
-
getPlugins:
|
|
1550
|
+
getPlugins: _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).bind(this)
|
|
1551
1551
|
});
|
|
1552
|
-
|
|
1553
|
-
this.plugins = [
|
|
1554
|
-
return
|
|
1552
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _core, _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _parse, parse_fn).call(this, core, this, core.api.call(null)));
|
|
1553
|
+
this.plugins = [_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _core), ...plugins].map((plugin) => {
|
|
1554
|
+
return _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _parse, parse_fn).call(this, plugin, this, _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _core).api);
|
|
1555
1555
|
});
|
|
1556
1556
|
return this;
|
|
1557
1557
|
}
|
|
@@ -1563,7 +1563,7 @@ Falling back on the first item.
|
|
|
1563
1563
|
throw new Error(`Filepath should be defined for resolvedName "${name}" and pluginKey [${JSON.stringify(pluginKey)}]`);
|
|
1564
1564
|
}
|
|
1565
1565
|
try {
|
|
1566
|
-
source =
|
|
1566
|
+
source = _chunkGOCMZM5Zcjs.readSync.call(void 0, path5);
|
|
1567
1567
|
} catch (_e) {
|
|
1568
1568
|
}
|
|
1569
1569
|
return {
|
|
@@ -1591,7 +1591,7 @@ Falling back on the first item.
|
|
|
1591
1591
|
}) {
|
|
1592
1592
|
const plugins = this.getPluginsByKey(hookName, pluginKey);
|
|
1593
1593
|
const promises = plugins.map((plugin) => {
|
|
1594
|
-
return
|
|
1594
|
+
return _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1595
1595
|
strategy: "hookFirst",
|
|
1596
1596
|
hookName,
|
|
1597
1597
|
parameters,
|
|
@@ -1610,7 +1610,7 @@ Falling back on the first item.
|
|
|
1610
1610
|
}) {
|
|
1611
1611
|
const plugins = this.getPluginsByKey(hookName, pluginKey);
|
|
1612
1612
|
return plugins.map((plugin) => {
|
|
1613
|
-
return
|
|
1613
|
+
return _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _executeSync, executeSync_fn).call(this, {
|
|
1614
1614
|
strategy: "hookFirst",
|
|
1615
1615
|
hookName,
|
|
1616
1616
|
parameters,
|
|
@@ -1626,11 +1626,11 @@ Falling back on the first item.
|
|
|
1626
1626
|
parameters,
|
|
1627
1627
|
skipped
|
|
1628
1628
|
}) {
|
|
1629
|
-
const promises =
|
|
1629
|
+
const promises = _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this).filter((plugin) => {
|
|
1630
1630
|
return skipped ? skipped.has(plugin) : true;
|
|
1631
1631
|
}).map((plugin) => {
|
|
1632
1632
|
return async () => {
|
|
1633
|
-
const value = await
|
|
1633
|
+
const value = await _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1634
1634
|
strategy: "hookFirst",
|
|
1635
1635
|
hookName,
|
|
1636
1636
|
parameters,
|
|
@@ -1642,7 +1642,7 @@ Falling back on the first item.
|
|
|
1642
1642
|
});
|
|
1643
1643
|
};
|
|
1644
1644
|
});
|
|
1645
|
-
return
|
|
1645
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _promiseManager).run("first", promises);
|
|
1646
1646
|
}
|
|
1647
1647
|
/**
|
|
1648
1648
|
* First non-null result stops and will return it's value.
|
|
@@ -1653,12 +1653,12 @@ Falling back on the first item.
|
|
|
1653
1653
|
skipped
|
|
1654
1654
|
}) {
|
|
1655
1655
|
let parseResult = null;
|
|
1656
|
-
for (const plugin of
|
|
1656
|
+
for (const plugin of _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this)) {
|
|
1657
1657
|
if (_optionalChain([skipped, 'optionalAccess', _50 => _50.has, 'call', _51 => _51(plugin)])) {
|
|
1658
1658
|
continue;
|
|
1659
1659
|
}
|
|
1660
1660
|
parseResult = {
|
|
1661
|
-
result:
|
|
1661
|
+
result: _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _executeSync, executeSync_fn).call(this, {
|
|
1662
1662
|
strategy: "hookFirst",
|
|
1663
1663
|
hookName,
|
|
1664
1664
|
parameters,
|
|
@@ -1679,19 +1679,19 @@ Falling back on the first item.
|
|
|
1679
1679
|
hookName,
|
|
1680
1680
|
parameters
|
|
1681
1681
|
}) {
|
|
1682
|
-
const promises =
|
|
1683
|
-
return () =>
|
|
1682
|
+
const promises = _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this).map((plugin) => {
|
|
1683
|
+
return () => _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1684
1684
|
strategy: "hookParallel",
|
|
1685
1685
|
hookName,
|
|
1686
1686
|
parameters,
|
|
1687
1687
|
plugin
|
|
1688
1688
|
});
|
|
1689
1689
|
});
|
|
1690
|
-
const results = await
|
|
1690
|
+
const results = await _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _promiseManager).run("parallel", promises);
|
|
1691
1691
|
results.forEach((result, index) => {
|
|
1692
1692
|
if (isPromiseRejectedResult(result)) {
|
|
1693
|
-
const plugin =
|
|
1694
|
-
|
|
1693
|
+
const plugin = _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this)[index];
|
|
1694
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _catcher, catcher_fn).call(this, result.reason, plugin, hookName);
|
|
1695
1695
|
}
|
|
1696
1696
|
});
|
|
1697
1697
|
return results.filter((result) => result.status === "fulfilled").map((result) => result.value);
|
|
@@ -1706,16 +1706,16 @@ Falling back on the first item.
|
|
|
1706
1706
|
}) {
|
|
1707
1707
|
const [argument0, ...rest] = parameters;
|
|
1708
1708
|
let promise = Promise.resolve(argument0);
|
|
1709
|
-
for (const plugin of
|
|
1709
|
+
for (const plugin of _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this)) {
|
|
1710
1710
|
promise = promise.then((arg0) => {
|
|
1711
|
-
const value =
|
|
1711
|
+
const value = _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1712
1712
|
strategy: "hookReduceArg0",
|
|
1713
1713
|
hookName,
|
|
1714
1714
|
parameters: [arg0, ...rest],
|
|
1715
1715
|
plugin
|
|
1716
1716
|
});
|
|
1717
1717
|
return value;
|
|
1718
|
-
}).then((result) => reduce.call(
|
|
1718
|
+
}).then((result) => reduce.call(_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _core).api, argument0, result, plugin));
|
|
1719
1719
|
}
|
|
1720
1720
|
return promise;
|
|
1721
1721
|
}
|
|
@@ -1723,15 +1723,15 @@ Falling back on the first item.
|
|
|
1723
1723
|
* Chains plugins
|
|
1724
1724
|
*/
|
|
1725
1725
|
async hookSeq({ hookName, parameters }) {
|
|
1726
|
-
const promises =
|
|
1727
|
-
return () =>
|
|
1726
|
+
const promises = _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _getSortedPlugins, getSortedPlugins_fn).call(this).map((plugin) => {
|
|
1727
|
+
return () => _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _execute, execute_fn).call(this, {
|
|
1728
1728
|
strategy: "hookSeq",
|
|
1729
1729
|
hookName,
|
|
1730
1730
|
parameters,
|
|
1731
1731
|
plugin
|
|
1732
1732
|
});
|
|
1733
1733
|
});
|
|
1734
|
-
return
|
|
1734
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _promiseManager).run("seq", promises);
|
|
1735
1735
|
}
|
|
1736
1736
|
getPluginsByKey(hookName, pluginKey) {
|
|
1737
1737
|
const plugins = [...this.plugins];
|
|
@@ -1782,7 +1782,7 @@ _getSortedPlugins = new WeakSet();
|
|
|
1782
1782
|
getSortedPlugins_fn = function(hookName) {
|
|
1783
1783
|
const plugins = [...this.plugins].filter((plugin) => plugin.name !== "core");
|
|
1784
1784
|
if (hookName) {
|
|
1785
|
-
if (this.logger.logLevel ===
|
|
1785
|
+
if (this.logger.logLevel === _chunkFJJL4FXBcjs.LogLevel.info) {
|
|
1786
1786
|
const containsHookName = plugins.some((item) => item[hookName]);
|
|
1787
1787
|
if (!containsHookName) {
|
|
1788
1788
|
this.logger.emit("warning", `No hook ${hookName} found`);
|
|
@@ -1830,7 +1830,7 @@ execute_fn = function({
|
|
|
1830
1830
|
this.events.emit("execute", { strategy, hookName, parameters, plugin });
|
|
1831
1831
|
const task = Promise.resolve().then(() => {
|
|
1832
1832
|
if (typeof hook === "function") {
|
|
1833
|
-
const possiblePromiseResult = hook.apply({ ...
|
|
1833
|
+
const possiblePromiseResult = hook.apply({ ..._chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _core).api, plugin }, parameters);
|
|
1834
1834
|
if (isPromise(possiblePromiseResult)) {
|
|
1835
1835
|
return Promise.resolve(possiblePromiseResult);
|
|
1836
1836
|
}
|
|
@@ -1839,7 +1839,7 @@ execute_fn = function({
|
|
|
1839
1839
|
return hook;
|
|
1840
1840
|
}).then((result) => {
|
|
1841
1841
|
output = result;
|
|
1842
|
-
|
|
1842
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _addExecutedToCallStack, addExecutedToCallStack_fn).call(this, {
|
|
1843
1843
|
parameters,
|
|
1844
1844
|
output,
|
|
1845
1845
|
strategy,
|
|
@@ -1848,7 +1848,7 @@ execute_fn = function({
|
|
|
1848
1848
|
});
|
|
1849
1849
|
return result;
|
|
1850
1850
|
}).catch((e) => {
|
|
1851
|
-
|
|
1851
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _catcher, catcher_fn).call(this, e, plugin, hookName);
|
|
1852
1852
|
return null;
|
|
1853
1853
|
});
|
|
1854
1854
|
return task;
|
|
@@ -1868,12 +1868,12 @@ executeSync_fn = function({
|
|
|
1868
1868
|
this.events.emit("execute", { strategy, hookName, parameters, plugin });
|
|
1869
1869
|
try {
|
|
1870
1870
|
if (typeof hook === "function") {
|
|
1871
|
-
const fn = hook.apply({ ...
|
|
1871
|
+
const fn = hook.apply({ ..._chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _core).api, plugin }, parameters);
|
|
1872
1872
|
output = fn;
|
|
1873
1873
|
return fn;
|
|
1874
1874
|
}
|
|
1875
1875
|
output = hook;
|
|
1876
|
-
|
|
1876
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _addExecutedToCallStack, addExecutedToCallStack_fn).call(this, {
|
|
1877
1877
|
parameters,
|
|
1878
1878
|
output,
|
|
1879
1879
|
strategy,
|
|
@@ -1882,7 +1882,7 @@ executeSync_fn = function({
|
|
|
1882
1882
|
});
|
|
1883
1883
|
return hook;
|
|
1884
1884
|
} catch (e) {
|
|
1885
|
-
|
|
1885
|
+
_chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _catcher, catcher_fn).call(this, e, plugin, hookName);
|
|
1886
1886
|
return null;
|
|
1887
1887
|
}
|
|
1888
1888
|
};
|
|
@@ -1894,8 +1894,8 @@ catcher_fn = function(cause, plugin, hookName) {
|
|
|
1894
1894
|
};
|
|
1895
1895
|
_parse = new WeakSet();
|
|
1896
1896
|
parse_fn = function(plugin, pluginManager, context) {
|
|
1897
|
-
const usedPluginNames =
|
|
1898
|
-
|
|
1897
|
+
const usedPluginNames = _chunkQAG3ZNOMcjs.__privateGet.call(void 0, pluginManager, _usedPluginNames);
|
|
1898
|
+
_chunkSEIE6FAKcjs.setUniqueName.call(void 0, plugin.name, usedPluginNames);
|
|
1899
1899
|
const key = [plugin.name, usedPluginNames[plugin.name]].filter(Boolean);
|
|
1900
1900
|
if (!plugin.transform) {
|
|
1901
1901
|
plugin.transform = function transform(code) {
|
|
@@ -1917,7 +1917,7 @@ parse_fn = function(plugin, pluginManager, context) {
|
|
|
1917
1917
|
};
|
|
1918
1918
|
|
|
1919
1919
|
// src/config.ts
|
|
1920
|
-
|
|
1920
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
1921
1921
|
function defineConfig(options) {
|
|
1922
1922
|
return options;
|
|
1923
1923
|
}
|
|
@@ -1930,16 +1930,16 @@ async function transformReducer(_previousCode, result, _plugin) {
|
|
|
1930
1930
|
return result;
|
|
1931
1931
|
}
|
|
1932
1932
|
async function setup(options) {
|
|
1933
|
-
const { config, logger =
|
|
1933
|
+
const { config, logger = _chunkFJJL4FXBcjs.createLogger.call(void 0, { logLevel: _chunkFJJL4FXBcjs.LogLevel.silent }) } = options;
|
|
1934
1934
|
let count = 0;
|
|
1935
1935
|
try {
|
|
1936
|
-
if (isInputPath(config) && !new (0,
|
|
1937
|
-
await
|
|
1936
|
+
if (isInputPath(config) && !new (0, _chunkSEIE6FAKcjs.URLPath)(config.input.path).isURL) {
|
|
1937
|
+
await _chunkGOCMZM5Zcjs.read.call(void 0, config.input.path);
|
|
1938
1938
|
}
|
|
1939
1939
|
} catch (e) {
|
|
1940
1940
|
if (isInputPath(config)) {
|
|
1941
1941
|
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 ${
|
|
1942
|
+
`Cannot read file/URL defined in \`input.path\` or set with \`kubb generate PATH\` in the CLI of your Kubb config ${_chunkFJJL4FXBcjs.p.dim(config.input.path)}`,
|
|
1943
1943
|
{
|
|
1944
1944
|
cause: e
|
|
1945
1945
|
}
|
|
@@ -1947,7 +1947,7 @@ async function setup(options) {
|
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
1949
1949
|
if (config.output.clean) {
|
|
1950
|
-
await
|
|
1950
|
+
await _chunkJ6F7QWGKcjs.clean.call(void 0, config.output.path);
|
|
1951
1951
|
}
|
|
1952
1952
|
const task = async (file) => {
|
|
1953
1953
|
const { path: path5 } = file;
|
|
@@ -1992,14 +1992,14 @@ async function setup(options) {
|
|
|
1992
1992
|
const { hookName, parameters, plugin } = executer;
|
|
1993
1993
|
if (hookName === "writeFile") {
|
|
1994
1994
|
const [code] = parameters;
|
|
1995
|
-
logger.emit("debug", [`PluginKey ${
|
|
1995
|
+
logger.emit("debug", [`PluginKey ${_chunkFJJL4FXBcjs.p.dim(JSON.stringify(plugin.key))}
|
|
1996
1996
|
with source
|
|
1997
1997
|
|
|
1998
1998
|
${code}`]);
|
|
1999
1999
|
}
|
|
2000
2000
|
});
|
|
2001
2001
|
pluginManager.queue.on("add", () => {
|
|
2002
|
-
if (logger.logLevel !==
|
|
2002
|
+
if (logger.logLevel !== _chunkFJJL4FXBcjs.LogLevel.info) {
|
|
2003
2003
|
return;
|
|
2004
2004
|
}
|
|
2005
2005
|
if (count === 0) {
|
|
@@ -2007,31 +2007,31 @@ ${code}`]);
|
|
|
2007
2007
|
}
|
|
2008
2008
|
});
|
|
2009
2009
|
pluginManager.queue.on("active", () => {
|
|
2010
|
-
if (logger.logLevel !==
|
|
2010
|
+
if (logger.logLevel !== _chunkFJJL4FXBcjs.LogLevel.info) {
|
|
2011
2011
|
return;
|
|
2012
2012
|
}
|
|
2013
2013
|
if (logger.spinner && pluginManager.queue.size > 0) {
|
|
2014
2014
|
const text = `Item: ${count} Size: ${pluginManager.queue.size} Pending: ${pluginManager.queue.pending}`;
|
|
2015
|
-
logger.spinner.suffixText =
|
|
2015
|
+
logger.spinner.suffixText = _chunkFJJL4FXBcjs.p.dim(text);
|
|
2016
2016
|
}
|
|
2017
2017
|
++count;
|
|
2018
2018
|
});
|
|
2019
2019
|
pluginManager.queue.on("completed", () => {
|
|
2020
|
-
if (logger.logLevel !==
|
|
2020
|
+
if (logger.logLevel !== _chunkFJJL4FXBcjs.LogLevel.info) {
|
|
2021
2021
|
return;
|
|
2022
2022
|
}
|
|
2023
2023
|
if (logger.spinner) {
|
|
2024
2024
|
const text = `Item: ${count} Size: ${pluginManager.queue.size} Pending: ${pluginManager.queue.pending}`;
|
|
2025
|
-
logger.spinner.suffixText =
|
|
2025
|
+
logger.spinner.suffixText = _chunkFJJL4FXBcjs.p.dim(text);
|
|
2026
2026
|
}
|
|
2027
2027
|
});
|
|
2028
2028
|
pluginManager.on("executed", (executer) => {
|
|
2029
2029
|
const { hookName, plugin, output, parameters } = executer;
|
|
2030
2030
|
const logs = [
|
|
2031
|
-
`${
|
|
2032
|
-
parameters && `${
|
|
2031
|
+
`${_chunkFJJL4FXBcjs.randomCliColour.call(void 0, plugin.name)} Executing ${hookName}`,
|
|
2032
|
+
parameters && `${_chunkFJJL4FXBcjs.p.bgWhite("Parameters")} ${_chunkFJJL4FXBcjs.randomCliColour.call(void 0, plugin.name)} ${hookName}`,
|
|
2033
2033
|
JSON.stringify(parameters, void 0, 2),
|
|
2034
|
-
output && `${
|
|
2034
|
+
output && `${_chunkFJJL4FXBcjs.p.bgWhite("Output")} ${_chunkFJJL4FXBcjs.randomCliColour.call(void 0, plugin.name)} ${hookName}`,
|
|
2035
2035
|
output
|
|
2036
2036
|
].filter(Boolean);
|
|
2037
2037
|
logger.emit("debug", logs);
|
|
@@ -2046,7 +2046,7 @@ async function build(options) {
|
|
|
2046
2046
|
parameters: [options.config]
|
|
2047
2047
|
});
|
|
2048
2048
|
await pluginManager.hookParallel({ hookName: "buildEnd" });
|
|
2049
|
-
if (logger.logLevel ===
|
|
2049
|
+
if (logger.logLevel === _chunkFJJL4FXBcjs.LogLevel.info) {
|
|
2050
2050
|
logger.emit("end", "\u{1F4BE} Writing completed");
|
|
2051
2051
|
}
|
|
2052
2052
|
return {
|
|
@@ -2066,7 +2066,7 @@ async function safeBuild(options) {
|
|
|
2066
2066
|
parameters: [options.config]
|
|
2067
2067
|
});
|
|
2068
2068
|
await pluginManager.hookParallel({ hookName: "buildEnd" });
|
|
2069
|
-
if (logger.logLevel ===
|
|
2069
|
+
if (logger.logLevel === _chunkFJJL4FXBcjs.LogLevel.info) {
|
|
2070
2070
|
logger.emit("end", "\u{1F4BE} Writing completed");
|
|
2071
2071
|
}
|
|
2072
2072
|
} catch (e) {
|
|
@@ -2089,103 +2089,103 @@ async function safeBuild(options) {
|
|
|
2089
2089
|
}
|
|
2090
2090
|
|
|
2091
2091
|
// src/Generator.ts
|
|
2092
|
-
|
|
2092
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
2093
2093
|
var _options3, _context;
|
|
2094
2094
|
var Generator = class {
|
|
2095
2095
|
constructor(options, context) {
|
|
2096
|
-
|
|
2097
|
-
|
|
2096
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _options3, {});
|
|
2097
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _context, {});
|
|
2098
2098
|
if (context) {
|
|
2099
|
-
|
|
2099
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _context, context);
|
|
2100
2100
|
}
|
|
2101
2101
|
if (options) {
|
|
2102
|
-
|
|
2102
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _options3, options);
|
|
2103
2103
|
}
|
|
2104
2104
|
return this;
|
|
2105
2105
|
}
|
|
2106
2106
|
get options() {
|
|
2107
|
-
return
|
|
2107
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _options3);
|
|
2108
2108
|
}
|
|
2109
2109
|
get context() {
|
|
2110
|
-
return
|
|
2110
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _context);
|
|
2111
2111
|
}
|
|
2112
2112
|
set options(options) {
|
|
2113
|
-
|
|
2113
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _options3, { ..._chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _options3), ...options });
|
|
2114
2114
|
}
|
|
2115
2115
|
};
|
|
2116
2116
|
_options3 = new WeakMap();
|
|
2117
2117
|
_context = new WeakMap();
|
|
2118
2118
|
|
|
2119
2119
|
// src/PackageManager.ts
|
|
2120
|
-
|
|
2120
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
2121
2121
|
var _module = require('module'); var _module2 = _interopRequireDefault(_module);
|
|
2122
2122
|
var _os = require('os'); var _os2 = _interopRequireDefault(_os);
|
|
2123
2123
|
var _url = require('url');
|
|
2124
2124
|
|
|
2125
2125
|
// ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
|
|
2126
|
-
|
|
2126
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
2127
2127
|
|
|
2128
2128
|
|
|
2129
2129
|
// ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
|
|
2130
|
-
|
|
2130
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
2131
2131
|
var _process = require('process'); var _process2 = _interopRequireDefault(_process);
|
|
2132
2132
|
|
|
2133
2133
|
var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
|
|
2134
2134
|
|
|
2135
2135
|
|
|
2136
2136
|
// ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
|
|
2137
|
-
|
|
2137
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
2138
2138
|
|
|
2139
2139
|
// ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
|
|
2140
|
-
|
|
2140
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
2141
2141
|
|
|
2142
2142
|
// ../../node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
|
|
2143
|
-
|
|
2143
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
2144
2144
|
var Node = class {
|
|
2145
2145
|
constructor(value) {
|
|
2146
|
-
|
|
2147
|
-
|
|
2146
|
+
_chunkQAG3ZNOMcjs.__publicField.call(void 0, this, "value");
|
|
2147
|
+
_chunkQAG3ZNOMcjs.__publicField.call(void 0, this, "next");
|
|
2148
2148
|
this.value = value;
|
|
2149
2149
|
}
|
|
2150
2150
|
};
|
|
2151
2151
|
var _head, _tail, _size;
|
|
2152
2152
|
var Queue = class {
|
|
2153
2153
|
constructor() {
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2154
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _head, void 0);
|
|
2155
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _tail, void 0);
|
|
2156
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _size, void 0);
|
|
2157
2157
|
this.clear();
|
|
2158
2158
|
}
|
|
2159
2159
|
enqueue(value) {
|
|
2160
2160
|
const node = new Node(value);
|
|
2161
|
-
if (
|
|
2162
|
-
|
|
2163
|
-
|
|
2161
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _head)) {
|
|
2162
|
+
_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _tail).next = node;
|
|
2163
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _tail, node);
|
|
2164
2164
|
} else {
|
|
2165
|
-
|
|
2166
|
-
|
|
2165
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _head, node);
|
|
2166
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _tail, node);
|
|
2167
2167
|
}
|
|
2168
|
-
|
|
2168
|
+
_chunkQAG3ZNOMcjs.__privateWrapper.call(void 0, this, _size)._++;
|
|
2169
2169
|
}
|
|
2170
2170
|
dequeue() {
|
|
2171
|
-
const current =
|
|
2171
|
+
const current = _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _head);
|
|
2172
2172
|
if (!current) {
|
|
2173
2173
|
return;
|
|
2174
2174
|
}
|
|
2175
|
-
|
|
2176
|
-
|
|
2175
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _head, _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _head).next);
|
|
2176
|
+
_chunkQAG3ZNOMcjs.__privateWrapper.call(void 0, this, _size)._--;
|
|
2177
2177
|
return current.value;
|
|
2178
2178
|
}
|
|
2179
2179
|
clear() {
|
|
2180
|
-
|
|
2181
|
-
|
|
2182
|
-
|
|
2180
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _head, void 0);
|
|
2181
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _tail, void 0);
|
|
2182
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _size, 0);
|
|
2183
2183
|
}
|
|
2184
2184
|
get size() {
|
|
2185
|
-
return
|
|
2185
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _size);
|
|
2186
2186
|
}
|
|
2187
2187
|
*[Symbol.iterator]() {
|
|
2188
|
-
let current =
|
|
2188
|
+
let current = _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _head);
|
|
2189
2189
|
while (current) {
|
|
2190
2190
|
yield current.value;
|
|
2191
2191
|
current = current.next;
|
|
@@ -2336,14 +2336,14 @@ function locatePathSync(paths, {
|
|
|
2336
2336
|
}
|
|
2337
2337
|
|
|
2338
2338
|
// ../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js
|
|
2339
|
-
|
|
2339
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
2340
2340
|
|
|
2341
2341
|
function toPath2(urlOrPath) {
|
|
2342
2342
|
return urlOrPath instanceof URL ? _url.fileURLToPath.call(void 0, urlOrPath) : urlOrPath;
|
|
2343
2343
|
}
|
|
2344
2344
|
|
|
2345
2345
|
// ../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js
|
|
2346
|
-
|
|
2346
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
2347
2347
|
|
|
2348
2348
|
|
|
2349
2349
|
// ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
|
|
@@ -2426,30 +2426,30 @@ var _semver = require('semver');
|
|
|
2426
2426
|
var _cache2, _cwd, _SLASHES, _match, match_fn;
|
|
2427
2427
|
var _PackageManager = class _PackageManager {
|
|
2428
2428
|
constructor(workspace) {
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2429
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _match);
|
|
2430
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _cwd, void 0);
|
|
2431
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, this, _SLASHES, /* @__PURE__ */ new Set(["/", "\\"]));
|
|
2432
2432
|
if (workspace) {
|
|
2433
|
-
|
|
2433
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _cwd, workspace);
|
|
2434
2434
|
}
|
|
2435
2435
|
return this;
|
|
2436
2436
|
}
|
|
2437
2437
|
set workspace(workspace) {
|
|
2438
|
-
|
|
2438
|
+
_chunkQAG3ZNOMcjs.__privateSet.call(void 0, this, _cwd, workspace);
|
|
2439
2439
|
}
|
|
2440
2440
|
get workspace() {
|
|
2441
|
-
return
|
|
2441
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cwd);
|
|
2442
2442
|
}
|
|
2443
2443
|
normalizeDirectory(directory) {
|
|
2444
|
-
if (!
|
|
2444
|
+
if (!_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _SLASHES).has(directory[directory.length - 1])) {
|
|
2445
2445
|
return `${directory}/`;
|
|
2446
2446
|
}
|
|
2447
2447
|
return directory;
|
|
2448
2448
|
}
|
|
2449
2449
|
getLocation(path5) {
|
|
2450
2450
|
let location = path5;
|
|
2451
|
-
if (
|
|
2452
|
-
const require2 = _module2.default.createRequire(this.normalizeDirectory(
|
|
2451
|
+
if (_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cwd)) {
|
|
2452
|
+
const require2 = _module2.default.createRequire(this.normalizeDirectory(_chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cwd)));
|
|
2453
2453
|
location = require2.resolve(path5);
|
|
2454
2454
|
}
|
|
2455
2455
|
return location;
|
|
@@ -2469,46 +2469,46 @@ var _PackageManager = class _PackageManager {
|
|
|
2469
2469
|
}
|
|
2470
2470
|
async getPackageJSON() {
|
|
2471
2471
|
const pkgPath = await findUp(["package.json"], {
|
|
2472
|
-
cwd:
|
|
2472
|
+
cwd: _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cwd)
|
|
2473
2473
|
});
|
|
2474
2474
|
if (!pkgPath) {
|
|
2475
2475
|
return void 0;
|
|
2476
2476
|
}
|
|
2477
|
-
const json = await
|
|
2477
|
+
const json = await _chunkGOCMZM5Zcjs.read.call(void 0, pkgPath);
|
|
2478
2478
|
return JSON.parse(json);
|
|
2479
2479
|
}
|
|
2480
2480
|
getPackageJSONSync() {
|
|
2481
2481
|
const pkgPath = findUpSync(["package.json"], {
|
|
2482
|
-
cwd:
|
|
2482
|
+
cwd: _chunkQAG3ZNOMcjs.__privateGet.call(void 0, this, _cwd)
|
|
2483
2483
|
});
|
|
2484
2484
|
if (!pkgPath) {
|
|
2485
2485
|
return void 0;
|
|
2486
2486
|
}
|
|
2487
|
-
const json =
|
|
2487
|
+
const json = _chunkGOCMZM5Zcjs.readSync.call(void 0, pkgPath);
|
|
2488
2488
|
return JSON.parse(json);
|
|
2489
2489
|
}
|
|
2490
2490
|
static setVersion(dependency, version) {
|
|
2491
|
-
|
|
2491
|
+
_chunkQAG3ZNOMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency] = version;
|
|
2492
2492
|
}
|
|
2493
2493
|
async getVersion(dependency) {
|
|
2494
|
-
if (typeof dependency === "string" &&
|
|
2495
|
-
return
|
|
2494
|
+
if (typeof dependency === "string" && _chunkQAG3ZNOMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency]) {
|
|
2495
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency];
|
|
2496
2496
|
}
|
|
2497
2497
|
const packageJSON = await this.getPackageJSON();
|
|
2498
2498
|
if (!packageJSON) {
|
|
2499
2499
|
return void 0;
|
|
2500
2500
|
}
|
|
2501
|
-
return
|
|
2501
|
+
return _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _match, match_fn).call(this, packageJSON, dependency);
|
|
2502
2502
|
}
|
|
2503
2503
|
getVersionSync(dependency) {
|
|
2504
|
-
if (typeof dependency === "string" &&
|
|
2505
|
-
return
|
|
2504
|
+
if (typeof dependency === "string" && _chunkQAG3ZNOMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency]) {
|
|
2505
|
+
return _chunkQAG3ZNOMcjs.__privateGet.call(void 0, _PackageManager, _cache2)[dependency];
|
|
2506
2506
|
}
|
|
2507
2507
|
const packageJSON = this.getPackageJSONSync();
|
|
2508
2508
|
if (!packageJSON) {
|
|
2509
2509
|
return void 0;
|
|
2510
2510
|
}
|
|
2511
|
-
return
|
|
2511
|
+
return _chunkQAG3ZNOMcjs.__privateMethod.call(void 0, this, _match, match_fn).call(this, packageJSON, dependency);
|
|
2512
2512
|
}
|
|
2513
2513
|
async isValid(dependency, version) {
|
|
2514
2514
|
const packageVersion = await this.getVersion(dependency);
|
|
@@ -2551,12 +2551,12 @@ match_fn = function(packageJSON, dependency) {
|
|
|
2551
2551
|
const matchedDependency = Object.keys(dependencies).find((dep) => dep.match(dependency));
|
|
2552
2552
|
return matchedDependency ? dependencies[matchedDependency] : void 0;
|
|
2553
2553
|
};
|
|
2554
|
-
|
|
2554
|
+
_chunkQAG3ZNOMcjs.__privateAdd.call(void 0, _PackageManager, _cache2, {});
|
|
2555
2555
|
var PackageManager = _PackageManager;
|
|
2556
2556
|
|
|
2557
2557
|
// src/kubb.ts
|
|
2558
2558
|
var kubb_exports = {};
|
|
2559
|
-
|
|
2559
|
+
_chunkQAG3ZNOMcjs.init_cjs_shims.call(void 0, );
|
|
2560
2560
|
|
|
2561
2561
|
|
|
2562
2562
|
|