@kubb/core 3.7.2 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,14 +29,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  mod
30
30
  ));
31
31
 
32
- // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@20.17.28__jiti@2.4.2_postcss@8.5.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js
32
+ // ../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.3_@types+node@20.17.30__jiti@2.4.2_postcss@8.5.3_typescript@5.8.3_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js
33
33
  var init_cjs_shims = __esm({
34
- "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@20.17.28__jiti@2.4.2_postcss@8.5.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js"() {
34
+ "../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.3_@types+node@20.17.30__jiti@2.4.2_postcss@8.5.3_typescript@5.8.3_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js"() {
35
35
  }
36
36
  });
37
37
 
38
38
  exports.__commonJS = __commonJS;
39
39
  exports.__toESM = __toESM;
40
40
  exports.init_cjs_shims = init_cjs_shims;
41
- //# sourceMappingURL=chunk-KEDZU7VZ.cjs.map
42
- //# sourceMappingURL=chunk-KEDZU7VZ.cjs.map
41
+ //# sourceMappingURL=chunk-PB6WTEP5.cjs.map
42
+ //# sourceMappingURL=chunk-PB6WTEP5.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.2_@types+node@20.17.28__jiti@2.4.2_postcss@8.5.3_typescript@5.8.2_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,cAAA,GAAA,KAAA,CAAA;AAAA,EAAA,sLAAA,GAAA;AAAA;AAAA,CAAA","file":"chunk-KEDZU7VZ.cjs","sourcesContent":["// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () =>\n typeof document === 'undefined'\n ? new URL(`file:${__filename}`).href\n : (document.currentScript && document.currentScript.src) ||\n new URL('main.js', document.baseURI).href\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n"]}
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.4.0_@microsoft+api-extractor@7.52.3_@types+node@20.17.30__jiti@2.4.2_postcss@8.5.3_typescript@5.8.3_yaml@2.7.0/node_modules/tsup/assets/cjs_shims.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA,cAAA,GAAA,KAAA,CAAA;AAAA,EAAA,sLAAA,GAAA;AAAA;AAAA,CAAA","file":"chunk-PB6WTEP5.cjs","sourcesContent":["// Shim globals in cjs bundle\n// There's a weird bug that esbuild will always inject importMetaUrl\n// if we export it as `const importMetaUrl = ... __filename ...`\n// But using a function will not cause this issue\n\nconst getImportMetaUrl = () =>\n typeof document === 'undefined'\n ? new URL(`file:${__filename}`).href\n : (document.currentScript && document.currentScript.src) ||\n new URL('main.js', document.baseURI).href\n\nexport const importMetaUrl = /* @__PURE__ */ getImportMetaUrl()\n"]}
package/dist/index.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var chunkUKZDPZZN_cjs = require('./chunk-UKZDPZZN.cjs');
6
- var chunkTW6NZHX6_cjs = require('./chunk-TW6NZHX6.cjs');
7
- var chunk7CUHIALJ_cjs = require('./chunk-7CUHIALJ.cjs');
8
- var chunkKEDZU7VZ_cjs = require('./chunk-KEDZU7VZ.cjs');
5
+ var chunkOH3WQGPX_cjs = require('./chunk-OH3WQGPX.cjs');
6
+ var chunkMXC77W6F_cjs = require('./chunk-MXC77W6F.cjs');
7
+ var chunkO2Y6XX3B_cjs = require('./chunk-O2Y6XX3B.cjs');
8
+ var chunkPB6WTEP5_cjs = require('./chunk-PB6WTEP5.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
- chunkKEDZU7VZ_cjs.init_cjs_shims();
27
+ chunkPB6WTEP5_cjs.init_cjs_shims();
28
28
 
29
29
  // src/build.ts
30
- chunkKEDZU7VZ_cjs.init_cjs_shims();
30
+ chunkPB6WTEP5_cjs.init_cjs_shims();
31
31
 
32
32
  // src/PluginManager.ts
33
- chunkKEDZU7VZ_cjs.init_cjs_shims();
33
+ chunkPB6WTEP5_cjs.init_cjs_shims();
34
34
 
35
35
  // src/PromiseManager.ts
36
- chunkKEDZU7VZ_cjs.init_cjs_shims();
36
+ chunkPB6WTEP5_cjs.init_cjs_shims();
37
37
 
38
38
  // src/utils/executeStrategies.ts
39
- chunkKEDZU7VZ_cjs.init_cjs_shims();
39
+ chunkPB6WTEP5_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
- chunkKEDZU7VZ_cjs.init_cjs_shims();
100
+ chunkPB6WTEP5_cjs.init_cjs_shims();
101
101
  var ValidationPluginError = class extends Error {
102
102
  };
103
103
 
104
104
  // src/plugin.ts
105
- chunkKEDZU7VZ_cjs.init_cjs_shims();
105
+ chunkPB6WTEP5_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 chunkUKZDPZZN_cjs.EventEmitter();
156
+ events = new chunkOH3WQGPX_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 chunkTW6NZHX6_cjs.FileManager();
168
+ this.fileManager = new chunkMXC77W6F_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: [chunk7CUHIALJ_cjs.trim(params.name), params.type],
238
+ parameters: [chunkO2Y6XX3B_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 chunk7CUHIALJ_cjs.transformReservedWord(names?.at(0) || params.name);
254
+ return chunkO2Y6XX3B_cjs.transformReservedWord(names?.at(0) || params.name);
255
255
  }
256
256
  const name = this.hookFirstSync({
257
257
  hookName: "resolveName",
258
- parameters: [chunk7CUHIALJ_cjs.trim(params.name), params.type],
258
+ parameters: [chunkO2Y6XX3B_cjs.trim(params.name), params.type],
259
259
  message: `Resolving name '${params.name}' and type '${params.type}'`
260
260
  }).result;
261
- return chunk7CUHIALJ_cjs.transformReservedWord(name);
261
+ return chunkO2Y6XX3B_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
- chunkTW6NZHX6_cjs.setUniqueName(plugin.name, usedPluginNames);
599
+ chunkMXC77W6F_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
- chunkKEDZU7VZ_cjs.init_cjs_shims();
634
+ chunkPB6WTEP5_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 = chunkUKZDPZZN_cjs.createLogger() } = options;
645
+ const { config: userConfig, logger = chunkOH3WQGPX_cjs.createLogger() } = options;
646
646
  try {
647
- if (isInputPath(userConfig) && !new chunkTW6NZHX6_cjs.URLPath(userConfig.input.path).isURL) {
647
+ if (isInputPath(userConfig) && !new chunkMXC77W6F_cjs.URLPath(userConfig.input.path).isURL) {
648
648
  await fs.read(userConfig.input.path);
649
649
  }
650
650
  } catch (e) {
@@ -739,7 +739,7 @@ async function safeBuild(options) {
739
739
  if (config.output.barrelType) {
740
740
  await pluginManager.fileManager.add(rootFile);
741
741
  }
742
- files = await chunkTW6NZHX6_cjs.processFiles({
742
+ files = await chunkMXC77W6F_cjs.processFiles({
743
743
  root: config.root,
744
744
  extension: config.output.extension,
745
745
  dryRun: !config.output.write,
@@ -762,7 +762,7 @@ async function safeBuild(options) {
762
762
  }
763
763
 
764
764
  // src/BaseGenerator.ts
765
- chunkKEDZU7VZ_cjs.init_cjs_shims();
765
+ chunkPB6WTEP5_cjs.init_cjs_shims();
766
766
  var BaseGenerator = class {
767
767
  #options = {};
768
768
  #context = {};
@@ -787,22 +787,22 @@ var BaseGenerator = class {
787
787
  };
788
788
 
789
789
  // src/PackageManager.ts
790
- chunkKEDZU7VZ_cjs.init_cjs_shims();
790
+ chunkPB6WTEP5_cjs.init_cjs_shims();
791
791
 
792
792
  // ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
793
- chunkKEDZU7VZ_cjs.init_cjs_shims();
793
+ chunkPB6WTEP5_cjs.init_cjs_shims();
794
794
 
795
795
  // ../../node_modules/.pnpm/locate-path@7.2.0/node_modules/locate-path/index.js
796
- chunkKEDZU7VZ_cjs.init_cjs_shims();
796
+ chunkPB6WTEP5_cjs.init_cjs_shims();
797
797
 
798
798
  // ../../node_modules/.pnpm/p-locate@6.0.0/node_modules/p-locate/index.js
799
- chunkKEDZU7VZ_cjs.init_cjs_shims();
799
+ chunkPB6WTEP5_cjs.init_cjs_shims();
800
800
 
801
801
  // ../../node_modules/.pnpm/p-limit@4.0.0/node_modules/p-limit/index.js
802
- chunkKEDZU7VZ_cjs.init_cjs_shims();
802
+ chunkPB6WTEP5_cjs.init_cjs_shims();
803
803
 
804
804
  // ../../node_modules/.pnpm/yocto-queue@1.1.1/node_modules/yocto-queue/index.js
805
- chunkKEDZU7VZ_cjs.init_cjs_shims();
805
+ chunkPB6WTEP5_cjs.init_cjs_shims();
806
806
  var Node = class {
807
807
  value;
808
808
  next;
@@ -1000,13 +1000,13 @@ function locatePathSync(paths, {
1000
1000
  }
1001
1001
 
1002
1002
  // ../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js
1003
- chunkKEDZU7VZ_cjs.init_cjs_shims();
1003
+ chunkPB6WTEP5_cjs.init_cjs_shims();
1004
1004
  function toPath2(urlOrPath) {
1005
1005
  return urlOrPath instanceof URL ? url.fileURLToPath(urlOrPath) : urlOrPath;
1006
1006
  }
1007
1007
 
1008
1008
  // ../../node_modules/.pnpm/path-exists@5.0.0/node_modules/path-exists/index.js
1009
- chunkKEDZU7VZ_cjs.init_cjs_shims();
1009
+ chunkPB6WTEP5_cjs.init_cjs_shims();
1010
1010
 
1011
1011
  // ../../node_modules/.pnpm/find-up@7.0.0/node_modules/find-up/index.js
1012
1012
  var findUpStop = Symbol("findUpStop");
@@ -1208,15 +1208,15 @@ var PackageManager = class _PackageManager {
1208
1208
 
1209
1209
  Object.defineProperty(exports, "FileManager", {
1210
1210
  enumerable: true,
1211
- get: function () { return chunkTW6NZHX6_cjs.FileManager; }
1211
+ get: function () { return chunkMXC77W6F_cjs.FileManager; }
1212
1212
  });
1213
1213
  Object.defineProperty(exports, "getSource", {
1214
1214
  enumerable: true,
1215
- get: function () { return chunkTW6NZHX6_cjs.getSource; }
1215
+ get: function () { return chunkMXC77W6F_cjs.getSource; }
1216
1216
  });
1217
1217
  Object.defineProperty(exports, "processFiles", {
1218
1218
  enumerable: true,
1219
- get: function () { return chunkTW6NZHX6_cjs.processFiles; }
1219
+ get: function () { return chunkMXC77W6F_cjs.processFiles; }
1220
1220
  });
1221
1221
  exports.BaseGenerator = BaseGenerator;
1222
1222
  exports.PackageManager = PackageManager;
package/dist/logger.cjs CHANGED
@@ -1,25 +1,25 @@
1
1
  'use strict';
2
2
 
3
- var chunkUKZDPZZN_cjs = require('./chunk-UKZDPZZN.cjs');
4
- require('./chunk-KEDZU7VZ.cjs');
3
+ var chunkOH3WQGPX_cjs = require('./chunk-OH3WQGPX.cjs');
4
+ require('./chunk-PB6WTEP5.cjs');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "LogMapper", {
9
9
  enumerable: true,
10
- get: function () { return chunkUKZDPZZN_cjs.LogMapper; }
10
+ get: function () { return chunkOH3WQGPX_cjs.LogMapper; }
11
11
  });
12
12
  Object.defineProperty(exports, "createLogger", {
13
13
  enumerable: true,
14
- get: function () { return chunkUKZDPZZN_cjs.createLogger; }
14
+ get: function () { return chunkOH3WQGPX_cjs.createLogger; }
15
15
  });
16
16
  Object.defineProperty(exports, "randomCliColour", {
17
17
  enumerable: true,
18
- get: function () { return chunkUKZDPZZN_cjs.randomCliColour; }
18
+ get: function () { return chunkOH3WQGPX_cjs.randomCliColour; }
19
19
  });
20
20
  Object.defineProperty(exports, "randomColour", {
21
21
  enumerable: true,
22
- get: function () { return chunkUKZDPZZN_cjs.randomColour; }
22
+ get: function () { return chunkOH3WQGPX_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 chunkTW6NZHX6_cjs = require('./chunk-TW6NZHX6.cjs');
4
- var chunk7CUHIALJ_cjs = require('./chunk-7CUHIALJ.cjs');
5
- var chunkKEDZU7VZ_cjs = require('./chunk-KEDZU7VZ.cjs');
3
+ var chunkMXC77W6F_cjs = require('./chunk-MXC77W6F.cjs');
4
+ var chunkO2Y6XX3B_cjs = require('./chunk-O2Y6XX3B.cjs');
5
+ var chunkPB6WTEP5_cjs = require('./chunk-PB6WTEP5.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
- chunkKEDZU7VZ_cjs.init_cjs_shims();
13
+ chunkPB6WTEP5_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 chunk7CUHIALJ_cjs.camelCase(name || result.name);
24
+ return chunkO2Y6XX3B_cjs.camelCase(name || result.name);
25
25
  }
26
26
  if (result.type === "type") {
27
- return chunk7CUHIALJ_cjs.pascalCase(result.name);
27
+ return chunkO2Y6XX3B_cjs.pascalCase(result.name);
28
28
  }
29
29
  if (result.type === "function") {
30
- return chunk7CUHIALJ_cjs.camelCase(result.name);
30
+ return chunkO2Y6XX3B_cjs.camelCase(result.name);
31
31
  }
32
- return chunk7CUHIALJ_cjs.camelCase(result.name);
32
+ return chunkO2Y6XX3B_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 chunkTW6NZHX6_cjs.getSource(chunkTW6NZHX6_cjs.createFile(file), { logger: mockedLogger });
68
+ const source = await chunkMXC77W6F_cjs.getSource(chunkMXC77W6F_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 chunkKEDZU7VZ_cjs = require('./chunk-KEDZU7VZ.cjs');
3
+ var chunkPB6WTEP5_cjs = require('./chunk-PB6WTEP5.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
- chunkKEDZU7VZ_cjs.init_cjs_shims();
15
+ chunkPB6WTEP5_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-OGHA3VNC.cjs.map
763
- //# sourceMappingURL=prompt-OGHA3VNC.cjs.map
762
+ //# sourceMappingURL=prompt-HPGUKPZV.cjs.map
763
+ //# sourceMappingURL=prompt-HPGUKPZV.cjs.map