@kubb/core 2.1.6 → 2.2.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.
Files changed (55) hide show
  1. package/dist/{chunk-DU6UHGVD.cjs → chunk-2UXXYHS6.cjs} +5 -5
  2. package/dist/{chunk-NWXLHLH3.js → chunk-37XMXECQ.js} +3 -3
  3. package/dist/chunk-5SUBV3F7.cjs +15 -0
  4. package/dist/{chunk-IZOYUU2C.cjs → chunk-CZFLDKR5.cjs} +6 -6
  5. package/dist/{chunk-WHFBT7CJ.cjs → chunk-DM53DOLW.cjs} +90 -90
  6. package/dist/{chunk-QDYI7RBT.js → chunk-ETA3LCRB.js} +3 -3
  7. package/dist/{chunk-QDYI7RBT.js.map → chunk-ETA3LCRB.js.map} +1 -1
  8. package/dist/{chunk-Q4BVTLXG.js → chunk-GKW5TTFV.js} +2 -2
  9. package/dist/{chunk-D42WMZZ7.js → chunk-HI4PB2AG.js} +7 -7
  10. package/dist/{chunk-HGRAENXJ.js → chunk-IQBEGX4Z.js} +2 -2
  11. package/dist/{chunk-DQ3TMDDK.cjs → chunk-JSJ3NRBQ.cjs} +7 -7
  12. package/dist/{chunk-CDC7AOGD.cjs → chunk-KAA3L7N6.cjs} +3 -3
  13. package/dist/{chunk-CDC7AOGD.cjs.map → chunk-KAA3L7N6.cjs.map} +1 -1
  14. package/dist/{chunk-65JU7D5L.cjs → chunk-KXP7HD6Z.cjs} +3 -3
  15. package/dist/{chunk-OCZMQ7SF.js → chunk-MASAFU3G.js} +2 -2
  16. package/dist/{chunk-DAZBGE47.js → chunk-MYC5HIA5.js} +2 -2
  17. package/dist/{chunk-BOAROBF4.cjs → chunk-OI2AOR2F.cjs} +28 -19
  18. package/dist/chunk-OI2AOR2F.cjs.map +1 -0
  19. package/dist/{chunk-6TTDLGHW.cjs → chunk-OYDUQYAK.cjs} +220 -220
  20. package/dist/{chunk-34RQN4Y6.js → chunk-V6AVJEQC.js} +3 -3
  21. package/dist/{chunk-PTGWQCIU.cjs → chunk-XX56SVPB.cjs} +5 -5
  22. package/dist/{chunk-SR5FEIHD.js → chunk-YUTCMBUY.js} +2 -2
  23. package/dist/{chunk-XHS5C5AW.js → chunk-YW33IVCC.js} +2 -2
  24. package/dist/fs.cjs +10 -10
  25. package/dist/fs.js +4 -4
  26. package/dist/index.cjs +102 -102
  27. package/dist/index.js +11 -11
  28. package/dist/logger.cjs +7 -7
  29. package/dist/logger.js +3 -3
  30. package/dist/mocks.cjs +10 -10
  31. package/dist/mocks.js +8 -8
  32. package/dist/transformers.cjs +21 -21
  33. package/dist/transformers.js +5 -5
  34. package/dist/utils.cjs +13 -13
  35. package/dist/utils.js +4 -4
  36. package/package.json +5 -5
  37. package/dist/chunk-BOAROBF4.cjs.map +0 -1
  38. package/dist/chunk-BYGMREPJ.cjs +0 -15
  39. /package/dist/{chunk-DU6UHGVD.cjs.map → chunk-2UXXYHS6.cjs.map} +0 -0
  40. /package/dist/{chunk-IZOYUU2C.cjs.map → chunk-37XMXECQ.js.map} +0 -0
  41. /package/dist/{chunk-BYGMREPJ.cjs.map → chunk-5SUBV3F7.cjs.map} +0 -0
  42. /package/dist/{chunk-NWXLHLH3.js.map → chunk-CZFLDKR5.cjs.map} +0 -0
  43. /package/dist/{chunk-WHFBT7CJ.cjs.map → chunk-DM53DOLW.cjs.map} +0 -0
  44. /package/dist/{chunk-Q4BVTLXG.js.map → chunk-GKW5TTFV.js.map} +0 -0
  45. /package/dist/{chunk-D42WMZZ7.js.map → chunk-HI4PB2AG.js.map} +0 -0
  46. /package/dist/{chunk-HGRAENXJ.js.map → chunk-IQBEGX4Z.js.map} +0 -0
  47. /package/dist/{chunk-34RQN4Y6.js.map → chunk-JSJ3NRBQ.cjs.map} +0 -0
  48. /package/dist/{chunk-65JU7D5L.cjs.map → chunk-KXP7HD6Z.cjs.map} +0 -0
  49. /package/dist/{chunk-OCZMQ7SF.js.map → chunk-MASAFU3G.js.map} +0 -0
  50. /package/dist/{chunk-DAZBGE47.js.map → chunk-MYC5HIA5.js.map} +0 -0
  51. /package/dist/{chunk-6TTDLGHW.cjs.map → chunk-OYDUQYAK.cjs.map} +0 -0
  52. /package/dist/{chunk-DQ3TMDDK.cjs.map → chunk-V6AVJEQC.js.map} +0 -0
  53. /package/dist/{chunk-PTGWQCIU.cjs.map → chunk-XX56SVPB.cjs.map} +0 -0
  54. /package/dist/{chunk-SR5FEIHD.js.map → chunk-YUTCMBUY.js.map} +0 -0
  55. /package/dist/{chunk-XHS5C5AW.js.map → chunk-YW33IVCC.js.map} +0 -0
@@ -1,5 +1,5 @@
1
- import { writeLog } from './chunk-DAZBGE47.js';
2
- import { init_esm_shims } from './chunk-QDYI7RBT.js';
1
+ import { writeLog } from './chunk-MYC5HIA5.js';
2
+ import { init_esm_shims } from './chunk-ETA3LCRB.js';
3
3
  import seedrandom from 'seedrandom';
4
4
  import { isatty } from 'tty';
5
5
 
@@ -149,4 +149,4 @@ function randomCliColour(text, colors = defaultColours) {
149
149
 
150
150
  export { LogLevel, createLogger, p2 as p, randomCliColour, randomColour };
151
151
  //# sourceMappingURL=out.js.map
152
- //# sourceMappingURL=chunk-34RQN4Y6.js.map
152
+ //# sourceMappingURL=chunk-V6AVJEQC.js.map
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkWHFBT7CJ_cjs = require('./chunk-WHFBT7CJ.cjs');
4
- var chunkCDC7AOGD_cjs = require('./chunk-CDC7AOGD.cjs');
3
+ var chunkDM53DOLW_cjs = require('./chunk-DM53DOLW.cjs');
4
+ var chunkKAA3L7N6_cjs = require('./chunk-KAA3L7N6.cjs');
5
5
  var path = require('path');
6
6
  var jsRuntime = require('js-runtime');
7
7
 
8
8
  // src/fs/read.ts
9
- chunkCDC7AOGD_cjs.init_cjs_shims();
10
- var import_fs_extra = chunkCDC7AOGD_cjs.__toESM(chunkWHFBT7CJ_cjs.require_lib(), 1);
9
+ chunkKAA3L7N6_cjs.init_cjs_shims();
10
+ var import_fs_extra = chunkKAA3L7N6_cjs.__toESM(chunkDM53DOLW_cjs.require_lib(), 1);
11
11
  function slash(path, platform = "linux") {
12
12
  const isWindowsPath = /^\\\\\?\\/.test(path);
13
13
  if (["linux", "mac"].includes(platform) && !isWindowsPath) {
@@ -60,4 +60,4 @@ exports.getRelativePath = getRelativePath;
60
60
  exports.read = read;
61
61
  exports.readSync = readSync;
62
62
  //# sourceMappingURL=out.js.map
63
- //# sourceMappingURL=chunk-PTGWQCIU.cjs.map
63
+ //# sourceMappingURL=chunk-XX56SVPB.cjs.map
@@ -1,4 +1,4 @@
1
- import { init_esm_shims } from './chunk-QDYI7RBT.js';
1
+ import { init_esm_shims } from './chunk-ETA3LCRB.js';
2
2
  import { relative, basename, extname } from 'path';
3
3
  import fs from 'fs-extra';
4
4
  import { switcher } from 'js-runtime';
@@ -55,4 +55,4 @@ function readSync(path) {
55
55
 
56
56
  export { getRelativePath, read, readSync };
57
57
  //# sourceMappingURL=out.js.map
58
- //# sourceMappingURL=chunk-SR5FEIHD.js.map
58
+ //# sourceMappingURL=chunk-YUTCMBUY.js.map
@@ -1,4 +1,4 @@
1
- import { init_esm_shims } from './chunk-QDYI7RBT.js';
1
+ import { init_esm_shims } from './chunk-ETA3LCRB.js';
2
2
 
3
3
  // src/utils/uniqueName.ts
4
4
  init_esm_shims();
@@ -23,4 +23,4 @@ function setUniqueName(originalName, data) {
23
23
 
24
24
  export { getUniqueName, setUniqueName };
25
25
  //# sourceMappingURL=out.js.map
26
- //# sourceMappingURL=chunk-XHS5C5AW.js.map
26
+ //# sourceMappingURL=chunk-YW33IVCC.js.map
package/dist/fs.cjs CHANGED
@@ -1,32 +1,32 @@
1
1
  'use strict';
2
2
 
3
- var chunkBYGMREPJ_cjs = require('./chunk-BYGMREPJ.cjs');
4
- var chunkPTGWQCIU_cjs = require('./chunk-PTGWQCIU.cjs');
5
- var chunkWHFBT7CJ_cjs = require('./chunk-WHFBT7CJ.cjs');
6
- var chunkCDC7AOGD_cjs = require('./chunk-CDC7AOGD.cjs');
3
+ var chunk5SUBV3F7_cjs = require('./chunk-5SUBV3F7.cjs');
4
+ var chunkXX56SVPB_cjs = require('./chunk-XX56SVPB.cjs');
5
+ var chunkDM53DOLW_cjs = require('./chunk-DM53DOLW.cjs');
6
+ var chunkKAA3L7N6_cjs = require('./chunk-KAA3L7N6.cjs');
7
7
 
8
8
  // src/fs/index.ts
9
- chunkCDC7AOGD_cjs.init_cjs_shims();
9
+ chunkKAA3L7N6_cjs.init_cjs_shims();
10
10
 
11
11
  Object.defineProperty(exports, "clean", {
12
12
  enumerable: true,
13
- get: function () { return chunkBYGMREPJ_cjs.clean; }
13
+ get: function () { return chunk5SUBV3F7_cjs.clean; }
14
14
  });
15
15
  Object.defineProperty(exports, "getRelativePath", {
16
16
  enumerable: true,
17
- get: function () { return chunkPTGWQCIU_cjs.getRelativePath; }
17
+ get: function () { return chunkXX56SVPB_cjs.getRelativePath; }
18
18
  });
19
19
  Object.defineProperty(exports, "read", {
20
20
  enumerable: true,
21
- get: function () { return chunkPTGWQCIU_cjs.read; }
21
+ get: function () { return chunkXX56SVPB_cjs.read; }
22
22
  });
23
23
  Object.defineProperty(exports, "readSync", {
24
24
  enumerable: true,
25
- get: function () { return chunkPTGWQCIU_cjs.readSync; }
25
+ get: function () { return chunkXX56SVPB_cjs.readSync; }
26
26
  });
27
27
  Object.defineProperty(exports, "write", {
28
28
  enumerable: true,
29
- get: function () { return chunkWHFBT7CJ_cjs.write; }
29
+ get: function () { return chunkDM53DOLW_cjs.write; }
30
30
  });
31
31
  //# sourceMappingURL=out.js.map
32
32
  //# sourceMappingURL=fs.cjs.map
package/dist/fs.js CHANGED
@@ -1,7 +1,7 @@
1
- export { clean } from './chunk-HGRAENXJ.js';
2
- export { getRelativePath, read, readSync } from './chunk-SR5FEIHD.js';
3
- export { write } from './chunk-DAZBGE47.js';
4
- import { init_esm_shims } from './chunk-QDYI7RBT.js';
1
+ export { clean } from './chunk-IQBEGX4Z.js';
2
+ export { getRelativePath, read, readSync } from './chunk-YUTCMBUY.js';
3
+ export { write } from './chunk-MYC5HIA5.js';
4
+ import { init_esm_shims } from './chunk-ETA3LCRB.js';
5
5
 
6
6
  // src/fs/index.ts
7
7
  init_esm_shims();
package/dist/index.cjs CHANGED
@@ -2,16 +2,16 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkIZOYUU2C_cjs = require('./chunk-IZOYUU2C.cjs');
6
- var chunkBYGMREPJ_cjs = require('./chunk-BYGMREPJ.cjs');
7
- var chunk6TTDLGHW_cjs = require('./chunk-6TTDLGHW.cjs');
8
- require('./chunk-DU6UHGVD.cjs');
9
- require('./chunk-65JU7D5L.cjs');
10
- require('./chunk-BOAROBF4.cjs');
11
- var chunkDQ3TMDDK_cjs = require('./chunk-DQ3TMDDK.cjs');
12
- var chunkPTGWQCIU_cjs = require('./chunk-PTGWQCIU.cjs');
13
- require('./chunk-WHFBT7CJ.cjs');
14
- var chunkCDC7AOGD_cjs = require('./chunk-CDC7AOGD.cjs');
5
+ var chunkCZFLDKR5_cjs = require('./chunk-CZFLDKR5.cjs');
6
+ var chunk5SUBV3F7_cjs = require('./chunk-5SUBV3F7.cjs');
7
+ var chunkOYDUQYAK_cjs = require('./chunk-OYDUQYAK.cjs');
8
+ require('./chunk-2UXXYHS6.cjs');
9
+ require('./chunk-KXP7HD6Z.cjs');
10
+ require('./chunk-OI2AOR2F.cjs');
11
+ var chunkJSJ3NRBQ_cjs = require('./chunk-JSJ3NRBQ.cjs');
12
+ var chunkXX56SVPB_cjs = require('./chunk-XX56SVPB.cjs');
13
+ require('./chunk-DM53DOLW.cjs');
14
+ var chunkKAA3L7N6_cjs = require('./chunk-KAA3L7N6.cjs');
15
15
  var mod = require('module');
16
16
  var os = require('os');
17
17
  var url = require('url');
@@ -29,13 +29,13 @@ var process__default = /*#__PURE__*/_interopDefault(process);
29
29
  var fs__default = /*#__PURE__*/_interopDefault(fs);
30
30
 
31
31
  // src/index.ts
32
- chunkCDC7AOGD_cjs.init_cjs_shims();
32
+ chunkKAA3L7N6_cjs.init_cjs_shims();
33
33
 
34
34
  // src/build.ts
35
- chunkCDC7AOGD_cjs.init_cjs_shims();
35
+ chunkKAA3L7N6_cjs.init_cjs_shims();
36
36
 
37
37
  // src/config.ts
38
- chunkCDC7AOGD_cjs.init_cjs_shims();
38
+ chunkKAA3L7N6_cjs.init_cjs_shims();
39
39
  function defineConfig(options) {
40
40
  return options;
41
41
  }
@@ -48,16 +48,16 @@ async function transformReducer(_previousCode, result, _plugin) {
48
48
  return result;
49
49
  }
50
50
  async function setup(options) {
51
- const { config, logger = chunkDQ3TMDDK_cjs.createLogger({ logLevel: chunkDQ3TMDDK_cjs.LogLevel.silent }) } = options;
51
+ const { config, logger = chunkJSJ3NRBQ_cjs.createLogger({ logLevel: chunkJSJ3NRBQ_cjs.LogLevel.silent }) } = options;
52
52
  let count = 0;
53
53
  try {
54
- if (isInputPath(config) && !new chunkIZOYUU2C_cjs.URLPath(config.input.path).isURL) {
55
- await chunkPTGWQCIU_cjs.read(config.input.path);
54
+ if (isInputPath(config) && !new chunkCZFLDKR5_cjs.URLPath(config.input.path).isURL) {
55
+ await chunkXX56SVPB_cjs.read(config.input.path);
56
56
  }
57
57
  } catch (e) {
58
58
  if (isInputPath(config)) {
59
59
  throw new Error(
60
- "Cannot read file/URL defined in `input.path` or set with `kubb generate PATH` in the CLI of your Kubb config " + chunkDQ3TMDDK_cjs.p.dim(config.input.path),
60
+ "Cannot read file/URL defined in `input.path` or set with `kubb generate PATH` in the CLI of your Kubb config " + chunkJSJ3NRBQ_cjs.p.dim(config.input.path),
61
61
  {
62
62
  cause: e
63
63
  }
@@ -65,19 +65,19 @@ async function setup(options) {
65
65
  }
66
66
  }
67
67
  if (config.output.clean) {
68
- await chunkBYGMREPJ_cjs.clean(config.output.path);
68
+ await chunk5SUBV3F7_cjs.clean(config.output.path);
69
69
  }
70
70
  const task = async (file) => {
71
71
  const { path: path3 } = file;
72
- let source = chunk6TTDLGHW_cjs.FileManager.getSource(file);
72
+ let source = chunkOYDUQYAK_cjs.FileManager.getSource(file);
73
73
  const { result: loadedResult } = await pluginManager.hookFirst({
74
74
  hookName: "load",
75
75
  parameters: [path3]
76
76
  });
77
- if (loadedResult && chunk6TTDLGHW_cjs.isPromise(loadedResult)) {
77
+ if (loadedResult && chunkOYDUQYAK_cjs.isPromise(loadedResult)) {
78
78
  source = await loadedResult;
79
79
  }
80
- if (loadedResult && !chunk6TTDLGHW_cjs.isPromise(loadedResult)) {
80
+ if (loadedResult && !chunkOYDUQYAK_cjs.isPromise(loadedResult)) {
81
81
  source = loadedResult;
82
82
  }
83
83
  if (source) {
@@ -105,13 +105,13 @@ async function setup(options) {
105
105
  source: source || ""
106
106
  };
107
107
  };
108
- const pluginManager = new chunk6TTDLGHW_cjs.PluginManager(config, { logger, task });
108
+ const pluginManager = new chunkOYDUQYAK_cjs.PluginManager(config, { logger, task });
109
109
  pluginManager.on("execute", (executer) => {
110
110
  const { hookName, parameters, plugin } = executer;
111
111
  if (hookName === "writeFile" && logger.spinner) {
112
112
  const [code] = parameters;
113
- if (logger.logLevel === chunkDQ3TMDDK_cjs.LogLevel.debug) {
114
- logger.debug(`PluginKey ${chunkDQ3TMDDK_cjs.p.dim(JSON.stringify(plugin.key))}
113
+ if (logger.logLevel === chunkJSJ3NRBQ_cjs.LogLevel.debug) {
114
+ logger.debug(`PluginKey ${chunkJSJ3NRBQ_cjs.p.dim(JSON.stringify(plugin.key))}
115
115
  with source
116
116
 
117
117
  ${code}`);
@@ -119,7 +119,7 @@ ${code}`);
119
119
  }
120
120
  });
121
121
  pluginManager.queue.on("add", () => {
122
- if (logger.logLevel !== chunkDQ3TMDDK_cjs.LogLevel.info) {
122
+ if (logger.logLevel !== chunkJSJ3NRBQ_cjs.LogLevel.info) {
123
123
  return;
124
124
  }
125
125
  if (logger.spinner && count === 0) {
@@ -127,32 +127,32 @@ ${code}`);
127
127
  }
128
128
  });
129
129
  pluginManager.queue.on("active", () => {
130
- if (logger.logLevel !== chunkDQ3TMDDK_cjs.LogLevel.info) {
130
+ if (logger.logLevel !== chunkJSJ3NRBQ_cjs.LogLevel.info) {
131
131
  return;
132
132
  }
133
133
  if (logger.spinner && pluginManager.queue.size > 0) {
134
134
  const text = `Item: ${count} Size: ${pluginManager.queue.size} Pending: ${pluginManager.queue.pending}`;
135
- logger.spinner.suffixText = chunkDQ3TMDDK_cjs.p.dim(text);
135
+ logger.spinner.suffixText = chunkJSJ3NRBQ_cjs.p.dim(text);
136
136
  }
137
137
  ++count;
138
138
  });
139
139
  pluginManager.queue.on("completed", () => {
140
- if (logger.logLevel !== chunkDQ3TMDDK_cjs.LogLevel.info) {
140
+ if (logger.logLevel !== chunkJSJ3NRBQ_cjs.LogLevel.info) {
141
141
  return;
142
142
  }
143
143
  if (logger.spinner) {
144
144
  const text = `Item: ${count} Size: ${pluginManager.queue.size} Pending: ${pluginManager.queue.pending}`;
145
- logger.spinner.suffixText = chunkDQ3TMDDK_cjs.p.dim(text);
145
+ logger.spinner.suffixText = chunkJSJ3NRBQ_cjs.p.dim(text);
146
146
  }
147
147
  });
148
148
  pluginManager.on("executed", (executer) => {
149
149
  const { hookName, plugin, output, parameters } = executer;
150
- if (logger.logLevel === chunkDQ3TMDDK_cjs.LogLevel.debug) {
150
+ if (logger.logLevel === chunkJSJ3NRBQ_cjs.LogLevel.debug) {
151
151
  const logs = [
152
- `${chunkDQ3TMDDK_cjs.randomCliColour(plugin.name)} Executing ${hookName}`,
153
- parameters && `${chunkDQ3TMDDK_cjs.p.bgWhite(`Parameters`)} ${chunkDQ3TMDDK_cjs.randomCliColour(plugin.name)} ${hookName}`,
152
+ `${chunkJSJ3NRBQ_cjs.randomCliColour(plugin.name)} Executing ${hookName}`,
153
+ parameters && `${chunkJSJ3NRBQ_cjs.p.bgWhite(`Parameters`)} ${chunkJSJ3NRBQ_cjs.randomCliColour(plugin.name)} ${hookName}`,
154
154
  JSON.stringify(parameters, void 0, 2),
155
- output && `${chunkDQ3TMDDK_cjs.p.bgWhite("Output")} ${chunkDQ3TMDDK_cjs.randomCliColour(plugin.name)} ${hookName}`,
155
+ output && `${chunkJSJ3NRBQ_cjs.p.bgWhite("Output")} ${chunkJSJ3NRBQ_cjs.randomCliColour(plugin.name)} ${hookName}`,
156
156
  output
157
157
  ].filter(Boolean);
158
158
  logger.debug(logs.join("\n"));
@@ -168,11 +168,11 @@ async function build(options) {
168
168
  parameters: [options.config]
169
169
  });
170
170
  await pluginManager.hookParallel({ hookName: "buildEnd" });
171
- if (logger.logLevel === chunkDQ3TMDDK_cjs.LogLevel.info && logger.spinner) {
171
+ if (logger.logLevel === chunkJSJ3NRBQ_cjs.LogLevel.info && logger.spinner) {
172
172
  logger.spinner.suffixText = "";
173
173
  logger.spinner.succeed(`\u{1F4BE} Writing completed`);
174
174
  }
175
- return { files: fileManager.files.map((file) => ({ ...file, source: chunk6TTDLGHW_cjs.FileManager.getSource(file) })), pluginManager };
175
+ return { files: fileManager.files.map((file) => ({ ...file, source: chunkOYDUQYAK_cjs.FileManager.getSource(file) })), pluginManager };
176
176
  }
177
177
  async function safeBuild(options) {
178
178
  const pluginManager = await setup(options);
@@ -183,106 +183,106 @@ async function safeBuild(options) {
183
183
  parameters: [options.config]
184
184
  });
185
185
  await pluginManager.hookParallel({ hookName: "buildEnd" });
186
- if (logger.logLevel === chunkDQ3TMDDK_cjs.LogLevel.info && logger.spinner) {
186
+ if (logger.logLevel === chunkJSJ3NRBQ_cjs.LogLevel.info && logger.spinner) {
187
187
  logger.spinner.suffixText = "";
188
188
  logger.spinner.succeed(`\u{1F4BE} Writing completed`);
189
189
  }
190
190
  } catch (e) {
191
- return { files: fileManager.files.map((file) => ({ ...file, source: chunk6TTDLGHW_cjs.FileManager.getSource(file) })), pluginManager, error: e };
191
+ return { files: fileManager.files.map((file) => ({ ...file, source: chunkOYDUQYAK_cjs.FileManager.getSource(file) })), pluginManager, error: e };
192
192
  }
193
- return { files: fileManager.files.map((file) => ({ ...file, source: chunk6TTDLGHW_cjs.FileManager.getSource(file) })), pluginManager };
193
+ return { files: fileManager.files.map((file) => ({ ...file, source: chunkOYDUQYAK_cjs.FileManager.getSource(file) })), pluginManager };
194
194
  }
195
195
 
196
196
  // src/Generator.ts
197
- chunkCDC7AOGD_cjs.init_cjs_shims();
197
+ chunkKAA3L7N6_cjs.init_cjs_shims();
198
198
  var _options, _context;
199
199
  var Generator = class {
200
200
  constructor(options, context) {
201
- chunkCDC7AOGD_cjs.__privateAdd(this, _options, {});
202
- chunkCDC7AOGD_cjs.__privateAdd(this, _context, {});
201
+ chunkKAA3L7N6_cjs.__privateAdd(this, _options, {});
202
+ chunkKAA3L7N6_cjs.__privateAdd(this, _context, {});
203
203
  if (context) {
204
- chunkCDC7AOGD_cjs.__privateSet(this, _context, context);
204
+ chunkKAA3L7N6_cjs.__privateSet(this, _context, context);
205
205
  }
206
206
  if (options) {
207
- chunkCDC7AOGD_cjs.__privateSet(this, _options, options);
207
+ chunkKAA3L7N6_cjs.__privateSet(this, _options, options);
208
208
  }
209
209
  return this;
210
210
  }
211
211
  get options() {
212
- return chunkCDC7AOGD_cjs.__privateGet(this, _options);
212
+ return chunkKAA3L7N6_cjs.__privateGet(this, _options);
213
213
  }
214
214
  get context() {
215
- return chunkCDC7AOGD_cjs.__privateGet(this, _context);
215
+ return chunkKAA3L7N6_cjs.__privateGet(this, _context);
216
216
  }
217
217
  set options(options) {
218
- chunkCDC7AOGD_cjs.__privateSet(this, _options, { ...chunkCDC7AOGD_cjs.__privateGet(this, _options), ...options });
218
+ chunkKAA3L7N6_cjs.__privateSet(this, _options, { ...chunkKAA3L7N6_cjs.__privateGet(this, _options), ...options });
219
219
  }
220
220
  };
221
221
  _options = new WeakMap();
222
222
  _context = new WeakMap();
223
223
 
224
224
  // src/PackageManager.ts
225
- chunkCDC7AOGD_cjs.init_cjs_shims();
225
+ chunkKAA3L7N6_cjs.init_cjs_shims();
226
226
 
227
227
  // ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
228
- chunkCDC7AOGD_cjs.init_cjs_shims();
228
+ chunkKAA3L7N6_cjs.init_cjs_shims();
229
229
 
230
230
  // ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
231
- chunkCDC7AOGD_cjs.init_cjs_shims();
231
+ chunkKAA3L7N6_cjs.init_cjs_shims();
232
232
 
233
233
  // ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
234
- chunkCDC7AOGD_cjs.init_cjs_shims();
234
+ chunkKAA3L7N6_cjs.init_cjs_shims();
235
235
 
236
236
  // ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
237
- chunkCDC7AOGD_cjs.init_cjs_shims();
237
+ chunkKAA3L7N6_cjs.init_cjs_shims();
238
238
 
239
239
  // ../../node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
240
- chunkCDC7AOGD_cjs.init_cjs_shims();
240
+ chunkKAA3L7N6_cjs.init_cjs_shims();
241
241
  var Node = class {
242
242
  constructor(value) {
243
- chunkCDC7AOGD_cjs.__publicField(this, "value");
244
- chunkCDC7AOGD_cjs.__publicField(this, "next");
243
+ chunkKAA3L7N6_cjs.__publicField(this, "value");
244
+ chunkKAA3L7N6_cjs.__publicField(this, "next");
245
245
  this.value = value;
246
246
  }
247
247
  };
248
248
  var _head, _tail, _size;
249
249
  var Queue = class {
250
250
  constructor() {
251
- chunkCDC7AOGD_cjs.__privateAdd(this, _head, void 0);
252
- chunkCDC7AOGD_cjs.__privateAdd(this, _tail, void 0);
253
- chunkCDC7AOGD_cjs.__privateAdd(this, _size, void 0);
251
+ chunkKAA3L7N6_cjs.__privateAdd(this, _head, void 0);
252
+ chunkKAA3L7N6_cjs.__privateAdd(this, _tail, void 0);
253
+ chunkKAA3L7N6_cjs.__privateAdd(this, _size, void 0);
254
254
  this.clear();
255
255
  }
256
256
  enqueue(value) {
257
257
  const node = new Node(value);
258
- if (chunkCDC7AOGD_cjs.__privateGet(this, _head)) {
259
- chunkCDC7AOGD_cjs.__privateGet(this, _tail).next = node;
260
- chunkCDC7AOGD_cjs.__privateSet(this, _tail, node);
258
+ if (chunkKAA3L7N6_cjs.__privateGet(this, _head)) {
259
+ chunkKAA3L7N6_cjs.__privateGet(this, _tail).next = node;
260
+ chunkKAA3L7N6_cjs.__privateSet(this, _tail, node);
261
261
  } else {
262
- chunkCDC7AOGD_cjs.__privateSet(this, _head, node);
263
- chunkCDC7AOGD_cjs.__privateSet(this, _tail, node);
262
+ chunkKAA3L7N6_cjs.__privateSet(this, _head, node);
263
+ chunkKAA3L7N6_cjs.__privateSet(this, _tail, node);
264
264
  }
265
- chunkCDC7AOGD_cjs.__privateWrapper(this, _size)._++;
265
+ chunkKAA3L7N6_cjs.__privateWrapper(this, _size)._++;
266
266
  }
267
267
  dequeue() {
268
- const current = chunkCDC7AOGD_cjs.__privateGet(this, _head);
268
+ const current = chunkKAA3L7N6_cjs.__privateGet(this, _head);
269
269
  if (!current) {
270
270
  return;
271
271
  }
272
- chunkCDC7AOGD_cjs.__privateSet(this, _head, chunkCDC7AOGD_cjs.__privateGet(this, _head).next);
273
- chunkCDC7AOGD_cjs.__privateWrapper(this, _size)._--;
272
+ chunkKAA3L7N6_cjs.__privateSet(this, _head, chunkKAA3L7N6_cjs.__privateGet(this, _head).next);
273
+ chunkKAA3L7N6_cjs.__privateWrapper(this, _size)._--;
274
274
  return current.value;
275
275
  }
276
276
  clear() {
277
- chunkCDC7AOGD_cjs.__privateSet(this, _head, void 0);
278
- chunkCDC7AOGD_cjs.__privateSet(this, _tail, void 0);
279
- chunkCDC7AOGD_cjs.__privateSet(this, _size, 0);
277
+ chunkKAA3L7N6_cjs.__privateSet(this, _head, void 0);
278
+ chunkKAA3L7N6_cjs.__privateSet(this, _tail, void 0);
279
+ chunkKAA3L7N6_cjs.__privateSet(this, _size, 0);
280
280
  }
281
281
  get size() {
282
- return chunkCDC7AOGD_cjs.__privateGet(this, _size);
282
+ return chunkKAA3L7N6_cjs.__privateGet(this, _size);
283
283
  }
284
284
  *[Symbol.iterator]() {
285
- let current = chunkCDC7AOGD_cjs.__privateGet(this, _head);
285
+ let current = chunkKAA3L7N6_cjs.__privateGet(this, _head);
286
286
  while (current) {
287
287
  yield current.value;
288
288
  current = current.next;
@@ -433,13 +433,13 @@ function locatePathSync(paths, {
433
433
  }
434
434
 
435
435
  // ../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js
436
- chunkCDC7AOGD_cjs.init_cjs_shims();
436
+ chunkKAA3L7N6_cjs.init_cjs_shims();
437
437
  function toPath2(urlOrPath) {
438
438
  return urlOrPath instanceof URL ? url.fileURLToPath(urlOrPath) : urlOrPath;
439
439
  }
440
440
 
441
441
  // ../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js
442
- chunkCDC7AOGD_cjs.init_cjs_shims();
442
+ chunkKAA3L7N6_cjs.init_cjs_shims();
443
443
 
444
444
  // ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
445
445
  var findUpStop = Symbol("findUpStop");
@@ -518,30 +518,30 @@ function findUpSync(name, options = {}) {
518
518
  var _cache, _cwd, _SLASHES, _match, match_fn;
519
519
  var _PackageManager = class _PackageManager {
520
520
  constructor(workspace) {
521
- chunkCDC7AOGD_cjs.__privateAdd(this, _match);
522
- chunkCDC7AOGD_cjs.__privateAdd(this, _cwd, void 0);
523
- chunkCDC7AOGD_cjs.__privateAdd(this, _SLASHES, /* @__PURE__ */ new Set(["/", "\\"]));
521
+ chunkKAA3L7N6_cjs.__privateAdd(this, _match);
522
+ chunkKAA3L7N6_cjs.__privateAdd(this, _cwd, void 0);
523
+ chunkKAA3L7N6_cjs.__privateAdd(this, _SLASHES, /* @__PURE__ */ new Set(["/", "\\"]));
524
524
  if (workspace) {
525
- chunkCDC7AOGD_cjs.__privateSet(this, _cwd, workspace);
525
+ chunkKAA3L7N6_cjs.__privateSet(this, _cwd, workspace);
526
526
  }
527
527
  return this;
528
528
  }
529
529
  set workspace(workspace) {
530
- chunkCDC7AOGD_cjs.__privateSet(this, _cwd, workspace);
530
+ chunkKAA3L7N6_cjs.__privateSet(this, _cwd, workspace);
531
531
  }
532
532
  get workspace() {
533
- return chunkCDC7AOGD_cjs.__privateGet(this, _cwd);
533
+ return chunkKAA3L7N6_cjs.__privateGet(this, _cwd);
534
534
  }
535
535
  normalizeDirectory(directory) {
536
- if (!chunkCDC7AOGD_cjs.__privateGet(this, _SLASHES).has(directory[directory.length - 1])) {
536
+ if (!chunkKAA3L7N6_cjs.__privateGet(this, _SLASHES).has(directory[directory.length - 1])) {
537
537
  return `${directory}/`;
538
538
  }
539
539
  return directory;
540
540
  }
541
541
  getLocation(path3) {
542
542
  let location = path3;
543
- if (chunkCDC7AOGD_cjs.__privateGet(this, _cwd)) {
544
- const require2 = mod__default.default.createRequire(this.normalizeDirectory(chunkCDC7AOGD_cjs.__privateGet(this, _cwd)));
543
+ if (chunkKAA3L7N6_cjs.__privateGet(this, _cwd)) {
544
+ const require2 = mod__default.default.createRequire(this.normalizeDirectory(chunkKAA3L7N6_cjs.__privateGet(this, _cwd)));
545
545
  location = require2.resolve(path3);
546
546
  }
547
547
  return location;
@@ -561,46 +561,46 @@ var _PackageManager = class _PackageManager {
561
561
  }
562
562
  async getPackageJSON() {
563
563
  const pkgPath = await findUp(["package.json"], {
564
- cwd: chunkCDC7AOGD_cjs.__privateGet(this, _cwd)
564
+ cwd: chunkKAA3L7N6_cjs.__privateGet(this, _cwd)
565
565
  });
566
566
  if (!pkgPath) {
567
567
  return void 0;
568
568
  }
569
- const json = await chunkPTGWQCIU_cjs.read(pkgPath);
569
+ const json = await chunkXX56SVPB_cjs.read(pkgPath);
570
570
  return JSON.parse(json);
571
571
  }
572
572
  getPackageJSONSync() {
573
573
  const pkgPath = findUpSync(["package.json"], {
574
- cwd: chunkCDC7AOGD_cjs.__privateGet(this, _cwd)
574
+ cwd: chunkKAA3L7N6_cjs.__privateGet(this, _cwd)
575
575
  });
576
576
  if (!pkgPath) {
577
577
  return void 0;
578
578
  }
579
- const json = chunkPTGWQCIU_cjs.readSync(pkgPath);
579
+ const json = chunkXX56SVPB_cjs.readSync(pkgPath);
580
580
  return JSON.parse(json);
581
581
  }
582
582
  static setVersion(dependency, version) {
583
- chunkCDC7AOGD_cjs.__privateGet(_PackageManager, _cache)[dependency] = version;
583
+ chunkKAA3L7N6_cjs.__privateGet(_PackageManager, _cache)[dependency] = version;
584
584
  }
585
585
  async getVersion(dependency) {
586
- if (typeof dependency === "string" && chunkCDC7AOGD_cjs.__privateGet(_PackageManager, _cache)[dependency]) {
587
- return chunkCDC7AOGD_cjs.__privateGet(_PackageManager, _cache)[dependency];
586
+ if (typeof dependency === "string" && chunkKAA3L7N6_cjs.__privateGet(_PackageManager, _cache)[dependency]) {
587
+ return chunkKAA3L7N6_cjs.__privateGet(_PackageManager, _cache)[dependency];
588
588
  }
589
589
  const packageJSON = await this.getPackageJSON();
590
590
  if (!packageJSON) {
591
591
  return void 0;
592
592
  }
593
- return chunkCDC7AOGD_cjs.__privateMethod(this, _match, match_fn).call(this, packageJSON, dependency);
593
+ return chunkKAA3L7N6_cjs.__privateMethod(this, _match, match_fn).call(this, packageJSON, dependency);
594
594
  }
595
595
  getVersionSync(dependency) {
596
- if (typeof dependency === "string" && chunkCDC7AOGD_cjs.__privateGet(_PackageManager, _cache)[dependency]) {
597
- return chunkCDC7AOGD_cjs.__privateGet(_PackageManager, _cache)[dependency];
596
+ if (typeof dependency === "string" && chunkKAA3L7N6_cjs.__privateGet(_PackageManager, _cache)[dependency]) {
597
+ return chunkKAA3L7N6_cjs.__privateGet(_PackageManager, _cache)[dependency];
598
598
  }
599
599
  const packageJSON = this.getPackageJSONSync();
600
600
  if (!packageJSON) {
601
601
  return void 0;
602
602
  }
603
- return chunkCDC7AOGD_cjs.__privateMethod(this, _match, match_fn).call(this, packageJSON, dependency);
603
+ return chunkKAA3L7N6_cjs.__privateMethod(this, _match, match_fn).call(this, packageJSON, dependency);
604
604
  }
605
605
  async isValid(dependency, version) {
606
606
  const packageVersion = await this.getVersion(dependency);
@@ -643,7 +643,7 @@ match_fn = function(packageJSON, dependency) {
643
643
  const matchedDependency = Object.keys(dependencies).find((dep) => dep.match(dependency));
644
644
  return matchedDependency ? dependencies[matchedDependency] : void 0;
645
645
  };
646
- chunkCDC7AOGD_cjs.__privateAdd(_PackageManager, _cache, {});
646
+ chunkKAA3L7N6_cjs.__privateAdd(_PackageManager, _cache, {});
647
647
  var PackageManager = _PackageManager;
648
648
 
649
649
  // src/index.ts
@@ -651,35 +651,35 @@ var src_default = build;
651
651
 
652
652
  Object.defineProperty(exports, "FileManager", {
653
653
  enumerable: true,
654
- get: function () { return chunk6TTDLGHW_cjs.FileManager; }
654
+ get: function () { return chunkOYDUQYAK_cjs.FileManager; }
655
655
  });
656
656
  Object.defineProperty(exports, "KubbFile", {
657
657
  enumerable: true,
658
- get: function () { return chunk6TTDLGHW_cjs.KubbFile; }
658
+ get: function () { return chunkOYDUQYAK_cjs.KubbFile; }
659
659
  });
660
660
  Object.defineProperty(exports, "PluginManager", {
661
661
  enumerable: true,
662
- get: function () { return chunk6TTDLGHW_cjs.PluginManager; }
662
+ get: function () { return chunkOYDUQYAK_cjs.PluginManager; }
663
663
  });
664
664
  Object.defineProperty(exports, "PromiseManager", {
665
665
  enumerable: true,
666
- get: function () { return chunk6TTDLGHW_cjs.PromiseManager; }
666
+ get: function () { return chunkOYDUQYAK_cjs.PromiseManager; }
667
667
  });
668
668
  Object.defineProperty(exports, "Warning", {
669
669
  enumerable: true,
670
- get: function () { return chunk6TTDLGHW_cjs.Warning; }
670
+ get: function () { return chunkOYDUQYAK_cjs.Warning; }
671
671
  });
672
672
  Object.defineProperty(exports, "createPlugin", {
673
673
  enumerable: true,
674
- get: function () { return chunk6TTDLGHW_cjs.createPlugin; }
674
+ get: function () { return chunkOYDUQYAK_cjs.createPlugin; }
675
675
  });
676
676
  Object.defineProperty(exports, "name", {
677
677
  enumerable: true,
678
- get: function () { return chunk6TTDLGHW_cjs.pluginName; }
678
+ get: function () { return chunkOYDUQYAK_cjs.pluginName; }
679
679
  });
680
680
  Object.defineProperty(exports, "pluginName", {
681
681
  enumerable: true,
682
- get: function () { return chunk6TTDLGHW_cjs.pluginName; }
682
+ get: function () { return chunkOYDUQYAK_cjs.pluginName; }
683
683
  });
684
684
  exports.Generator = Generator;
685
685
  exports.PackageManager = PackageManager;
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { URLPath } from './chunk-NWXLHLH3.js';
2
- import { clean } from './chunk-HGRAENXJ.js';
3
- import { FileManager, PluginManager, isPromise } from './chunk-D42WMZZ7.js';
4
- export { FileManager, KubbFile, PluginManager, PromiseManager, Warning, createPlugin, pluginName as name, pluginName } from './chunk-D42WMZZ7.js';
5
- import './chunk-Q4BVTLXG.js';
6
- import './chunk-XHS5C5AW.js';
7
- import './chunk-OCZMQ7SF.js';
8
- import { LogLevel, createLogger, p, randomCliColour } from './chunk-34RQN4Y6.js';
9
- import { read, readSync } from './chunk-SR5FEIHD.js';
10
- import './chunk-DAZBGE47.js';
11
- import { init_esm_shims, __privateAdd, __privateSet, __privateGet, __privateMethod } from './chunk-QDYI7RBT.js';
1
+ import { URLPath } from './chunk-37XMXECQ.js';
2
+ import { clean } from './chunk-IQBEGX4Z.js';
3
+ import { FileManager, PluginManager, isPromise } from './chunk-HI4PB2AG.js';
4
+ export { FileManager, KubbFile, PluginManager, PromiseManager, Warning, createPlugin, pluginName as name, pluginName } from './chunk-HI4PB2AG.js';
5
+ import './chunk-GKW5TTFV.js';
6
+ import './chunk-YW33IVCC.js';
7
+ import './chunk-MASAFU3G.js';
8
+ import { LogLevel, createLogger, p, randomCliColour } from './chunk-V6AVJEQC.js';
9
+ import { read, readSync } from './chunk-YUTCMBUY.js';
10
+ import './chunk-MYC5HIA5.js';
11
+ import { init_esm_shims, __privateAdd, __privateSet, __privateGet, __privateMethod } from './chunk-ETA3LCRB.js';
12
12
  import mod from 'module';
13
13
  import os from 'os';
14
14
  import { pathToFileURL } from 'url';