@rexeus/typeweaver 0.2.1 → 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.
Files changed (40) hide show
  1. package/README.md +30 -10
  2. package/dist/{acorn-CJ4HNU11.js → acorn-TNAGPKCR.js} +1076 -998
  3. package/dist/angular-3KXBV3WD.js +3030 -0
  4. package/dist/babel-V7SGJWS6.js +7296 -0
  5. package/dist/chunk-MLKGABMK.js +9 -0
  6. package/dist/chunk-Q6MQC6UP.js +34641 -0
  7. package/dist/cli.cjs +116222 -0
  8. package/dist/cli.d.cts +2 -0
  9. package/dist/cli.d.ts +2 -0
  10. package/dist/cli.js +2 -0
  11. package/dist/entry.cjs +116942 -0
  12. package/dist/entry.d.cts +2 -0
  13. package/dist/entry.d.ts +2 -0
  14. package/dist/entry.js +30 -0
  15. package/dist/estree-QSPT5I7I.js +4612 -0
  16. package/dist/flow-WHVBWPDR.js +27546 -0
  17. package/dist/{glimmer-DiXjs4DB.js → glimmer-BHRIPYOK.js} +1317 -1051
  18. package/dist/{graphql-DLJHmbDb.js → graphql-7EJJJFHU.js} +343 -307
  19. package/dist/html-YM5TKPVB.js +2926 -0
  20. package/dist/index.cjs +116228 -0
  21. package/dist/index.d.cts +2 -0
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js +2 -16
  24. package/dist/markdown-FIK6SNTF.js +3551 -0
  25. package/dist/meriyah-FBUICA5T.js +2684 -0
  26. package/dist/{postcss-DUOVol6C.js → postcss-ODV7XV5T.js} +1779 -1641
  27. package/dist/tsx-loader-H3LYLQCE.js +2 -0
  28. package/dist/typescript-BG63TNYD.js +13203 -0
  29. package/dist/{yaml-Bd8DkW_K.js → yaml-DV3ZI4ZT.js} +1140 -1058
  30. package/package.json +33 -33
  31. package/dist/angular-wXs0C_R2.js +0 -2626
  32. package/dist/babel-DNmSIBHM.js +0 -7201
  33. package/dist/cli-D5DHO8r6.js +0 -20691
  34. package/dist/estree-BfVT8G2n.js +0 -4301
  35. package/dist/flow-DgzFy9Js.js +0 -27138
  36. package/dist/html-BwjSBi_v.js +0 -2677
  37. package/dist/markdown-DWIPYE8e.js +0 -3363
  38. package/dist/meriyah-CbAY3E55.js +0 -2603
  39. package/dist/run-cli-with-tsx.js +0 -18
  40. package/dist/typescript-DDNbhgng.js +0 -12972
package/README.md CHANGED
@@ -3,6 +3,9 @@
3
3
  [![npm version](https://img.shields.io/npm/v/@rexeus/typeweaver.svg)](https://www.npmjs.com/package/@rexeus/typeweaver)
4
4
  [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
5
5
  [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)
6
+ [![Node.js](https://img.shields.io/badge/Node.js-supported-339933?logo=node.js&logoColor=fff)](https://nodejs.org/)
7
+ [![Deno](https://img.shields.io/badge/Deno-supported-000?logo=deno&logoColor=fff)](https://deno.land/)
8
+ [![Bun](https://img.shields.io/badge/Bun-supported-f9f1e1?logo=bun&logoColor=000)](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
- # Install the CLI as a dev dependency
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 | Description | Version |
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 | ![npm](https://img.shields.io/npm/v/@rexeus/typeweaver-types) |
46
58
  | [@rexeus/typeweaver-clients](https://github.com/rexeus/typeweaver/tree/main/packages/clients/README.md) | Plugin for HTTP clients using Axios | ![npm](https://img.shields.io/npm/v/@rexeus/typeweaver-clients) |
47
59
  | [@rexeus/typeweaver-hono](https://github.com/rexeus/typeweaver/tree/main/packages/hono/README.md) | Plugin for Hono routers | ![npm](https://img.shields.io/npm/v/@rexeus/typeweaver-hono) |
@@ -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
- # Generate with clients plugin:
73
+ # Node.js (npm)
62
74
  npx typeweaver generate --input ./api/definition --output ./api/generated --plugins clients
63
75
 
64
- # Generate with multiple plugins:
65
- npx typeweaver generate --input ./api/definition --output ./api/generated --plugins clients,hono,aws-cdk
76
+ # Node.js (pnpm)
77
+ pnpx typeweaver generate --input ./api/definition --output ./api/generated --plugins clients
66
78
 
67
- # Using all available plugins:
68
- npx typeweaver generate --input ./api/definition --output ./api/generated --plugins all
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