Skip to content

Commit

Permalink
chore: cleanup package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
timsuchanek committed Dec 19, 2019
1 parent 43b6493 commit c071ba0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cli/prisma2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"scripts": {
"test": "./fixtures/test.sh && ./node_modules/.bin/mocha src/__tests__/integrate.test.ts --require ts-mocha src/__tests__/integrate.test.ts --timeout 10s",
"test:debug": "./node_modules/.bin/mocha --inspect-brk src/__tests__/integrate.test.ts --require ts-mocha src/__tests__/integrate.test.ts --timeout 10s",
"install": "node download-build/index.js || echo \"Have fun with Prisma!\"",
"install": "node download-build/index.js",
"download": "node scripts/updateTag.js && node download-build/index.js || echo \"\"",
"tsc": "tsc -d && cp src/capture-worker.js dist/capture-worker.js && scripts/copy-runtime-dist.sh",
"ncc": "ncc build dist/bin.js -o build",
Expand Down
13 changes: 8 additions & 5 deletions cli/sdk/src/getGenerators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,13 @@ export async function getGenerators({
throw new Error(`${schemaPath} does not exist`)
}

const schema = fs.readFileSync(schemaPath, 'utf-8')
const dmmf = await getDMMF({ datamodel: schema, datamodelPath: schemaPath })
const datamodel = fs.readFileSync(schemaPath, 'utf-8')
const dmmf = await getDMMF({
datamodel,
datamodelPath: schemaPath,
})
const config = await getConfig({
datamodel: schema,
datamodel,
datamodelPath: schemaPath,
})

Expand Down Expand Up @@ -128,7 +131,7 @@ export async function getGenerators({
`Can't resolve output dir for generator ${chalk.bold(
generator.name,
)} with provider ${chalk.bold(generator.provider)}.
The generator needs to either define the \`defaultOutput\` path in the manifest or you need to define \`output\` in the schema.prisma file.`,
The generator needs to either define the \`defaultOutput\` path in the manifest or you need to define \`output\` in the datamodel.prisma file.`,
)
}

Expand All @@ -140,7 +143,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
}

const options: GeneratorOptions = {
datamodel: schema,
datamodel,
datasources: config.datasources,
generator,
dmmf,
Expand Down

0 comments on commit c071ba0

Please sign in to comment.