({
schemaPathFromArgs,
schemaPathFromConfig,
baseDir,
}: {
schemaPathFromArgs?: string
schemaPathFromConfig?: string
baseDir: string
})
| 49 | * of the CLI invocation if no config file is found. |
| 50 | */ |
| 51 | export 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 |
no outgoing calls