@kubb/core 2.6.6 → 2.7.0

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 (77) hide show
  1. package/dist/{chunk-NGM34FB2.cjs → chunk-2JNTDAI2.cjs} +17 -17
  2. package/dist/{chunk-NGM34FB2.cjs.map → chunk-2JNTDAI2.cjs.map} +1 -1
  3. package/dist/{chunk-IAM2TSOD.js → chunk-3HKED6KQ.js} +59 -23
  4. package/dist/chunk-3HKED6KQ.js.map +1 -0
  5. package/dist/{chunk-DZ63TRO3.js → chunk-6453B5D6.js} +13 -5
  6. package/dist/chunk-6453B5D6.js.map +1 -0
  7. package/dist/{chunk-DDBPI6U7.js → chunk-7LKI2367.js} +12 -7
  8. package/dist/chunk-7LKI2367.js.map +1 -0
  9. package/dist/{chunk-FEAY5FTX.cjs → chunk-AMVMOCJ4.cjs} +23 -22
  10. package/dist/{chunk-O6KGDMGN.cjs → chunk-BCD4E3IZ.cjs} +303 -298
  11. package/dist/chunk-BCD4E3IZ.cjs.map +1 -0
  12. package/dist/{chunk-QUL3TACU.js → chunk-DUZFWQUE.js} +13 -8
  13. package/dist/chunk-DUZFWQUE.js.map +1 -0
  14. package/dist/{chunk-RVIZ52LV.js → chunk-E4QOZYOP.js} +24 -10
  15. package/dist/chunk-E4QOZYOP.js.map +1 -0
  16. package/dist/chunk-EFAVSUDO.cjs +19 -0
  17. package/dist/{chunk-XMJY6AMI.js → chunk-HTCJOTLL.js} +11 -7
  18. package/dist/chunk-HTCJOTLL.js.map +1 -0
  19. package/dist/{chunk-DNFR6EDG.cjs → chunk-JWYPCGK5.cjs} +14 -13
  20. package/dist/{chunk-DZZXW555.cjs → chunk-KRX65PCH.cjs} +32 -29
  21. package/dist/{chunk-B3FP7HMI.cjs → chunk-M5H5RXTY.cjs} +12 -9
  22. package/dist/{chunk-JQBPOWRF.cjs → chunk-PHI4BK5K.cjs} +162 -124
  23. package/dist/{chunk-7QEHTZ4T.js → chunk-QDUQWRFO.js} +8 -4
  24. package/dist/chunk-QDUQWRFO.js.map +1 -0
  25. package/dist/{chunk-MCUCYURB.js → chunk-VCS7BATE.js} +10 -5
  26. package/dist/chunk-VCS7BATE.js.map +1 -0
  27. package/dist/{chunk-CPVVYFYJ.cjs → chunk-WCUXF325.cjs} +8 -7
  28. package/dist/{chunk-P5VTO36N.cjs → chunk-WDKUUZXN.cjs} +21 -17
  29. package/dist/chunk-YFNYSIDY.js +15 -0
  30. package/dist/chunk-YFNYSIDY.js.map +1 -0
  31. package/dist/{chunk-5TWA5OHW.js → chunk-YNFGR7GL.js} +10 -4
  32. package/dist/chunk-YNFGR7GL.js.map +1 -0
  33. package/dist/fs.cjs +21 -28
  34. package/dist/fs.js +21 -5
  35. package/dist/fs.js.map +1 -1
  36. package/dist/index.cjs +189 -189
  37. package/dist/index.cjs.map +1 -1
  38. package/dist/index.d.cts +8 -2
  39. package/dist/index.d.ts +8 -2
  40. package/dist/index.js +61 -19
  41. package/dist/index.js.map +1 -1
  42. package/dist/logger.cjs +14 -25
  43. package/dist/logger.js +14 -4
  44. package/dist/logger.js.map +1 -1
  45. package/dist/mocks.cjs +14 -12
  46. package/dist/mocks.js +15 -11
  47. package/dist/mocks.js.map +1 -1
  48. package/dist/transformers.cjs +40 -54
  49. package/dist/transformers.js +30 -8
  50. package/dist/transformers.js.map +1 -1
  51. package/dist/utils.cjs +34 -36
  52. package/dist/utils.js +25 -8
  53. package/dist/utils.js.map +1 -1
  54. package/package.json +4 -4
  55. package/src/FileManager.ts +14 -4
  56. package/src/index.ts +1 -1
  57. package/dist/chunk-33K7PH2K.cjs +0 -15
  58. package/dist/chunk-CPVVYFYJ.cjs.map +0 -1
  59. package/dist/chunk-DDBPI6U7.js.map +0 -1
  60. package/dist/chunk-DNFR6EDG.cjs.map +0 -1
  61. package/dist/chunk-DZ63TRO3.js.map +0 -1
  62. package/dist/chunk-IAM2TSOD.js.map +0 -1
  63. package/dist/chunk-MCUCYURB.js.map +0 -1
  64. package/dist/chunk-O6KGDMGN.cjs.map +0 -1
  65. package/dist/chunk-QUL3TACU.js.map +0 -1
  66. package/dist/chunk-RVIZ52LV.js.map +0 -1
  67. package/dist/chunk-XMJY6AMI.js.map +0 -1
  68. package/dist/chunk-YETB7TYW.js +0 -12
  69. package/dist/chunk-YETB7TYW.js.map +0 -1
  70. /package/dist/{chunk-FEAY5FTX.cjs.map → chunk-AMVMOCJ4.cjs.map} +0 -0
  71. /package/dist/{chunk-33K7PH2K.cjs.map → chunk-EFAVSUDO.cjs.map} +0 -0
  72. /package/dist/{chunk-5TWA5OHW.js.map → chunk-JWYPCGK5.cjs.map} +0 -0
  73. /package/dist/{chunk-DZZXW555.cjs.map → chunk-KRX65PCH.cjs.map} +0 -0
  74. /package/dist/{chunk-B3FP7HMI.cjs.map → chunk-M5H5RXTY.cjs.map} +0 -0
  75. /package/dist/{chunk-JQBPOWRF.cjs.map → chunk-PHI4BK5K.cjs.map} +0 -0
  76. /package/dist/{chunk-7QEHTZ4T.js.map → chunk-WCUXF325.cjs.map} +0 -0
  77. /package/dist/{chunk-P5VTO36N.cjs.map → chunk-WDKUUZXN.cjs.map} +0 -0
package/dist/index.cjs CHANGED
@@ -1,41 +1,51 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var chunkB3FP7HMI_cjs = require('./chunk-B3FP7HMI.cjs');
6
- var chunk33K7PH2K_cjs = require('./chunk-33K7PH2K.cjs');
7
- var chunkO6KGDMGN_cjs = require('./chunk-O6KGDMGN.cjs');
8
- require('./chunk-DNFR6EDG.cjs');
9
- require('./chunk-CPVVYFYJ.cjs');
10
- require('./chunk-FEAY5FTX.cjs');
11
- var chunkDZZXW555_cjs = require('./chunk-DZZXW555.cjs');
12
- var chunkP5VTO36N_cjs = require('./chunk-P5VTO36N.cjs');
13
- require('./chunk-JQBPOWRF.cjs');
14
- var chunkNGM34FB2_cjs = require('./chunk-NGM34FB2.cjs');
15
- var mod = require('module');
16
- var os = require('os');
17
- var url = require('url');
18
- var path2 = require('path');
19
- var process = require('process');
20
- var fs = require('fs');
21
- var semver = require('semver');
22
-
23
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
24
-
25
- var mod__default = /*#__PURE__*/_interopDefault(mod);
26
- var os__default = /*#__PURE__*/_interopDefault(os);
27
- var path2__default = /*#__PURE__*/_interopDefault(path2);
28
- var process__default = /*#__PURE__*/_interopDefault(process);
29
- var fs__default = /*#__PURE__*/_interopDefault(fs);
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunkM5H5RXTYcjs = require('./chunk-M5H5RXTY.cjs');
4
+
5
+
6
+ var _chunkEFAVSUDOcjs = require('./chunk-EFAVSUDO.cjs');
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+ var _chunkBCD4E3IZcjs = require('./chunk-BCD4E3IZ.cjs');
17
+ require('./chunk-JWYPCGK5.cjs');
18
+ require('./chunk-WCUXF325.cjs');
19
+ require('./chunk-AMVMOCJ4.cjs');
20
+
21
+
22
+
23
+
24
+
25
+ var _chunkKRX65PCHcjs = require('./chunk-KRX65PCH.cjs');
26
+
27
+
28
+
29
+ var _chunkWDKUUZXNcjs = require('./chunk-WDKUUZXN.cjs');
30
+ require('./chunk-PHI4BK5K.cjs');
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+ var _chunk2JNTDAI2cjs = require('./chunk-2JNTDAI2.cjs');
30
40
 
31
41
  // src/index.ts
32
- chunkNGM34FB2_cjs.init_cjs_shims();
42
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
33
43
 
34
44
  // src/build.ts
35
- chunkNGM34FB2_cjs.init_cjs_shims();
45
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
36
46
 
37
47
  // src/config.ts
38
- chunkNGM34FB2_cjs.init_cjs_shims();
48
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
39
49
  function defineConfig(options) {
40
50
  return options;
41
51
  }
@@ -48,16 +58,16 @@ async function transformReducer(_previousCode, result, _plugin) {
48
58
  return result;
49
59
  }
50
60
  async function setup(options) {
51
- const { config, logger = chunkDZZXW555_cjs.createLogger({ logLevel: chunkDZZXW555_cjs.LogLevel.silent }) } = options;
61
+ const { config, logger = _chunkKRX65PCHcjs.createLogger.call(void 0, { logLevel: _chunkKRX65PCHcjs.LogLevel.silent }) } = options;
52
62
  let count = 0;
53
63
  try {
54
- if (isInputPath(config) && !new chunkB3FP7HMI_cjs.URLPath(config.input.path).isURL) {
55
- await chunkP5VTO36N_cjs.read(config.input.path);
64
+ if (isInputPath(config) && !new (0, _chunkM5H5RXTYcjs.URLPath)(config.input.path).isURL) {
65
+ await _chunkWDKUUZXNcjs.read.call(void 0, config.input.path);
56
66
  }
57
67
  } catch (e) {
58
68
  if (isInputPath(config)) {
59
69
  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 " + chunkDZZXW555_cjs.p.dim(config.input.path),
70
+ "Cannot read file/URL defined in `input.path` or set with `kubb generate PATH` in the CLI of your Kubb config " + _chunkKRX65PCHcjs.p.dim(config.input.path),
61
71
  {
62
72
  cause: e
63
73
  }
@@ -65,19 +75,19 @@ async function setup(options) {
65
75
  }
66
76
  }
67
77
  if (config.output.clean) {
68
- await chunk33K7PH2K_cjs.clean(config.output.path);
78
+ await _chunkEFAVSUDOcjs.clean.call(void 0, config.output.path);
69
79
  }
70
80
  const task = async (file) => {
71
81
  const { path: path3 } = file;
72
- let source = chunkO6KGDMGN_cjs.FileManager.getSource(file);
82
+ let source = _chunkBCD4E3IZcjs.FileManager.getSource(file);
73
83
  const { result: loadedResult } = await pluginManager.hookFirst({
74
84
  hookName: "load",
75
85
  parameters: [path3]
76
86
  });
77
- if (loadedResult && chunkO6KGDMGN_cjs.isPromise(loadedResult)) {
87
+ if (loadedResult && _chunkBCD4E3IZcjs.isPromise.call(void 0, loadedResult)) {
78
88
  source = await loadedResult;
79
89
  }
80
- if (loadedResult && !chunkO6KGDMGN_cjs.isPromise(loadedResult)) {
90
+ if (loadedResult && !_chunkBCD4E3IZcjs.isPromise.call(void 0, loadedResult)) {
81
91
  source = loadedResult;
82
92
  }
83
93
  if (source) {
@@ -87,9 +97,9 @@ async function setup(options) {
87
97
  reduce: transformReducer
88
98
  });
89
99
  if (config.output.write || config.output.write === void 0) {
90
- if (file.meta?.pluginKey) {
100
+ if (_optionalChain([file, 'access', _2 => _2.meta, 'optionalAccess', _3 => _3.pluginKey])) {
91
101
  await pluginManager.hookForPlugin({
92
- pluginKey: file.meta?.pluginKey,
102
+ pluginKey: _optionalChain([file, 'access', _4 => _4.meta, 'optionalAccess', _5 => _5.pluginKey]),
93
103
  hookName: "writeFile",
94
104
  parameters: [source, path3]
95
105
  });
@@ -105,13 +115,13 @@ async function setup(options) {
105
115
  source: source || ""
106
116
  };
107
117
  };
108
- const pluginManager = new chunkO6KGDMGN_cjs.PluginManager(config, { logger, task });
118
+ const pluginManager = new (0, _chunkBCD4E3IZcjs.PluginManager)(config, { logger, task });
109
119
  pluginManager.on("execute", (executer) => {
110
120
  const { hookName, parameters, plugin } = executer;
111
121
  if (hookName === "writeFile") {
112
122
  const [code] = parameters;
113
- if (logger.logLevel === chunkDZZXW555_cjs.LogLevel.debug) {
114
- logger.emit("debug", [`PluginKey ${chunkDZZXW555_cjs.p.dim(JSON.stringify(plugin.key))}
123
+ if (logger.logLevel === _chunkKRX65PCHcjs.LogLevel.debug) {
124
+ logger.emit("debug", [`PluginKey ${_chunkKRX65PCHcjs.p.dim(JSON.stringify(plugin.key))}
115
125
  with source
116
126
 
117
127
  ${code}`]);
@@ -119,7 +129,7 @@ ${code}`]);
119
129
  }
120
130
  });
121
131
  pluginManager.queue.on("add", () => {
122
- if (logger.logLevel !== chunkDZZXW555_cjs.LogLevel.info) {
132
+ if (logger.logLevel !== _chunkKRX65PCHcjs.LogLevel.info) {
123
133
  return;
124
134
  }
125
135
  if (count === 0) {
@@ -127,32 +137,33 @@ ${code}`]);
127
137
  }
128
138
  });
129
139
  pluginManager.queue.on("active", () => {
130
- if (logger.logLevel !== chunkDZZXW555_cjs.LogLevel.info) {
140
+ if (logger.logLevel !== _chunkKRX65PCHcjs.LogLevel.info) {
131
141
  return;
132
142
  }
133
143
  if (logger.spinner && pluginManager.queue.size > 0) {
134
144
  const text = `Item: ${count} Size: ${pluginManager.queue.size} Pending: ${pluginManager.queue.pending}`;
135
- logger.spinner.suffixText = chunkDZZXW555_cjs.p.dim(text);
145
+ logger.spinner.suffixText = _chunkKRX65PCHcjs.p.dim(text);
136
146
  }
147
+ ;
137
148
  ++count;
138
149
  });
139
150
  pluginManager.queue.on("completed", () => {
140
- if (logger.logLevel !== chunkDZZXW555_cjs.LogLevel.info) {
151
+ if (logger.logLevel !== _chunkKRX65PCHcjs.LogLevel.info) {
141
152
  return;
142
153
  }
143
154
  if (logger.spinner) {
144
155
  const text = `Item: ${count} Size: ${pluginManager.queue.size} Pending: ${pluginManager.queue.pending}`;
145
- logger.spinner.suffixText = chunkDZZXW555_cjs.p.dim(text);
156
+ logger.spinner.suffixText = _chunkKRX65PCHcjs.p.dim(text);
146
157
  }
147
158
  });
148
159
  pluginManager.on("executed", (executer) => {
149
160
  const { hookName, plugin, output, parameters } = executer;
150
- if (logger.logLevel === chunkDZZXW555_cjs.LogLevel.debug) {
161
+ if (logger.logLevel === _chunkKRX65PCHcjs.LogLevel.debug) {
151
162
  const logs = [
152
- `${chunkDZZXW555_cjs.randomCliColour(plugin.name)} Executing ${hookName}`,
153
- parameters && `${chunkDZZXW555_cjs.p.bgWhite(`Parameters`)} ${chunkDZZXW555_cjs.randomCliColour(plugin.name)} ${hookName}`,
163
+ `${_chunkKRX65PCHcjs.randomCliColour.call(void 0, plugin.name)} Executing ${hookName}`,
164
+ parameters && `${_chunkKRX65PCHcjs.p.bgWhite(`Parameters`)} ${_chunkKRX65PCHcjs.randomCliColour.call(void 0, plugin.name)} ${hookName}`,
154
165
  JSON.stringify(parameters, void 0, 2),
155
- output && `${chunkDZZXW555_cjs.p.bgWhite("Output")} ${chunkDZZXW555_cjs.randomCliColour(plugin.name)} ${hookName}`,
166
+ output && `${_chunkKRX65PCHcjs.p.bgWhite("Output")} ${_chunkKRX65PCHcjs.randomCliColour.call(void 0, plugin.name)} ${hookName}`,
156
167
  output
157
168
  ].filter(Boolean);
158
169
  logger.emit("debug", logs);
@@ -168,10 +179,10 @@ async function build(options) {
168
179
  parameters: [options.config]
169
180
  });
170
181
  await pluginManager.hookParallel({ hookName: "buildEnd" });
171
- if (logger.logLevel === chunkDZZXW555_cjs.LogLevel.info) {
182
+ if (logger.logLevel === _chunkKRX65PCHcjs.LogLevel.info) {
172
183
  logger.emit("end", `\u{1F4BE} Writing completed`);
173
184
  }
174
- return { files: fileManager.files.map((file) => ({ ...file, source: chunkO6KGDMGN_cjs.FileManager.getSource(file) })), pluginManager };
185
+ return { files: fileManager.files.map((file) => ({ ...file, source: _chunkBCD4E3IZcjs.FileManager.getSource(file) })), pluginManager };
175
186
  }
176
187
  async function safeBuild(options) {
177
188
  const pluginManager = await setup(options);
@@ -182,105 +193,113 @@ async function safeBuild(options) {
182
193
  parameters: [options.config]
183
194
  });
184
195
  await pluginManager.hookParallel({ hookName: "buildEnd" });
185
- if (logger.logLevel === chunkDZZXW555_cjs.LogLevel.info) {
196
+ if (logger.logLevel === _chunkKRX65PCHcjs.LogLevel.info) {
186
197
  logger.emit("end", `\u{1F4BE} Writing completed`);
187
198
  }
188
199
  } catch (e) {
189
- return { files: fileManager.files.map((file) => ({ ...file, source: chunkO6KGDMGN_cjs.FileManager.getSource(file) })), pluginManager, error: e };
200
+ return { files: fileManager.files.map((file) => ({ ...file, source: _chunkBCD4E3IZcjs.FileManager.getSource(file) })), pluginManager, error: e };
190
201
  }
191
- return { files: fileManager.files.map((file) => ({ ...file, source: chunkO6KGDMGN_cjs.FileManager.getSource(file) })), pluginManager };
202
+ return { files: fileManager.files.map((file) => ({ ...file, source: _chunkBCD4E3IZcjs.FileManager.getSource(file) })), pluginManager };
192
203
  }
193
204
 
194
205
  // src/Generator.ts
195
- chunkNGM34FB2_cjs.init_cjs_shims();
206
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
196
207
  var _options, _context;
197
208
  var Generator = class {
198
209
  constructor(options, context) {
199
- chunkNGM34FB2_cjs.__privateAdd(this, _options, {});
200
- chunkNGM34FB2_cjs.__privateAdd(this, _context, {});
210
+ _chunk2JNTDAI2cjs.__privateAdd.call(void 0, this, _options, {});
211
+ _chunk2JNTDAI2cjs.__privateAdd.call(void 0, this, _context, {});
201
212
  if (context) {
202
- chunkNGM34FB2_cjs.__privateSet(this, _context, context);
213
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _context, context);
203
214
  }
204
215
  if (options) {
205
- chunkNGM34FB2_cjs.__privateSet(this, _options, options);
216
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _options, options);
206
217
  }
207
218
  return this;
208
219
  }
209
220
  get options() {
210
- return chunkNGM34FB2_cjs.__privateGet(this, _options);
221
+ return _chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _options);
211
222
  }
212
223
  get context() {
213
- return chunkNGM34FB2_cjs.__privateGet(this, _context);
224
+ return _chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _context);
214
225
  }
215
226
  set options(options) {
216
- chunkNGM34FB2_cjs.__privateSet(this, _options, { ...chunkNGM34FB2_cjs.__privateGet(this, _options), ...options });
227
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _options, { ..._chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _options), ...options });
217
228
  }
218
229
  };
219
230
  _options = new WeakMap();
220
231
  _context = new WeakMap();
221
232
 
222
233
  // src/PackageManager.ts
223
- chunkNGM34FB2_cjs.init_cjs_shims();
234
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
235
+ var _module = require('module'); var _module2 = _interopRequireDefault(_module);
236
+ var _os = require('os'); var _os2 = _interopRequireDefault(_os);
237
+ var _url = require('url');
224
238
 
225
239
  // ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
226
- chunkNGM34FB2_cjs.init_cjs_shims();
240
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
241
+ var _path = require('path'); var _path2 = _interopRequireDefault(_path);
227
242
 
228
243
  // ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
229
- chunkNGM34FB2_cjs.init_cjs_shims();
244
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
245
+ var _process = require('process'); var _process2 = _interopRequireDefault(_process);
246
+
247
+ var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);
248
+
230
249
 
231
250
  // ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
232
- chunkNGM34FB2_cjs.init_cjs_shims();
251
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
233
252
 
234
253
  // ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
235
- chunkNGM34FB2_cjs.init_cjs_shims();
254
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
236
255
 
237
256
  // ../../node_modules/.pnpm/yocto-queue@1.0.0/node_modules/yocto-queue/index.js
238
- chunkNGM34FB2_cjs.init_cjs_shims();
257
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
239
258
  var Node = class {
240
259
  constructor(value) {
241
- chunkNGM34FB2_cjs.__publicField(this, "value");
242
- chunkNGM34FB2_cjs.__publicField(this, "next");
260
+ _chunk2JNTDAI2cjs.__publicField.call(void 0, this, "value");
261
+ _chunk2JNTDAI2cjs.__publicField.call(void 0, this, "next");
243
262
  this.value = value;
244
263
  }
245
264
  };
246
265
  var _head, _tail, _size;
247
266
  var Queue = class {
248
267
  constructor() {
249
- chunkNGM34FB2_cjs.__privateAdd(this, _head, void 0);
250
- chunkNGM34FB2_cjs.__privateAdd(this, _tail, void 0);
251
- chunkNGM34FB2_cjs.__privateAdd(this, _size, void 0);
268
+ _chunk2JNTDAI2cjs.__privateAdd.call(void 0, this, _head, void 0);
269
+ _chunk2JNTDAI2cjs.__privateAdd.call(void 0, this, _tail, void 0);
270
+ _chunk2JNTDAI2cjs.__privateAdd.call(void 0, this, _size, void 0);
252
271
  this.clear();
253
272
  }
254
273
  enqueue(value) {
255
274
  const node = new Node(value);
256
- if (chunkNGM34FB2_cjs.__privateGet(this, _head)) {
257
- chunkNGM34FB2_cjs.__privateGet(this, _tail).next = node;
258
- chunkNGM34FB2_cjs.__privateSet(this, _tail, node);
275
+ if (_chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _head)) {
276
+ _chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _tail).next = node;
277
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _tail, node);
259
278
  } else {
260
- chunkNGM34FB2_cjs.__privateSet(this, _head, node);
261
- chunkNGM34FB2_cjs.__privateSet(this, _tail, node);
279
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _head, node);
280
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _tail, node);
262
281
  }
263
- chunkNGM34FB2_cjs.__privateWrapper(this, _size)._++;
282
+ _chunk2JNTDAI2cjs.__privateWrapper.call(void 0, this, _size)._++;
264
283
  }
265
284
  dequeue() {
266
- const current = chunkNGM34FB2_cjs.__privateGet(this, _head);
285
+ const current = _chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _head);
267
286
  if (!current) {
268
287
  return;
269
288
  }
270
- chunkNGM34FB2_cjs.__privateSet(this, _head, chunkNGM34FB2_cjs.__privateGet(this, _head).next);
271
- chunkNGM34FB2_cjs.__privateWrapper(this, _size)._--;
289
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _head, _chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _head).next);
290
+ _chunk2JNTDAI2cjs.__privateWrapper.call(void 0, this, _size)._--;
272
291
  return current.value;
273
292
  }
274
293
  clear() {
275
- chunkNGM34FB2_cjs.__privateSet(this, _head, void 0);
276
- chunkNGM34FB2_cjs.__privateSet(this, _tail, void 0);
277
- chunkNGM34FB2_cjs.__privateSet(this, _size, 0);
294
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _head, void 0);
295
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _tail, void 0);
296
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _size, 0);
278
297
  }
279
298
  get size() {
280
- return chunkNGM34FB2_cjs.__privateGet(this, _size);
299
+ return _chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _size);
281
300
  }
282
301
  *[Symbol.iterator]() {
283
- let current = chunkNGM34FB2_cjs.__privateGet(this, _head);
302
+ let current = _chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _head);
284
303
  while (current) {
285
304
  yield current.value;
286
305
  current = current.next;
@@ -310,7 +329,7 @@ function pLimit(concurrency) {
310
329
  resolve(result);
311
330
  try {
312
331
  await result;
313
- } catch {
332
+ } catch (e2) {
314
333
  }
315
334
  next();
316
335
  };
@@ -386,9 +405,9 @@ function checkType(type) {
386
405
  throw new Error(`Invalid type specified: ${type}`);
387
406
  }
388
407
  var matchType = (type, stat) => stat[typeMappings[type]]();
389
- var toPath = (urlOrPath) => urlOrPath instanceof URL ? url.fileURLToPath(urlOrPath) : urlOrPath;
408
+ var toPath = (urlOrPath) => urlOrPath instanceof URL ? _url.fileURLToPath.call(void 0, urlOrPath) : urlOrPath;
390
409
  async function locatePath(paths, {
391
- cwd = process__default.default.cwd(),
410
+ cwd = _process2.default.cwd(),
392
411
  type = "file",
393
412
  allowSymlinks = true,
394
413
  concurrency,
@@ -396,27 +415,27 @@ async function locatePath(paths, {
396
415
  } = {}) {
397
416
  checkType(type);
398
417
  cwd = toPath(cwd);
399
- const statFunction = allowSymlinks ? fs.promises.stat : fs.promises.lstat;
418
+ const statFunction = allowSymlinks ? _fs.promises.stat : _fs.promises.lstat;
400
419
  return pLocate(paths, async (path_) => {
401
420
  try {
402
- const stat = await statFunction(path2__default.default.resolve(cwd, path_));
421
+ const stat = await statFunction(_path2.default.resolve(cwd, path_));
403
422
  return matchType(type, stat);
404
- } catch {
423
+ } catch (e3) {
405
424
  return false;
406
425
  }
407
426
  }, { concurrency, preserveOrder });
408
427
  }
409
428
  function locatePathSync(paths, {
410
- cwd = process__default.default.cwd(),
429
+ cwd = _process2.default.cwd(),
411
430
  type = "file",
412
431
  allowSymlinks = true
413
432
  } = {}) {
414
433
  checkType(type);
415
434
  cwd = toPath(cwd);
416
- const statFunction = allowSymlinks ? fs__default.default.statSync : fs__default.default.lstatSync;
435
+ const statFunction = allowSymlinks ? _fs2.default.statSync : _fs2.default.lstatSync;
417
436
  for (const path_ of paths) {
418
437
  try {
419
- const stat = statFunction(path2__default.default.resolve(cwd, path_), {
438
+ const stat = statFunction(_path2.default.resolve(cwd, path_), {
420
439
  throwIfNoEntry: false
421
440
  });
422
441
  if (!stat) {
@@ -425,27 +444,29 @@ function locatePathSync(paths, {
425
444
  if (matchType(type, stat)) {
426
445
  return path_;
427
446
  }
428
- } catch {
447
+ } catch (e4) {
429
448
  }
430
449
  }
431
450
  }
432
451
 
433
452
  // ../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js
434
- chunkNGM34FB2_cjs.init_cjs_shims();
453
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
454
+
435
455
  function toPath2(urlOrPath) {
436
- return urlOrPath instanceof URL ? url.fileURLToPath(urlOrPath) : urlOrPath;
456
+ return urlOrPath instanceof URL ? _url.fileURLToPath.call(void 0, urlOrPath) : urlOrPath;
437
457
  }
438
458
 
439
459
  // ../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js
440
- chunkNGM34FB2_cjs.init_cjs_shims();
460
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
461
+
441
462
 
442
463
  // ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
443
464
  var findUpStop = Symbol("findUpStop");
444
465
  async function findUpMultiple(name, options = {}) {
445
- let directory = path2__default.default.resolve(toPath2(options.cwd) ?? "");
446
- const { root } = path2__default.default.parse(directory);
447
- const stopAt = path2__default.default.resolve(directory, toPath2(options.stopAt ?? root));
448
- const limit = options.limit ?? Number.POSITIVE_INFINITY;
466
+ let directory = _path2.default.resolve(_nullishCoalesce(toPath2(options.cwd), () => ( "")));
467
+ const { root } = _path2.default.parse(directory);
468
+ const stopAt = _path2.default.resolve(directory, toPath2(_nullishCoalesce(options.stopAt, () => ( root))));
469
+ const limit = _nullishCoalesce(options.limit, () => ( Number.POSITIVE_INFINITY));
449
470
  const paths = [name].flat();
450
471
  const runMatcher = async (locateOptions) => {
451
472
  if (typeof name !== "function") {
@@ -464,20 +485,20 @@ async function findUpMultiple(name, options = {}) {
464
485
  break;
465
486
  }
466
487
  if (foundPath) {
467
- matches.push(path2__default.default.resolve(directory, foundPath));
488
+ matches.push(_path2.default.resolve(directory, foundPath));
468
489
  }
469
490
  if (directory === stopAt || matches.length >= limit) {
470
491
  break;
471
492
  }
472
- directory = path2__default.default.dirname(directory);
493
+ directory = _path2.default.dirname(directory);
473
494
  }
474
495
  return matches;
475
496
  }
476
497
  function findUpMultipleSync(name, options = {}) {
477
- let directory = path2__default.default.resolve(toPath2(options.cwd) ?? "");
478
- const { root } = path2__default.default.parse(directory);
479
- const stopAt = path2__default.default.resolve(directory, toPath2(options.stopAt) ?? root);
480
- const limit = options.limit ?? Number.POSITIVE_INFINITY;
498
+ let directory = _path2.default.resolve(_nullishCoalesce(toPath2(options.cwd), () => ( "")));
499
+ const { root } = _path2.default.parse(directory);
500
+ const stopAt = _path2.default.resolve(directory, _nullishCoalesce(toPath2(options.stopAt), () => ( root)));
501
+ const limit = _nullishCoalesce(options.limit, () => ( Number.POSITIVE_INFINITY));
481
502
  const paths = [name].flat();
482
503
  const runMatcher = (locateOptions) => {
483
504
  if (typeof name !== "function") {
@@ -496,12 +517,12 @@ function findUpMultipleSync(name, options = {}) {
496
517
  break;
497
518
  }
498
519
  if (foundPath) {
499
- matches.push(path2__default.default.resolve(directory, foundPath));
520
+ matches.push(_path2.default.resolve(directory, foundPath));
500
521
  }
501
522
  if (directory === stopAt || matches.length >= limit) {
502
523
  break;
503
524
  }
504
- directory = path2__default.default.dirname(directory);
525
+ directory = _path2.default.dirname(directory);
505
526
  }
506
527
  return matches;
507
528
  }
@@ -513,33 +534,36 @@ function findUpSync(name, options = {}) {
513
534
  const matches = findUpMultipleSync(name, { ...options, limit: 1 });
514
535
  return matches[0];
515
536
  }
537
+
538
+ // src/PackageManager.ts
539
+ var _semver = require('semver');
516
540
  var _cache, _cwd, _SLASHES, _match, match_fn;
517
541
  var _PackageManager = class _PackageManager {
518
542
  constructor(workspace) {
519
- chunkNGM34FB2_cjs.__privateAdd(this, _match);
520
- chunkNGM34FB2_cjs.__privateAdd(this, _cwd, void 0);
521
- chunkNGM34FB2_cjs.__privateAdd(this, _SLASHES, /* @__PURE__ */ new Set(["/", "\\"]));
543
+ _chunk2JNTDAI2cjs.__privateAdd.call(void 0, this, _match);
544
+ _chunk2JNTDAI2cjs.__privateAdd.call(void 0, this, _cwd, void 0);
545
+ _chunk2JNTDAI2cjs.__privateAdd.call(void 0, this, _SLASHES, /* @__PURE__ */ new Set(["/", "\\"]));
522
546
  if (workspace) {
523
- chunkNGM34FB2_cjs.__privateSet(this, _cwd, workspace);
547
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _cwd, workspace);
524
548
  }
525
549
  return this;
526
550
  }
527
551
  set workspace(workspace) {
528
- chunkNGM34FB2_cjs.__privateSet(this, _cwd, workspace);
552
+ _chunk2JNTDAI2cjs.__privateSet.call(void 0, this, _cwd, workspace);
529
553
  }
530
554
  get workspace() {
531
- return chunkNGM34FB2_cjs.__privateGet(this, _cwd);
555
+ return _chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _cwd);
532
556
  }
533
557
  normalizeDirectory(directory) {
534
- if (!chunkNGM34FB2_cjs.__privateGet(this, _SLASHES).has(directory[directory.length - 1])) {
558
+ if (!_chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _SLASHES).has(directory[directory.length - 1])) {
535
559
  return `${directory}/`;
536
560
  }
537
561
  return directory;
538
562
  }
539
563
  getLocation(path3) {
540
564
  let location = path3;
541
- if (chunkNGM34FB2_cjs.__privateGet(this, _cwd)) {
542
- const require2 = mod__default.default.createRequire(this.normalizeDirectory(chunkNGM34FB2_cjs.__privateGet(this, _cwd)));
565
+ if (_chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _cwd)) {
566
+ const require2 = _module2.default.createRequire(this.normalizeDirectory(_chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _cwd)));
543
567
  location = require2.resolve(path3);
544
568
  }
545
569
  return location;
@@ -547,11 +571,11 @@ var _PackageManager = class _PackageManager {
547
571
  async import(path3) {
548
572
  try {
549
573
  let location = this.getLocation(path3);
550
- if (os__default.default.platform() == "win32") {
551
- location = url.pathToFileURL(location).href;
574
+ if (_os2.default.platform() == "win32") {
575
+ location = _url.pathToFileURL.call(void 0, location).href;
552
576
  }
553
- const module = await import(location);
554
- return module?.default ?? module;
577
+ const module = await Promise.resolve().then(() => _interopRequireWildcard(require(location)));
578
+ return _nullishCoalesce(_optionalChain([module, 'optionalAccess', _6 => _6.default]), () => ( module));
555
579
  } catch (e) {
556
580
  console.log(e);
557
581
  return void 0;
@@ -559,46 +583,46 @@ var _PackageManager = class _PackageManager {
559
583
  }
560
584
  async getPackageJSON() {
561
585
  const pkgPath = await findUp(["package.json"], {
562
- cwd: chunkNGM34FB2_cjs.__privateGet(this, _cwd)
586
+ cwd: _chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _cwd)
563
587
  });
564
588
  if (!pkgPath) {
565
589
  return void 0;
566
590
  }
567
- const json = await chunkP5VTO36N_cjs.read(pkgPath);
591
+ const json = await _chunkWDKUUZXNcjs.read.call(void 0, pkgPath);
568
592
  return JSON.parse(json);
569
593
  }
570
594
  getPackageJSONSync() {
571
595
  const pkgPath = findUpSync(["package.json"], {
572
- cwd: chunkNGM34FB2_cjs.__privateGet(this, _cwd)
596
+ cwd: _chunk2JNTDAI2cjs.__privateGet.call(void 0, this, _cwd)
573
597
  });
574
598
  if (!pkgPath) {
575
599
  return void 0;
576
600
  }
577
- const json = chunkP5VTO36N_cjs.readSync(pkgPath);
601
+ const json = _chunkWDKUUZXNcjs.readSync.call(void 0, pkgPath);
578
602
  return JSON.parse(json);
579
603
  }
580
604
  static setVersion(dependency, version) {
581
- chunkNGM34FB2_cjs.__privateGet(_PackageManager, _cache)[dependency] = version;
605
+ _chunk2JNTDAI2cjs.__privateGet.call(void 0, _PackageManager, _cache)[dependency] = version;
582
606
  }
583
607
  async getVersion(dependency) {
584
- if (typeof dependency === "string" && chunkNGM34FB2_cjs.__privateGet(_PackageManager, _cache)[dependency]) {
585
- return chunkNGM34FB2_cjs.__privateGet(_PackageManager, _cache)[dependency];
608
+ if (typeof dependency === "string" && _chunk2JNTDAI2cjs.__privateGet.call(void 0, _PackageManager, _cache)[dependency]) {
609
+ return _chunk2JNTDAI2cjs.__privateGet.call(void 0, _PackageManager, _cache)[dependency];
586
610
  }
587
611
  const packageJSON = await this.getPackageJSON();
588
612
  if (!packageJSON) {
589
613
  return void 0;
590
614
  }
591
- return chunkNGM34FB2_cjs.__privateMethod(this, _match, match_fn).call(this, packageJSON, dependency);
615
+ return _chunk2JNTDAI2cjs.__privateMethod.call(void 0, this, _match, match_fn).call(this, packageJSON, dependency);
592
616
  }
593
617
  getVersionSync(dependency) {
594
- if (typeof dependency === "string" && chunkNGM34FB2_cjs.__privateGet(_PackageManager, _cache)[dependency]) {
595
- return chunkNGM34FB2_cjs.__privateGet(_PackageManager, _cache)[dependency];
618
+ if (typeof dependency === "string" && _chunk2JNTDAI2cjs.__privateGet.call(void 0, _PackageManager, _cache)[dependency]) {
619
+ return _chunk2JNTDAI2cjs.__privateGet.call(void 0, _PackageManager, _cache)[dependency];
596
620
  }
597
621
  const packageJSON = this.getPackageJSONSync();
598
622
  if (!packageJSON) {
599
623
  return void 0;
600
624
  }
601
- return chunkNGM34FB2_cjs.__privateMethod(this, _match, match_fn).call(this, packageJSON, dependency);
625
+ return _chunk2JNTDAI2cjs.__privateMethod.call(void 0, this, _match, match_fn).call(this, packageJSON, dependency);
602
626
  }
603
627
  async isValid(dependency, version) {
604
628
  const packageVersion = await this.getVersion(dependency);
@@ -608,22 +632,22 @@ var _PackageManager = class _PackageManager {
608
632
  if (packageVersion === version) {
609
633
  return true;
610
634
  }
611
- const semVer = semver.coerce(packageVersion);
635
+ const semVer = _semver.coerce.call(void 0, packageVersion);
612
636
  if (!semVer) {
613
637
  throw new Error(`${packageVersion} is not valid`);
614
638
  }
615
- return semver.satisfies(semVer, version);
639
+ return _semver.satisfies.call(void 0, semVer, version);
616
640
  }
617
641
  isValidSync(dependency, version) {
618
642
  const packageVersion = this.getVersionSync(dependency);
619
643
  if (!packageVersion) {
620
644
  return false;
621
645
  }
622
- const semVer = semver.coerce(packageVersion);
646
+ const semVer = _semver.coerce.call(void 0, packageVersion);
623
647
  if (!semVer) {
624
648
  throw new Error(`${packageVersion} is not valid`);
625
649
  }
626
- return semver.satisfies(semVer, version);
650
+ return _semver.satisfies.call(void 0, semVer, version);
627
651
  }
628
652
  };
629
653
  _cache = new WeakMap();
@@ -641,52 +665,28 @@ match_fn = function(packageJSON, dependency) {
641
665
  const matchedDependency = Object.keys(dependencies).find((dep) => dep.match(dependency));
642
666
  return matchedDependency ? dependencies[matchedDependency] : void 0;
643
667
  };
644
- chunkNGM34FB2_cjs.__privateAdd(_PackageManager, _cache, {});
668
+ _chunk2JNTDAI2cjs.__privateAdd.call(void 0, _PackageManager, _cache, {});
645
669
  var PackageManager = _PackageManager;
646
670
 
647
671
  // src/kubb.ts
648
672
  var kubb_exports = {};
649
- chunkNGM34FB2_cjs.init_cjs_shims();
650
-
651
- Object.defineProperty(exports, "FileManager", {
652
- enumerable: true,
653
- get: function () { return chunkO6KGDMGN_cjs.FileManager; }
654
- });
655
- Object.defineProperty(exports, "KubbFile", {
656
- enumerable: true,
657
- get: function () { return chunkO6KGDMGN_cjs.KubbFile; }
658
- });
659
- Object.defineProperty(exports, "PluginManager", {
660
- enumerable: true,
661
- get: function () { return chunkO6KGDMGN_cjs.PluginManager; }
662
- });
663
- Object.defineProperty(exports, "PromiseManager", {
664
- enumerable: true,
665
- get: function () { return chunkO6KGDMGN_cjs.PromiseManager; }
666
- });
667
- Object.defineProperty(exports, "Warning", {
668
- enumerable: true,
669
- get: function () { return chunkO6KGDMGN_cjs.Warning; }
670
- });
671
- Object.defineProperty(exports, "createPlugin", {
672
- enumerable: true,
673
- get: function () { return chunkO6KGDMGN_cjs.createPlugin; }
674
- });
675
- Object.defineProperty(exports, "name", {
676
- enumerable: true,
677
- get: function () { return chunkO6KGDMGN_cjs.pluginName; }
678
- });
679
- Object.defineProperty(exports, "pluginName", {
680
- enumerable: true,
681
- get: function () { return chunkO6KGDMGN_cjs.pluginName; }
682
- });
683
- exports.Generator = Generator;
684
- exports.Kubb = kubb_exports;
685
- exports.PackageManager = PackageManager;
686
- exports.build = build;
687
- exports.default = build;
688
- exports.defineConfig = defineConfig;
689
- exports.isInputPath = isInputPath;
690
- exports.safeBuild = safeBuild;
691
- //# sourceMappingURL=out.js.map
673
+ _chunk2JNTDAI2cjs.init_cjs_shims.call(void 0, );
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+
690
+
691
+ exports.FileManager = _chunkBCD4E3IZcjs.FileManager; exports.Generator = Generator; exports.Kubb = kubb_exports; exports.KubbFile = _chunkBCD4E3IZcjs.KubbFile; exports.PackageManager = PackageManager; exports.PluginManager = _chunkBCD4E3IZcjs.PluginManager; exports.PromiseManager = _chunkBCD4E3IZcjs.PromiseManager; exports.Warning = _chunkBCD4E3IZcjs.Warning; exports.build = build; exports.createPlugin = _chunkBCD4E3IZcjs.createPlugin; exports.default = build; exports.defineConfig = defineConfig; exports.isInputPath = isInputPath; exports.name = _chunkBCD4E3IZcjs.pluginName; exports.pluginName = _chunkBCD4E3IZcjs.pluginName; exports.safeBuild = safeBuild;
692
692
  //# sourceMappingURL=index.cjs.map