@dudousxd/nestjs-inertia-codegen 1.0.0 → 1.0.3

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,32 @@
1
1
  # Changelog — @dudousxd/nestjs-inertia-codegen
2
2
 
3
+ ## 1.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c79cc6d`](https://github.com/DavideCarvalho/nestjs-inertia/commit/c79cc6dad64342bce17c28a705ae27911c3f4c74) - Fix React Refresh preamble in @vite directive, watcher initial pass runs full discovery, auto-sync VERSION constants
8
+
9
+ - Updated dependencies [[`c79cc6d`](https://github.com/DavideCarvalho/nestjs-inertia/commit/c79cc6dad64342bce17c28a705ae27911c3f4c74)]:
10
+ - @dudousxd/nestjs-inertia@1.0.3
11
+
12
+ ## 1.0.2
13
+
14
+ ### Patch Changes
15
+
16
+ - [`27e0bab`](https://github.com/DavideCarvalho/nestjs-inertia/commit/27e0bab4b7f8752a4dd179cc715b4e3d64161624) - Fix: @vite directive includes React Refresh preamble, watcher initial pass runs full route+contract discovery from DTOs
17
+
18
+ - Updated dependencies [[`27e0bab`](https://github.com/DavideCarvalho/nestjs-inertia/commit/27e0bab4b7f8752a4dd179cc715b4e3d64161624)]:
19
+ - @dudousxd/nestjs-inertia@1.0.2
20
+
21
+ ## 1.0.1
22
+
23
+ ### Patch Changes
24
+
25
+ - [`a33c81b`](https://github.com/DavideCarvalho/nestjs-inertia/commit/a33c81b0a53077559b1f9433824cfaee1b01c80c) - Fix: @vite directive includes React Refresh preamble in dev, watcher initial pass runs full route+contract discovery
26
+
27
+ - Updated dependencies [[`a33c81b`](https://github.com/DavideCarvalho/nestjs-inertia/commit/a33c81b0a53077559b1f9433824cfaee1b01c80c)]:
28
+ - @dudousxd/nestjs-inertia@1.0.1
29
+
3
30
  ## 1.0.0
4
31
 
5
32
  ### Minor Changes
package/dist/cli/main.cjs CHANGED
@@ -1235,8 +1235,20 @@ async function watch(config, onChange) {
1235
1235
  return NO_OP_WATCHER;
1236
1236
  }
1237
1237
  try {
1238
- await generate(config);
1239
- } catch {
1238
+ const initialRoutes = await discoverContractsFast({
1239
+ cwd: config.codegen.cwd,
1240
+ glob: config.contracts.glob,
1241
+ ...config.app?.tsconfig ? {
1242
+ tsconfig: config.app.tsconfig
1243
+ } : {}
1244
+ });
1245
+ await generate(config, initialRoutes);
1246
+ } catch (err) {
1247
+ console.warn(`[nestjs-inertia-codegen] Initial route discovery failed, falling back to pages-only: ${err instanceof Error ? err.message : String(err)}`);
1248
+ try {
1249
+ await generate(config);
1250
+ } catch {
1251
+ }
1240
1252
  }
1241
1253
  let pagesDebounceTimer;
1242
1254
  const pagesWatcher = import_chokidar.default.watch((0, import_node_path10.join)(config.codegen.cwd, config.pages.glob), {
@@ -1321,7 +1333,7 @@ async function watch(config, onChange) {
1321
1333
  __name(watch, "watch");
1322
1334
 
1323
1335
  // src/index.ts
1324
- var VERSION = "1.0.0";
1336
+ var VERSION = "1.0.3";
1325
1337
 
1326
1338
  // src/cli/codegen.ts
1327
1339
  async function runCodegen(opts = {}) {