Generate protobuf service definitions based on prisma models.
You can define the generator in your prisma schema in the following way:
generator proto {
provider = "npx prisma-generator-proto"
output = "../"
template = "./template"
after = "node run something"
}
The template and the after fields are optional.
output
: a parent directory for the generated proto filestemplate
: lets you configure your own custom source for template files (mode about templates here)after
: any executable you'd like to run after the generation finishes - this might be useful if you're workflow requires generating further code using the proto files as sources (e.g. compiling proto clients, etc)
This generator was bootstraped using create-prisma-generator