Files
Web_FreeCAD_Bitbybit/scripts/chrome-profile.mjs

8 lines
331 B
JavaScript

import { mkdtemp, rm } from 'node:fs/promises'
import { tmpdir } from 'node:os'
import { join } from 'node:path'
export const createChromeProfile = (name) => mkdtemp(join(tmpdir(), `bitbybit-${name}-`))
export const removeChromeProfile = (profile) => rm(profile, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 })