()
| 4 | import path from 'path'; |
| 5 | |
| 6 | export function makeTempDir(): string { |
| 7 | return path.join(os.tmpdir(), crypto.randomUUID()); |
| 8 | } |
| 9 | |
| 10 | export async function withTempDir<T>(receiveTempDir: (tempDir: string) => Promise<T>): Promise<T> { |
| 11 | const tempDir = makeTempDir(); |