@kubb/core 3.10.15 → 3.11.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.
@@ -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.5.0_@microsoft+api-extractor@7.52.8_@types+node@20.19.0__jiti@2.4.2_postcss@8.5.3_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js
32
+ // ../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@20.19.1__jiti@2.4.2_postcss@8.5.6_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js
33
33
  var init_cjs_shims = __esm({
34
- "../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@20.19.0__jiti@2.4.2_postcss@8.5.3_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js"() {
34
+ "../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@20.19.1__jiti@2.4.2_postcss@8.5.6_typescript@5.8.3_yaml@2.7.1/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-H7GP5BQJ.cjs.map
42
- //# sourceMappingURL=chunk-H7GP5BQJ.cjs.map
41
+ //# sourceMappingURL=chunk-ABJWI4LI.cjs.map
42
+ //# sourceMappingURL=chunk-ABJWI4LI.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@20.19.0__jiti@2.4.2_postcss@8.5.3_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,cAAA,GAAA,KAAA,CAAA;AAAA,EAAA,qLAAA,GAAA;AAAA;AAAA,CAAA","file":"chunk-H7GP5BQJ.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
+ {"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.5.0_@microsoft+api-extractor@7.52.8_@types+node@20.19.1__jiti@2.4.2_postcss@8.5.6_typescript@5.8.3_yaml@2.7.1/node_modules/tsup/assets/cjs_shims.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,cAAA,GAAA,KAAA,CAAA;AAAA,EAAA,qLAAA,GAAA;AAAA;AAAA,CAAA","file":"chunk-ABJWI4LI.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,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkZZEKLURQ_cjs = require('./chunk-ZZEKLURQ.cjs');
4
- var chunkDYN65P3T_cjs = require('./chunk-DYN65P3T.cjs');
5
- var chunkH7GP5BQJ_cjs = require('./chunk-H7GP5BQJ.cjs');
3
+ var chunkPMVWFTDC_cjs = require('./chunk-PMVWFTDC.cjs');
4
+ var chunkZD6YJ7FU_cjs = require('./chunk-ZD6YJ7FU.cjs');
5
+ var chunkABJWI4LI_cjs = require('./chunk-ABJWI4LI.cjs');
6
6
  var path = require('path');
7
7
  var hash = require('object-hash');
8
8
  var remeda = require('remeda');
@@ -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 = chunkH7GP5BQJ_cjs.__commonJS({
16
+ var require_eventemitter3 = chunkABJWI4LI_cjs.__commonJS({
17
17
  "../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js"(exports, module) {
18
- chunkH7GP5BQJ_cjs.init_cjs_shims();
18
+ chunkABJWI4LI_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 = chunkH7GP5BQJ_cjs.__commonJS({
175
175
  });
176
176
 
177
177
  // src/utils/index.ts
178
- chunkH7GP5BQJ_cjs.init_cjs_shims();
178
+ chunkABJWI4LI_cjs.init_cjs_shims();
179
179
 
180
180
  // src/utils/FunctionParams.ts
181
- chunkH7GP5BQJ_cjs.init_cjs_shims();
181
+ chunkABJWI4LI_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 chunkZZEKLURQ_cjs.orderBy(
202
+ return chunkPMVWFTDC_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 : chunkZZEKLURQ_cjs.camelCase(name);
230
+ const parameterName = name.startsWith("{") ? name : chunkPMVWFTDC_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
- chunkH7GP5BQJ_cjs.init_cjs_shims();
285
+ chunkABJWI4LI_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
- chunkH7GP5BQJ_cjs.init_cjs_shims();
297
+ chunkABJWI4LI_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
- chunkH7GP5BQJ_cjs.init_cjs_shims();
322
+ chunkABJWI4LI_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
- chunkH7GP5BQJ_cjs.init_cjs_shims();
332
+ chunkABJWI4LI_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
- chunkH7GP5BQJ_cjs.init_cjs_shims();
353
+ chunkABJWI4LI_cjs.init_cjs_shims();
354
354
  var URLPath = class {
355
355
  path;
356
356
  #options;
@@ -421,9 +421,9 @@ var URLPath = class {
421
421
  if (found) {
422
422
  newPath = found.reduce((prev, path2) => {
423
423
  const pathWithoutBrackets = path2.replaceAll("{", "").replaceAll("}", "");
424
- let param = chunkZZEKLURQ_cjs.isValidVarName(pathWithoutBrackets) ? pathWithoutBrackets : chunkZZEKLURQ_cjs.camelCase(pathWithoutBrackets);
424
+ let param = chunkPMVWFTDC_cjs.isValidVarName(pathWithoutBrackets) ? pathWithoutBrackets : chunkPMVWFTDC_cjs.camelCase(pathWithoutBrackets);
425
425
  if (this.#options.casing === "camelcase") {
426
- param = chunkZZEKLURQ_cjs.camelCase(param);
426
+ param = chunkPMVWFTDC_cjs.camelCase(param);
427
427
  }
428
428
  return prev.replace(path2, `\${${replacer ? replacer(param) : param}}`);
429
429
  }, this.path);
@@ -439,9 +439,9 @@ var URLPath = class {
439
439
  const params = {};
440
440
  found.forEach((item) => {
441
441
  item = item.replaceAll("{", "").replaceAll("}", "");
442
- let param = chunkZZEKLURQ_cjs.isValidVarName(item) ? item : chunkZZEKLURQ_cjs.camelCase(item);
442
+ let param = chunkPMVWFTDC_cjs.isValidVarName(item) ? item : chunkPMVWFTDC_cjs.camelCase(item);
443
443
  if (this.#options.casing === "camelcase") {
444
- param = chunkZZEKLURQ_cjs.camelCase(param);
444
+ param = chunkPMVWFTDC_cjs.camelCase(param);
445
445
  }
446
446
  const key = replacer ? replacer(param) : param;
447
447
  params[key] = key;
@@ -458,20 +458,20 @@ var URLPath = class {
458
458
  };
459
459
 
460
460
  // src/utils/parser.ts
461
- chunkH7GP5BQJ_cjs.init_cjs_shims();
461
+ chunkABJWI4LI_cjs.init_cjs_shims();
462
462
 
463
463
  // src/FileManager.ts
464
- chunkH7GP5BQJ_cjs.init_cjs_shims();
464
+ chunkABJWI4LI_cjs.init_cjs_shims();
465
465
 
466
466
  // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/index.js
467
- chunkH7GP5BQJ_cjs.init_cjs_shims();
467
+ chunkABJWI4LI_cjs.init_cjs_shims();
468
468
 
469
469
  // ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
470
- chunkH7GP5BQJ_cjs.init_cjs_shims();
471
- var import_index = chunkH7GP5BQJ_cjs.__toESM(require_eventemitter3(), 1);
470
+ chunkABJWI4LI_cjs.init_cjs_shims();
471
+ var import_index = chunkABJWI4LI_cjs.__toESM(require_eventemitter3(), 1);
472
472
 
473
473
  // ../../node_modules/.pnpm/p-timeout@6.1.3/node_modules/p-timeout/index.js
474
- chunkH7GP5BQJ_cjs.init_cjs_shims();
474
+ chunkABJWI4LI_cjs.init_cjs_shims();
475
475
  var TimeoutError = class extends Error {
476
476
  constructor(message) {
477
477
  super(message);
@@ -560,10 +560,10 @@ function pTimeout(promise, options) {
560
560
  }
561
561
 
562
562
  // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/priority-queue.js
563
- chunkH7GP5BQJ_cjs.init_cjs_shims();
563
+ chunkABJWI4LI_cjs.init_cjs_shims();
564
564
 
565
565
  // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/lower-bound.js
566
- chunkH7GP5BQJ_cjs.init_cjs_shims();
566
+ chunkABJWI4LI_cjs.init_cjs_shims();
567
567
  function lowerBound(array, value, comparator) {
568
568
  let first = 0;
569
569
  let count = array.length;
@@ -956,10 +956,10 @@ var PQueue = class extends import_index.default {
956
956
  };
957
957
 
958
958
  // src/BarrelManager.ts
959
- chunkH7GP5BQJ_cjs.init_cjs_shims();
959
+ chunkABJWI4LI_cjs.init_cjs_shims();
960
960
 
961
961
  // src/utils/TreeNode.ts
962
- chunkH7GP5BQJ_cjs.init_cjs_shims();
962
+ chunkABJWI4LI_cjs.init_cjs_shims();
963
963
  var TreeNode = class _TreeNode {
964
964
  data;
965
965
  parent;
@@ -1167,7 +1167,7 @@ File: ${JSON.stringify(item.data.file, void 0, 2)}`
1167
1167
  if (isSubExport) {
1168
1168
  barrelFile.exports.push({
1169
1169
  name: [source.name],
1170
- path: chunkDYN65P3T_cjs.getRelativePath(treeNode.parent?.data.path, item.data.path),
1170
+ path: chunkZD6YJ7FU_cjs.getRelativePath(treeNode.parent?.data.path, item.data.path),
1171
1171
  isTypeOnly: source.isTypeOnly
1172
1172
  });
1173
1173
  } else {
@@ -1190,13 +1190,13 @@ File: ${JSON.stringify(item.data.file, void 0, 2)}`
1190
1190
  logger?.emit("debug", {
1191
1191
  date: /* @__PURE__ */ new Date(),
1192
1192
  logs: [
1193
- `Generating barrelFile '${chunkDYN65P3T_cjs.getRelativePath(root, barrelFile.path)}' for '${chunkDYN65P3T_cjs.getRelativePath(root, treeNode.data?.path)}' with ${barrelFile.sources.length} indexable exports: '${barrelFile.sources?.map((source) => source.name).join(", ")}'`
1193
+ `Generating barrelFile '${chunkZD6YJ7FU_cjs.getRelativePath(root, barrelFile.path)}' for '${chunkZD6YJ7FU_cjs.getRelativePath(root, treeNode.data?.path)}' with ${barrelFile.sources.length} indexable exports: '${barrelFile.sources?.map((source) => source.name).join(", ")}'`
1194
1194
  ]
1195
1195
  });
1196
1196
  logger?.emit("debug", {
1197
1197
  date: /* @__PURE__ */ new Date(),
1198
1198
  logs: [
1199
- `Generated barrelFile '${chunkDYN65P3T_cjs.getRelativePath(root, barrelFile.path)}' for '${chunkDYN65P3T_cjs.getRelativePath(root, treeNode.data?.path)}' with exports: '${cachedFiles.get(barrelFile.path)?.sources?.map((source) => source.name).join(", ")}'`
1199
+ `Generated barrelFile '${chunkZD6YJ7FU_cjs.getRelativePath(root, barrelFile.path)}' for '${chunkZD6YJ7FU_cjs.getRelativePath(root, treeNode.data?.path)}' with exports: '${cachedFiles.get(barrelFile.path)?.sources?.map((source) => source.name).join(", ")}'`
1200
1200
  ]
1201
1201
  });
1202
1202
  if (previousBarrelFile) {
@@ -1220,13 +1220,13 @@ var FileManager = class {
1220
1220
  return [...this.#filesByPath.values()];
1221
1221
  }
1222
1222
  get orderedFiles() {
1223
- return chunkZZEKLURQ_cjs.orderBy(
1223
+ return chunkPMVWFTDC_cjs.orderBy(
1224
1224
  [...this.#filesByPath.values()],
1225
1225
  [
1226
1226
  (v) => v?.meta && "pluginKey" in v.meta && !v.meta.pluginKey,
1227
1227
  (v) => v.path.length,
1228
- (v) => chunkDYN65P3T_cjs.trimExtName(v.path).endsWith("index"),
1229
- (v) => chunkDYN65P3T_cjs.trimExtName(v.baseName),
1228
+ (v) => chunkZD6YJ7FU_cjs.trimExtName(v.path).endsWith("index"),
1229
+ (v) => chunkZD6YJ7FU_cjs.trimExtName(v.baseName),
1230
1230
  (v) => v.path.split(".").pop()
1231
1231
  ]
1232
1232
  );
@@ -1285,7 +1285,7 @@ var FileManager = class {
1285
1285
  }
1286
1286
  const barrelManager = new BarrelManager({ logger });
1287
1287
  const pathToBuildFrom = path.join(root, output.path);
1288
- if (chunkDYN65P3T_cjs.trimExtName(pathToBuildFrom).endsWith("index")) {
1288
+ if (chunkZD6YJ7FU_cjs.trimExtName(pathToBuildFrom).endsWith("index")) {
1289
1289
  logger?.emit("warning", "Output has the same fileName as the barrelFiles, please disable barrel generation");
1290
1290
  return [];
1291
1291
  }
@@ -1311,10 +1311,10 @@ var FileManager = class {
1311
1311
  });
1312
1312
  }
1313
1313
  async write(...params) {
1314
- return chunkDYN65P3T_cjs.write(...params);
1314
+ return chunkZD6YJ7FU_cjs.write(...params);
1315
1315
  }
1316
1316
  async read(...params) {
1317
- return chunkDYN65P3T_cjs.read(...params);
1317
+ return chunkZD6YJ7FU_cjs.read(...params);
1318
1318
  }
1319
1319
  // statics
1320
1320
  static getMode(path2) {
@@ -1344,12 +1344,12 @@ function combineSources(sources) {
1344
1344
  return remeda.uniqueBy(sources, (obj) => [obj.name, obj.isExportable, obj.isTypeOnly]);
1345
1345
  }
1346
1346
  function combineExports(exports) {
1347
- return chunkZZEKLURQ_cjs.orderBy(exports, [
1347
+ return chunkPMVWFTDC_cjs.orderBy(exports, [
1348
1348
  (v) => !!Array.isArray(v.name),
1349
1349
  (v) => !v.isTypeOnly,
1350
1350
  (v) => v.path,
1351
1351
  (v) => !!v.name,
1352
- (v) => Array.isArray(v.name) ? chunkZZEKLURQ_cjs.orderBy(v.name) : v.name
1352
+ (v) => Array.isArray(v.name) ? chunkPMVWFTDC_cjs.orderBy(v.name) : v.name
1353
1353
  ]).reduce(
1354
1354
  (prev, curr) => {
1355
1355
  const name = curr.name;
@@ -1383,12 +1383,12 @@ function combineExports(exports) {
1383
1383
  );
1384
1384
  }
1385
1385
  function combineImports(imports, exports, source) {
1386
- return chunkZZEKLURQ_cjs.orderBy(imports, [
1386
+ return chunkPMVWFTDC_cjs.orderBy(imports, [
1387
1387
  (v) => !!Array.isArray(v.name),
1388
1388
  (v) => !v.isTypeOnly,
1389
1389
  (v) => v.path,
1390
1390
  (v) => !!v.name,
1391
- (v) => Array.isArray(v.name) ? chunkZZEKLURQ_cjs.orderBy(v.name) : v.name
1391
+ (v) => Array.isArray(v.name) ? chunkPMVWFTDC_cjs.orderBy(v.name) : v.name
1392
1392
  ]).reduce(
1393
1393
  (prev, curr) => {
1394
1394
  let name = Array.isArray(curr.name) ? [...new Set(curr.name)] : curr.name;
@@ -1439,10 +1439,10 @@ function combineImports(imports, exports, source) {
1439
1439
  }
1440
1440
  var queue = new PQueue({ concurrency: 100 });
1441
1441
  async function processFiles({ dryRun, root, extension, logger, files }) {
1442
- const orderedFiles = chunkZZEKLURQ_cjs.orderBy(files, [
1442
+ const orderedFiles = chunkPMVWFTDC_cjs.orderBy(files, [
1443
1443
  (v) => v?.meta && "pluginKey" in v.meta && !v.meta.pluginKey,
1444
1444
  (v) => v.path.length,
1445
- (v) => chunkDYN65P3T_cjs.trimExtName(v.path).endsWith("index")
1445
+ (v) => chunkZD6YJ7FU_cjs.trimExtName(v.path).endsWith("index")
1446
1446
  ]);
1447
1447
  logger?.emit("debug", {
1448
1448
  date: /* @__PURE__ */ new Date(),
@@ -1457,7 +1457,7 @@ async function processFiles({ dryRun, root, extension, logger, files }) {
1457
1457
  const message = file ? `Writing ${path.relative(root, file.path)}` : "";
1458
1458
  const extname2 = extension?.[file.extname] || void 0;
1459
1459
  const source = await getSource(file, { logger, extname: extname2 });
1460
- await chunkDYN65P3T_cjs.write(file.path, source, { sanity: false });
1460
+ await chunkZD6YJ7FU_cjs.write(file.path, source, { sanity: false });
1461
1461
  logger?.emit("progressed", { id: "files", message });
1462
1462
  });
1463
1463
  });
@@ -1549,7 +1549,7 @@ var typeScriptParser = createFileParser({
1549
1549
  const module = await import('@kubb/parser-ts');
1550
1550
  const source = file.sources.map((item) => item.value).join("\n\n");
1551
1551
  const importNodes = file.imports.map((item) => {
1552
- const importPath = item.root ? chunkDYN65P3T_cjs.getRelativePath(item.root, item.path) : item.path;
1552
+ const importPath = item.root ? chunkZD6YJ7FU_cjs.getRelativePath(item.root, item.path) : item.path;
1553
1553
  const hasExtname = !!path__default.default.extname(importPath);
1554
1554
  return module.factory.createImportDeclaration({
1555
1555
  name: item.name,
@@ -1627,5 +1627,5 @@ exports.processFiles = processFiles;
1627
1627
  exports.renderTemplate = renderTemplate;
1628
1628
  exports.setUniqueName = setUniqueName;
1629
1629
  exports.timeout = timeout;
1630
- //# sourceMappingURL=chunk-XQBFZPHC.cjs.map
1631
- //# sourceMappingURL=chunk-XQBFZPHC.cjs.map
1630
+ //# sourceMappingURL=chunk-GZVOHBZS.cjs.map
1631
+ //# sourceMappingURL=chunk-GZVOHBZS.cjs.map