From eb973ba42d75c7df0fed4556671cbaa13403ed58 Mon Sep 17 00:00:00 2001 From: msramalho <19508417+msramalho@users.noreply.github.com> Date: Tue, 20 Feb 2024 19:31:19 +0000 Subject: [PATCH] v0.9.1 fixes to bad parsing in ssl certificates --- .../formatters/templates/html_template.html | 23 +++++++++++++------ src/auto_archiver/version.py | 2 +- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/auto_archiver/formatters/templates/html_template.html b/src/auto_archiver/formatters/templates/html_template.html index 3dbe7be..13ec15a 100644 --- a/src/auto_archiver/formatters/templates/html_template.html +++ b/src/auto_archiver/formatters/templates/html_template.html @@ -177,14 +177,23 @@ } async function run() { - await PreviewCertificates(); - await PreviewText(); - await enableCopyLogic(); - await enableCollapsibleLogic(); - await setupSafeView(); + let setupFunctions = [ + previewCertificates, + previewText, + enableCopyLogic, + enableCollapsibleLogic, + setupSafeView + ]; + setupFunctions.forEach(async f => { + try { + await f(); + } catch (e) { + console.error(`Error in ${f.name}: ${e}`); + } + }); } - async function PreviewCertificates() { + async function previewCertificates() { await Promise.all( Array.from(document.querySelectorAll(".pem-certificate")).map(async el => { let certificate = await (await fetch(el.getAttribute("pem"))).text(); @@ -202,7 +211,7 @@ console.log("certificate preview done"); } - async function PreviewText() { + async function previewText() { await Promise.all( Array.from(document.querySelectorAll(".text-preview")).map(async el => { let textContent = await (await fetch(el.getAttribute("url"))).text(); diff --git a/src/auto_archiver/version.py b/src/auto_archiver/version.py index 2cc14f6..2461f38 100644 --- a/src/auto_archiver/version.py +++ b/src/auto_archiver/version.py @@ -3,7 +3,7 @@ _MAJOR = "0" _MINOR = "9" # On main and in a nightly release the patch should be one ahead of the last # released build. -_PATCH = "0" +_PATCH = "1" # This is mainly for nightly builds which have the suffix ".dev$DATE". See # https://semver.org/#is-v123-a-semantic-version for the semantics. _SUFFIX = ""