From d72ae8018daabf1faefce75f7478df0091609771 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Thu, 19 Sep 2024 13:46:56 -0700 Subject: [PATCH] remove RWP /misc endpoint, just use 'replaywebpage', update to latest --- package.json | 4 +- src/electron/rec-window.ts | 2 +- src/recorder.ts | 2 +- src/ui/app.ts | 2 +- src/ui/coll-index.ts | 4 +- src/ui/coll-info.ts | 5 +- src/ui/coll.ts | 2 +- src/ui/upload.ts | 2 +- yarn.lock | 109 ++++++++++++------------------------- 9 files changed, 47 insertions(+), 85 deletions(-) diff --git a/package.json b/package.json index f715549f..07db7b7f 100644 --- a/package.json +++ b/package.json @@ -10,8 +10,8 @@ "dependencies": { "@fortawesome/fontawesome-free": "^5.13.0", "@ipld/car": "^5.3.1", - "@webrecorder/awp-sw": "^0.4.4", - "@webrecorder/wabac": "github:webrecorder/wabac.js#ts-5", + "@webrecorder/awp-sw": "^0.5.0-beta.2", + "@webrecorder/wabac": "^2.20.0-beta.2", "auto-js-ipfs": "^2.3.0", "browsertrix-behaviors": "^0.6.4", "btoa": "^1.2.1", diff --git a/src/electron/rec-window.ts b/src/electron/rec-window.ts index 0ac33bbc..04420185 100644 --- a/src/electron/rec-window.ts +++ b/src/electron/rec-window.ts @@ -4,7 +4,7 @@ import { css, wrapCss, clickOnSpacebarPress, -} from "replaywebpage/misc"; +} from "replaywebpage"; import fasRefresh from "@fortawesome/fontawesome-free/svgs/solid/redo-alt.svg"; //import fasFullscreen from '@fortawesome/fontawesome-free/svgs/solid/desktop.svg'; diff --git a/src/recorder.ts b/src/recorder.ts index dcb69ed3..40583e32 100644 --- a/src/recorder.ts +++ b/src/recorder.ts @@ -1452,9 +1452,9 @@ class Recorder { const data = reqresp.toDBRecord(reqresp.payload, this.pageInfo); // top-level URL is a non-GET request - // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. if ( data?.requestUrl && + // @ts-expect-error - TS2339 - Property 'pageInfo' does not exist on type 'Recorder'. data.requestUrl === this.pageInfo.url && !sessions.length ) { diff --git a/src/ui/app.ts b/src/ui/app.ts index e283cf9e..f60c78fb 100644 --- a/src/ui/app.ts +++ b/src/ui/app.ts @@ -1,4 +1,4 @@ -import { html, css, wrapCss, IS_APP, apiPrefix } from "replaywebpage/misc"; +import { html, css, wrapCss, IS_APP, apiPrefix } from "replaywebpage"; // replaywebpage imports import { ReplayWebApp, Embed, Loader } from "replaywebpage"; diff --git a/src/ui/coll-index.ts b/src/ui/coll-index.ts index b2ecb74c..e596aa5c 100644 --- a/src/ui/coll-index.ts +++ b/src/ui/coll-index.ts @@ -1,9 +1,7 @@ -import { ItemIndex } from "replaywebpage"; +import { ItemIndex, html } from "replaywebpage"; import type { PropertyValues } from "lit"; import { property } from "lit/decorators.js"; -import { html } from "replaywebpage/misc"; - import prettyBytes from "pretty-bytes"; import { type WrRecCollInfo } from "./coll-info"; import { type WrRecItem } from "../types"; diff --git a/src/ui/coll-info.ts b/src/ui/coll-info.ts index cf1bf9d6..a3e7f26a 100644 --- a/src/ui/coll-info.ts +++ b/src/ui/coll-info.ts @@ -1,4 +1,4 @@ -import { html, css, wrapCss, apiPrefix } from "replaywebpage/misc"; +import { html, css, wrapCss, apiPrefix } from "replaywebpage"; import prettyBytes from "pretty-bytes"; @@ -182,7 +182,8 @@ class WrRecCollInfo extends ItemInfo {

Actions

diff --git a/src/ui/coll.ts b/src/ui/coll.ts index 0ce06460..e389a936 100644 --- a/src/ui/coll.ts +++ b/src/ui/coll.ts @@ -4,7 +4,7 @@ import { wrapCss, clickOnSpacebarPress, apiPrefix, -} from "replaywebpage/misc"; +} from "replaywebpage"; import fasDownload from "@fortawesome/fontawesome-free/svgs/solid/download.svg"; diff --git a/src/ui/upload.ts b/src/ui/upload.ts index 73d49c62..2ecadad0 100644 --- a/src/ui/upload.ts +++ b/src/ui/upload.ts @@ -1,4 +1,4 @@ -import { html, css, wrapCss, apiPrefix, LitElement } from "replaywebpage/misc"; +import { html, css, wrapCss, apiPrefix, LitElement } from "replaywebpage"; import prettyBytes from "pretty-bytes"; import fasSync from "@fortawesome/fontawesome-free/svgs/solid/sync-alt.svg"; diff --git a/yarn.lock b/yarn.lock index ba9bd2b8..70400686 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1257,6 +1257,16 @@ multiformats "^13.0.0" varint "^6.0.0" +"@ipld/car@^5.3.2": + version "5.3.2" + resolved "https://registry.yarnpkg.com/@ipld/car/-/car-5.3.2.tgz#b6f9b5e30e0de5d45aff4494e8c3e2667ce9e0a4" + integrity sha512-Bb4XrCFlnsCb9tTzZ1I8zo9O61D9qm7HfvuYrQ9gzdE8YhjyVIjrjmHmnoSWV/uCmyc2/bcqiDPIg+9WljXNzg== + dependencies: + "@ipld/dag-cbor" "^9.0.7" + cborg "^4.0.5" + multiformats "^13.0.0" + varint "^6.0.0" + "@ipld/dag-cbor@^9.0.7": version "9.2.0" resolved "https://registry.yarnpkg.com/@ipld/dag-cbor/-/dag-cbor-9.2.0.tgz#3a3f0bee02d7e1c2f15582e896843d5b00fbba9f" @@ -2253,60 +2263,32 @@ resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-2.0.5.tgz#325db42395cd49fe6c14057f9a900e427df8810e" integrity sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ== -"@webrecorder/awp-sw@^0.4.4": - version "0.4.4" - resolved "https://registry.yarnpkg.com/@webrecorder/awp-sw/-/awp-sw-0.4.4.tgz#6b9c5fd86868442d81732e8176b686d21a71f675" - integrity sha512-H+ISFpLBGbSYyZGvF/esKh6AGLIUhNJjg7ixPEU+zN54xtOh+m4u9hc2BbXlRR4yUovdwzze0vBGGjWR7KGs9w== +"@webrecorder/awp-sw@^0.5.0-beta.2": + version "0.5.0-beta.2" + resolved "https://registry.yarnpkg.com/@webrecorder/awp-sw/-/awp-sw-0.5.0-beta.2.tgz#8e1aa04f2ea75babbeae4b71a1b94c9c56f02299" + integrity sha512-Fp/k4bjbou5HninHe8nFNFVTw7fXj8uzRrnNAQlBP6ORql8/wkUZ0+OQXvHrX/DTrxD4HC5YAy1ILV1r5UXbXg== dependencies: - "@ipld/car" "^5.3.1" + "@ipld/car" "^5.3.2" "@ipld/unixfs" "^3.0.0" - "@webrecorder/wabac" "^2.18.1" + "@webrecorder/wabac" "^2.20.0-beta.2" auto-js-ipfs "^2.3.0" client-zip "^2.3.0" hash-wasm "^4.9.0" idb "^7.1.1" - p-queue "^7.3.4" + p-queue "^8.0.1" uuid "^9.0.0" - warcio "^2.2.1" - -"@webrecorder/wabac@^2.18.1": - version "2.19.9" - resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.19.9.tgz#21d357077bc2a85419e7a6002c81a4bc4fec2514" - integrity sha512-lyvbKVrdUZMUGxwKg5ZFQnyjGUSqZSGOF3NFG9rXLA+Ni0YcQjZCMexGSmqCwY+BksyrVJISCMs3xQ2WQAekgw== - dependencies: - "@peculiar/asn1-ecc" "^2.3.4" - "@peculiar/asn1-schema" "^2.3.3" - "@peculiar/x509" "^1.9.2" - "@webrecorder/wombat" "^3.8.2" - acorn "^8.10.0" - auto-js-ipfs "^2.1.1" - base64-js "^1.5.1" - brotli "^1.3.3" - buffer "^6.0.3" - fast-xml-parser "^4.4.1" - hash-wasm "^4.9.0" - http-link-header "^1.1.3" - http-status-codes "^2.1.4" - idb "^7.1.1" - js-levenshtein "^1.1.6" - js-yaml "^4.1.0" - pako "^1.0.11" - parse5-html-rewriting-stream "^7.0.0" - parse5-sax-parser "^7.0.0" - path-parser "^6.1.0" - process "^0.11.10" - stream-browserify "^3.0.0" - warcio "^2.3.0" + warcio "^2.3.1" -"@webrecorder/wabac@^2.20.0-beta.1", "@webrecorder/wabac@github:webrecorder/wabac.js#ts-5": - version "2.20.0-beta.1" - resolved "https://codeload.github.com/webrecorder/wabac.js/tar.gz/932fa89e36c2d5062d844e644aebd5a071d90e63" +"@webrecorder/wabac@^2.20.0-beta.2": + version "2.20.0-beta.2" + resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.20.0-beta.2.tgz#532b6457cb970039812e3b1470134725d7e72ca5" + integrity sha512-ENVlZOvnFpQO/iMDQX9IZzXrStqlKbDrXe5Tl1aEq0Diun+HI7RKZPF3jJjYEZr0GCON4yY8FNEZhodJCI7dGA== dependencies: "@peculiar/asn1-ecc" "^2.3.4" "@peculiar/asn1-schema" "^2.3.3" "@peculiar/x509" "^1.9.2" "@types/js-levenshtein" "^1.1.3" - "@webrecorder/wombat" "^3.8.1" + "@webrecorder/wombat" "^3.8.2" acorn "^8.10.0" auto-js-ipfs "^2.1.1" base64-js "^1.5.1" @@ -2327,13 +2309,6 @@ stream-browserify "^3.0.0" warcio "^2.3.1" -"@webrecorder/wombat@^3.8.1": - version "3.8.1" - resolved "https://registry.yarnpkg.com/@webrecorder/wombat/-/wombat-3.8.1.tgz#d1030aa80da3826691b2c9355d895545e6b02fa3" - integrity sha512-A9Ed7OMHNjigruXoNAVdLuMzmsCIwh2GQUoZvGbGceV381Ka6Tx5FyeEe9vDoJD/hPGDeGdxbyCOB2/2t8NV9w== - dependencies: - warcio "^2.3.1" - "@webrecorder/wombat@^3.8.2": version "3.8.2" resolved "https://registry.yarnpkg.com/@webrecorder/wombat/-/wombat-3.8.2.tgz#e46e18719834d633175eec52ce753a4dc4e48e27" @@ -6218,13 +6193,13 @@ p-locate@^5.0.0: dependencies: p-limit "^3.0.2" -p-queue@^7.3.4: - version "7.4.1" - resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-7.4.1.tgz#7f86f853048beca8272abdbb7cec1ed2afc0f265" - integrity sha512-vRpMXmIkYF2/1hLBKisKeVYJZ8S2tZ0zEAmIJgdVKP2nq0nh4qCdf8bgw+ZgKrkh71AOCaqzwbJJk1WtdcF3VA== +p-queue@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/p-queue/-/p-queue-8.0.1.tgz#718b7f83836922ef213ddec263ff4223ce70bef8" + integrity sha512-NXzu9aQJTAzbBqOt2hwsR63ea7yvxJc0PwN/zobNAudYfb1B7R08SzB4TsLeSbUCuG467NhnoT0oO6w1qRO+BA== dependencies: eventemitter3 "^5.0.1" - p-timeout "^5.0.2" + p-timeout "^6.1.2" p-retry@^6.2.0: version "6.2.0" @@ -6235,10 +6210,10 @@ p-retry@^6.2.0: is-network-error "^1.0.0" retry "^0.13.1" -p-timeout@^5.0.2: - version "5.1.0" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-5.1.0.tgz#b3c691cf4415138ce2d9cfe071dba11f0fee085b" - integrity sha512-auFDyzzzGZZZdHz3BtET9VEz0SE/uMEAx7uWfGPucfzEwwe/xH0iVeZibQmANYE/hp9T2+UUZT5m+BKyrDp3Ew== +p-timeout@^6.1.2: + version "6.1.2" + resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-6.1.2.tgz#22b8d8a78abf5e103030211c5fc6dee1166a6aa5" + integrity sha512-UbD77BuZ9Bc9aABo74gfXhNvzC9Tx7SxtHSh1fxvx3jTLLYvmVhiQZZrJzqqU0jKbN32kb5VOKiLEQI/3bIjgQ== p-try@^2.0.0: version "2.2.0" @@ -6812,12 +6787,12 @@ repeat-string@^1.6.1: integrity sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w== "replaywebpage@github:webrecorder/replayweb.page#wabac-ts-work": - version "2.1.5" - resolved "https://codeload.github.com/webrecorder/replayweb.page/tar.gz/2c46fe4c0e7eb6143c9e00cfbb3b8e20477f8562" + version "2.1.6" + resolved "https://codeload.github.com/webrecorder/replayweb.page/tar.gz/a6e9f2848e76fd8ba03928ba4e9631115e59ec1f" dependencies: "@fortawesome/fontawesome-free" "^5.15.4" "@shoelace-style/shoelace" "~2.15.1" - "@webrecorder/wabac" "^2.20.0-beta.1" + "@webrecorder/wabac" "^2.20.0-beta.2" bulma "^0.9.3" electron-log "^4.4.1" electron-updater "^6.3.2" @@ -8166,19 +8141,7 @@ verror@^1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" -warcio@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/warcio/-/warcio-2.2.1.tgz#3619728fde716291c9b364744c276362a94bacec" - integrity sha512-KPLoz3aFtdTjexG+QQaubMyuLiNANzvcadGMyNKdpcmhl0k6lBHQQVpxZw3Hx9+4pbyqDXyiF4cr/h2tS8kvcw== - dependencies: - base32-encode "^2.0.0" - hash-wasm "^4.9.0" - pako "^1.0.11" - tempy "^3.1.0" - uuid-random "^1.3.2" - yargs "^17.6.2" - -warcio@^2.3.0, warcio@^2.3.1: +warcio@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/warcio/-/warcio-2.3.1.tgz#8ac9de897de1a556161168f2a3938b60929908ca" integrity sha512-PjcWqzXfs6HdWfHi1V/i8MoMmV5M0Csg3rOa2mqCJ1dmCJXswVfQ0VXbEVumwavNIW2oFFj6LJoCHHeL4Ls/zw==