@kubb/plugin-oas 0.0.0-canary-20240616113301 → 0.0.0-canary-20240616121144

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.
Files changed (31) hide show
  1. package/dist/{chunk-ZG3NLVUM.js → chunk-AHPYTLES.js} +27 -39
  2. package/dist/chunk-AHPYTLES.js.map +1 -0
  3. package/dist/{chunk-SLCKXMJH.cjs → chunk-IJDG7KT6.cjs} +33 -45
  4. package/dist/{chunk-SLCKXMJH.cjs.map → chunk-IJDG7KT6.cjs.map} +1 -1
  5. package/dist/{chunk-YS56QITS.cjs → chunk-LXHYPSLT.cjs} +11 -25
  6. package/dist/chunk-LXHYPSLT.cjs.map +1 -0
  7. package/dist/{chunk-WEZ6CODU.cjs → chunk-MZJFTD2Z.cjs} +3 -3
  8. package/dist/{chunk-HUBVROSE.js → chunk-RLUQTHVB.js} +45 -74
  9. package/dist/{chunk-HUBVROSE.js.map → chunk-RLUQTHVB.js.map} +1 -1
  10. package/dist/{chunk-FDLHRTTS.js → chunk-V7H5ZWZY.js} +2 -2
  11. package/dist/{chunk-SXUTBEJ7.js → chunk-VHGCZBHU.js} +11 -25
  12. package/dist/{chunk-SXUTBEJ7.js.map → chunk-VHGCZBHU.js.map} +1 -1
  13. package/dist/{chunk-RDAH3LRF.cjs → chunk-XE6N3VWS.cjs} +65 -94
  14. package/dist/chunk-XE6N3VWS.cjs.map +1 -0
  15. package/dist/components.cjs +5 -5
  16. package/dist/components.js +3 -3
  17. package/dist/hooks.cjs +13 -13
  18. package/dist/hooks.js +3 -3
  19. package/dist/index.cjs +30 -36
  20. package/dist/index.cjs.map +1 -1
  21. package/dist/index.js +19 -25
  22. package/dist/index.js.map +1 -1
  23. package/dist/utils.cjs +8 -8
  24. package/dist/utils.js +2 -2
  25. package/package.json +11 -11
  26. package/src/SchemaGenerator.ts +2 -2
  27. package/dist/chunk-RDAH3LRF.cjs.map +0 -1
  28. package/dist/chunk-YS56QITS.cjs.map +0 -1
  29. package/dist/chunk-ZG3NLVUM.js.map +0 -1
  30. /package/dist/{chunk-WEZ6CODU.cjs.map → chunk-MZJFTD2Z.cjs.map} +0 -0
  31. /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 _chunkWEZ6CODUcjs = require('./chunk-WEZ6CODU.cjs');
3
+ var _chunkMZJFTD2Zcjs = require('./chunk-MZJFTD2Z.cjs');
4
4
 
5
5
 
6
6
 
7
7
 
8
- var _chunkYS56QITScjs = require('./chunk-YS56QITS.cjs');
8
+ var _chunkLXHYPSLTcjs = require('./chunk-LXHYPSLT.cjs');
9
9
 
10
10
  // src/utils/index.ts
11
- _chunkYS56QITScjs.init_cjs_shims.call(void 0, );
11
+ _chunkLXHYPSLTcjs.init_cjs_shims.call(void 0, );
12
12
 
13
13
  // src/utils/getComments.ts
14
- _chunkYS56QITScjs.init_cjs_shims.call(void 0, );
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
- _chunkYS56QITScjs.init_cjs_shims.call(void 0, );
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
- _chunkYS56QITScjs.init_cjs_shims.call(void 0, );
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
- _chunkYS56QITScjs.init_cjs_shims.call(void 0, );
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 = _chunkYS56QITScjs.getSchemaFactory; exports.getSchemas = _chunkYS56QITScjs.getSchemas; exports.parseFromConfig = _chunkWEZ6CODUcjs.parseFromConfig; exports.refsSorter = refsSorter;
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-FDLHRTTS.js";
3
+ } from "./chunk-V7H5ZWZY.js";
4
4
  import {
5
5
  getSchemaFactory,
6
6
  getSchemas,
7
7
  init_esm_shims
8
- } from "./chunk-SXUTBEJ7.js";
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-20240616113301",
3
+ "version": "0.0.0-canary-20240616121144",
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.0",
71
- "@kubb/core": "0.0.0-canary-20240616113301",
72
- "@kubb/fs": "0.0.0-canary-20240616113301",
73
- "@kubb/oas": "0.0.0-canary-20240616113301",
74
- "@kubb/react": "0.0.0-canary-20240616113301"
70
+ "remeda": "^2.0.10",
71
+ "@kubb/core": "0.0.0-canary-20240616121144",
72
+ "@kubb/fs": "0.0.0-canary-20240616121144",
73
+ "@kubb/oas": "0.0.0-canary-20240616121144",
74
+ "@kubb/react": "0.0.0-canary-20240616121144"
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.2",
80
+ "tsup": "^8.1.0",
81
81
  "typescript": "^5.4.5",
82
- "@kubb/config-biome": "0.0.0-canary-20240616113301",
83
- "@kubb/config-ts": "0.0.0-canary-20240616113301",
84
- "@kubb/config-tsup": "0.0.0-canary-20240616113301"
82
+ "@kubb/config-biome": "0.0.0-canary-20240616121144",
83
+ "@kubb/config-ts": "0.0.0-canary-20240616121144",
84
+ "@kubb/config-tsup": "0.0.0-canary-20240616121144"
85
85
  },
86
86
  "peerDependencies": {
87
- "@kubb/react": "0.0.0-canary-20240616113301"
87
+ "@kubb/react": "0.0.0-canary-20240616121144"
88
88
  },
89
89
  "engines": {
90
90
  "node": ">=18"
@@ -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']