()
| 10 | } |
| 11 | |
| 12 | const getModelsJSONPath = (): string => { |
| 13 | const checkModelsPaths = [path.join(__dirname, '..', 'models.json'), path.join(__dirname, '..', '..', 'models.json')] |
| 14 | for (const checkPath of checkModelsPaths) { |
| 15 | if (fs.existsSync(checkPath)) { |
| 16 | return checkPath |
| 17 | } |
| 18 | } |
| 19 | return '' |
| 20 | } |
| 21 | |
| 22 | const isValidUrl = (urlString: string) => { |
| 23 | let url |