11import { log } from "@clack/prompts" ;
22import pc from "picocolors" ;
3+ import type { PackageManager , ProjectDatabase , ProjectOrm } from "../types" ;
34
45export function displayPostInstallInstructions (
5- database : string ,
6+ database : ProjectDatabase ,
67 projectName : string ,
7- packageManager : string ,
8+ packageManager : PackageManager ,
89 depsInstalled : boolean ,
9- orm ?: string ,
10+ orm ?: ProjectOrm ,
1011) {
1112 const runCmd = packageManager === "npm" ? "npm run" : packageManager ;
1213 const cdCmd = `cd ${ projectName } ` ;
@@ -25,8 +26,8 @@ ${database !== "none" ? getDatabaseInstructions(database, orm, runCmd) : ""}`);
2526}
2627
2728function getDatabaseInstructions (
28- database : string ,
29- orm ?: string ,
29+ database : ProjectDatabase ,
30+ orm ?: ProjectOrm ,
3031 runCmd ?: string ,
3132) : string {
3233 const instructions = [ ] ;
@@ -39,7 +40,7 @@ function getDatabaseInstructions(
3940 `${ pc . cyan ( "•" ) } Database UI: ${ pc . dim ( `${ runCmd } db:studio` ) } ` ,
4041 ) ;
4142
42- if ( database === "turso " ) {
43+ if ( database === "sqlite " ) {
4344 instructions . push (
4445 `${ pc . yellow ( "NOTE:" ) } Turso support with Prisma is in Early Access and requires additional setup.` ,
4546 `${ pc . dim ( "Learn more at: https://www.prisma.io/docs/orm/overview/databases/turso" ) } ` ,
@@ -52,12 +53,12 @@ function getDatabaseInstructions(
5253 instructions . push (
5354 `${ pc . cyan ( "•" ) } Database UI: ${ pc . dim ( `${ runCmd } db:studio` ) } ` ,
5455 ) ;
55- }
5656
57- if ( database === "sqlite" ) {
58- instructions . push (
59- `${ pc . cyan ( "•" ) } Start local DB: ${ pc . dim ( `cd packages/server && ${ runCmd } db:local` ) } ` ,
60- ) ;
57+ if ( database === "sqlite" ) {
58+ instructions . push (
59+ `${ pc . cyan ( "•" ) } Start local DB: ${ pc . dim ( `cd packages/server && ${ runCmd } db:local` ) } ` ,
60+ ) ;
61+ }
6162 }
6263
6364 return instructions . length
0 commit comments