@kubb/mcp 5.0.0-beta.96 → 5.0.0-beta.98

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
@@ -38,7 +38,7 @@ let node_module = require("node:module");
38
38
  let node_process = require("node:process");
39
39
  node_process = __toESM(node_process, 1);
40
40
  //#region package.json
41
- var version = "5.0.0-beta.96";
41
+ var version = "5.0.0-beta.98";
42
42
  //#endregion
43
43
  //#region src/schemas/generateSchema.ts
44
44
  const generateSchema = valibot.object({
@@ -688,10 +688,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
688
688
  }
689
689
  return;
690
690
  }
691
- const [c, ...l] = e.split("/");
692
- const y = "@" === c[0] ? `${c}/${l.shift()}` : c;
693
- const E = l.join("/");
694
- const w = se();
691
+ const [c, ...l] = e.split("/"), y = "@" === c[0] ? `${c}/${l.shift()}` : c, E = l.join("/"), w = se();
695
692
  if (w) {
696
693
  const { resolveRequest: n } = w;
697
694
  try {
@@ -877,10 +874,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
877
874
  e.jsx && (e.jsx = e.jsx.toLowerCase()), e.moduleDetection && (e.moduleDetection = e.moduleDetection.toLowerCase()), e.importsNotUsedAsValues && (e.importsNotUsedAsValues = e.importsNotUsedAsValues.toLowerCase()), e.newLine && (e.newLine = e.newLine.toLowerCase()), e.esModuleInterop && (e.allowSyntheticDefaultImports ??= !0), e.verbatimModuleSyntax && (e.isolatedModules ??= !0, e.preserveConstEnums ??= !0), e.isolatedModules && (e.preserveConstEnums ??= !0), e.rewriteRelativeImportExtensions && (e.allowImportingTsExtensions ??= !0), e.lib && (e.lib = e.lib.map((e) => e.toLowerCase())), e.checkJs && (e.allowJs ??= !0);
878
875
  }, "normalizeCompilerOptions");
879
876
  const ve = r((e, t = /* @__PURE__ */ new Map()) => {
880
- const i = a.resolve(e);
881
- const n = fe(i, t);
882
- const c = a.dirname(i);
883
- const { compilerOptions: l } = n;
877
+ const i = a.resolve(e), n = fe(i, t), c = a.dirname(i), { compilerOptions: l } = n;
884
878
  if (l) {
885
879
  for (const e of ge) {
886
880
  const t = l[e];
@@ -925,9 +919,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
925
919
  t += n === a ? n.toLowerCase() : a;
926
920
  }
927
921
  return t;
928
- }, "invertCase");
929
- const be = /* @__PURE__ */ new Map();
930
- const ke = _e((e, t) => {
922
+ }, "invertCase"), be = /* @__PURE__ */ new Map(), ke = _e((e, t) => {
931
923
  const i = C.join(e, `.is-fs-case-sensitive-test-${process.pid}`);
932
924
  try {
933
925
  return t.writeFileSync(i, ""), !t.existsSync(Ee(i));
@@ -936,24 +928,20 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
936
928
  t.unlinkSync(i);
937
929
  } catch {}
938
930
  }
939
- }, "checkDirectoryCaseWithWrite");
940
- const we = _e((e, t, i) => {
931
+ }, "checkDirectoryCaseWithWrite"), we = _e((e, t, i) => {
941
932
  try {
942
933
  return ke(e, i);
943
934
  } catch (e) {
944
935
  if (void 0 === t) return ke(w.tmpdir(), i);
945
936
  throw e;
946
937
  }
947
- }, "checkDirectoryCaseWithFallback");
948
- const Ce = _e((e, t = E, i = !0) => {
938
+ }, "checkDirectoryCaseWithFallback"), Ce = _e((e, t = E, i = !0) => {
949
939
  const n = null != e ? e : process.cwd();
950
940
  if (i && be.has(n)) return be.get(n);
951
941
  let a;
952
942
  const c = Ee(n);
953
943
  return a = c !== n && t.existsSync(n) ? !t.existsSync(c) : we(n, e, t), i && be.set(n, a), a;
954
- }, "isFsCaseSensitive");
955
- const { join: Se } = a.posix;
956
- const Ie = {
944
+ }, "isFsCaseSensitive"), { join: Se } = a.posix, Ie = {
957
945
  ts: [
958
946
  ".ts",
959
947
  ".tsx",
@@ -961,8 +949,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
961
949
  ],
962
950
  cts: [".cts", ".d.cts"],
963
951
  mts: [".mts", ".d.mts"]
964
- };
965
- const Te = r((e) => {
952
+ }, Te = r((e) => {
966
953
  const t = [...Ie.ts];
967
954
  const i = [...Ie.cts];
968
955
  const n = [...Ie.mts];
@@ -971,41 +958,24 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
971
958
  ...i,
972
959
  ...n
973
960
  ];
974
- }, "getSupportedExtensions");
975
- const Re = r((e) => {
961
+ }, "getSupportedExtensions"), Re = r((e) => {
976
962
  const t = [];
977
963
  if (!e) return t;
978
964
  const { outDir: i, declarationDir: n } = e;
979
965
  return i && t.push(i), n && t.push(n), t;
980
- }, "getDefaultExcludeSpec");
981
- const Ae = r((e) => e.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`), "escapeForRegexp");
982
- const Le = `(?!(${[
966
+ }, "getDefaultExcludeSpec"), Ae = r((e) => e.replaceAll(/[.*+?^${}()|[\]\\]/g, String.raw`\$&`), "escapeForRegexp"), Le = `(?!(${[
983
967
  "node_modules",
984
968
  "bower_components",
985
969
  "jspm_packages"
986
- ].join("|")})(/|$))`;
987
- const Oe = /(?:^|\/)[^.*?]+$/;
988
- const De = "**/*";
989
- const Ve = "[^/]";
990
- const Ue = "[^./]";
991
- const Me = "win32" === process.platform;
992
- const je = r(({ config: e, path: t }, i = Ce()) => {
970
+ ].join("|")})(/|$))`, Oe = /(?:^|\/)[^.*?]+$/, De = "**/*", Ve = "[^/]", Ue = "[^./]", Me = "win32" === process.platform, je = r(({ config: e, path: t }, i = Ce()) => {
993
971
  if ("extends" in e) throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");
994
972
  if (!a.isAbsolute(t)) throw new Error("The tsconfig path must be absolute");
995
973
  Me && (t = h(t));
996
- const n = a.dirname(t);
997
- const { files: c, include: l, exclude: y, compilerOptions: E } = e;
998
- const w = r((e) => a.isAbsolute(e) ? e : Se(n, e), "resolvePattern");
999
- const C = null == c ? void 0 : c.map(w);
1000
- const S = Te(E);
1001
- const I = i ? "" : "i";
1002
- const N = (y || Re(E)).map((e) => {
974
+ const n = a.dirname(t), { files: c, include: l, exclude: y, compilerOptions: E } = e, w = r((e) => a.isAbsolute(e) ? e : Se(n, e), "resolvePattern"), C = null == c ? void 0 : c.map(w), S = Te(E), I = i ? "" : "i", N = (y || Re(E)).map((e) => {
1003
975
  const t = w(e);
1004
976
  const i = Ae(t).replaceAll(String.raw`\*\*/`, "(.+/)?").replaceAll(String.raw`\*`, `${Ve}*`).replaceAll(String.raw`\?`, Ve);
1005
977
  return new RegExp(`^${i}($|/)`, I);
1006
- });
1007
- const O = c || l ? l : [De];
1008
- const j = O ? O.map((e) => {
978
+ }), O = c || l ? l : [De], j = O ? O.map((e) => {
1009
979
  let t = w(e);
1010
980
  Oe.test(t) && (t = Se(t, De));
1011
981
  const i = Ae(t).replaceAll(String.raw`/\*\*`, `(/${Le}${Ue}${Ve}*)*?`).replaceAll(/(\/)?\\\*/g, (e, t) => {
@@ -1018,8 +988,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
1018
988
  if (!a.isAbsolute(t)) throw new Error("filePath must be absolute");
1019
989
  return Me && (t = h(t)), null != C && C.includes(t) || S.some((e) => t.endsWith(e)) && !N.some((e) => e.test(t)) && j && j.some((e) => e.test(t)) ? e : void 0;
1020
990
  };
1021
- }, "createFilesMatcher");
1022
- const Fe = r((e, t, i) => {
991
+ }, "createFilesMatcher"), Fe = r((e, t, i) => {
1023
992
  const n = a.resolve(e);
1024
993
  let c = h(e);
1025
994
  for (;;) {
@@ -1037,12 +1006,10 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
1037
1006
  if (C === w) return;
1038
1007
  c = C;
1039
1008
  }
1040
- }, "findConfigApplicable");
1041
- const Be = r((e = process.cwd(), t = "tsconfig.json", i = /* @__PURE__ */ new Map(), n = !1) => {
1009
+ }, "findConfigApplicable"), Be = r((e = process.cwd(), t = "tsconfig.json", i = /* @__PURE__ */ new Map(), n = !1) => {
1042
1010
  var a;
1043
1011
  return n ? null == (a = Fe(e, t, i)) ? void 0 : a.path : j(h(e), t, i);
1044
- }, "findTsconfig");
1045
- const $e = r((e = process.cwd(), t = "tsconfig.json", i = /* @__PURE__ */ new Map(), n = !1) => {
1012
+ }, "findTsconfig"), $e = r((e = process.cwd(), t = "tsconfig.json", i = /* @__PURE__ */ new Map(), n = !1) => {
1046
1013
  var a;
1047
1014
  if (!n) {
1048
1015
  const n = Be(e, t, i);
@@ -1053,13 +1020,10 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
1053
1020
  };
1054
1021
  }
1055
1022
  return null != (a = Fe(e, t, i)) ? a : null;
1056
- }, "getTsconfig");
1057
- const qe = /\*/g;
1058
- const Ge = r((e, t) => {
1023
+ }, "getTsconfig"), qe = /\*/g, Ge = r((e, t) => {
1059
1024
  const i = e.match(qe);
1060
1025
  if (i && i.length > 1) throw new Error(t);
1061
- }, "assertStarCount");
1062
- const Ke = r((e) => {
1026
+ }, "assertStarCount"), Ke = r((e) => {
1063
1027
  if (e.includes("*")) {
1064
1028
  const [t, i] = e.split("*");
1065
1029
  return {
@@ -1068,9 +1032,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
1068
1032
  };
1069
1033
  }
1070
1034
  return e;
1071
- }, "parsePattern");
1072
- const He = r(({ prefix: e, suffix: t }, i) => i.startsWith(e) && i.endsWith(t), "isPatternMatch");
1073
- const ze = r((e, t, i) => Object.entries(e).map(([e, n]) => (Ge(e, `Pattern '${e}' can have at most one '*' character.`), {
1035
+ }, "parsePattern"), He = r(({ prefix: e, suffix: t }, i) => i.startsWith(e) && i.endsWith(t), "isPatternMatch"), ze = r((e, t, i) => Object.entries(e).map(([e, n]) => (Ge(e, `Pattern '${e}' can have at most one '*' character.`), {
1074
1036
  pattern: Ke(e),
1075
1037
  substitutions: n.map((n) => {
1076
1038
  if (Ge(n, `Substitution '${n}' in pattern '${e}' can have at most one '*' character.`), !t && !F.test(n) && !a.isAbsolute(n)) throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");
@@ -1157,15 +1119,13 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
1157
1119
  if (void 0 === e || e === n) return n;
1158
1120
  throw s(i, "\"exports\" cannot contain some keys starting with \".\" and some not");
1159
1121
  }, void 0))(e)) && (e = { ".": e });
1160
- const [c, l] = A(e, t);
1161
- const y = f(E.Export, e[c], t, a, l);
1122
+ const [c, l] = A(e, t), y = f(E.Export, e[c], t, a, l);
1162
1123
  if (0 === y.length) throw s("ERR_PACKAGE_PATH_NOT_EXPORTED", "." === t ? "No \"exports\" main defined" : `Package subpath '${t}' is not defined by "exports"`);
1163
1124
  for (const e of y) if (!e.startsWith("./") && !C.test(e)) throw s(n, `Invalid "exports" target "${e}" defined in the package config`);
1164
1125
  return y;
1165
1126
  }, t.resolveImports = (e, t, i) => {
1166
1127
  if (!e) throw new Error("\"imports\" is required");
1167
- const [n, a] = A(e, t);
1168
- const c = f(E.Import, e[n], t, i, a);
1128
+ const [n, a] = A(e, t), c = f(E.Import, e[n], t, i, a);
1169
1129
  if (0 === c.length) throw s("ERR_PACKAGE_IMPORT_NOT_DEFINED", `Package import specifier "${t}" is not defined in package`);
1170
1130
  return c;
1171
1131
  };
@@ -4796,9 +4756,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
4796
4756
  const t = isErrorStackTraceLimitWritable();
4797
4757
  return t && (ht = Error.stackTraceLimit, Error.stackTraceLimit = Number.POSITIVE_INFINITY), Error.captureStackTrace(e), t && (Error.stackTraceLimit = ht), e;
4798
4758
  });
4799
- const pt = {}.hasOwnProperty;
4800
- const { ERR_INVALID_PACKAGE_CONFIG: ut } = ot;
4801
- const dt = /* @__PURE__ */ new Map();
4759
+ const pt = {}.hasOwnProperty, { ERR_INVALID_PACKAGE_CONFIG: ut } = ot, dt = /* @__PURE__ */ new Map();
4802
4760
  function read(e, { base: t, specifier: i }) {
4803
4761
  const n = dt.get(e);
4804
4762
  if (n) return n;
@@ -4849,9 +4807,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
4849
4807
  function getPackageType(e) {
4850
4808
  return getPackageScopeConfig(e).type;
4851
4809
  }
4852
- const { ERR_UNKNOWN_FILE_EXTENSION: ft } = ot;
4853
- const mt = {}.hasOwnProperty;
4854
- const gt = {
4810
+ const { ERR_UNKNOWN_FILE_EXTENSION: ft } = ot, mt = {}.hasOwnProperty, gt = {
4855
4811
  __proto__: null,
4856
4812
  ".cjs": "commonjs",
4857
4813
  ".js": "module",
@@ -4905,16 +4861,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
4905
4861
  function getConditionsSet(e) {
4906
4862
  return yt;
4907
4863
  }
4908
- const _t = RegExp.prototype[Symbol.replace];
4909
- const { ERR_INVALID_MODULE_SPECIFIER: Et, ERR_INVALID_PACKAGE_CONFIG: bt, ERR_INVALID_PACKAGE_TARGET: kt, ERR_MODULE_NOT_FOUND: wt, ERR_PACKAGE_IMPORT_NOT_DEFINED: Ct, ERR_PACKAGE_PATH_NOT_EXPORTED: St, ERR_UNSUPPORTED_DIR_IMPORT: It, ERR_UNSUPPORTED_RESOLVE_REQUEST: Tt } = ot;
4910
- const Rt = {}.hasOwnProperty;
4911
- const At = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i;
4912
- const Pt = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i;
4913
- const Lt = /^\.|%|\\/;
4914
- const Nt = /\*/g;
4915
- const Ot = /%2f|%5c/i;
4916
- const Dt = /* @__PURE__ */ new Set();
4917
- const Vt = /[/\\]{2}/;
4864
+ const _t = RegExp.prototype[Symbol.replace], { ERR_INVALID_MODULE_SPECIFIER: Et, ERR_INVALID_PACKAGE_CONFIG: bt, ERR_INVALID_PACKAGE_TARGET: kt, ERR_MODULE_NOT_FOUND: wt, ERR_PACKAGE_IMPORT_NOT_DEFINED: Ct, ERR_PACKAGE_PATH_NOT_EXPORTED: St, ERR_UNSUPPORTED_DIR_IMPORT: It, ERR_UNSUPPORTED_RESOLVE_REQUEST: Tt } = ot, Rt = {}.hasOwnProperty, At = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i, Pt = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i, Lt = /^\.|%|\\/, Nt = /\*/g, Ot = /%2f|%5c/i, Dt = /* @__PURE__ */ new Set(), Vt = /[/\\]{2}/;
4918
4865
  function emitInvalidSegmentDeprecation(e, t, i, n, a, c, l) {
4919
4866
  if (Xe.noDeprecation) return;
4920
4867
  const y = (0, Qe.fileURLToPath)(n);
@@ -5154,8 +5101,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
5154
5101
  packageSubpath: "." + (-1 === i ? "" : e.slice(i)),
5155
5102
  isScoped: a
5156
5103
  };
5157
- }(e, t);
5158
- const l = getPackageScopeConfig(t);
5104
+ }(e, t), l = getPackageScopeConfig(t);
5159
5105
  if (l.exists) {
5160
5106
  const e = (0, Qe.pathToFileURL)(l.pjsonPath);
5161
5107
  if (l.name === n && void 0 !== l.exports && null !== l.exports) return packageExportsResolve(e, a, l, t, i);
@@ -5224,8 +5170,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
5224
5170
  throw n.url = String(e), n;
5225
5171
  }
5226
5172
  {
5227
- const t = (0, $e.realpathSync)(i);
5228
- const { search: n, hash: a } = e;
5173
+ const t = (0, $e.realpathSync)(i), { search: n, hash: a } = e;
5229
5174
  (e = (0, Qe.pathToFileURL)(t + (i.endsWith(et.sep) ? "/" : ""))).search = n, e.hash = a;
5230
5175
  }
5231
5176
  return e;
@@ -5891,8 +5836,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
5891
5836
  }
5892
5837
  function next() {
5893
5838
  if (N.exports && N.exports.__JITI_ERROR__) {
5894
- const { filename: e, line: i, column: n, code: a, message: c } = N.exports.__JITI_ERROR__;
5895
- const l = /* @__PURE__ */ new Error(`${a}: ${c} \n ${`${e}:${i}:${n}`}`);
5839
+ const { filename: e, line: i, column: n, code: a, message: c } = N.exports.__JITI_ERROR__, l = /* @__PURE__ */ new Error(`${a}: ${c} \n ${`${e}:${i}:${n}`}`);
5896
5840
  Error.captureStackTrace(l, jitiRequire), t.onError(l);
5897
5841
  }
5898
5842
  N.loaded = !0;
@@ -5941,8 +5885,7 @@ var import_jiti = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((expor
5941
5885
  const c = a.alias && Object.keys(a.alias).length > 0 ? normalizeAliases(a.alias || {}) : void 0;
5942
5886
  let l;
5943
5887
  if (a.tsconfigPaths) {
5944
- const { getTsconfig: t, createPathsMatcher: i } = __webpack_require__("./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs");
5945
- const n = t("string" == typeof a.tsconfigPaths ? a.tsconfigPaths : pathe_M_eThtNZ_dirname(e));
5888
+ const { getTsconfig: t, createPathsMatcher: i } = __webpack_require__("./node_modules/.pnpm/get-tsconfig@4.14.0/node_modules/get-tsconfig/dist/index.cjs"), n = t("string" == typeof a.tsconfigPaths ? a.tsconfigPaths : pathe_M_eThtNZ_dirname(e));
5946
5889
  n && (l = i(n));
5947
5890
  }
5948
5891
  const y = [