diff --git a/package.json b/package.json index 4a4d0f8d..e27e9902 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@webrecorder/wabac", - "version": "2.20.5", + "version": "2.20.6", "main": "index.js", "type": "module", "exports": { @@ -19,7 +19,7 @@ "@peculiar/asn1-schema": "^2.3.3", "@peculiar/x509": "^1.9.2", "@types/js-levenshtein": "^1.1.3", - "@webrecorder/wombat": "^3.8.6", + "@webrecorder/wombat": "^3.8.7", "acorn": "^8.10.0", "auto-js-ipfs": "^2.1.1", "base64-js": "^1.5.1", diff --git a/src/collection.ts b/src/collection.ts index 789b2ffb..aeb663af 100644 --- a/src/collection.ts +++ b/src/collection.ts @@ -524,9 +524,11 @@ window.home = "${this.rootPrefix}"; // @ts-expect-error [TODO] - TS4111 - Property 'pixelRatio' comes from an index signature, so it must be accessed with ['pixelRatio']. | TS4111 - Property 'pixelRatio' comes from an index signature, so it must be accessed with ['pixelRatio']. extraOpts && Number(extraOpts.pixelRatio) ? extraOpts.pixelRatio : 1; // @ts-expect-error [TODO] - TS4111 - Property 'storage' comes from an index signature, so it must be accessed with ['storage']. | TS4111 - Property 'storage' comes from an index signature, so it must be accessed with ['storage']. - // [TODO] - // eslint-disable-next-line @typescript-eslint/no-unsafe-argument - const storage = extraOpts?.storage ? btoa(extraOpts.storage) : ""; + + const storage = extraOpts?.storage + ? // @ts-expect-error [TODO] - TS4111 - Property 'storage' comes from an index signature, so it must be accessed with ['storage']. | TS4111 - Property 'storage' comes from an index signature, so it must be accessed with ['storage']. + JSON.stringify(extraOpts.storage) + : '""'; const presetCookieStr = presetCookie ? JSON.stringify(presetCookie) : '""'; return ` @@ -569,7 +571,7 @@ ${this.injectRelCanon ? `` : ""} wbinfo.static_prefix = "${this.staticPrefix}"; wbinfo.enable_auto_fetch = true; wbinfo.presetCookie = ${presetCookieStr}; - wbinfo.storage = "${storage}"; + wbinfo.storage = ${storage}; wbinfo.isSW = true; wbinfo.injectDocClose = true; wbinfo.pixel_ratio = ${pixelRatio}; diff --git a/yarn.lock b/yarn.lock index 27a56e81..63053524 100644 --- a/yarn.lock +++ b/yarn.lock @@ -896,10 +896,10 @@ resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.5.2.tgz#ea584b637ff63c5a477f6f21604b5a205b72c9ec" integrity sha512-vgJ5OLWadI8aKjDlOH3rb+dYyPd2GTZuQC/Tihjct6F9GpXGZINo3Y/IVuZVTM1eDQB+/AOsjPUWH/WySDaXvw== -"@webrecorder/wombat@^3.8.6": - version "3.8.6" - resolved "https://registry.yarnpkg.com/@webrecorder/wombat/-/wombat-3.8.6.tgz#3aa99d9519f6263434a9e0b963f6ef86d3e0494a" - integrity sha512-+IxV0bkoc6QdHYzwejsPFPC31dRjaxa6zGuR9F08aFb4Ooeekf9AK16ZIYweizs/wm7nvTG5E12ZwW0LUUzX8w== +"@webrecorder/wombat@^3.8.7": + version "3.8.7" + resolved "https://registry.yarnpkg.com/@webrecorder/wombat/-/wombat-3.8.7.tgz#51c7465c589e0020be064121127c7c10a38ec21f" + integrity sha512-bW5V7cBweTkTazOIN8oZZGwHLevsGNv1luY3t0RYdEZhs5BDpTmUHN33zEbrXDOiPUlY3N3I8+73VA+PuxihoQ== dependencies: warcio "^2.4.0"