2.0.1 work - fidelity + build improvements (#327)

Fidelity improvements (via wabac.js and wombat):
- fixes ebay carousel #326 (via wombat)
- partial fix to error page escaping #323 (via wabac)
- fixes to reddit pages #317 
- fixes to twitter/x replay (via wabac / wombat)

Build improvements:
- run mkdocs gh-deploy --force in gh action, instead of publish-docs to avoid accidental updates
- auto install ruffle from download script, remove from git, add 'update-ruffle' script
- update to latest ruffle which doesn't inject setImmeidate/ clearImmediate to avoid interference with certain sites, fixing fidelity on some sites (including twitter/x)
- remove unused src/sw.ts
- deps: wabac.js to 2.18.2

bump to 2.0.1
This commit is contained in:
Ilya Kreymer
2024-06-09 17:38:38 -07:00
committed by GitHub
parent a56e312f8f
commit 7229609ed0
11 changed files with 49 additions and 64 deletions
+3
View File
@@ -32,6 +32,9 @@ jobs:
**/node_modules **/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Update Ruffle
run: yarn run update-ruffle
- name: Run Build - name: Run Build
env: env:
APPLE_ID: ${{ secrets.APPLE_ID }} APPLE_ID: ${{ secrets.APPLE_ID }}
+12 -1
View File
@@ -6,6 +6,9 @@ on:
paths: paths:
- 'site/**' - 'site/**'
- 'mkdocs/**' - 'mkdocs/**'
- 'src/**'
- 'package.json'
- 'yarn.lock'
permissions: permissions:
contents: write contents: write
@@ -30,4 +33,12 @@ jobs:
with: with:
python-version: 3.x python-version: 3.x
- run: pip install -r mkdocs/requirements.txt - run: pip install -r mkdocs/requirements.txt
- run: yarn run publish-docs
- name: Update Ruffle
run: yarn run update-ruffle
- name: Build RWP + Docs
run: yarn run build-docs
- name: Publish to GH
run: cd mkdocs; mkdocs gh-deploy --force
+3 -3
View File
@@ -1,7 +1,7 @@
{ {
"name": "replaywebpage", "name": "replaywebpage",
"productName": "ReplayWeb.page", "productName": "ReplayWeb.page",
"version": "2.0.0", "version": "2.0.1",
"description": "Serverless Web Archive Replay", "description": "Serverless Web Archive Replay",
"repository": "https://github.com/webrecorder/replayweb.page", "repository": "https://github.com/webrecorder/replayweb.page",
"homepage": "https://replayweb.page/", "homepage": "https://replayweb.page/",
@@ -12,7 +12,7 @@
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^5.15.4", "@fortawesome/fontawesome-free": "^5.15.4",
"@shoelace-style/shoelace": "^2.8.0", "@shoelace-style/shoelace": "^2.8.0",
"@webrecorder/wabac": "^2.18.0", "@webrecorder/wabac": "^2.18.3",
"bulma": "^0.9.3", "bulma": "^0.9.3",
"electron-log": "^4.4.1", "electron-log": "^4.4.1",
"electron-updater": "^5.3.0", "electron-updater": "^5.3.0",
@@ -76,7 +76,6 @@
"build": "webpack --mode production && ./adblock/fetch-adblock.sh", "build": "webpack --mode production && ./adblock/fetch-adblock.sh",
"build-dev": "webpack --mode development", "build-dev": "webpack --mode development",
"build-docs": "yarn run build && cd mkdocs && ./copy-site.sh && mkdocs build", "build-docs": "yarn run build && cd mkdocs && ./copy-site.sh && mkdocs build",
"publish-docs": "yarn run build && cd mkdocs && ./copy-site.sh && mkdocs gh-deploy --force",
"start-prod": "http-server -p 9990 --cors", "start-prod": "http-server -p 9990 --cors",
"start-docs-prod": "yarn run build-docs && cd mkdocs/_genhtml && http-server -p 9990 --cors", "start-docs-prod": "yarn run build-docs && cd mkdocs/_genhtml && http-server -p 9990 --cors",
"start-dev": "webpack serve --mode development", "start-dev": "webpack serve --mode development",
@@ -84,6 +83,7 @@
"start-electron": "NODE_ENV=development electron ./dist/electron.js $1", "start-electron": "NODE_ENV=development electron ./dist/electron.js $1",
"test-start-embed": "cd tests/embed; http-server -p 8020", "test-start-embed": "cd tests/embed; http-server -p 8020",
"test-start-sandbox": "cd tests/embed/sandbox; http-server -p 8030", "test-start-sandbox": "cd tests/embed/sandbox; http-server -p 8030",
"update-ruffle": "./ruffle/download-latest-ruffle.sh",
"pack": "CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --publish never", "pack": "CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --publish never",
"pack-signed": "electron-builder", "pack-signed": "electron-builder",
"dist": "yarn run build && yarn run pack", "dist": "yarn run build && yarn run pack",
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
RUFFLE_DIR=$SCRIPT_DIR
SELFHOST_URL=$(curl "https://api.github.com/repos/ruffle-rs/ruffle/releases" | jq -r '.[0].assets[] | select(.name | contains("selfhosted")) | .browser_download_url')
echo "$SELFHOST_URL"
curl -L -o $RUFFLE_DIR/ruffle.zip "$SELFHOST_URL"
rm $RUFFLE_DIR/*.js $RUFFLE_DIR/*.wasm
cd $RUFFLE_DIR
unzip $RUFFLE_DIR/ruffle.zip *.js *.wasm
rm $RUFFLE_DIR/ruffle.zip
-3
View File
File diff suppressed because one or more lines are too long
-39
View File
@@ -1,39 +0,0 @@
import INDEX_HTML from "../index.html";
// @ts-expect-error [// TODO: Fix this the next time the file is edited.] - TS7016 - Could not find a declaration file for module '@webrecorder/wabac/src/swmain'. 'node_modules/@webrecorder/wabac/src/swmain.js' implicitly has an 'any' type.
import { SWReplay } from "@webrecorder/wabac/src/swmain";
// @ts-expect-error [// TODO: Fix this the next time the file is edited.] - TS7016 - Could not find a declaration file for module '@webrecorder/wabac/src/loaders'. 'node_modules/@webrecorder/wabac/src/loaders.js' implicitly has an 'any' type.
import { WorkerLoader } from "@webrecorder/wabac/src/loaders";
type Self = Window &
typeof globalThis & {
registration: { scope: string };
sw: SWReplay;
};
// TODO: Fix this the next time the file is edited.
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if ((self as Self).registration) {
const staticData = new Map();
const prefix = (self as Self).registration.scope;
staticData.set(prefix, { type: "text/html", content: INDEX_HTML });
staticData.set(prefix + "index.html", {
type: "text/html",
content: INDEX_HTML,
});
const sp = new URLSearchParams(self.location.search);
const defaultConfig: { injectScripts?: string[] } = {};
if (sp.get("ruffle") == "1") {
defaultConfig.injectScripts = ["ruffle/ruffle.js"];
}
(self as Self).sw = new SWReplay({ staticData, defaultConfig });
} else {
new WorkerLoader(self);
}
+14 -14
View File
@@ -1004,15 +1004,15 @@
resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e"
integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==
"@webrecorder/wabac@^2.18.0": "@webrecorder/wabac@^2.18.3":
version "2.18.0" version "2.18.3"
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.18.0.tgz#6eafa51ffb53e785a9b7a36bd8c12cbf60f06cc2" resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.18.3.tgz#eda195452a9964e8216fb0676d5da6cc69239dae"
integrity sha512-tpZ7saCQMWcrbQrB7421ycfucKFFBRXg3OrTSPkk71FtGSQ8LFtmCPnpWWu/wJgWcnC7ka7CnIuaX3rW2A42oA== integrity sha512-qmNLXky9QHpljt0EyEmcO6L2qFGG63mZbMYKso0MZZLFY3NeUf/ANafq9pWWm1Bw10+zoV6KRtHUin8gropccA==
dependencies: dependencies:
"@peculiar/asn1-ecc" "^2.3.4" "@peculiar/asn1-ecc" "^2.3.4"
"@peculiar/asn1-schema" "^2.3.3" "@peculiar/asn1-schema" "^2.3.3"
"@peculiar/x509" "^1.9.2" "@peculiar/x509" "^1.9.2"
"@webrecorder/wombat" "^3.7.3" "@webrecorder/wombat" "^3.7.6"
acorn "^8.10.0" acorn "^8.10.0"
auto-js-ipfs "^2.1.1" auto-js-ipfs "^2.1.1"
base64-js "^1.5.1" base64-js "^1.5.1"
@@ -1020,7 +1020,7 @@
buffer "^6.0.3" buffer "^6.0.3"
fast-xml-parser "^4.2.5" fast-xml-parser "^4.2.5"
hash-wasm "^4.9.0" hash-wasm "^4.9.0"
http-link-header "^1.1.0" http-link-header "^1.1.3"
http-status-codes "^2.1.4" http-status-codes "^2.1.4"
idb "^7.1.1" idb "^7.1.1"
js-levenshtein "^1.1.6" js-levenshtein "^1.1.6"
@@ -1033,10 +1033,10 @@
stream-browserify "^3.0.0" stream-browserify "^3.0.0"
warcio "^2.2.1" warcio "^2.2.1"
"@webrecorder/wombat@^3.7.3": "@webrecorder/wombat@^3.7.6":
version "3.7.3" version "3.7.6"
resolved "https://registry.yarnpkg.com/@webrecorder/wombat/-/wombat-3.7.3.tgz#21e83b5947664873219021163ded9bb698f333f4" resolved "https://registry.yarnpkg.com/@webrecorder/wombat/-/wombat-3.7.6.tgz#e52a1bcfccd0150517989bc4310a03730a1f74e7"
integrity sha512-+zkXDxo1Xr8D9OwURk247fWZiJeix8xB+3rRoYX7fD3yyw6+hwCYSD3pp95ZTfD73ailXjr1WKy+Xz/1CFq3Iw== integrity sha512-SA34StdLc+D60Aa8bZ2I+8PLjody1B/j9DmZ2zyXg/EZuPLSG4ec6XvMzq8QYuoGvD+hkjAf0YlUGxmI/viIcw==
dependencies: dependencies:
warcio "^2.2.0" warcio "^2.2.0"
@@ -3008,10 +3008,10 @@ http-errors@~1.6.2:
setprototypeof "1.1.0" setprototypeof "1.1.0"
statuses ">= 1.4.0 < 2" statuses ">= 1.4.0 < 2"
http-link-header@^1.1.0: http-link-header@^1.1.3:
version "1.1.0" version "1.1.3"
resolved "https://registry.yarnpkg.com/http-link-header/-/http-link-header-1.1.0.tgz#a1ca87efdbcb7778d8d0d4525de1e6964ec1f129" resolved "https://registry.yarnpkg.com/http-link-header/-/http-link-header-1.1.3.tgz#b367b7a0ad1cf14027953f31aa1df40bb433da2a"
integrity sha512-pj6N1yxOz/ANO8HHsWGg/OoIL1kmRYvQnXQ7PIRpgp+15AnEsRH8fmIJE6D1OdWG2Bov+BJHVla1fFXxg1JbbA== integrity sha512-3cZ0SRL8fb9MUlU3mKM61FcQvPfXx2dBrZW3Vbg5CXa8jFlK8OaEpePenLe1oEXQduhz8b0QjsqfS59QP4AJDQ==
http-parser-js@>=0.5.1: http-parser-js@>=0.5.1:
version "0.5.3" version "0.5.3"