@kubb/ast 5.0.0-beta.4 → 5.0.0-beta.40

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/README.md CHANGED
@@ -1,7 +1,6 @@
1
1
  <div align="center">
2
- <h1>@kubb/ast</h1>
3
2
  <a href="https://kubb.dev" target="_blank" rel="noopener noreferrer">
4
- <img width="180" src="https://raw.githubusercontent.com/kubb-labs/kubb/main/assets/logo.png" alt="Kubb logo">
3
+ <img src="https://kubb.dev/og.png" alt="Kubb banner">
5
4
  </a>
6
5
 
7
6
  [![npm version][npm-version-src]][npm-version-href]
@@ -11,7 +10,7 @@
11
10
  [![Sponsors][sponsors-src]][sponsors-href]
12
11
 
13
12
  <h4>
14
- <a href="https://kubb.dev/" target="_blank">Documentation</a>
13
+ <a href="https://kubb.dev" target="_blank">Documentation</a>
15
14
  <span> · </span>
16
15
  <a href="https://github.com/kubb-labs/kubb/issues/" target="_blank">Report Bug</a>
17
16
  <span> · </span>
@@ -19,7 +18,13 @@
19
18
  </h4>
20
19
  </div>
21
20
 
22
- Spec-agnostic AST layer for Kubb. Defines nodes, visitor pattern, factory functions, and type guards used across codegen plugins.
21
+ <br />
22
+
23
+ # @kubb/ast
24
+
25
+ ### Spec-agnostic AST layer for Kubb
26
+
27
+ Defines the node tree, visitor pattern, factory functions, and type guards used across every Kubb code generation plugin.
23
28
 
24
29
  ## Imports
25
30
 
@@ -120,17 +125,17 @@ function process(node: Node) {
120
125
  ### Refs
121
126
 
122
127
  ```ts
123
- import { buildRefMap, resolveRef } from '@kubb/ast'
128
+ import { extractRefName } from '@kubb/ast'
124
129
 
125
- const refMap = buildRefMap(root)
126
- const pet = resolveRef(refMap, 'Pet')
130
+ extractRefName('#/components/schemas/Pet') // 'Pet'
127
131
  ```
128
132
 
129
133
  ## Supporting Kubb
130
134
 
131
- Kubb uses an MIT-licensed 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:
135
+ Kubb is an open source project, and its development is funded entirely by sponsors. If you would like to become a sponsor, please consider:
132
136
 
133
137
  - [Become a Sponsor on GitHub](https://github.com/sponsors/stijnvanhulle)
138
+ - [See sponsorship tiers and our sponsors](https://kubb.dev/sponsors)
134
139
 
135
140
  <p align="center">
136
141
  <a href="https://github.com/sponsors/stijnvanhulle">
@@ -138,6 +143,10 @@ Kubb uses an MIT-licensed open source project with its ongoing development made
138
143
  </a>
139
144
  </p>
140
145
 
146
+ ## License
147
+
148
+ [MIT](https://github.com/kubb-labs/kubb/blob/main/licenses/LICENSE-MIT)
149
+
141
150
  <!-- Badges -->
142
151
 
143
152
  [npm-version-src]: https://img.shields.io/npm/v/@kubb/ast?flat&colorA=18181B&colorB=f58517