@kubb/plugin-oas 0.0.0-canary-20240616113301 → 0.0.0-canary-20240616122012
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-ZG3NLVUM.js → chunk-AHPYTLES.js} +27 -39
- package/dist/chunk-AHPYTLES.js.map +1 -0
- package/dist/{chunk-SLCKXMJH.cjs → chunk-IJDG7KT6.cjs} +33 -45
- package/dist/{chunk-SLCKXMJH.cjs.map → chunk-IJDG7KT6.cjs.map} +1 -1
- package/dist/{chunk-YS56QITS.cjs → chunk-LXHYPSLT.cjs} +11 -25
- package/dist/chunk-LXHYPSLT.cjs.map +1 -0
- package/dist/{chunk-WEZ6CODU.cjs → chunk-MZJFTD2Z.cjs} +3 -3
- package/dist/{chunk-HUBVROSE.js → chunk-RLUQTHVB.js} +45 -74
- package/dist/{chunk-HUBVROSE.js.map → chunk-RLUQTHVB.js.map} +1 -1
- package/dist/{chunk-FDLHRTTS.js → chunk-V7H5ZWZY.js} +2 -2
- package/dist/{chunk-SXUTBEJ7.js → chunk-VHGCZBHU.js} +11 -25
- package/dist/{chunk-SXUTBEJ7.js.map → chunk-VHGCZBHU.js.map} +1 -1
- package/dist/{chunk-RDAH3LRF.cjs → chunk-XE6N3VWS.cjs} +65 -94
- package/dist/chunk-XE6N3VWS.cjs.map +1 -0
- package/dist/components.cjs +5 -5
- package/dist/components.js +3 -3
- package/dist/hooks.cjs +13 -13
- package/dist/hooks.js +3 -3
- package/dist/index.cjs +30 -36
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -25
- package/dist/index.js.map +1 -1
- package/dist/utils.cjs +8 -8
- package/dist/utils.js +2 -2
- package/package.json +11 -11
- package/src/SchemaGenerator.ts +2 -2
- package/dist/chunk-RDAH3LRF.cjs.map +0 -1
- package/dist/chunk-YS56QITS.cjs.map +0 -1
- package/dist/chunk-ZG3NLVUM.js.map +0 -1
- /package/dist/{chunk-WEZ6CODU.cjs.map → chunk-MZJFTD2Z.cjs.map} +0 -0
- /package/dist/{chunk-FDLHRTTS.js.map → chunk-V7H5ZWZY.js.map} +0 -0
package/dist/utils.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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 _chunkMZJFTD2Zcjs = require('./chunk-MZJFTD2Z.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkLXHYPSLTcjs = require('./chunk-LXHYPSLT.cjs');
|
|
9
9
|
|
|
10
10
|
// src/utils/index.ts
|
|
11
|
-
|
|
11
|
+
_chunkLXHYPSLTcjs.init_cjs_shims.call(void 0, );
|
|
12
12
|
|
|
13
13
|
// src/utils/getComments.ts
|
|
14
|
-
|
|
14
|
+
_chunkLXHYPSLTcjs.init_cjs_shims.call(void 0, );
|
|
15
15
|
var _transformers = require('@kubb/core/transformers'); var _transformers2 = _interopRequireDefault(_transformers);
|
|
16
16
|
var _utils = require('@kubb/core/utils');
|
|
17
17
|
function getComments(operation) {
|
|
@@ -24,7 +24,7 @@ function getComments(operation) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// src/utils/getGroupedByTagFiles.ts
|
|
27
|
-
|
|
27
|
+
_chunkLXHYPSLTcjs.init_cjs_shims.call(void 0, );
|
|
28
28
|
var _path = require('path');
|
|
29
29
|
var _core = require('@kubb/core');
|
|
30
30
|
|
|
@@ -69,7 +69,7 @@ async function getGroupedByTagFiles({ logger, files, plugin, template, exportAs,
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
// src/utils/getParams.ts
|
|
72
|
-
|
|
72
|
+
_chunkLXHYPSLTcjs.init_cjs_shims.call(void 0, );
|
|
73
73
|
var _oas = require('@kubb/oas');
|
|
74
74
|
function getASTParams(operationSchema, {
|
|
75
75
|
typed = false,
|
|
@@ -103,7 +103,7 @@ function getPathParams(operationSchema, options = {}) {
|
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
// src/utils/refSorter.ts
|
|
106
|
-
|
|
106
|
+
_chunkLXHYPSLTcjs.init_cjs_shims.call(void 0, );
|
|
107
107
|
function refsSorter(a, b) {
|
|
108
108
|
if (_optionalChain([Object, 'access', _10 => _10.keys, 'call', _11 => _11(a.import.refs), 'optionalAccess', _12 => _12.length]) < _optionalChain([Object, 'access', _13 => _13.keys, 'call', _14 => _14(b.import.refs), 'optionalAccess', _15 => _15.length])) {
|
|
109
109
|
return -1;
|
|
@@ -122,5 +122,5 @@ function refsSorter(a, b) {
|
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
|
|
125
|
-
exports.getASTParams = getASTParams; exports.getComments = getComments; exports.getGroupedByTagFiles = getGroupedByTagFiles; exports.getPathParams = getPathParams; exports.getSchemaFactory =
|
|
125
|
+
exports.getASTParams = getASTParams; exports.getComments = getComments; exports.getGroupedByTagFiles = getGroupedByTagFiles; exports.getPathParams = getPathParams; exports.getSchemaFactory = _chunkLXHYPSLTcjs.getSchemaFactory; exports.getSchemas = _chunkLXHYPSLTcjs.getSchemas; exports.parseFromConfig = _chunkMZJFTD2Zcjs.parseFromConfig; exports.refsSorter = refsSorter;
|
|
126
126
|
//# sourceMappingURL=utils.cjs.map
|
package/dist/utils.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseFromConfig
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-V7H5ZWZY.js";
|
|
4
4
|
import {
|
|
5
5
|
getSchemaFactory,
|
|
6
6
|
getSchemas,
|
|
7
7
|
init_esm_shims
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-VHGCZBHU.js";
|
|
9
9
|
|
|
10
10
|
// src/utils/index.ts
|
|
11
11
|
init_esm_shims();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-oas",
|
|
3
|
-
"version": "0.0.0-canary-
|
|
3
|
+
"version": "0.0.0-canary-20240616122012",
|
|
4
4
|
"description": "Generator swagger",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -67,24 +67,24 @@
|
|
|
67
67
|
],
|
|
68
68
|
"dependencies": {
|
|
69
69
|
"@stoplight/yaml": "^4.3.0",
|
|
70
|
-
"remeda": "^2.0.
|
|
71
|
-
"@kubb/core": "0.0.0-canary-
|
|
72
|
-
"@kubb/fs": "0.0.0-canary-
|
|
73
|
-
"@kubb/oas": "0.0.0-canary-
|
|
74
|
-
"@kubb/react": "0.0.0-canary-
|
|
70
|
+
"remeda": "^2.0.10",
|
|
71
|
+
"@kubb/core": "0.0.0-canary-20240616122012",
|
|
72
|
+
"@kubb/fs": "0.0.0-canary-20240616122012",
|
|
73
|
+
"@kubb/oas": "0.0.0-canary-20240616122012",
|
|
74
|
+
"@kubb/react": "0.0.0-canary-20240616122012"
|
|
75
75
|
},
|
|
76
76
|
"devDependencies": {
|
|
77
77
|
"@types/react": "^18.3.3",
|
|
78
78
|
"@types/react-dom": "^18.3.0",
|
|
79
79
|
"react": "^18.3.1",
|
|
80
|
-
"tsup": "^8.0
|
|
80
|
+
"tsup": "^8.1.0",
|
|
81
81
|
"typescript": "^5.4.5",
|
|
82
|
-
"@kubb/config-biome": "0.0.0-canary-
|
|
83
|
-
"@kubb/config-ts": "0.0.0-canary-
|
|
84
|
-
"@kubb/config-tsup": "0.0.0-canary-
|
|
82
|
+
"@kubb/config-biome": "0.0.0-canary-20240616122012",
|
|
83
|
+
"@kubb/config-ts": "0.0.0-canary-20240616122012",
|
|
84
|
+
"@kubb/config-tsup": "0.0.0-canary-20240616122012"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"@kubb/react": "0.0.0-canary-
|
|
87
|
+
"@kubb/react": "0.0.0-canary-20240616122012"
|
|
88
88
|
},
|
|
89
89
|
"engines": {
|
|
90
90
|
"node": ">=18"
|
package/src/SchemaGenerator.ts
CHANGED
|
@@ -560,11 +560,11 @@ export abstract class SchemaGenerator<
|
|
|
560
560
|
type: 'type',
|
|
561
561
|
})
|
|
562
562
|
|
|
563
|
-
const nullableEnum = schema.enum.includes(null)
|
|
563
|
+
const nullableEnum = schema.enum.includes(null)
|
|
564
564
|
if (nullableEnum) {
|
|
565
565
|
baseItems.push({ keyword: schemaKeywords.nullable })
|
|
566
566
|
}
|
|
567
|
-
const filteredValues = schema.enum.filter((value) => value !== null)
|
|
567
|
+
const filteredValues = schema.enum.filter((value) => value !== null)
|
|
568
568
|
|
|
569
569
|
// x-enumNames has priority
|
|
570
570
|
const extensionEnums = ['x-enumNames', 'x-enum-varnames']
|