@kubb/core 3.0.11 → 3.0.13
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-JH2VVKQW.cjs → chunk-GEVVJETG.cjs} +4 -4
- package/dist/{chunk-JH2VVKQW.cjs.map → chunk-GEVVJETG.cjs.map} +1 -1
- package/dist/{chunk-ZG37RPQ3.cjs → chunk-MMV52UDN.cjs} +33 -33
- package/dist/{chunk-ZG37RPQ3.cjs.map → chunk-MMV52UDN.cjs.map} +1 -1
- package/dist/{chunk-6B6EINN2.cjs → chunk-QFW7G6UH.cjs} +17 -17
- package/dist/{chunk-6B6EINN2.cjs.map → chunk-QFW7G6UH.cjs.map} +1 -1
- package/dist/{chunk-4HBT5USX.cjs → chunk-S2GH2TSU.cjs} +10 -10
- package/dist/{chunk-4HBT5USX.cjs.map → chunk-S2GH2TSU.cjs.map} +1 -1
- package/dist/{chunk-MBE2SGPK.cjs → chunk-ZLMXOTNN.cjs} +8 -8
- package/dist/{chunk-MBE2SGPK.cjs.map → chunk-ZLMXOTNN.cjs.map} +1 -1
- package/dist/index.cjs +35 -35
- package/dist/logger.cjs +7 -7
- package/dist/mocks.cjs +9 -9
- package/dist/{prompt-DCBAXKBT.cjs → prompt-HRWEUPXL.cjs} +62 -62
- package/dist/{prompt-DCBAXKBT.cjs.map → prompt-HRWEUPXL.cjs.map} +1 -1
- package/dist/transformers.cjs +23 -23
- package/dist/utils.cjs +17 -17
- package/package.json +9 -9
|
@@ -29,14 +29,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
mod
|
|
30
30
|
));
|
|
31
31
|
|
|
32
|
-
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.
|
|
32
|
+
// ../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.0_@types+node@20.17.8__@swc+core@1.7.22_jiti@2.4.0_p_z6wrj7it3tqdhnmkx7k4z3w4da/node_modules/tsup/assets/cjs_shims.js
|
|
33
33
|
var init_cjs_shims = __esm({
|
|
34
|
-
"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.
|
|
34
|
+
"../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.0_@types+node@20.17.8__@swc+core@1.7.22_jiti@2.4.0_p_z6wrj7it3tqdhnmkx7k4z3w4da/node_modules/tsup/assets/cjs_shims.js"() {
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
|
|
38
38
|
exports.__commonJS = __commonJS;
|
|
39
39
|
exports.__toESM = __toESM;
|
|
40
40
|
exports.init_cjs_shims = init_cjs_shims;
|
|
41
|
-
//# sourceMappingURL=chunk-
|
|
42
|
-
//# sourceMappingURL=chunk-
|
|
41
|
+
//# sourceMappingURL=chunk-GEVVJETG.cjs.map
|
|
42
|
+
//# sourceMappingURL=chunk-GEVVJETG.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.3.5_@microsoft+api-extractor@7.48.0_@types+node@20.17.8__@swc+core@1.7.22_jiti@2.4.0_p_z6wrj7it3tqdhnmkx7k4z3w4da/node_modules/tsup/assets/cjs_shims.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,cAAA,GAAA,KAAA,CAAA;AAAA,EAAA,yLAAA,GAAA;AAAA;AAAA,CAAA","file":"chunk-GEVVJETG.cjs","sourcesContent":["// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () =>\n typeof document === 'undefined'\n ? new URL(`file:${__filename}`).href\n : (document.currentScript && document.currentScript.src) ||\n new URL('main.js', document.baseURI).href\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkQFW7G6UH_cjs = require('./chunk-QFW7G6UH.cjs');
|
|
4
|
+
var chunkGEVVJETG_cjs = require('./chunk-GEVVJETG.cjs');
|
|
5
5
|
var path = require('path');
|
|
6
6
|
var fs = require('@kubb/fs');
|
|
7
7
|
var hash = require('object-hash');
|
|
@@ -13,9 +13,9 @@ var path__default = /*#__PURE__*/_interopDefault(path);
|
|
|
13
13
|
var hash__default = /*#__PURE__*/_interopDefault(hash);
|
|
14
14
|
|
|
15
15
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js
|
|
16
|
-
var require_eventemitter3 =
|
|
16
|
+
var require_eventemitter3 = chunkGEVVJETG_cjs.__commonJS({
|
|
17
17
|
"../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js"(exports, module) {
|
|
18
|
-
|
|
18
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
19
19
|
var has = Object.prototype.hasOwnProperty;
|
|
20
20
|
var prefix = "~";
|
|
21
21
|
function Events() {
|
|
@@ -175,10 +175,10 @@ var require_eventemitter3 = chunkJH2VVKQW_cjs.__commonJS({
|
|
|
175
175
|
});
|
|
176
176
|
|
|
177
177
|
// src/utils/index.ts
|
|
178
|
-
|
|
178
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
179
179
|
|
|
180
180
|
// src/utils/FunctionParams.ts
|
|
181
|
-
|
|
181
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
182
182
|
var FunctionParams = class _FunctionParams {
|
|
183
183
|
#items = [];
|
|
184
184
|
constructor() {
|
|
@@ -199,7 +199,7 @@ var FunctionParams = class _FunctionParams {
|
|
|
199
199
|
return this;
|
|
200
200
|
}
|
|
201
201
|
static #orderItems(items) {
|
|
202
|
-
return
|
|
202
|
+
return chunkQFW7G6UH_cjs.orderBy(
|
|
203
203
|
items.filter(Boolean),
|
|
204
204
|
[
|
|
205
205
|
(v) => {
|
|
@@ -227,7 +227,7 @@ var FunctionParams = class _FunctionParams {
|
|
|
227
227
|
acc.push(`${type}${rest.default ? ` = ${rest.default}` : ""}`);
|
|
228
228
|
return acc;
|
|
229
229
|
}
|
|
230
|
-
const parameterName = name.startsWith("{") ? name :
|
|
230
|
+
const parameterName = name.startsWith("{") ? name : chunkQFW7G6UH_cjs.camelCase(name);
|
|
231
231
|
if (type) {
|
|
232
232
|
if (required) {
|
|
233
233
|
acc.push(`${parameterName}: ${type}${rest.default ? ` = ${rest.default}` : ""}`);
|
|
@@ -282,7 +282,7 @@ var FunctionParams = class _FunctionParams {
|
|
|
282
282
|
};
|
|
283
283
|
|
|
284
284
|
// src/utils/promise.ts
|
|
285
|
-
|
|
285
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
286
286
|
function isPromise(result) {
|
|
287
287
|
return !!result && typeof result?.then === "function";
|
|
288
288
|
}
|
|
@@ -294,7 +294,7 @@ function isPromiseRejectedResult(result) {
|
|
|
294
294
|
}
|
|
295
295
|
|
|
296
296
|
// src/utils/renderTemplate.ts
|
|
297
|
-
|
|
297
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
298
298
|
function renderTemplate(template, data = void 0) {
|
|
299
299
|
if (!data || !Object.keys(data).length) {
|
|
300
300
|
return template.replace(/{{(.*?)}}/g, "");
|
|
@@ -319,7 +319,7 @@ function renderTemplate(template, data = void 0) {
|
|
|
319
319
|
}
|
|
320
320
|
|
|
321
321
|
// src/utils/timeout.ts
|
|
322
|
-
|
|
322
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
323
323
|
async function timeout(ms) {
|
|
324
324
|
return new Promise((resolve) => {
|
|
325
325
|
setTimeout(() => {
|
|
@@ -329,7 +329,7 @@ async function timeout(ms) {
|
|
|
329
329
|
}
|
|
330
330
|
|
|
331
331
|
// src/utils/uniqueName.ts
|
|
332
|
-
|
|
332
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
333
333
|
function getUniqueName(originalName, data) {
|
|
334
334
|
let used = data[originalName] || 0;
|
|
335
335
|
if (used) {
|
|
@@ -350,7 +350,7 @@ function setUniqueName(originalName, data) {
|
|
|
350
350
|
}
|
|
351
351
|
|
|
352
352
|
// src/utils/URLPath.ts
|
|
353
|
-
|
|
353
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
354
354
|
var URLPath = class {
|
|
355
355
|
path;
|
|
356
356
|
constructor(path2) {
|
|
@@ -419,7 +419,7 @@ var URLPath = class {
|
|
|
419
419
|
if (found) {
|
|
420
420
|
newPath = found.reduce((prev, path2) => {
|
|
421
421
|
const pathWithoutBrackets = path2.replaceAll("{", "").replaceAll("}", "");
|
|
422
|
-
const param =
|
|
422
|
+
const param = chunkQFW7G6UH_cjs.isValidVarName(pathWithoutBrackets) ? pathWithoutBrackets : chunkQFW7G6UH_cjs.camelCase(pathWithoutBrackets);
|
|
423
423
|
return prev.replace(path2, `\${${replacer ? replacer(param) : param}}`);
|
|
424
424
|
}, this.path);
|
|
425
425
|
}
|
|
@@ -434,7 +434,7 @@ var URLPath = class {
|
|
|
434
434
|
const params = {};
|
|
435
435
|
found.forEach((item) => {
|
|
436
436
|
item = item.replaceAll("{", "").replaceAll("}", "");
|
|
437
|
-
const param =
|
|
437
|
+
const param = chunkQFW7G6UH_cjs.isValidVarName(item) ? item : chunkQFW7G6UH_cjs.camelCase(item);
|
|
438
438
|
const key = replacer ? replacer(param) : param;
|
|
439
439
|
params[key] = key;
|
|
440
440
|
}, this.path);
|
|
@@ -450,16 +450,16 @@ var URLPath = class {
|
|
|
450
450
|
};
|
|
451
451
|
|
|
452
452
|
// src/utils/parser.ts
|
|
453
|
-
|
|
453
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
454
454
|
|
|
455
455
|
// src/FileManager.ts
|
|
456
|
-
|
|
456
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
457
457
|
|
|
458
458
|
// src/BarrelManager.ts
|
|
459
|
-
|
|
459
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
460
460
|
|
|
461
461
|
// src/utils/TreeNode.ts
|
|
462
|
-
|
|
462
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
463
463
|
var TreeNode = class _TreeNode {
|
|
464
464
|
data;
|
|
465
465
|
parent;
|
|
@@ -707,14 +707,14 @@ File: ${JSON.stringify(item.data.file, void 0, 2)}`
|
|
|
707
707
|
};
|
|
708
708
|
|
|
709
709
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.js
|
|
710
|
-
|
|
710
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
711
711
|
|
|
712
712
|
// ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
|
|
713
|
-
|
|
714
|
-
var import_index =
|
|
713
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
714
|
+
var import_index = chunkGEVVJETG_cjs.__toESM(require_eventemitter3(), 1);
|
|
715
715
|
|
|
716
716
|
// ../../node_modules/.pnpm/p-timeout@6.1.2/node_modules/p-timeout/index.js
|
|
717
|
-
|
|
717
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
718
718
|
var TimeoutError = class extends Error {
|
|
719
719
|
constructor(message) {
|
|
720
720
|
super(message);
|
|
@@ -799,10 +799,10 @@ function pTimeout(promise, options) {
|
|
|
799
799
|
}
|
|
800
800
|
|
|
801
801
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.js
|
|
802
|
-
|
|
802
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
803
803
|
|
|
804
804
|
// ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.js
|
|
805
|
-
|
|
805
|
+
chunkGEVVJETG_cjs.init_cjs_shims();
|
|
806
806
|
function lowerBound(array, value, comparator) {
|
|
807
807
|
let first = 0;
|
|
808
808
|
let count = array.length;
|
|
@@ -1153,7 +1153,7 @@ var FileManager = class {
|
|
|
1153
1153
|
return [...this.#filesByPath.values()];
|
|
1154
1154
|
}
|
|
1155
1155
|
get orderedFiles() {
|
|
1156
|
-
return
|
|
1156
|
+
return chunkQFW7G6UH_cjs.orderBy(
|
|
1157
1157
|
[...this.#filesByPath.values()],
|
|
1158
1158
|
[
|
|
1159
1159
|
(v) => v?.meta && "pluginKey" in v.meta && !v.meta.pluginKey,
|
|
@@ -1291,12 +1291,12 @@ function combineSources(sources) {
|
|
|
1291
1291
|
);
|
|
1292
1292
|
}
|
|
1293
1293
|
function combineExports(exports) {
|
|
1294
|
-
return
|
|
1294
|
+
return chunkQFW7G6UH_cjs.orderBy(exports, [
|
|
1295
1295
|
(v) => !!Array.isArray(v.name),
|
|
1296
1296
|
(v) => !v.isTypeOnly,
|
|
1297
1297
|
(v) => v.path,
|
|
1298
1298
|
(v) => !!v.name,
|
|
1299
|
-
(v) => Array.isArray(v.name) ?
|
|
1299
|
+
(v) => Array.isArray(v.name) ? chunkQFW7G6UH_cjs.orderBy(v.name) : v.name
|
|
1300
1300
|
]).reduce(
|
|
1301
1301
|
(prev, curr) => {
|
|
1302
1302
|
const name = curr.name;
|
|
@@ -1330,12 +1330,12 @@ function combineExports(exports) {
|
|
|
1330
1330
|
);
|
|
1331
1331
|
}
|
|
1332
1332
|
function combineImports(imports, exports, source) {
|
|
1333
|
-
return
|
|
1333
|
+
return chunkQFW7G6UH_cjs.orderBy(imports, [
|
|
1334
1334
|
(v) => !!Array.isArray(v.name),
|
|
1335
1335
|
(v) => !v.isTypeOnly,
|
|
1336
1336
|
(v) => v.path,
|
|
1337
1337
|
(v) => !!v.name,
|
|
1338
|
-
(v) => Array.isArray(v.name) ?
|
|
1338
|
+
(v) => Array.isArray(v.name) ? chunkQFW7G6UH_cjs.orderBy(v.name) : v.name
|
|
1339
1339
|
]).reduce(
|
|
1340
1340
|
(prev, curr) => {
|
|
1341
1341
|
let name = Array.isArray(curr.name) ? [...new Set(curr.name)] : curr.name;
|
|
@@ -1386,7 +1386,7 @@ function combineImports(imports, exports, source) {
|
|
|
1386
1386
|
}
|
|
1387
1387
|
var queue = new PQueue({ concurrency: 100 });
|
|
1388
1388
|
async function processFiles({ dryRun, root, extension, logger, files }) {
|
|
1389
|
-
const orderedFiles =
|
|
1389
|
+
const orderedFiles = chunkQFW7G6UH_cjs.orderBy(files, [
|
|
1390
1390
|
(v) => v?.meta && "pluginKey" in v.meta && !v.meta.pluginKey,
|
|
1391
1391
|
(v) => v.path.length,
|
|
1392
1392
|
(v) => fs.trimExtName(v.path).endsWith("index")
|
|
@@ -1537,5 +1537,5 @@ exports.processFiles = processFiles;
|
|
|
1537
1537
|
exports.renderTemplate = renderTemplate;
|
|
1538
1538
|
exports.setUniqueName = setUniqueName;
|
|
1539
1539
|
exports.timeout = timeout;
|
|
1540
|
-
//# sourceMappingURL=chunk-
|
|
1541
|
-
//# sourceMappingURL=chunk-
|
|
1540
|
+
//# sourceMappingURL=chunk-MMV52UDN.cjs.map
|
|
1541
|
+
//# sourceMappingURL=chunk-MMV52UDN.cjs.map
|