@kubb/core 3.10.4 → 3.10.6

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/index.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkD4NGI64F_cjs = require('./chunk-D4NGI64F.cjs');
6
- var chunkN3G5TXGT_cjs = require('./chunk-N3G5TXGT.cjs');
7
- var chunk4GHP6QDR_cjs = require('./chunk-4GHP6QDR.cjs');
8
- var chunkKR2ERR2D_cjs = require('./chunk-KR2ERR2D.cjs');
5
+ var chunkFO6OOIML_cjs = require('./chunk-FO6OOIML.cjs');
6
+ var chunkPEVYXGYF_cjs = require('./chunk-PEVYXGYF.cjs');
7
+ var chunk5UFNQWFW_cjs = require('./chunk-5UFNQWFW.cjs');
8
+ var chunkNGF5XEJP_cjs = require('./chunk-NGF5XEJP.cjs');
9
9
  var fs = require('@kubb/fs');
10
10
  var path3 = require('path');
11
11
  var mod = require('module');
@@ -24,19 +24,19 @@ var process2__default = /*#__PURE__*/_interopDefault(process2);
24
24
  var fs__default = /*#__PURE__*/_interopDefault(fs$1);
25
25
 
26
26
  // src/index.ts
27
- chunkKR2ERR2D_cjs.init_cjs_shims();
27
+ chunkNGF5XEJP_cjs.init_cjs_shims();
28
28
 
29
29
  // src/build.ts
30
- chunkKR2ERR2D_cjs.init_cjs_shims();
30
+ chunkNGF5XEJP_cjs.init_cjs_shims();
31
31
 
32
32
  // src/PluginManager.ts
33
- chunkKR2ERR2D_cjs.init_cjs_shims();
33
+ chunkNGF5XEJP_cjs.init_cjs_shims();
34
34
 
35
35
  // src/PromiseManager.ts
36
- chunkKR2ERR2D_cjs.init_cjs_shims();
36
+ chunkNGF5XEJP_cjs.init_cjs_shims();
37
37
 
38
38
  // src/utils/executeStrategies.ts
39
- chunkKR2ERR2D_cjs.init_cjs_shims();
39
+ chunkNGF5XEJP_cjs.init_cjs_shims();
40
40
  function hookSeq(promises) {
41
41
  return promises.filter(Boolean).reduce(
42
42
  (promise, func) => {
@@ -97,12 +97,12 @@ function isPromiseRejectedResult(result) {
97
97
  }
98
98
 
99
99
  // src/errors.ts
100
- chunkKR2ERR2D_cjs.init_cjs_shims();
100
+ chunkNGF5XEJP_cjs.init_cjs_shims();
101
101
  var ValidationPluginError = class extends Error {
102
102
  };
103
103
 
104
104
  // src/plugin.ts
105
- chunkKR2ERR2D_cjs.init_cjs_shims();
105
+ chunkNGF5XEJP_cjs.init_cjs_shims();
106
106
  function createPlugin(factory) {
107
107
  return (options = {}) => {
108
108
  return factory(options);
@@ -153,7 +153,7 @@ var pluginCore = createPlugin((options) => {
153
153
  var PluginManager = class {
154
154
  plugins = /* @__PURE__ */ new Set();
155
155
  fileManager;
156
- events = new chunkD4NGI64F_cjs.EventEmitter();
156
+ events = new chunkFO6OOIML_cjs.EventEmitter();
157
157
  config;
158
158
  executed = [];
159
159
  logger;
@@ -165,7 +165,7 @@ var PluginManager = class {
165
165
  this.config = config;
166
166
  this.options = options;
167
167
  this.logger = options.logger;
168
- this.fileManager = new chunkN3G5TXGT_cjs.FileManager();
168
+ this.fileManager = new chunkPEVYXGYF_cjs.FileManager();
169
169
  this.#promiseManager = new PromiseManager({
170
170
  nullCheck: (state) => !!state?.result
171
171
  });
@@ -235,7 +235,7 @@ Falling back on the first item.
235
235
  const names = this.hookForPluginSync({
236
236
  pluginKey: params.pluginKey,
237
237
  hookName: "resolveName",
238
- parameters: [chunk4GHP6QDR_cjs.trim(params.name), params.type],
238
+ parameters: [chunk5UFNQWFW_cjs.trim(params.name), params.type],
239
239
  message: `Resolving name '${params.name}' and type '${params.type}'`
240
240
  });
241
241
  if (names && names?.length > 1) {
@@ -251,14 +251,14 @@ Falling back on the first item.
251
251
  ]
252
252
  });
253
253
  }
254
- return chunk4GHP6QDR_cjs.transformReservedWord(names?.at(0) || params.name);
254
+ return chunk5UFNQWFW_cjs.transformReservedWord(names?.at(0) || params.name);
255
255
  }
256
256
  const name = this.hookFirstSync({
257
257
  hookName: "resolveName",
258
- parameters: [chunk4GHP6QDR_cjs.trim(params.name), params.type],
258
+ parameters: [chunk5UFNQWFW_cjs.trim(params.name), params.type],
259
259
  message: `Resolving name '${params.name}' and type '${params.type}'`
260
260
  }).result;
261
- return chunk4GHP6QDR_cjs.transformReservedWord(name);
261
+ return chunk5UFNQWFW_cjs.transformReservedWord(name);
262
262
  };
263
263
  /**
264
264
  * Instead of calling `pluginManager.events.on` you can use `pluginManager.on`. This one also has better types.
@@ -596,7 +596,7 @@ Falling back on the first item.
596
596
  }
597
597
  #parse(plugin, pluginManager, context) {
598
598
  const usedPluginNames = pluginManager.#usedPluginNames;
599
- chunkN3G5TXGT_cjs.setUniqueName(plugin.name, usedPluginNames);
599
+ chunkPEVYXGYF_cjs.setUniqueName(plugin.name, usedPluginNames);
600
600
  const key = [plugin.name, usedPluginNames[plugin.name]].filter(Boolean);
601
601
  if (plugin.context && typeof plugin.context === "function") {
602
602
  return {
@@ -631,7 +631,7 @@ Falling back on the first item.
631
631
  };
632
632
 
633
633
  // src/config.ts
634
- chunkKR2ERR2D_cjs.init_cjs_shims();
634
+ chunkNGF5XEJP_cjs.init_cjs_shims();
635
635
  function defineConfig(options) {
636
636
  return options;
637
637
  }
@@ -642,9 +642,9 @@ async function setup(options) {
642
642
  if (options.pluginManager) {
643
643
  return options.pluginManager;
644
644
  }
645
- const { config: userConfig, logger = chunkD4NGI64F_cjs.createLogger() } = options;
645
+ const { config: userConfig, logger = chunkFO6OOIML_cjs.createLogger() } = options;
646
646
  try {
647
- if (isInputPath(userConfig) && !new chunkN3G5TXGT_cjs.URLPath(userConfig.input.path).isURL) {
647
+ if (isInputPath(userConfig) && !new chunkPEVYXGYF_cjs.URLPath(userConfig.input.path).isURL) {
648
648
  await fs.read(userConfig.input.path);
649
649
  }
650
650
  } catch (e) {
@@ -740,7 +740,7 @@ async function safeBuild(options) {
740
740
  if (config.output.barrelType) {
741
741
  await pluginManager.fileManager.add(rootFile);
742
742
  }
743
- files = await chunkN3G5TXGT_cjs.processFiles({
743
+ files = await chunkPEVYXGYF_cjs.processFiles({
744
744
  root: config.root,
745
745
  extension: config.output.extension,
746
746
  dryRun: !config.output.write,
@@ -763,7 +763,7 @@ async function safeBuild(options) {
763
763
  }
764
764
 
765
765
  // src/BaseGenerator.ts
766
- chunkKR2ERR2D_cjs.init_cjs_shims();
766
+ chunkNGF5XEJP_cjs.init_cjs_shims();
767
767
  var BaseGenerator = class {
768
768
  #options = {};
769
769
  #context = {};
@@ -788,22 +788,22 @@ var BaseGenerator = class {
788
788
  };
789
789
 
790
790
  // src/PackageManager.ts
791
- chunkKR2ERR2D_cjs.init_cjs_shims();
791
+ chunkNGF5XEJP_cjs.init_cjs_shims();
792
792
 
793
793
  // ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
794
- chunkKR2ERR2D_cjs.init_cjs_shims();
794
+ chunkNGF5XEJP_cjs.init_cjs_shims();
795
795
 
796
796
  // ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
797
- chunkKR2ERR2D_cjs.init_cjs_shims();
797
+ chunkNGF5XEJP_cjs.init_cjs_shims();
798
798
 
799
799
  // ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
800
- chunkKR2ERR2D_cjs.init_cjs_shims();
800
+ chunkNGF5XEJP_cjs.init_cjs_shims();
801
801
 
802
802
  // ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
803
- chunkKR2ERR2D_cjs.init_cjs_shims();
803
+ chunkNGF5XEJP_cjs.init_cjs_shims();
804
804
 
805
805
  // ../../node_modules/.pnpm/yocto-queue@1.1.1/node_modules/yocto-queue/index.js
806
- chunkKR2ERR2D_cjs.init_cjs_shims();
806
+ chunkNGF5XEJP_cjs.init_cjs_shims();
807
807
  var Node = class {
808
808
  value;
809
809
  next;
@@ -1001,13 +1001,13 @@ function locatePathSync(paths, {
1001
1001
  }
1002
1002
 
1003
1003
  // ../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js
1004
- chunkKR2ERR2D_cjs.init_cjs_shims();
1004
+ chunkNGF5XEJP_cjs.init_cjs_shims();
1005
1005
  function toPath2(urlOrPath) {
1006
1006
  return urlOrPath instanceof URL ? url.fileURLToPath(urlOrPath) : urlOrPath;
1007
1007
  }
1008
1008
 
1009
1009
  // ../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js
1010
- chunkKR2ERR2D_cjs.init_cjs_shims();
1010
+ chunkNGF5XEJP_cjs.init_cjs_shims();
1011
1011
 
1012
1012
  // ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
1013
1013
  var findUpStop = Symbol("findUpStop");
@@ -1212,19 +1212,19 @@ var PackageManager = class _PackageManager {
1212
1212
 
1213
1213
  Object.defineProperty(exports, "FileManager", {
1214
1214
  enumerable: true,
1215
- get: function () { return chunkN3G5TXGT_cjs.FileManager; }
1215
+ get: function () { return chunkPEVYXGYF_cjs.FileManager; }
1216
1216
  });
1217
1217
  Object.defineProperty(exports, "getDefaultBanner", {
1218
1218
  enumerable: true,
1219
- get: function () { return chunkN3G5TXGT_cjs.getDefaultBanner; }
1219
+ get: function () { return chunkPEVYXGYF_cjs.getDefaultBanner; }
1220
1220
  });
1221
1221
  Object.defineProperty(exports, "getSource", {
1222
1222
  enumerable: true,
1223
- get: function () { return chunkN3G5TXGT_cjs.getSource; }
1223
+ get: function () { return chunkPEVYXGYF_cjs.getSource; }
1224
1224
  });
1225
1225
  Object.defineProperty(exports, "processFiles", {
1226
1226
  enumerable: true,
1227
- get: function () { return chunkN3G5TXGT_cjs.processFiles; }
1227
+ get: function () { return chunkPEVYXGYF_cjs.processFiles; }
1228
1228
  });
1229
1229
  exports.BaseGenerator = BaseGenerator;
1230
1230
  exports.PackageManager = PackageManager;
package/dist/logger.cjs CHANGED
@@ -1,25 +1,25 @@
1
1
  'use strict';
2
2
 
3
- var chunkD4NGI64F_cjs = require('./chunk-D4NGI64F.cjs');
4
- require('./chunk-KR2ERR2D.cjs');
3
+ var chunkFO6OOIML_cjs = require('./chunk-FO6OOIML.cjs');
4
+ require('./chunk-NGF5XEJP.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "LogMapper", {
9
9
  enumerable: true,
10
- get: function () { return chunkD4NGI64F_cjs.LogMapper; }
10
+ get: function () { return chunkFO6OOIML_cjs.LogMapper; }
11
11
  });
12
12
  Object.defineProperty(exports, "createLogger", {
13
13
  enumerable: true,
14
- get: function () { return chunkD4NGI64F_cjs.createLogger; }
14
+ get: function () { return chunkFO6OOIML_cjs.createLogger; }
15
15
  });
16
16
  Object.defineProperty(exports, "randomCliColour", {
17
17
  enumerable: true,
18
- get: function () { return chunkD4NGI64F_cjs.randomCliColour; }
18
+ get: function () { return chunkFO6OOIML_cjs.randomCliColour; }
19
19
  });
20
20
  Object.defineProperty(exports, "randomColour", {
21
21
  enumerable: true,
22
- get: function () { return chunkD4NGI64F_cjs.randomColour; }
22
+ get: function () { return chunkFO6OOIML_cjs.randomColour; }
23
23
  });
24
24
  //# sourceMappingURL=logger.cjs.map
25
25
  //# sourceMappingURL=logger.cjs.map
package/dist/mocks.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkN3G5TXGT_cjs = require('./chunk-N3G5TXGT.cjs');
4
- var chunk4GHP6QDR_cjs = require('./chunk-4GHP6QDR.cjs');
5
- var chunkKR2ERR2D_cjs = require('./chunk-KR2ERR2D.cjs');
3
+ var chunkPEVYXGYF_cjs = require('./chunk-PEVYXGYF.cjs');
4
+ var chunk5UFNQWFW_cjs = require('./chunk-5UFNQWFW.cjs');
5
+ var chunkNGF5XEJP_cjs = require('./chunk-NGF5XEJP.cjs');
6
6
  var path = require('path');
7
7
 
8
8
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -10,7 +10,7 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
10
10
  var path__default = /*#__PURE__*/_interopDefault(path);
11
11
 
12
12
  // mocks/index.ts
13
- chunkKR2ERR2D_cjs.init_cjs_shims();
13
+ chunkNGF5XEJP_cjs.init_cjs_shims();
14
14
  var mockedLogger = {
15
15
  emit(_type, _message) {
16
16
  },
@@ -21,15 +21,15 @@ var mockedLogger = {
21
21
  var createMockedPluginManager = (name) => ({
22
22
  resolveName: (result) => {
23
23
  if (result.type === "file") {
24
- return chunk4GHP6QDR_cjs.camelCase(name || result.name);
24
+ return chunk5UFNQWFW_cjs.camelCase(name || result.name);
25
25
  }
26
26
  if (result.type === "type") {
27
- return chunk4GHP6QDR_cjs.pascalCase(result.name);
27
+ return chunk5UFNQWFW_cjs.pascalCase(result.name);
28
28
  }
29
29
  if (result.type === "function") {
30
- return chunk4GHP6QDR_cjs.camelCase(result.name);
30
+ return chunk5UFNQWFW_cjs.camelCase(result.name);
31
31
  }
32
- return chunk4GHP6QDR_cjs.camelCase(result.name);
32
+ return chunk5UFNQWFW_cjs.camelCase(result.name);
33
33
  },
34
34
  config: {
35
35
  output: {
@@ -65,7 +65,7 @@ async function matchFiles(files) {
65
65
  return void 0;
66
66
  }
67
67
  for await (const file of files) {
68
- const source = await chunkN3G5TXGT_cjs.getSource(chunkN3G5TXGT_cjs.createFile(file), { logger: mockedLogger });
68
+ const source = await chunkPEVYXGYF_cjs.getSource(chunkPEVYXGYF_cjs.createFile(file), { logger: mockedLogger });
69
69
  await expect(source).toMatchFileSnapshot(path__default.default.join("__snapshots__", file.path));
70
70
  }
71
71
  }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkKR2ERR2D_cjs = require('./chunk-KR2ERR2D.cjs');
3
+ var chunkNGF5XEJP_cjs = require('./chunk-NGF5XEJP.cjs');
4
4
  require('util');
5
5
  var g = require('process');
6
6
  var f = require('readline');
@@ -12,7 +12,7 @@ var g__default = /*#__PURE__*/_interopDefault(g);
12
12
  var f__default = /*#__PURE__*/_interopDefault(f);
13
13
 
14
14
  // ../../node_modules/.pnpm/consola@3.4.2/node_modules/consola/dist/chunks/prompt.mjs
15
- chunkKR2ERR2D_cjs.init_cjs_shims();
15
+ chunkNGF5XEJP_cjs.init_cjs_shims();
16
16
  function getDefaultExportFromCjs(x2) {
17
17
  return x2 && x2.__esModule && Object.prototype.hasOwnProperty.call(x2, "default") ? x2["default"] : x2;
18
18
  }
@@ -759,5 +759,5 @@ async function prompt(message, opts = {}) {
759
759
 
760
760
  exports.kCancel = kCancel;
761
761
  exports.prompt = prompt;
762
- //# sourceMappingURL=prompt-ARHCAH4I.cjs.map
763
- //# sourceMappingURL=prompt-ARHCAH4I.cjs.map
762
+ //# sourceMappingURL=prompt-5L3BUBG6.cjs.map
763
+ //# sourceMappingURL=prompt-5L3BUBG6.cjs.map