Skip to content

Commit

Permalink
chore: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonkuhrt committed May 17, 2021
1 parent 6b4440d commit 4a82c91
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/configuration/configuration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { cosmiconfig } from 'cosmiconfig'
import TypeScriptLoader from '@endemolshinegroup/cosmiconfig-typescript-loader'
import { cosmiconfig } from 'cosmiconfig'
import { Configuration } from '../generator'

const CONFIGURATION_NAME = 'nexus-prisma'
Expand All @@ -20,11 +20,15 @@ export async function getConfiguration(): Promise<Configuration | null> {
},
packageProp: [],
})

const result = await explorer.search()

if (!result) {
return null
}

console.log(`Loaded configuration from ${result.filepath}`)

// TODO runtime validation with zod
return result.config as Configuration
}

0 comments on commit 4a82c91

Please sign in to comment.