MCPcopy
hub / github.com/prisma/prisma / createSchemaPathInput

Function createSchemaPathInput

packages/internals/src/cli/getSchema.ts:51–65  ·  view source on GitHub ↗
({
  schemaPathFromArgs,
  schemaPathFromConfig,
  baseDir,
}: {
  schemaPathFromArgs?: string
  schemaPathFromConfig?: string
  baseDir: string
})

Source from the content-addressed store, hash-verified

49 * of the CLI invocation if no config file is found.
50 */
51export function createSchemaPathInput({
52 schemaPathFromArgs,
53 schemaPathFromConfig,
54 baseDir,
55}: {
56 schemaPathFromArgs?: string
57 schemaPathFromConfig?: string
58 baseDir: string
59}): SchemaPathInput {
60 return schemaPathFromArgs
61 ? { cliProvidedPath: schemaPathFromArgs }
62 : schemaPathFromConfig
63 ? { configProvidedPath: schemaPathFromConfig }
64 : { baseDir }
65}
66
67/**
68 * Loads the schema, throws an error if it is not found

Callers 15

testDirectoryConfigFunction · 0.90
testSchemaPathFunction · 0.90
parseMethod · 0.90
parseMethod · 0.90
parseMethod · 0.90
parseMethod · 0.90
parseMethod · 0.90
parseMethod · 0.90
parseMethod · 0.90
parseMethod · 0.90
parseMethod · 0.90
rpc.test.tsFile · 0.90

Calls

no outgoing calls

Tested by 2

testDirectoryConfigFunction · 0.72
testSchemaPathFunction · 0.72