@rexeus/typeweaver 0.2.1 → 0.3.1

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 (52) hide show
  1. package/README.md +30 -10
  2. package/dist/{acorn-CJ4HNU11.js → acorn-TNAGPKCR.js} +1076 -998
  3. package/dist/acorn-ZFAHQIG7.js +3131 -0
  4. package/dist/angular-3KXBV3WD.js +3030 -0
  5. package/dist/angular-WMVKTHFF.js +3031 -0
  6. package/dist/babel-5QZSVJOE.js +7297 -0
  7. package/dist/babel-V7SGJWS6.js +7296 -0
  8. package/dist/chunk-4ST7XK4F.js +34641 -0
  9. package/dist/chunk-K3NQKI34.js +10 -0
  10. package/dist/chunk-MLKGABMK.js +9 -0
  11. package/dist/cli-GOSMI5D3.js +34642 -0
  12. package/dist/cli.cjs +116222 -0
  13. package/dist/cli.d.cts +2 -0
  14. package/dist/cli.d.ts +2 -0
  15. package/dist/cli.js +2 -0
  16. package/dist/entry.js +31 -0
  17. package/dist/estree-QSPT5I7I.js +4612 -0
  18. package/dist/estree-Y36AM62I.js +4613 -0
  19. package/dist/flow-7LH7X5GA.js +27547 -0
  20. package/dist/flow-WHVBWPDR.js +27546 -0
  21. package/dist/{glimmer-DiXjs4DB.js → glimmer-BHRIPYOK.js} +1317 -1051
  22. package/dist/glimmer-CBYXJR5M.js +2895 -0
  23. package/dist/{graphql-DLJHmbDb.js → graphql-7EJJJFHU.js} +343 -307
  24. package/dist/graphql-KKVSZXX7.js +1267 -0
  25. package/dist/html-M3WOAMIJ.js +2927 -0
  26. package/dist/html-YM5TKPVB.js +2926 -0
  27. package/dist/index.cjs +116228 -0
  28. package/dist/index.d.cts +2 -0
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.js +2 -16
  31. package/dist/markdown-FIK6SNTF.js +3551 -0
  32. package/dist/markdown-X6DQGEVV.js +3552 -0
  33. package/dist/meriyah-FBUICA5T.js +2684 -0
  34. package/dist/meriyah-GWPOVAHY.js +2685 -0
  35. package/dist/postcss-N2W7KQ6Q.js +5081 -0
  36. package/dist/{postcss-DUOVol6C.js → postcss-ODV7XV5T.js} +1779 -1641
  37. package/dist/tsx-loader-3QUDYASH.js +4 -0
  38. package/dist/typescript-BG63TNYD.js +13203 -0
  39. package/dist/typescript-IYJMK2NE.js +13204 -0
  40. package/dist/yaml-5FEMTYXO.js +4225 -0
  41. package/dist/{yaml-Bd8DkW_K.js → yaml-DV3ZI4ZT.js} +1140 -1058
  42. package/package.json +33 -33
  43. package/dist/angular-wXs0C_R2.js +0 -2626
  44. package/dist/babel-DNmSIBHM.js +0 -7201
  45. package/dist/cli-D5DHO8r6.js +0 -20691
  46. package/dist/estree-BfVT8G2n.js +0 -4301
  47. package/dist/flow-DgzFy9Js.js +0 -27138
  48. package/dist/html-BwjSBi_v.js +0 -2677
  49. package/dist/markdown-DWIPYE8e.js +0 -3363
  50. package/dist/meriyah-CbAY3E55.js +0 -2603
  51. package/dist/run-cli-with-tsx.js +0 -18
  52. 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
+ deno run -A npm:@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`, `deno run -A npm:@rexeus/typeweaver`, or `bunx` depending on your runtime.
122
+
103
123
  ## 🌱 Get Started
104
124
 
105
125
  ### 📁 Project Structure