Skip to content

Commit c85ade3

Browse files
committed
large response stale check: don't commit pending response if a payload is still fetching
behaviors: update to 0.3.0, support for telegram behavior and generic upward scrolling dependencies: update to wabac.js 2.11.1, replaywebpage 1.5.11, ruffle 2022-04-04 bump to 0.7.9
1 parent 7c422aa commit c85ade3

File tree

9 files changed

+57
-38
lines changed

9 files changed

+57
-38
lines changed

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "@webrecorder/archivewebpage",
33
"productName": "ArchiveWeb.page",
4-
"version": "0.7.8",
4+
"version": "0.7.9",
55
"main": "index.js",
66
"description": "Create Web Archives directly in your browser",
77
"repository": "https://github.com/webrecorder/archiveweb.page",
88
"author": "Webrecorder Software",
99
"license": "AGPL-3.0-or-later",
1010
"dependencies": {
1111
"@fortawesome/fontawesome-free": "^5.13.0",
12-
"@webrecorder/wabac": "^2.10.3",
13-
"browsertrix-behaviors": "^0.2.6",
12+
"@webrecorder/wabac": "^2.11.1",
13+
"browsertrix-behaviors": "^0.3.0",
1414
"btoa": "^1.2.1",
1515
"bulma": "^0.9.3",
1616
"hash-wasm": "^4.9.0",
@@ -22,7 +22,7 @@
2222
"node-fetch": "2.6.2",
2323
"pretty-bytes": "^5.6.0",
2424
"querystring-es3": "^0.2.1",
25-
"replaywebpage": "^1.5.10",
25+
"replaywebpage": "^1.5.11",
2626
"stream-browserify": "^3.0.0",
2727
"url": "^0.11.0",
2828
"uuid": "^8.3.2",

src/recorder.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,12 @@ class Recorder {
227227
if ((new Date() - reqresp._created) > 20000) {
228228
if (this.noResponseForStatus(reqresp.status)) {
229229
console.log("Dropping stale: " + key);
230-
} else {
230+
} else if (!reqresp.awaitingPayload) {
231231
console.log(`Committing stale ${reqresp.status} ${reqresp.url}`);
232232
await this.fullCommit(reqresp, []);
233+
} else {
234+
console.log(`Waiting for payload for ${reqresp.url}`);
235+
continue;
233236
}
234237
delete this.pendingRequests[key];
235238
}
@@ -1316,6 +1319,7 @@ class Recorder {
13161319

13171320
if (!this.noResponseForStatus(reqresp.status)) {
13181321
try {
1322+
reqresp.awaitingPayload = true;
13191323
payload = await this.send(method, {requestId: params.requestId}, sessions);
13201324

13211325
if (payload.base64Encoded) {
@@ -1328,6 +1332,8 @@ class Recorder {
13281332
console.warn("no buffer for: " + reqresp.url + " " + reqresp.status + " " + reqresp.requestId + " " + method);
13291333
console.warn(e);
13301334
return null;
1335+
} finally {
1336+
reqresp.awaitingPayload = false;
13311337
}
13321338
} else {
13331339
payload = Buffer.from([]);

wr-ext/bg.js

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wr-ext/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Webrecorder ArchiveWeb.page",
33
"description": "Create high-fidelity web archives directly in your browser",
4-
"version": "0.7.8",
4+
"version": "0.7.9",
55
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
66
"permissions": [
77
"debugger",

wr-ext/replay/sw.js

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

wr-ext/replay/ui.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
-6.29 MB
Binary file not shown.

wr-ext/ruffle/ruffle.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

yarn.lock

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,10 +1028,10 @@
10281028
resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.6.0.tgz#2c275aa05c895eccebbfc34cfb223c6e8bd591a2"
10291029
integrity sha512-ZkVeqEmRpBV2GHvjjUZqEai2PpUbuq8Bqd//vEYsp63J8WyexI8ppCqVS3Zs0QADf6aWuPdU+0XsPI647PVlQA==
10301030

1031-
"@webrecorder/wabac@^2.10.3":
1032-
version "2.10.3"
1033-
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.10.3.tgz#246cee14ede757648c5c559105f805daabf8a56f"
1034-
integrity sha512-Awf73AA3KtYkg0wiKRdTQZVwrx9LLF1oCPTxOJ4H2JdUvyKS1XB/Lr2b/0wxGQoeW7CJ7QiVr5HW2drjUbmkNA==
1031+
"@webrecorder/wabac@^2.11.1":
1032+
version "2.11.1"
1033+
resolved "https://registry.yarnpkg.com/@webrecorder/wabac/-/wabac-2.11.1.tgz#292b05f07025f38ad2a00201c1ba86227d4d21d1"
1034+
integrity sha512-VhQ26umx6m6zP/gXpju15CZJgzh3L0j6W5E5U2L3CmsdGzf41RkCaxyRqMPA1UccTqGKzQj5Gw4PmmhwaXMKmQ==
10351035
dependencies:
10361036
"@webrecorder/wombat" "^3.3.6"
10371037
brotli "github:foliojs/brotli.js"
@@ -1049,7 +1049,7 @@
10491049
path-parser "^6.1.0"
10501050
process "^0.11.10"
10511051
stream-browserify "^3.0.0"
1052-
warcio "^1.5.0"
1052+
warcio "^1.5.1"
10531053

10541054
"@webrecorder/wombat@^3.3.6":
10551055
version "3.3.6"
@@ -1569,10 +1569,10 @@ browserslist@^4.14.5:
15691569
node-releases "^2.0.1"
15701570
picocolors "^1.0.0"
15711571

1572-
browsertrix-behaviors@^0.2.6:
1573-
version "0.2.6"
1574-
resolved "https://registry.yarnpkg.com/browsertrix-behaviors/-/browsertrix-behaviors-0.2.6.tgz#3d7b4a0444c028495a4443424fa86b32012ba482"
1575-
integrity sha512-SAT9vbHWzza4SYzutDZl1/zKhWmVLGFjCuBZrw0+f24MMeiZkzeu3urOqOTz60TtMpUZsYVAJmKPnG06FaRtLQ==
1572+
browsertrix-behaviors@^0.3.0:
1573+
version "0.3.0"
1574+
resolved "https://registry.yarnpkg.com/browsertrix-behaviors/-/browsertrix-behaviors-0.3.0.tgz#6f424006d9393b760199c144777c529520b24db3"
1575+
integrity sha512-FI9JuGk15LJ/ofTth3uPWUQHEaeVDCK3l7UfsmGuchH9E1YE8KRocmaCCpMNGgd5ABo3Ymg5BWAFe30eX53u7A==
15761576

15771577
btoa@^1.2.1:
15781578
version "1.2.1"
@@ -6116,13 +6116,13 @@ registry-url@^5.0.0:
61166116
dependencies:
61176117
rc "^1.2.8"
61186118

6119-
replaywebpage@^1.5.10:
6120-
version "1.5.10"
6121-
resolved "https://registry.yarnpkg.com/replaywebpage/-/replaywebpage-1.5.10.tgz#8b32b7b7ce1e8480d2885483b4c3c650f3b3bc47"
6122-
integrity sha512-HmdMToSu6kFegZDpoiel8d8FRVtcAemB9II/9w8D2zrTbdZaImEbtP4iiLRWxuferZPyK7EXLDuaIZltfwaP3w==
6119+
replaywebpage@^1.5.11:
6120+
version "1.5.11"
6121+
resolved "https://registry.yarnpkg.com/replaywebpage/-/replaywebpage-1.5.11.tgz#fecf164121982fb65086af1024ee57989599e045"
6122+
integrity sha512-VfE5wbjDxS4paaUO6Z9tkdchgyDEUI+O8ERoN4aD0iUsqU3HZn3dvIRzbQaPcLjai0jLuRdunhxxj4m28w4qNA==
61236123
dependencies:
61246124
"@fortawesome/fontawesome-free" "^5.15.4"
6125-
"@webrecorder/wabac" "^2.10.3"
6125+
"@webrecorder/wabac" "^2.11.1"
61266126
bulma "^0.9.3"
61276127
electron-log "^4.4.1"
61286128
electron-updater "^4.3.9"
@@ -7169,6 +7169,19 @@ warcio@^1.5.0:
71697169
uuid-random "^1.3.0"
71707170
yargs "^15.3.1"
71717171

7172+
warcio@^1.5.1:
7173+
version "1.5.1"
7174+
resolved "https://registry.yarnpkg.com/warcio/-/warcio-1.5.1.tgz#4e0db94ced22919ce2f6daa72a60bcd1cefc5c54"
7175+
integrity sha512-H1BTLMEufutoR5E3Hrpg3mc2gcWVxl+gwXH0BBglR+ISYoXikgvTA2YuiunoLeSARybCkUQI3WgnyeKEIcHV4Q==
7176+
dependencies:
7177+
"@peculiar/webcrypto" "^1.1.1"
7178+
esm "^3.2.25"
7179+
hi-base32 "^0.5.0"
7180+
node-fetch "^2.6.1"
7181+
pako "^1.0.11"
7182+
uuid-random "^1.3.0"
7183+
yargs "^15.3.1"
7184+
71727185
watchpack@^2.3.0:
71737186
version "2.3.0"
71747187
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.0.tgz#a41bca3da6afaff31e92a433f4c856a0c25ea0c4"

0 commit comments

Comments
 (0)