From ffd5cac2656ac5f6f2ddffcba8551d330f80df43 Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Tue, 21 May 2024 13:07:05 +0100 Subject: [PATCH 01/14] Delete pre.json --- .changeset/pre.json | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 .changeset/pre.json diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 1200d0c7..00000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "mode": "pre", - "tag": "alpha", - "initialVersions": { - "@pixeleye/api-tests": "1.0.3", - "@pixeleye/marketing": "0.1.3", - "@pixeleye/web": "0.1.4", - "@pixeleye/esbuild": "0.0.0", - "@pixeleye/eslint-config": "0.0.0", - "@pixeleye/tailwind": "0.0.0", - "@pixeleye/tsconfig": "0.0.0", - "@pixeleye/cypress-example": null, - "@pixeleye/playwright-example": null, - "@pixeleye/puppeteer-with-vitest": null, - "@pixeleye/cli-api": "0.3.17", - "@pixeleye/cli-booth": "0.5.7", - "@pixeleye/cli-capture": "0.5.1", - "@pixeleye/cli-config": "0.6.7", - "@pixeleye/cli-devices": "0.4.7", - "@pixeleye/cli-env": "0.6.1", - "@pixeleye/cli-image": "0.3.7", - "@pixeleye/cli-install": "0.4.7", - "@pixeleye/cli-logger": "0.2.7", - "pixeleye": "0.7.9", - "@pixeleye/cypress": "0.4.6", - "@pixeleye/playwright": "0.6.1", - "@pixeleye/puppeteer": "0.5.1", - "@pixeleye/storybook": "0.6.0", - "@pixeleye/api": "0.2.0", - "@pixeleye/device-logos": "0.0.0", - "@pixeleye/reviewer": "0.0.3", - "@pixeleye/ui": "0.0.3" - }, - "changesets": [] -} From 5b0ad9261379f8e294b644ef7599be9b9b5f1c60 Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Tue, 21 May 2024 13:07:30 +0100 Subject: [PATCH 02/14] Cleaning up --- .changeset/heavy-eggs-dream.md | 11 ----------- .changeset/moody-cameras-talk.md | 11 ----------- 2 files changed, 22 deletions(-) delete mode 100644 .changeset/heavy-eggs-dream.md delete mode 100644 .changeset/moody-cameras-talk.md diff --git a/.changeset/heavy-eggs-dream.md b/.changeset/heavy-eggs-dream.md deleted file mode 100644 index 8b0f3cb0..00000000 --- a/.changeset/heavy-eggs-dream.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@pixeleye/cli-booth": patch -"@pixeleye/cli-capture": patch -"pixeleye": patch -"@pixeleye/cypress": patch -"@pixeleye/playwright": patch -"@pixeleye/puppeteer": patch -"@pixeleye/storybook": patch ---- - -Prerelease diff --git a/.changeset/moody-cameras-talk.md b/.changeset/moody-cameras-talk.md deleted file mode 100644 index a3c5ad9b..00000000 --- a/.changeset/moody-cameras-talk.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@pixeleye/cli-capture": patch -"@pixeleye/cli-booth": patch -"pixeleye": patch -"@pixeleye/playwright": patch -"@pixeleye/puppeteer": patch -"@pixeleye/storybook": patch -"@pixeleye/cypress": patch ---- - -pre-release From 5a7df1bd35d1fedd96ca67ecd5202115b450ef0f Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 09:43:49 +0100 Subject: [PATCH 03/14] Updating to patched version of rrweb-snapshot --- integrations/cli/cli-booth/package.json | 4 +- integrations/cli/cli-booth/src/server.ts | 2 +- integrations/cli/cli-capture/package.json | 4 +- integrations/cli/cli-capture/src/capture.ts | 2 +- integrations/cli/pixeleye/package.json | 4 +- integrations/cypress/package.json | 4 +- integrations/cypress/src/snapshot.ts | 2 +- integrations/playwright/package.json | 4 +- integrations/playwright/src/snapshot.ts | 2 +- integrations/puppeteer/package.json | 2 +- integrations/puppeteer/src/snapshot.ts | 2 +- integrations/storybook/package.json | 2 +- pnpm-lock.yaml | 67 +++++++++++++-------- 13 files changed, 60 insertions(+), 41 deletions(-) diff --git a/integrations/cli/cli-booth/package.json b/integrations/cli/cli-booth/package.json index 39e6a037..dc5f92f3 100644 --- a/integrations/cli/cli-booth/package.json +++ b/integrations/cli/cli-booth/package.json @@ -1,6 +1,6 @@ { "name": "@pixeleye/cli-booth", - "version": "0.5.7", + "version": "0.5.7-alpha.1", "private": false, "license": "AGPL-3.0", "main": "./src/index.ts", @@ -31,7 +31,7 @@ "@pixeleye/tsconfig": "workspace:*", "@types/body-parser": "^1.19.5", "rimraf": "^5.0.5", - "rrweb-snapshot": "2.0.0-alpha.13" + "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14" }, "dependencies": { "@pixeleye/api": "workspace:*", diff --git a/integrations/cli/cli-booth/src/server.ts b/integrations/cli/cli-booth/src/server.ts index fbe6dd06..32bfa938 100644 --- a/integrations/cli/cli-booth/src/server.ts +++ b/integrations/cli/cli-booth/src/server.ts @@ -10,7 +10,7 @@ import { } from "@pixeleye/cli-capture"; import { createBus } from "./bus"; import { API, uploadSnapshots } from "@pixeleye/cli-api"; -import { serializedNodeWithId } from "rrweb-snapshot"; +import { serializedNodeWithId } from "@pixeleye/rrweb-snapshot"; import { DeviceDescriptor } from "@pixeleye/cli-devices"; export interface BoothServerOptions { diff --git a/integrations/cli/cli-capture/package.json b/integrations/cli/cli-capture/package.json index 6e1e880c..aec800d7 100644 --- a/integrations/cli/cli-capture/package.json +++ b/integrations/cli/cli-capture/package.json @@ -1,6 +1,6 @@ { "name": "@pixeleye/cli-capture", - "version": "0.5.1", + "version": "0.5.1-alpha.1", "private": false, "license": "AGPL-3.0", "main": "./src/index.ts", @@ -39,6 +39,6 @@ "jsdom": "^24.0.0", "object-hash": "^3.0.0", "playwright-core": "^1.43.0", - "rrweb-snapshot": "2.0.0-alpha.13" + "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14" } } \ No newline at end of file diff --git a/integrations/cli/cli-capture/src/capture.ts b/integrations/cli/cli-capture/src/capture.ts index 75565c5c..3c1cad83 100644 --- a/integrations/cli/cli-capture/src/capture.ts +++ b/integrations/cli/cli-capture/src/capture.ts @@ -3,7 +3,7 @@ import { createMirror, rebuild, serializedNodeWithId, -} from "rrweb-snapshot"; +} from "@pixeleye/rrweb-snapshot"; import { getPage } from "./browsers"; import { DeviceDescriptor } from "@pixeleye/cli-devices"; import { SnapshotDefinition, defaultConfig } from "@pixeleye/cli-config"; diff --git a/integrations/cli/pixeleye/package.json b/integrations/cli/pixeleye/package.json index b0cc7dfe..79a4a2d8 100644 --- a/integrations/cli/pixeleye/package.json +++ b/integrations/cli/pixeleye/package.json @@ -1,6 +1,6 @@ { "name": "pixeleye", - "version": "0.7.9", + "version": "0.7.9-alpha.1", "private": false, "license": "AGPL-3.0", "scripts": { @@ -55,7 +55,7 @@ "graceful-fs": "^4.2.11", "ora": "^8.0.1", "playwright-core": "^1.43.0", - "rrweb-snapshot": "2.0.0-alpha.13", + "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14", "sitemapper": "^3.2.8" } } \ No newline at end of file diff --git a/integrations/cypress/package.json b/integrations/cypress/package.json index 1ac54987..e44aeff4 100644 --- a/integrations/cypress/package.json +++ b/integrations/cypress/package.json @@ -2,7 +2,7 @@ "name": "@pixeleye/cypress", "description": "Cypress integration for Pixeleye", "private": false, - "version": "0.4.6", + "version": "0.4.6-alpha.1", "license": "AGPL-3.0", "scripts": { "lint": "eslint", @@ -32,7 +32,7 @@ "@pixeleye/cli-api": "workspace:*", "@pixeleye/cli-devices": "workspace:*", "cypress": "^13.7.3", - "rrweb-snapshot": "2.0.0-alpha.13", + "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14", "undici": "^6.13.0" }, "devDependencies": { diff --git a/integrations/cypress/src/snapshot.ts b/integrations/cypress/src/snapshot.ts index f7d47d53..fbab2474 100644 --- a/integrations/cypress/src/snapshot.ts +++ b/integrations/cypress/src/snapshot.ts @@ -1,6 +1,6 @@ import { DeviceDescriptor } from "@pixeleye/cli-devices"; import { Options as ServerOptions, SnapshotRequest } from "@pixeleye/cli-booth"; -import { snapshot as domSnapshot } from "rrweb-snapshot"; +import { snapshot as domSnapshot } from "@pixeleye/rrweb-snapshot"; export interface Options { fullPage?: boolean; diff --git a/integrations/playwright/package.json b/integrations/playwright/package.json index 9f2240a5..037969ab 100644 --- a/integrations/playwright/package.json +++ b/integrations/playwright/package.json @@ -1,7 +1,7 @@ { "name": "@pixeleye/playwright", "private": false, - "version": "0.6.1", + "version": "0.6.1-alpha.1", "license": "AGPL-3.0", "scripts": { "lint": "eslint", @@ -28,7 +28,7 @@ "dependencies": { "@pixeleye/cli-devices": "workspace:*", "playwright-core": "^1.43.0", - "rrweb-snapshot": "2.0.0-alpha.13", + "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14", "undici": "^6.13.0" }, "devDependencies": { diff --git a/integrations/playwright/src/snapshot.ts b/integrations/playwright/src/snapshot.ts index f088f1d0..683aeca2 100644 --- a/integrations/playwright/src/snapshot.ts +++ b/integrations/playwright/src/snapshot.ts @@ -7,7 +7,7 @@ import { SnapshotRequest, } from "@pixeleye/cli-booth"; import { createRequire } from "node:module"; -import { snapshot as rrwebSnapshotFn } from "rrweb-snapshot"; +import { snapshot as rrwebSnapshotFn } from "@pixeleye/rrweb-snapshot"; let rrwebSnapshot: string | undefined; try { diff --git a/integrations/puppeteer/package.json b/integrations/puppeteer/package.json index 37740853..65896744 100644 --- a/integrations/puppeteer/package.json +++ b/integrations/puppeteer/package.json @@ -33,7 +33,7 @@ "@pixeleye/cli-devices": "workspace:*", "puppeteer": "^22.6.4", "puppeteer-core": "^22.6.4", - "rrweb-snapshot": "2.0.0-alpha.13", + "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14", "undici": "^6.13.0" }, "devDependencies": { diff --git a/integrations/puppeteer/src/snapshot.ts b/integrations/puppeteer/src/snapshot.ts index a69934d5..6abe1818 100644 --- a/integrations/puppeteer/src/snapshot.ts +++ b/integrations/puppeteer/src/snapshot.ts @@ -8,7 +8,7 @@ import { SnapshotRequest, } from "@pixeleye/cli-booth"; import { createRequire } from "node:module"; -import { snapshot as rrwebSnapshotFn } from "rrweb-snapshot"; +import { snapshot as rrwebSnapshotFn } from "@pixeleye/rrweb-snapshot"; export interface Options { fullPage?: boolean; diff --git a/integrations/storybook/package.json b/integrations/storybook/package.json index 5ef55404..47986836 100644 --- a/integrations/storybook/package.json +++ b/integrations/storybook/package.json @@ -29,7 +29,7 @@ "@pixeleye/playwright": "workspace:*", "@storybook/addons": "^7.6.17", "playwright-core": "^1.43.0", - "rrweb-snapshot": "2.0.0-alpha.13" + "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14" }, "devDependencies": { "@pixeleye/esbuild": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2d5f836f..28e352f8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -417,7 +417,7 @@ importers: dependencies: '@pixeleye/playwright': specifier: 0.6.1 - version: link:../../integrations/playwright + version: 0.6.1 pixeleye: specifier: workspace:* version: link:../../integrations/cli/pixeleye @@ -536,6 +536,9 @@ importers: '@pixeleye/eslint-config': specifier: workspace:* version: link:../../../configs/eslint-config + '@pixeleye/rrweb-snapshot': + specifier: 2.0.0-alpha.14 + version: 2.0.0-alpha.14 '@pixeleye/tsconfig': specifier: workspace:* version: link:../../../configs/tsconfig @@ -545,9 +548,6 @@ importers: rimraf: specifier: ^5.0.5 version: 5.0.5 - rrweb-snapshot: - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 integrations/cli/cli-capture: dependencies: @@ -557,6 +557,9 @@ importers: '@pixeleye/cli-logger': specifier: workspace:* version: link:../cli-logger + '@pixeleye/rrweb-snapshot': + specifier: 2.0.0-alpha.14 + version: 2.0.0-alpha.14 '@types/jsdom': specifier: ^21.1.6 version: 21.1.6 @@ -569,9 +572,6 @@ importers: playwright-core: specifier: ^1.43.0 version: 1.43.0 - rrweb-snapshot: - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 devDependencies: '@pixeleye/cli-config': specifier: workspace:* @@ -758,6 +758,9 @@ importers: '@pixeleye/cli-logger': specifier: workspace:* version: link:../cli-logger + '@pixeleye/rrweb-snapshot': + specifier: 2.0.0-alpha.14 + version: 2.0.0-alpha.14 '@pixeleye/storybook': specifier: workspace:* version: link:../../storybook @@ -782,9 +785,6 @@ importers: playwright-core: specifier: ^1.43.0 version: 1.43.0 - rrweb-snapshot: - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 sitemapper: specifier: ^3.2.8 version: 3.2.8 @@ -828,12 +828,12 @@ importers: '@pixeleye/cli-devices': specifier: workspace:* version: link:../cli/cli-devices + '@pixeleye/rrweb-snapshot': + specifier: 2.0.0-alpha.14 + version: 2.0.0-alpha.14 cypress: specifier: ^13.7.3 version: 13.7.3 - rrweb-snapshot: - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 undici: specifier: ^6.13.0 version: 6.13.0 @@ -877,12 +877,12 @@ importers: '@pixeleye/cli-devices': specifier: workspace:* version: link:../cli/cli-devices + '@pixeleye/rrweb-snapshot': + specifier: 2.0.0-alpha.14 + version: 2.0.0-alpha.14 playwright-core: specifier: ^1.43.0 version: 1.43.0 - rrweb-snapshot: - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 undici: specifier: ^6.13.0 version: 6.13.0 @@ -932,15 +932,15 @@ importers: '@pixeleye/cli-devices': specifier: workspace:* version: link:../cli/cli-devices + '@pixeleye/rrweb-snapshot': + specifier: 2.0.0-alpha.14 + version: 2.0.0-alpha.14 puppeteer: specifier: ^22.6.4 version: 22.6.4(typescript@5.4.5) puppeteer-core: specifier: ^22.6.4 version: 22.6.4 - rrweb-snapshot: - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 undici: specifier: ^6.13.0 version: 6.13.0 @@ -996,15 +996,15 @@ importers: '@pixeleye/playwright': specifier: workspace:* version: link:../playwright + '@pixeleye/rrweb-snapshot': + specifier: 2.0.0-alpha.14 + version: 2.0.0-alpha.14 '@storybook/addons': specifier: ^7.6.17 version: 7.6.17(react-dom@18.2.0)(react@18.2.0) playwright-core: specifier: ^1.43.0 version: 1.43.0 - rrweb-snapshot: - specifier: 2.0.0-alpha.13 - version: 2.0.0-alpha.13 devDependencies: '@pixeleye/esbuild': specifier: workspace:* @@ -6319,6 +6319,24 @@ packages: detect-libc: 1.0.3 dev: true + /@pixeleye/cli-devices@0.4.7: + resolution: {integrity: sha512-IcsQ8DJRL+JODzlDk6KmGv8z9zKL87E6QqaKObCrtZrmQfLG2s1auY/HnrR25wJuzlBe3qas6V9GbIxCsO3Ttg==} + dependencies: + playwright-core: 1.43.0 + dev: false + + /@pixeleye/playwright@0.6.1: + resolution: {integrity: sha512-vAnCpSdKpVHEUXp/7l1yKo7OWCKVvfhaXvdf9lp6pik6Rrxn1uLwx7DHDNSuws8ztHXPqyKGa+UzPJiAD573tw==} + dependencies: + '@pixeleye/cli-devices': 0.4.7 + playwright-core: 1.43.0 + rrweb-snapshot: 2.0.0-alpha.11 + undici: 6.13.0 + dev: false + + /@pixeleye/rrweb-snapshot@2.0.0-alpha.14: + resolution: {integrity: sha512-kxQzkFA4g/PFndJNzphz77GdYfPnqDiRPQ6IoL5bP7FlfZyeXX4a0u/wEevmupkmp4UCun0+XvlXsq+1Lg4I1w==} + /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -17419,8 +17437,9 @@ packages: resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} dev: false - /rrweb-snapshot@2.0.0-alpha.13: - resolution: {integrity: sha512-slbhNBCYjxLGCeH95a67ECCy5a22nloXp1F5wF7DCzUNw80FN7tF9Lef1sRGLNo32g3mNqTc2sWLATlKejMxYw==} + /rrweb-snapshot@2.0.0-alpha.11: + resolution: {integrity: sha512-N0dzeJA2VhrlSOadkKwCVmV/DuNOwBH+Lhx89hAf9PQK4lCS8AP4AaylhqUdZOYHqwVjqsYel/uZ4hN79vuLhw==} + dev: false /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} From 8461b6ab545e889883c70af00bee172eb44ea486 Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 13:55:02 +0100 Subject: [PATCH 04/14] Reworking rrweb --- integrations/cli/cli-booth/package.json | 4 +- integrations/cli/cli-booth/src/server.ts | 9 +- integrations/cli/cli-capture/package.json | 7 +- integrations/cli/cli-capture/src/capture.ts | 51 +++-- integrations/cli/pixeleye/package.json | 4 +- .../cli/pixeleye/src/handlers/exec.ts | 2 + integrations/cypress/package.json | 4 +- integrations/cypress/src/snapshot.ts | 2 +- integrations/playwright/package.json | 5 +- integrations/playwright/src/snapshot.ts | 16 +- integrations/puppeteer/package.json | 2 +- integrations/puppeteer/src/snapshot.ts | 2 +- integrations/storybook/package.json | 2 +- pnpm-lock.yaml | 214 +++++++++++++++--- 14 files changed, 244 insertions(+), 80 deletions(-) diff --git a/integrations/cli/cli-booth/package.json b/integrations/cli/cli-booth/package.json index dc5f92f3..e17067fb 100644 --- a/integrations/cli/cli-booth/package.json +++ b/integrations/cli/cli-booth/package.json @@ -1,6 +1,6 @@ { "name": "@pixeleye/cli-booth", - "version": "0.5.7-alpha.1", + "version": "0.5.8", "private": false, "license": "AGPL-3.0", "main": "./src/index.ts", @@ -31,7 +31,7 @@ "@pixeleye/tsconfig": "workspace:*", "@types/body-parser": "^1.19.5", "rimraf": "^5.0.5", - "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14" + "rrweb-snapshot": "2.0.0-alpha.13" }, "dependencies": { "@pixeleye/api": "workspace:*", diff --git a/integrations/cli/cli-booth/src/server.ts b/integrations/cli/cli-booth/src/server.ts index 32bfa938..d43660ff 100644 --- a/integrations/cli/cli-booth/src/server.ts +++ b/integrations/cli/cli-booth/src/server.ts @@ -6,11 +6,10 @@ import { QueuedSnap, handleQueue, queue } from "./snapshotQueue"; import { CaptureScreenshotData, getBrowser, - getBuildContent, } from "@pixeleye/cli-capture"; import { createBus } from "./bus"; import { API, uploadSnapshots } from "@pixeleye/cli-api"; -import { serializedNodeWithId } from "@pixeleye/rrweb-snapshot"; +import { serializedNodeWithId } from "rrweb-snapshot"; import { DeviceDescriptor } from "@pixeleye/cli-devices"; export interface BoothServerOptions { @@ -86,9 +85,9 @@ export function startServer(options: BoothServerOptions) { app.post("/snapshot", (req, res) => { const body = req.body as SnapshotRequest; - body.content = body.serializedDom - ? getBuildContent(body.serializedDom) - : undefined; + body.content = body.serializedDom; + // ? getBuildContent(body.serializedDom) + // : undefined; body.devices.forEach((device) => { queue.add(async () => diff --git a/integrations/cli/cli-capture/package.json b/integrations/cli/cli-capture/package.json index aec800d7..2ca9d91e 100644 --- a/integrations/cli/cli-capture/package.json +++ b/integrations/cli/cli-capture/package.json @@ -1,6 +1,6 @@ { "name": "@pixeleye/cli-capture", - "version": "0.5.1-alpha.1", + "version": "0.5.2", "private": false, "license": "AGPL-3.0", "main": "./src/index.ts", @@ -35,10 +35,11 @@ "dependencies": { "@pixeleye/cli-devices": "workspace:*", "@pixeleye/cli-logger": "workspace:*", + "rrweb-snapshot": "2.0.0-alpha.13", "@types/jsdom": "^21.1.6", + "canvas": "^2.11.2", "jsdom": "^24.0.0", "object-hash": "^3.0.0", - "playwright-core": "^1.43.0", - "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14" + "playwright-core": "^1.43.0" } } \ No newline at end of file diff --git a/integrations/cli/cli-capture/src/capture.ts b/integrations/cli/cli-capture/src/capture.ts index 3c1cad83..230e5a07 100644 --- a/integrations/cli/cli-capture/src/capture.ts +++ b/integrations/cli/cli-capture/src/capture.ts @@ -1,15 +1,24 @@ -import { - createCache, - createMirror, - rebuild, - serializedNodeWithId, -} from "@pixeleye/rrweb-snapshot"; +import rrweb, { serializedNodeWithId } from "rrweb-snapshot"; import { getPage } from "./browsers"; import { DeviceDescriptor } from "@pixeleye/cli-devices"; import { SnapshotDefinition, defaultConfig } from "@pixeleye/cli-config"; import { JSDOM } from "jsdom"; import { logger } from "@pixeleye/cli-logger"; import { Page } from "playwright-core"; +import fs from "fs"; +import { createRequire } from "module"; + +let rrwebScript: string | undefined; +try { + rrwebScript = require.resolve("rrweb-snapshot/dist/rrweb-snapshot.min.js"); +} catch { + const require = createRequire(import.meta.url); + rrwebScript = require.resolve("rrweb-snapshot/dist/rrweb-snapshot.min.js"); +} + +type RRWeb = typeof rrweb; + +const blankPage = ""; type Only = { [P in keyof T]: T[P]; @@ -30,16 +39,7 @@ export type CaptureScreenshotData< > = T extends string | number | symbol ? Omit : CaptureScreenshotConfigOptions & - Either<{ url: string }, { content: string }>; - -export function getBuildContent(serializedDom: serializedNodeWithId): string { - const doc = new JSDOM().window.document; - const cache = createCache(); - const mirror = createMirror(); - rebuild(serializedDom, { doc, cache, mirror }); - - return `${doc.documentElement.outerHTML}`; -} + Either<{ url: string }, { content: serializedNodeWithId }>; const retries = 3; @@ -81,9 +81,24 @@ async function internalCaptureScreenshot( timeout: 60_000, }); } else if (data.content) { - await page.setContent(data.content, { - timeout: 60_000, + await page.setContent(blankPage); + + await (page as Page).addScriptTag({ + path: rrwebScript, }); + + await page.evaluate((content) => { + const r: RRWeb = (window as any).rrwebSnapshot; + + const cache = r.createCache(); + const mirror = r.createMirror(); + + r.rebuild(content, { + doc: document, + cache, + mirror, + }); + }, data.content); } else { await page.close(); throw new Error("No url or serializedDom provided"); diff --git a/integrations/cli/pixeleye/package.json b/integrations/cli/pixeleye/package.json index 79a4a2d8..c3bd0533 100644 --- a/integrations/cli/pixeleye/package.json +++ b/integrations/cli/pixeleye/package.json @@ -1,6 +1,6 @@ { "name": "pixeleye", - "version": "0.7.9-alpha.1", + "version": "0.7.9-alpha.2", "private": false, "license": "AGPL-3.0", "scripts": { @@ -55,7 +55,7 @@ "graceful-fs": "^4.2.11", "ora": "^8.0.1", "playwright-core": "^1.43.0", - "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14", + "rrweb-snapshot": "2.0.0-alpha.13", "sitemapper": "^3.2.8" } } \ No newline at end of file diff --git a/integrations/cli/pixeleye/src/handlers/exec.ts b/integrations/cli/pixeleye/src/handlers/exec.ts index c7d803d8..67e6a9ea 100644 --- a/integrations/cli/pixeleye/src/handlers/exec.ts +++ b/integrations/cli/pixeleye/src/handlers/exec.ts @@ -22,6 +22,8 @@ export async function execHandler( shard?: string; } ) { + console.log("HELLOWORLD"); + // Lets our integrations know we are running in a Pixeleye environment setEnv("PIXELEYE_RUNNING", "true"); diff --git a/integrations/cypress/package.json b/integrations/cypress/package.json index e44aeff4..73f9fcf4 100644 --- a/integrations/cypress/package.json +++ b/integrations/cypress/package.json @@ -2,7 +2,7 @@ "name": "@pixeleye/cypress", "description": "Cypress integration for Pixeleye", "private": false, - "version": "0.4.6-alpha.1", + "version": "0.4.6-alpha.2", "license": "AGPL-3.0", "scripts": { "lint": "eslint", @@ -32,7 +32,7 @@ "@pixeleye/cli-api": "workspace:*", "@pixeleye/cli-devices": "workspace:*", "cypress": "^13.7.3", - "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14", + "rrweb-snapshot": "2.0.0-alpha.13", "undici": "^6.13.0" }, "devDependencies": { diff --git a/integrations/cypress/src/snapshot.ts b/integrations/cypress/src/snapshot.ts index fbab2474..f7d47d53 100644 --- a/integrations/cypress/src/snapshot.ts +++ b/integrations/cypress/src/snapshot.ts @@ -1,6 +1,6 @@ import { DeviceDescriptor } from "@pixeleye/cli-devices"; import { Options as ServerOptions, SnapshotRequest } from "@pixeleye/cli-booth"; -import { snapshot as domSnapshot } from "@pixeleye/rrweb-snapshot"; +import { snapshot as domSnapshot } from "rrweb-snapshot"; export interface Options { fullPage?: boolean; diff --git a/integrations/playwright/package.json b/integrations/playwright/package.json index 037969ab..2b2717c8 100644 --- a/integrations/playwright/package.json +++ b/integrations/playwright/package.json @@ -1,7 +1,7 @@ { "name": "@pixeleye/playwright", "private": false, - "version": "0.6.1-alpha.1", + "version": "0.6.1-alpha.2", "license": "AGPL-3.0", "scripts": { "lint": "eslint", @@ -28,7 +28,8 @@ "dependencies": { "@pixeleye/cli-devices": "workspace:*", "playwright-core": "^1.43.0", - "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14", + "rrweb-snapshot": "2.0.0-alpha.13", + "rrweb-snapshot": "^2.0.0-alpha.13", "undici": "^6.13.0" }, "devDependencies": { diff --git a/integrations/playwright/src/snapshot.ts b/integrations/playwright/src/snapshot.ts index 683aeca2..7821aa4b 100644 --- a/integrations/playwright/src/snapshot.ts +++ b/integrations/playwright/src/snapshot.ts @@ -7,16 +7,18 @@ import { SnapshotRequest, } from "@pixeleye/cli-booth"; import { createRequire } from "node:module"; -import { snapshot as rrwebSnapshotFn } from "@pixeleye/rrweb-snapshot"; +import rrweb from "rrweb-snapshot"; -let rrwebSnapshot: string | undefined; +let rrwebScript: string | undefined; try { - rrwebSnapshot = require.resolve("rrweb-snapshot/dist/rrweb-snapshot.min.js"); + rrwebScript = require.resolve("rrweb-snapshot/dist/rrweb-snapshot.min.js"); } catch { const require = createRequire(import.meta.url); - rrwebSnapshot = require.resolve("rrweb-snapshot/dist/rrweb-snapshot.min.js"); + rrwebScript = require.resolve("rrweb-snapshot/dist/rrweb-snapshot.min.js"); } +type RRWeb = typeof rrweb; + export interface Options { name: string; fullPage?: boolean; @@ -57,18 +59,20 @@ export async function pixeleyeSnapshot(page: Page, options: Options) { : undefined; await (page as Page).addScriptTag({ - path: rrwebSnapshot, + path: rrwebScript, }); if (options.waitForSelector) await page.waitForSelector(options.waitForSelector); const domSnapshot = await (page as Page).evaluate(() => { - return ((rrwebSnapshot as any).snapshot as typeof rrwebSnapshotFn)( + const r: RRWeb = (window as any).rrwebSnapshot; + return r.snapshot( document, { recordCanvas: true, inlineImages: true, + inlineStylesheet: true, } ); }); diff --git a/integrations/puppeteer/package.json b/integrations/puppeteer/package.json index 65896744..37740853 100644 --- a/integrations/puppeteer/package.json +++ b/integrations/puppeteer/package.json @@ -33,7 +33,7 @@ "@pixeleye/cli-devices": "workspace:*", "puppeteer": "^22.6.4", "puppeteer-core": "^22.6.4", - "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14", + "rrweb-snapshot": "2.0.0-alpha.13", "undici": "^6.13.0" }, "devDependencies": { diff --git a/integrations/puppeteer/src/snapshot.ts b/integrations/puppeteer/src/snapshot.ts index 6abe1818..a69934d5 100644 --- a/integrations/puppeteer/src/snapshot.ts +++ b/integrations/puppeteer/src/snapshot.ts @@ -8,7 +8,7 @@ import { SnapshotRequest, } from "@pixeleye/cli-booth"; import { createRequire } from "node:module"; -import { snapshot as rrwebSnapshotFn } from "@pixeleye/rrweb-snapshot"; +import { snapshot as rrwebSnapshotFn } from "rrweb-snapshot"; export interface Options { fullPage?: boolean; diff --git a/integrations/storybook/package.json b/integrations/storybook/package.json index 47986836..5ef55404 100644 --- a/integrations/storybook/package.json +++ b/integrations/storybook/package.json @@ -29,7 +29,7 @@ "@pixeleye/playwright": "workspace:*", "@storybook/addons": "^7.6.17", "playwright-core": "^1.43.0", - "@pixeleye/rrweb-snapshot": "2.0.0-alpha.14" + "rrweb-snapshot": "2.0.0-alpha.13" }, "devDependencies": { "@pixeleye/esbuild": "workspace:*", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 28e352f8..aaf30f33 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -536,9 +536,6 @@ importers: '@pixeleye/eslint-config': specifier: workspace:* version: link:../../../configs/eslint-config - '@pixeleye/rrweb-snapshot': - specifier: 2.0.0-alpha.14 - version: 2.0.0-alpha.14 '@pixeleye/tsconfig': specifier: workspace:* version: link:../../../configs/tsconfig @@ -548,6 +545,9 @@ importers: rimraf: specifier: ^5.0.5 version: 5.0.5 + rrweb-snapshot: + specifier: 2.0.0-alpha.13 + version: 2.0.0-alpha.13 integrations/cli/cli-capture: dependencies: @@ -557,21 +557,24 @@ importers: '@pixeleye/cli-logger': specifier: workspace:* version: link:../cli-logger - '@pixeleye/rrweb-snapshot': - specifier: 2.0.0-alpha.14 - version: 2.0.0-alpha.14 '@types/jsdom': specifier: ^21.1.6 version: 21.1.6 + canvas: + specifier: ^2.11.2 + version: 2.11.2 jsdom: specifier: ^24.0.0 - version: 24.0.0 + version: 24.0.0(canvas@2.11.2) object-hash: specifier: ^3.0.0 version: 3.0.0 playwright-core: specifier: ^1.43.0 version: 1.43.0 + rrweb-snapshot: + specifier: 2.0.0-alpha.13 + version: 2.0.0-alpha.13 devDependencies: '@pixeleye/cli-config': specifier: workspace:* @@ -758,9 +761,6 @@ importers: '@pixeleye/cli-logger': specifier: workspace:* version: link:../cli-logger - '@pixeleye/rrweb-snapshot': - specifier: 2.0.0-alpha.14 - version: 2.0.0-alpha.14 '@pixeleye/storybook': specifier: workspace:* version: link:../../storybook @@ -785,6 +785,9 @@ importers: playwright-core: specifier: ^1.43.0 version: 1.43.0 + rrweb-snapshot: + specifier: 2.0.0-alpha.13 + version: 2.0.0-alpha.13 sitemapper: specifier: ^3.2.8 version: 3.2.8 @@ -828,12 +831,12 @@ importers: '@pixeleye/cli-devices': specifier: workspace:* version: link:../cli/cli-devices - '@pixeleye/rrweb-snapshot': - specifier: 2.0.0-alpha.14 - version: 2.0.0-alpha.14 cypress: specifier: ^13.7.3 version: 13.7.3 + rrweb-snapshot: + specifier: 2.0.0-alpha.13 + version: 2.0.0-alpha.13 undici: specifier: ^6.13.0 version: 6.13.0 @@ -877,12 +880,12 @@ importers: '@pixeleye/cli-devices': specifier: workspace:* version: link:../cli/cli-devices - '@pixeleye/rrweb-snapshot': - specifier: 2.0.0-alpha.14 - version: 2.0.0-alpha.14 playwright-core: specifier: ^1.43.0 version: 1.43.0 + rrweb-snapshot: + specifier: ^2.0.0-alpha.13 + version: 2.0.0-alpha.13 undici: specifier: ^6.13.0 version: 6.13.0 @@ -932,15 +935,15 @@ importers: '@pixeleye/cli-devices': specifier: workspace:* version: link:../cli/cli-devices - '@pixeleye/rrweb-snapshot': - specifier: 2.0.0-alpha.14 - version: 2.0.0-alpha.14 puppeteer: specifier: ^22.6.4 version: 22.6.4(typescript@5.4.5) puppeteer-core: specifier: ^22.6.4 version: 22.6.4 + rrweb-snapshot: + specifier: 2.0.0-alpha.13 + version: 2.0.0-alpha.13 undici: specifier: ^6.13.0 version: 6.13.0 @@ -996,15 +999,15 @@ importers: '@pixeleye/playwright': specifier: workspace:* version: link:../playwright - '@pixeleye/rrweb-snapshot': - specifier: 2.0.0-alpha.14 - version: 2.0.0-alpha.14 '@storybook/addons': specifier: ^7.6.17 version: 7.6.17(react-dom@18.2.0)(react@18.2.0) playwright-core: specifier: ^1.43.0 version: 1.43.0 + rrweb-snapshot: + specifier: 2.0.0-alpha.13 + version: 2.0.0-alpha.13 devDependencies: '@pixeleye/esbuild': specifier: workspace:* @@ -6066,6 +6069,24 @@ packages: read-yaml-file: 1.1.0 dev: true + /@mapbox/node-pre-gyp@1.0.11: + resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} + hasBin: true + dependencies: + detect-libc: 2.0.2 + https-proxy-agent: 5.0.1 + make-dir: 3.1.0 + node-fetch: 2.7.0 + nopt: 5.0.0 + npmlog: 5.0.1 + rimraf: 3.0.2 + semver: 7.6.0 + tar: 6.2.0 + transitivePeerDependencies: + - encoding + - supports-color + dev: false + /@markdoc/markdoc@0.4.0(@types/react@18.2.77)(react@18.2.0): resolution: {integrity: sha512-fSh4P3Y4E7oaKYc2oNzSIJVPDto7SMzAuQN1Iyx53UxzleA6QzRdNWRxmiPqtVDaDi5dELd2yICoG91csrGrAw==} engines: {node: '>=14.7.0'} @@ -6334,9 +6355,6 @@ packages: undici: 6.13.0 dev: false - /@pixeleye/rrweb-snapshot@2.0.0-alpha.14: - resolution: {integrity: sha512-kxQzkFA4g/PFndJNzphz77GdYfPnqDiRPQ6IoL5bP7FlfZyeXX4a0u/wEevmupkmp4UCun0+XvlXsq+1Lg4I1w==} - /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -10049,6 +10067,10 @@ packages: tslib: 1.14.1 dev: true + /abbrev@1.1.1: + resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} + dev: false + /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -10119,6 +10141,15 @@ packages: regex-parser: 2.3.0 dev: true + /agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + dependencies: + debug: 4.3.4(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + dev: false + /agent-base@7.1.0: resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} engines: {node: '>= 14'} @@ -10270,9 +10301,22 @@ packages: resolution: {integrity: sha512-jlpIfsOoNoafl92Sz//64uQHGSyMrD2vYG5d8o2a4qGvyNCvXur7bzIsWtAC/6flI2RYAp3kv8rsfBtaLm7w0g==} dev: true + /aproba@2.0.0: + resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} + dev: false + /arch@2.2.0: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} + /are-we-there-yet@2.0.0: + resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} + engines: {node: '>=10'} + deprecated: This package is no longer supported. + dependencies: + delegates: 1.0.0 + readable-stream: 3.6.2 + dev: false + /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} dev: false @@ -11125,6 +11169,19 @@ packages: /caniuse-lite@1.0.30001609: resolution: {integrity: sha512-JFPQs34lHKx1B5t1EpQpWH4c+29zIyn/haGsbpfq3suuV9v56enjFt23zqijxGTMwy1p/4H2tjnQMY+p1WoAyA==} + /canvas@2.11.2: + resolution: {integrity: sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==} + engines: {node: '>=6'} + requiresBuild: true + dependencies: + '@mapbox/node-pre-gyp': 1.0.11 + nan: 2.19.0 + simple-get: 3.1.1 + transitivePeerDependencies: + - encoding + - supports-color + dev: false + /case-sensitive-paths-webpack-plugin@2.4.0: resolution: {integrity: sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==} engines: {node: '>=4'} @@ -11230,7 +11287,6 @@ packages: /chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} - dev: true /chrome-trace-event@1.0.3: resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} @@ -11417,6 +11473,11 @@ packages: simple-swizzle: 0.2.2 dev: true + /color-support@1.1.3: + resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} + hasBin: true + dev: false + /color@4.2.3: resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} engines: {node: '>=12.5.0'} @@ -11500,6 +11561,10 @@ packages: resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} dev: true + /console-control-strings@1.1.0: + resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} + dev: false + /constants-browserify@1.0.0: resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==} @@ -11966,6 +12031,13 @@ packages: resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} dev: false + /decompress-response@4.2.1: + resolution: {integrity: sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==} + engines: {node: '>=8'} + dependencies: + mimic-response: 2.1.0 + dev: false + /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} @@ -12109,6 +12181,10 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} + /delegates@1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + dev: false + /depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} @@ -12141,7 +12217,6 @@ packages: /detect-libc@2.0.2: resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} engines: {node: '>=8'} - dev: true /detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} @@ -13585,7 +13660,6 @@ packages: engines: {node: '>= 8'} dependencies: minipass: 3.3.6 - dev: true /fs-monkey@1.0.5: resolution: {integrity: sha512-8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew==} @@ -13623,6 +13697,22 @@ packages: /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + /gauge@3.0.2: + resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} + engines: {node: '>=10'} + deprecated: This package is no longer supported. + dependencies: + aproba: 2.0.0 + color-support: 1.1.3 + console-control-strings: 1.1.0 + has-unicode: 2.0.1 + object-assign: 4.1.1 + signal-exit: 3.0.7 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wide-align: 1.1.5 + dev: false + /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -13967,6 +14057,10 @@ packages: dependencies: has-symbols: 1.0.3 + /has-unicode@2.0.1: + resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} + dev: false + /hash-base@3.1.0: resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} engines: {node: '>=4'} @@ -14144,6 +14238,16 @@ packages: /https-browserify@1.0.0: resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} + /https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + dev: false + /https-proxy-agent@7.0.4: resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==} engines: {node: '>= 14'} @@ -14768,7 +14872,7 @@ packages: - supports-color dev: true - /jsdom@24.0.0: + /jsdom@24.0.0(canvas@2.11.2): resolution: {integrity: sha512-UDS2NayCvmXSXVP6mpTj+73JnNQadZlr9N68189xib2tx5Mls7swlTNao26IoHv46BZJFvXygyRtyXd1feAk1A==} engines: {node: '>=18'} peerDependencies: @@ -14777,6 +14881,7 @@ packages: canvas: optional: true dependencies: + canvas: 2.11.2 cssstyle: 4.0.1 data-urls: 5.0.0 decimal.js: 10.4.3 @@ -15192,7 +15297,6 @@ packages: engines: {node: '>=8'} dependencies: semver: 6.3.1 - dev: true /map-obj@1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} @@ -15324,6 +15428,11 @@ packages: engines: {node: '>=4'} dev: false + /mimic-response@2.1.0: + resolution: {integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==} + engines: {node: '>=8'} + dev: false + /mimic-response@3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} @@ -15386,7 +15495,6 @@ packages: engines: {node: '>=8'} dependencies: yallist: 4.0.0 - dev: true /minipass@5.0.0: resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} @@ -15402,7 +15510,6 @@ packages: dependencies: minipass: 3.3.6 yallist: 4.0.0 - dev: true /mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} @@ -15420,7 +15527,6 @@ packages: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} hasBin: true - dev: true /mlly@1.6.1: resolution: {integrity: sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==} @@ -15447,6 +15553,10 @@ packages: thenify-all: 1.6.0 dev: false + /nan@2.19.0: + resolution: {integrity: sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==} + dev: false + /nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -15623,6 +15733,14 @@ packages: /node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + /nopt@5.0.0: + resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} + engines: {node: '>=6'} + hasBin: true + dependencies: + abbrev: 1.1.1 + dev: false + /normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -15658,6 +15776,16 @@ packages: dependencies: path-key: 4.0.0 + /npmlog@5.0.1: + resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} + deprecated: This package is no longer supported. + dependencies: + are-we-there-yet: 2.0.0 + console-control-strings: 1.1.0 + gauge: 3.0.2 + set-blocking: 2.0.0 + dev: false + /nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} dependencies: @@ -17441,6 +17569,9 @@ packages: resolution: {integrity: sha512-N0dzeJA2VhrlSOadkKwCVmV/DuNOwBH+Lhx89hAf9PQK4lCS8AP4AaylhqUdZOYHqwVjqsYel/uZ4hN79vuLhw==} dev: false + /rrweb-snapshot@2.0.0-alpha.13: + resolution: {integrity: sha512-slbhNBCYjxLGCeH95a67ECCy5a22nloXp1F5wF7DCzUNw80FN7tF9Lef1sRGLNo32g3mNqTc2sWLATlKejMxYw==} + /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -17625,7 +17756,6 @@ packages: /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - dev: true /set-cookie-parser@2.6.0: resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} @@ -17762,7 +17892,14 @@ packages: /simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} - dev: true + + /simple-get@3.1.1: + resolution: {integrity: sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==} + dependencies: + decompress-response: 4.2.1 + once: 1.4.0 + simple-concat: 1.0.1 + dev: false /simple-get@4.0.1: resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} @@ -18322,7 +18459,6 @@ packages: minizlib: 2.1.2 mkdirp: 1.0.4 yallist: 4.0.0 - dev: true /telejson@7.2.0: resolution: {integrity: sha512-1QTEcJkJEhc8OnStBx/ILRu5J2p0GjvWsBx56bmZRqnrkdBMUe+nX92jxV+p3dB4CP6PZCdJMQJwCggkNBMzkQ==} @@ -19571,6 +19707,12 @@ packages: siginfo: 2.0.0 stackback: 0.0.2 + /wide-align@1.1.5: + resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} + dependencies: + string-width: 4.2.3 + dev: false + /wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: true From a5bc01a467908ff6aa90dc70c47a28e4ff6944af Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 14:00:18 +0100 Subject: [PATCH 05/14] cleaning up --- integrations/cli/cli-booth/src/server.ts | 9 +- integrations/cli/cli-capture/package.json | 2 - integrations/cli/cli-capture/src/capture.ts | 12 +- pnpm-lock.yaml | 305 +------------------- 4 files changed, 16 insertions(+), 312 deletions(-) diff --git a/integrations/cli/cli-booth/src/server.ts b/integrations/cli/cli-booth/src/server.ts index d43660ff..fa09b25b 100644 --- a/integrations/cli/cli-booth/src/server.ts +++ b/integrations/cli/cli-booth/src/server.ts @@ -3,10 +3,7 @@ import bodyParser from "body-parser"; import { Build } from "@pixeleye/api"; import { getEnvConfig } from "@pixeleye/cli-config"; import { QueuedSnap, handleQueue, queue } from "./snapshotQueue"; -import { - CaptureScreenshotData, - getBrowser, -} from "@pixeleye/cli-capture"; +import { CaptureScreenshotData, getBrowser } from "@pixeleye/cli-capture"; import { createBus } from "./bus"; import { API, uploadSnapshots } from "@pixeleye/cli-api"; import { serializedNodeWithId } from "rrweb-snapshot"; @@ -85,10 +82,6 @@ export function startServer(options: BoothServerOptions) { app.post("/snapshot", (req, res) => { const body = req.body as SnapshotRequest; - body.content = body.serializedDom; - // ? getBuildContent(body.serializedDom) - // : undefined; - body.devices.forEach((device) => { queue.add(async () => handleQueue({ diff --git a/integrations/cli/cli-capture/package.json b/integrations/cli/cli-capture/package.json index 2ca9d91e..86e789be 100644 --- a/integrations/cli/cli-capture/package.json +++ b/integrations/cli/cli-capture/package.json @@ -37,8 +37,6 @@ "@pixeleye/cli-logger": "workspace:*", "rrweb-snapshot": "2.0.0-alpha.13", "@types/jsdom": "^21.1.6", - "canvas": "^2.11.2", - "jsdom": "^24.0.0", "object-hash": "^3.0.0", "playwright-core": "^1.43.0" } diff --git a/integrations/cli/cli-capture/src/capture.ts b/integrations/cli/cli-capture/src/capture.ts index 230e5a07..825e8950 100644 --- a/integrations/cli/cli-capture/src/capture.ts +++ b/integrations/cli/cli-capture/src/capture.ts @@ -2,10 +2,8 @@ import rrweb, { serializedNodeWithId } from "rrweb-snapshot"; import { getPage } from "./browsers"; import { DeviceDescriptor } from "@pixeleye/cli-devices"; import { SnapshotDefinition, defaultConfig } from "@pixeleye/cli-config"; -import { JSDOM } from "jsdom"; import { logger } from "@pixeleye/cli-logger"; import { Page } from "playwright-core"; -import fs from "fs"; import { createRequire } from "module"; let rrwebScript: string | undefined; @@ -39,7 +37,7 @@ export type CaptureScreenshotData< > = T extends string | number | symbol ? Omit : CaptureScreenshotConfigOptions & - Either<{ url: string }, { content: serializedNodeWithId }>; + Either<{ url: string }, { serializedDom: serializedNodeWithId }>; const retries = 3; @@ -80,25 +78,25 @@ async function internalCaptureScreenshot( await page.goto(data.url, { timeout: 60_000, }); - } else if (data.content) { + } else if (data.serializedDom) { await page.setContent(blankPage); await (page as Page).addScriptTag({ path: rrwebScript, }); - await page.evaluate((content) => { + await page.evaluate((serializedDom) => { const r: RRWeb = (window as any).rrwebSnapshot; const cache = r.createCache(); const mirror = r.createMirror(); - r.rebuild(content, { + r.rebuild(serializedDom, { doc: document, cache, mirror, }); - }, data.content); + }, data.serializedDom); } else { await page.close(); throw new Error("No url or serializedDom provided"); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aaf30f33..4898c675 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -560,12 +560,6 @@ importers: '@types/jsdom': specifier: ^21.1.6 version: 21.1.6 - canvas: - specifier: ^2.11.2 - version: 2.11.2 - jsdom: - specifier: ^24.0.0 - version: 24.0.0(canvas@2.11.2) object-hash: specifier: ^3.0.0 version: 3.0.0 @@ -6069,24 +6063,6 @@ packages: read-yaml-file: 1.1.0 dev: true - /@mapbox/node-pre-gyp@1.0.11: - resolution: {integrity: sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==} - hasBin: true - dependencies: - detect-libc: 2.0.2 - https-proxy-agent: 5.0.1 - make-dir: 3.1.0 - node-fetch: 2.7.0 - nopt: 5.0.0 - npmlog: 5.0.1 - rimraf: 3.0.2 - semver: 7.6.0 - tar: 6.2.0 - transitivePeerDependencies: - - encoding - - supports-color - dev: false - /@markdoc/markdoc@0.4.0(@types/react@18.2.77)(react@18.2.0): resolution: {integrity: sha512-fSh4P3Y4E7oaKYc2oNzSIJVPDto7SMzAuQN1Iyx53UxzleA6QzRdNWRxmiPqtVDaDi5dELd2yICoG91csrGrAw==} engines: {node: '>=14.7.0'} @@ -10067,10 +10043,6 @@ packages: tslib: 1.14.1 dev: true - /abbrev@1.1.1: - resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} - dev: false - /abort-controller@3.0.0: resolution: {integrity: sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==} engines: {node: '>=6.5'} @@ -10141,15 +10113,6 @@ packages: regex-parser: 2.3.0 dev: true - /agent-base@6.0.2: - resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} - engines: {node: '>= 6.0.0'} - dependencies: - debug: 4.3.4(supports-color@8.1.1) - transitivePeerDependencies: - - supports-color - dev: false - /agent-base@7.1.0: resolution: {integrity: sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==} engines: {node: '>= 14'} @@ -10301,22 +10264,9 @@ packages: resolution: {integrity: sha512-jlpIfsOoNoafl92Sz//64uQHGSyMrD2vYG5d8o2a4qGvyNCvXur7bzIsWtAC/6flI2RYAp3kv8rsfBtaLm7w0g==} dev: true - /aproba@2.0.0: - resolution: {integrity: sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==} - dev: false - /arch@2.2.0: resolution: {integrity: sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==} - /are-we-there-yet@2.0.0: - resolution: {integrity: sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==} - engines: {node: '>=10'} - deprecated: This package is no longer supported. - dependencies: - delegates: 1.0.0 - readable-stream: 3.6.2 - dev: false - /arg@5.0.2: resolution: {integrity: sha512-PYjyFOLKQ9y57JvQ6QLo8dAgNqswh8M1RMJYdQduT6xbWSgK36P/Z/v+p888pM69jMMfS8Xd8F6I1kQ/I9HUGg==} dev: false @@ -11169,19 +11119,6 @@ packages: /caniuse-lite@1.0.30001609: resolution: {integrity: sha512-JFPQs34lHKx1B5t1EpQpWH4c+29zIyn/haGsbpfq3suuV9v56enjFt23zqijxGTMwy1p/4H2tjnQMY+p1WoAyA==} - /canvas@2.11.2: - resolution: {integrity: sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==} - engines: {node: '>=6'} - requiresBuild: true - dependencies: - '@mapbox/node-pre-gyp': 1.0.11 - nan: 2.19.0 - simple-get: 3.1.1 - transitivePeerDependencies: - - encoding - - supports-color - dev: false - /case-sensitive-paths-webpack-plugin@2.4.0: resolution: {integrity: sha512-roIFONhcxog0JSSWbvVAh3OocukmSgpqOH6YpMkCvav/ySIV3JKg4Dc8vYtQjYi/UxpNE36r/9v+VqTQqgkYmw==} engines: {node: '>=4'} @@ -11287,6 +11224,7 @@ packages: /chownr@2.0.0: resolution: {integrity: sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==} engines: {node: '>=10'} + dev: true /chrome-trace-event@1.0.3: resolution: {integrity: sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==} @@ -11473,11 +11411,6 @@ packages: simple-swizzle: 0.2.2 dev: true - /color-support@1.1.3: - resolution: {integrity: sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==} - hasBin: true - dev: false - /color@4.2.3: resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} engines: {node: '>=12.5.0'} @@ -11561,10 +11494,6 @@ packages: resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} dev: true - /console-control-strings@1.1.0: - resolution: {integrity: sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==} - dev: false - /constants-browserify@1.0.0: resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==} @@ -11767,13 +11696,6 @@ packages: engines: {node: '>=4'} hasBin: true - /cssstyle@4.0.1: - resolution: {integrity: sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==} - engines: {node: '>=18'} - dependencies: - rrweb-cssom: 0.6.0 - dev: false - /csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} @@ -11939,14 +11861,6 @@ packages: resolution: {integrity: sha512-7hvf7/GW8e86rW0ptuwS3OcBGDjIi6SZva7hCyWC0yYry2cOPmLIjXAUHI6DK2HsnwJd9ifmt57i8eV2n4YNpw==} engines: {node: '>= 14'} - /data-urls@5.0.0: - resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} - engines: {node: '>=18'} - dependencies: - whatwg-mimetype: 4.0.0 - whatwg-url: 14.0.0 - dev: false - /data-view-buffer@1.0.1: resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} engines: {node: '>= 0.4'} @@ -12027,17 +11941,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /decimal.js@10.4.3: - resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} - dev: false - - /decompress-response@4.2.1: - resolution: {integrity: sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==} - engines: {node: '>=8'} - dependencies: - mimic-response: 2.1.0 - dev: false - /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} @@ -12181,10 +12084,6 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - /delegates@1.0.0: - resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} - dev: false - /depd@2.0.0: resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} engines: {node: '>= 0.8'} @@ -12217,6 +12116,7 @@ packages: /detect-libc@2.0.2: resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} engines: {node: '>=8'} + dev: true /detect-node-es@1.1.0: resolution: {integrity: sha512-ypdmJU/TbBby2Dxibuv7ZLW3Bs1QEmM7nHjEANfohJLvE0XVujisn1qPJcZxg+qDucsr+bP6fLD1rPS3AhJ7EQ==} @@ -13660,6 +13560,7 @@ packages: engines: {node: '>= 8'} dependencies: minipass: 3.3.6 + dev: true /fs-monkey@1.0.5: resolution: {integrity: sha512-8uMbBjrhzW76TYgEV27Y5E//W2f/lTFmx78P2w19FZSxarhI/798APGQyuGCwmkNxgwGRhrLfvWyLBvNtuOmew==} @@ -13697,22 +13598,6 @@ packages: /functions-have-names@1.2.3: resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} - /gauge@3.0.2: - resolution: {integrity: sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==} - engines: {node: '>=10'} - deprecated: This package is no longer supported. - dependencies: - aproba: 2.0.0 - color-support: 1.1.3 - console-control-strings: 1.1.0 - has-unicode: 2.0.1 - object-assign: 4.1.1 - signal-exit: 3.0.7 - string-width: 4.2.3 - strip-ansi: 6.0.1 - wide-align: 1.1.5 - dev: false - /gensync@1.0.0-beta.2: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} @@ -14057,10 +13942,6 @@ packages: dependencies: has-symbols: 1.0.3 - /has-unicode@2.0.1: - resolution: {integrity: sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==} - dev: false - /hash-base@3.1.0: resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} engines: {node: '>=4'} @@ -14128,13 +14009,6 @@ packages: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true - /html-encoding-sniffer@4.0.0: - resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} - engines: {node: '>=18'} - dependencies: - whatwg-encoding: 3.1.1 - dev: false - /html-entities@2.4.0: resolution: {integrity: sha512-igBTJcNNNhvZFRtm8uA6xMY6xYleeDwn3PeBCkDz7tHttv4F2hsDI2aPgNERWzvRcNYHNT3ymRaQzllmXj4YsQ==} dev: true @@ -14238,16 +14112,6 @@ packages: /https-browserify@1.0.0: resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} - /https-proxy-agent@5.0.1: - resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} - engines: {node: '>= 6'} - dependencies: - agent-base: 6.0.2 - debug: 4.3.4(supports-color@8.1.1) - transitivePeerDependencies: - - supports-color - dev: false - /https-proxy-agent@7.0.4: resolution: {integrity: sha512-wlwpilI7YdjSkWaQ/7omYBMTliDcmCN8OLihO6I9B86g06lMyAoqgoDpV0XqoaPOKj+0DIdAvnsWfyAAhmimcg==} engines: {node: '>= 14'} @@ -14280,13 +14144,6 @@ packages: dependencies: safer-buffer: 2.1.2 - /iconv-lite@0.6.3: - resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} - engines: {node: '>=0.10.0'} - dependencies: - safer-buffer: 2.1.2 - dev: false - /icss-utils@5.1.0(postcss@8.4.38): resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14} @@ -14595,10 +14452,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /is-potential-custom-element-name@1.0.1: - resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - dev: false - /is-regex@1.1.4: resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} engines: {node: '>= 0.4'} @@ -14872,43 +14725,6 @@ packages: - supports-color dev: true - /jsdom@24.0.0(canvas@2.11.2): - resolution: {integrity: sha512-UDS2NayCvmXSXVP6mpTj+73JnNQadZlr9N68189xib2tx5Mls7swlTNao26IoHv46BZJFvXygyRtyXd1feAk1A==} - engines: {node: '>=18'} - peerDependencies: - canvas: ^2.11.2 - peerDependenciesMeta: - canvas: - optional: true - dependencies: - canvas: 2.11.2 - cssstyle: 4.0.1 - data-urls: 5.0.0 - decimal.js: 10.4.3 - form-data: 4.0.0 - html-encoding-sniffer: 4.0.0 - http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.4 - is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.7 - parse5: 7.1.2 - rrweb-cssom: 0.6.0 - saxes: 6.0.0 - symbol-tree: 3.2.4 - tough-cookie: 4.1.3 - w3c-xmlserializer: 5.0.0 - webidl-conversions: 7.0.0 - whatwg-encoding: 3.1.1 - whatwg-mimetype: 4.0.0 - whatwg-url: 14.0.0 - ws: 8.16.0 - xml-name-validator: 5.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: false - /jsesc@0.5.0: resolution: {integrity: sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==} hasBin: true @@ -15297,6 +15113,7 @@ packages: engines: {node: '>=8'} dependencies: semver: 6.3.1 + dev: true /map-obj@1.0.1: resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} @@ -15428,11 +15245,6 @@ packages: engines: {node: '>=4'} dev: false - /mimic-response@2.1.0: - resolution: {integrity: sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==} - engines: {node: '>=8'} - dev: false - /mimic-response@3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} @@ -15495,6 +15307,7 @@ packages: engines: {node: '>=8'} dependencies: yallist: 4.0.0 + dev: true /minipass@5.0.0: resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} @@ -15510,6 +15323,7 @@ packages: dependencies: minipass: 3.3.6 yallist: 4.0.0 + dev: true /mitt@3.0.1: resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} @@ -15527,6 +15341,7 @@ packages: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} hasBin: true + dev: true /mlly@1.6.1: resolution: {integrity: sha512-vLgaHvaeunuOXHSmEbZ9izxPx3USsk8KCQ8iC+aTlp5sKRSoZvwhHh5L9VbKSaVC6sJDqbyohIS76E2VmHIPAA==} @@ -15553,10 +15368,6 @@ packages: thenify-all: 1.6.0 dev: false - /nan@2.19.0: - resolution: {integrity: sha512-nO1xXxfh/RWNxfd/XPfbIfFk5vgLsAxUR9y5O0cHMJu/AW9U95JLXqthYHjEp+8gQ5p96K9jUp8nbVOxCdRbtw==} - dev: false - /nanoid@3.3.7: resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} @@ -15733,14 +15544,6 @@ packages: /node-releases@2.0.14: resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} - /nopt@5.0.0: - resolution: {integrity: sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==} - engines: {node: '>=6'} - hasBin: true - dependencies: - abbrev: 1.1.1 - dev: false - /normalize-package-data@2.5.0: resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} dependencies: @@ -15776,26 +15579,12 @@ packages: dependencies: path-key: 4.0.0 - /npmlog@5.0.1: - resolution: {integrity: sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==} - deprecated: This package is no longer supported. - dependencies: - are-we-there-yet: 2.0.0 - console-control-strings: 1.1.0 - gauge: 3.0.2 - set-blocking: 2.0.0 - dev: false - /nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} dependencies: boolbase: 1.0.0 dev: true - /nwsapi@2.2.7: - resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} - dev: false - /nypm@0.3.6: resolution: {integrity: sha512-2CATJh3pd6CyNfU5VZM7qSwFu0ieyabkEdnogE30Obn1czrmOYiZ8DOZLe1yBdLKWoyD3Mcy2maUs+0MR3yVjQ==} engines: {node: ^14.16.0 || >=16.10.0} @@ -17561,10 +17350,6 @@ packages: '@rollup/rollup-win32-x64-msvc': 4.14.2 fsevents: 2.3.3 - /rrweb-cssom@0.6.0: - resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} - dev: false - /rrweb-snapshot@2.0.0-alpha.11: resolution: {integrity: sha512-N0dzeJA2VhrlSOadkKwCVmV/DuNOwBH+Lhx89hAf9PQK4lCS8AP4AaylhqUdZOYHqwVjqsYel/uZ4hN79vuLhw==} dev: false @@ -17655,13 +17440,6 @@ packages: resolution: {integrity: sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==} dev: false - /saxes@6.0.0: - resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} - engines: {node: '>=v12.22.7'} - dependencies: - xmlchars: 2.2.0 - dev: false - /scheduler@0.23.0: resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} dependencies: @@ -17756,6 +17534,7 @@ packages: /set-blocking@2.0.0: resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + dev: true /set-cookie-parser@2.6.0: resolution: {integrity: sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==} @@ -17892,14 +17671,7 @@ packages: /simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} - - /simple-get@3.1.1: - resolution: {integrity: sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==} - dependencies: - decompress-response: 4.2.1 - once: 1.4.0 - simple-concat: 1.0.1 - dev: false + dev: true /simple-get@4.0.1: resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} @@ -18362,10 +18134,6 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - /symbol-tree@3.2.4: - resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - dev: false - /synchronous-promise@2.0.17: resolution: {integrity: sha512-AsS729u2RHUfEra9xJrE39peJcc2stq2+poBXX8bcM08Y6g9j/i/PUzwNQqkaJde7Ntg1TO7bSREbR5sdosQ+g==} dev: false @@ -18459,6 +18227,7 @@ packages: minizlib: 2.1.2 mkdirp: 1.0.4 yallist: 4.0.0 + dev: true /telejson@7.2.0: resolution: {integrity: sha512-1QTEcJkJEhc8OnStBx/ILRu5J2p0GjvWsBx56bmZRqnrkdBMUe+nX92jxV+p3dB4CP6PZCdJMQJwCggkNBMzkQ==} @@ -18694,13 +18463,6 @@ packages: /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} - /tr46@5.0.0: - resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==} - engines: {node: '>=18'} - dependencies: - punycode: 2.3.1 - dev: false - /trim-newlines@3.0.1: resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} engines: {node: '>=8'} @@ -19415,13 +19177,6 @@ packages: /vm-browserify@1.1.2: resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} - /w3c-xmlserializer@5.0.0: - resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} - engines: {node: '>=18'} - dependencies: - xml-name-validator: 5.0.0 - dev: false - /wait-for-expect@3.0.2: resolution: {integrity: sha512-cfS1+DZxuav1aBYbaO/kE06EOS8yRw7qOFoD3XtjTkYvCvh3zUvNST8DXK/nPaeqIzIv3P3kL3lRJn8iwOiSag==} dev: true @@ -19465,11 +19220,6 @@ packages: /webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} - /webidl-conversions@7.0.0: - resolution: {integrity: sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==} - engines: {node: '>=12'} - dev: false - /webpack-dev-middleware@6.1.3(webpack@5.91.0): resolution: {integrity: sha512-A4ChP0Qj8oGociTs6UdlRUGANIGrCDL3y+pmQMc+dSsraXHCatFpmMey4mYELA+juqwUqwQsUgJJISXl1KWmiw==} engines: {node: '>= 14.15.0'} @@ -19587,30 +19337,10 @@ packages: - uglify-js dev: true - /whatwg-encoding@3.1.1: - resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} - engines: {node: '>=18'} - dependencies: - iconv-lite: 0.6.3 - dev: false - /whatwg-fetch@3.6.20: resolution: {integrity: sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==} dev: false - /whatwg-mimetype@4.0.0: - resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} - engines: {node: '>=18'} - dev: false - - /whatwg-url@14.0.0: - resolution: {integrity: sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==} - engines: {node: '>=18'} - dependencies: - tr46: 5.0.0 - webidl-conversions: 7.0.0 - dev: false - /whatwg-url@5.0.0: resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} dependencies: @@ -19707,12 +19437,6 @@ packages: siginfo: 2.0.0 stackback: 0.0.2 - /wide-align@1.1.5: - resolution: {integrity: sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==} - dependencies: - string-width: 4.2.3 - dev: false - /wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: true @@ -19773,11 +19497,6 @@ packages: xtend: 4.0.2 dev: false - /xml-name-validator@5.0.0: - resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} - engines: {node: '>=18'} - dev: false - /xml-parse-from-string@1.0.1: resolution: {integrity: sha512-ErcKwJTF54uRzzNMXq2X5sMIy88zJvfN2DmdoQvy7PAFJ+tPRU6ydWuOKNMyfmOjdyBQTFREi60s0Y0SyI0G0g==} dev: false @@ -19803,10 +19522,6 @@ packages: engines: {node: '>=4.0'} dev: false - /xmlchars@2.2.0: - resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - dev: false - /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} From 62cc15031be88d2d4be40a1eeef69e302e8429d6 Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 14:01:40 +0100 Subject: [PATCH 06/14] chore: adding dom types --- integrations/playwright/src/snapshot.ts | 13 +++++-------- integrations/playwright/tsconfig.json | 5 ++++- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/integrations/playwright/src/snapshot.ts b/integrations/playwright/src/snapshot.ts index 7821aa4b..727db6ca 100644 --- a/integrations/playwright/src/snapshot.ts +++ b/integrations/playwright/src/snapshot.ts @@ -67,14 +67,11 @@ export async function pixeleyeSnapshot(page: Page, options: Options) { const domSnapshot = await (page as Page).evaluate(() => { const r: RRWeb = (window as any).rrwebSnapshot; - return r.snapshot( - document, - { - recordCanvas: true, - inlineImages: true, - inlineStylesheet: true, - } - ); + return r.snapshot(document, { + recordCanvas: true, + inlineImages: true, + inlineStylesheet: true, + }); }); if (!domSnapshot) { diff --git a/integrations/playwright/tsconfig.json b/integrations/playwright/tsconfig.json index 8f7c20f4..45bd8e7d 100644 --- a/integrations/playwright/tsconfig.json +++ b/integrations/playwright/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "@pixeleye/tsconfig/node.json", "include": ["."], - "exclude": ["dist", "build", "node_modules"], + "compilerOptions": { + "lib": ["dom"] + }, + "exclude": ["dist", "build", "node_modules"] } From 177686040816c8fa7e47875a037a76a131389def Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 14:03:54 +0100 Subject: [PATCH 07/14] chore: removing jsdom --- configs/esbuild/index.js | 3 +-- integrations/cli/cli-capture/package.json | 1 - pnpm-lock.yaml | 26 ----------------------- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/configs/esbuild/index.js b/configs/esbuild/index.js index a40038f7..58169520 100644 --- a/configs/esbuild/index.js +++ b/configs/esbuild/index.js @@ -2,7 +2,6 @@ import * as esbuild from "esbuild"; const forceExternal = [ - "jsdom", "playwright-core", "playwright-core/lib/server" ] @@ -30,7 +29,7 @@ export function build(entryPoints, outdir, banner = {}, formats = ["cjs", "esm"] minify: false, platform: "node", target: "node20", - external: devBuild ? ["jsdom", "playwright-core", "rrweb-snapshot/dist/rrweb-snapshot.min.js"] : [], + external: devBuild ? ["playwright-core", "rrweb-snapshot/dist/rrweb-snapshot.min.js"] : [], outdir, format, outExtension: { diff --git a/integrations/cli/cli-capture/package.json b/integrations/cli/cli-capture/package.json index 86e789be..fa0f99c9 100644 --- a/integrations/cli/cli-capture/package.json +++ b/integrations/cli/cli-capture/package.json @@ -36,7 +36,6 @@ "@pixeleye/cli-devices": "workspace:*", "@pixeleye/cli-logger": "workspace:*", "rrweb-snapshot": "2.0.0-alpha.13", - "@types/jsdom": "^21.1.6", "object-hash": "^3.0.0", "playwright-core": "^1.43.0" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4898c675..5dacd4d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -557,9 +557,6 @@ importers: '@pixeleye/cli-logger': specifier: workspace:* version: link:../cli-logger - '@types/jsdom': - specifier: ^21.1.6 - version: 21.1.6 object-hash: specifier: ^3.0.0 version: 3.0.0 @@ -9423,14 +9420,6 @@ packages: resolution: {integrity: sha512-k4MGaQl5TGo/iipqb2UDG2UwjXziSWkh0uysQelTlJpX1qGlpUZYm8PnO4DxG1qBomtJUdYJ6qR6xdIah10JLg==} dev: true - /@types/jsdom@21.1.6: - resolution: {integrity: sha512-/7kkMsC+/kMs7gAYmmBR9P0vGTnOoLhQhyhQJSlXGI5bzTHp6xdo0TtKWQAsz6pmSAeVqKSbqeyP6hytqr9FDw==} - dependencies: - '@types/node': 20.12.7 - '@types/tough-cookie': 4.0.5 - parse5: 7.1.2 - dev: false - /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} @@ -9602,10 +9591,6 @@ packages: resolution: {integrity: sha512-BQR04zLE0ve2eNrqxXw/Qp/f6LxvNrj/4A8ZgdQi3SzbBqxFhleI7N4DS/mSjDnODrUaEGgoWg4grAZR1kVj8w==} dev: false - /@types/tough-cookie@4.0.5: - resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} - dev: false - /@types/trouter@3.1.4: resolution: {integrity: sha512-4YIL/2AvvZqKBWenjvEpxpblT2KGO6793ipr5QS7/6DpQ3O3SwZGgNGWezxf3pzeYZc24a2pJIrR/+Jxh/wYNQ==} dev: false @@ -12357,11 +12342,6 @@ packages: resolution: {integrity: sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==} dev: true - /entities@4.5.0: - resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} - engines: {node: '>=0.12'} - dev: false - /env-ci@11.0.0: resolution: {integrity: sha512-apikxMgkipkgTvMdRT9MNqWx5VLOci79F4VBd7Op/7OPjjoanjdAvn6fglMCCEf/1bAh8eOiuEVCUs4V3qP3nQ==} engines: {node: ^18.17 || >=20.6.1} @@ -16013,12 +15993,6 @@ packages: json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 - /parse5@7.1.2: - resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} - dependencies: - entities: 4.5.0 - dev: false - /parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} From 97179da7e17691bd5dea6a512cc7a6890e632339 Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 14:04:54 +0100 Subject: [PATCH 08/14] chore: updating versions --- integrations/cli/pixeleye/package.json | 2 +- integrations/cypress/package.json | 2 +- integrations/playwright/package.json | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/integrations/cli/pixeleye/package.json b/integrations/cli/pixeleye/package.json index c3bd0533..b0cc7dfe 100644 --- a/integrations/cli/pixeleye/package.json +++ b/integrations/cli/pixeleye/package.json @@ -1,6 +1,6 @@ { "name": "pixeleye", - "version": "0.7.9-alpha.2", + "version": "0.7.9", "private": false, "license": "AGPL-3.0", "scripts": { diff --git a/integrations/cypress/package.json b/integrations/cypress/package.json index 73f9fcf4..1ac54987 100644 --- a/integrations/cypress/package.json +++ b/integrations/cypress/package.json @@ -2,7 +2,7 @@ "name": "@pixeleye/cypress", "description": "Cypress integration for Pixeleye", "private": false, - "version": "0.4.6-alpha.2", + "version": "0.4.6", "license": "AGPL-3.0", "scripts": { "lint": "eslint", diff --git a/integrations/playwright/package.json b/integrations/playwright/package.json index 2b2717c8..9f2240a5 100644 --- a/integrations/playwright/package.json +++ b/integrations/playwright/package.json @@ -1,7 +1,7 @@ { "name": "@pixeleye/playwright", "private": false, - "version": "0.6.1-alpha.2", + "version": "0.6.1", "license": "AGPL-3.0", "scripts": { "lint": "eslint", @@ -29,7 +29,6 @@ "@pixeleye/cli-devices": "workspace:*", "playwright-core": "^1.43.0", "rrweb-snapshot": "2.0.0-alpha.13", - "rrweb-snapshot": "^2.0.0-alpha.13", "undici": "^6.13.0" }, "devDependencies": { From d63171100089e35dcc990a02f7e9362856a81729 Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 14:05:03 +0100 Subject: [PATCH 09/14] Update pnpm-lock.yaml --- pnpm-lock.yaml | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5dacd4d7..bfa344f0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -417,7 +417,7 @@ importers: dependencies: '@pixeleye/playwright': specifier: 0.6.1 - version: 0.6.1 + version: link:../../integrations/playwright pixeleye: specifier: workspace:* version: link:../../integrations/cli/pixeleye @@ -875,7 +875,7 @@ importers: specifier: ^1.43.0 version: 1.43.0 rrweb-snapshot: - specifier: ^2.0.0-alpha.13 + specifier: 2.0.0-alpha.13 version: 2.0.0-alpha.13 undici: specifier: ^6.13.0 @@ -6313,21 +6313,6 @@ packages: detect-libc: 1.0.3 dev: true - /@pixeleye/cli-devices@0.4.7: - resolution: {integrity: sha512-IcsQ8DJRL+JODzlDk6KmGv8z9zKL87E6QqaKObCrtZrmQfLG2s1auY/HnrR25wJuzlBe3qas6V9GbIxCsO3Ttg==} - dependencies: - playwright-core: 1.43.0 - dev: false - - /@pixeleye/playwright@0.6.1: - resolution: {integrity: sha512-vAnCpSdKpVHEUXp/7l1yKo7OWCKVvfhaXvdf9lp6pik6Rrxn1uLwx7DHDNSuws8ztHXPqyKGa+UzPJiAD573tw==} - dependencies: - '@pixeleye/cli-devices': 0.4.7 - playwright-core: 1.43.0 - rrweb-snapshot: 2.0.0-alpha.11 - undici: 6.13.0 - dev: false - /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} @@ -17324,10 +17309,6 @@ packages: '@rollup/rollup-win32-x64-msvc': 4.14.2 fsevents: 2.3.3 - /rrweb-snapshot@2.0.0-alpha.11: - resolution: {integrity: sha512-N0dzeJA2VhrlSOadkKwCVmV/DuNOwBH+Lhx89hAf9PQK4lCS8AP4AaylhqUdZOYHqwVjqsYel/uZ4hN79vuLhw==} - dev: false - /rrweb-snapshot@2.0.0-alpha.13: resolution: {integrity: sha512-slbhNBCYjxLGCeH95a67ECCy5a22nloXp1F5wF7DCzUNw80FN7tF9Lef1sRGLNo32g3mNqTc2sWLATlKejMxYw==} From 1c14c3d2fd6a94a7d69f6c2e5d08514d2e68adb0 Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 14:09:00 +0100 Subject: [PATCH 10/14] cleaning up integrations --- integrations/cli/cli-capture/tsconfig.json | 3 ++ integrations/cypress/src/snapshot.ts | 1 + integrations/puppeteer/src/snapshot.ts | 35 ++++++++++++---------- integrations/puppeteer/tsconfig.json | 3 ++ 4 files changed, 26 insertions(+), 16 deletions(-) diff --git a/integrations/cli/cli-capture/tsconfig.json b/integrations/cli/cli-capture/tsconfig.json index 23644cfd..45bd8e7d 100644 --- a/integrations/cli/cli-capture/tsconfig.json +++ b/integrations/cli/cli-capture/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "@pixeleye/tsconfig/node.json", "include": ["."], + "compilerOptions": { + "lib": ["dom"] + }, "exclude": ["dist", "build", "node_modules"] } diff --git a/integrations/cypress/src/snapshot.ts b/integrations/cypress/src/snapshot.ts index f7d47d53..35d52dda 100644 --- a/integrations/cypress/src/snapshot.ts +++ b/integrations/cypress/src/snapshot.ts @@ -37,6 +37,7 @@ export const pixeleyeSnapshot = (options: Options) => { const serializedDom = domSnapshot(doc, { recordCanvas: true, inlineImages: true, + inlineStylesheet: true, }); if (!serializedDom) { throw new Error("Failed to serialize DOM"); diff --git a/integrations/puppeteer/src/snapshot.ts b/integrations/puppeteer/src/snapshot.ts index a69934d5..aa43f039 100644 --- a/integrations/puppeteer/src/snapshot.ts +++ b/integrations/puppeteer/src/snapshot.ts @@ -9,6 +9,17 @@ import { } from "@pixeleye/cli-booth"; import { createRequire } from "node:module"; import { snapshot as rrwebSnapshotFn } from "rrweb-snapshot"; +import rrweb from "rrweb-snapshot"; + +type RRWeb = typeof rrweb; + +let rrwebScript: string | undefined; +try { + rrwebScript = require.resolve("rrweb-snapshot/dist/rrweb-snapshot.min.js"); +} catch { + const require = createRequire(import.meta.url); + rrwebScript = require.resolve("rrweb-snapshot/dist/rrweb-snapshot.min.js"); +} export interface Options { fullPage?: boolean; @@ -22,14 +33,6 @@ export interface Options { wait?: number; } -let rrwebSnapshot: string | undefined; -try { - rrwebSnapshot = require.resolve("rrweb-snapshot/dist/rrweb-snapshot.min.js"); -} catch { - const require = createRequire(import.meta.url); - rrwebSnapshot = require.resolve("rrweb-snapshot/dist/rrweb-snapshot.min.js"); -} - export async function pixeleyeSnapshot( page: Page | PageCore, options: Options @@ -60,17 +63,17 @@ export async function pixeleyeSnapshot( : undefined; await (page as Page).addScriptTag({ - path: rrwebSnapshot, + path: rrwebScript, }); const domSnapshot = await (page as Page).evaluate(() => { - return ((rrwebSnapshot as any).snapshot as typeof rrwebSnapshotFn)( - document, - { - recordCanvas: true, - inlineImages: true, - } - ); + const r: RRWeb = (window as any).rrwebSnapshot; + + return r.snapshot(document, { + recordCanvas: true, + inlineImages: true, + inlineStylesheet: true, + }); }); if (!domSnapshot) { diff --git a/integrations/puppeteer/tsconfig.json b/integrations/puppeteer/tsconfig.json index 23644cfd..45bd8e7d 100644 --- a/integrations/puppeteer/tsconfig.json +++ b/integrations/puppeteer/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "@pixeleye/tsconfig/node.json", "include": ["."], + "compilerOptions": { + "lib": ["dom"] + }, "exclude": ["dist", "build", "node_modules"] } From a4774978d8a65ee8e630f4eec89e124b4b8e0845 Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 14:10:04 +0100 Subject: [PATCH 11/14] Create shaggy-snakes-punch.md --- .changeset/shaggy-snakes-punch.md | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .changeset/shaggy-snakes-punch.md diff --git a/.changeset/shaggy-snakes-punch.md b/.changeset/shaggy-snakes-punch.md new file mode 100644 index 00000000..451db8c0 --- /dev/null +++ b/.changeset/shaggy-snakes-punch.md @@ -0,0 +1,10 @@ +--- +"@pixeleye/cli-capture": minor +"@pixeleye/cli-booth": minor +"pixeleye": minor +"@pixeleye/playwright": minor +"@pixeleye/puppeteer": minor +"@pixeleye/cypress": minor +--- + +Adding support for HTML canvas elements From e1fca1914caecaf49e6e5df44f5bcaacd60627df Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 14:10:39 +0100 Subject: [PATCH 12/14] Update exec.ts --- integrations/cli/pixeleye/src/handlers/exec.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/integrations/cli/pixeleye/src/handlers/exec.ts b/integrations/cli/pixeleye/src/handlers/exec.ts index 67e6a9ea..c7d803d8 100644 --- a/integrations/cli/pixeleye/src/handlers/exec.ts +++ b/integrations/cli/pixeleye/src/handlers/exec.ts @@ -22,8 +22,6 @@ export async function execHandler( shard?: string; } ) { - console.log("HELLOWORLD"); - // Lets our integrations know we are running in a Pixeleye environment setEnv("PIXELEYE_RUNNING", "true"); From a8da924a8cba4542b6c39efafa2d6b686cc7e5e2 Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 14:25:21 +0100 Subject: [PATCH 13/14] fixing typescript --- integrations/cli/cli-booth/tsconfig.json | 3 +++ integrations/cli/pixeleye/tsconfig.json | 3 +++ 2 files changed, 6 insertions(+) diff --git a/integrations/cli/cli-booth/tsconfig.json b/integrations/cli/cli-booth/tsconfig.json index 23644cfd..45bd8e7d 100644 --- a/integrations/cli/cli-booth/tsconfig.json +++ b/integrations/cli/cli-booth/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "@pixeleye/tsconfig/node.json", "include": ["."], + "compilerOptions": { + "lib": ["dom"] + }, "exclude": ["dist", "build", "node_modules"] } diff --git a/integrations/cli/pixeleye/tsconfig.json b/integrations/cli/pixeleye/tsconfig.json index fe949302..7db0978b 100644 --- a/integrations/cli/pixeleye/tsconfig.json +++ b/integrations/cli/pixeleye/tsconfig.json @@ -1,5 +1,8 @@ { "extends": "@pixeleye/tsconfig/node.json", "include": ["."], + "compilerOptions": { + "lib": ["es2021", "dom"] + }, "exclude": ["dist", "bin", "build", "node_modules"] } From 77583523cd67ec0ea49716c5ad4f8a77c6e37cf9 Mon Sep 17 00:00:00 2001 From: Alfie Jones Date: Wed, 22 May 2024 14:28:09 +0100 Subject: [PATCH 14/14] Update tsconfig.json --- integrations/cypress/tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integrations/cypress/tsconfig.json b/integrations/cypress/tsconfig.json index b41d9536..fb6b36bb 100644 --- a/integrations/cypress/tsconfig.json +++ b/integrations/cypress/tsconfig.json @@ -3,6 +3,7 @@ "include": ["."], "compilerOptions": { "types": ["cypress"], + "lib": ["dom"] }, - "exclude": ["dist", "build", "node_modules"], + "exclude": ["dist", "build", "node_modules"] }