| 1 | import { execFileSync } from "node:child_process" |
| 2 | import { mkdtempSync, rmSync } from "node:fs" |
| 3 | import { join } from "node:path" |
| 4 | import { fileURLToPath, pathToFileURL } from "node:url" |
| 5 | import { roots } from "./cases.ts" |
| 6 | |
| 7 | const directory = mkdtempSync(fileURLToPath(new URL("./.aot-", import.meta.url))) |
| 8 | try { |
| 9 | const file = join(directory, "generated.mjs") |
| 10 | execFileSync(process.execPath, [fileURLToPath(new URL("./generate.mts", import.meta.url)), file]) |
| 11 | const generated = await import(pathToFileURL(file).href) |
| 12 | generated.install(roots) |
| 13 | } finally { |
| 14 | rmSync(directory, { recursive: true, force: true }) |
| 15 | } |
| 16 | |
| 17 | export { isExtraValid, isInvalid, isValid, parseExtraValid, parseInvalid, parseValid } from "./cases.ts" |