Comparing version 1.1.0-next.14 to 1.1.0-next.15
@@ -6,3 +6,3 @@ import { __rest } from "tslib"; | ||
export function resolveTypegenConfig(config) { | ||
const { outputs, shouldGenerateArtifacts = Boolean(!process.env.NODE_ENV || process.env.NODE_ENV === 'development') } = config, rest = __rest(config, ["outputs", "shouldGenerateArtifacts"]); | ||
const { outputs, shouldGenerateArtifacts = Boolean(!process.env.NODE_ENV || process.env.NODE_ENV !== 'production') } = config, rest = __rest(config, ["outputs", "shouldGenerateArtifacts"]); | ||
const defaultSDLFilePath = path.join(process.cwd(), 'schema.graphql'); | ||
@@ -9,0 +9,0 @@ let typegenFilePath = null; |
@@ -95,3 +95,3 @@ import * as fs from 'fs'; | ||
if (!Path.isAbsolute(pathName)) { | ||
throw new Error(`Expected path for ${property} to be an absolute path, saw ${pathName}`); | ||
throw new Error(`Expected path for "${property}" to be an absolute path, saw "${pathName}"`); | ||
} | ||
@@ -356,3 +356,3 @@ return pathName; | ||
export function casesHandled(x) { | ||
throw new Error(`A case was not handled for value: ${x}`); | ||
throw new Error(`A case was not handled for value: "${x}"`); | ||
} | ||
@@ -370,3 +370,3 @@ /** Quickly log objects */ | ||
if (typeof rootTypePath !== 'string' || (!Path.isAbsolute(rootTypePath) && !isNodeModule(rootTypePath))) { | ||
throw new Error(`Expected an absolute path or Node package for the root typing path of the type ${typeName}, saw ${rootTypePath}`); | ||
throw new Error(`Expected an absolute path or Node package for the root typing path of the type "${typeName}", saw "${rootTypePath}"`); | ||
} | ||
@@ -378,7 +378,7 @@ if (isNodeModule(rootTypePath)) { | ||
catch (e) { | ||
throw new Error(`Module ${rootTypePath} for the type ${typeName} does not exist`); | ||
throw new Error(`Module "${rootTypePath}" for the type "${typeName}" does not exist`); | ||
} | ||
} | ||
else if (!fs.existsSync(rootTypePath)) { | ||
throw new Error(`Root typing path ${rootTypePath} for the type ${typeName} does not exist`); | ||
throw new Error(`Root typing path "${rootTypePath}" for the type "${typeName}" does not exist`); | ||
} | ||
@@ -385,0 +385,0 @@ if (isNodeModule(rootTypePath)) { |
@@ -9,3 +9,3 @@ "use strict"; | ||
function resolveTypegenConfig(config) { | ||
const { outputs, shouldGenerateArtifacts = Boolean(!process.env.NODE_ENV || process.env.NODE_ENV === 'development') } = config, rest = tslib_1.__rest(config, ["outputs", "shouldGenerateArtifacts"]); | ||
const { outputs, shouldGenerateArtifacts = Boolean(!process.env.NODE_ENV || process.env.NODE_ENV !== 'production') } = config, rest = tslib_1.__rest(config, ["outputs", "shouldGenerateArtifacts"]); | ||
const defaultSDLFilePath = path.join(process.cwd(), 'schema.graphql'); | ||
@@ -12,0 +12,0 @@ let typegenFilePath = null; |
@@ -106,3 +106,3 @@ "use strict"; | ||
if (!Path.isAbsolute(pathName)) { | ||
throw new Error(`Expected path for ${property} to be an absolute path, saw ${pathName}`); | ||
throw new Error(`Expected path for "${property}" to be an absolute path, saw "${pathName}"`); | ||
} | ||
@@ -385,3 +385,3 @@ return pathName; | ||
function casesHandled(x) { | ||
throw new Error(`A case was not handled for value: ${x}`); | ||
throw new Error(`A case was not handled for value: "${x}"`); | ||
} | ||
@@ -401,3 +401,3 @@ exports.casesHandled = casesHandled; | ||
if (typeof rootTypePath !== 'string' || (!Path.isAbsolute(rootTypePath) && !isNodeModule(rootTypePath))) { | ||
throw new Error(`Expected an absolute path or Node package for the root typing path of the type ${typeName}, saw ${rootTypePath}`); | ||
throw new Error(`Expected an absolute path or Node package for the root typing path of the type "${typeName}", saw "${rootTypePath}"`); | ||
} | ||
@@ -409,7 +409,7 @@ if (isNodeModule(rootTypePath)) { | ||
catch (e) { | ||
throw new Error(`Module ${rootTypePath} for the type ${typeName} does not exist`); | ||
throw new Error(`Module "${rootTypePath}" for the type "${typeName}" does not exist`); | ||
} | ||
} | ||
else if (!fs.existsSync(rootTypePath)) { | ||
throw new Error(`Root typing path ${rootTypePath} for the type ${typeName} does not exist`); | ||
throw new Error(`Root typing path "${rootTypePath}" for the type "${typeName}" does not exist`); | ||
} | ||
@@ -416,0 +416,0 @@ if (isNodeModule(rootTypePath)) { |
{ | ||
"name": "nexus", | ||
"version": "1.1.0-next.14", | ||
"version": "1.1.0-next.15", | ||
"description": "Scalable, strongly typed GraphQL schema development", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -10,3 +10,3 @@ import * as path from 'path' | ||
outputs, | ||
shouldGenerateArtifacts = Boolean(!process.env.NODE_ENV || process.env.NODE_ENV === 'development'), | ||
shouldGenerateArtifacts = Boolean(!process.env.NODE_ENV || process.env.NODE_ENV !== 'production'), | ||
...rest | ||
@@ -13,0 +13,0 @@ } = config |
@@ -152,3 +152,3 @@ import * as fs from 'fs' | ||
if (!Path.isAbsolute(pathName)) { | ||
throw new Error(`Expected path for ${property} to be an absolute path, saw ${pathName}`) | ||
throw new Error(`Expected path for "${property}" to be an absolute path, saw "${pathName}"`) | ||
} | ||
@@ -476,3 +476,3 @@ return pathName | ||
export function casesHandled(x: never): never { | ||
throw new Error(`A case was not handled for value: ${x}`) | ||
throw new Error(`A case was not handled for value: "${x}"`) | ||
} | ||
@@ -495,3 +495,3 @@ | ||
throw new Error( | ||
`Expected an absolute path or Node package for the root typing path of the type ${typeName}, saw ${rootTypePath}` | ||
`Expected an absolute path or Node package for the root typing path of the type "${typeName}", saw "${rootTypePath}"` | ||
) | ||
@@ -504,6 +504,6 @@ } | ||
} catch (e) { | ||
throw new Error(`Module ${rootTypePath} for the type ${typeName} does not exist`) | ||
throw new Error(`Module "${rootTypePath}" for the type "${typeName}" does not exist`) | ||
} | ||
} else if (!fs.existsSync(rootTypePath)) { | ||
throw new Error(`Root typing path ${rootTypePath} for the type ${typeName} does not exist`) | ||
throw new Error(`Root typing path "${rootTypePath}" for the type "${typeName}" does not exist`) | ||
} | ||
@@ -510,0 +510,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2057601