@rexeus/typeweaver 0.2.0 → 0.3.0
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 +30 -10
- package/dist/{acorn-CJ4HNU11.js → acorn-TNAGPKCR.js} +1076 -998
- package/dist/angular-3KXBV3WD.js +3030 -0
- package/dist/babel-V7SGJWS6.js +7296 -0
- package/dist/chunk-MLKGABMK.js +9 -0
- package/dist/chunk-Q6MQC6UP.js +34641 -0
- package/dist/cli.cjs +116222 -0
- package/dist/cli.d.cts +2 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +2 -0
- package/dist/entry.cjs +116942 -0
- package/dist/entry.d.cts +2 -0
- package/dist/entry.d.ts +2 -0
- package/dist/entry.js +30 -0
- package/dist/estree-QSPT5I7I.js +4612 -0
- package/dist/flow-WHVBWPDR.js +27546 -0
- package/dist/{glimmer-DiXjs4DB.js → glimmer-BHRIPYOK.js} +1317 -1051
- package/dist/{graphql-DLJHmbDb.js → graphql-7EJJJFHU.js} +343 -307
- package/dist/html-YM5TKPVB.js +2926 -0
- package/dist/index.cjs +116228 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -16
- package/dist/markdown-FIK6SNTF.js +3551 -0
- package/dist/meriyah-FBUICA5T.js +2684 -0
- package/dist/{postcss-DUOVol6C.js → postcss-ODV7XV5T.js} +1779 -1641
- package/dist/tsx-loader-H3LYLQCE.js +2 -0
- package/dist/typescript-BG63TNYD.js +13203 -0
- package/dist/{yaml-Bd8DkW_K.js → yaml-DV3ZI4ZT.js} +1140 -1058
- package/package.json +33 -33
- package/dist/angular-wXs0C_R2.js +0 -2626
- package/dist/babel-DNmSIBHM.js +0 -7201
- package/dist/cli-Nz3HYFYF.js +0 -20691
- package/dist/estree-BfVT8G2n.js +0 -4301
- package/dist/flow-DgzFy9Js.js +0 -27138
- package/dist/html-BwjSBi_v.js +0 -2677
- package/dist/markdown-DWIPYE8e.js +0 -3363
- package/dist/meriyah-CbAY3E55.js +0 -2603
- package/dist/run-cli-with-tsx.js +0 -18
- package/dist/typescript-DDNbhgng.js +0 -12972
package/README.md
CHANGED
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@rexeus/typeweaver)
|
|
4
4
|
[](https://opensource.org/licenses/Apache-2.0)
|
|
5
5
|
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://nodejs.org/)
|
|
7
|
+
[](https://deno.land/)
|
|
8
|
+
[](https://bun.sh/)
|
|
6
9
|
|
|
7
10
|
Typeweaver is a type-safe HTTP API framework built for API-first development with a focus on
|
|
8
11
|
developer experience. Use typeweaver to specify your HTTP APIs in TypeScript and Zod, and generate
|
|
@@ -13,11 +16,20 @@ clients, validators, routers, and more ✨
|
|
|
13
16
|
## 📥 Installation
|
|
14
17
|
|
|
15
18
|
```bash
|
|
16
|
-
#
|
|
19
|
+
# Node.js (npm)
|
|
17
20
|
npm install -D @rexeus/typeweaver
|
|
18
|
-
|
|
19
|
-
# Install the runtime as a dependency
|
|
20
21
|
npm install @rexeus/typeweaver-core
|
|
22
|
+
|
|
23
|
+
# Node.js (pnpm)
|
|
24
|
+
pnpm add -D @rexeus/typeweaver
|
|
25
|
+
pnpm add @rexeus/typeweaver-core
|
|
26
|
+
|
|
27
|
+
# Deno
|
|
28
|
+
deno add npm:@rexeus/typeweaver npm:@rexeus/typeweaver-core
|
|
29
|
+
|
|
30
|
+
# Bun
|
|
31
|
+
bun add -D @rexeus/typeweaver
|
|
32
|
+
bun add @rexeus/typeweaver-core
|
|
21
33
|
```
|
|
22
34
|
|
|
23
35
|
Now you are ready to start building! Check out [Quickstart](#-get-started)
|
|
@@ -40,8 +52,8 @@ Now you are ready to start building! Check out [Quickstart](#-get-started)
|
|
|
40
52
|
|
|
41
53
|
## 🔌 Available Plugins
|
|
42
54
|
|
|
43
|
-
| Package
|
|
44
|
-
|
|
|
55
|
+
| Package | Description | Version |
|
|
56
|
+
| ------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
|
|
45
57
|
| [@rexeus/typeweaver-types](https://github.com/rexeus/typeweaver/tree/main/packages/types/README.md) | Plugin for request/response types and validation - the foundation for all other plugins and always included |  |
|
|
46
58
|
| [@rexeus/typeweaver-clients](https://github.com/rexeus/typeweaver/tree/main/packages/clients/README.md) | Plugin for HTTP clients using Axios |  |
|
|
47
59
|
| [@rexeus/typeweaver-hono](https://github.com/rexeus/typeweaver/tree/main/packages/hono/README.md) | Plugin for Hono routers |  |
|
|
@@ -58,16 +70,22 @@ More plugins are planned. If you want to build your own, check out the plugin sy
|
|
|
58
70
|
Generate TypeScript code from your API definitions:
|
|
59
71
|
|
|
60
72
|
```bash
|
|
61
|
-
#
|
|
73
|
+
# Node.js (npm)
|
|
62
74
|
npx typeweaver generate --input ./api/definition --output ./api/generated --plugins clients
|
|
63
75
|
|
|
64
|
-
#
|
|
65
|
-
|
|
76
|
+
# Node.js (pnpm)
|
|
77
|
+
pnpx typeweaver generate --input ./api/definition --output ./api/generated --plugins clients
|
|
66
78
|
|
|
67
|
-
#
|
|
68
|
-
|
|
79
|
+
# Deno
|
|
80
|
+
dx @rexeus/typeweaver generate --input ./api/definition --output ./api/generated --plugins clients
|
|
81
|
+
|
|
82
|
+
# Bun
|
|
83
|
+
bunx typeweaver generate --input ./api/definition --output ./api/generated --plugins clients
|
|
69
84
|
```
|
|
70
85
|
|
|
86
|
+
> **Note**: Deno may require the `--sloppy-imports` flag or equivalent configuration in `deno.json`
|
|
87
|
+
> when your API definitions use extensionless TypeScript imports.
|
|
88
|
+
|
|
71
89
|
### ⚙️ Options
|
|
72
90
|
|
|
73
91
|
- `--input, -i <path>`: Input directory containing API definitions (required)
|
|
@@ -100,6 +118,8 @@ Then run:
|
|
|
100
118
|
npx typeweaver generate --config ./typeweaver.config.js
|
|
101
119
|
```
|
|
102
120
|
|
|
121
|
+
> Replace `npx` with `pnpx`, `dx @rexeus/typeweaver`, or `bunx` depending on your runtime.
|
|
122
|
+
|
|
103
123
|
## 🌱 Get Started
|
|
104
124
|
|
|
105
125
|
### 📁 Project Structure
|