blob: 8cd99618ea277a80e5ab13b36f5a2909a3359e77 (
plain)
1
2
3
4
5
6
7
8
9
|
import { randomUUID } from "node:crypto";
import { tmpdir } from "node:os";
import { join } from "node:path";
export const screenshotPath = (namespace: string, ext: "png" | "jpeg" = "png"): string =>
join(tmpdir(), `pi-browser-screenshot-${namespace}-${randomUUID()}.${ext}`);
export const pdfPath = (namespace: string): string =>
join(tmpdir(), `pi-browser-pdf-${namespace}-${randomUUID()}.pdf`);
|