@kubb/core 2.19.0 → 2.19.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.
@@ -1,37 +1,37 @@
1
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 _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
2
 
3
3
 
4
- var _chunkBZWRLQGScjs = require('./chunk-BZWRLQGS.cjs');
4
+ var _chunkY5YDGV6Scjs = require('./chunk-Y5YDGV6S.cjs');
5
5
 
6
6
 
7
7
 
8
8
 
9
9
 
10
- var _chunkOCJ2ZNS2cjs = require('./chunk-OCJ2ZNS2.cjs');
10
+ var _chunkPOG2VAGZcjs = require('./chunk-POG2VAGZ.cjs');
11
11
 
12
12
  // src/utils/index.ts
13
- _chunkOCJ2ZNS2cjs.init_cjs_shims.call(void 0, );
13
+ _chunkPOG2VAGZcjs.init_cjs_shims.call(void 0, );
14
14
 
15
15
  // src/utils/FunctionParams.ts
16
- _chunkOCJ2ZNS2cjs.init_cjs_shims.call(void 0, );
16
+ _chunkPOG2VAGZcjs.init_cjs_shims.call(void 0, );
17
17
  var _items, _orderItems, orderItems_fn, _addParams, addParams_fn;
18
18
  var _FunctionParams = class _FunctionParams {
19
19
  constructor() {
20
- _chunkOCJ2ZNS2cjs.__privateAdd.call(void 0, this, _items, []);
20
+ _chunkPOG2VAGZcjs.__privateAdd.call(void 0, this, _items, []);
21
21
  return this;
22
22
  }
23
23
  get items() {
24
- return _chunkOCJ2ZNS2cjs.__privateGet.call(void 0, this, _items).flat();
24
+ return _chunkPOG2VAGZcjs.__privateGet.call(void 0, this, _items).flat();
25
25
  }
26
26
  add(item) {
27
27
  if (!item) {
28
28
  return this;
29
29
  }
30
30
  if (Array.isArray(item)) {
31
- item.filter(Boolean).forEach((it) => _chunkOCJ2ZNS2cjs.__privateGet.call(void 0, this, _items).push(it));
31
+ item.filter(Boolean).forEach((it) => _chunkPOG2VAGZcjs.__privateGet.call(void 0, this, _items).push(it));
32
32
  return this;
33
33
  }
34
- _chunkOCJ2ZNS2cjs.__privateGet.call(void 0, this, _items).push(item);
34
+ _chunkPOG2VAGZcjs.__privateGet.call(void 0, this, _items).push(item);
35
35
  return this;
36
36
  }
37
37
  static toObject(items) {
@@ -41,9 +41,9 @@ var _FunctionParams = class _FunctionParams {
41
41
  const required = _nullishCoalesce(items.every((item) => item.required), () => ( true));
42
42
  items.forEach((item) => {
43
43
  var _a, _b;
44
- name = _chunkOCJ2ZNS2cjs.__privateMethod.call(void 0, _a = _FunctionParams, _addParams, addParams_fn).call(_a, name, { ...item, type: void 0 });
44
+ name = _chunkPOG2VAGZcjs.__privateMethod.call(void 0, _a = _FunctionParams, _addParams, addParams_fn).call(_a, name, { ...item, type: void 0 });
45
45
  if (items.some((item2) => item2.type)) {
46
- type = _chunkOCJ2ZNS2cjs.__privateMethod.call(void 0, _b = _FunctionParams, _addParams, addParams_fn).call(_b, type, item);
46
+ type = _chunkPOG2VAGZcjs.__privateMethod.call(void 0, _b = _FunctionParams, _addParams, addParams_fn).call(_b, type, item);
47
47
  }
48
48
  });
49
49
  return {
@@ -55,35 +55,35 @@ var _FunctionParams = class _FunctionParams {
55
55
  }
56
56
  static toString(items) {
57
57
  var _a;
58
- const sortedData = _chunkOCJ2ZNS2cjs.__privateMethod.call(void 0, _a = _FunctionParams, _orderItems, orderItems_fn).call(_a, items);
58
+ const sortedData = _chunkPOG2VAGZcjs.__privateMethod.call(void 0, _a = _FunctionParams, _orderItems, orderItems_fn).call(_a, items);
59
59
  return sortedData.reduce((acc, item) => {
60
60
  var _a2, _b, _c;
61
61
  if (Array.isArray(item)) {
62
62
  if (item.length <= 0) {
63
63
  return acc;
64
64
  }
65
- const subItems = _chunkOCJ2ZNS2cjs.__privateMethod.call(void 0, _a2 = _FunctionParams, _orderItems, orderItems_fn).call(_a2, item);
65
+ const subItems = _chunkPOG2VAGZcjs.__privateMethod.call(void 0, _a2 = _FunctionParams, _orderItems, orderItems_fn).call(_a2, item);
66
66
  const objectItem = _FunctionParams.toObject(subItems);
67
- return _chunkOCJ2ZNS2cjs.__privateMethod.call(void 0, _b = _FunctionParams, _addParams, addParams_fn).call(_b, acc, objectItem);
67
+ return _chunkPOG2VAGZcjs.__privateMethod.call(void 0, _b = _FunctionParams, _addParams, addParams_fn).call(_b, acc, objectItem);
68
68
  }
69
- return _chunkOCJ2ZNS2cjs.__privateMethod.call(void 0, _c = _FunctionParams, _addParams, addParams_fn).call(_c, acc, item);
69
+ return _chunkPOG2VAGZcjs.__privateMethod.call(void 0, _c = _FunctionParams, _addParams, addParams_fn).call(_c, acc, item);
70
70
  }, []).join(", ");
71
71
  }
72
72
  toObject() {
73
73
  var _a;
74
- const items = _chunkOCJ2ZNS2cjs.__privateMethod.call(void 0, _a = _FunctionParams, _orderItems, orderItems_fn).call(_a, _chunkOCJ2ZNS2cjs.__privateGet.call(void 0, this, _items)).flat();
74
+ const items = _chunkPOG2VAGZcjs.__privateMethod.call(void 0, _a = _FunctionParams, _orderItems, orderItems_fn).call(_a, _chunkPOG2VAGZcjs.__privateGet.call(void 0, this, _items)).flat();
75
75
  return _FunctionParams.toObject(items);
76
76
  }
77
77
  toString() {
78
78
  var _a;
79
- const items = _chunkOCJ2ZNS2cjs.__privateMethod.call(void 0, _a = _FunctionParams, _orderItems, orderItems_fn).call(_a, _chunkOCJ2ZNS2cjs.__privateGet.call(void 0, this, _items));
79
+ const items = _chunkPOG2VAGZcjs.__privateMethod.call(void 0, _a = _FunctionParams, _orderItems, orderItems_fn).call(_a, _chunkPOG2VAGZcjs.__privateGet.call(void 0, this, _items));
80
80
  return _FunctionParams.toString(items);
81
81
  }
82
82
  };
83
83
  _items = new WeakMap();
84
84
  _orderItems = new WeakSet();
85
85
  orderItems_fn = function(items) {
86
- return _chunkBZWRLQGScjs.orderBy.call(void 0,
86
+ return _chunkY5YDGV6Scjs.orderBy.call(void 0,
87
87
  items.filter(Boolean),
88
88
  [
89
89
  (v) => {
@@ -112,7 +112,7 @@ addParams_fn = function(acc, item) {
112
112
  acc.push(`${type}${rest.default ? ` = ${rest.default}` : ""}`);
113
113
  return acc;
114
114
  }
115
- const parameterName = name.startsWith("{") ? name : _chunkBZWRLQGScjs.camelCase.call(void 0, name);
115
+ const parameterName = name.startsWith("{") ? name : _chunkY5YDGV6Scjs.camelCase.call(void 0, name);
116
116
  if (type) {
117
117
  if (required) {
118
118
  acc.push(`${parameterName}: ${type}${rest.default ? ` = ${rest.default}` : ""}`);
@@ -124,12 +124,12 @@ addParams_fn = function(acc, item) {
124
124
  }
125
125
  return acc;
126
126
  };
127
- _chunkOCJ2ZNS2cjs.__privateAdd.call(void 0, _FunctionParams, _orderItems);
128
- _chunkOCJ2ZNS2cjs.__privateAdd.call(void 0, _FunctionParams, _addParams);
127
+ _chunkPOG2VAGZcjs.__privateAdd.call(void 0, _FunctionParams, _orderItems);
128
+ _chunkPOG2VAGZcjs.__privateAdd.call(void 0, _FunctionParams, _addParams);
129
129
  var FunctionParams = _FunctionParams;
130
130
 
131
131
  // src/utils/promise.ts
132
- _chunkOCJ2ZNS2cjs.init_cjs_shims.call(void 0, );
132
+ _chunkPOG2VAGZcjs.init_cjs_shims.call(void 0, );
133
133
  function isPromise(result) {
134
134
  return !!result && typeof _optionalChain([result, 'optionalAccess', _4 => _4.then]) === "function";
135
135
  }
@@ -141,7 +141,7 @@ function isPromiseRejectedResult(result) {
141
141
  }
142
142
 
143
143
  // src/utils/renderTemplate.ts
144
- _chunkOCJ2ZNS2cjs.init_cjs_shims.call(void 0, );
144
+ _chunkPOG2VAGZcjs.init_cjs_shims.call(void 0, );
145
145
  function renderTemplate(template, data = void 0) {
146
146
  if (!data || !Object.keys(data).length) {
147
147
  return template.replace(/{{(.*?)}}/g, "");
@@ -166,7 +166,7 @@ function renderTemplate(template, data = void 0) {
166
166
  }
167
167
 
168
168
  // src/utils/timeout.ts
169
- _chunkOCJ2ZNS2cjs.init_cjs_shims.call(void 0, );
169
+ _chunkPOG2VAGZcjs.init_cjs_shims.call(void 0, );
170
170
  async function timeout(ms) {
171
171
  return new Promise((resolve) => {
172
172
  setTimeout(() => {
@@ -176,7 +176,7 @@ async function timeout(ms) {
176
176
  }
177
177
 
178
178
  // src/utils/uniqueName.ts
179
- _chunkOCJ2ZNS2cjs.init_cjs_shims.call(void 0, );
179
+ _chunkPOG2VAGZcjs.init_cjs_shims.call(void 0, );
180
180
  function getUniqueName(originalName, data) {
181
181
  let used = data[originalName] || 0;
182
182
  if (used) {
@@ -197,7 +197,7 @@ function setUniqueName(originalName, data) {
197
197
  }
198
198
 
199
199
  // src/utils/URLPath.ts
200
- _chunkOCJ2ZNS2cjs.init_cjs_shims.call(void 0, );
200
+ _chunkPOG2VAGZcjs.init_cjs_shims.call(void 0, );
201
201
  var URLPath = class {
202
202
  constructor(path) {
203
203
  this.path = path;
@@ -264,7 +264,7 @@ var URLPath = class {
264
264
  let newPath = this.path.replaceAll("{", "${");
265
265
  if (found) {
266
266
  newPath = found.reduce((prev, curr) => {
267
- const pathParam = replacer ? replacer(_chunkBZWRLQGScjs.camelCase.call(void 0, curr)) : _chunkBZWRLQGScjs.camelCase.call(void 0, curr);
267
+ const pathParam = replacer ? replacer(_chunkY5YDGV6Scjs.camelCase.call(void 0, curr)) : _chunkY5YDGV6Scjs.camelCase.call(void 0, curr);
268
268
  const replacement = `\${${pathParam}}`;
269
269
  return prev.replace(curr, replacement);
270
270
  }, this.path);
@@ -280,7 +280,7 @@ var URLPath = class {
280
280
  const params = {};
281
281
  found.forEach((item) => {
282
282
  item = item.replaceAll("{", "").replaceAll("}", "");
283
- const pathParam = replacer ? replacer(_chunkBZWRLQGScjs.camelCase.call(void 0, item)) : _chunkBZWRLQGScjs.camelCase.call(void 0, item);
283
+ const pathParam = replacer ? replacer(_chunkY5YDGV6Scjs.camelCase.call(void 0, item)) : _chunkY5YDGV6Scjs.camelCase.call(void 0, item);
284
284
  params[pathParam] = pathParam;
285
285
  }, this.path);
286
286
  return params;
@@ -295,7 +295,7 @@ var URLPath = class {
295
295
  };
296
296
 
297
297
  // src/utils/getParser.ts
298
- _chunkOCJ2ZNS2cjs.init_cjs_shims.call(void 0, );
298
+ _chunkPOG2VAGZcjs.init_cjs_shims.call(void 0, );
299
299
  async function getParser(language) {
300
300
  let modulePromise;
301
301
  switch (language) {
@@ -319,4 +319,4 @@ async function getParser(language) {
319
319
 
320
320
 
321
321
  exports.FunctionParams = FunctionParams; exports.isPromise = isPromise; exports.isPromiseFulfilledResult = isPromiseFulfilledResult; exports.isPromiseRejectedResult = isPromiseRejectedResult; exports.renderTemplate = renderTemplate; exports.timeout = timeout; exports.getUniqueName = getUniqueName; exports.setUniqueName = setUniqueName; exports.URLPath = URLPath; exports.getParser = getParser;
322
- //# sourceMappingURL=chunk-2OYYCPPZ.cjs.map
322
+ //# sourceMappingURL=chunk-VPRSHKTS.cjs.map
@@ -1,9 +1,9 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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
2
 
3
- var _chunkOCJ2ZNS2cjs = require('./chunk-OCJ2ZNS2.cjs');
3
+ var _chunkPOG2VAGZcjs = require('./chunk-POG2VAGZ.cjs');
4
4
 
5
5
  // ../../node_modules/.pnpm/natural-orderby@3.0.2/node_modules/natural-orderby/dist/index.js
6
- _chunkOCJ2ZNS2cjs.init_cjs_shims.call(void 0, );
6
+ _chunkPOG2VAGZcjs.init_cjs_shims.call(void 0, );
7
7
  var compareNumbers = function compareNumbers2(numberA, numberB) {
8
8
  if (numberA < numberB) {
9
9
  return -1;
@@ -306,10 +306,10 @@ function orderBy(collection, identifiers, orders) {
306
306
  }
307
307
 
308
308
  // src/transformers/casing.ts
309
- _chunkOCJ2ZNS2cjs.init_cjs_shims.call(void 0, );
309
+ _chunkPOG2VAGZcjs.init_cjs_shims.call(void 0, );
310
310
 
311
311
  // ../../node_modules/.pnpm/change-case@5.4.4/node_modules/change-case/dist/index.js
312
- _chunkOCJ2ZNS2cjs.init_cjs_shims.call(void 0, );
312
+ _chunkPOG2VAGZcjs.init_cjs_shims.call(void 0, );
313
313
  var SPLIT_LOWER_UPPER_RE = /([\p{Ll}\d])(\p{Lu})/gu;
314
314
  var SPLIT_UPPER_UPPER_RE = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu;
315
315
  var SPLIT_SEPARATE_NUMBER_RE = /(\d)\p{Ll}|(\p{L})\d/u;
@@ -458,4 +458,4 @@ natural-orderby/dist/index.js:
458
458
  * @license MIT
459
459
  *)
460
460
  */
461
- //# sourceMappingURL=chunk-BZWRLQGS.cjs.map
461
+ //# sourceMappingURL=chunk-Y5YDGV6S.cjs.map