MCPcopy
hub / github.com/redwoodjs/graphql / skipTask

Function skipTask

packages/cli/src/lib/generatePrismaClient.js:9–17  ·  view source on GitHub ↗
(schema = getPaths().api.dbSchema)

Source from the content-addressed store, hash-verified

7import { runCommandTask, getPaths } from '../lib'
8
9const skipTask = (schema = getPaths().api.dbSchema) => {
10 if (!fs.existsSync(schema)) {
11 console.log(
12 `Skipping database and Prisma client generation, no \`schema.prisma\` file found: \`${schema}\``,
13 )
14 return true
15 }
16 return false
17}
18
19export const generatePrismaCommand = (schema) => {
20 if (skipTask(schema)) {

Callers 2

generatePrismaCommandFunction · 0.85
generatePrismaClientFunction · 0.85

Calls 2

getPathsFunction · 0.90
existsSyncMethod · 0.65

Tested by

no test coverage detected