@kubb/core 2.19.1 → 2.19.2
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/{chunk-VPRSHKTS.cjs → chunk-DPZ5ZDFL.cjs} +29 -29
- package/dist/{chunk-POG2VAGZ.cjs → chunk-HILNVOAJ.cjs} +3 -3
- package/dist/{chunk-POG2VAGZ.cjs.map → chunk-HILNVOAJ.cjs.map} +1 -1
- package/dist/{chunk-Y5YDGV6S.cjs → chunk-NKNMDNDN.cjs} +5 -5
- package/dist/{chunk-TI74TXXH.cjs → chunk-TRBBVCNH.cjs} +156 -156
- package/dist/{chunk-EMQSI7G5.cjs → chunk-YXVYYKW5.cjs} +12 -12
- package/dist/{chunk-GJET56BT.cjs → chunk-ZHIK5P7G.cjs} +18 -18
- package/dist/index.cjs +137 -137
- package/dist/logger.cjs +3 -3
- package/dist/mocks.cjs +8 -8
- package/dist/transformers.cjs +4 -4
- package/dist/utils.cjs +4 -4
- package/package.json +8 -8
- /package/dist/{chunk-VPRSHKTS.cjs.map → chunk-DPZ5ZDFL.cjs.map} +0 -0
- /package/dist/{chunk-Y5YDGV6S.cjs.map → chunk-NKNMDNDN.cjs.map} +0 -0
- /package/dist/{chunk-TI74TXXH.cjs.map → chunk-TRBBVCNH.cjs.map} +0 -0
- /package/dist/{chunk-EMQSI7G5.cjs.map → chunk-YXVYYKW5.cjs.map} +0 -0
- /package/dist/{chunk-GJET56BT.cjs.map → chunk-ZHIK5P7G.cjs.map} +0 -0
|
@@ -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
|
|
4
|
+
var _chunkNKNMDNDNcjs = require('./chunk-NKNMDNDN.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkHILNVOAJcjs = require('./chunk-HILNVOAJ.cjs');
|
|
11
11
|
|
|
12
12
|
// src/utils/index.ts
|
|
13
|
-
|
|
13
|
+
_chunkHILNVOAJcjs.init_cjs_shims.call(void 0, );
|
|
14
14
|
|
|
15
15
|
// src/utils/FunctionParams.ts
|
|
16
|
-
|
|
16
|
+
_chunkHILNVOAJcjs.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
|
-
|
|
20
|
+
_chunkHILNVOAJcjs.__privateAdd.call(void 0, this, _items, []);
|
|
21
21
|
return this;
|
|
22
22
|
}
|
|
23
23
|
get items() {
|
|
24
|
-
return
|
|
24
|
+
return _chunkHILNVOAJcjs.__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) =>
|
|
31
|
+
item.filter(Boolean).forEach((it) => _chunkHILNVOAJcjs.__privateGet.call(void 0, this, _items).push(it));
|
|
32
32
|
return this;
|
|
33
33
|
}
|
|
34
|
-
|
|
34
|
+
_chunkHILNVOAJcjs.__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 =
|
|
44
|
+
name = _chunkHILNVOAJcjs.__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 =
|
|
46
|
+
type = _chunkHILNVOAJcjs.__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 =
|
|
58
|
+
const sortedData = _chunkHILNVOAJcjs.__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 =
|
|
65
|
+
const subItems = _chunkHILNVOAJcjs.__privateMethod.call(void 0, _a2 = _FunctionParams, _orderItems, orderItems_fn).call(_a2, item);
|
|
66
66
|
const objectItem = _FunctionParams.toObject(subItems);
|
|
67
|
-
return
|
|
67
|
+
return _chunkHILNVOAJcjs.__privateMethod.call(void 0, _b = _FunctionParams, _addParams, addParams_fn).call(_b, acc, objectItem);
|
|
68
68
|
}
|
|
69
|
-
return
|
|
69
|
+
return _chunkHILNVOAJcjs.__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 =
|
|
74
|
+
const items = _chunkHILNVOAJcjs.__privateMethod.call(void 0, _a = _FunctionParams, _orderItems, orderItems_fn).call(_a, _chunkHILNVOAJcjs.__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 =
|
|
79
|
+
const items = _chunkHILNVOAJcjs.__privateMethod.call(void 0, _a = _FunctionParams, _orderItems, orderItems_fn).call(_a, _chunkHILNVOAJcjs.__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
|
|
86
|
+
return _chunkNKNMDNDNcjs.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 :
|
|
115
|
+
const parameterName = name.startsWith("{") ? name : _chunkNKNMDNDNcjs.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
|
-
|
|
128
|
-
|
|
127
|
+
_chunkHILNVOAJcjs.__privateAdd.call(void 0, _FunctionParams, _orderItems);
|
|
128
|
+
_chunkHILNVOAJcjs.__privateAdd.call(void 0, _FunctionParams, _addParams);
|
|
129
129
|
var FunctionParams = _FunctionParams;
|
|
130
130
|
|
|
131
131
|
// src/utils/promise.ts
|
|
132
|
-
|
|
132
|
+
_chunkHILNVOAJcjs.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
|
-
|
|
144
|
+
_chunkHILNVOAJcjs.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
|
-
|
|
169
|
+
_chunkHILNVOAJcjs.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
|
-
|
|
179
|
+
_chunkHILNVOAJcjs.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
|
-
|
|
200
|
+
_chunkHILNVOAJcjs.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(
|
|
267
|
+
const pathParam = replacer ? replacer(_chunkNKNMDNDNcjs.camelCase.call(void 0, curr)) : _chunkNKNMDNDNcjs.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(
|
|
283
|
+
const pathParam = replacer ? replacer(_chunkNKNMDNDNcjs.camelCase.call(void 0, item)) : _chunkNKNMDNDNcjs.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
|
-
|
|
298
|
+
_chunkHILNVOAJcjs.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-
|
|
322
|
+
//# sourceMappingURL=chunk-DPZ5ZDFL.cjs.map
|
|
@@ -62,9 +62,9 @@ var __privateMethod = (obj, member, method) => {
|
|
|
62
62
|
return method;
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
-
// ../../node_modules/.pnpm/tsup@8.0.2_@microsoft+api-extractor@7.
|
|
65
|
+
// ../../node_modules/.pnpm/tsup@8.0.2_@microsoft+api-extractor@7.45.1_@types+node@20.12.12__postcss@8.4.38_ts-node@10.9._dbakwvoopp4os6l2ushl5qc5y4/node_modules/tsup/assets/cjs_shims.js
|
|
66
66
|
var init_cjs_shims = __esm({
|
|
67
|
-
"../../node_modules/.pnpm/tsup@8.0.2_@microsoft+api-extractor@7.
|
|
67
|
+
"../../node_modules/.pnpm/tsup@8.0.2_@microsoft+api-extractor@7.45.1_@types+node@20.12.12__postcss@8.4.38_ts-node@10.9._dbakwvoopp4os6l2ushl5qc5y4/node_modules/tsup/assets/cjs_shims.js"() {
|
|
68
68
|
"use strict";
|
|
69
69
|
}
|
|
70
70
|
});
|
|
@@ -80,4 +80,4 @@ var init_cjs_shims = __esm({
|
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.__publicField = __publicField; exports.__privateGet = __privateGet; exports.__privateAdd = __privateAdd; exports.__privateSet = __privateSet; exports.__privateWrapper = __privateWrapper; exports.__privateMethod = __privateMethod; exports.init_cjs_shims = init_cjs_shims;
|
|
83
|
-
//# sourceMappingURL=chunk-
|
|
83
|
+
//# sourceMappingURL=chunk-HILNVOAJ.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.0.2_@microsoft+api-extractor@7.
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.0.2_@microsoft+api-extractor@7.45.1_@types+node@20.12.12__postcss@8.4.38_ts-node@10.9._dbakwvoopp4os6l2ushl5qc5y4/node_modules/tsup/assets/cjs_shims.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA","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,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
|
|
3
|
+
var _chunkHILNVOAJcjs = require('./chunk-HILNVOAJ.cjs');
|
|
4
4
|
|
|
5
5
|
// ../../node_modules/.pnpm/natural-orderby@3.0.2/node_modules/natural-orderby/dist/index.js
|
|
6
|
-
|
|
6
|
+
_chunkHILNVOAJcjs.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
|
-
|
|
309
|
+
_chunkHILNVOAJcjs.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
|
-
|
|
312
|
+
_chunkHILNVOAJcjs.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-
|
|
461
|
+
//# sourceMappingURL=chunk-NKNMDNDN.cjs.map
|