@pixeleye/cli-capture
Advanced tools
Comparing version 0.7.4 to 0.7.5
@@ -90,3 +90,2 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { | ||
}); | ||
process.env["PW_TEST_SCREENSHOT_NO_FONTS_READY"] = "true"; | ||
await page.addScriptTag({ | ||
@@ -110,3 +109,3 @@ path: rrwebScript | ||
} | ||
const networkIdle = page.waitForLoadState("networkidle"); | ||
const awaiters = [page.waitForLoadState("networkidle")]; | ||
await page.waitForLoadState("load"); | ||
@@ -122,8 +121,10 @@ await page.waitForLoadState("domcontentloaded"); | ||
} | ||
await page.waitForFunction(() => document.fonts.ready).catch(() => { | ||
logger.info("Timed out waiting for document fonts to be ready"); | ||
}); | ||
awaiters.push( | ||
page.waitForFunction(() => document.fonts.ready).catch(() => { | ||
logger.info("Timed out waiting for document fonts to be ready"); | ||
}) | ||
); | ||
if (data.waitForSelectors && data.waitForSelectors.length > 0) | ||
Promise.all( | ||
data.waitForSelectors.map( | ||
awaiters.push( | ||
...data.waitForSelectors.map( | ||
(selector) => page.waitForSelector(selector, { | ||
@@ -135,9 +136,9 @@ timeout: 6e4 | ||
if (data.selector) | ||
await page.waitForSelector(data.selector, { | ||
timeout: 6e4 | ||
}); | ||
if (data.wait) { | ||
await page.waitForTimeout(data.wait); | ||
} | ||
await networkIdle; | ||
awaiters.push( | ||
page.waitForSelector(data.selector, { | ||
timeout: 6e4 | ||
}) | ||
); | ||
if (data.wait) awaiters.push(page.waitForTimeout(data.wait)); | ||
await Promise.all(awaiters); | ||
const locatedPage = data.selector ? page.locator(data.selector) : page; | ||
@@ -152,3 +153,4 @@ const mask = [...data?.maskSelectors || [], "[data-pixeleye-mask]"].map( | ||
scale: data.scale || "device", | ||
maskColor: data?.maskColor || defaultConfig.maskColor | ||
maskColor: data?.maskColor || defaultConfig.maskColor, | ||
timeout: 6e4 | ||
}); | ||
@@ -155,0 +157,0 @@ await page.close(); |
{ | ||
"name": "@pixeleye/cli-capture", | ||
"version": "0.7.4", | ||
"version": "0.7.5", | ||
"private": false, | ||
@@ -21,3 +21,3 @@ "license": "AGPL-3.0", | ||
"rimraf": "^5.0.7", | ||
"@pixeleye/cli-config": "0.6.8", | ||
"@pixeleye/cli-config": "0.6.9", | ||
"@pixeleye/esbuild": "0.0.0", | ||
@@ -29,5 +29,5 @@ "@pixeleye/eslint-config": "0.0.0", | ||
"object-hash": "^3.0.0", | ||
"playwright-core": "^1.44.0", | ||
"rrweb-snapshot": "2.0.0-alpha.13", | ||
"@pixeleye/cli-devices": "0.4.7", | ||
"playwright-core": "^1.44.1", | ||
"rrweb-snapshot": "2.0.0-alpha.14", | ||
"@pixeleye/cli-devices": "0.4.8", | ||
"@pixeleye/cli-logger": "0.2.7" | ||
@@ -34,0 +34,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
3414946
63432
5
+ Added@pixeleye/cli-devices@0.4.8(transitive)
+ Addedrrweb-snapshot@2.0.0-alpha.14(transitive)
- Removed@pixeleye/cli-devices@0.4.7(transitive)
- Removedrrweb-snapshot@2.0.0-alpha.13(transitive)
Updated@pixeleye/cli-devices@0.4.8
Updatedplaywright-core@^1.44.1