nexus-prisma icon indicating copy to clipboard operation
nexus-prisma copied to clipboard

Improve post-generation log message

Open jasonkuhrt opened this issue 3 years ago • 8 comments

What

image

  • Wrong location, should be after the generated nexus prisma to ...
  • Link https://pris.ly/d/nexus-prisma doesn't work
  • No nice code example after like Prisma Client

jasonkuhrt avatar May 18 '21 15:05 jasonkuhrt

Hey @nikolasburk can you help with: Link pris.ly/d/nexus-prisma doesn't work?

Hey @Jolg42 can you help with Wrong location, should be after the generated nexus prisma to ...?

jasonkuhrt avatar May 18 '21 15:05 jasonkuhrt

can you help with: Link pris.ly/d/nexus-prisma doesn't work?

Sure, what exactly needs to be done here?

nikolasburk avatar May 18 '21 15:05 nikolasburk

@jasonkuhrt You mean

This ✔ Generated Prisma Client (2.22.0) to ./node_modules/@prisma/client in 151ms

Should be ✔ Generated Prisma Client (2.22.0) to ./node_modules/nexus-prisma/dist/runtime in 151ms ?

Jolg42 avatar May 18 '21 15:05 Jolg42

@nikolasburk I need to setup that shortlink to point to this repo's README.

@Jolg42 No,

Instead of this:

You can now start using Nexus Prisma in your code. Reference: https://pris.ly/d/nexus-prisma

✔ Generated Prisma Client (2.22.0) to ./node_modules/@prisma/client in 122ms

✔ Generated Nexus Prisma to ./node_modules/nexus-prisma/dist/runtime in 3.26s
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client

It should be:

✔ Generated Prisma Client (2.22.0) to ./node_modules/@prisma/client in 122ms
You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client

✔ Generated Nexus Prisma to ./node_modules/nexus-prisma/dist/runtime in 3.26s
You can now start using Nexus Prisma in your code. Reference: https://pris.ly/d/nexus-prisma

jasonkuhrt avatar May 18 '21 15:05 jasonkuhrt

@Jolg42 this is the code https://github.com/prisma/nexus-prisma/blob/feat/allow-custom-context-property-name/src/cli/nexus-prisma.ts#L29-L36 where the log output I am writting is. I assume I'm putting it in the wrong place.

jasonkuhrt avatar May 18 '21 15:05 jasonkuhrt

We already log it from here https://github.com/prisma/prisma/blob/master/src/packages/cli/src/Generate.ts#L269

Jolg42 avatar May 18 '21 15:05 Jolg42

Done ✅ https://pris.ly/d/nexus-prisma

nikolasburk avatar May 18 '21 15:05 nikolasburk

@Jolg42 I'm talking about the Nexus Prisma log. Sorry my example above was broken. Fixed now.

jasonkuhrt avatar May 18 '21 19:05 jasonkuhrt