1import { existsSync, rmSync } from "node:fs";2import path from "node:path";3import { fileURLToPath } from "node:url";45const __filename = fileURLToPath(import.meta.url);6const __dirname = path.dirname(__filename);7const rootDir = path.resolve(__dirname, "..");8const artifactsDir = path.join(rootDir, "dist-firefox", "web-ext-artifacts");910if (existsSync(artifactsDir)) {11 rmSync(artifactsDir, { recursive: true, force: true });12 console.log(`Removed stale Firefox package artifacts from ${path.relative(rootDir, artifactsDir)}`);13}