@kubb/core 3.10.8 → 3.10.10

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.4.0_@microsoft+api-extractor@7.52.7_@types+node@20.17.45__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.4.0_@microsoft+api-extractor@7.52.7_@types+node@20.17.46__jiti@2.4.2_postcss@8.5.3_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.4.0_@microsoft+api-extractor@7.52.7_@types+node@20.17.45__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.4.0_@microsoft+api-extractor@7.52.7_@types+node@20.17.46__jiti@2.4.2_postcss@8.5.3_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-GGXWIE3Q.cjs.map
42
- //# sourceMappingURL=chunk-GGXWIE3Q.cjs.map
41
+ //# sourceMappingURL=chunk-5ENRRZRW.cjs.map
42
+ //# sourceMappingURL=chunk-5ENRRZRW.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.7_@types+node@20.17.45__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,sLAAA,GAAA;AAAA;AAAA,CAAA","file":"chunk-GGXWIE3Q.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.4.0_@microsoft+api-extractor@7.52.7_@types+node@20.17.46__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,sLAAA,GAAA;AAAA;AAAA,CAAA","file":"chunk-5ENRRZRW.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 chunkXFTBW3ZJ_cjs = require('./chunk-XFTBW3ZJ.cjs');
4
- var chunk56YJEKS3_cjs = require('./chunk-56YJEKS3.cjs');
5
- var chunkGGXWIE3Q_cjs = require('./chunk-GGXWIE3Q.cjs');
3
+ var chunkJ2EWMA56_cjs = require('./chunk-J2EWMA56.cjs');
4
+ var chunkXMAFJGOG_cjs = require('./chunk-XMAFJGOG.cjs');
5
+ var chunk5ENRRZRW_cjs = require('./chunk-5ENRRZRW.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 = chunkGGXWIE3Q_cjs.__commonJS({
16
+ var require_eventemitter3 = chunk5ENRRZRW_cjs.__commonJS({
17
17
  "../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js"(exports, module) {
18
- chunkGGXWIE3Q_cjs.init_cjs_shims();
18
+ chunk5ENRRZRW_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 = chunkGGXWIE3Q_cjs.__commonJS({
175
175
  });
176
176
 
177
177
  // src/utils/index.ts
178
- chunkGGXWIE3Q_cjs.init_cjs_shims();
178
+ chunk5ENRRZRW_cjs.init_cjs_shims();
179
179
 
180
180
  // src/utils/FunctionParams.ts
181
- chunkGGXWIE3Q_cjs.init_cjs_shims();
181
+ chunk5ENRRZRW_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 chunkXFTBW3ZJ_cjs.orderBy(
202
+ return chunkJ2EWMA56_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 : chunkXFTBW3ZJ_cjs.camelCase(name);
230
+ const parameterName = name.startsWith("{") ? name : chunkJ2EWMA56_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
- chunkGGXWIE3Q_cjs.init_cjs_shims();
285
+ chunk5ENRRZRW_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
- chunkGGXWIE3Q_cjs.init_cjs_shims();
297
+ chunk5ENRRZRW_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
- chunkGGXWIE3Q_cjs.init_cjs_shims();
322
+ chunk5ENRRZRW_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
- chunkGGXWIE3Q_cjs.init_cjs_shims();
332
+ chunk5ENRRZRW_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
- chunkGGXWIE3Q_cjs.init_cjs_shims();
353
+ chunk5ENRRZRW_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 = chunkXFTBW3ZJ_cjs.isValidVarName(pathWithoutBrackets) ? pathWithoutBrackets : chunkXFTBW3ZJ_cjs.camelCase(pathWithoutBrackets);
424
+ let param = chunkJ2EWMA56_cjs.isValidVarName(pathWithoutBrackets) ? pathWithoutBrackets : chunkJ2EWMA56_cjs.camelCase(pathWithoutBrackets);
425
425
  if (this.#options.casing === "camelcase") {
426
- param = chunkXFTBW3ZJ_cjs.camelCase(param);
426
+ param = chunkJ2EWMA56_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 = chunkXFTBW3ZJ_cjs.isValidVarName(item) ? item : chunkXFTBW3ZJ_cjs.camelCase(item);
442
+ let param = chunkJ2EWMA56_cjs.isValidVarName(item) ? item : chunkJ2EWMA56_cjs.camelCase(item);
443
443
  if (this.#options.casing === "camelcase") {
444
- param = chunkXFTBW3ZJ_cjs.camelCase(param);
444
+ param = chunkJ2EWMA56_cjs.camelCase(param);
445
445
  }
446
446
  const key = replacer ? replacer(param) : param;
447
447
  params[key] = key;
@@ -458,16 +458,16 @@ var URLPath = class {
458
458
  };
459
459
 
460
460
  // src/utils/parser.ts
461
- chunkGGXWIE3Q_cjs.init_cjs_shims();
461
+ chunk5ENRRZRW_cjs.init_cjs_shims();
462
462
 
463
463
  // src/FileManager.ts
464
- chunkGGXWIE3Q_cjs.init_cjs_shims();
464
+ chunk5ENRRZRW_cjs.init_cjs_shims();
465
465
 
466
466
  // src/BarrelManager.ts
467
- chunkGGXWIE3Q_cjs.init_cjs_shims();
467
+ chunk5ENRRZRW_cjs.init_cjs_shims();
468
468
 
469
469
  // src/utils/TreeNode.ts
470
- chunkGGXWIE3Q_cjs.init_cjs_shims();
470
+ chunk5ENRRZRW_cjs.init_cjs_shims();
471
471
  var TreeNode = class _TreeNode {
472
472
  data;
473
473
  parent;
@@ -673,7 +673,7 @@ File: ${JSON.stringify(item.data.file, void 0, 2)}`
673
673
  if (isSubExport) {
674
674
  barrelFile.exports.push({
675
675
  name: [source.name],
676
- path: chunk56YJEKS3_cjs.getRelativePath(treeNode.parent?.data.path, item.data.path),
676
+ path: chunkXMAFJGOG_cjs.getRelativePath(treeNode.parent?.data.path, item.data.path),
677
677
  isTypeOnly: source.isTypeOnly
678
678
  });
679
679
  } else {
@@ -696,13 +696,13 @@ File: ${JSON.stringify(item.data.file, void 0, 2)}`
696
696
  logger?.emit("debug", {
697
697
  date: /* @__PURE__ */ new Date(),
698
698
  logs: [
699
- `Generating barrelFile '${chunk56YJEKS3_cjs.getRelativePath(root, barrelFile.path)}' for '${chunk56YJEKS3_cjs.getRelativePath(root, treeNode.data?.path)}' with ${barrelFile.sources.length} indexable exports: '${barrelFile.sources?.map((source) => source.name).join(", ")}'`
699
+ `Generating barrelFile '${chunkXMAFJGOG_cjs.getRelativePath(root, barrelFile.path)}' for '${chunkXMAFJGOG_cjs.getRelativePath(root, treeNode.data?.path)}' with ${barrelFile.sources.length} indexable exports: '${barrelFile.sources?.map((source) => source.name).join(", ")}'`
700
700
  ]
701
701
  });
702
702
  logger?.emit("debug", {
703
703
  date: /* @__PURE__ */ new Date(),
704
704
  logs: [
705
- `Generated barrelFile '${chunk56YJEKS3_cjs.getRelativePath(root, barrelFile.path)}' for '${chunk56YJEKS3_cjs.getRelativePath(root, treeNode.data?.path)}' with exports: '${cachedFiles.get(barrelFile.path)?.sources?.map((source) => source.name).join(", ")}'`
705
+ `Generated barrelFile '${chunkXMAFJGOG_cjs.getRelativePath(root, barrelFile.path)}' for '${chunkXMAFJGOG_cjs.getRelativePath(root, treeNode.data?.path)}' with exports: '${cachedFiles.get(barrelFile.path)?.sources?.map((source) => source.name).join(", ")}'`
706
706
  ]
707
707
  });
708
708
  if (previousBarrelFile) {
@@ -717,14 +717,14 @@ File: ${JSON.stringify(item.data.file, void 0, 2)}`
717
717
  };
718
718
 
719
719
  // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/index.js
720
- chunkGGXWIE3Q_cjs.init_cjs_shims();
720
+ chunk5ENRRZRW_cjs.init_cjs_shims();
721
721
 
722
722
  // ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
723
- chunkGGXWIE3Q_cjs.init_cjs_shims();
724
- var import_index = chunkGGXWIE3Q_cjs.__toESM(require_eventemitter3(), 1);
723
+ chunk5ENRRZRW_cjs.init_cjs_shims();
724
+ var import_index = chunk5ENRRZRW_cjs.__toESM(require_eventemitter3(), 1);
725
725
 
726
726
  // ../../node_modules/.pnpm/p-timeout@6.1.3/node_modules/p-timeout/index.js
727
- chunkGGXWIE3Q_cjs.init_cjs_shims();
727
+ chunk5ENRRZRW_cjs.init_cjs_shims();
728
728
  var TimeoutError = class extends Error {
729
729
  constructor(message) {
730
730
  super(message);
@@ -813,10 +813,10 @@ function pTimeout(promise, options) {
813
813
  }
814
814
 
815
815
  // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/priority-queue.js
816
- chunkGGXWIE3Q_cjs.init_cjs_shims();
816
+ chunk5ENRRZRW_cjs.init_cjs_shims();
817
817
 
818
818
  // ../../node_modules/.pnpm/p-queue@8.1.0/node_modules/p-queue/dist/lower-bound.js
819
- chunkGGXWIE3Q_cjs.init_cjs_shims();
819
+ chunk5ENRRZRW_cjs.init_cjs_shims();
820
820
  function lowerBound(array, value, comparator) {
821
821
  let first = 0;
822
822
  let count = array.length;
@@ -1218,13 +1218,13 @@ var FileManager = class {
1218
1218
  return [...this.#filesByPath.values()];
1219
1219
  }
1220
1220
  get orderedFiles() {
1221
- return chunkXFTBW3ZJ_cjs.orderBy(
1221
+ return chunkJ2EWMA56_cjs.orderBy(
1222
1222
  [...this.#filesByPath.values()],
1223
1223
  [
1224
1224
  (v) => v?.meta && "pluginKey" in v.meta && !v.meta.pluginKey,
1225
1225
  (v) => v.path.length,
1226
- (v) => chunk56YJEKS3_cjs.trimExtName(v.path).endsWith("index"),
1227
- (v) => chunk56YJEKS3_cjs.trimExtName(v.baseName),
1226
+ (v) => chunkXMAFJGOG_cjs.trimExtName(v.path).endsWith("index"),
1227
+ (v) => chunkXMAFJGOG_cjs.trimExtName(v.baseName),
1228
1228
  (v) => v.path.split(".").pop()
1229
1229
  ]
1230
1230
  );
@@ -1283,7 +1283,7 @@ var FileManager = class {
1283
1283
  }
1284
1284
  const barrelManager = new BarrelManager({ logger });
1285
1285
  const pathToBuildFrom = path.join(root, output.path);
1286
- if (chunk56YJEKS3_cjs.trimExtName(pathToBuildFrom).endsWith("index")) {
1286
+ if (chunkXMAFJGOG_cjs.trimExtName(pathToBuildFrom).endsWith("index")) {
1287
1287
  logger?.emit("warning", "Output has the same fileName as the barrelFiles, please disable barrel generation");
1288
1288
  return [];
1289
1289
  }
@@ -1309,10 +1309,10 @@ var FileManager = class {
1309
1309
  });
1310
1310
  }
1311
1311
  async write(...params) {
1312
- return chunk56YJEKS3_cjs.write(...params);
1312
+ return chunkXMAFJGOG_cjs.write(...params);
1313
1313
  }
1314
1314
  async read(...params) {
1315
- return chunk56YJEKS3_cjs.read(...params);
1315
+ return chunkXMAFJGOG_cjs.read(...params);
1316
1316
  }
1317
1317
  // statics
1318
1318
  static getMode(path2) {
@@ -1359,12 +1359,12 @@ function combineSources(sources) {
1359
1359
  );
1360
1360
  }
1361
1361
  function combineExports(exports) {
1362
- return chunkXFTBW3ZJ_cjs.orderBy(exports, [
1362
+ return chunkJ2EWMA56_cjs.orderBy(exports, [
1363
1363
  (v) => !!Array.isArray(v.name),
1364
1364
  (v) => !v.isTypeOnly,
1365
1365
  (v) => v.path,
1366
1366
  (v) => !!v.name,
1367
- (v) => Array.isArray(v.name) ? chunkXFTBW3ZJ_cjs.orderBy(v.name) : v.name
1367
+ (v) => Array.isArray(v.name) ? chunkJ2EWMA56_cjs.orderBy(v.name) : v.name
1368
1368
  ]).reduce(
1369
1369
  (prev, curr) => {
1370
1370
  const name = curr.name;
@@ -1398,12 +1398,12 @@ function combineExports(exports) {
1398
1398
  );
1399
1399
  }
1400
1400
  function combineImports(imports, exports, source) {
1401
- return chunkXFTBW3ZJ_cjs.orderBy(imports, [
1401
+ return chunkJ2EWMA56_cjs.orderBy(imports, [
1402
1402
  (v) => !!Array.isArray(v.name),
1403
1403
  (v) => !v.isTypeOnly,
1404
1404
  (v) => v.path,
1405
1405
  (v) => !!v.name,
1406
- (v) => Array.isArray(v.name) ? chunkXFTBW3ZJ_cjs.orderBy(v.name) : v.name
1406
+ (v) => Array.isArray(v.name) ? chunkJ2EWMA56_cjs.orderBy(v.name) : v.name
1407
1407
  ]).reduce(
1408
1408
  (prev, curr) => {
1409
1409
  let name = Array.isArray(curr.name) ? [...new Set(curr.name)] : curr.name;
@@ -1454,10 +1454,10 @@ function combineImports(imports, exports, source) {
1454
1454
  }
1455
1455
  var queue = new PQueue({ concurrency: 100 });
1456
1456
  async function processFiles({ dryRun, root, extension, logger, files }) {
1457
- const orderedFiles = chunkXFTBW3ZJ_cjs.orderBy(files, [
1457
+ const orderedFiles = chunkJ2EWMA56_cjs.orderBy(files, [
1458
1458
  (v) => v?.meta && "pluginKey" in v.meta && !v.meta.pluginKey,
1459
1459
  (v) => v.path.length,
1460
- (v) => chunk56YJEKS3_cjs.trimExtName(v.path).endsWith("index")
1460
+ (v) => chunkXMAFJGOG_cjs.trimExtName(v.path).endsWith("index")
1461
1461
  ]);
1462
1462
  logger?.emit("debug", {
1463
1463
  date: /* @__PURE__ */ new Date(),
@@ -1472,7 +1472,7 @@ async function processFiles({ dryRun, root, extension, logger, files }) {
1472
1472
  const message = file ? `Writing ${path.relative(root, file.path)}` : "";
1473
1473
  const extname2 = extension?.[file.extname] || void 0;
1474
1474
  const source = await getSource(file, { logger, extname: extname2 });
1475
- await chunk56YJEKS3_cjs.write(file.path, source, { sanity: false });
1475
+ await chunkXMAFJGOG_cjs.write(file.path, source, { sanity: false });
1476
1476
  logger?.emit("progressed", { id: "files", message });
1477
1477
  });
1478
1478
  });
@@ -1564,7 +1564,7 @@ var typeScriptParser = createFileParser({
1564
1564
  const module = await import('@kubb/parser-ts');
1565
1565
  const source = file.sources.map((item) => item.value).join("\n\n");
1566
1566
  const importNodes = file.imports.map((item) => {
1567
- const importPath = item.root ? chunk56YJEKS3_cjs.getRelativePath(item.root, item.path) : item.path;
1567
+ const importPath = item.root ? chunkXMAFJGOG_cjs.getRelativePath(item.root, item.path) : item.path;
1568
1568
  const hasExtname = !!path__default.default.extname(importPath);
1569
1569
  return module.factory.createImportDeclaration({
1570
1570
  name: item.name,
@@ -1642,5 +1642,5 @@ exports.processFiles = processFiles;
1642
1642
  exports.renderTemplate = renderTemplate;
1643
1643
  exports.setUniqueName = setUniqueName;
1644
1644
  exports.timeout = timeout;
1645
- //# sourceMappingURL=chunk-4FC3UQ2A.cjs.map
1646
- //# sourceMappingURL=chunk-4FC3UQ2A.cjs.map
1645
+ //# sourceMappingURL=chunk-CMNPGTBE.cjs.map
1646
+ //# sourceMappingURL=chunk-CMNPGTBE.cjs.map