@kubb/core 2.1.6 → 2.2.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-DU6UHGVD.cjs → chunk-2UXXYHS6.cjs} +5 -5
- package/dist/{chunk-NWXLHLH3.js → chunk-37XMXECQ.js} +3 -3
- package/dist/chunk-5SUBV3F7.cjs +15 -0
- package/dist/{chunk-IZOYUU2C.cjs → chunk-CZFLDKR5.cjs} +6 -6
- package/dist/{chunk-WHFBT7CJ.cjs → chunk-DM53DOLW.cjs} +90 -90
- package/dist/{chunk-QDYI7RBT.js → chunk-ETA3LCRB.js} +3 -3
- package/dist/{chunk-QDYI7RBT.js.map → chunk-ETA3LCRB.js.map} +1 -1
- package/dist/{chunk-Q4BVTLXG.js → chunk-GKW5TTFV.js} +2 -2
- package/dist/{chunk-D42WMZZ7.js → chunk-HI4PB2AG.js} +7 -7
- package/dist/{chunk-HGRAENXJ.js → chunk-IQBEGX4Z.js} +2 -2
- package/dist/{chunk-DQ3TMDDK.cjs → chunk-JSJ3NRBQ.cjs} +7 -7
- package/dist/{chunk-CDC7AOGD.cjs → chunk-KAA3L7N6.cjs} +3 -3
- package/dist/{chunk-CDC7AOGD.cjs.map → chunk-KAA3L7N6.cjs.map} +1 -1
- package/dist/{chunk-65JU7D5L.cjs → chunk-KXP7HD6Z.cjs} +3 -3
- package/dist/{chunk-OCZMQ7SF.js → chunk-MASAFU3G.js} +2 -2
- package/dist/{chunk-DAZBGE47.js → chunk-MYC5HIA5.js} +2 -2
- package/dist/{chunk-BOAROBF4.cjs → chunk-OI2AOR2F.cjs} +28 -19
- package/dist/chunk-OI2AOR2F.cjs.map +1 -0
- package/dist/{chunk-6TTDLGHW.cjs → chunk-OYDUQYAK.cjs} +220 -220
- package/dist/{chunk-34RQN4Y6.js → chunk-V6AVJEQC.js} +3 -3
- package/dist/{chunk-PTGWQCIU.cjs → chunk-XX56SVPB.cjs} +5 -5
- package/dist/{chunk-SR5FEIHD.js → chunk-YUTCMBUY.js} +2 -2
- package/dist/{chunk-XHS5C5AW.js → chunk-YW33IVCC.js} +2 -2
- package/dist/fs.cjs +10 -10
- package/dist/fs.js +4 -4
- package/dist/index.cjs +102 -102
- package/dist/index.js +11 -11
- package/dist/logger.cjs +7 -7
- package/dist/logger.js +3 -3
- package/dist/mocks.cjs +10 -10
- package/dist/mocks.js +8 -8
- package/dist/transformers.cjs +21 -21
- package/dist/transformers.js +5 -5
- package/dist/utils.cjs +13 -13
- package/dist/utils.js +4 -4
- package/package.json +5 -5
- package/dist/chunk-BOAROBF4.cjs.map +0 -1
- package/dist/chunk-BYGMREPJ.cjs +0 -15
- /package/dist/{chunk-DU6UHGVD.cjs.map → chunk-2UXXYHS6.cjs.map} +0 -0
- /package/dist/{chunk-IZOYUU2C.cjs.map → chunk-37XMXECQ.js.map} +0 -0
- /package/dist/{chunk-BYGMREPJ.cjs.map → chunk-5SUBV3F7.cjs.map} +0 -0
- /package/dist/{chunk-NWXLHLH3.js.map → chunk-CZFLDKR5.cjs.map} +0 -0
- /package/dist/{chunk-WHFBT7CJ.cjs.map → chunk-DM53DOLW.cjs.map} +0 -0
- /package/dist/{chunk-Q4BVTLXG.js.map → chunk-GKW5TTFV.js.map} +0 -0
- /package/dist/{chunk-D42WMZZ7.js.map → chunk-HI4PB2AG.js.map} +0 -0
- /package/dist/{chunk-HGRAENXJ.js.map → chunk-IQBEGX4Z.js.map} +0 -0
- /package/dist/{chunk-34RQN4Y6.js.map → chunk-JSJ3NRBQ.cjs.map} +0 -0
- /package/dist/{chunk-65JU7D5L.cjs.map → chunk-KXP7HD6Z.cjs.map} +0 -0
- /package/dist/{chunk-OCZMQ7SF.js.map → chunk-MASAFU3G.js.map} +0 -0
- /package/dist/{chunk-DAZBGE47.js.map → chunk-MYC5HIA5.js.map} +0 -0
- /package/dist/{chunk-6TTDLGHW.cjs.map → chunk-OYDUQYAK.cjs.map} +0 -0
- /package/dist/{chunk-DQ3TMDDK.cjs.map → chunk-V6AVJEQC.js.map} +0 -0
- /package/dist/{chunk-PTGWQCIU.cjs.map → chunk-XX56SVPB.cjs.map} +0 -0
- /package/dist/{chunk-SR5FEIHD.js.map → chunk-YUTCMBUY.js.map} +0 -0
- /package/dist/{chunk-XHS5C5AW.js.map → chunk-YW33IVCC.js.map} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
3
|
+
var chunk2UXXYHS6_cjs = require('./chunk-2UXXYHS6.cjs');
|
|
4
|
+
var chunkKXP7HD6Z_cjs = require('./chunk-KXP7HD6Z.cjs');
|
|
5
|
+
var chunkJSJ3NRBQ_cjs = require('./chunk-JSJ3NRBQ.cjs');
|
|
6
|
+
var chunkXX56SVPB_cjs = require('./chunk-XX56SVPB.cjs');
|
|
7
|
+
var chunkDM53DOLW_cjs = require('./chunk-DM53DOLW.cjs');
|
|
8
|
+
var chunkKAA3L7N6_cjs = require('./chunk-KAA3L7N6.cjs');
|
|
9
9
|
var crypto = require('crypto');
|
|
10
10
|
var path = require('path');
|
|
11
11
|
var parser = require('@kubb/parser');
|
|
@@ -40,9 +40,9 @@ var factory__namespace = /*#__PURE__*/_interopNamespace(factory);
|
|
|
40
40
|
var dirTree__default = /*#__PURE__*/_interopDefault(dirTree);
|
|
41
41
|
|
|
42
42
|
// ../../node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js
|
|
43
|
-
var require_lodash =
|
|
43
|
+
var require_lodash = chunkKAA3L7N6_cjs.__commonJS({
|
|
44
44
|
"../../node_modules/.pnpm/lodash.isequal@4.5.0/node_modules/lodash.isequal/index.js"(exports, module) {
|
|
45
|
-
|
|
45
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
46
46
|
var LARGE_ARRAY_SIZE = 200;
|
|
47
47
|
var HASH_UNDEFINED = "__lodash_hash_undefined__";
|
|
48
48
|
var COMPARE_PARTIAL_FLAG = 1;
|
|
@@ -742,9 +742,9 @@ var require_lodash = chunkCDC7AOGD_cjs.__commonJS({
|
|
|
742
742
|
});
|
|
743
743
|
|
|
744
744
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js
|
|
745
|
-
var require_eventemitter3 =
|
|
745
|
+
var require_eventemitter3 = chunkKAA3L7N6_cjs.__commonJS({
|
|
746
746
|
"../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js"(exports, module) {
|
|
747
|
-
|
|
747
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
748
748
|
var has = Object.prototype.hasOwnProperty;
|
|
749
749
|
var prefix = "~";
|
|
750
750
|
function Events() {
|
|
@@ -924,18 +924,18 @@ var require_eventemitter3 = chunkCDC7AOGD_cjs.__commonJS({
|
|
|
924
924
|
});
|
|
925
925
|
|
|
926
926
|
// src/FileManager.ts
|
|
927
|
-
|
|
928
|
-
var import_lodash =
|
|
927
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
928
|
+
var import_lodash = chunkKAA3L7N6_cjs.__toESM(require_lodash(), 1);
|
|
929
929
|
|
|
930
930
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.js
|
|
931
|
-
|
|
931
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
932
932
|
|
|
933
933
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
|
|
934
|
-
|
|
935
|
-
var import_index =
|
|
934
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
935
|
+
var import_index = chunkKAA3L7N6_cjs.__toESM(require_eventemitter3(), 1);
|
|
936
936
|
|
|
937
937
|
// ../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js
|
|
938
|
-
|
|
938
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
939
939
|
var TimeoutError = class extends Error {
|
|
940
940
|
constructor(message) {
|
|
941
941
|
super(message);
|
|
@@ -1020,10 +1020,10 @@ function pTimeout(promise, options) {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
|
|
1022
1022
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.js
|
|
1023
|
-
|
|
1023
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
1024
1024
|
|
|
1025
1025
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.js
|
|
1026
|
-
|
|
1026
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
1027
1027
|
function lowerBound(array, value, comparator) {
|
|
1028
1028
|
let first = 0;
|
|
1029
1029
|
let count = array.length;
|
|
@@ -1044,7 +1044,7 @@ function lowerBound(array, value, comparator) {
|
|
|
1044
1044
|
var _queue;
|
|
1045
1045
|
var PriorityQueue = class {
|
|
1046
1046
|
constructor() {
|
|
1047
|
-
|
|
1047
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _queue, []);
|
|
1048
1048
|
}
|
|
1049
1049
|
enqueue(run, options) {
|
|
1050
1050
|
options = {
|
|
@@ -1055,22 +1055,22 @@ var PriorityQueue = class {
|
|
|
1055
1055
|
priority: options.priority,
|
|
1056
1056
|
run
|
|
1057
1057
|
};
|
|
1058
|
-
if (this.size &&
|
|
1059
|
-
|
|
1058
|
+
if (this.size && chunkKAA3L7N6_cjs.__privateGet(this, _queue)[this.size - 1].priority >= options.priority) {
|
|
1059
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _queue).push(element);
|
|
1060
1060
|
return;
|
|
1061
1061
|
}
|
|
1062
|
-
const index = lowerBound(
|
|
1063
|
-
|
|
1062
|
+
const index = lowerBound(chunkKAA3L7N6_cjs.__privateGet(this, _queue), element, (a, b) => b.priority - a.priority);
|
|
1063
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _queue).splice(index, 0, element);
|
|
1064
1064
|
}
|
|
1065
1065
|
dequeue() {
|
|
1066
|
-
const item =
|
|
1066
|
+
const item = chunkKAA3L7N6_cjs.__privateGet(this, _queue).shift();
|
|
1067
1067
|
return item?.run;
|
|
1068
1068
|
}
|
|
1069
1069
|
filter(options) {
|
|
1070
|
-
return
|
|
1070
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _queue).filter((element) => element.priority === options.priority).map((element) => element.run);
|
|
1071
1071
|
}
|
|
1072
1072
|
get size() {
|
|
1073
|
-
return
|
|
1073
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _queue).length;
|
|
1074
1074
|
}
|
|
1075
1075
|
};
|
|
1076
1076
|
_queue = new WeakMap();
|
|
@@ -1081,41 +1081,41 @@ var PQueue = class extends import_index.default {
|
|
|
1081
1081
|
// TODO: The `throwOnTimeout` option should affect the return types of `add()` and `addAll()`
|
|
1082
1082
|
constructor(options) {
|
|
1083
1083
|
super();
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1084
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _doesIntervalAllowAnother);
|
|
1085
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _doesConcurrentAllowAnother);
|
|
1086
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _next);
|
|
1087
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _onResumeInterval);
|
|
1088
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _isIntervalPaused);
|
|
1089
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _tryToStartAnother);
|
|
1090
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _initializeIntervalIfNeeded);
|
|
1091
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _onInterval);
|
|
1092
1092
|
/**
|
|
1093
1093
|
Executes all queued functions until it reaches the limit.
|
|
1094
1094
|
*/
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1095
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _processQueue);
|
|
1096
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _throwOnAbort);
|
|
1097
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _onEvent);
|
|
1098
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _carryoverConcurrencyCount, void 0);
|
|
1099
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _isIntervalIgnored, void 0);
|
|
1100
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _intervalCount, 0);
|
|
1101
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _intervalCap, void 0);
|
|
1102
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _interval, void 0);
|
|
1103
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _intervalEnd, 0);
|
|
1104
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _intervalId, void 0);
|
|
1105
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _timeoutId, void 0);
|
|
1106
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _queue2, void 0);
|
|
1107
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _queueClass, void 0);
|
|
1108
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _pending, 0);
|
|
1109
1109
|
// The `!` is needed because of https://github.com/microsoft/TypeScript/issues/32194
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1110
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _concurrency, void 0);
|
|
1111
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _isPaused, void 0);
|
|
1112
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _throwOnTimeout, void 0);
|
|
1113
1113
|
/**
|
|
1114
1114
|
Per-operation timeout in milliseconds. Operations fulfill once `timeout` elapses if they haven't already.
|
|
1115
1115
|
|
|
1116
1116
|
Applies to each future operation.
|
|
1117
1117
|
*/
|
|
1118
|
-
|
|
1118
|
+
chunkKAA3L7N6_cjs.__publicField(this, "timeout");
|
|
1119
1119
|
options = {
|
|
1120
1120
|
carryoverConcurrencyCount: false,
|
|
1121
1121
|
intervalCap: Number.POSITIVE_INFINITY,
|
|
@@ -1131,37 +1131,37 @@ var PQueue = class extends import_index.default {
|
|
|
1131
1131
|
if (options.interval === void 0 || !(Number.isFinite(options.interval) && options.interval >= 0)) {
|
|
1132
1132
|
throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${options.interval?.toString() ?? ""}\` (${typeof options.interval})`);
|
|
1133
1133
|
}
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1134
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _carryoverConcurrencyCount, options.carryoverConcurrencyCount);
|
|
1135
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _isIntervalIgnored, options.intervalCap === Number.POSITIVE_INFINITY || options.interval === 0);
|
|
1136
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _intervalCap, options.intervalCap);
|
|
1137
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _interval, options.interval);
|
|
1138
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _queue2, new options.queueClass());
|
|
1139
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _queueClass, options.queueClass);
|
|
1140
1140
|
this.concurrency = options.concurrency;
|
|
1141
1141
|
this.timeout = options.timeout;
|
|
1142
|
-
|
|
1143
|
-
|
|
1142
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _throwOnTimeout, options.throwOnTimeout === true);
|
|
1143
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _isPaused, options.autoStart === false);
|
|
1144
1144
|
}
|
|
1145
1145
|
get concurrency() {
|
|
1146
|
-
return
|
|
1146
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _concurrency);
|
|
1147
1147
|
}
|
|
1148
1148
|
set concurrency(newConcurrency) {
|
|
1149
1149
|
if (!(typeof newConcurrency === "number" && newConcurrency >= 1)) {
|
|
1150
1150
|
throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${newConcurrency}\` (${typeof newConcurrency})`);
|
|
1151
1151
|
}
|
|
1152
|
-
|
|
1153
|
-
|
|
1152
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _concurrency, newConcurrency);
|
|
1153
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _processQueue, processQueue_fn).call(this);
|
|
1154
1154
|
}
|
|
1155
1155
|
async add(function_, options = {}) {
|
|
1156
1156
|
options = {
|
|
1157
1157
|
timeout: this.timeout,
|
|
1158
|
-
throwOnTimeout:
|
|
1158
|
+
throwOnTimeout: chunkKAA3L7N6_cjs.__privateGet(this, _throwOnTimeout),
|
|
1159
1159
|
...options
|
|
1160
1160
|
};
|
|
1161
1161
|
return new Promise((resolve2, reject) => {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1162
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _queue2).enqueue(async () => {
|
|
1163
|
+
chunkKAA3L7N6_cjs.__privateWrapper(this, _pending)._++;
|
|
1164
|
+
chunkKAA3L7N6_cjs.__privateWrapper(this, _intervalCount)._++;
|
|
1165
1165
|
try {
|
|
1166
1166
|
options.signal?.throwIfAborted();
|
|
1167
1167
|
let operation = function_({ signal: options.signal });
|
|
@@ -1169,7 +1169,7 @@ var PQueue = class extends import_index.default {
|
|
|
1169
1169
|
operation = pTimeout(Promise.resolve(operation), { milliseconds: options.timeout });
|
|
1170
1170
|
}
|
|
1171
1171
|
if (options.signal) {
|
|
1172
|
-
operation = Promise.race([operation,
|
|
1172
|
+
operation = Promise.race([operation, chunkKAA3L7N6_cjs.__privateMethod(this, _throwOnAbort, throwOnAbort_fn).call(this, options.signal)]);
|
|
1173
1173
|
}
|
|
1174
1174
|
const result = await operation;
|
|
1175
1175
|
resolve2(result);
|
|
@@ -1182,11 +1182,11 @@ var PQueue = class extends import_index.default {
|
|
|
1182
1182
|
reject(error);
|
|
1183
1183
|
this.emit("error", error);
|
|
1184
1184
|
} finally {
|
|
1185
|
-
|
|
1185
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _next, next_fn).call(this);
|
|
1186
1186
|
}
|
|
1187
1187
|
}, options);
|
|
1188
1188
|
this.emit("add");
|
|
1189
|
-
|
|
1189
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _tryToStartAnother, tryToStartAnother_fn).call(this);
|
|
1190
1190
|
});
|
|
1191
1191
|
}
|
|
1192
1192
|
async addAll(functions, options) {
|
|
@@ -1196,24 +1196,24 @@ var PQueue = class extends import_index.default {
|
|
|
1196
1196
|
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.)
|
|
1197
1197
|
*/
|
|
1198
1198
|
start() {
|
|
1199
|
-
if (!
|
|
1199
|
+
if (!chunkKAA3L7N6_cjs.__privateGet(this, _isPaused)) {
|
|
1200
1200
|
return this;
|
|
1201
1201
|
}
|
|
1202
|
-
|
|
1203
|
-
|
|
1202
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _isPaused, false);
|
|
1203
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _processQueue, processQueue_fn).call(this);
|
|
1204
1204
|
return this;
|
|
1205
1205
|
}
|
|
1206
1206
|
/**
|
|
1207
1207
|
Put queue execution on hold.
|
|
1208
1208
|
*/
|
|
1209
1209
|
pause() {
|
|
1210
|
-
|
|
1210
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _isPaused, true);
|
|
1211
1211
|
}
|
|
1212
1212
|
/**
|
|
1213
1213
|
Clear the queue.
|
|
1214
1214
|
*/
|
|
1215
1215
|
clear() {
|
|
1216
|
-
|
|
1216
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _queue2, new (chunkKAA3L7N6_cjs.__privateGet(this, _queueClass))());
|
|
1217
1217
|
}
|
|
1218
1218
|
/**
|
|
1219
1219
|
Can be called multiple times. Useful if you for example add additional items at a later time.
|
|
@@ -1221,10 +1221,10 @@ var PQueue = class extends import_index.default {
|
|
|
1221
1221
|
@returns A promise that settles when the queue becomes empty.
|
|
1222
1222
|
*/
|
|
1223
1223
|
async onEmpty() {
|
|
1224
|
-
if (
|
|
1224
|
+
if (chunkKAA3L7N6_cjs.__privateGet(this, _queue2).size === 0) {
|
|
1225
1225
|
return;
|
|
1226
1226
|
}
|
|
1227
|
-
await
|
|
1227
|
+
await chunkKAA3L7N6_cjs.__privateMethod(this, _onEvent, onEvent_fn).call(this, "empty");
|
|
1228
1228
|
}
|
|
1229
1229
|
/**
|
|
1230
1230
|
@returns A promise that settles when the queue size is less than the given limit: `queue.size < limit`.
|
|
@@ -1234,10 +1234,10 @@ var PQueue = class extends import_index.default {
|
|
|
1234
1234
|
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.
|
|
1235
1235
|
*/
|
|
1236
1236
|
async onSizeLessThan(limit) {
|
|
1237
|
-
if (
|
|
1237
|
+
if (chunkKAA3L7N6_cjs.__privateGet(this, _queue2).size < limit) {
|
|
1238
1238
|
return;
|
|
1239
1239
|
}
|
|
1240
|
-
await
|
|
1240
|
+
await chunkKAA3L7N6_cjs.__privateMethod(this, _onEvent, onEvent_fn).call(this, "next", () => chunkKAA3L7N6_cjs.__privateGet(this, _queue2).size < limit);
|
|
1241
1241
|
}
|
|
1242
1242
|
/**
|
|
1243
1243
|
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.
|
|
@@ -1245,16 +1245,16 @@ var PQueue = class extends import_index.default {
|
|
|
1245
1245
|
@returns A promise that settles when the queue becomes empty, and all promises have completed; `queue.size === 0 && queue.pending === 0`.
|
|
1246
1246
|
*/
|
|
1247
1247
|
async onIdle() {
|
|
1248
|
-
if (
|
|
1248
|
+
if (chunkKAA3L7N6_cjs.__privateGet(this, _pending) === 0 && chunkKAA3L7N6_cjs.__privateGet(this, _queue2).size === 0) {
|
|
1249
1249
|
return;
|
|
1250
1250
|
}
|
|
1251
|
-
await
|
|
1251
|
+
await chunkKAA3L7N6_cjs.__privateMethod(this, _onEvent, onEvent_fn).call(this, "idle");
|
|
1252
1252
|
}
|
|
1253
1253
|
/**
|
|
1254
1254
|
Size of the queue, the number of queued items waiting to run.
|
|
1255
1255
|
*/
|
|
1256
1256
|
get size() {
|
|
1257
|
-
return
|
|
1257
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _queue2).size;
|
|
1258
1258
|
}
|
|
1259
1259
|
/**
|
|
1260
1260
|
Size of the queue, filtered by the given options.
|
|
@@ -1262,19 +1262,19 @@ var PQueue = class extends import_index.default {
|
|
|
1262
1262
|
For example, this can be used to find the number of items remaining in the queue with a specific priority level.
|
|
1263
1263
|
*/
|
|
1264
1264
|
sizeBy(options) {
|
|
1265
|
-
return
|
|
1265
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _queue2).filter(options).length;
|
|
1266
1266
|
}
|
|
1267
1267
|
/**
|
|
1268
1268
|
Number of running items (no longer in the queue).
|
|
1269
1269
|
*/
|
|
1270
1270
|
get pending() {
|
|
1271
|
-
return
|
|
1271
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _pending);
|
|
1272
1272
|
}
|
|
1273
1273
|
/**
|
|
1274
1274
|
Whether the queue is currently paused.
|
|
1275
1275
|
*/
|
|
1276
1276
|
get isPaused() {
|
|
1277
|
-
return
|
|
1277
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _isPaused);
|
|
1278
1278
|
}
|
|
1279
1279
|
};
|
|
1280
1280
|
_carryoverConcurrencyCount = new WeakMap();
|
|
@@ -1293,35 +1293,35 @@ _isPaused = new WeakMap();
|
|
|
1293
1293
|
_throwOnTimeout = new WeakMap();
|
|
1294
1294
|
_doesIntervalAllowAnother = new WeakSet();
|
|
1295
1295
|
doesIntervalAllowAnother_get = function() {
|
|
1296
|
-
return
|
|
1296
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _isIntervalIgnored) || chunkKAA3L7N6_cjs.__privateGet(this, _intervalCount) < chunkKAA3L7N6_cjs.__privateGet(this, _intervalCap);
|
|
1297
1297
|
};
|
|
1298
1298
|
_doesConcurrentAllowAnother = new WeakSet();
|
|
1299
1299
|
doesConcurrentAllowAnother_get = function() {
|
|
1300
|
-
return
|
|
1300
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _pending) < chunkKAA3L7N6_cjs.__privateGet(this, _concurrency);
|
|
1301
1301
|
};
|
|
1302
1302
|
_next = new WeakSet();
|
|
1303
1303
|
next_fn = function() {
|
|
1304
|
-
|
|
1305
|
-
|
|
1304
|
+
chunkKAA3L7N6_cjs.__privateWrapper(this, _pending)._--;
|
|
1305
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _tryToStartAnother, tryToStartAnother_fn).call(this);
|
|
1306
1306
|
this.emit("next");
|
|
1307
1307
|
};
|
|
1308
1308
|
_onResumeInterval = new WeakSet();
|
|
1309
1309
|
onResumeInterval_fn = function() {
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1310
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _onInterval, onInterval_fn).call(this);
|
|
1311
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _initializeIntervalIfNeeded, initializeIntervalIfNeeded_fn).call(this);
|
|
1312
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _timeoutId, void 0);
|
|
1313
1313
|
};
|
|
1314
1314
|
_isIntervalPaused = new WeakSet();
|
|
1315
1315
|
isIntervalPaused_get = function() {
|
|
1316
1316
|
const now = Date.now();
|
|
1317
|
-
if (
|
|
1318
|
-
const delay =
|
|
1317
|
+
if (chunkKAA3L7N6_cjs.__privateGet(this, _intervalId) === void 0) {
|
|
1318
|
+
const delay = chunkKAA3L7N6_cjs.__privateGet(this, _intervalEnd) - now;
|
|
1319
1319
|
if (delay < 0) {
|
|
1320
|
-
|
|
1320
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _intervalCount, chunkKAA3L7N6_cjs.__privateGet(this, _carryoverConcurrencyCount) ? chunkKAA3L7N6_cjs.__privateGet(this, _pending) : 0);
|
|
1321
1321
|
} else {
|
|
1322
|
-
if (
|
|
1323
|
-
|
|
1324
|
-
|
|
1322
|
+
if (chunkKAA3L7N6_cjs.__privateGet(this, _timeoutId) === void 0) {
|
|
1323
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _timeoutId, setTimeout(() => {
|
|
1324
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _onResumeInterval, onResumeInterval_fn).call(this);
|
|
1325
1325
|
}, delay));
|
|
1326
1326
|
}
|
|
1327
1327
|
return true;
|
|
@@ -1331,28 +1331,28 @@ isIntervalPaused_get = function() {
|
|
|
1331
1331
|
};
|
|
1332
1332
|
_tryToStartAnother = new WeakSet();
|
|
1333
1333
|
tryToStartAnother_fn = function() {
|
|
1334
|
-
if (
|
|
1335
|
-
if (
|
|
1336
|
-
clearInterval(
|
|
1334
|
+
if (chunkKAA3L7N6_cjs.__privateGet(this, _queue2).size === 0) {
|
|
1335
|
+
if (chunkKAA3L7N6_cjs.__privateGet(this, _intervalId)) {
|
|
1336
|
+
clearInterval(chunkKAA3L7N6_cjs.__privateGet(this, _intervalId));
|
|
1337
1337
|
}
|
|
1338
|
-
|
|
1338
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _intervalId, void 0);
|
|
1339
1339
|
this.emit("empty");
|
|
1340
|
-
if (
|
|
1340
|
+
if (chunkKAA3L7N6_cjs.__privateGet(this, _pending) === 0) {
|
|
1341
1341
|
this.emit("idle");
|
|
1342
1342
|
}
|
|
1343
1343
|
return false;
|
|
1344
1344
|
}
|
|
1345
|
-
if (!
|
|
1346
|
-
const canInitializeInterval = !
|
|
1347
|
-
if (
|
|
1348
|
-
const job =
|
|
1345
|
+
if (!chunkKAA3L7N6_cjs.__privateGet(this, _isPaused)) {
|
|
1346
|
+
const canInitializeInterval = !chunkKAA3L7N6_cjs.__privateGet(this, _isIntervalPaused, isIntervalPaused_get);
|
|
1347
|
+
if (chunkKAA3L7N6_cjs.__privateGet(this, _doesIntervalAllowAnother, doesIntervalAllowAnother_get) && chunkKAA3L7N6_cjs.__privateGet(this, _doesConcurrentAllowAnother, doesConcurrentAllowAnother_get)) {
|
|
1348
|
+
const job = chunkKAA3L7N6_cjs.__privateGet(this, _queue2).dequeue();
|
|
1349
1349
|
if (!job) {
|
|
1350
1350
|
return false;
|
|
1351
1351
|
}
|
|
1352
1352
|
this.emit("active");
|
|
1353
1353
|
job();
|
|
1354
1354
|
if (canInitializeInterval) {
|
|
1355
|
-
|
|
1355
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _initializeIntervalIfNeeded, initializeIntervalIfNeeded_fn).call(this);
|
|
1356
1356
|
}
|
|
1357
1357
|
return true;
|
|
1358
1358
|
}
|
|
@@ -1361,26 +1361,26 @@ tryToStartAnother_fn = function() {
|
|
|
1361
1361
|
};
|
|
1362
1362
|
_initializeIntervalIfNeeded = new WeakSet();
|
|
1363
1363
|
initializeIntervalIfNeeded_fn = function() {
|
|
1364
|
-
if (
|
|
1364
|
+
if (chunkKAA3L7N6_cjs.__privateGet(this, _isIntervalIgnored) || chunkKAA3L7N6_cjs.__privateGet(this, _intervalId) !== void 0) {
|
|
1365
1365
|
return;
|
|
1366
1366
|
}
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
},
|
|
1370
|
-
|
|
1367
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _intervalId, setInterval(() => {
|
|
1368
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _onInterval, onInterval_fn).call(this);
|
|
1369
|
+
}, chunkKAA3L7N6_cjs.__privateGet(this, _interval)));
|
|
1370
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _intervalEnd, Date.now() + chunkKAA3L7N6_cjs.__privateGet(this, _interval));
|
|
1371
1371
|
};
|
|
1372
1372
|
_onInterval = new WeakSet();
|
|
1373
1373
|
onInterval_fn = function() {
|
|
1374
|
-
if (
|
|
1375
|
-
clearInterval(
|
|
1376
|
-
|
|
1374
|
+
if (chunkKAA3L7N6_cjs.__privateGet(this, _intervalCount) === 0 && chunkKAA3L7N6_cjs.__privateGet(this, _pending) === 0 && chunkKAA3L7N6_cjs.__privateGet(this, _intervalId)) {
|
|
1375
|
+
clearInterval(chunkKAA3L7N6_cjs.__privateGet(this, _intervalId));
|
|
1376
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _intervalId, void 0);
|
|
1377
1377
|
}
|
|
1378
|
-
|
|
1379
|
-
|
|
1378
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _intervalCount, chunkKAA3L7N6_cjs.__privateGet(this, _carryoverConcurrencyCount) ? chunkKAA3L7N6_cjs.__privateGet(this, _pending) : 0);
|
|
1379
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _processQueue, processQueue_fn).call(this);
|
|
1380
1380
|
};
|
|
1381
1381
|
_processQueue = new WeakSet();
|
|
1382
1382
|
processQueue_fn = function() {
|
|
1383
|
-
while (
|
|
1383
|
+
while (chunkKAA3L7N6_cjs.__privateMethod(this, _tryToStartAnother, tryToStartAnother_fn).call(this)) {
|
|
1384
1384
|
}
|
|
1385
1385
|
};
|
|
1386
1386
|
_throwOnAbort = new WeakSet();
|
|
@@ -1406,10 +1406,10 @@ onEvent_fn = async function(event, filter) {
|
|
|
1406
1406
|
};
|
|
1407
1407
|
|
|
1408
1408
|
// src/BarrelManager.ts
|
|
1409
|
-
|
|
1409
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
1410
1410
|
|
|
1411
1411
|
// src/utils/TreeNode.ts
|
|
1412
|
-
|
|
1412
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
1413
1413
|
var TreeNode = class _TreeNode {
|
|
1414
1414
|
constructor(data, parent) {
|
|
1415
1415
|
this.children = [];
|
|
@@ -1500,8 +1500,8 @@ var TreeNode = class _TreeNode {
|
|
|
1500
1500
|
var _options;
|
|
1501
1501
|
var BarrelManager = class {
|
|
1502
1502
|
constructor(options = {}) {
|
|
1503
|
-
|
|
1504
|
-
|
|
1503
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _options, void 0);
|
|
1504
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _options, options);
|
|
1505
1505
|
return this;
|
|
1506
1506
|
}
|
|
1507
1507
|
getNamedExport(root, item) {
|
|
@@ -1535,7 +1535,7 @@ var BarrelManager = class {
|
|
|
1535
1535
|
}).flat();
|
|
1536
1536
|
}
|
|
1537
1537
|
getIndexes(root) {
|
|
1538
|
-
const { treeNode = {}, isTypeOnly, extName } =
|
|
1538
|
+
const { treeNode = {}, isTypeOnly, extName } = chunkKAA3L7N6_cjs.__privateGet(this, _options);
|
|
1539
1539
|
const tree = TreeNode.build(root, treeNode);
|
|
1540
1540
|
if (!tree) {
|
|
1541
1541
|
return null;
|
|
@@ -1547,7 +1547,7 @@ var BarrelManager = class {
|
|
|
1547
1547
|
if (treeNode2.children.length > 1) {
|
|
1548
1548
|
const indexPath = path__default.default.resolve(treeNode2.data.path, "index.ts");
|
|
1549
1549
|
const exports = treeNode2.children.filter(Boolean).map((file) => {
|
|
1550
|
-
const importPath = file.data.type === "directory" ? `./${file.data.name}/index` : `./${
|
|
1550
|
+
const importPath = file.data.type === "directory" ? `./${file.data.name}/index` : `./${chunk2UXXYHS6_cjs.trimExtName(file.data.name)}`;
|
|
1551
1551
|
if (importPath.endsWith("index") && file.data.type === "file") {
|
|
1552
1552
|
return void 0;
|
|
1553
1553
|
}
|
|
@@ -1565,7 +1565,7 @@ var BarrelManager = class {
|
|
|
1565
1565
|
} else if (treeNode2.children.length === 1) {
|
|
1566
1566
|
const [treeNodeChild] = treeNode2.children;
|
|
1567
1567
|
const indexPath = path__default.default.resolve(treeNode2.data.path, "index.ts");
|
|
1568
|
-
const importPath = treeNodeChild.data.type === "directory" ? `./${treeNodeChild.data.name}/index` : `./${
|
|
1568
|
+
const importPath = treeNodeChild.data.type === "directory" ? `./${treeNodeChild.data.name}/index` : `./${chunk2UXXYHS6_cjs.trimExtName(treeNodeChild.data.name)}`;
|
|
1569
1569
|
const exports = [
|
|
1570
1570
|
{
|
|
1571
1571
|
path: extName ? `${importPath}${extName}` : importPath,
|
|
@@ -1596,31 +1596,31 @@ exports.KubbFile = void 0;
|
|
|
1596
1596
|
var _cache, _task, _queue3, _add, add_fn, _addOrAppend, addOrAppend_fn;
|
|
1597
1597
|
var _FileManager = class _FileManager {
|
|
1598
1598
|
constructor({ task = async (file) => file, queue = new PQueue() } = {}) {
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1599
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _add);
|
|
1600
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _addOrAppend);
|
|
1601
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _cache, /* @__PURE__ */ new Map());
|
|
1602
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _task, void 0);
|
|
1603
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _queue3, void 0);
|
|
1604
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _task, task);
|
|
1605
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _queue3, queue);
|
|
1606
1606
|
return this;
|
|
1607
1607
|
}
|
|
1608
1608
|
get files() {
|
|
1609
1609
|
const files = [];
|
|
1610
|
-
|
|
1610
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _cache).forEach((item) => {
|
|
1611
1611
|
files.push(...item.flat(1));
|
|
1612
1612
|
});
|
|
1613
1613
|
return files;
|
|
1614
1614
|
}
|
|
1615
1615
|
get isExecuting() {
|
|
1616
|
-
return
|
|
1616
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _queue3).size !== 0 && chunkKAA3L7N6_cjs.__privateGet(this, _queue3).pending !== 0;
|
|
1617
1617
|
}
|
|
1618
1618
|
async add(...files) {
|
|
1619
1619
|
const promises = combineFiles(files).map((file) => {
|
|
1620
1620
|
if (file.override) {
|
|
1621
|
-
return
|
|
1621
|
+
return chunkKAA3L7N6_cjs.__privateMethod(this, _add, add_fn).call(this, file);
|
|
1622
1622
|
}
|
|
1623
|
-
return
|
|
1623
|
+
return chunkKAA3L7N6_cjs.__privateMethod(this, _addOrAppend, addOrAppend_fn).call(this, file);
|
|
1624
1624
|
});
|
|
1625
1625
|
const resolvedFiles = await Promise.all(promises);
|
|
1626
1626
|
if (files.length > 1) {
|
|
@@ -1634,7 +1634,7 @@ var _FileManager = class _FileManager {
|
|
|
1634
1634
|
return void 0;
|
|
1635
1635
|
}
|
|
1636
1636
|
const pathToBuildFrom = path.resolve(root, output.path);
|
|
1637
|
-
const exportPath = output.path.startsWith("./") ?
|
|
1637
|
+
const exportPath = output.path.startsWith("./") ? chunk2UXXYHS6_cjs.trimExtName(output.path) : `./${chunk2UXXYHS6_cjs.trimExtName(output.path)}`;
|
|
1638
1638
|
const mode = _FileManager.getMode(output.path);
|
|
1639
1639
|
const barrelManager = new BarrelManager({ extName: output.extName, ...options });
|
|
1640
1640
|
let files = barrelManager.getIndexes(pathToBuildFrom);
|
|
@@ -1654,7 +1654,7 @@ var _FileManager = class _FileManager {
|
|
|
1654
1654
|
}
|
|
1655
1655
|
await Promise.all(
|
|
1656
1656
|
files.map((file) => {
|
|
1657
|
-
return
|
|
1657
|
+
return chunkKAA3L7N6_cjs.__privateMethod(this, _addOrAppend, addOrAppend_fn).call(this, {
|
|
1658
1658
|
...file,
|
|
1659
1659
|
meta: meta ? meta : file.meta
|
|
1660
1660
|
});
|
|
@@ -1680,33 +1680,33 @@ var _FileManager = class _FileManager {
|
|
|
1680
1680
|
if (exportType === "barrelNamed" && !output.exportAs && rootFile.exports?.[0]) {
|
|
1681
1681
|
rootFile.exports = barrelManager.getNamedExport(root, rootFile.exports[0]);
|
|
1682
1682
|
}
|
|
1683
|
-
await
|
|
1683
|
+
await chunkKAA3L7N6_cjs.__privateMethod(this, _addOrAppend, addOrAppend_fn).call(this, {
|
|
1684
1684
|
...rootFile,
|
|
1685
1685
|
meta: meta ? meta : rootFile.meta
|
|
1686
1686
|
});
|
|
1687
1687
|
}
|
|
1688
1688
|
getCacheByUUID(UUID) {
|
|
1689
1689
|
let cache;
|
|
1690
|
-
|
|
1690
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _cache).forEach((files) => {
|
|
1691
1691
|
cache = files.find((item) => item.id === UUID);
|
|
1692
1692
|
});
|
|
1693
1693
|
return cache;
|
|
1694
1694
|
}
|
|
1695
1695
|
get(path3) {
|
|
1696
|
-
return
|
|
1696
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _cache).get(path3);
|
|
1697
1697
|
}
|
|
1698
1698
|
remove(path3) {
|
|
1699
1699
|
const cacheItem = this.get(path3);
|
|
1700
1700
|
if (!cacheItem) {
|
|
1701
1701
|
return;
|
|
1702
1702
|
}
|
|
1703
|
-
|
|
1703
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _cache).delete(path3);
|
|
1704
1704
|
}
|
|
1705
1705
|
async write(...params) {
|
|
1706
|
-
return
|
|
1706
|
+
return chunkDM53DOLW_cjs.write(...params);
|
|
1707
1707
|
}
|
|
1708
1708
|
async read(...params) {
|
|
1709
|
-
return
|
|
1709
|
+
return chunkXX56SVPB_cjs.read(...params);
|
|
1710
1710
|
}
|
|
1711
1711
|
// statics
|
|
1712
1712
|
static getSource(file) {
|
|
@@ -1734,23 +1734,23 @@ _queue3 = new WeakMap();
|
|
|
1734
1734
|
_add = new WeakSet();
|
|
1735
1735
|
add_fn = async function(file) {
|
|
1736
1736
|
const controller = new AbortController();
|
|
1737
|
-
const resolvedFile = { id: crypto__default.default.randomUUID(), name:
|
|
1738
|
-
|
|
1739
|
-
return
|
|
1737
|
+
const resolvedFile = { id: crypto__default.default.randomUUID(), name: chunk2UXXYHS6_cjs.trimExtName(file.baseName), ...file };
|
|
1738
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _cache).set(resolvedFile.path, [{ cancel: () => controller.abort(), ...resolvedFile }]);
|
|
1739
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _queue3).add(
|
|
1740
1740
|
async () => {
|
|
1741
1741
|
var _a;
|
|
1742
|
-
return (_a =
|
|
1742
|
+
return (_a = chunkKAA3L7N6_cjs.__privateGet(this, _task)) == null ? void 0 : _a.call(this, resolvedFile);
|
|
1743
1743
|
},
|
|
1744
1744
|
{ signal: controller.signal }
|
|
1745
1745
|
);
|
|
1746
1746
|
};
|
|
1747
1747
|
_addOrAppend = new WeakSet();
|
|
1748
1748
|
addOrAppend_fn = async function(file) {
|
|
1749
|
-
const previousCaches =
|
|
1749
|
+
const previousCaches = chunkKAA3L7N6_cjs.__privateGet(this, _cache).get(file.path);
|
|
1750
1750
|
const previousCache = previousCaches ? previousCaches.at(previousCaches.length - 1) : void 0;
|
|
1751
1751
|
if (previousCache) {
|
|
1752
|
-
|
|
1753
|
-
return
|
|
1752
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _cache).delete(previousCache.path);
|
|
1753
|
+
return chunkKAA3L7N6_cjs.__privateMethod(this, _add, add_fn).call(this, {
|
|
1754
1754
|
...file,
|
|
1755
1755
|
source: previousCache.source && file.source ? `${previousCache.source}
|
|
1756
1756
|
${file.source}` : "",
|
|
@@ -1759,7 +1759,7 @@ ${file.source}` : "",
|
|
|
1759
1759
|
env: { ...previousCache.env || {}, ...file.env || {} }
|
|
1760
1760
|
});
|
|
1761
1761
|
}
|
|
1762
|
-
return
|
|
1762
|
+
return chunkKAA3L7N6_cjs.__privateMethod(this, _add, add_fn).call(this, file);
|
|
1763
1763
|
};
|
|
1764
1764
|
var FileManager = _FileManager;
|
|
1765
1765
|
function combineFiles(files) {
|
|
@@ -1797,11 +1797,11 @@ function getSource(file) {
|
|
|
1797
1797
|
const exports = file.exports ? combineExports(file.exports) : [];
|
|
1798
1798
|
const imports = file.imports ? combineImports(file.imports, exports, file.source) : [];
|
|
1799
1799
|
const importNodes = imports.filter((item) => {
|
|
1800
|
-
return item.path !==
|
|
1800
|
+
return item.path !== chunk2UXXYHS6_cjs.trimExtName(file.path);
|
|
1801
1801
|
}).map((item) => {
|
|
1802
1802
|
return factory__namespace.createImportDeclaration({
|
|
1803
1803
|
name: item.name,
|
|
1804
|
-
path: item.root ?
|
|
1804
|
+
path: item.root ? chunkXX56SVPB_cjs.getRelativePath(item.root, item.path) : item.path,
|
|
1805
1805
|
isTypeOnly: item.isTypeOnly
|
|
1806
1806
|
});
|
|
1807
1807
|
});
|
|
@@ -1903,8 +1903,8 @@ function getEnvSource(source, env) {
|
|
|
1903
1903
|
throw new TypeError(`Environment should be in upperCase for ${key}`);
|
|
1904
1904
|
}
|
|
1905
1905
|
if (typeof replaceBy === "string") {
|
|
1906
|
-
prev =
|
|
1907
|
-
prev =
|
|
1906
|
+
prev = chunk2UXXYHS6_cjs.searchAndReplace({ text: prev.replaceAll(`process.env.${key}`, replaceBy), replaceBy, prefix: "process.env", key });
|
|
1907
|
+
prev = chunk2UXXYHS6_cjs.searchAndReplace({ text: prev.replaceAll(new RegExp(`(declare const).*
|
|
1908
1908
|
`, "ig"), ""), replaceBy, key });
|
|
1909
1909
|
}
|
|
1910
1910
|
return prev;
|
|
@@ -1912,7 +1912,7 @@ function getEnvSource(source, env) {
|
|
|
1912
1912
|
}
|
|
1913
1913
|
|
|
1914
1914
|
// src/errors.ts
|
|
1915
|
-
|
|
1915
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
1916
1916
|
var Warning = class extends Error {
|
|
1917
1917
|
constructor(message, options) {
|
|
1918
1918
|
super(message, { cause: options?.cause });
|
|
@@ -1923,10 +1923,10 @@ var ValidationPluginError = class extends Error {
|
|
|
1923
1923
|
};
|
|
1924
1924
|
|
|
1925
1925
|
// src/plugin.ts
|
|
1926
|
-
|
|
1926
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
1927
1927
|
|
|
1928
1928
|
// src/utils/cache.ts
|
|
1929
|
-
|
|
1929
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
1930
1930
|
function createPluginCache(Store = /* @__PURE__ */ Object.create(null)) {
|
|
1931
1931
|
return {
|
|
1932
1932
|
set(id, value) {
|
|
@@ -2004,10 +2004,10 @@ var definePlugin = createPlugin((options) => {
|
|
|
2004
2004
|
});
|
|
2005
2005
|
|
|
2006
2006
|
// src/PromiseManager.ts
|
|
2007
|
-
|
|
2007
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
2008
2008
|
|
|
2009
2009
|
// src/utils/executeStrategies.ts
|
|
2010
|
-
|
|
2010
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
2011
2011
|
function hookSeq(promises) {
|
|
2012
2012
|
return promises.filter(Boolean).reduce(
|
|
2013
2013
|
(promise, func) => {
|
|
@@ -2045,8 +2045,8 @@ function hookParallel(promises) {
|
|
|
2045
2045
|
var _options2;
|
|
2046
2046
|
var PromiseManager = class {
|
|
2047
2047
|
constructor(options = {}) {
|
|
2048
|
-
|
|
2049
|
-
|
|
2048
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _options2, {});
|
|
2049
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _options2, options);
|
|
2050
2050
|
return this;
|
|
2051
2051
|
}
|
|
2052
2052
|
run(strategy, promises) {
|
|
@@ -2054,7 +2054,7 @@ var PromiseManager = class {
|
|
|
2054
2054
|
return hookSeq(promises);
|
|
2055
2055
|
}
|
|
2056
2056
|
if (strategy === "first") {
|
|
2057
|
-
return hookFirst(promises,
|
|
2057
|
+
return hookFirst(promises, chunkKAA3L7N6_cjs.__privateGet(this, _options2).nullCheck);
|
|
2058
2058
|
}
|
|
2059
2059
|
if (strategy === "parallel") {
|
|
2060
2060
|
return hookParallel(promises);
|
|
@@ -2071,27 +2071,27 @@ function isPromiseRejectedResult(result) {
|
|
|
2071
2071
|
}
|
|
2072
2072
|
|
|
2073
2073
|
// src/PluginManager.ts
|
|
2074
|
-
|
|
2074
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
2075
2075
|
|
|
2076
2076
|
// src/utils/EventEmitter.ts
|
|
2077
|
-
|
|
2077
|
+
chunkKAA3L7N6_cjs.init_cjs_shims();
|
|
2078
2078
|
var _emitter;
|
|
2079
2079
|
var EventEmitter2 = class {
|
|
2080
2080
|
constructor() {
|
|
2081
|
-
|
|
2082
|
-
|
|
2081
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _emitter, new events.EventEmitter());
|
|
2082
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _emitter).setMaxListeners(100);
|
|
2083
2083
|
}
|
|
2084
2084
|
emit(eventName, ...eventArg) {
|
|
2085
|
-
|
|
2085
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _emitter).emit(eventName, ...eventArg);
|
|
2086
2086
|
}
|
|
2087
2087
|
on(eventName, handler) {
|
|
2088
|
-
|
|
2088
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _emitter).on(eventName, handler);
|
|
2089
2089
|
}
|
|
2090
2090
|
off(eventName, handler) {
|
|
2091
|
-
|
|
2091
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _emitter).off(eventName, handler);
|
|
2092
2092
|
}
|
|
2093
2093
|
removeAll() {
|
|
2094
|
-
|
|
2094
|
+
chunkKAA3L7N6_cjs.__privateGet(this, _emitter).removeAllListeners();
|
|
2095
2095
|
}
|
|
2096
2096
|
};
|
|
2097
2097
|
_emitter = new WeakMap();
|
|
@@ -2100,8 +2100,8 @@ _emitter = new WeakMap();
|
|
|
2100
2100
|
var _core, _usedPluginNames, _promiseManager, _getSortedPlugins, getSortedPlugins_fn, _addExecutedToCallStack, addExecutedToCallStack_fn, _execute, execute_fn, _executeSync, executeSync_fn, _catcher, catcher_fn, _parse, parse_fn;
|
|
2101
2101
|
var PluginManager = class {
|
|
2102
2102
|
constructor(config, options) {
|
|
2103
|
-
|
|
2104
|
-
|
|
2103
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _getSortedPlugins);
|
|
2104
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _addExecutedToCallStack);
|
|
2105
2105
|
/**
|
|
2106
2106
|
* Run an async plugin hook and return the result.
|
|
2107
2107
|
* @param hookName Name of the plugin hook. Must be either in `PluginHooks` or `OutputPluginValueHooks`.
|
|
@@ -2109,7 +2109,7 @@ var PluginManager = class {
|
|
|
2109
2109
|
* @param plugin The actual pluginObject to run.
|
|
2110
2110
|
*/
|
|
2111
2111
|
// Implementation signature
|
|
2112
|
-
|
|
2112
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _execute);
|
|
2113
2113
|
/**
|
|
2114
2114
|
* Run a sync plugin hook and return the result.
|
|
2115
2115
|
* @param hookName Name of the plugin hook. Must be in `PluginHooks`.
|
|
@@ -2117,14 +2117,14 @@ var PluginManager = class {
|
|
|
2117
2117
|
* @param plugin The acutal plugin
|
|
2118
2118
|
* @param replaceContext When passed, the plugin context can be overridden.
|
|
2119
2119
|
*/
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2120
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _executeSync);
|
|
2121
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _catcher);
|
|
2122
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _parse);
|
|
2123
2123
|
this.events = new EventEmitter2();
|
|
2124
2124
|
this.executed = [];
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2125
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _core, void 0);
|
|
2126
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _usedPluginNames, {});
|
|
2127
|
+
chunkKAA3L7N6_cjs.__privateAdd(this, _promiseManager, void 0);
|
|
2128
2128
|
this.resolvePath = (params) => {
|
|
2129
2129
|
if (params.pluginKey) {
|
|
2130
2130
|
const paths = this.hookForPluginSync({
|
|
@@ -2132,7 +2132,7 @@ var PluginManager = class {
|
|
|
2132
2132
|
hookName: "resolvePath",
|
|
2133
2133
|
parameters: [params.baseName, params.directory, params.options]
|
|
2134
2134
|
});
|
|
2135
|
-
if (paths && paths?.length > 1 && this.logger.logLevel ===
|
|
2135
|
+
if (paths && paths?.length > 1 && this.logger.logLevel === chunkJSJ3NRBQ_cjs.LogLevel.debug) {
|
|
2136
2136
|
this.logger.debug(
|
|
2137
2137
|
`Cannot return a path where the 'pluginKey' ${params.pluginKey ? JSON.stringify(params.pluginKey) : '"'} is not unique enough
|
|
2138
2138
|
|
|
@@ -2156,7 +2156,7 @@ Falling back on the first item.
|
|
|
2156
2156
|
hookName: "resolveName",
|
|
2157
2157
|
parameters: [params.name, params.type]
|
|
2158
2158
|
});
|
|
2159
|
-
if (names && names?.length > 1 && this.logger.logLevel ===
|
|
2159
|
+
if (names && names?.length > 1 && this.logger.logLevel === chunkJSJ3NRBQ_cjs.LogLevel.debug) {
|
|
2160
2160
|
this.logger.debug(
|
|
2161
2161
|
`Cannot return a name where the 'pluginKey' ${params.pluginKey ? JSON.stringify(params.pluginKey) : '"'} is not unique enough
|
|
2162
2162
|
|
|
@@ -2166,19 +2166,19 @@ Falling back on the first item.
|
|
|
2166
2166
|
`
|
|
2167
2167
|
);
|
|
2168
2168
|
}
|
|
2169
|
-
return
|
|
2169
|
+
return chunk2UXXYHS6_cjs.transformReservedWord(names?.at(0) || params.name);
|
|
2170
2170
|
}
|
|
2171
2171
|
const name = this.hookFirstSync({
|
|
2172
2172
|
hookName: "resolveName",
|
|
2173
2173
|
parameters: [params.name, params.type]
|
|
2174
2174
|
}).result;
|
|
2175
|
-
return
|
|
2175
|
+
return chunk2UXXYHS6_cjs.transformReservedWord(name);
|
|
2176
2176
|
};
|
|
2177
2177
|
this.config = config;
|
|
2178
2178
|
this.logger = options.logger;
|
|
2179
2179
|
this.queue = new PQueue({ concurrency: 1 });
|
|
2180
2180
|
this.fileManager = new FileManager({ task: options.task, queue: this.queue });
|
|
2181
|
-
|
|
2181
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _promiseManager, new PromiseManager({ nullCheck: (state) => !!state?.result }));
|
|
2182
2182
|
const plugins = config.plugins || [];
|
|
2183
2183
|
const core = definePlugin({
|
|
2184
2184
|
config,
|
|
@@ -2187,11 +2187,11 @@ Falling back on the first item.
|
|
|
2187
2187
|
fileManager: this.fileManager,
|
|
2188
2188
|
resolvePath: this.resolvePath.bind(this),
|
|
2189
2189
|
resolveName: this.resolveName.bind(this),
|
|
2190
|
-
getPlugins:
|
|
2190
|
+
getPlugins: chunkKAA3L7N6_cjs.__privateMethod(this, _getSortedPlugins, getSortedPlugins_fn).bind(this)
|
|
2191
2191
|
});
|
|
2192
|
-
|
|
2193
|
-
this.plugins = [
|
|
2194
|
-
return
|
|
2192
|
+
chunkKAA3L7N6_cjs.__privateSet(this, _core, chunkKAA3L7N6_cjs.__privateMethod(this, _parse, parse_fn).call(this, core, this, core.api.call(null)));
|
|
2193
|
+
this.plugins = [chunkKAA3L7N6_cjs.__privateGet(this, _core), ...plugins].map((plugin) => {
|
|
2194
|
+
return chunkKAA3L7N6_cjs.__privateMethod(this, _parse, parse_fn).call(this, plugin, this, chunkKAA3L7N6_cjs.__privateGet(this, _core).api);
|
|
2195
2195
|
});
|
|
2196
2196
|
return this;
|
|
2197
2197
|
}
|
|
@@ -2211,7 +2211,7 @@ Falling back on the first item.
|
|
|
2211
2211
|
}) {
|
|
2212
2212
|
const plugins = this.getPluginsByKey(hookName, pluginKey);
|
|
2213
2213
|
const promises = plugins.map((plugin) => {
|
|
2214
|
-
return
|
|
2214
|
+
return chunkKAA3L7N6_cjs.__privateMethod(this, _execute, execute_fn).call(this, {
|
|
2215
2215
|
strategy: "hookFirst",
|
|
2216
2216
|
hookName,
|
|
2217
2217
|
parameters,
|
|
@@ -2230,7 +2230,7 @@ Falling back on the first item.
|
|
|
2230
2230
|
}) {
|
|
2231
2231
|
const plugins = this.getPluginsByKey(hookName, pluginKey);
|
|
2232
2232
|
return plugins.map((plugin) => {
|
|
2233
|
-
return
|
|
2233
|
+
return chunkKAA3L7N6_cjs.__privateMethod(this, _executeSync, executeSync_fn).call(this, {
|
|
2234
2234
|
strategy: "hookFirst",
|
|
2235
2235
|
hookName,
|
|
2236
2236
|
parameters,
|
|
@@ -2246,11 +2246,11 @@ Falling back on the first item.
|
|
|
2246
2246
|
parameters,
|
|
2247
2247
|
skipped
|
|
2248
2248
|
}) {
|
|
2249
|
-
const promises =
|
|
2249
|
+
const promises = chunkKAA3L7N6_cjs.__privateMethod(this, _getSortedPlugins, getSortedPlugins_fn).call(this).filter((plugin) => {
|
|
2250
2250
|
return skipped ? skipped.has(plugin) : true;
|
|
2251
2251
|
}).map((plugin) => {
|
|
2252
2252
|
return async () => {
|
|
2253
|
-
const value = await
|
|
2253
|
+
const value = await chunkKAA3L7N6_cjs.__privateMethod(this, _execute, execute_fn).call(this, {
|
|
2254
2254
|
strategy: "hookFirst",
|
|
2255
2255
|
hookName,
|
|
2256
2256
|
parameters,
|
|
@@ -2264,7 +2264,7 @@ Falling back on the first item.
|
|
|
2264
2264
|
);
|
|
2265
2265
|
};
|
|
2266
2266
|
});
|
|
2267
|
-
return
|
|
2267
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _promiseManager).run("first", promises);
|
|
2268
2268
|
}
|
|
2269
2269
|
/**
|
|
2270
2270
|
* First non-null result stops and will return it's value.
|
|
@@ -2275,12 +2275,12 @@ Falling back on the first item.
|
|
|
2275
2275
|
skipped
|
|
2276
2276
|
}) {
|
|
2277
2277
|
let parseResult = null;
|
|
2278
|
-
for (const plugin of
|
|
2278
|
+
for (const plugin of chunkKAA3L7N6_cjs.__privateMethod(this, _getSortedPlugins, getSortedPlugins_fn).call(this)) {
|
|
2279
2279
|
if (skipped && skipped.has(plugin)) {
|
|
2280
2280
|
continue;
|
|
2281
2281
|
}
|
|
2282
2282
|
parseResult = {
|
|
2283
|
-
result:
|
|
2283
|
+
result: chunkKAA3L7N6_cjs.__privateMethod(this, _executeSync, executeSync_fn).call(this, {
|
|
2284
2284
|
strategy: "hookFirst",
|
|
2285
2285
|
hookName,
|
|
2286
2286
|
parameters,
|
|
@@ -2301,14 +2301,14 @@ Falling back on the first item.
|
|
|
2301
2301
|
hookName,
|
|
2302
2302
|
parameters
|
|
2303
2303
|
}) {
|
|
2304
|
-
const promises =
|
|
2305
|
-
return () =>
|
|
2304
|
+
const promises = chunkKAA3L7N6_cjs.__privateMethod(this, _getSortedPlugins, getSortedPlugins_fn).call(this).map((plugin) => {
|
|
2305
|
+
return () => chunkKAA3L7N6_cjs.__privateMethod(this, _execute, execute_fn).call(this, { strategy: "hookParallel", hookName, parameters, plugin });
|
|
2306
2306
|
});
|
|
2307
|
-
const results = await
|
|
2307
|
+
const results = await chunkKAA3L7N6_cjs.__privateGet(this, _promiseManager).run("parallel", promises);
|
|
2308
2308
|
results.forEach((result, index) => {
|
|
2309
2309
|
if (isPromiseRejectedResult(result)) {
|
|
2310
|
-
const plugin =
|
|
2311
|
-
|
|
2310
|
+
const plugin = chunkKAA3L7N6_cjs.__privateMethod(this, _getSortedPlugins, getSortedPlugins_fn).call(this)[index];
|
|
2311
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _catcher, catcher_fn).call(this, result.reason, plugin, hookName);
|
|
2312
2312
|
}
|
|
2313
2313
|
});
|
|
2314
2314
|
return results.filter((result) => result.status === "fulfilled").map((result) => result.value);
|
|
@@ -2323,16 +2323,16 @@ Falling back on the first item.
|
|
|
2323
2323
|
}) {
|
|
2324
2324
|
const [argument0, ...rest] = parameters;
|
|
2325
2325
|
let promise = Promise.resolve(argument0);
|
|
2326
|
-
for (const plugin of
|
|
2326
|
+
for (const plugin of chunkKAA3L7N6_cjs.__privateMethod(this, _getSortedPlugins, getSortedPlugins_fn).call(this)) {
|
|
2327
2327
|
promise = promise.then((arg0) => {
|
|
2328
|
-
const value =
|
|
2328
|
+
const value = chunkKAA3L7N6_cjs.__privateMethod(this, _execute, execute_fn).call(this, {
|
|
2329
2329
|
strategy: "hookReduceArg0",
|
|
2330
2330
|
hookName,
|
|
2331
2331
|
parameters: [arg0, ...rest],
|
|
2332
2332
|
plugin
|
|
2333
2333
|
});
|
|
2334
2334
|
return value;
|
|
2335
|
-
}).then((result) => reduce.call(
|
|
2335
|
+
}).then((result) => reduce.call(chunkKAA3L7N6_cjs.__privateGet(this, _core).api, argument0, result, plugin));
|
|
2336
2336
|
}
|
|
2337
2337
|
return promise;
|
|
2338
2338
|
}
|
|
@@ -2340,15 +2340,15 @@ Falling back on the first item.
|
|
|
2340
2340
|
* Chains plugins
|
|
2341
2341
|
*/
|
|
2342
2342
|
async hookSeq({ hookName, parameters }) {
|
|
2343
|
-
const promises =
|
|
2344
|
-
return () =>
|
|
2343
|
+
const promises = chunkKAA3L7N6_cjs.__privateMethod(this, _getSortedPlugins, getSortedPlugins_fn).call(this).map((plugin) => {
|
|
2344
|
+
return () => chunkKAA3L7N6_cjs.__privateMethod(this, _execute, execute_fn).call(this, {
|
|
2345
2345
|
strategy: "hookSeq",
|
|
2346
2346
|
hookName,
|
|
2347
2347
|
parameters,
|
|
2348
2348
|
plugin
|
|
2349
2349
|
});
|
|
2350
2350
|
});
|
|
2351
|
-
return
|
|
2351
|
+
return chunkKAA3L7N6_cjs.__privateGet(this, _promiseManager).run("seq", promises);
|
|
2352
2352
|
}
|
|
2353
2353
|
getPluginsByKey(hookName, pluginKey) {
|
|
2354
2354
|
const plugins = [...this.plugins];
|
|
@@ -2364,7 +2364,7 @@ Falling back on the first item.
|
|
|
2364
2364
|
});
|
|
2365
2365
|
if (!pluginByPluginName?.length) {
|
|
2366
2366
|
const corePlugin = plugins.find((plugin) => plugin.name === "core" && plugin[hookName]);
|
|
2367
|
-
if (this.logger.logLevel ===
|
|
2367
|
+
if (this.logger.logLevel === chunkJSJ3NRBQ_cjs.LogLevel.debug) {
|
|
2368
2368
|
if (corePlugin) {
|
|
2369
2369
|
this.logger.debug(`No hook '${hookName}' for pluginKey '${JSON.stringify(pluginKey)}' found, falling back on the '@kubb/core' plugin`);
|
|
2370
2370
|
} else {
|
|
@@ -2402,7 +2402,7 @@ _getSortedPlugins = new WeakSet();
|
|
|
2402
2402
|
getSortedPlugins_fn = function(hookName) {
|
|
2403
2403
|
const plugins = [...this.plugins].filter((plugin) => plugin.name !== "core");
|
|
2404
2404
|
if (hookName) {
|
|
2405
|
-
if (this.logger.logLevel ===
|
|
2405
|
+
if (this.logger.logLevel === chunkJSJ3NRBQ_cjs.LogLevel.info) {
|
|
2406
2406
|
const containsHookName = plugins.some((item) => item[hookName]);
|
|
2407
2407
|
if (!containsHookName) {
|
|
2408
2408
|
this.logger.warn(`No hook ${hookName} found`);
|
|
@@ -2450,7 +2450,7 @@ execute_fn = function({
|
|
|
2450
2450
|
this.events.emit("execute", { strategy, hookName, parameters, plugin });
|
|
2451
2451
|
const task = Promise.resolve().then(() => {
|
|
2452
2452
|
if (typeof hook === "function") {
|
|
2453
|
-
const possiblePromiseResult = hook.apply({ ...
|
|
2453
|
+
const possiblePromiseResult = hook.apply({ ...chunkKAA3L7N6_cjs.__privateGet(this, _core).api, plugin }, parameters);
|
|
2454
2454
|
if (isPromise(possiblePromiseResult)) {
|
|
2455
2455
|
return Promise.resolve(possiblePromiseResult);
|
|
2456
2456
|
}
|
|
@@ -2459,7 +2459,7 @@ execute_fn = function({
|
|
|
2459
2459
|
return hook;
|
|
2460
2460
|
}).then((result) => {
|
|
2461
2461
|
output = result;
|
|
2462
|
-
|
|
2462
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _addExecutedToCallStack, addExecutedToCallStack_fn).call(this, {
|
|
2463
2463
|
parameters,
|
|
2464
2464
|
output,
|
|
2465
2465
|
strategy,
|
|
@@ -2468,7 +2468,7 @@ execute_fn = function({
|
|
|
2468
2468
|
});
|
|
2469
2469
|
return result;
|
|
2470
2470
|
}).catch((e) => {
|
|
2471
|
-
|
|
2471
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _catcher, catcher_fn).call(this, e, plugin, hookName);
|
|
2472
2472
|
return null;
|
|
2473
2473
|
});
|
|
2474
2474
|
return task;
|
|
@@ -2488,12 +2488,12 @@ executeSync_fn = function({
|
|
|
2488
2488
|
this.events.emit("execute", { strategy, hookName, parameters, plugin });
|
|
2489
2489
|
try {
|
|
2490
2490
|
if (typeof hook === "function") {
|
|
2491
|
-
const fn = hook.apply({ ...
|
|
2491
|
+
const fn = hook.apply({ ...chunkKAA3L7N6_cjs.__privateGet(this, _core).api, plugin }, parameters);
|
|
2492
2492
|
output = fn;
|
|
2493
2493
|
return fn;
|
|
2494
2494
|
}
|
|
2495
2495
|
output = hook;
|
|
2496
|
-
|
|
2496
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _addExecutedToCallStack, addExecutedToCallStack_fn).call(this, {
|
|
2497
2497
|
parameters,
|
|
2498
2498
|
output,
|
|
2499
2499
|
strategy,
|
|
@@ -2502,7 +2502,7 @@ executeSync_fn = function({
|
|
|
2502
2502
|
});
|
|
2503
2503
|
return hook;
|
|
2504
2504
|
} catch (e) {
|
|
2505
|
-
|
|
2505
|
+
chunkKAA3L7N6_cjs.__privateMethod(this, _catcher, catcher_fn).call(this, e, plugin, hookName);
|
|
2506
2506
|
return null;
|
|
2507
2507
|
}
|
|
2508
2508
|
};
|
|
@@ -2515,8 +2515,8 @@ catcher_fn = function(e, plugin, hookName) {
|
|
|
2515
2515
|
};
|
|
2516
2516
|
_parse = new WeakSet();
|
|
2517
2517
|
parse_fn = function(plugin, pluginManager, context) {
|
|
2518
|
-
const usedPluginNames =
|
|
2519
|
-
|
|
2518
|
+
const usedPluginNames = chunkKAA3L7N6_cjs.__privateGet(pluginManager, _usedPluginNames);
|
|
2519
|
+
chunkKXP7HD6Z_cjs.setUniqueName(plugin.name, usedPluginNames);
|
|
2520
2520
|
const key = [plugin.name, usedPluginNames[plugin.name]].filter(Boolean);
|
|
2521
2521
|
if (!plugin.transform) {
|
|
2522
2522
|
plugin.transform = function transform(code) {
|
|
@@ -2545,4 +2545,4 @@ exports.createPlugin = createPlugin;
|
|
|
2545
2545
|
exports.isPromise = isPromise;
|
|
2546
2546
|
exports.pluginName = pluginName;
|
|
2547
2547
|
//# sourceMappingURL=out.js.map
|
|
2548
|
-
//# sourceMappingURL=chunk-
|
|
2548
|
+
//# sourceMappingURL=chunk-OYDUQYAK.cjs.map
|