(run: (dir: string) => Promise<void> | void)
| 8 | import { SchedulerAdapter } from "../src/runtime/adapters/scheduler.js"; |
| 9 | |
| 10 | async function withTempDir(run: (dir: string) => Promise<void> | void): Promise<void> { |
| 11 | const dir = fs.mkdtempSync(path.join(os.tmpdir(), "skillpack-scheduler-")); |
| 12 | try { |
| 13 | await run(dir); |
| 14 | } finally { |
| 15 | fs.rmSync(dir, { recursive: true, force: true }); |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | function createSchedulerContext(rootDir: string) { |
| 20 | return { |