(models: ModelDefinition[])
| 27 | } |
| 28 | |
| 29 | function writeStore(models: ModelDefinition[]): void { |
| 30 | const storePath = getStorePath() |
| 31 | const dir = path.dirname(storePath) |
| 32 | if (!fs.existsSync(dir)) { |
| 33 | fs.mkdirSync(dir, { recursive: true }) |
| 34 | } |
| 35 | fs.writeFileSync(storePath, JSON.stringify(models, null, 2), 'utf-8') |
| 36 | } |
| 37 | |
| 38 | export function loadCustomModels(): ModelDefinition[] { |
| 39 | return readStore() |
no test coverage detected