MCPcopy
hub / github.com/prisma/prisma / resolveOutput

Function resolveOutput

packages/internals/src/resolveOutput.ts:34–42  ·  view source on GitHub ↗
(options: ResolveOutputOptions)

Source from the content-addressed store, hash-verified

32}
33
34export async function resolveOutput(options: ResolveOutputOptions): Promise<string> {
35 const defaultOutput = stripRelativePath(options.defaultOutput)
36 if (defaultOutput.startsWith('node_modules')) {
37 const nodeModulesBase = await resolveNodeModulesBase(options.baseDir)
38 return path.resolve(nodeModulesBase, defaultOutput)
39 }
40
41 return path.resolve(options.baseDir, defaultOutput)
42}
43
44function stripRelativePath(pathString: string): string {
45 if (pathString.startsWith('./')) {

Callers 1

getGeneratorsFunction · 0.90

Calls 2

stripRelativePathFunction · 0.85
resolveNodeModulesBaseFunction · 0.85

Tested by

no test coverage detected