@postxl/cli 1.5.0 → 1.5.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.
|
@@ -69,8 +69,9 @@ Installation flow:
|
|
|
69
69
|
5. Runs pnpm install again to fetch devDependencies added by the generated package.json
|
|
70
70
|
6. Swaps in the custom schema (if provided) before the final generation
|
|
71
71
|
7. Runs second code generation with full formatting (prettier, eslint)
|
|
72
|
-
8. Generates
|
|
73
|
-
9.
|
|
72
|
+
8. Generates TanStack Router route tree
|
|
73
|
+
9. Generates Prisma client
|
|
74
|
+
10. Initializes a git repository (unless --skip-git)
|
|
74
75
|
|
|
75
76
|
If --skip-generate is used with a custom schema, the custom schema is written directly.`)
|
|
76
77
|
.option('-n, --name <name>', 'Project name')
|
|
@@ -113,8 +114,9 @@ If --skip-generate is used with a custom schema, the custom schema is written di
|
|
|
113
114
|
}
|
|
114
115
|
// The second generation runs with transformations - setting up prettier, eslint, etc.
|
|
115
116
|
await runGenerate({ projectPath, transform: true });
|
|
117
|
+
await generateTanStackRouter(projectPath);
|
|
116
118
|
await generatePrismaClient(projectPath);
|
|
117
|
-
if (!options.
|
|
119
|
+
if (!options.skipGit) {
|
|
118
120
|
await initializeGitRepository(projectPath);
|
|
119
121
|
}
|
|
120
122
|
}
|
|
@@ -380,6 +382,17 @@ async function runGenerate({ projectPath, transform, }) {
|
|
|
380
382
|
console.log('You can manually run "pnpm run generate" in the project directory.');
|
|
381
383
|
}
|
|
382
384
|
}
|
|
385
|
+
async function generateTanStackRouter(targetPath) {
|
|
386
|
+
console.log('\nGenerating TanStack Router route tree...');
|
|
387
|
+
try {
|
|
388
|
+
await run('pnpm run generate:tsr', { cwd: targetPath });
|
|
389
|
+
console.log('TanStack Router route tree generated successfully!');
|
|
390
|
+
}
|
|
391
|
+
catch (error) {
|
|
392
|
+
console.error('Failed to generate TanStack Router route tree:', error);
|
|
393
|
+
console.log('You can manually run "pnpm run generate:tsr" in the project directory.');
|
|
394
|
+
}
|
|
395
|
+
}
|
|
383
396
|
async function generatePrismaClient(targetPath) {
|
|
384
397
|
console.log('\nGenerating Prisma client...');
|
|
385
398
|
try {
|