@kubb/core 3.4.3 → 3.4.5

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.
Files changed (32) hide show
  1. package/dist/{chunk-A5REIQVX.cjs → chunk-4SHSEMU2.cjs} +35 -35
  2. package/dist/{chunk-A5REIQVX.cjs.map → chunk-4SHSEMU2.cjs.map} +1 -1
  3. package/dist/{chunk-MDXPT7LL.js → chunk-GTR42WIS.js} +7 -21
  4. package/dist/chunk-GTR42WIS.js.map +1 -0
  5. package/dist/{chunk-6ZGRP6P7.cjs → chunk-HPTZVWK5.cjs} +99 -132
  6. package/dist/chunk-HPTZVWK5.cjs.map +1 -0
  7. package/dist/{chunk-IZ2EOWIL.cjs → chunk-LVELAYV4.cjs} +4 -4
  8. package/dist/{chunk-IZ2EOWIL.cjs.map → chunk-LVELAYV4.cjs.map} +1 -1
  9. package/dist/{chunk-4ZMRID7I.cjs → chunk-OQSYTQLS.cjs} +10 -10
  10. package/dist/{chunk-4ZMRID7I.cjs.map → chunk-OQSYTQLS.cjs.map} +1 -1
  11. package/dist/{chunk-P4ATJPSP.cjs → chunk-S3IJRQEO.cjs} +8 -8
  12. package/dist/{chunk-P4ATJPSP.cjs.map → chunk-S3IJRQEO.cjs.map} +1 -1
  13. package/dist/{chunk-7MZNPFPN.js → chunk-SX3K2Q5X.js} +3 -3
  14. package/dist/{chunk-7MZNPFPN.js.map → chunk-SX3K2Q5X.js.map} +1 -1
  15. package/dist/index.cjs +35 -35
  16. package/dist/index.js +3 -3
  17. package/dist/logger.cjs +7 -7
  18. package/dist/mocks.cjs +9 -9
  19. package/dist/mocks.js +2 -2
  20. package/dist/{prompt-ZJNX5QEM.cjs → prompt-CV2GMUO3.cjs} +61 -61
  21. package/dist/{prompt-ZJNX5QEM.cjs.map → prompt-CV2GMUO3.cjs.map} +1 -1
  22. package/dist/transformers.cjs +22 -26
  23. package/dist/transformers.d.cts +1 -3
  24. package/dist/transformers.d.ts +1 -3
  25. package/dist/transformers.js +1 -1
  26. package/dist/utils.cjs +17 -17
  27. package/dist/utils.js +2 -2
  28. package/package.json +8 -8
  29. package/src/transformers/casing.ts +3 -18
  30. package/src/transformers/index.ts +2 -3
  31. package/dist/chunk-6ZGRP6P7.cjs.map +0 -1
  32. package/dist/chunk-MDXPT7LL.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk6ZGRP6P7_cjs = require('./chunk-6ZGRP6P7.cjs');
4
- var chunkIZ2EOWIL_cjs = require('./chunk-IZ2EOWIL.cjs');
3
+ var chunkHPTZVWK5_cjs = require('./chunk-HPTZVWK5.cjs');
4
+ var chunkLVELAYV4_cjs = require('./chunk-LVELAYV4.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 = chunkIZ2EOWIL_cjs.__commonJS({
16
+ var require_eventemitter3 = chunkLVELAYV4_cjs.__commonJS({
17
17
  "../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js"(exports, module) {
18
- chunkIZ2EOWIL_cjs.init_cjs_shims();
18
+ chunkLVELAYV4_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 = chunkIZ2EOWIL_cjs.__commonJS({
175
175
  });
176
176
 
177
177
  // src/utils/index.ts
178
- chunkIZ2EOWIL_cjs.init_cjs_shims();
178
+ chunkLVELAYV4_cjs.init_cjs_shims();
179
179
 
180
180
  // src/utils/FunctionParams.ts
181
- chunkIZ2EOWIL_cjs.init_cjs_shims();
181
+ chunkLVELAYV4_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 chunk6ZGRP6P7_cjs.orderBy(
202
+ return chunkHPTZVWK5_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 : chunk6ZGRP6P7_cjs.camelCase(name);
230
+ const parameterName = name.startsWith("{") ? name : chunkHPTZVWK5_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
- chunkIZ2EOWIL_cjs.init_cjs_shims();
285
+ chunkLVELAYV4_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
- chunkIZ2EOWIL_cjs.init_cjs_shims();
297
+ chunkLVELAYV4_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
- chunkIZ2EOWIL_cjs.init_cjs_shims();
322
+ chunkLVELAYV4_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
- chunkIZ2EOWIL_cjs.init_cjs_shims();
332
+ chunkLVELAYV4_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
- chunkIZ2EOWIL_cjs.init_cjs_shims();
353
+ chunkLVELAYV4_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 = chunk6ZGRP6P7_cjs.isValidVarName(pathWithoutBrackets) ? pathWithoutBrackets : chunk6ZGRP6P7_cjs.camelCase(pathWithoutBrackets);
424
+ let param = chunkHPTZVWK5_cjs.isValidVarName(pathWithoutBrackets) ? pathWithoutBrackets : chunkHPTZVWK5_cjs.camelCase(pathWithoutBrackets);
425
425
  if (this.#options.casing === "camelcase") {
426
- param = chunk6ZGRP6P7_cjs.camelCase(param);
426
+ param = chunkHPTZVWK5_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 = chunk6ZGRP6P7_cjs.isValidVarName(item) ? item : chunk6ZGRP6P7_cjs.camelCase(item);
442
+ let param = chunkHPTZVWK5_cjs.isValidVarName(item) ? item : chunkHPTZVWK5_cjs.camelCase(item);
443
443
  if (this.#options.casing === "camelcase") {
444
- param = chunk6ZGRP6P7_cjs.camelCase(param);
444
+ param = chunkHPTZVWK5_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
- chunkIZ2EOWIL_cjs.init_cjs_shims();
461
+ chunkLVELAYV4_cjs.init_cjs_shims();
462
462
 
463
463
  // src/FileManager.ts
464
- chunkIZ2EOWIL_cjs.init_cjs_shims();
464
+ chunkLVELAYV4_cjs.init_cjs_shims();
465
465
 
466
466
  // src/BarrelManager.ts
467
- chunkIZ2EOWIL_cjs.init_cjs_shims();
467
+ chunkLVELAYV4_cjs.init_cjs_shims();
468
468
 
469
469
  // src/utils/TreeNode.ts
470
- chunkIZ2EOWIL_cjs.init_cjs_shims();
470
+ chunkLVELAYV4_cjs.init_cjs_shims();
471
471
  var TreeNode = class _TreeNode {
472
472
  data;
473
473
  parent;
@@ -715,14 +715,14 @@ File: ${JSON.stringify(item.data.file, void 0, 2)}`
715
715
  };
716
716
 
717
717
  // ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/index.js
718
- chunkIZ2EOWIL_cjs.init_cjs_shims();
718
+ chunkLVELAYV4_cjs.init_cjs_shims();
719
719
 
720
720
  // ../../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.mjs
721
- chunkIZ2EOWIL_cjs.init_cjs_shims();
722
- var import_index = chunkIZ2EOWIL_cjs.__toESM(require_eventemitter3(), 1);
721
+ chunkLVELAYV4_cjs.init_cjs_shims();
722
+ var import_index = chunkLVELAYV4_cjs.__toESM(require_eventemitter3(), 1);
723
723
 
724
724
  // ../../node_modules/.pnpm/p-timeout@6.1.3/node_modules/p-timeout/index.js
725
- chunkIZ2EOWIL_cjs.init_cjs_shims();
725
+ chunkLVELAYV4_cjs.init_cjs_shims();
726
726
  var TimeoutError = class extends Error {
727
727
  constructor(message) {
728
728
  super(message);
@@ -811,10 +811,10 @@ function pTimeout(promise, options) {
811
811
  }
812
812
 
813
813
  // ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/priority-queue.js
814
- chunkIZ2EOWIL_cjs.init_cjs_shims();
814
+ chunkLVELAYV4_cjs.init_cjs_shims();
815
815
 
816
816
  // ../../node_modules/.pnpm/p-queue@8.0.1/node_modules/p-queue/dist/lower-bound.js
817
- chunkIZ2EOWIL_cjs.init_cjs_shims();
817
+ chunkLVELAYV4_cjs.init_cjs_shims();
818
818
  function lowerBound(array, value, comparator) {
819
819
  let first = 0;
820
820
  let count = array.length;
@@ -1165,7 +1165,7 @@ var FileManager = class {
1165
1165
  return [...this.#filesByPath.values()];
1166
1166
  }
1167
1167
  get orderedFiles() {
1168
- return chunk6ZGRP6P7_cjs.orderBy(
1168
+ return chunkHPTZVWK5_cjs.orderBy(
1169
1169
  [...this.#filesByPath.values()],
1170
1170
  [
1171
1171
  (v) => v?.meta && "pluginKey" in v.meta && !v.meta.pluginKey,
@@ -1306,12 +1306,12 @@ function combineSources(sources) {
1306
1306
  );
1307
1307
  }
1308
1308
  function combineExports(exports) {
1309
- return chunk6ZGRP6P7_cjs.orderBy(exports, [
1309
+ return chunkHPTZVWK5_cjs.orderBy(exports, [
1310
1310
  (v) => !!Array.isArray(v.name),
1311
1311
  (v) => !v.isTypeOnly,
1312
1312
  (v) => v.path,
1313
1313
  (v) => !!v.name,
1314
- (v) => Array.isArray(v.name) ? chunk6ZGRP6P7_cjs.orderBy(v.name) : v.name
1314
+ (v) => Array.isArray(v.name) ? chunkHPTZVWK5_cjs.orderBy(v.name) : v.name
1315
1315
  ]).reduce(
1316
1316
  (prev, curr) => {
1317
1317
  const name = curr.name;
@@ -1345,12 +1345,12 @@ function combineExports(exports) {
1345
1345
  );
1346
1346
  }
1347
1347
  function combineImports(imports, exports, source) {
1348
- return chunk6ZGRP6P7_cjs.orderBy(imports, [
1348
+ return chunkHPTZVWK5_cjs.orderBy(imports, [
1349
1349
  (v) => !!Array.isArray(v.name),
1350
1350
  (v) => !v.isTypeOnly,
1351
1351
  (v) => v.path,
1352
1352
  (v) => !!v.name,
1353
- (v) => Array.isArray(v.name) ? chunk6ZGRP6P7_cjs.orderBy(v.name) : v.name
1353
+ (v) => Array.isArray(v.name) ? chunkHPTZVWK5_cjs.orderBy(v.name) : v.name
1354
1354
  ]).reduce(
1355
1355
  (prev, curr) => {
1356
1356
  let name = Array.isArray(curr.name) ? [...new Set(curr.name)] : curr.name;
@@ -1401,7 +1401,7 @@ function combineImports(imports, exports, source) {
1401
1401
  }
1402
1402
  var queue = new PQueue({ concurrency: 100 });
1403
1403
  async function processFiles({ dryRun, root, extension, logger, files }) {
1404
- const orderedFiles = chunk6ZGRP6P7_cjs.orderBy(files, [
1404
+ const orderedFiles = chunkHPTZVWK5_cjs.orderBy(files, [
1405
1405
  (v) => v?.meta && "pluginKey" in v.meta && !v.meta.pluginKey,
1406
1406
  (v) => v.path.length,
1407
1407
  (v) => fs.trimExtName(v.path).endsWith("index")
@@ -1552,5 +1552,5 @@ exports.processFiles = processFiles;
1552
1552
  exports.renderTemplate = renderTemplate;
1553
1553
  exports.setUniqueName = setUniqueName;
1554
1554
  exports.timeout = timeout;
1555
- //# sourceMappingURL=chunk-A5REIQVX.cjs.map
1556
- //# sourceMappingURL=chunk-A5REIQVX.cjs.map
1555
+ //# sourceMappingURL=chunk-4SHSEMU2.cjs.map
1556
+ //# sourceMappingURL=chunk-4SHSEMU2.cjs.map