@kubb/core 5.0.0-beta.3 → 5.0.0-beta.30

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 (46) hide show
  1. package/README.md +8 -38
  2. package/dist/KubbDriver-CFx2DdhF.js +2131 -0
  3. package/dist/KubbDriver-CFx2DdhF.js.map +1 -0
  4. package/dist/KubbDriver-vyD7F0Ip.cjs +2252 -0
  5. package/dist/KubbDriver-vyD7F0Ip.cjs.map +1 -0
  6. package/dist/{types-CC09VtBt.d.ts → createKubb-6zii1jo-.d.ts} +1610 -1257
  7. package/dist/index.cjs +351 -1125
  8. package/dist/index.cjs.map +1 -1
  9. package/dist/index.d.ts +3 -186
  10. package/dist/index.js +341 -1119
  11. package/dist/index.js.map +1 -1
  12. package/dist/mocks.cjs +30 -21
  13. package/dist/mocks.cjs.map +1 -1
  14. package/dist/mocks.d.ts +5 -5
  15. package/dist/mocks.js +29 -20
  16. package/dist/mocks.js.map +1 -1
  17. package/package.json +6 -18
  18. package/src/FileManager.ts +78 -61
  19. package/src/FileProcessor.ts +48 -38
  20. package/src/KubbDriver.ts +930 -0
  21. package/src/constants.ts +11 -6
  22. package/src/createAdapter.ts +113 -17
  23. package/src/createKubb.ts +1039 -478
  24. package/src/createRenderer.ts +58 -27
  25. package/src/createStorage.ts +36 -23
  26. package/src/defineGenerator.ts +127 -15
  27. package/src/defineLogger.ts +66 -7
  28. package/src/defineMiddleware.ts +19 -17
  29. package/src/defineParser.ts +30 -13
  30. package/src/definePlugin.ts +329 -14
  31. package/src/defineResolver.ts +365 -167
  32. package/src/devtools.ts +8 -1
  33. package/src/index.ts +2 -2
  34. package/src/mocks.ts +11 -14
  35. package/src/storages/fsStorage.ts +13 -37
  36. package/src/types.ts +48 -1292
  37. package/dist/PluginDriver-BXibeQk-.cjs +0 -1036
  38. package/dist/PluginDriver-BXibeQk-.cjs.map +0 -1
  39. package/dist/PluginDriver-DV3p2Hky.js +0 -945
  40. package/dist/PluginDriver-DV3p2Hky.js.map +0 -1
  41. package/src/Kubb.ts +0 -300
  42. package/src/PluginDriver.ts +0 -424
  43. package/src/renderNode.ts +0 -35
  44. package/src/utils/diagnostics.ts +0 -18
  45. package/src/utils/isInputPath.ts +0 -10
  46. package/src/utils/packageJSON.ts +0 -99
package/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  <div align="center">
2
+ <h1>@kubb/core</h1>
2
3
  <a href="https://kubb.dev" target="_blank" rel="noopener noreferrer">
3
4
  <img width="180" src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/logo.png" alt="Kubb logo">
4
5
  </a>
@@ -9,10 +10,6 @@
9
10
  [![License][license-src]][license-href]
10
11
  [![Sponsors][sponsors-src]][sponsors-href]
11
12
 
12
- ### The meta framework for code generation
13
-
14
- **Stop writing glue code. Define your API once and Kubb generates types, clients, hooks, validators, mocks and more.**
15
-
16
13
  <h4>
17
14
  <a href="https://kubb.dev" target="_blank">Documentation</a>
18
15
  <span> · </span>
@@ -24,47 +21,20 @@
24
21
 
25
22
  <br />
26
23
 
24
+ Core engine for Kubb's plugin-based code generation system. Provides the plugin driver, file manager, `defineConfig`, `definePlugin`, `defineMiddleware`, and the build orchestration layer used by every Kubb plugin.
25
+
26
+ > **Note:** Most users should install the [`kubb`](https://npmjs.com/package/kubb) meta-package instead of `@kubb/core` directly. Install `@kubb/core` only when building custom plugins or extending the Kubb internals.
27
+
27
28
  ## Installation
28
29
 
29
30
  ```bash
30
- npm install @kubb/core
31
+ bun add @kubb/core
31
32
  # or
32
33
  pnpm add @kubb/core
34
+ # or
35
+ npm install @kubb/core
33
36
  ```
34
37
 
35
- ## Quick Start
36
-
37
- Get started with Kubb in seconds:
38
-
39
- ```bash
40
- npx kubb init
41
- ```
42
-
43
- The interactive setup will:
44
-
45
- - Create a `package.json` (if needed)
46
- - Guide you through plugin selection
47
- - Install packages automatically
48
- - Generate `kubb.config.ts`
49
-
50
- Then generate your code:
51
-
52
- ```bash
53
- npx kubb generate
54
- ```
55
-
56
- See the [documentation](https://kubb.dev) for detailed usage and advanced features.
57
-
58
- ## Features
59
-
60
- - Works with Node.js 22+ and TypeScript 6.
61
- - Convert Swagger 2.0, OpenAPI 3.0, and OpenAPI 3.1 to TypeScript types, API clients, and more via the [plugin ecosystem](https://github.com/kubb-labs/kubb-plugins).
62
- - Extensible plugin and middleware system for customizing and composing code generation.
63
- - CLI support with interactive setup, progress bar, and detailed logs.
64
- - Model Context Protocol (MCP) server for AI assistants like [Claude](https://claude.ai), [Cursor](https://cursor.sh), and other MCP-compatible tools.
65
- - JSX-based renderer (`@kubb/renderer-jsx`) for building custom plugin output.
66
- - Barrel file generation via the `@kubb/middleware-barrel` middleware.
67
-
68
38
  ## Supporting Kubb
69
39
 
70
40
  Kubb is an open source project with its ongoing development made possible entirely by the support of Sponsors. If you would like to become a sponsor, please consider: