@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 +27 -0
- package/dist/cli/main.cjs +15 -3
- package/dist/cli/main.cjs.map +1 -1
- package/dist/cli/main.js +15 -3
- package/dist/cli/main.js.map +1 -1
- package/dist/index.cjs +15 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +15 -3
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/cli/main.js
CHANGED
|
@@ -1203,8 +1203,20 @@ async function watch(config, onChange) {
|
|
|
1203
1203
|
return NO_OP_WATCHER;
|
|
1204
1204
|
}
|
|
1205
1205
|
try {
|
|
1206
|
-
await
|
|
1207
|
-
|
|
1206
|
+
const initialRoutes = await discoverContractsFast({
|
|
1207
|
+
cwd: config.codegen.cwd,
|
|
1208
|
+
glob: config.contracts.glob,
|
|
1209
|
+
...config.app?.tsconfig ? {
|
|
1210
|
+
tsconfig: config.app.tsconfig
|
|
1211
|
+
} : {}
|
|
1212
|
+
});
|
|
1213
|
+
await generate(config, initialRoutes);
|
|
1214
|
+
} catch (err) {
|
|
1215
|
+
console.warn(`[nestjs-inertia-codegen] Initial route discovery failed, falling back to pages-only: ${err instanceof Error ? err.message : String(err)}`);
|
|
1216
|
+
try {
|
|
1217
|
+
await generate(config);
|
|
1218
|
+
} catch {
|
|
1219
|
+
}
|
|
1208
1220
|
}
|
|
1209
1221
|
let pagesDebounceTimer;
|
|
1210
1222
|
const pagesWatcher = chokidar.watch(join9(config.codegen.cwd, config.pages.glob), {
|
|
@@ -1289,7 +1301,7 @@ async function watch(config, onChange) {
|
|
|
1289
1301
|
__name(watch, "watch");
|
|
1290
1302
|
|
|
1291
1303
|
// src/index.ts
|
|
1292
|
-
var VERSION = "1.0.
|
|
1304
|
+
var VERSION = "1.0.3";
|
|
1293
1305
|
|
|
1294
1306
|
// src/cli/codegen.ts
|
|
1295
1307
|
async function runCodegen(opts = {}) {
|