From 4a82c91301d89cb253641efbe14f8068fa40552c Mon Sep 17 00:00:00 2001 From: Jason Kuhrt Date: Mon, 17 May 2021 17:26:24 -0400 Subject: [PATCH] chore: formatting --- src/configuration/configuration.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/configuration/configuration.ts b/src/configuration/configuration.ts index fa3797e80..977f35d01 100644 --- a/src/configuration/configuration.ts +++ b/src/configuration/configuration.ts @@ -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' @@ -20,11 +20,15 @@ export async function getConfiguration(): Promise { }, 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 }