Add .gitignore to exclude all node packages and lock files

This commit is contained in:
Adolfo Reyna
2026-02-23 21:56:04 -05:00
parent faae96c9ed
commit dcc5c6c044
9747 changed files with 1555105 additions and 2 deletions
@@ -0,0 +1,47 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.takeFrame = void 0;
const puppeteer_evaluate_1 = require("./puppeteer-evaluate");
const puppeteer_screenshot_1 = require("./puppeteer-screenshot");
const takeFrame = async ({ freePage, imageFormat, jpegQuality, width, height, output, scale, wantsBuffer, timeoutInMilliseconds, }) => {
var _a;
if (imageFormat === 'none') {
return null;
}
if (imageFormat === 'png' ||
imageFormat === 'pdf' ||
imageFormat === 'webp') {
await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
pageFunction: () => {
document.body.style.background = 'transparent';
},
args: [],
frame: null,
page: freePage,
timeoutInMilliseconds,
});
}
else {
await (0, puppeteer_evaluate_1.puppeteerEvaluateWithCatch)({
pageFunction: () => {
document.body.style.background = 'black';
},
args: [],
frame: null,
page: freePage,
timeoutInMilliseconds,
});
}
const buf = await (0, puppeteer_screenshot_1.screenshot)({
page: freePage,
omitBackground: imageFormat === 'png',
path: (_a = (wantsBuffer ? undefined : output)) !== null && _a !== void 0 ? _a : undefined,
type: imageFormat,
jpegQuality,
width,
height,
scale,
});
return buf;
};
exports.takeFrame = takeFrame;