playwright-core1.65.13.5 MB
Shown as plain text from the published tarball, after apm checked it against the version's checksum. Nothing in it runs on this page.
killProcess();
options.log(`[pid=${spawnedProcess.pid || "N/A"}] starting temporary directories cleanup`);
for (const dir of options.tempDirectories) {
try {
import_fs6.default.rmSync(dir, { force: true, recursive: true, maxRetries: 5 });
} catch (e) {
options.log(`[pid=${spawnedProcess.pid || "N/A"}] exception while removing ${dir}: ${e}`);
}
}
options.log(`[pid=${spawnedProcess.pid || "N/A"}] finished temporary directories cleanup`);
}
function killAndWait() {
killProcess();
return waitForCleanup;
}
return { launchedProcess: spawnedProcess, gracefullyClose, kill: killAndWait };
}
function killProcessTree(pid) {
try {
if (process.platform === "win32")
childProcess.spawnSync(`taskkill /pid ${pid} /T /F`, { shell: true, windowsHide: true });
else
process.kill(pid, "SIGKILL");
} catch {
}
}
function spawnAsync(cmd, args, options = {}) {
const { timeout, ...spawnOptions } = options;
const child = childProcess.spawn(cmd, args, { windowsHide: true, ...spawnOptions });
return new Promise((resolve) => {
let stdout = "";
let stderr = "";
if (child.stdout)
child.stdout.on("data", (data) => stdout += data.toString());
if (child.stderr)
child.stderr.on("data", (data) => stderr += data.toString());
const timer = timeout ? setTimeout(() => {
if (child.pid)
killProcessTree(child.pid);
resolve({ stdout, stderr, code: null, timedOut: true });
}, timeout) : void 0;
This file is 3.5 MB, over the 1.0 MB the full view shows, so apm shows the lines around the cited one. Lines longer than 4 kB are cut.