UNPKG

@blitzjs/installer

Version:

Package installation for the Blitz CLI

25 lines (24 loc) 810 B
import { Datasource } from '@mrleebo/prisma-ast'; /** * Modify the prisma datasource metadata to use the provider and url specified. * * @param source - schema.prisma source file contents * @param datasourceProps - datasource object to assign to the schema * @returns The modified schema.prisma source * @example Usage * ``` * setPrismaDataSource(source, { type: "datasource", name: "db", assignments: [ {type: "assignment", key: "provider", value: '"postgresql"'}, { type: "assignment", key: "url", value: {type: "function", name: "env", params: ['"DATABASE_URL"']}, }, ], }) * ``` */ export declare function setPrismaDataSource(source: string, datasourceProps: Datasource): Promise<string>;