Skip to content

Commit cebc9c0

Browse files
gnitingapolanc
andauthored
feat: Added a tip to remove tips (prisma#24818)
* Added a tip to remove tips Added a tip to help the user understand how they can suppress tips. * changed init command promo url * updated snapshots --------- Co-authored-by: Alexander Polanco <[email protected]>
1 parent 4d8228f commit cebc9c0

File tree

3 files changed

+23
-19
lines changed

3 files changed

+23
-19
lines changed

packages/cli/src/Init.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ export class Init implements Command {
402402
steps.push(
403403
`Tip: Explore how you can extend the ${green(
404404
'ORM',
405-
)} with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm`,
405+
)} with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm`,
406406
)
407407

408408
if (!url || args['--datasource-provider']) {

packages/cli/src/__tests__/commands/__snapshots__/Init.test.ts.snap

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Next steps:
1010
2. Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver, mongodb or cockroachdb.
1111
3. Run prisma db pull to turn your database schema into a Prisma schema.
1212
4. Run prisma generate to generate the Prisma Client. You can then start querying your database.
13-
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
13+
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
1414
1515
More information in our documentation:
1616
https://pris.ly/d/getting-started
@@ -58,7 +58,7 @@ Next steps:
5858
2. Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver, mongodb or cockroachdb.
5959
3. Run prisma db pull to turn your database schema into a Prisma schema.
6060
4. Run prisma generate to generate the Prisma Client. You can then start querying your database.
61-
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
61+
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
6262
6363
More information in our documentation:
6464
https://pris.ly/d/getting-started
@@ -95,7 +95,7 @@ Next steps:
9595
2. Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver, mongodb or cockroachdb.
9696
3. Run prisma db pull to turn your database schema into a Prisma schema.
9797
4. Run prisma generate to generate the Prisma Client. You can then start querying your database.
98-
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
98+
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
9999
100100
More information in our documentation:
101101
https://pris.ly/d/getting-started
@@ -129,7 +129,7 @@ Next steps:
129129
1. Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
130130
2. Run prisma db pull to turn your database schema into a Prisma schema.
131131
3. Run prisma generate to generate the Prisma Client. You can then start querying your database.
132-
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
132+
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
133133
134134
More information in our documentation:
135135
https://pris.ly/d/getting-started
@@ -169,7 +169,7 @@ Next steps:
169169
1. Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
170170
2. Define models in the schema.prisma file.
171171
3. Run prisma generate to generate the Prisma Client. You can then start querying your database.
172-
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
172+
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
173173
174174
More information in our documentation:
175175
https://pris.ly/d/getting-started
@@ -210,7 +210,7 @@ Next steps:
210210
2. Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver, mongodb or cockroachdb.
211211
3. Run prisma db pull to turn your database schema into a Prisma schema.
212212
4. Run prisma generate to generate the Prisma Client. You can then start querying your database.
213-
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
213+
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
214214
215215
More information in our documentation:
216216
https://pris.ly/d/getting-started
@@ -251,7 +251,7 @@ Next steps:
251251
2. Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver, mongodb or cockroachdb.
252252
3. Run prisma db pull to turn your database schema into a Prisma schema.
253253
4. Run prisma generate to generate the Prisma Client. You can then start querying your database.
254-
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
254+
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
255255
256256
More information in our documentation:
257257
https://pris.ly/d/getting-started
@@ -287,7 +287,7 @@ Next steps:
287287
2. Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver, mongodb or cockroachdb.
288288
3. Run prisma db pull to turn your database schema into a Prisma schema.
289289
4. Run prisma generate to generate the Prisma Client. You can then start querying your database.
290-
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
290+
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
291291
292292
More information in our documentation:
293293
https://pris.ly/d/getting-started
@@ -322,7 +322,7 @@ Next steps:
322322
2. Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver, mongodb or cockroachdb.
323323
3. Run prisma db pull to turn your database schema into a Prisma schema.
324324
4. Run prisma generate to generate the Prisma Client. You can then start querying your database.
325-
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
325+
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
326326
327327
More information in our documentation:
328328
https://pris.ly/d/getting-started
@@ -358,7 +358,7 @@ Next steps:
358358
2. Set the provider of the datasource block in schema.prisma to match your database: postgresql, mysql, sqlite, sqlserver, mongodb or cockroachdb.
359359
3. Run prisma db pull to turn your database schema into a Prisma schema.
360360
4. Run prisma generate to generate the Prisma Client. You can then start querying your database.
361-
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
361+
5. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
362362
363363
More information in our documentation:
364364
https://pris.ly/d/getting-started
@@ -393,7 +393,7 @@ Next steps:
393393
1. Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
394394
2. Run prisma db pull to turn your database schema into a Prisma schema.
395395
3. Run prisma generate to generate the Prisma Client. You can then start querying your database.
396-
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
396+
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
397397
398398
More information in our documentation:
399399
https://pris.ly/d/getting-started
@@ -427,7 +427,7 @@ Next steps:
427427
1. Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
428428
2. Define models in the schema.prisma file.
429429
3. Run prisma generate to generate the Prisma Client. You can then start querying your database.
430-
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
430+
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
431431
432432
More information in our documentation:
433433
https://pris.ly/d/getting-started
@@ -461,7 +461,7 @@ Next steps:
461461
1. Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
462462
2. Run prisma db pull to turn your database schema into a Prisma schema.
463463
3. Run prisma generate to generate the Prisma Client. You can then start querying your database.
464-
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
464+
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
465465
466466
More information in our documentation:
467467
https://pris.ly/d/getting-started
@@ -492,7 +492,7 @@ Next steps:
492492
1. Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
493493
2. Run prisma db pull to turn your database schema into a Prisma schema.
494494
3. Run prisma generate to generate the Prisma Client. You can then start querying your database.
495-
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
495+
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
496496
497497
More information in our documentation:
498498
https://pris.ly/d/getting-started
@@ -526,7 +526,7 @@ Next steps:
526526
1. Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
527527
2. Run prisma db pull to turn your database schema into a Prisma schema.
528528
3. Run prisma generate to generate the Prisma Client. You can then start querying your database.
529-
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
529+
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
530530
531531
More information in our documentation:
532532
https://pris.ly/d/getting-started
@@ -560,7 +560,7 @@ Next steps:
560560
1. Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
561561
2. Run prisma db pull to turn your database schema into a Prisma schema.
562562
3. Run prisma generate to generate the Prisma Client. You can then start querying your database.
563-
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
563+
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
564564
565565
More information in our documentation:
566566
https://pris.ly/d/getting-started
@@ -594,7 +594,7 @@ Next steps:
594594
1. Set the DATABASE_URL in the .env file to point to your existing database. If your database has no tables yet, read https://pris.ly/d/getting-started
595595
2. Run prisma db pull to turn your database schema into a Prisma schema.
596596
3. Run prisma generate to generate the Prisma Client. You can then start querying your database.
597-
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
597+
4. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
598598
599599
More information in our documentation:
600600
https://pris.ly/d/getting-started
@@ -627,7 +627,7 @@ exports[`works with url param 1`] = `
627627
Next steps:
628628
1. Run prisma db pull to turn your database schema into a Prisma schema.
629629
2. Run prisma generate to generate the Prisma Client. You can then start querying your database.
630-
3. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/beyond-the-orm
630+
3. Tip: Explore how you can extend the ORM with scalable connection pooling, global caching, and real-time database events. Read: https://pris.ly/cli/beyond-orm
631631
632632
More information in our documentation:
633633
https://pris.ly/d/getting-started

packages/cli/src/utils/handlePromotions.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ const promotions = [
2323
text: `Tip: Curious about the SQL queries Prisma ORM generates? Optimize helps you enhance your visibility:`,
2424
link: 'https://pris.ly/tip-2-optimize',
2525
},
26+
{
27+
text: `Tip: Want to turn off tips and other hints?`,
28+
link: 'https://pris.ly/tip-4-nohints',
29+
},
2630
]
2731

2832
const getRandomPromotion = () => {

0 commit comments

Comments
 (0)