@dudousxd/nestjs-codegen 0.28.0 → 0.29.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/CHANGELOG.md +8 -0
- package/README.md +10 -8
- package/dist/cli/main.cjs +1 -1
- package/dist/cli/main.cjs.map +1 -1
- package/dist/cli/main.js +1 -1
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +79 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -14
- package/dist/index.d.ts +27 -14
- package/dist/index.js +80 -29
- package/dist/index.js.map +1 -1
- package/dist/nest/index.cjs +1 -1
- package/dist/nest/index.cjs.map +1 -1
- package/dist/nest/index.js +1 -1
- package/dist/nest/index.js.map +1 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @dudousxd/nestjs-codegen
|
|
2
2
|
|
|
3
|
+
## 0.29.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#113](https://github.com/DavideCarvalho/nestjs-codegen/pull/113) [`e01376c`](https://github.com/DavideCarvalho/nestjs-codegen/commit/e01376cce17518b32f105526c0b7627f01738921) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - `genuiSandboxKit()` takes the same options as the agent's Vite plugin: `components` (files, globs, directories or packages), `styles` (the app's style entries: the model is told the Tailwind tokens or the CSS class vocabulary, and the theme's variables), `wrapper`, `stylesDocs`, `tsconfig` and `output`. The stylesheets and what they `@import` are tracked as inputs.
|
|
8
|
+
|
|
9
|
+
**Breaking:** `include` and `entry` are now `components`, and `css` is now `styles`. Passing the old options throws a `CodegenError` naming the replacement. It needs `@dudousxd/nestjs-agent-core` >= 0.53.0.
|
|
10
|
+
|
|
3
11
|
## 0.28.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -120,10 +120,10 @@ const create = useMutation(api.users.create().mutationOptions());
|
|
|
120
120
|
|
|
121
121
|
`genuiSandboxKit()` writes the sandbox-kit docs that
|
|
122
122
|
[`@dudousxd/nestjs-agent`](https://github.com/DavideCarvalho/nestjs-agent) uses to render
|
|
123
|
-
generative UI
|
|
124
|
-
|
|
125
|
-
generate and in watch mode. It needs the optional peer `@dudousxd/nestjs-agent-core`
|
|
126
|
-
(>=0.
|
|
123
|
+
generative UI in your design system. The names and props of your components (read from their
|
|
124
|
+
TypeScript types), and what your styles offer, go to `.genui/sandbox-kit.json`. That happens on
|
|
125
|
+
every generate and in watch mode. It needs the optional peer `@dudousxd/nestjs-agent-core`
|
|
126
|
+
(>=0.53.0).
|
|
127
127
|
|
|
128
128
|
```ts
|
|
129
129
|
import { defineConfig, genuiSandboxKit } from '@dudousxd/nestjs-codegen';
|
|
@@ -131,13 +131,15 @@ import { defineConfig, genuiSandboxKit } from '@dudousxd/nestjs-codegen';
|
|
|
131
131
|
export default defineConfig({
|
|
132
132
|
contracts: { glob: 'src/**/*.controller.ts' },
|
|
133
133
|
codegen: { outDir: 'src/generated' },
|
|
134
|
-
extensions: [genuiSandboxKit({
|
|
134
|
+
extensions: [genuiSandboxKit({ components: 'web/components/ui', styles: 'web/styles/globals.css' })],
|
|
135
135
|
});
|
|
136
136
|
```
|
|
137
137
|
|
|
138
|
-
Options
|
|
139
|
-
|
|
140
|
-
`
|
|
138
|
+
Options (the same as the agent's Vite plugin):
|
|
139
|
+
|
|
140
|
+
- `components` (default: the first shadcn `components/ui` dir found), `styles`, `wrapper`, `stylesDocs`, `tsconfig`;
|
|
141
|
+
- `output` (default `.genui/sandbox-kit.json`, relative to the app cwd);
|
|
142
|
+
- `generate`, to inject the docs writer.
|
|
141
143
|
|
|
142
144
|
Write your own against the `@dudousxd/nestjs-codegen/extension` contract:
|
|
143
145
|
|
package/dist/cli/main.cjs
CHANGED