Hey Folks, In 2.20 the provider and the output for generators can now be env vars. This means these values will now be provided to you as an Object and not as a string. You can see the relevant changes below.
export interface EnvValue {
fromEnvVar: null | string
value: string
}
export interface GeneratorConfig {
output: EnvValue | null # Changed from string | null
provider: EnvValue # Changed from string
}
// There is a utility in the SDK to help you get the string value.
import { parseEnvValue } from '@prisma/sdk'
// parseEnvValue(provider: EnvValue):string
Breaking Change for custom generators
Hey Folks, In
2.20
the provider and the output for generators can now be env vars. This means these values will now be provided to you as anObject
and not as astring
. You can see the relevant changes below.