()
| 1 | export async function data() { |
| 2 | const path = Bun.env.MODELS_DEV_API_JSON |
| 3 | if (path) { |
| 4 | const file = Bun.file(path) |
| 5 | if (await file.exists()) { |
| 6 | return await file.text() |
| 7 | } |
| 8 | } |
| 9 | const json = await fetch("https://models.dev/api.json").then((x) => x.text()) |
| 10 | return json |
| 11 | } |