Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: issue a warning if "generateClient" is set to false in the prisma plugin #1555

Merged
merged 1 commit into from
Jul 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions packages/schema/src/plugins/prisma/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import telemetry from '../../telemetry';
import { execPackage } from '../../utils/exec-utils';
import { findUp } from '../../utils/pkg-utils';
import { PrismaSchemaGenerator } from './schema-generator';
import colors from 'colors';

export const name = 'Prisma';
export const description = 'Generating Prisma schema';
Expand Down Expand Up @@ -60,6 +61,12 @@ const run: PluginFunction = async (model, options, _dmmf, _globalOptions) => {
prismaClientPath = path.relative(path.dirname(options.schemaPath), absPath);
}
}
} else {
console.warn(
colors.yellow(
'Skipping prisma client generation because "generateClient" is set to false. This may break plugins that depend on the prisma client.'
)
);
}

// load the result DMMF
Expand Down
Loading