(opts: LinkResult)
| 5 | import { formatEnvSummary } from './local-setup' |
| 6 | |
| 7 | export function formatCompletionOutput(opts: LinkResult): string { |
| 8 | const lines: string[] = [] |
| 9 | |
| 10 | lines.push('') |
| 11 | lines.push(green('✔') + bold(' Prisma Postgres linked successfully!')) |
| 12 | lines.push('') |
| 13 | lines.push(formatEnvSummary(opts.localFilesResult)) |
| 14 | lines.push('') |
| 15 | lines.push(bold('Next steps:')) |
| 16 | |
| 17 | if (opts.hasModels) { |
| 18 | lines.push(` 1. Run ${green(getCommandWithExecutor('prisma generate'))} to generate the Prisma Client`) |
| 19 | lines.push(` 2. Run ${green(getCommandWithExecutor('prisma migrate dev'))} to apply your schema to the database`) |
| 20 | lines.push( |
| 21 | ` 3. Start querying: ${dim('https://www.prisma.io/docs/getting-started/quickstart#4-explore-how-to-send-queries-to-your-database-with-prisma-client')}`, |
| 22 | ) |
| 23 | } else { |
| 24 | lines.push(` 1. Define your data model in ${green('prisma/schema.prisma')}`) |
| 25 | lines.push(` 2. Run ${green(getCommandWithExecutor('prisma migrate dev'))} to create the database tables`) |
| 26 | lines.push(` 3. Run ${green(getCommandWithExecutor('prisma generate'))} and start querying`) |
| 27 | } |
| 28 | |
| 29 | lines.push('') |
| 30 | |
| 31 | return lines.join('\n') |
| 32 | } |
no test coverage detected