@kubb/core 2.0.2 → 2.0.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.
- package/dist/{chunk-W2FP7ZWW.cjs → chunk-5VM4RVM5.cjs} +7 -7
- package/dist/{chunk-4A7WG6IA.js → chunk-5Z57Z2SO.js} +3 -3
- package/dist/{chunk-H47IKRXJ.cjs → chunk-ANP6S23V.cjs} +7 -7
- package/dist/{chunk-HIE46T3F.js → chunk-FGFTYKQS.js} +2 -2
- package/dist/{chunk-NAWI7UXW.js → chunk-FVK2YAOX.js} +2 -2
- package/dist/{chunk-7S67BJXQ.js → chunk-IYT5Y4GK.js} +2 -2
- package/dist/{chunk-PLVKILIY.cjs → chunk-MYRGSDE5.cjs} +7 -7
- package/dist/{chunk-54P4AWHI.js → chunk-NZHABRCW.js} +3 -3
- package/dist/chunk-NZHABRCW.js.map +1 -0
- package/dist/{chunk-K2H7BYQB.js → chunk-OTFKQILI.js} +3 -3
- package/dist/{chunk-WZQO3EPM.cjs → chunk-PAJNBSPO.cjs} +3 -3
- package/dist/chunk-PAJNBSPO.cjs.map +1 -0
- package/dist/{chunk-5TK7TMV6.cjs → chunk-QS3TLDZN.cjs} +5 -5
- package/dist/{chunk-E3ANGQ5N.cjs → chunk-TCVNI37N.cjs} +90 -90
- package/dist/{chunk-XDHI63G7.cjs → chunk-UICUGNAR.cjs} +4 -4
- package/dist/{chunk-XPOF4D5N.js → chunk-WT27HKBG.js} +2 -2
- package/dist/fs.cjs +9 -9
- package/dist/fs.js +3 -3
- package/dist/index.cjs +297 -297
- package/dist/index.js +7 -7
- package/dist/logger.cjs +7 -7
- package/dist/logger.js +3 -3
- package/dist/transformers.cjs +21 -21
- package/dist/transformers.js +5 -5
- package/dist/utils.cjs +12 -12
- package/dist/utils.js +3 -3
- package/package.json +3 -3
- package/dist/chunk-54P4AWHI.js.map +0 -1
- package/dist/chunk-WZQO3EPM.cjs.map +0 -1
- /package/dist/{chunk-W2FP7ZWW.cjs.map → chunk-5VM4RVM5.cjs.map} +0 -0
- /package/dist/{chunk-4A7WG6IA.js.map → chunk-5Z57Z2SO.js.map} +0 -0
- /package/dist/{chunk-H47IKRXJ.cjs.map → chunk-ANP6S23V.cjs.map} +0 -0
- /package/dist/{chunk-HIE46T3F.js.map → chunk-FGFTYKQS.js.map} +0 -0
- /package/dist/{chunk-NAWI7UXW.js.map → chunk-FVK2YAOX.js.map} +0 -0
- /package/dist/{chunk-7S67BJXQ.js.map → chunk-IYT5Y4GK.js.map} +0 -0
- /package/dist/{chunk-PLVKILIY.cjs.map → chunk-MYRGSDE5.cjs.map} +0 -0
- /package/dist/{chunk-K2H7BYQB.js.map → chunk-OTFKQILI.js.map} +0 -0
- /package/dist/{chunk-5TK7TMV6.cjs.map → chunk-QS3TLDZN.cjs.map} +0 -0
- /package/dist/{chunk-E3ANGQ5N.cjs.map → chunk-TCVNI37N.cjs.map} +0 -0
- /package/dist/{chunk-XDHI63G7.cjs.map → chunk-UICUGNAR.cjs.map} +0 -0
- /package/dist/{chunk-XPOF4D5N.js.map → chunk-WT27HKBG.js.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import mod, { createRequire } from 'module';
|
|
2
|
-
import { transformReservedWord, trimExtName, searchAndReplace } from './chunk-
|
|
3
|
-
import { setUniqueName, URLPath } from './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import { LogLevel, createLogger, p, randomCliColour } from './chunk-
|
|
6
|
-
import { read, getRelativePath, clean } from './chunk-
|
|
7
|
-
import { write } from './chunk-
|
|
8
|
-
import { __commonJS, init_esm_shims, __toESM, __privateAdd, __privateSet, __privateGet, __privateMethod, __require } from './chunk-
|
|
2
|
+
import { transformReservedWord, trimExtName, searchAndReplace } from './chunk-FGFTYKQS.js';
|
|
3
|
+
import { setUniqueName, URLPath } from './chunk-5Z57Z2SO.js';
|
|
4
|
+
import './chunk-WT27HKBG.js';
|
|
5
|
+
import { LogLevel, createLogger, p, randomCliColour } from './chunk-OTFKQILI.js';
|
|
6
|
+
import { read, getRelativePath, clean } from './chunk-FVK2YAOX.js';
|
|
7
|
+
import { write } from './chunk-IYT5Y4GK.js';
|
|
8
|
+
import { __commonJS, init_esm_shims, __toESM, __privateAdd, __privateSet, __privateGet, __privateMethod, __require } from './chunk-NZHABRCW.js';
|
|
9
9
|
import crypto from 'crypto';
|
|
10
10
|
import path, { resolve, extname } from 'path';
|
|
11
11
|
import { print } from '@kubb/parser';
|
package/dist/logger.cjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
5
|
-
require('./chunk-
|
|
3
|
+
var chunkMYRGSDE5_cjs = require('./chunk-MYRGSDE5.cjs');
|
|
4
|
+
require('./chunk-TCVNI37N.cjs');
|
|
5
|
+
require('./chunk-PAJNBSPO.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
Object.defineProperty(exports, 'LogLevel', {
|
|
10
10
|
enumerable: true,
|
|
11
|
-
get: function () { return
|
|
11
|
+
get: function () { return chunkMYRGSDE5_cjs.LogLevel; }
|
|
12
12
|
});
|
|
13
13
|
Object.defineProperty(exports, 'createLogger', {
|
|
14
14
|
enumerable: true,
|
|
15
|
-
get: function () { return
|
|
15
|
+
get: function () { return chunkMYRGSDE5_cjs.createLogger; }
|
|
16
16
|
});
|
|
17
17
|
Object.defineProperty(exports, 'randomCliColour', {
|
|
18
18
|
enumerable: true,
|
|
19
|
-
get: function () { return
|
|
19
|
+
get: function () { return chunkMYRGSDE5_cjs.randomCliColour; }
|
|
20
20
|
});
|
|
21
21
|
Object.defineProperty(exports, 'randomColour', {
|
|
22
22
|
enumerable: true,
|
|
23
|
-
get: function () { return
|
|
23
|
+
get: function () { return chunkMYRGSDE5_cjs.randomColour; }
|
|
24
24
|
});
|
|
25
25
|
//# sourceMappingURL=out.js.map
|
|
26
26
|
//# sourceMappingURL=logger.cjs.map
|
package/dist/logger.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'module';
|
|
2
|
-
export { LogLevel, createLogger, randomCliColour, randomColour } from './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
2
|
+
export { LogLevel, createLogger, randomCliColour, randomColour } from './chunk-OTFKQILI.js';
|
|
3
|
+
import './chunk-IYT5Y4GK.js';
|
|
4
|
+
import './chunk-NZHABRCW.js';
|
|
5
5
|
|
|
6
6
|
createRequire(import.meta.url);
|
|
7
7
|
//# sourceMappingURL=out.js.map
|
package/dist/transformers.cjs
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
5
|
+
var chunkQS3TLDZN_cjs = require('./chunk-QS3TLDZN.cjs');
|
|
6
|
+
var chunkUICUGNAR_cjs = require('./chunk-UICUGNAR.cjs');
|
|
7
|
+
var chunkPAJNBSPO_cjs = require('./chunk-PAJNBSPO.cjs');
|
|
8
8
|
|
|
9
9
|
// src/transformers/index.ts
|
|
10
|
-
|
|
10
|
+
chunkPAJNBSPO_cjs.init_cjs_shims();
|
|
11
11
|
|
|
12
12
|
// src/transformers/combineCodes.ts
|
|
13
|
-
|
|
13
|
+
chunkPAJNBSPO_cjs.init_cjs_shims();
|
|
14
14
|
function combineCodes(codes) {
|
|
15
15
|
return codes.join("\n");
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
// src/transformers/createJSDocBlockText.ts
|
|
19
|
-
|
|
19
|
+
chunkPAJNBSPO_cjs.init_cjs_shims();
|
|
20
20
|
function createJSDocBlockText({ comments }) {
|
|
21
21
|
const filteredComments = comments.filter(Boolean);
|
|
22
22
|
if (!filteredComments.length) {
|
|
@@ -28,7 +28,7 @@ function createJSDocBlockText({ comments }) {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
// src/transformers/escape.ts
|
|
31
|
-
|
|
31
|
+
chunkPAJNBSPO_cjs.init_cjs_shims();
|
|
32
32
|
function escape(text) {
|
|
33
33
|
return text ? text.replaceAll("`", "\\`") : "";
|
|
34
34
|
}
|
|
@@ -54,13 +54,13 @@ function jsStringEscape(input) {
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
// src/transformers/indent.ts
|
|
57
|
-
|
|
57
|
+
chunkPAJNBSPO_cjs.init_cjs_shims();
|
|
58
58
|
function createIndent(size) {
|
|
59
59
|
return Array.from({ length: size + 1 }).join(" ");
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// src/transformers/nameSorter.ts
|
|
63
|
-
|
|
63
|
+
chunkPAJNBSPO_cjs.init_cjs_shims();
|
|
64
64
|
function nameSorter(a, b) {
|
|
65
65
|
if (a.name < b.name) {
|
|
66
66
|
return -1;
|
|
@@ -77,41 +77,41 @@ var transformers_default = {
|
|
|
77
77
|
escape,
|
|
78
78
|
jsStringEscape,
|
|
79
79
|
createIndent,
|
|
80
|
-
transformReservedWord:
|
|
80
|
+
transformReservedWord: chunkQS3TLDZN_cjs.transformReservedWord,
|
|
81
81
|
nameSorter,
|
|
82
|
-
searchAndReplace:
|
|
83
|
-
trim:
|
|
84
|
-
trimExtName:
|
|
82
|
+
searchAndReplace: chunkQS3TLDZN_cjs.searchAndReplace,
|
|
83
|
+
trim: chunkQS3TLDZN_cjs.trim,
|
|
84
|
+
trimExtName: chunkQS3TLDZN_cjs.trimExtName,
|
|
85
85
|
JSDoc: {
|
|
86
86
|
createJSDocBlockText
|
|
87
87
|
},
|
|
88
|
-
camelCase:
|
|
89
|
-
pascalCase:
|
|
88
|
+
camelCase: chunkUICUGNAR_cjs.camelCase,
|
|
89
|
+
pascalCase: chunkUICUGNAR_cjs.pascalCase
|
|
90
90
|
};
|
|
91
91
|
|
|
92
92
|
Object.defineProperty(exports, 'searchAndReplace', {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkQS3TLDZN_cjs.searchAndReplace; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, 'transformReservedWord', {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkQS3TLDZN_cjs.transformReservedWord; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, 'trim', {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkQS3TLDZN_cjs.trim; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, 'trimExtName', {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkQS3TLDZN_cjs.trimExtName; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, 'camelCase', {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkUICUGNAR_cjs.camelCase; }
|
|
111
111
|
});
|
|
112
112
|
Object.defineProperty(exports, 'pascalCase', {
|
|
113
113
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
114
|
+
get: function () { return chunkUICUGNAR_cjs.pascalCase; }
|
|
115
115
|
});
|
|
116
116
|
exports.combineCodes = combineCodes;
|
|
117
117
|
exports.createIndent = createIndent;
|
package/dist/transformers.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createRequire } from 'module';
|
|
2
|
-
import { transformReservedWord, searchAndReplace, trim, trimExtName } from './chunk-
|
|
3
|
-
export { searchAndReplace, transformReservedWord, trim, trimExtName } from './chunk-
|
|
4
|
-
import { camelCase, pascalCase } from './chunk-
|
|
5
|
-
export { camelCase, pascalCase } from './chunk-
|
|
6
|
-
import { init_esm_shims } from './chunk-
|
|
2
|
+
import { transformReservedWord, searchAndReplace, trim, trimExtName } from './chunk-FGFTYKQS.js';
|
|
3
|
+
export { searchAndReplace, transformReservedWord, trim, trimExtName } from './chunk-FGFTYKQS.js';
|
|
4
|
+
import { camelCase, pascalCase } from './chunk-WT27HKBG.js';
|
|
5
|
+
export { camelCase, pascalCase } from './chunk-WT27HKBG.js';
|
|
6
|
+
import { init_esm_shims } from './chunk-NZHABRCW.js';
|
|
7
7
|
|
|
8
8
|
createRequire(import.meta.url);
|
|
9
9
|
|
package/dist/utils.cjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
3
|
+
var chunkANP6S23V_cjs = require('./chunk-ANP6S23V.cjs');
|
|
4
|
+
var chunkUICUGNAR_cjs = require('./chunk-UICUGNAR.cjs');
|
|
5
|
+
var chunkPAJNBSPO_cjs = require('./chunk-PAJNBSPO.cjs');
|
|
6
6
|
var naturalOrderby = require('natural-orderby');
|
|
7
7
|
|
|
8
8
|
// src/utils/index.ts
|
|
9
|
-
|
|
9
|
+
chunkPAJNBSPO_cjs.init_cjs_shims();
|
|
10
10
|
|
|
11
11
|
// src/utils/FunctionParams.ts
|
|
12
|
-
|
|
12
|
+
chunkPAJNBSPO_cjs.init_cjs_shims();
|
|
13
13
|
var FunctionParams = class {
|
|
14
14
|
constructor(type) {
|
|
15
15
|
this.items = [];
|
|
@@ -34,7 +34,7 @@ var FunctionParams = class {
|
|
|
34
34
|
acc.push(`${type}${rest.default ? ` = ${rest.default}` : ""}`);
|
|
35
35
|
return acc;
|
|
36
36
|
}
|
|
37
|
-
const parameterName = name.startsWith("{") ? name :
|
|
37
|
+
const parameterName = name.startsWith("{") ? name : chunkUICUGNAR_cjs.camelCase(name);
|
|
38
38
|
if (type) {
|
|
39
39
|
if (required) {
|
|
40
40
|
acc.push(`${parameterName}: ${type}${rest.default ? ` = ${rest.default}` : ""}`);
|
|
@@ -50,7 +50,7 @@ var FunctionParams = class {
|
|
|
50
50
|
};
|
|
51
51
|
|
|
52
52
|
// src/utils/promise.ts
|
|
53
|
-
|
|
53
|
+
chunkPAJNBSPO_cjs.init_cjs_shims();
|
|
54
54
|
function isPromise(result) {
|
|
55
55
|
return !!result && typeof result?.then === "function";
|
|
56
56
|
}
|
|
@@ -62,7 +62,7 @@ function isPromiseRejectedResult(result) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
// src/utils/renderTemplate.ts
|
|
65
|
-
|
|
65
|
+
chunkPAJNBSPO_cjs.init_cjs_shims();
|
|
66
66
|
function renderTemplate(template, data = void 0) {
|
|
67
67
|
if (!data || !Object.keys(data).length) {
|
|
68
68
|
return template.replace(/{{(.*?)}}/g, "");
|
|
@@ -87,7 +87,7 @@ function renderTemplate(template, data = void 0) {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
// src/utils/timeout.ts
|
|
90
|
-
|
|
90
|
+
chunkPAJNBSPO_cjs.init_cjs_shims();
|
|
91
91
|
async function timeout(ms) {
|
|
92
92
|
return new Promise((resolve) => {
|
|
93
93
|
setTimeout(() => {
|
|
@@ -98,15 +98,15 @@ async function timeout(ms) {
|
|
|
98
98
|
|
|
99
99
|
Object.defineProperty(exports, 'URLPath', {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkANP6S23V_cjs.URLPath; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, 'getUniqueName', {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkANP6S23V_cjs.getUniqueName; }
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, 'setUniqueName', {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkANP6S23V_cjs.setUniqueName; }
|
|
110
110
|
});
|
|
111
111
|
exports.FunctionParams = FunctionParams;
|
|
112
112
|
exports.isPromise = isPromise;
|
package/dist/utils.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createRequire } from 'module';
|
|
2
|
-
export { URLPath, getUniqueName, setUniqueName } from './chunk-
|
|
3
|
-
import { camelCase } from './chunk-
|
|
4
|
-
import { init_esm_shims } from './chunk-
|
|
2
|
+
export { URLPath, getUniqueName, setUniqueName } from './chunk-5Z57Z2SO.js';
|
|
3
|
+
import { camelCase } from './chunk-WT27HKBG.js';
|
|
4
|
+
import { init_esm_shims } from './chunk-NZHABRCW.js';
|
|
5
5
|
import { orderBy } from 'natural-orderby';
|
|
6
6
|
|
|
7
7
|
createRequire(import.meta.url);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/core",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "Generator core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"p-queue": "^8.0.0",
|
|
72
72
|
"seedrandom": "^3.0.5",
|
|
73
73
|
"semver": "^7.5.4",
|
|
74
|
-
"@kubb/parser": "2.0.
|
|
75
|
-
"@kubb/types": "2.0.
|
|
74
|
+
"@kubb/parser": "2.0.4",
|
|
75
|
+
"@kubb/types": "2.0.4"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@types/fs-extra": "^11.0.4",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.0.1_@microsoft+api-extractor@7.38.5_ts-node@10.9.2_typescript@5.3.3/node_modules/tsup/assets/esm_shims.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["// Shim globals in esm bundle\nimport { fileURLToPath } from 'url'\nimport path from 'path'\n\nconst getFilename = () => fileURLToPath(import.meta.url)\nconst getDirname = () => path.dirname(getFilename())\n\nexport const __dirname = /* @__PURE__ */ getDirname()\nexport const __filename = /* @__PURE__ */ getFilename()\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../node_modules/.pnpm/tsup@8.0.1_@microsoft+api-extractor@7.38.5_ts-node@10.9.2_typescript@5.3.3/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"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|