@kubb/ast
Advanced tools
+1
-1
| { | ||
| "name": "@kubb/ast", | ||
| "version": "5.0.0-beta.82", | ||
| "version": "5.0.0-beta.84", | ||
| "description": "Spec-agnostic AST layer for Kubb. Defines the node tree, visitor pattern, factory functions, and type guards used across all code generation plugins.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
+11
-8
@@ -31,10 +31,13 @@ <div align="center"> | ||
| | Path | Contents | | ||
| | ------------------------------- | ---------------------------------------------------------------------------------------- | | ||
| | `@kubb/ast` | Runtime: node definitions, guards, visitor, macro engine, constants | | ||
| | `ast.factory` (via `@kubb/ast`) | Node constructors (`createSchema`, `createFile`, and friends), the `ts.factory` analogue | | ||
| | `@kubb/ast/macros` | Built-in macro presets: `macroDiscriminatorEnum`, `macroSimplifyUnion`, `macroEnumName` | | ||
| | `@kubb/ast/types` | Types only: all node interfaces, type aliases, visitor types | | ||
| | `@kubb/ast/utils` | Spec-agnostic string and identifier helpers, ref helpers | | ||
| | Path | Contents | | ||
| | ------------------------------- | ----------------------------------------------------------------------------------------------------------------- | | ||
| | `@kubb/ast` | Runtime: node definitions, guards, visitor, macro engine, string and ref helpers, constants | | ||
| | `ast.factory` (via `@kubb/ast`) | Node constructors (`createSchema`, `createFile`, and friends), the `ts.factory` analogue | | ||
| | `@kubb/ast/types` | Types only: all node interfaces, type aliases, visitor types | | ||
| | `kubb/kit` | Re-exports the `ast` and `factory` namespaces, the way most Kubb code reaches the AST without a direct dependency | | ||
| `@kubb/ast` is an internal library. Inside the Kubb ecosystem the whole surface travels on the `ast` namespace from `kubb/kit`, so plugins and generators reach it there instead of depending on this package directly. The examples below import from `@kubb/ast` for clarity; through `kubb/kit` the same calls read as `ast.walk`, `ast.factory.createSchema`, and so on. | ||
| The macro presets (`macroDiscriminatorEnum`, `macroSimplifyUnion`, `macroEnumName`) and the string, identifier, and ref helpers live on the root `@kubb/ast` export. They no longer ship as separate `@kubb/ast/macros` and `@kubb/ast/utils` subpaths. | ||
| ## Node tree | ||
@@ -136,3 +139,3 @@ | ||
| ```ts | ||
| import { extractRefName } from '@kubb/ast/utils' | ||
| import { extractRefName } from '@kubb/ast' | ||
@@ -139,0 +142,0 @@ extractRefName('#/components/schemas/Pet') // 'Pet' |
637589
0.1%182
1.68%