@kubb/plugin-react-query 5.6.0-canary.20261022T212613 → 5.6.0-canary.20261022T234736

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
@@ -263,12 +263,23 @@ function resolveOperationTypeNames(node, resolver, options = {}) {
263
263
  *
264
264
  * When `pascal` is `true` the first word is also capitalized (PascalCase), otherwise only subsequent words are.
265
265
  */
266
- function toCamelOrPascal(text, pascal) {
266
+ function convert(text, pascal) {
267
267
  return text.trim().replace(/([a-z\d])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").replace(/(\d)([a-z])/g, "$1 $2").split(/[\s\-_./\\:]+/).filter(Boolean).map((word, i) => {
268
268
  if (word.length > 1 && word === word.toUpperCase()) return word;
269
269
  return (i === 0 && !pascal ? word.charAt(0).toLowerCase() : word.charAt(0).toUpperCase()) + word.slice(1);
270
270
  }).join("").replace(/[^a-zA-Z0-9]/g, "");
271
271
  }
272
+ const cache = /* @__PURE__ */ new Map();
273
+ const cacheLimit = 1e4;
274
+ function toCamelOrPascal(text, pascal) {
275
+ const key = `${pascal ? "P" : "c"}${text}`;
276
+ const cached = cache.get(key);
277
+ if (cached !== void 0) return cached;
278
+ const result = convert(text, pascal);
279
+ if (cache.size >= cacheLimit) cache.clear();
280
+ cache.set(key, result);
281
+ return result;
282
+ }
272
283
  /**
273
284
  * Converts `text` to camelCase.
274
285
  *
@@ -347,7 +358,7 @@ var compatibility = {
347
358
  };
348
359
  //#endregion
349
360
  //#region package.json
350
- var version = "5.6.0-canary.20261022T212613";
361
+ var version = "5.6.0-canary.20261022T234736";
351
362
  //#endregion
352
363
  //#region ../../internals/client/src/resolveClient.ts
353
364
  /**