@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 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 with your design-system components: the names and props of your shadcn
124
- `components/ui` (read from their TypeScript types) go to `.genui/sandbox-kit.json`, on every
125
- generate and in watch mode. It needs the optional peer `@dudousxd/nestjs-agent-core`
126
- (>=0.52.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({ include: 'web/components/ui/*.tsx', css: 'web/styles/globals.css' })],
134
+ extensions: [genuiSandboxKit({ components: 'web/components/ui', styles: 'web/styles/globals.css' })],
135
135
  });
136
136
  ```
137
137
 
138
- Options: `entry`, `include` (default: the first shadcn `components/ui` dir found), `css`,
139
- `tsconfig`, `output` (default `.genui/sandbox-kit.json`, relative to the app cwd), and
140
- `generate` to inject the docs writer.
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
@@ -6068,7 +6068,7 @@ async function watch(config, onChange, options = {}) {
6068
6068
  }
6069
6069
 
6070
6070
  // src/index.ts
6071
- var VERSION = "0.28.0";
6071
+ var VERSION = "0.29.0";
6072
6072
 
6073
6073
  // src/cli/codegen.ts
6074
6074
  async function runCodegen(opts = {}) {