@dudousxd/nestjs-codegen 0.28.0 → 0.29.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @dudousxd/nestjs-codegen
2
2
 
3
+ ## 0.29.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#117](https://github.com/DavideCarvalho/nestjs-codegen/pull/117) [`a58eb46`](https://github.com/DavideCarvalho/nestjs-codegen/commit/a58eb46e3faf63c5715af210fce334ddf3f9b5d2) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Watch mode no longer rebuilds its type-checked programs on every change. Schema inference's program and the program that types factory-built (mixin) controllers are kept across passes and re-read only the files that changed on disk, so a pass in a large app drops from seconds to a few hundred milliseconds; they are still built again when a watched file is created or deleted. A pass also notices edits to files outside the watched globs that discovery had loaded (a schema module a controller imports), which it used to serve stale until that file was named by a watch event. An import of a module that did not exist yet is also picked up once the module appears, even outside the watched globs.
8
+
9
+ A generate pass now reads each input file once: the skip-when-unchanged hash, the hash recorded after extensions report their dependencies, and page discovery share one read, done in parallel. Shared-props discovery reuses the parsed tsconfig while it is unchanged instead of re-parsing it, and walking the project tree, on every pass. Generated output is unchanged.
10
+
11
+ ## 0.29.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [#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.
16
+
17
+ **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.
18
+
3
19
  ## 0.28.0
4
20
 
5
21
  ### 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