@kubb/plugin-ts 3.0.0-alpha.7 → 3.0.0-alpha.9

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.
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkNNQVIJV5cjs = require('./chunk-NNQVIJV5.cjs');
5
+ var _chunkPV5Q7I5Ocjs = require('./chunk-PV5Q7I5O.cjs');
6
6
 
7
7
 
8
8
  var _chunkSEH6NUCXcjs = require('./chunk-SEH6NUCX.cjs');
@@ -13,5 +13,5 @@ _chunkSEH6NUCXcjs.init_cjs_shims.call(void 0, );
13
13
 
14
14
 
15
15
 
16
- exports.OasType = _chunkNNQVIJV5cjs.OasType; exports.OperationSchema = _chunkNNQVIJV5cjs.OperationSchema; exports.Schema = _chunkNNQVIJV5cjs.Schema;
16
+ exports.OasType = _chunkPV5Q7I5Ocjs.OasType; exports.OperationSchema = _chunkPV5Q7I5Ocjs.OperationSchema; exports.Schema = _chunkPV5Q7I5Ocjs.Schema;
17
17
  //# sourceMappingURL=components.cjs.map
@@ -2,7 +2,7 @@ import {
2
2
  OasType,
3
3
  OperationSchema,
4
4
  Schema
5
- } from "./chunk-DH5UFT3R.js";
5
+ } from "./chunk-UVAKTXUA.js";
6
6
  import {
7
7
  init_esm_shims
8
8
  } from "./chunk-TTGZBH7H.js";
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkNNQVIJV5cjs = require('./chunk-NNQVIJV5.cjs');
4
+ var _chunkPV5Q7I5Ocjs = require('./chunk-PV5Q7I5O.cjs');
5
5
  require('./chunk-SEH6NUCX.cjs');
6
6
 
7
7
 
8
8
 
9
- exports.pluginTs = _chunkNNQVIJV5cjs.pluginTs; exports.pluginTsName = _chunkNNQVIJV5cjs.pluginTsName;
9
+ exports.pluginTs = _chunkPV5Q7I5Ocjs.pluginTs; exports.pluginTsName = _chunkPV5Q7I5Ocjs.pluginTsName;
10
10
  //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  pluginTs,
3
3
  pluginTsName
4
- } from "./chunk-DH5UFT3R.js";
4
+ } from "./chunk-UVAKTXUA.js";
5
5
  import "./chunk-TTGZBH7H.js";
6
6
  export {
7
7
  pluginTs,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-ts",
3
- "version": "3.0.0-alpha.7",
3
+ "version": "3.0.0-alpha.9",
4
4
  "description": "Generator plugin-ts",
5
5
  "keywords": [
6
6
  "zod",
@@ -50,12 +50,12 @@
50
50
  "!/**/__tests__/**"
51
51
  ],
52
52
  "dependencies": {
53
- "@kubb/core": "3.0.0-alpha.7",
54
- "@kubb/fs": "3.0.0-alpha.7",
55
- "@kubb/oas": "3.0.0-alpha.7",
56
- "@kubb/parser-ts": "3.0.0-alpha.7",
57
- "@kubb/plugin-oas": "3.0.0-alpha.7",
58
- "@kubb/react": "3.0.0-alpha.7"
53
+ "@kubb/core": "3.0.0-alpha.9",
54
+ "@kubb/fs": "3.0.0-alpha.9",
55
+ "@kubb/oas": "3.0.0-alpha.9",
56
+ "@kubb/parser-ts": "3.0.0-alpha.9",
57
+ "@kubb/plugin-oas": "3.0.0-alpha.9",
58
+ "@kubb/react": "3.0.0-alpha.9"
59
59
  },
60
60
  "devDependencies": {
61
61
  "@types/react": "^18.3.4",
@@ -63,12 +63,12 @@
63
63
  "react": "^18.3.1",
64
64
  "tsup": "^8.2.4",
65
65
  "typescript": "^5.5.4",
66
- "@kubb/config-biome": "3.0.0-alpha.7",
67
- "@kubb/config-ts": "3.0.0-alpha.7",
68
- "@kubb/config-tsup": "3.0.0-alpha.7"
66
+ "@kubb/config-biome": "3.0.0-alpha.9",
67
+ "@kubb/config-ts": "3.0.0-alpha.9",
68
+ "@kubb/config-tsup": "3.0.0-alpha.9"
69
69
  },
70
70
  "peerDependencies": {
71
- "@kubb/react": "3.0.0-alpha.7"
71
+ "@kubb/react": "3.0.0-alpha.9"
72
72
  },
73
73
  "engines": {
74
74
  "node": ">=20"
@@ -17,11 +17,11 @@ type TemplateProps = {
17
17
  function Template({ name, typeName, api }: TemplateProps): ReactNode {
18
18
  return (
19
19
  <>
20
- <File.Source name={name} isExportable>
20
+ <File.Source name={name} isExportable isIndexable>
21
21
  {`export const ${name} = ${JSON.stringify(api, undefined, 2)} as const`}
22
22
  </File.Source>
23
23
  <br />
24
- <File.Source name={typeName} isExportable isTypeOnly>
24
+ <File.Source name={typeName} isExportable isIndexable isTypeOnly>
25
25
  <Type name={typeName} export>
26
26
  {`Infer<typeof ${name}>`}
27
27
  </Type>
@@ -153,7 +153,7 @@ OperationSchema.File = function ({}: FileProps): ReactNode {
153
153
  <File<FileMeta> baseName={file.baseName} path={file.path} meta={file.meta}>
154
154
  {items.map(mapItem)}
155
155
 
156
- <File.Source name={combinedSchemaName} isExportable isTypeOnly>
156
+ <File.Source name={combinedSchemaName} isExportable isIndexable isTypeOnly>
157
157
  {printCombinedSchema({ name: combinedSchemaName, operation, schemas, pluginManager })}
158
158
  </File.Source>
159
159
  </File>
@@ -134,19 +134,19 @@ export function Schema(props: Props): ReactNode {
134
134
  {enums.map(({ name, nameNode, typeName, typeNode }, index) => (
135
135
  <Fragment key={[name, nameNode].join('-')}>
136
136
  {nameNode && (
137
- <File.Source name={name} isExportable>
137
+ <File.Source name={name} isExportable isIndexable>
138
138
  {print(nameNode)}
139
139
  </File.Source>
140
140
  )}
141
141
  {
142
- <File.Source name={typeName} isExportable={['enum', 'asConst', 'constEnum', 'literal', undefined].includes(enumType)} isTypeOnly>
142
+ <File.Source name={typeName} isIndexable isExportable={['enum', 'asConst', 'constEnum', 'literal', undefined].includes(enumType)} isTypeOnly>
143
143
  {print(typeNode)}
144
144
  </File.Source>
145
145
  }
146
146
  </Fragment>
147
147
  ))}
148
148
  {enums.every((item) => item.typeName !== resolvedName) && (
149
- <File.Source name={typeName} isTypeOnly isExportable>
149
+ <File.Source name={typeName} isTypeOnly isExportable isIndexable>
150
150
  {print(typeNodes)}
151
151
  </File.Source>
152
152
  )}