From 79bae3cc962f5f1fa4571eba68c380188b76c0a5 Mon Sep 17 00:00:00 2001 From: Erlend Rushfeldt Date: Sat, 28 Nov 2026 20:28:20 +0100 Subject: [PATCH 1/4] feat(blog): strengthen site foundations Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/hugo-checks.yml | 30 ++++ archetypes/default.md | 2 +- config.toml | 3 +- .../Blogposts/Cost-Optmization-in-the-wild.md | 1 + .../Blogposts/azure-sql-allowallazureip.md | 2 +- .../cost-optimizing-azure-monitor.md | 2 +- .../Blogposts/deploymentscripts-in-bicep.md | 2 +- .../Blogposts/finding-orphaned-resources.md | 2 +- .../help-santa-secure-his-naughtylist.md | 2 +- content/Blogposts/intro-to-automanage.md | 2 +- content/Blogposts/new-asp-v4-ga.md | 2 +- .../query-Azure-policy-compliance.md | 2 +- ...santas-magic-cost-management-automation.md | 2 +- content/Blogposts/vm-operations-wo-rdp.md | 2 +- layouts/404.html | 6 + layouts/_default/baseof.html | 73 ++++++++++ scripts/check_site.py | 130 ++++++++++++++++++ scripts/test_check_site.py | 95 +++++++++++++ static/staticwebapp.config.json | 7 + 19 files changed, 355 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/hugo-checks.yml create mode 100644 layouts/404.html create mode 100644 layouts/_default/baseof.html create mode 100644 scripts/check_site.py create mode 100644 scripts/test_check_site.py create mode 100644 static/staticwebapp.config.json diff --git a/.github/workflows/hugo-checks.yml b/.github/workflows/hugo-checks.yml new file mode 100644 index 0000000..d6463ea --- /dev/null +++ b/.github/workflows/hugo-checks.yml @@ -0,0 +1,30 @@ +name: Hugo checks + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + env: + PYTHONDONTWRITEBYTECODE: '1' + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + with: + submodules: true + - uses: peaceiris/actions-hugo@d1c81a15d4e6dca7086a17b9c2565cb70fd576bf # v3 + with: + hugo-version: '0.150.0' + extended: true + - name: Test artifact checks + run: python3 -m unittest discover -s scripts -p 'test_*.py' + - name: Build site + run: hugo --minify --destination "$RUNNER_TEMP/hugo-site" + - name: Validate site artifact + run: python3 scripts/check_site.py "$RUNNER_TEMP/hugo-site" diff --git a/archetypes/default.md b/archetypes/default.md index 70085b9..76f1bfa 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,6 +1,6 @@ --- title: "{{ replace .TranslationBaseName '-' ' ' | title }}" -description: "" +description: "" # Add a concise description for search and social previews. date: "{{ .Date }}" categories: - "" diff --git a/config.toml b/config.toml index c35a1c9..be97cd0 100644 --- a/config.toml +++ b/config.toml @@ -1,4 +1,4 @@ -baseURL = '' +baseURL = 'https://www.errush.org/' languageCode = 'en-us' title = 'Erlend Rushfeldt - Blog' theme = 'mainroad' @@ -10,6 +10,7 @@ publishdir = "docs" avatar = "/img/Erlend-Rushfeldt-BW.jpg" [Params] + description = "Practical articles on Azure, cloud operations, automation, and cost optimization." opengraph = true # Enable OpenGraph if true schema = true # Enable Schema twitter_cards = true # Enable Twitter Cards if true diff --git a/content/Blogposts/Cost-Optmization-in-the-wild.md b/content/Blogposts/Cost-Optmization-in-the-wild.md index d216b5c..70495fb 100644 --- a/content/Blogposts/Cost-Optmization-in-the-wild.md +++ b/content/Blogposts/Cost-Optmization-in-the-wild.md @@ -1,6 +1,7 @@ --- title: "Cost Optmization in the Wild" description: "This is a blogpost where you find all code used in my presentation of Cost optimization in the wild." +summary: "Code snippets from the Cost Optimization in the Wild presentation, covering Azure Resource Graph and cloud cost optimization." date: "2023-06-12T22:27:19+02:00" categories: - "Azure" diff --git a/content/Blogposts/azure-sql-allowallazureip.md b/content/Blogposts/azure-sql-allowallazureip.md index b596209..3965f8d 100644 --- a/content/Blogposts/azure-sql-allowallazureip.md +++ b/content/Blogposts/azure-sql-allowallazureip.md @@ -1,6 +1,6 @@ --- title: "The SQL Server AllowAllAzureIps setting" -description: "" +description: "Investigate the AllowAllAzureIps setting and firewall rules for Azure SQL servers." date: "2022-04-27T09:08:39+02:00" categories: - "Azure" diff --git a/content/Blogposts/cost-optimizing-azure-monitor.md b/content/Blogposts/cost-optimizing-azure-monitor.md index f024ce4..25eb1d3 100644 --- a/content/Blogposts/cost-optimizing-azure-monitor.md +++ b/content/Blogposts/cost-optimizing-azure-monitor.md @@ -1,6 +1,6 @@ --- title: "Cost Optimizing Azure Monitor" -description: "" +description: "Explore ways to manage Azure Monitor and Log Analytics costs, including workspace design and log ingestion." date: "2025-03-03T10:30:21+01:00" categories: - "Azure" diff --git a/content/Blogposts/deploymentscripts-in-bicep.md b/content/Blogposts/deploymentscripts-in-bicep.md index 12ba08b..9677d50 100644 --- a/content/Blogposts/deploymentscripts-in-bicep.md +++ b/content/Blogposts/deploymentscripts-in-bicep.md @@ -1,6 +1,6 @@ --- title: "Run scripts on VMs after deployment with Bicep" -description: "" +description: "Use Run Command and Bicep to run configuration scripts on Azure virtual machines after deployment." date: "2022-08-04T12:34:42+02:00" categories: - "Azure" diff --git a/content/Blogposts/finding-orphaned-resources.md b/content/Blogposts/finding-orphaned-resources.md index e7ed089..4c4e02d 100644 --- a/content/Blogposts/finding-orphaned-resources.md +++ b/content/Blogposts/finding-orphaned-resources.md @@ -1,6 +1,6 @@ --- title: "Reduce your Azure cost by finding unused resources" -description: "" +description: "Find unused Azure resources with KQL to identify opportunities to reduce cloud waste." date: "2023-03-15T10:00:00+01:00" categories: - "Azure" diff --git a/content/Blogposts/help-santa-secure-his-naughtylist.md b/content/Blogposts/help-santa-secure-his-naughtylist.md index f215cf8..4a9e834 100644 --- a/content/Blogposts/help-santa-secure-his-naughtylist.md +++ b/content/Blogposts/help-santa-secure-his-naughtylist.md @@ -1,6 +1,6 @@ --- title: "Help Santa Secure His Naughty List" -description: "" +description: "Explore how to protect secrets in Bicep deployments with a festive example." date: "2022-12-23T00:00:00+01:00" categories: - "Azure" diff --git a/content/Blogposts/intro-to-automanage.md b/content/Blogposts/intro-to-automanage.md index bcc7cbc..0bfbebe 100644 --- a/content/Blogposts/intro-to-automanage.md +++ b/content/Blogposts/intro-to-automanage.md @@ -1,6 +1,6 @@ --- title: "Introduction to Automanage" -description: "" +description: "An introduction to Azure Automanage and configuring best practices for virtual machines." date: "2022-04-22T09:53:13+02:00" categories: - "Azure" diff --git a/content/Blogposts/new-asp-v4-ga.md b/content/Blogposts/new-asp-v4-ga.md index bace129..facff44 100644 --- a/content/Blogposts/new-asp-v4-ga.md +++ b/content/Blogposts/new-asp-v4-ga.md @@ -1,6 +1,6 @@ --- title: "New App Service Plan v4 SKUs go GA" -description: "" +description: "An overview of the generally available App Service Plan v4 SKUs and their capabilities." date: "2025-09-25T14:20:10+02:00" categories: - "Azure" diff --git a/content/Blogposts/query-Azure-policy-compliance.md b/content/Blogposts/query-Azure-policy-compliance.md index 80b3e39..cda71a7 100644 --- a/content/Blogposts/query-Azure-policy-compliance.md +++ b/content/Blogposts/query-Azure-policy-compliance.md @@ -1,6 +1,6 @@ --- title: "Query Azure Policy Compliance results using KQL" -description: "" +description: "Use KQL to explore Azure Policy compliance results and find more detail about resources." date: "2022-05-20T17:48:39+02:00" categories: - "Azure" diff --git a/content/Blogposts/santas-magic-cost-management-automation.md b/content/Blogposts/santas-magic-cost-management-automation.md index e94d4e8..62a289e 100644 --- a/content/Blogposts/santas-magic-cost-management-automation.md +++ b/content/Blogposts/santas-magic-cost-management-automation.md @@ -1,6 +1,6 @@ --- title: "Santa´s Magic Cost Management Automation" -description: "" +description: "A festive walkthrough of automating Azure cost management and budget actions." date: "2023-12-05T00:00:00+01:00" categories: - "Azure" diff --git a/content/Blogposts/vm-operations-wo-rdp.md b/content/Blogposts/vm-operations-wo-rdp.md index 11bbc6d..075fba7 100644 --- a/content/Blogposts/vm-operations-wo-rdp.md +++ b/content/Blogposts/vm-operations-wo-rdp.md @@ -1,6 +1,6 @@ --- title: "VM operations in Azure without RDP" -description: "" +description: "Explore ways to manage Azure virtual machines without connecting over Remote Desktop." date: "2022-01-11T10:36:34+01:00" categories: - "Azure" diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..c97e984 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,6 @@ +{{ define "main" }} +
+

Page not found

+

The page you requested could not be found. Return to the homepage.

+
+{{ end }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..50658bc --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,73 @@ +{{/* Adapted from Mainroad's GPL-2.0 base template to add canonical URLs. */}} + + + + + + {{ block "title" . }}{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}{{ end }} + + + + {{- if .Site.Params.opengraph }} + {{ template "_internal/opengraph.html" . }} + {{- end }} + {{- if .Site.Params.schema }} + {{ template "_internal/schema.html" . }} + {{- end }} + {{- if .Site.Params.twitter_cards }} + {{ template "_internal/twitter_cards.html" . }} + {{- end }} + + {{- $googleFontsLink := .Site.Params.googleFontsLink | default "https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700" }} + {{- if hasPrefix $googleFontsLink "https://fonts.googleapis.com/" }} + + + + + {{- end }} + + {{ $style := resources.Get "css/style.css" | resources.ExecuteAsTemplate "css/style.css" . -}} + + {{ range .Site.Params.customCSS -}} + + {{- end }} + + {{- with .OutputFormats.Get "rss" }} + {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} + {{- end }} + + + {{- $server := "" }} + {{- if gt (int (index (split hugo.Version ".") 1)) "120" }} + {{ $server = hugo.IsServer }} + {{- else }} + {{ $server = .Site.IsServer }} + {{- end -}} + {{- if not $server }} + {{ template "_internal/google_analytics.html" . }} + {{- end }} + + +
+ {{ block "header" . }}{{ partial "header.html" . }}{{ end }} +
+
+ {{ block "main" . }} + {{ with .Content }} +
+ {{ . }} +
+ {{ end }} + {{ end }} +
+ {{ block "sidebar" . }}{{ partial "sidebar.html" . }}{{ end }} +
+ {{ block "footer" . }}{{ partial "footer.html" . }}{{ end }} +
+ +{{ range .Site.Params.customJS -}} + +{{- end }} +{{- partial "mathjax.html" . -}} + + diff --git a/scripts/check_site.py b/scripts/check_site.py new file mode 100644 index 0000000..180baf9 --- /dev/null +++ b/scripts/check_site.py @@ -0,0 +1,130 @@ +#!/usr/bin/env python3 +"""Check the generated production site before it is deployed.""" + +import json +import sys +import xml.etree.ElementTree as ET +from html.parser import HTMLParser +from pathlib import Path +from urllib.parse import urlparse + + +ROOT = Path(__file__).resolve().parents[1] +BASE_URL = "https://www.errush.org/" +SITEMAP_NS = {"s": "http://www.sitemaps.org/schemas/sitemap/0.9"} + + +class Page(HTMLParser): + def __init__(self): + super().__init__(convert_charrefs=True) + self.meta = {} + self.canonical = None + self.local_assets = [] + self.article = None + self.articles = [] + + def handle_starttag(self, tag, attributes): + attrs = dict(attributes) + if tag == "meta": + key = attrs.get("name") or attrs.get("property") + if key: + self.meta[key] = attrs.get("content", "") + if tag == "link" and attrs.get("rel") == "canonical": + self.canonical = attrs.get("href") + if tag in ("img", "script", "link"): + url = attrs.get("src") or attrs.get("href", "") + if url.startswith("/") and not url.startswith("//"): + self.local_assets.append(urlparse(url).path) + if tag == "article": + self.article = {"links": [], "pre": False, "text": []} + elif self.article is not None: + if tag == "a": + self.article["links"].append(attrs.get("href", "")) + elif tag == "pre": + self.article["pre"] = True + + def handle_data(self, data): + if self.article is not None: + self.article["text"].append(data) + + def handle_endtag(self, tag): + if tag == "article" and self.article is not None: + self.articles.append(self.article) + self.article = None + + +def read_page(path): + page = Page() + page.feed(path.read_text(encoding="utf-8")) + return page + + +def check_urls(urls, label): + if not urls: + raise ValueError(f"{label} contains no URLs") + for url in urls: + if not url or not url.startswith(BASE_URL): + raise ValueError(f"{label} contains a non-production URL: {url!r}") + + +def validate_site(output): + home = read_page(output / "index.html") + if not home.meta.get("description", "").strip(): + raise ValueError("Homepage description is empty") + if home.meta.get("og:url") != BASE_URL: + raise ValueError("Homepage Open Graph URL is incorrect") + if home.canonical != BASE_URL: + raise ValueError("Homepage canonical URL is incorrect") + + for asset in home.local_assets: + if not (output / asset.lstrip("/")).is_file(): + raise ValueError(f"Homepage asset is missing: {asset}") + + for source in sorted((ROOT / "content" / "Blogposts").glob("*.md")): + slug = source.stem.lower() + article = read_page(output / "blogposts" / slug / "index.html") + if not article.meta.get("description", "").strip(): + raise ValueError(f"Article description is empty: {source.name}") + if article.meta.get("og:url") != f"{BASE_URL}blogposts/{slug}/": + raise ValueError(f"Article Open Graph URL is incorrect: {source.name}") + if article.canonical != f"{BASE_URL}blogposts/{slug}/": + raise ValueError(f"Article canonical URL is incorrect: {source.name}") + for asset in article.local_assets: + if not (output / asset.lstrip("/")).is_file(): + raise ValueError(f"Article asset is missing: {source.name}: {asset}") + + cards = [ + item for item in home.articles + if "/blogposts/cost-optmization-in-the-wild/" in item["links"] + ] + if len(cards) != 1 or cards[0]["pre"] or len(" ".join(cards[0]["text"])) > 1000: + raise ValueError("Cost optimization homepage card is missing or too long") + + sitemap = ET.parse(output / "sitemap.xml") + check_urls([node.text for node in sitemap.findall(".//s:loc", SITEMAP_NS)], "Sitemap") + rss = ET.parse(output / "index.xml") + check_urls([node.text for node in rss.findall("./channel/item/link")], "RSS") + check_urls([node.text for node in rss.findall("./channel/item/guid")], "RSS GUIDs") + + config = json.loads((output / "staticwebapp.config.json").read_text(encoding="utf-8")) + override = config.get("responseOverrides", {}).get("404", {}) + if override.get("rewrite") != "/404.html" or override.get("statusCode", 404) != 404: + raise ValueError("SWA configuration does not preserve the custom 404 response") + if "navigationFallback" in config: + raise ValueError("Unexpected navigation fallback could mask missing pages") + if "Page not found" not in (output / "404.html").read_text(encoding="utf-8"): + raise ValueError("Custom 404 page is missing") + + +def main(): + if len(sys.argv) != 2: + raise SystemExit("Usage: python3 scripts/check_site.py ") + try: + validate_site(Path(sys.argv[1])) + except (OSError, ValueError, ET.ParseError) as error: + raise SystemExit(f"Site validation failed: {error}") from error + print("Site artifact validation passed") + + +if __name__ == "__main__": + main() diff --git a/scripts/test_check_site.py b/scripts/test_check_site.py new file mode 100644 index 0000000..ae8f0f1 --- /dev/null +++ b/scripts/test_check_site.py @@ -0,0 +1,95 @@ +import json +import tempfile +import unittest +from pathlib import Path +from unittest.mock import patch + +from check_site import BASE_URL, Page, check_urls, validate_site + + +class SiteChecksTest(unittest.TestCase): + def test_urls_reject_relative_or_wrong_host(self): + check_urls([BASE_URL, BASE_URL + "blogposts/example/"], "Test") + for urls in ([], ["/blogposts/example/"], ["https://example.com/"]): + with self.subTest(urls=urls), self.assertRaises(ValueError): + check_urls(urls, "Test") + + def test_page_extracts_assets_and_code_from_article(self): + page = Page() + page.feed( + '' + '' + '' + '' + ) + self.assertEqual(page.meta["description"], "Example") + self.assertEqual(page.canonical, "https://www.errush.org/example/") + self.assertEqual(page.local_assets, ["/img/example.png"]) + self.assertEqual(page.articles[0]["links"], ["/blogposts/example/"]) + self.assertTrue(page.articles[0]["pre"]) + + +class ArtifactChecksTest(unittest.TestCase): + def setUp(self): + self.temporary = tempfile.TemporaryDirectory() + self.addCleanup(self.temporary.cleanup) + root = Path(self.temporary.name) + self.output = root / "output" + self.output.mkdir() + content = root / "content" / "Blogposts" + content.mkdir(parents=True) + (content / "example.md").write_text("", encoding="utf-8") + self.addCleanup(patch.stopall) + patch("check_site.ROOT", root).start() + (self.output / "index.html").write_text( + '' + f'' + f'' + '", + encoding="utf-8", + ) + article = self.output / "blogposts" / "example" + article.mkdir(parents=True) + (article / "index.html").write_text( + '' + f'' + f'', + encoding="utf-8", + ) + (self.output / "sitemap.xml").write_text( + '' + f"{BASE_URL}", + encoding="utf-8", + ) + (self.output / "index.xml").write_text( + f"{BASE_URL}" + f"{BASE_URL}", + encoding="utf-8", + ) + (self.output / "staticwebapp.config.json").write_text( + json.dumps({"responseOverrides": {"404": {"rewrite": "/404.html"}}}), + encoding="utf-8", + ) + (self.output / "404.html").write_text("Page not found", encoding="utf-8") + + def test_valid_artifact_passes(self): + validate_site(self.output) + + def test_missing_asset_fails(self): + with (self.output / "index.html").open("a", encoding="utf-8") as page: + page.write('') + with self.assertRaisesRegex(ValueError, "asset is missing"): + validate_site(self.output) + + def test_incorrect_404_status_fails(self): + (self.output / "staticwebapp.config.json").write_text( + json.dumps({"responseOverrides": {"404": {"rewrite": "/404.html", "statusCode": 200}}}), + encoding="utf-8", + ) + with self.assertRaisesRegex(ValueError, "404 response"): + validate_site(self.output) + + +if __name__ == "__main__": + unittest.main() diff --git a/static/staticwebapp.config.json b/static/staticwebapp.config.json new file mode 100644 index 0000000..b3e4a85 --- /dev/null +++ b/static/staticwebapp.config.json @@ -0,0 +1,7 @@ +{ + "responseOverrides": { + "404": { + "rewrite": "/404.html" + } + } +} From b55ffb9f088f637fe28968d7719c6f57a7396014 Mon Sep 17 00:00:00 2001 From: Erlend Rushfeldt Date: Sat, 28 Nov 2026 20:43:48 +0100 Subject: [PATCH 2/4] feat(blog): adopt PaperMod theme Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/hugo-checks.yml | 2 +- .gitmodules | 6 +-- assets/css/extended/custom.css | 16 +++++++ config.toml | 68 +++++++++++---------------- content/_index.md | 5 ++ layouts/404.html | 4 +- layouts/_default/baseof.html | 73 ----------------------------- layouts/_partials/cover.html | 65 +++++++++++++++++++++++++ layouts/_partials/extend_head.html | 3 ++ layouts/single.html | 68 +++++++++++++++++++++++++++ scripts/check_site.py | 9 +++- scripts/test_check_site.py | 29 ++++++++++++ static/apple-touch-icon.png | Bin 0 -> 111 bytes static/favicon.ico | Bin 0 -> 1350 bytes themes/mainroad | 1 - themes/papermod | 1 + 16 files changed, 228 insertions(+), 122 deletions(-) create mode 100644 assets/css/extended/custom.css create mode 100644 content/_index.md delete mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_partials/cover.html create mode 100644 layouts/_partials/extend_head.html create mode 100644 layouts/single.html create mode 100644 static/apple-touch-icon.png create mode 100644 static/favicon.ico delete mode 160000 themes/mainroad create mode 160000 themes/papermod diff --git a/.github/workflows/hugo-checks.yml b/.github/workflows/hugo-checks.yml index d6463ea..93d1b0b 100644 --- a/.github/workflows/hugo-checks.yml +++ b/.github/workflows/hugo-checks.yml @@ -20,7 +20,7 @@ jobs: submodules: true - uses: peaceiris/actions-hugo@d1c81a15d4e6dca7086a17b9c2565cb70fd576bf # v3 with: - hugo-version: '0.150.0' + hugo-version: '0.169.0' extended: true - name: Test artifact checks run: python3 -m unittest discover -s scripts -p 'test_*.py' diff --git a/.gitmodules b/.gitmodules index 6f713c0..ec029ed 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,9 +2,9 @@ path = themes/congo url = https://github.com/jpanther/congo.git branch = stable -[submodule "themes/mainroad"] - path = themes/mainroad - url = https://github.com/vimux/mainroad [submodule "themes/-force"] path = themes/-force url = https://github.com/vimux/mainroad +[submodule "themes/papermod"] + path = themes/papermod + url = https://github.com/adityatelange/hugo-PaperMod.git diff --git a/assets/css/extended/custom.css b/assets/css/extended/custom.css new file mode 100644 index 0000000..0ab0753 --- /dev/null +++ b/assets/css/extended/custom.css @@ -0,0 +1,16 @@ +.post-entry .entry-cover img { + max-height: 150px; + width: auto; + max-width: 100%; + object-fit: contain; +} + +.post-content pre { overflow-x: auto; } +a:focus-visible, button:focus-visible { + outline: 3px solid var(--primary); + outline-offset: 3px; +} + +@media (prefers-reduced-motion: reduce) { + *, *::before, *::after { scroll-behavior: auto !important; } +} diff --git a/config.toml b/config.toml index be97cd0..dabd58e 100644 --- a/config.toml +++ b/config.toml @@ -1,48 +1,34 @@ baseURL = 'https://www.errush.org/' -languageCode = 'en-us' +locale = 'en-US' title = 'Erlend Rushfeldt - Blog' -theme = 'mainroad' -publishdir = "docs" +theme = 'papermod' +publishDir = 'docs' -[Params.Author] # Used in authorbox - name = "Erlend Rushfeldt" - bio = "Erlend is a Cloud Advisor at Atea in Norway who has a passion for technology and learning. Join him on his journey exploring the cloud!" - avatar = "/img/Erlend-Rushfeldt-BW.jpg" +[params] + author = 'Erlend Rushfeldt' + description = 'Practical articles on Azure, cloud operations, automation, and cost optimization.' + mainSections = ['post', 'blog', 'news'] + defaultTheme = 'auto' + disableSpecial1stPost = true + ShowReadingTime = true + DateFormat = '02-01-2006' + mathjax = true + mathjaxPath = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js' + mathjaxConfig = 'TeX-AMS-MML_HTMLorMML' -[Params] - description = "Practical articles on Azure, cloud operations, automation, and cost optimization." - opengraph = true # Enable OpenGraph if true - schema = true # Enable Schema - twitter_cards = true # Enable Twitter Cards if true - readmore = false # Show "Read more" button in list if true - authorbox = false # Show authorbox at bottom of pages if true - toc = false # Enable Table of Contents - pager = true # Show pager navigation (prev/next links) at the bottom of pages if true - post_meta = ["author", "date", "categories", "translations"] # Order of post meta information - mainSections = ["post", "blog", "news"] # Specify section pages to show on home page and the "Recent articles" widget - dateformat = "02-01-2006" # Change the format of dates - mathjax = true # Enable MathJax - mathjaxPath = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js" # Specify MathJax path - mathjaxConfig = "TeX-AMS-MML_HTMLorMML" # Specify MathJax config - googleFontsLink = "https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700" # Load Google Fonts +[params.assets] + favicon16x16 = '/apple-touch-icon.png' + favicon32x32 = '/apple-touch-icon.png' -[Params.thumbnail] - visibility = ["list", "post"] # Control thumbnail visibility +[params.social] + twitter = '@ErlendRushfeldt' -[Params.sidebar] - home = "right" # Configure layout for home page - list = "left" # Configure layout for list pages - single = false # Configure layout for single pages - # Enable widgets in given order - widgets = ["recent", "categories", "taglist", "social"] +[[menu.main]] + name = 'Articles' + url = '/blogposts/' + weight = -20 -[Params.widgets] - recent_num = 5 # Set the number of articles in the "Recent articles" widget - categories_counter = false # Enable counter for each category in "Categories" widget - tags_counter = false # Enable counter for each tag in "Tags" widget - -[Params.widgets.social] - # Enable parts of social widget - twitter = "@ErlendRushfeldt" - linkedin = "erlend-rushfeldt-b0a92a159" - github = "Fr3xzy" +[[menu.main]] + name = 'Topics' + url = '/tags/' + weight = -10 diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..eaca080 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,5 @@ +--- +--- +Practical articles on Azure, cloud operations, automation, and cost optimization. I'm Erlend, a cloud advisor sharing what I learn. + +[GitHub](https://github.com/Fr3xzy) · [LinkedIn](https://www.linkedin.com/in/erlend-rushfeldt-b0a92a159/) · [X](https://twitter.com/ErlendRushfeldt) diff --git a/layouts/404.html b/layouts/404.html index c97e984..b754a40 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -1,6 +1,6 @@ {{ define "main" }} -
+

Page not found

The page you requested could not be found. Return to the homepage.

-
+ {{ end }} diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html deleted file mode 100644 index 50658bc..0000000 --- a/layouts/_default/baseof.html +++ /dev/null @@ -1,73 +0,0 @@ -{{/* Adapted from Mainroad's GPL-2.0 base template to add canonical URLs. */}} - - - - - - {{ block "title" . }}{{ if not .IsHome }}{{ .Title }} - {{ end }}{{ .Site.Title }}{{ end }} - - - - {{- if .Site.Params.opengraph }} - {{ template "_internal/opengraph.html" . }} - {{- end }} - {{- if .Site.Params.schema }} - {{ template "_internal/schema.html" . }} - {{- end }} - {{- if .Site.Params.twitter_cards }} - {{ template "_internal/twitter_cards.html" . }} - {{- end }} - - {{- $googleFontsLink := .Site.Params.googleFontsLink | default "https://fonts.googleapis.com/css?family=Open+Sans:400,400i,700" }} - {{- if hasPrefix $googleFontsLink "https://fonts.googleapis.com/" }} - - - - - {{- end }} - - {{ $style := resources.Get "css/style.css" | resources.ExecuteAsTemplate "css/style.css" . -}} - - {{ range .Site.Params.customCSS -}} - - {{- end }} - - {{- with .OutputFormats.Get "rss" }} - {{ printf `` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }} - {{- end }} - - - {{- $server := "" }} - {{- if gt (int (index (split hugo.Version ".") 1)) "120" }} - {{ $server = hugo.IsServer }} - {{- else }} - {{ $server = .Site.IsServer }} - {{- end -}} - {{- if not $server }} - {{ template "_internal/google_analytics.html" . }} - {{- end }} - - -
- {{ block "header" . }}{{ partial "header.html" . }}{{ end }} -
-
- {{ block "main" . }} - {{ with .Content }} -
- {{ . }} -
- {{ end }} - {{ end }} -
- {{ block "sidebar" . }}{{ partial "sidebar.html" . }}{{ end }} -
- {{ block "footer" . }}{{ partial "footer.html" . }}{{ end }} -
- -{{ range .Site.Params.customJS -}} - -{{- end }} -{{- partial "mathjax.html" . -}} - - diff --git a/layouts/_partials/cover.html b/layouts/_partials/cover.html new file mode 100644 index 0000000..7c37822 --- /dev/null +++ b/layouts/_partials/cover.html @@ -0,0 +1,65 @@ +{{- /* Preserve legacy Mainroad thumbnails alongside PaperMod cover settings. */ -}} +{{- with .cxt}} {{/* Apply proper context from dict */}} +{{- $image := .Params.cover.image | default .Params.thumbnail }} +{{- if (and $image (not $.isHidden)) }} +
+ {{- $loading := cond $.IsSingle "eager" "lazy" }} + {{- $addLink := (and site.Params.cover.linkFullImages $.IsSingle) }} + {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} + {{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }} + {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }} + + {{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" $image) }} + {{- if not $cover }} + {{- $cover = (resources.ByType "image").GetMatch (printf "*%s*" $image) }} + {{- end }} + {{- /* We are not using the .Param.cover.relative to decide the location of image */}} + {{- /* If we have the image in pageBundle or globalResources we can process the image */}} + + {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} + {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif" "webp") -}} + + {{- $imgdl := $image | absURL }} + {{- if $cover -}} + {{- $imgdl = $cover.Permalink }} + {{- end -}} + + {{- if $addLink }} + + {{- end }} + + {{- if $cover -}} + {{/* i.e it is present in page bundle */}} + {{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }} + {{ $alt }} + {{- else }}{{/* Unprocessable image or responsive images disabled */}} + {{ $alt }} + {{- end }} + {{- else }} + {{- /* For absolute urls and external links, no img processing here */}} + {{ $alt }} + {{- end }} + + {{- if $addLink }} + + {{- end -}} + + {{- /* Display Caption */}} + {{- if $.IsSingle }} + {{ with .Params.cover.caption -}} +
{{ . | markdownify }}
+ {{- end }} + {{- end }} +
+{{- end }}{{/* End image */}} +{{- end -}}{{/* End context */ -}} diff --git a/layouts/_partials/extend_head.html b/layouts/_partials/extend_head.html new file mode 100644 index 0000000..cfde30d --- /dev/null +++ b/layouts/_partials/extend_head.html @@ -0,0 +1,3 @@ +{{- if and .IsPage (eq (.Param "mathjax") true) }} + +{{- end }} diff --git a/layouts/single.html b/layouts/single.html new file mode 100644 index 0000000..b85ed86 --- /dev/null +++ b/layouts/single.html @@ -0,0 +1,68 @@ +{{- /* Preserve legacy Mainroad lead and toc front matter. */ -}} +{{- define "main" }} + +
+
+ {{ partial "breadcrumbs.html" . }} +

+ {{ .Title }} + {{- if .Draft }} + + + + + + {{- end }} +

+ {{- with (.Params.lead | default .Description) }} +
+ {{ . }} +
+ {{- end }} + {{- if not (.Param "hideMeta") }} + + {{- end }} +
+ {{- $isHidden := (.Param "cover.hiddenInSingle") | default (.Param "cover.hidden") | default false }} + {{- partial "cover.html" (dict "cxt" . "IsSingle" true "isHidden" $isHidden) }} + {{- if or (.Param "ShowToc") .Params.toc }} + {{- partial "toc.html" . }} + {{- end }} + + {{- if .Content }} +
+ {{- if not (.Param "disableAnchoredHeadings") }} + {{- partial "anchored_headings.html" .Content -}} + {{- else }}{{ .Content }}{{ end }} +
+ {{- end }} + + {{- partial "extend_post_content.html" . }} + +
+ {{- $tags := .Language.Params.Taxonomies.tag | default "tags" }} + + {{- if (.Param "ShowPostNavLinks") }} + {{- partial "post_nav_links.html" . }} + {{- end }} + {{- if (and site.Params.ShowShareButtons (ne .Params.disableShare true)) }} + {{- partial "share_icons.html" . -}} + {{- end }} +
+ + {{- if (.Param "comments") }} + {{- partial "comments.html" . }} + {{- end }} +
+ +{{- end }}{{/* end main */}} diff --git a/scripts/check_site.py b/scripts/check_site.py index 180baf9..d75d456 100644 --- a/scripts/check_site.py +++ b/scripts/check_site.py @@ -35,6 +35,10 @@ def handle_starttag(self, tag, attributes): url = attrs.get("src") or attrs.get("href", "") if url.startswith("/") and not url.startswith("//"): self.local_assets.append(urlparse(url).path) + elif url.startswith(BASE_URL) and ( + tag != "link" or set(attrs.get("rel", "").split()) & {"stylesheet", "icon"} + ): + self.local_assets.append(urlparse(url).path) if tag == "article": self.article = {"links": [], "pre": False, "text": []} elif self.article is not None: @@ -95,7 +99,10 @@ def validate_site(output): cards = [ item for item in home.articles - if "/blogposts/cost-optmization-in-the-wild/" in item["links"] + if any(link in { + "/blogposts/cost-optmization-in-the-wild/", + BASE_URL + "blogposts/cost-optmization-in-the-wild/", + } for link in item["links"]) ] if len(cards) != 1 or cards[0]["pre"] or len(" ".join(cards[0]["text"])) > 1000: raise ValueError("Cost optimization homepage card is missing or too long") diff --git a/scripts/test_check_site.py b/scripts/test_check_site.py index ae8f0f1..5af600c 100644 --- a/scripts/test_check_site.py +++ b/scripts/test_check_site.py @@ -82,6 +82,35 @@ def test_missing_asset_fails(self): with self.assertRaisesRegex(ValueError, "asset is missing"): validate_site(self.output) + def test_absolute_production_card_link_passes(self): + index = self.output / "index.html" + index.write_text( + index.read_text(encoding="utf-8").replace( + 'href="/blogposts/cost-optmization-in-the-wild/"', + f'href="{BASE_URL}blogposts/cost-optmization-in-the-wild/"', + ), + encoding="utf-8", + ) + validate_site(self.output) + + def test_absolute_external_card_link_fails(self): + index = self.output / "index.html" + index.write_text( + index.read_text(encoding="utf-8").replace( + 'href="/blogposts/cost-optmization-in-the-wild/"', + 'href="https://example.com/blogposts/cost-optmization-in-the-wild/"', + ), + encoding="utf-8", + ) + with self.assertRaisesRegex(ValueError, "homepage card"): + validate_site(self.output) + + def test_missing_absolute_production_asset_fails(self): + with (self.output / "index.html").open("a", encoding="utf-8") as page: + page.write(f'') + with self.assertRaisesRegex(ValueError, "asset is missing"): + validate_site(self.output) + def test_incorrect_404_status_fails(self): (self.output / "staticwebapp.config.json").write_text( json.dumps({"responseOverrides": {"404": {"rewrite": "/404.html", "statusCode": 200}}}), diff --git a/static/apple-touch-icon.png b/static/apple-touch-icon.png new file mode 100644 index 0000000000000000000000000000000000000000..441def4c1f7f2303c839169041152adba069c517 GIT binary patch literal 111 zcmeAS@N?(olHy`uVBq!ia0vp^TR@nR8A!4-PbmaaYymzYu3B1Jk8}-QTX((%il}(H zIEGX(zCEGH$iTqCZ18LOQbrMn2YF^YnHU%pvi;uf{r{h7k-Pk#inrZiK=llsu6{1- HoD!MM+d0k1&U)3Ae}}xca%RG0z)YT0OQqIBme*a literal 0 HcmV?d00001 diff --git a/themes/mainroad b/themes/mainroad deleted file mode 160000 index 13e04b3..0000000 --- a/themes/mainroad +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 13e04b3694ea2d20a68cfbfaea42a8c565079809 diff --git a/themes/papermod b/themes/papermod new file mode 160000 index 0000000..1181196 --- /dev/null +++ b/themes/papermod @@ -0,0 +1 @@ +Subproject commit 118119693d8b5ac211b939775678310973bcb232 From 8fe2f7ae6980ac9bf8ab035af4fe4de2841bea28 Mon Sep 17 00:00:00 2001 From: Erlend Rushfeldt Date: Sat, 28 Nov 2026 21:01:06 +0100 Subject: [PATCH 3/4] feat(blog): improve speed and discovery Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- assets/js/fastsearch.js | 70 +++++++++++++++++++ config.toml | 35 +++++++++- .../Blogposts/Cost-Optmization-in-the-wild.md | 1 - .../Blogposts/azure-sql-allowallazureip.md | 1 - content/Blogposts/azurebacktoschool23.md | 1 - .../azurefw-aadconnectruleset-bicep.md | 1 - .../cost-optimizing-azure-monitor.md | 1 - .../Blogposts/deploymentscripts-in-bicep.md | 1 - .../Blogposts/finding-orphaned-resources.md | 1 - .../help-santa-secure-his-naughtylist.md | 1 - content/Blogposts/intro-to-automanage.md | 1 - .../log-analytics-agent-deprecation.md | 1 - content/Blogposts/new-asp-v4-ga.md | 1 - .../query-Azure-policy-compliance.md | 1 - content/Blogposts/run-command.md | 1 - ...santas-magic-cost-management-automation.md | 1 - .../update-management-with-azureautomation.md | 1 - content/about.md | 1 - content/search.md | 5 ++ content/speaking.md | 1 - layouts/_markup/render-image.html | 37 ++++++++++ layouts/_partials/cover.html | 31 ++++---- layouts/search.html | 9 +++ scripts/check_site.py | 31 ++++++++ scripts/test_check_site.py | 50 ++++++++++++- static/staticwebapp.config.json | 3 + 26 files changed, 254 insertions(+), 34 deletions(-) create mode 100644 assets/js/fastsearch.js create mode 100644 content/search.md create mode 100644 layouts/_markup/render-image.html create mode 100644 layouts/search.html diff --git a/assets/js/fastsearch.js b/assets/js/fastsearch.js new file mode 100644 index 0000000..4a9f47b --- /dev/null +++ b/assets/js/fastsearch.js @@ -0,0 +1,70 @@ +import * as params from '@params'; + +const input = document.getElementById('searchInput'); +const results = document.getElementById('searchResults'); +const status = document.getElementById('searchStatus'); +let fuse; +let timer; + +async function initialize() { + try { + const response = await fetch('../index.json'); + if (!response.ok) throw new Error(`Search index returned ${response.status}`); + const data = await response.json(); + if (!Array.isArray(data)) throw new Error('Invalid search index'); + fuse = new Fuse(data, { + distance: 100, + threshold: 0.4, + ignoreLocation: true, + keys: ['title', 'permalink', 'summary', 'content'], + ...params.fuseOpts + }); + input.disabled = false; + status.textContent = 'Search is ready.'; + } catch (error) { + console.error('Search unavailable:', error); + status.textContent = 'Search is unavailable. Please try again later or browse the articles.'; + } +} + +input.addEventListener('input', () => { + clearTimeout(timer); + timer = setTimeout(() => { + const query = input.value.trim(); + results.replaceChildren(); + if (!query) { + status.textContent = 'Search is ready.'; + return; + } + const matches = fuse.search(query); + for (const { item } of matches) { + const li = document.createElement('li'); + const link = document.createElement('a'); + link.href = item.permalink; + link.textContent = item.title; + li.appendChild(link); + results.appendChild(li); + } + status.textContent = matches.length ? `${matches.length} results found.` : 'No results found.'; + }, 150); +}); + +document.getElementById('searchbox').addEventListener('keydown', (event) => { + const links = [...results.querySelectorAll('a')]; + const index = links.indexOf(document.activeElement); + if (event.key === 'ArrowDown' && links.length) { + event.preventDefault(); + (links[index + 1] || links[links.length - 1]).focus(); + } else if (event.key === 'ArrowUp' && index >= 0) { + event.preventDefault(); + (links[index - 1] || input).focus(); + } else if (event.key === 'Escape') { + clearTimeout(timer); + input.value = ''; + results.replaceChildren(); + status.textContent = fuse ? 'Search is ready.' : status.textContent; + if (!input.disabled) input.focus(); + } +}); + +initialize(); diff --git a/config.toml b/config.toml index dabd58e..623010a 100644 --- a/config.toml +++ b/config.toml @@ -12,7 +12,7 @@ publishDir = 'docs' disableSpecial1stPost = true ShowReadingTime = true DateFormat = '02-01-2006' - mathjax = true + mathjax = false mathjaxPath = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.6/MathJax.js' mathjaxConfig = 'TeX-AMS-MML_HTMLorMML' @@ -32,3 +32,36 @@ publishDir = 'docs' name = 'Topics' url = '/tags/' weight = -10 + +[[menu.main]] + name = 'Search' + url = '/search/' + weight = 0 + +[outputs] + home = ['HTML', 'RSS', 'JSON'] + +[[module.mounts]] + source = 'content' + target = 'content' +[[module.mounts]] + source = 'static' + target = 'static' +[[module.mounts]] + source = 'layouts' + target = 'layouts' +[[module.mounts]] + source = 'data' + target = 'data' +[[module.mounts]] + source = 'assets' + target = 'assets' +[[module.mounts]] + source = 'i18n' + target = 'i18n' +[[module.mounts]] + source = 'archetypes' + target = 'archetypes' +[[module.mounts]] + source = 'static/img' + target = 'assets/legacy-img' diff --git a/content/Blogposts/Cost-Optmization-in-the-wild.md b/content/Blogposts/Cost-Optmization-in-the-wild.md index 70495fb..b8068ce 100644 --- a/content/Blogposts/Cost-Optmization-in-the-wild.md +++ b/content/Blogposts/Cost-Optmization-in-the-wild.md @@ -21,7 +21,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/azure-sql-allowallazureip.md b/content/Blogposts/azure-sql-allowallazureip.md index 3965f8d..ec9cc46 100644 --- a/content/Blogposts/azure-sql-allowallazureip.md +++ b/content/Blogposts/azure-sql-allowallazureip.md @@ -21,7 +21,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/azurebacktoschool23.md b/content/Blogposts/azurebacktoschool23.md index 55b2a02..2b9ad11 100644 --- a/content/Blogposts/azurebacktoschool23.md +++ b/content/Blogposts/azurebacktoschool23.md @@ -18,7 +18,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/azurefw-aadconnectruleset-bicep.md b/content/Blogposts/azurefw-aadconnectruleset-bicep.md index 8ba5d18..8a35c18 100644 --- a/content/Blogposts/azurefw-aadconnectruleset-bicep.md +++ b/content/Blogposts/azurefw-aadconnectruleset-bicep.md @@ -19,7 +19,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/cost-optimizing-azure-monitor.md b/content/Blogposts/cost-optimizing-azure-monitor.md index 25eb1d3..f6499f1 100644 --- a/content/Blogposts/cost-optimizing-azure-monitor.md +++ b/content/Blogposts/cost-optimizing-azure-monitor.md @@ -20,7 +20,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/deploymentscripts-in-bicep.md b/content/Blogposts/deploymentscripts-in-bicep.md index 9677d50..1ae1b50 100644 --- a/content/Blogposts/deploymentscripts-in-bicep.md +++ b/content/Blogposts/deploymentscripts-in-bicep.md @@ -19,7 +19,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/finding-orphaned-resources.md b/content/Blogposts/finding-orphaned-resources.md index 4c4e02d..d8e6764 100644 --- a/content/Blogposts/finding-orphaned-resources.md +++ b/content/Blogposts/finding-orphaned-resources.md @@ -19,7 +19,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/help-santa-secure-his-naughtylist.md b/content/Blogposts/help-santa-secure-his-naughtylist.md index 4a9e834..31e2fab 100644 --- a/content/Blogposts/help-santa-secure-his-naughtylist.md +++ b/content/Blogposts/help-santa-secure-his-naughtylist.md @@ -20,7 +20,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/intro-to-automanage.md b/content/Blogposts/intro-to-automanage.md index 0bfbebe..6fdbd1a 100644 --- a/content/Blogposts/intro-to-automanage.md +++ b/content/Blogposts/intro-to-automanage.md @@ -18,7 +18,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/log-analytics-agent-deprecation.md b/content/Blogposts/log-analytics-agent-deprecation.md index 3198453..c219cb0 100644 --- a/content/Blogposts/log-analytics-agent-deprecation.md +++ b/content/Blogposts/log-analytics-agent-deprecation.md @@ -19,7 +19,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/new-asp-v4-ga.md b/content/Blogposts/new-asp-v4-ga.md index facff44..7067c1e 100644 --- a/content/Blogposts/new-asp-v4-ga.md +++ b/content/Blogposts/new-asp-v4-ga.md @@ -18,7 +18,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/query-Azure-policy-compliance.md b/content/Blogposts/query-Azure-policy-compliance.md index cda71a7..735d5b4 100644 --- a/content/Blogposts/query-Azure-policy-compliance.md +++ b/content/Blogposts/query-Azure-policy-compliance.md @@ -19,7 +19,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/run-command.md b/content/Blogposts/run-command.md index 63ae43c..99ca6d3 100644 --- a/content/Blogposts/run-command.md +++ b/content/Blogposts/run-command.md @@ -19,7 +19,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/santas-magic-cost-management-automation.md b/content/Blogposts/santas-magic-cost-management-automation.md index 62a289e..dbc8e14 100644 --- a/content/Blogposts/santas-magic-cost-management-automation.md +++ b/content/Blogposts/santas-magic-cost-management-automation.md @@ -19,7 +19,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/Blogposts/update-management-with-azureautomation.md b/content/Blogposts/update-management-with-azureautomation.md index ddcf13f..6769a25 100644 --- a/content/Blogposts/update-management-with-azureautomation.md +++ b/content/Blogposts/update-management-with-azureautomation.md @@ -19,7 +19,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/about.md b/content/about.md index 97f9fec..1faf6c0 100644 --- a/content/about.md +++ b/content/about.md @@ -14,7 +14,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: true # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/content/search.md b/content/search.md new file mode 100644 index 0000000..53361a2 --- /dev/null +++ b/content/search.md @@ -0,0 +1,5 @@ +--- +title: Search +layout: search +url: /search/ +--- diff --git a/content/speaking.md b/content/speaking.md index 4f1b7e8..5df70d3 100644 --- a/content/speaking.md +++ b/content/speaking.md @@ -16,7 +16,6 @@ comments: false # Enable Disqus comments for specific page authorbox: false # Enable authorbox for specific page pager: false # Enable pager navigation (prev/next) for specific page toc: false # Enable Table of Contents for specific page -mathjax: true # Enable MathJax for specific page sidebar: "right" # Enable sidebar (on the right side) per page widgets: # Enable sidebar widgets in given order per page - "recent" diff --git a/layouts/_markup/render-image.html b/layouts/_markup/render-image.html new file mode 100644 index 0000000..b8e4e25 --- /dev/null +++ b/layouts/_markup/render-image.html @@ -0,0 +1,37 @@ +{{- $u := urls.Parse .Destination -}} +{{- $src := $u.String -}} +{{- $image := false -}} +{{- if and (not $u.IsAbs) (strings.HasPrefix $u.Path "/img/") (not $u.RawQuery) (not $u.Fragment) -}} + {{- $image = resources.Get (printf "legacy-img/%s" (strings.TrimPrefix "/img/" $u.Path)) -}} +{{- else if not $u.IsAbs -}} + {{- $path := strings.TrimPrefix "./" $u.Path -}} + {{- with or (.PageInner.Resources.Get $path) (resources.Get $path) -}} + {{- $src = .RelPermalink -}} + {{- with $u.RawQuery }}{{- $src = printf "%s?%s" $src . }}{{- end -}} + {{- with $u.Fragment }}{{- $src = printf "%s#%s" $src . }}{{- end -}} + {{- end -}} +{{- end -}} +{{- $attributes := merge .Attributes (dict "alt" .Text "src" $src "title" (.Title | transform.HTMLEscape) "loading" "lazy") -}} +{{- $responsive := false -}} +{{- $processable := and $image (in (slice "png" "jpg" "jpeg" "webp") $image.MediaType.SubType) -}} +{{- if and $processable (gt $image.Width 360) (hugo.IsProduction) -}} + {{- $full := $image.Resize (printf "%dx webp q100" $image.Width) -}} + {{- $responsive = lt (len $full.Content) (len $image.Content) -}} +{{- end -}} +{{- if and $processable (gt $image.Width 0) (gt $image.Height 0) -}} + {{- $attributes = merge $attributes (dict "width" (printf "%d" $image.Width) "height" (printf "%d" $image.Height)) -}} +{{- end -}} +{{- if $responsive -}} + +{{- end -}} + +{{- if $responsive -}}{{- end -}} diff --git a/layouts/_partials/cover.html b/layouts/_partials/cover.html index 7c37822..2edb4cd 100644 --- a/layouts/_partials/cover.html +++ b/layouts/_partials/cover.html @@ -3,7 +3,8 @@ {{- $image := .Params.cover.image | default .Params.thumbnail }} {{- if (and $image (not $.isHidden)) }}
- {{- $loading := cond $.IsSingle "eager" "lazy" }} + {{- $latest := first 1 (where site.RegularPages "Type" "in" site.Params.mainSections) }} + {{- $loading := cond (or $.IsSingle (and $latest (eq .RelPermalink (index $latest 0).RelPermalink))) "eager" "lazy" }} {{- $addLink := (and site.Params.cover.linkFullImages $.IsSingle) }} {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} {{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }} @@ -13,37 +14,41 @@ {{- if not $cover }} {{- $cover = (resources.ByType "image").GetMatch (printf "*%s*" $image) }} {{- end }} + {{- if and (not $cover) (strings.HasPrefix (strings.TrimPrefix "/" $image) "img/") }} + {{- $cover = resources.Get (printf "legacy-img/%s" (strings.TrimPrefix "img/" (strings.TrimPrefix "/" $image))) }} + {{- end }} {{- /* We are not using the .Param.cover.relative to decide the location of image */}} {{- /* If we have the image in pageBundle or globalResources we can process the image */}} {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} - {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif" "webp") -}} + {{- $processableFormats := (slice "jpg" "jpeg" "png" "webp") -}} {{- $imgdl := $image | absURL }} - {{- if $cover -}} + {{- if and $cover (not (strings.HasPrefix (strings.TrimPrefix "/" $image) "img/")) }} {{- $imgdl = $cover.Permalink }} - {{- end -}} - + {{- end }} {{- if $addLink }} {{- end }} {{- if $cover -}} {{/* i.e it is present in page bundle */}} - {{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }} - + + {{ $alt }} + {{- else }}{{/* Unprocessable image or responsive images disabled */}} - {{ $alt }} + {{ $alt }} {{- end }} {{- else }} {{- /* For absolute urls and external links, no img processing here */}} diff --git a/layouts/search.html b/layouts/search.html new file mode 100644 index 0000000..632103b --- /dev/null +++ b/layouts/search.html @@ -0,0 +1,9 @@ +{{- define "main" }} + + +{{- end }} diff --git a/scripts/check_site.py b/scripts/check_site.py index d75d456..4ef1c57 100644 --- a/scripts/check_site.py +++ b/scripts/check_site.py @@ -25,6 +25,12 @@ def __init__(self): def handle_starttag(self, tag, attributes): attrs = dict(attributes) + if tag == "img": + for dimension in ("width", "height"): + if dimension in attrs: + value = attrs[dimension] or "" + if not value.isascii() or not value.isdigit() or int(value) <= 0: + raise ValueError(f"Invalid image {dimension}: {value!r}") if tag == "meta": key = attrs.get("name") or attrs.get("property") if key: @@ -39,6 +45,11 @@ def handle_starttag(self, tag, attributes): tag != "link" or set(attrs.get("rel", "").split()) & {"stylesheet", "icon"} ): self.local_assets.append(urlparse(url).path) + if tag == "source": + for candidate in attrs.get("srcset", "").split(","): + url = candidate.strip().split(" ")[0] + if url.startswith("/") and not url.startswith("//"): + self.local_assets.append(urlparse(url).path) if tag == "article": self.article = {"links": [], "pre": False, "text": []} elif self.article is not None: @@ -71,6 +82,14 @@ def check_urls(urls, label): raise ValueError(f"{label} contains a non-production URL: {url!r}") +def check_cache_config(config): + headers = config.get("globalHeaders", {}) + if headers.get("Cache-Control") != "public, max-age=0, must-revalidate": + raise ValueError("SWA cache policy must revalidate mutable content") + if config.get("routes"): + raise ValueError("Unexpected SWA routes may override the cache policy") + + def validate_site(output): home = read_page(output / "index.html") if not home.meta.get("description", "").strip(): @@ -84,8 +103,15 @@ def validate_site(output): if not (output / asset.lstrip("/")).is_file(): raise ValueError(f"Homepage asset is missing: {asset}") + search_index = json.loads((output / "index.json").read_text(encoding="utf-8")) + if not isinstance(search_index, list): + raise ValueError("Search index is not a list") + index_urls = [item["permalink"] for item in search_index] + check_urls(index_urls, "Search index") for source in sorted((ROOT / "content" / "Blogposts").glob("*.md")): slug = source.stem.lower() + if f"{BASE_URL}blogposts/{slug}/" not in index_urls: + raise ValueError(f"Article missing from search index: {source.name}") article = read_page(output / "blogposts" / slug / "index.html") if not article.meta.get("description", "").strip(): raise ValueError(f"Article description is empty: {source.name}") @@ -114,6 +140,7 @@ def validate_site(output): check_urls([node.text for node in rss.findall("./channel/item/guid")], "RSS GUIDs") config = json.loads((output / "staticwebapp.config.json").read_text(encoding="utf-8")) + check_cache_config(config) override = config.get("responseOverrides", {}).get("404", {}) if override.get("rewrite") != "/404.html" or override.get("statusCode", 404) != 404: raise ValueError("SWA configuration does not preserve the custom 404 response") @@ -122,6 +149,10 @@ def validate_site(output): if "Page not found" not in (output / "404.html").read_text(encoding="utf-8"): raise ValueError("Custom 404 page is missing") + for image in (ROOT / "static" / "img").rglob("*"): + if image.is_file() and not (output / "img" / image.relative_to(ROOT / "static" / "img")).is_file(): + raise ValueError(f"Legacy image is missing: {image.name}") + def main(): if len(sys.argv) != 2: diff --git a/scripts/test_check_site.py b/scripts/test_check_site.py index 5af600c..09dca19 100644 --- a/scripts/test_check_site.py +++ b/scripts/test_check_site.py @@ -4,7 +4,7 @@ from pathlib import Path from unittest.mock import patch -from check_site import BASE_URL, Page, check_urls, validate_site +from check_site import BASE_URL, Page, check_cache_config, check_urls, validate_site class SiteChecksTest(unittest.TestCase): @@ -28,6 +28,25 @@ def test_page_extracts_assets_and_code_from_article(self): self.assertEqual(page.articles[0]["links"], ["/blogposts/example/"]) self.assertTrue(page.articles[0]["pre"]) + def test_source_candidates_are_checked(self): + page = Page() + page.feed('') + self.assertEqual(page.local_assets, ["/one.webp", "/two.webp"]) + + def test_image_dimensions_must_be_positive_integers(self): + page = Page() + page.feed('') + with self.assertRaisesRegex(ValueError, "Invalid image width"): + page.feed('') + + def test_cache_rules_cannot_override_revalidation(self): + headers = {"Cache-Control": "public, max-age=0, must-revalidate"} + check_cache_config({"globalHeaders": headers}) + with self.assertRaisesRegex(ValueError, "routes"): + check_cache_config({"globalHeaders": headers, "routes": [{"route": "/*"}]}) + with self.assertRaisesRegex(ValueError, "cache policy"): + check_cache_config({"globalHeaders": {"Cache-Control": "public, max-age=31536000, immutable"}}) + class ArtifactChecksTest(unittest.TestCase): def setUp(self): @@ -67,8 +86,12 @@ def setUp(self): f"{BASE_URL}", encoding="utf-8", ) + (self.output / "index.json").write_text( + json.dumps([{"permalink": BASE_URL + "blogposts/example/"}]), encoding="utf-8" + ) (self.output / "staticwebapp.config.json").write_text( - json.dumps({"responseOverrides": {"404": {"rewrite": "/404.html"}}}), + json.dumps({"globalHeaders": {"Cache-Control": "public, max-age=0, must-revalidate"}, + "responseOverrides": {"404": {"rewrite": "/404.html"}}}), encoding="utf-8", ) (self.output / "404.html").write_text("Page not found", encoding="utf-8") @@ -113,12 +136,33 @@ def test_missing_absolute_production_asset_fails(self): def test_incorrect_404_status_fails(self): (self.output / "staticwebapp.config.json").write_text( - json.dumps({"responseOverrides": {"404": {"rewrite": "/404.html", "statusCode": 200}}}), + json.dumps({"globalHeaders": {"Cache-Control": "public, max-age=0, must-revalidate"}, + "responseOverrides": {"404": {"rewrite": "/404.html", "statusCode": 200}}}), encoding="utf-8", ) with self.assertRaisesRegex(ValueError, "404 response"): validate_site(self.output) + def test_missing_article_from_search_fails(self): + (self.output / "index.json").write_text( + json.dumps([{"permalink": BASE_URL + "other/"}]), encoding="utf-8" + ) + with self.assertRaisesRegex(ValueError, "missing from search"): + validate_site(self.output) + + def test_missing_responsive_candidate_fails(self): + with (self.output / "index.html").open("a", encoding="utf-8") as page: + page.write('') + with self.assertRaisesRegex(ValueError, "asset is missing"): + validate_site(self.output) + + def test_missing_legacy_image_fails(self): + image_dir = self.output.parent / "static" / "img" + image_dir.mkdir(parents=True) + (image_dir / "original.png").write_bytes(b"image") + with self.assertRaisesRegex(ValueError, "Legacy image is missing"): + validate_site(self.output) + if __name__ == "__main__": unittest.main() diff --git a/static/staticwebapp.config.json b/static/staticwebapp.config.json index b3e4a85..8f1017b 100644 --- a/static/staticwebapp.config.json +++ b/static/staticwebapp.config.json @@ -1,4 +1,7 @@ { + "globalHeaders": { + "Cache-Control": "public, max-age=0, must-revalidate" + }, "responseOverrides": { "404": { "rewrite": "/404.html" From d862d8758c17484d1b0a76d555c7355ae762dd11 Mon Sep 17 00:00:00 2001 From: Erlend Rushfeldt Date: Sat, 28 Nov 2026 21:19:49 +0100 Subject: [PATCH 4/4] ci(blog): add link accessibility and lighthouse checks Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/workflows/hugo-checks.yml | 41 +- .gitignore | 3 + assets/css/extended/custom.css | 14 + .../Blogposts/Cost-Optmization-in-the-wild.md | 2 +- content/_index.md | 2 + layouts/_partials/footer.html | 178 ++ layouts/_partials/header.html | 110 + scripts/check_links.py | 80 + scripts/ci/CI.md | 56 + scripts/ci/accessibility.mjs | 74 + scripts/ci/checks.test.mjs | 90 + scripts/ci/lighthouse.mjs | 41 + scripts/ci/local-site.mjs | 151 ++ scripts/ci/package-lock.json | 1976 +++++++++++++++++ scripts/ci/package.json | 18 + scripts/ci/report.mjs | 14 + scripts/ci/scan.mjs | 11 + scripts/test_check_links.py | 51 + static/safari-pinned-tab.svg | 3 + 19 files changed, 2912 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 layouts/_partials/footer.html create mode 100644 layouts/_partials/header.html create mode 100644 scripts/check_links.py create mode 100644 scripts/ci/CI.md create mode 100644 scripts/ci/accessibility.mjs create mode 100644 scripts/ci/checks.test.mjs create mode 100644 scripts/ci/lighthouse.mjs create mode 100644 scripts/ci/local-site.mjs create mode 100644 scripts/ci/package-lock.json create mode 100644 scripts/ci/package.json create mode 100644 scripts/ci/report.mjs create mode 100644 scripts/ci/scan.mjs create mode 100644 scripts/test_check_links.py create mode 100644 static/safari-pinned-tab.svg diff --git a/.github/workflows/hugo-checks.yml b/.github/workflows/hugo-checks.yml index 93d1b0b..0b2492a 100644 --- a/.github/workflows/hugo-checks.yml +++ b/.github/workflows/hugo-checks.yml @@ -22,9 +22,46 @@ jobs: with: hugo-version: '0.169.0' extended: true - - name: Test artifact checks - run: python3 -m unittest discover -s scripts -p 'test_*.py' + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: '24' + cache: npm + cache-dependency-path: scripts/ci/package-lock.json - name: Build site + id: build run: hugo --minify --destination "$RUNNER_TEMP/hugo-site" + - name: Install browser checks + id: dependencies + if: ${{ !cancelled() && steps.build.outcome == 'success' }} + env: + PLAYWRIGHT_SKIP_BROWSER_GC: '1' + run: | + npm ci --prefix scripts/ci + cd scripts/ci + npx playwright install --with-deps chromium + - name: Test artifact checks + if: ${{ !cancelled() && steps.build.outcome == 'success' }} + run: python3 -m unittest discover -s scripts -p 'test_*.py' - name: Validate site artifact + if: ${{ !cancelled() && steps.build.outcome == 'success' }} run: python3 scripts/check_site.py "$RUNNER_TEMP/hugo-site" + - name: Check internal links + if: ${{ !cancelled() && steps.build.outcome == 'success' }} + run: python3 scripts/check_links.py "$RUNNER_TEMP/hugo-site" + - name: Test browser checks + if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.dependencies.outcome == 'success' }} + run: npm test --prefix scripts/ci + - name: Check accessibility + if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.dependencies.outcome == 'success' }} + run: node scripts/ci/accessibility.mjs "$RUNNER_TEMP/hugo-site" + - name: Generate Lighthouse reports + id: lighthouse + if: ${{ !cancelled() && steps.build.outcome == 'success' && steps.dependencies.outcome == 'success' }} + run: node scripts/ci/lighthouse.mjs "$RUNNER_TEMP/hugo-site" "$RUNNER_TEMP/lighthouse-reports" + - name: Upload Lighthouse reports + if: ${{ !cancelled() && steps.lighthouse.outcome != 'skipped' }} + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: lighthouse-local-reports + path: ${{ runner.temp }}/lighthouse-reports + if-no-files-found: error diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6246b9b --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/resources/_gen/ +/scripts/__pycache__/ +/scripts/ci/node_modules/ diff --git a/assets/css/extended/custom.css b/assets/css/extended/custom.css index 0ab0753..30608a0 100644 --- a/assets/css/extended/custom.css +++ b/assets/css/extended/custom.css @@ -6,6 +6,20 @@ } .post-content pre { overflow-x: auto; } +.md-content pre code { overflow-x: visible; } +.md-content pre code span[style*="color:#f92672"] { color: #ff719a !important; } +.post-tags a { color: var(--primary); } +.visually-hidden { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} a:focus-visible, button:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; diff --git a/content/Blogposts/Cost-Optmization-in-the-wild.md b/content/Blogposts/Cost-Optmization-in-the-wild.md index b8068ce..78ecd4d 100644 --- a/content/Blogposts/Cost-Optmization-in-the-wild.md +++ b/content/Blogposts/Cost-Optmization-in-the-wild.md @@ -31,7 +31,7 @@ widgets: # Enable sidebar widgets in given order per page Here is a collection of snippets of code used in the "Cost Optimization in the wild! - Experiences from reducing costs" presentation. If you are missing any snippets of code used in a demo, or if you have any other question, feel free to message me on Twitter or LinkedIn. -1. [Orphaned disks](#orphanedDisks) +1. [Orphaned disks](#orphaneddisks) 2. [Old Snapshots](#oldsnapshots) 3. [App Gateways and Load Balancers](#balancers) 4. [Storage v1](#storagev1) diff --git a/content/_index.md b/content/_index.md index eaca080..2169065 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,5 +1,7 @@ --- --- +# Erlend Rushfeldt - Blog {.visually-hidden} + Practical articles on Azure, cloud operations, automation, and cost optimization. I'm Erlend, a cloud advisor sharing what I learn. [GitHub](https://github.com/Fr3xzy) · [LinkedIn](https://www.linkedin.com/in/erlend-rushfeldt-b0a92a159/) · [X](https://twitter.com/ErlendRushfeldt) diff --git a/layouts/_partials/footer.html b/layouts/_partials/footer.html new file mode 100644 index 0000000..658fcaa --- /dev/null +++ b/layouts/_partials/footer.html @@ -0,0 +1,178 @@ +{{- if not (.Param "hideFooter") }} +
+ {{- if not site.Params.footer.hideCopyright }} + {{- if site.Copyright }} + {{ site.Copyright | markdownify }} + {{- else }} + © {{ now.Year }} {{ site.Title }} + {{- end }} + {{- print " · "}} + {{- end }} + + {{- with site.Params.footer.text }} + {{ . | markdownify }} + {{- print " · "}} + {{- end }} + + {{/* + - The "Powered by Hugo" text is intentionally left at the end of the footer to give it more prominence. + - We kindly encourage you to keep this line. Keeping this credit helps open source projects like PaperMod and Hugo reach more people, supports the open source ecosystem, and shows appreciation for the work that goes into these tools. + - If you choose to remove it, please consider adding a link to the PaperMod GitHub repository somewhere on your site to give credit to the project and its contributors. + - Support us by sponsoring the project on GitHub Sponsors: https://github.com/sponsors/adityatelange + */}} + + + Powered by + Hugo & + PaperMod + +
+{{- end }} + +{{- if (not site.Params.disableScrollToTop) }} + +{{- end }} + +{{- partial "extend_footer.html" . }} + + + +{{- if (not site.Params.disableScrollToTop) }} + +{{- end }} + +{{- if (not site.Params.disableThemeToggle) }} + +{{- end }} + +{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }} + +{{- end }} diff --git a/layouts/_partials/header.html b/layouts/_partials/header.html new file mode 100644 index 0000000..1de2eef --- /dev/null +++ b/layouts/_partials/header.html @@ -0,0 +1,110 @@ +
+ +
diff --git a/scripts/check_links.py b/scripts/check_links.py new file mode 100644 index 0000000..6742c9a --- /dev/null +++ b/scripts/check_links.py @@ -0,0 +1,80 @@ +#!/usr/bin/env python3 +"""Check same-site HTML links and assets without accessing the network.""" + +import sys +from html.parser import HTMLParser +from pathlib import Path +from urllib.parse import unquote, urljoin, urlsplit + +from check_site import BASE_URL + + +class Links(HTMLParser): + def __init__(self): + super().__init__(convert_charrefs=True) + self.ids = set() + self.urls = [] + self.base = None + + def handle_starttag(self, tag, attributes): + attrs = dict(attributes) + if attrs.get("id"): + self.ids.add(attrs["id"]) + if tag == "a" and attrs.get("name"): + self.ids.add(attrs["name"]) + if tag == "base" and attrs.get("href") and self.base is None: + self.base = attrs["href"] + keys = { + "a": ("href",), "link": ("href",), "img": ("src",), + "source": ("src",), "script": ("src",), "video": ("src", "poster"), + "audio": ("src",), "iframe": ("src",), + }.get(tag, ()) + self.urls.extend(attrs[key] for key in keys if attrs.get(key)) + if tag in ("img", "source") and attrs.get("srcset"): + self.urls.extend(candidate.strip().split()[0] for candidate in attrs["srcset"].split(",") if candidate.strip()) + + +def check_links(output): + root = Path(output).resolve() + pages = {} + for path in root.rglob("*.html"): + page = Links() + page.feed(path.read_text(encoding="utf-8")) + pages[path.resolve()] = page + issues = [] + origin = urlsplit(BASE_URL) + for path, page in pages.items(): + relative = path.relative_to(root).as_posix() + page_url = urljoin(BASE_URL, relative[:-10] if relative.endswith("index.html") else relative) + base = urljoin(page_url, page.base) if page.base else page_url + for link in page.urls: + url = urlsplit(urljoin(base, link)) + if url.scheme not in ("http", "https") or url.hostname != origin.hostname: + continue + destination = (root / unquote(url.path).lstrip("/")).resolve() + if not destination.is_relative_to(root): + issues.append(f"{relative}: {link}: target escapes site root") + continue + if destination.is_dir(): + destination = destination / "index.html" + if not destination.is_file(): + issues.append(f"{relative}: {link}: target is missing") + elif url.fragment and destination in pages and unquote(url.fragment) not in pages[destination].ids: + issues.append(f"{relative}: {link}: fragment is missing") + return issues + + +def main(): + if len(sys.argv) != 2: + raise SystemExit("Usage: python3 scripts/check_links.py ") + root = Path(sys.argv[1]) + if not (root / "index.html").is_file(): + raise SystemExit(f"Site homepage is missing: {root}") + issues = check_links(root) + if issues: + raise SystemExit("Internal link validation failed:\n" + "\n".join(issues)) + print("Internal link validation passed") + + +if __name__ == "__main__": + main() diff --git a/scripts/ci/CI.md b/scripts/ci/CI.md new file mode 100644 index 0000000..9d52168 --- /dev/null +++ b/scripts/ci/CI.md @@ -0,0 +1,56 @@ +# Local CI checks + +The Hugo checks workflow builds once with Hugo extended 0.169.0 and runs the +artifact, internal-link, accessibility, and Lighthouse checks against that +output. It does not change or gate the separate Azure deployment workflow. + +To reproduce locally with Python 3, Node 24, and Hugo extended 0.169.0: + +```sh +npm ci --prefix scripts/ci +(cd scripts/ci && PLAYWRIGHT_SKIP_BROWSER_GC=1 npx playwright install chromium) +python3 -m unittest discover -s scripts -p 'test_*.py' +hugo --minify --destination /tmp/blog-ci-site +python3 scripts/check_site.py /tmp/blog-ci-site +python3 scripts/check_links.py /tmp/blog-ci-site +npm test --prefix scripts/ci +node scripts/ci/accessibility.mjs /tmp/blog-ci-site +node scripts/ci/lighthouse.mjs /tmp/blog-ci-site /tmp/blog-lighthouse-reports +actionlint .github/workflows/hugo-checks.yml +``` + +Use an empty destination for each clean build. On Linux, Playwright may also +require system libraries (`npx playwright install --with-deps chromium`). +The lockfile pins Playwright, axe-core, Lighthouse and the other Node +dependencies; Playwright pins its Chromium build. CI pins Node 24, Hugo and +immutable GitHub Action revisions. Update dependency versions and regenerate the +lockfile together, then rerun the checks; review Action revision changes. +The repository header and footer overrides track PaperMod templates and should +be reviewed when updating the theme. + +The link check reads generated HTML only; it checks same-host links, assets, +responsive candidates and HTML fragments, resolving relative and root-relative +URLs. It skips external hosts and non-HTTP schemes without requesting them. +Failures identify the source, target and reason. + +Browser checks serve the generated artifact on loopback. For this temporary +view, same-site absolute URLs in HTML attributes and srcsets, plus search-index +permalinks, are rewritten to loopback; files on disk are unchanged. Other +origins are blocked and listed if attempted. Third-party resources can +therefore be absent, and the transformed local page is not identical to the +hosted page. Accessibility checks scan home, search and an article in light +and dark modes and probe selected keyboard interactions. An axe violation or +failed interaction blocks CI, but a passing scan is not WCAG conformance or a +substitute for manual assistive-technology testing. + +Lighthouse uses its default mobile configuration and writes HTML and JSON +reports for home and two articles to `lighthouse-local-reports` in the +workflow artifacts. Scores are informational and have no budgets. Missing +pages, incomplete reports, runtime errors and artifact publication failures +fail their steps. Reports still run after independent check failures when the +build and browser setup succeeded. These are local lab measurements, not field +Core Web Vitals or measurements of deployed Azure behavior; localization, +blocked resources, hardware and runner variability limit comparisons. + +To roll back, revert the CI change commit. No deployment configuration, +Azure resources or generated `docs/` output needs to be changed. diff --git a/scripts/ci/accessibility.mjs b/scripts/ci/accessibility.mjs new file mode 100644 index 0000000..c3b18a8 --- /dev/null +++ b/scripts/ci/accessibility.mjs @@ -0,0 +1,74 @@ +import { chromium } from 'playwright'; +import { startLocalSite } from './local-site.mjs'; +import { scanPage } from './scan.mjs'; + +const directory = process.argv[2]; +if (!directory) throw new Error('Usage: node accessibility.mjs '); + +const site = await startLocalSite(directory); +let browser; +try { + browser = await chromium.launch({ args: [...site.chromeFlags, '--disable-quic'] }); + const context = await browser.newContext({ serviceWorkers: 'block' }); + await context.route('**/*', route => { + const url = new URL(route.request().url()); + if (url.origin === site.origin) return route.continue(); + site.blocked.add(url.origin); + return route.abort(); + }); + const page = await context.newPage(); + const pages = ['/', '/blogposts/azurefw-aadconnectruleset-bicep/', '/search/']; + let violations = 0; + for (const theme of ['light', 'dark']) for (const pathname of pages) { + await page.emulateMedia({ colorScheme: theme }); + const response = await page.goto(site.origin + pathname, { waitUntil: 'networkidle' }); + if (!response?.ok()) throw new Error(`Could not load ${pathname}: ${response?.status()}`); + if (pathname === '/search/') { + await page.locator('#searchInput:enabled').waitFor(); + await page.locator('#searchInput').fill('Azure Firewall'); + await page.locator('#searchResults a').first().waitFor(); + await page.locator('#searchInput').press('ArrowDown'); + const active = await page.evaluate(() => ({ + isResult: document.activeElement?.matches('#searchResults a'), + href: document.activeElement?.href, + outline: getComputedStyle(document.activeElement).outlineStyle + })); + if (!active.isResult || !active.href.startsWith(site.origin + '/') || active.outline === 'none') { + throw new Error(`Search keyboard focus failed: ${JSON.stringify(active)}`); + } + await page.keyboard.press('Enter'); + await page.waitForURL(url => url.origin === site.origin && url.pathname !== '/search/'); + if (!(await page.locator('main').count())) throw new Error('Search result did not load a local page'); + await page.goto(site.origin + pathname, { waitUntil: 'networkidle' }); + await page.locator('#searchInput:enabled').fill('Azure Firewall'); + await page.locator('#searchResults a').first().waitFor(); + } + if (pathname.includes('azurefw-aadconnectruleset-bicep')) { + const code = page.locator('.post-content pre').first(); + await code.focus(); + const before = await code.evaluate(element => element.scrollLeft); + await page.keyboard.press('ArrowRight'); + await page.waitForTimeout(300); + const after = await code.evaluate(element => element.scrollLeft); + if (after <= before) throw new Error('Code block did not scroll using the keyboard'); + } + violations += await scanPage(page, `${theme} ${pathname}`); + } + const costPath = '/blogposts/cost-optmization-in-the-wild/'; + const costResponse = await page.goto(site.origin + costPath, { waitUntil: 'networkidle' }); + if (!costResponse?.ok()) throw new Error(`Could not load ${costPath}: ${costResponse?.status()}`); + const fallback = await page.locator('picture img').first().getAttribute('src'); + if (!fallback || new URL(fallback, site.origin).origin !== site.origin) { + throw new Error(`Cost article image fallback is not local: ${fallback}`); + } + const imageResponse = await page.request.get(new URL(fallback, site.origin).href); + if (!imageResponse.ok()) throw new Error(`Cost article image fallback returned ${imageResponse.status()}`); + if (violations) throw new Error(`${violations} accessibility violations found`); +} finally { + try { + if (browser) await browser.close(); + } finally { + if (site.blocked.size) console.log(`Blocked external origins: ${[...site.blocked].sort().join(', ')}`); + await site.close(); + } +} diff --git a/scripts/ci/checks.test.mjs b/scripts/ci/checks.test.mjs new file mode 100644 index 0000000..27a9610 --- /dev/null +++ b/scripts/ci/checks.test.mjs @@ -0,0 +1,90 @@ +import assert from 'node:assert/strict'; +import { mkdtemp, mkdir, readFile, rm, symlink, writeFile } from 'node:fs/promises'; +import http from 'node:http'; +import os from 'node:os'; +import path from 'node:path'; +import { execFile } from 'node:child_process'; +import { promisify } from 'node:util'; +import { test } from 'node:test'; +import { chromium } from 'playwright'; +import { localizeHtml, localizeIndex, startLocalSite } from './local-site.mjs'; +import { saveReport } from './report.mjs'; +import { scanPage } from './scan.mjs'; + +test('localizes only canonical URLs, preserving external URLs and data srcsets', () => { + const html = localizeHtml('x', 'http://127.0.0.1:1234'); + assert.match(html, /src="http:\/\/127\.0\.0\.1:1234\/img.jpg"/); + assert.match(html, /data:image\/png;base64,abc 1x, http:\/\/127\.0\.0\.1:1234\/img.webp 2x/); + assert.match(html, /https:\/\/www\.errush\.org\.evil\.test\/x/); + assert.equal(localizeIndex([{ permalink: 'https://www.errush.org/a/#x' }], 'http://127.0.0.1:1234')[0].permalink, 'http://127.0.0.1:1234/a/#x'); + assert.throws(() => localizeIndex({}, 'http://127.0.0.1:1234')); +}); + +test('server contains artifact paths and proxy blocks other origins', async () => { + const temp = await mkdtemp(path.join(os.tmpdir(), 'blog-ci-')); + const root = path.join(temp, 'site'); + await mkdir(root); + await writeFile(path.join(root, 'index.html'), '

Local

'); + await writeFile(path.join(temp, 'secret'), 'outside'); + await symlink(path.join(temp, 'secret'), path.join(root, 'escape')); + const site = await startLocalSite(root); + let browser; + try { + assert.equal((await fetch(site.origin)).status, 200); + assert.equal((await fetch(site.origin + '/escape')).status, 403); + const status = await new Promise((resolve, reject) => { + http.get(site.origin + '/%2e%2e%2fsecret', response => { + response.resume(); + resolve(response.statusCode); + }).on('error', reject); + }); + assert.equal(status, 403); + browser = await chromium.launch({ args: [...site.chromeFlags, '--disable-quic'] }); + const page = await browser.newPage(); + await page.goto(site.origin); + await page.evaluate(() => fetch('http://example.invalid/blocked').catch(() => {})); + assert.ok(site.blocked.has('http://example.invalid')); + } finally { + if (browser) await browser.close(); + await site.close(); + await rm(temp, { recursive: true, force: true }); + } +}); + +test('axe scanner detects a violation and accepts a clean document', async () => { + const browser = await chromium.launch(); + try { + const context = await browser.newContext(); + const page = await context.newPage(); + await page.setContent('Fixture

Fixture

'); + assert.ok(await scanPage(page, 'invalid fixture') > 0); + await page.locator('img').evaluate(element => element.setAttribute('alt', '')); + assert.equal(await scanPage(page, 'clean fixture'), 0); + } finally { + await browser.close(); + } +}); + +test('report writer rejects incomplete results but accepts low scores', async () => { + const temp = await mkdtemp(path.join(os.tmpdir(), 'blog-report-')); + try { + await assert.rejects(saveReport({ lhr: { categories: { performance: { score: 0.1 } } }, report: ['html'] }, temp, 'bad', '/missing'), /did not complete/); + await assert.rejects(saveReport({ lhr: { categories: { performance: { score: null } } }, report: ['html', '{}'] }, temp, 'bad', '/missing'), /did not complete/); + assert.equal(await saveReport({ lhr: { categories: { performance: { score: 0 } } }, report: ['html', '{}'] }, temp, 'low', '/'), 0); + assert.equal(await readFile(path.join(temp, 'low.json'), 'utf8'), '{}'); + await assert.rejects(saveReport({ lhr: { categories: { performance: { score: 1 } } }, report: ['html', '{}'] }, path.join(temp, 'missing'), 'bad', '/'), /ENOENT/); + } finally { + await rm(temp, { recursive: true, force: true }); + } +}); + +test('Lighthouse command fails when the required homepage is missing', async () => { + const temp = await mkdtemp(path.join(os.tmpdir(), 'blog-missing-')); + try { + await assert.rejects(promisify(execFile)(process.execPath, [ + new URL('./lighthouse.mjs', import.meta.url).pathname, temp, path.join(temp, 'reports') + ]), error => error.code !== 0 && /\/ returned 404/.test(error.stderr)); + } finally { + await rm(temp, { recursive: true, force: true }); + } +}); diff --git a/scripts/ci/lighthouse.mjs b/scripts/ci/lighthouse.mjs new file mode 100644 index 0000000..5318baa --- /dev/null +++ b/scripts/ci/lighthouse.mjs @@ -0,0 +1,41 @@ +import { mkdir } from 'node:fs/promises'; +import lighthouse from 'lighthouse'; +import * as chromeLauncher from 'chrome-launcher'; +import { chromium } from 'playwright'; +import { startLocalSite } from './local-site.mjs'; +import { saveReport } from './report.mjs'; + +const [directory, reportDirectory] = process.argv.slice(2); +if (!directory || !reportDirectory) { + throw new Error('Usage: node lighthouse.mjs '); +} +await mkdir(reportDirectory, { recursive: true }); +const site = await startLocalSite(directory); +let chrome; +try { + chrome = await chromeLauncher.launch({ + chromePath: chromium.executablePath(), + chromeFlags: [...site.chromeFlags, '--headless', '--no-sandbox', '--disable-gpu', '--disable-quic'] + }); + const pages = [ + ['home', '/'], + ['firewall', '/blogposts/azurefw-aadconnectruleset-bicep/'], + ['cost', '/blogposts/cost-optmization-in-the-wild/'] + ]; + for (const [name, pathname] of pages) { + const response = await fetch(site.origin + pathname); + if (!response.ok) throw new Error(`${pathname} returned ${response.status}`); + const result = await lighthouse(site.origin + pathname, { + port: chrome.port, output: ['html', 'json'], logLevel: 'error' + }); + const score = await saveReport(result, reportDirectory, name, pathname); + console.log(`${pathname}: performance ${Math.round(score * 100)}/100`); + } +} finally { + try { + if (chrome) await chrome.kill(); + } finally { + if (site.blocked.size) console.log(`Blocked external origins: ${[...site.blocked].sort().join(', ')}`); + await site.close(); + } +} diff --git a/scripts/ci/local-site.mjs b/scripts/ci/local-site.mjs new file mode 100644 index 0000000..6353770 --- /dev/null +++ b/scripts/ci/local-site.mjs @@ -0,0 +1,151 @@ +import http from 'node:http'; +import path from 'node:path'; +import { readFile, realpath, stat } from 'node:fs/promises'; +import { parse, serialize } from 'parse5'; + +const canonical = new URL('https://www.errush.org/'); +const mime = { + '.html': 'text/html; charset=utf-8', '.json': 'application/json; charset=utf-8', + '.css': 'text/css; charset=utf-8', '.js': 'text/javascript; charset=utf-8', + '.svg': 'image/svg+xml', '.png': 'image/png', '.jpg': 'image/jpeg', + '.jpeg': 'image/jpeg', '.webp': 'image/webp', '.ico': 'image/x-icon', + '.xml': 'application/xml; charset=utf-8', '.woff': 'font/woff', '.woff2': 'font/woff2' +}; + +function localizeUrl(value, origin) { + try { + const url = new URL(value); + if (url.origin === canonical.origin) return origin + url.pathname + url.search + url.hash; + } catch { + // Relative URLs are already local. + } + return value; +} + +export function localizeHtml(html, origin) { + const document = parse(html); + function visit(node) { + for (const attr of node.attrs || []) { + if (attr.name === 'srcset') { + attr.value = attr.value.replace(/(^\s*|,\s*)https:\/\/www\.errush\.org(?=\/)/g, `$1${origin}`); + } else { + attr.value = localizeUrl(attr.value, origin); + } + } + for (const child of node.childNodes || []) visit(child); + } + visit(document); + return serialize(document); +} + +export function localizeIndex(data, origin) { + if (!Array.isArray(data)) throw new Error('Search index must be an array'); + return data.map(item => ({ ...item, permalink: localizeUrl(item.permalink, origin) })); +} + +function listen(server) { + return new Promise((resolve, reject) => { + server.once('error', reject); + server.listen(0, '127.0.0.1', () => { + server.removeListener('error', reject); + resolve(server.address().port); + }); + }); +} + +function close(server) { + return new Promise((resolve, reject) => server.close(error => error ? reject(error) : resolve())); +} + +export async function startLocalSite(directory) { + const root = await realpath(directory); + const blocked = new Set(); + let origin; + const site = http.createServer(async (req, res) => { + try { + if (!['GET', 'HEAD'].includes(req.method)) { + res.writeHead(405).end(); + return; + } + const requestUrl = new URL(req.url, origin); + const requestedPath = decodeURIComponent(requestUrl.pathname); + let file = path.resolve(root, '.' + requestedPath); + if (file !== root && !file.startsWith(root + path.sep)) { + res.writeHead(403).end(); + return; + } + if ((await stat(file)).isDirectory()) file = path.join(file, 'index.html'); + file = await realpath(file); + if (!file.startsWith(root + path.sep)) { + res.writeHead(403).end(); + return; + } + let body = await readFile(file); + const ext = path.extname(file).toLowerCase(); + if (ext === '.html') body = Buffer.from(localizeHtml(body.toString('utf8'), origin)); + if (file === path.join(root, 'index.json')) { + body = Buffer.from(JSON.stringify(localizeIndex(JSON.parse(body.toString('utf8')), origin))); + } + res.writeHead(200, { + 'content-type': mime[ext] || 'application/octet-stream', + 'cache-control': 'no-store', + 'content-length': body.length + }); + res.end(req.method === 'HEAD' ? undefined : body); + } catch (error) { + if (error.code === 'ENOENT' || error.code === 'ENOTDIR') res.writeHead(404).end('Not found'); + else { + console.error('Local site error:', error); + res.writeHead(500).end('Local site error'); + } + } + }); + const port = await listen(site); + origin = `http://127.0.0.1:${port}`; + + const proxy = http.createServer((req, res) => { + let url; + try { + url = new URL(req.url); + } catch { + res.writeHead(400).end(); + return; + } + if (url.origin !== origin || url.username || url.password) { + blocked.add(url.origin); + res.writeHead(403).end('External requests blocked'); + return; + } + const upstream = http.request(url, { method: req.method, headers: req.headers }, response => { + res.writeHead(response.statusCode, response.headers); + response.pipe(res); + }); + upstream.on('error', error => { + console.error('Local proxy error:', error); + res.writeHead(502).end(); + }); + req.pipe(upstream); + }); + proxy.on('connect', (req, socket) => { + blocked.add(`https://${req.url}`); + socket.end('HTTP/1.1 403 Forbidden\r\n\r\n'); + }); + let proxyPort; + try { + proxyPort = await listen(proxy); + } catch (error) { + await close(site); + throw error; + } + return { + origin, blocked, + chromeFlags: [ + `--proxy-server=http://127.0.0.1:${proxyPort}`, + '--proxy-bypass-list=<-loopback>', + '--disable-background-networking' + ], + close: async () => { + try { await close(proxy); } finally { await close(site); } + } + }; +} diff --git a/scripts/ci/package-lock.json b/scripts/ci/package-lock.json new file mode 100644 index 0000000..2cfd0b4 --- /dev/null +++ b/scripts/ci/package-lock.json @@ -0,0 +1,1976 @@ +{ + "name": "blog-ci-checks", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "blog-ci-checks", + "devDependencies": { + "@axe-core/playwright": "4.14.1", + "chrome-launcher": "1.2.3", + "lighthouse": "13.6.0", + "parse5": "8.1.1", + "playwright": "1.65.1" + }, + "engines": { + "node": ">=24" + } + }, + "node_modules/@axe-core/playwright": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/@axe-core/playwright/-/playwright-4.14.1.tgz", + "integrity": "sha512-cSN1ijrWLnlOof22sPN4RtWGSoPpt7GzOVyOKomyhnPsy1fPNoRdBiJAUziuCRs8KoK50kKufiMUFt7itAuwOg==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "axe-core": "~4.14.1" + }, + "engines": { + "node": ">=22.12.0" + }, + "peerDependencies": { + "playwright-core": ">= 1.0.0" + } + }, + "node_modules/@formatjs/ecma402-abstract": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/@formatjs/ecma402-abstract/-/ecma402-abstract-2.3.6.tgz", + "integrity": "sha512-HJnTFeRM2kVFVr5gr5kH1XP6K0JcJtE7Lzvtr3FS/so5f1kpsqqqxy5JF+FRaO6H2qmcMfAUIox7AJteieRtVw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@formatjs/fast-memoize": "2.2.7", + "@formatjs/intl-localematcher": "0.6.2", + "decimal.js": "^10.4.3", + "tslib": "^2.8.0" + } + }, + "node_modules/@formatjs/fast-memoize": { + "version": "2.2.7", + "resolved": "https://registry.npmjs.org/@formatjs/fast-memoize/-/fast-memoize-2.2.7.tgz", + "integrity": "sha512-Yabmi9nSvyOMrlSeGGWDiH7rf3a7sIwplbvo/dlz9WCIjzIQAfy1RMf4S0X3yG724n5Ghu2GmEl5NJIV6O9sZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@formatjs/icu-messageformat-parser": { + "version": "2.11.4", + "resolved": "https://registry.npmjs.org/@formatjs/icu-messageformat-parser/-/icu-messageformat-parser-2.11.4.tgz", + "integrity": "sha512-7kR78cRrPNB4fjGFZg3Rmj5aah8rQj9KPzuLsmcSn4ipLXQvC04keycTI1F7kJYDwIXtT2+7IDEto842CfZBtw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@formatjs/ecma402-abstract": "2.3.6", + "@formatjs/icu-skeleton-parser": "1.8.16", + "tslib": "^2.8.0" + } + }, + "node_modules/@formatjs/icu-skeleton-parser": { + "version": "1.8.16", + "resolved": "https://registry.npmjs.org/@formatjs/icu-skeleton-parser/-/icu-skeleton-parser-1.8.16.tgz", + "integrity": "sha512-H13E9Xl+PxBd8D5/6TVUluSpxGNvFSlN/b3coUp0e0JpuWXXnQDiavIpY3NnvSp4xhEMoXyyBvVfdFX8jglOHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@formatjs/ecma402-abstract": "2.3.6", + "tslib": "^2.8.0" + } + }, + "node_modules/@formatjs/intl-localematcher": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/@formatjs/intl-localematcher/-/intl-localematcher-0.6.2.tgz", + "integrity": "sha512-XOMO2Hupl0wdd172Y06h6kLpBz6Dv+J4okPLl4LPtzbr8f66WbIoy4ev98EBuZ6ZK4h5ydTN6XneT4QVpD7cdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tslib": "^2.8.0" + } + }, + "node_modules/@isaacs/nonrecursive-glob-match": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz", + "integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@opentelemetry/api": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.10.0.tgz", + "integrity": "sha512-lMkyes8iHrG+mk6WH7X70MdCLI2RS0FwNBY1PyQ8UemaijE2m5mv5A0Niy3HtbYTFrgkUEQjFMXmSAk2hQDuPQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/@oxc-parser/binding-android-arm-eabi": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm-eabi/-/binding-android-arm-eabi-0.152.0.tgz", + "integrity": "sha512-393VtirINkae4XHBTkq/yQxhOwEr4V+r0et37P2fp+sYZSdYgZTRDPo5Um8vBh0QjMZ+RmaMy4PP0qwr4cTMwA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-android-arm64": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-android-arm64/-/binding-android-arm64-0.152.0.tgz", + "integrity": "sha512-iYFcExATJNZ0rZj0o02THbD1Nc9jAW0nVgIQPee6ejbSASpbZXlIMw8jxtpzaG14JQTWwGSZ6U5dEtRJXE6V3Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-darwin-arm64": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-arm64/-/binding-darwin-arm64-0.152.0.tgz", + "integrity": "sha512-fnU+DfUzi5/rFy0LzmipYRz06PAUUkOS8kCJQ3Eg6oqlunC1XZXoffFqxmdL51RmcbYtUG3P8DVG1U5fckoa2A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-darwin-x64": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-darwin-x64/-/binding-darwin-x64-0.152.0.tgz", + "integrity": "sha512-Y3U2okryWTs7hDld6UhjJwLNf8/do+x4g4C+1U5SiGwrTLwbO83WJYJA8+l9iFSilWBgnfpd/+U76tfeNxUHzA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-freebsd-x64": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-freebsd-x64/-/binding-freebsd-x64-0.152.0.tgz", + "integrity": "sha512-XkhkRrrPffEw+ZLv/d/5pEni0buxinm/E/N6fLbJCunD1DBbeCTtVP23ESV+4CWCWdSz397asks1ViGslpmWiQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-arm-gnueabihf": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-0.152.0.tgz", + "integrity": "sha512-MLzsRRbdfmdzo6JEhbC1yKU9ItfvM8tEf18HM32jCiNYZEz6J3bRBRl3cTkKR0vBdrk9ZVlcARXtwHccs+epDA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-arm-musleabihf": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm-musleabihf/-/binding-linux-arm-musleabihf-0.152.0.tgz", + "integrity": "sha512-HHerTEJz7Iy10Ji6BGsk4gqG6PU0UzFuBu91jIEOX89FnrI5ECWSEr7BLpkYQhp7U0QFtMnBhNfQKI0hYZK78w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-arm64-gnu": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-0.152.0.tgz", + "integrity": "sha512-9Bb8GyzZ2uSLzRDZ27usaKokr07mxiBe2dDF5b6bd2janmaJTT1gL51UfP7AU30yFiXrJvcRyFKREAgKwZYs0w==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-arm64-musl": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-arm64-musl/-/binding-linux-arm64-musl-0.152.0.tgz", + "integrity": "sha512-om7iDMUroI74A/lfRRWY9/Ev3VWrVsrUZ4tyvyh8raBey/sdcfyAD7tYWc+iykAiotnmftyKTpUKFr1QnaBrAQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-ppc64-gnu": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-0.152.0.tgz", + "integrity": "sha512-Lf1OL2lMTqwDMFC6jnRb30B+WYHKV0XT+bPHcFM6xHtNVwxpobiTzUIvKH6a0LWpvfwyru8Yu6zCGHqqFHH+gg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-riscv64-gnu": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-gnu/-/binding-linux-riscv64-gnu-0.152.0.tgz", + "integrity": "sha512-BYWSMQK+YJ9ZILStPcmmiSVq8KEG9Qdq/c4BHPC3rUEq/fEDCVjUIwdj5ZzjgZ9P9is9PKu0tcAXzq1ZXg4urQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-riscv64-musl": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-riscv64-musl/-/binding-linux-riscv64-musl-0.152.0.tgz", + "integrity": "sha512-d2LqHNNNqdH185sRK5dPKWZu201JrNu9/CRFuVEuT+ht7n/QaVblEMWT9MALQPrDWYvhG10P+NSKJFquDWZ09w==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-s390x-gnu": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-0.152.0.tgz", + "integrity": "sha512-8gBeHt5rA/8+pKhHl+zLggfa3L/V/L2at96p7ty6pBE7id6lFO19nFUc15u2PcjC4OYeYK465MKy1fhhbpFIGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-x64-gnu": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-gnu/-/binding-linux-x64-gnu-0.152.0.tgz", + "integrity": "sha512-ltgrSF6L+yPTVsIdaAyqKq3zTqzj/1VlNbxWZuxAe8flR3sWdyNsKvdXukoO8/ucJbLickhmieRBge+o/e8Ugw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-linux-x64-musl": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-linux-x64-musl/-/binding-linux-x64-musl-0.152.0.tgz", + "integrity": "sha512-LcMp6BvrBnewSfdkLHoSqidhoAq4syKOTBV5TYHWd+2VnGkfD/nPRRVIzTBt/Lkbt7pfOFDGtkiTntFS0p6sQQ==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-openharmony-arm64": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-openharmony-arm64/-/binding-openharmony-arm64-0.152.0.tgz", + "integrity": "sha512-jbhoMCslVxzRCRNQ8TSHxjYdSKRvk8O6ciLVDkahJvmyHDzBqba/bMQHM6ULKj/rgHNNbSzlIiakdx8SEfkJzA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-win32-arm64-msvc": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-0.152.0.tgz", + "integrity": "sha512-JZYVlhv36mr/nertnRB7vchJECOBb1Lz6lltalILsB+o9M/is+H6BEDRLQKdqA4JKs6NjJszo46+iM5sfwj6jQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-win32-ia32-msvc": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-ia32-msvc/-/binding-win32-ia32-msvc-0.152.0.tgz", + "integrity": "sha512-1X9oganvVsunRH0lH10UU05N+H9atpX6WsOybByUjwnfcd3h/0tYwvuv16XuHglrIUOnxV2TodbLVEwwafd64g==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-parser/binding-win32-x64-msvc": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-parser/binding-win32-x64-msvc/-/binding-win32-x64-msvc-0.152.0.tgz", + "integrity": "sha512-sw0M80/dn9rcpu+Rqqph/C+MjvDDce6MlXmFjsNQtPEymha0eJy3ml6+foSUTqFfpDIDyHZZ4eoJ43IoMe8bJw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.152.0.tgz", + "integrity": "sha512-oM/5rLBm2tPkg0iBgkH/FOeR3PCDpY19GTgAZjMFM8h9WI9VW7cLgzp6nwtarYKmovavIQZ+Fe/RKX/8C8O/Rw==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/oxc-project" + } + }, + "node_modules/@paulirish/trace_engine": { + "version": "0.0.67", + "resolved": "https://registry.npmjs.org/@paulirish/trace_engine/-/trace_engine-0.0.67.tgz", + "integrity": "sha512-AWZSKQDwbWKIO//xGvM8isSyDgEDZWDq12SbMQMxl6eE9ZgWaoc9n/2d7REjwcRANyA1Zjo1rVfJiSRFFGKUww==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "third-party-web": "*" + } + }, + "node_modules/@puppeteer/browsers": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/@puppeteer/browsers/-/browsers-3.3.0.tgz", + "integrity": "sha512-ZiOVHQ5KmsinwZJMwRc/a3xsGHbi9dRuAyf2gq4i9J5vRaI4r7SSIaJUniF1JVClG+qNoVdtBBWfL08N9Oib6g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "modern-tar": "^0.8.6", + "yargs": "^18.0.0" + }, + "bin": { + "browsers": "lib/main-cli.js" + }, + "engines": { + "node": ">=22.12.0" + }, + "peerDependencies": { + "proxy-agent": ">=8.0.1", + "yauzl": "^2.10.0 || ^3.4.0" + }, + "peerDependenciesMeta": { + "proxy-agent": { + "optional": true + }, + "yauzl": { + "optional": true + } + } + }, + "node_modules/@sentry/bundler-plugins": { + "version": "11.20.0", + "resolved": "https://registry.npmjs.org/@sentry/bundler-plugins/-/bundler-plugins-11.20.0.tgz", + "integrity": "sha512-bJZ9ngEx9QTst8OlpxMDRLgkLZnUc45/qZ8OwaYfeOL1E2uCtrN6oWKVoUM7307Gm54KYeRoQ1HlZhDxAyi3SQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/core": "11.20.0", + "dotenv": "^17.4.2", + "glob": "^14.0.3", + "magic-string": "~0.30.8 || ^1.0.0", + "oxc-parser": "^0.152.0", + "sentry": "^0.50.0" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" + }, + "peerDependencies": { + "rollup": ">=3.2.0", + "webpack": ">=5.1.0" + }, + "peerDependenciesMeta": { + "rollup": { + "optional": true + }, + "webpack": { + "optional": true + } + } + }, + "node_modules/@sentry/conventions": { + "version": "0.36.0", + "resolved": "https://registry.npmjs.org/@sentry/conventions/-/conventions-0.36.0.tgz", + "integrity": "sha512-FedIjtJSiTZa3VARAds2ok7Q9Xt2LjrZJ1SeaxMvGhRgMw4V+eOaECGa/JbJWe30tw6yehE1W7T4HmgK5XJRTQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/@sentry/core": { + "version": "11.20.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-11.20.0.tgz", + "integrity": "sha512-ay0RpDFVsFzaRBeX8mGDygWkaNVoQbepz+pYu7t3aBP/E6+wFsQnP56bQjAonlHfPR/5zvgYCKUphLznnFiY+Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/conventions": "^0.36.0" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" + } + }, + "node_modules/@sentry/node": { + "version": "11.20.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-11.20.0.tgz", + "integrity": "sha512-FO4m0skAl/y1QPqH/VZzypnOxGDzNhmMlJL585Aamw9XY1JZwoDiZ0MW85bZ34JyZxZtPFuTsgSRyoaPzvrwog==", + "dev": true, + "license": "MIT", + "dependencies": { + "@opentelemetry/api": "^1.9.1", + "@sentry/bundler-plugins": "11.20.0", + "@sentry/conventions": "^0.36.0", + "@sentry/core": "11.20.0", + "@sentry/opentelemetry": "11.20.0", + "@sentry/server-runtime-injection": "11.20.0", + "@sentry/server-utils": "11.20.0" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" + } + }, + "node_modules/@sentry/opentelemetry": { + "version": "11.20.0", + "resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-11.20.0.tgz", + "integrity": "sha512-QAQHfuE7w2QrZWjZveyjNEr7I7b0FTujCRcnmXfuQPD8Egnof/HJuGaBdTcYbjp9DhIHUivyg6UILcN30dc0aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/conventions": "^0.36.0", + "@sentry/core": "11.20.0" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" + }, + "peerDependencies": { + "@opentelemetry/api": "^1.9.0" + } + }, + "node_modules/@sentry/server-runtime-injection": { + "version": "11.20.0", + "resolved": "https://registry.npmjs.org/@sentry/server-runtime-injection/-/server-runtime-injection-11.20.0.tgz", + "integrity": "sha512-xRF1iyxO51BoD+jR3kEPaBj1TtgT4YGsPDSYvP5xU2+6Kf2xSynR0znkwgeLCc9RPVg7iDpRaXKQEl3heYQLIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sentry/core": "11.20.0", + "@sentry/server-utils": "11.20.0" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" + } + }, + "node_modules/@sentry/server-utils": { + "version": "11.20.0", + "resolved": "https://registry.npmjs.org/@sentry/server-utils/-/server-utils-11.20.0.tgz", + "integrity": "sha512-dYUlhCv7RbbeaU6XsQIB2Zce8DOqh7O/9+IYgD1cSRERFeQceDo0KTBO8MaGPtRDkoLDf+SgjXhE2JGEVaDzww==", + "dev": true, + "license": "MIT", + "dependencies": { + "@opentelemetry/api": "^1.9.1", + "@sentry/conventions": "^0.36.0", + "@sentry/core": "11.20.0" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" + } + }, + "node_modules/@types/node": { + "version": "26.6.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.11.tgz", + "integrity": "sha512-uUyQ2XLEz+EXh34lmS3GhKrkqn/8FU7KUiKRpk347At2bmnMVWss45yz8b4FG/tUtmV1tV/+TVkITItPROyeeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/ajv": { + "version": "8.20.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", + "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ajv-formats": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "^8.0.0" + }, + "peerDependencies": { + "ajv": "^8.0.0" + }, + "peerDependenciesMeta": { + "ajv": { + "optional": true + } + } + }, + "node_modules/ansi-colors": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", + "integrity": "sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/atomically": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/atomically/-/atomically-2.1.1.tgz", + "integrity": "sha512-P4w9o2dqARji6P7MHprklbfiArZAWvo07yW7qs3pdljb3BWr12FIB7W+p0zJiuiVsUpRO0iZn1kFFcpPegg0tQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "stubborn-fs": "^2.0.0", + "when-exit": "^2.1.4" + } + }, + "node_modules/axe-core": { + "version": "4.14.1", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.14.1.tgz", + "integrity": "sha512-FHfa+lmNjQZfJz1q8wKqIDwC6DExcHt/pkjNQb09a3NPjCKg2rhu5qb2S4r76ASyFNNtuFooJpZe37OgudVGtQ==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/brace-expansion": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.1.0.tgz", + "integrity": "sha512-aa11Dv491GKnYqxaul3aRJ0szew7yMJMfZPnqD44NjGrZXoj62l41OEDDpdpC4eE2P88vBFfLuSyRhpG91NUvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/bundle-name": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-4.1.1.tgz", + "integrity": "sha512-DdH81/zPLVS11EUgWq3tEu/xn+EzljlMYooDNdzWEnFha3R3NBMpMV1UqYIpjYHV/SgpFKMIX1Oh7o06SjM/oA==", + "dev": true, + "license": "MIT", + "dependencies": { + "run-applescript": "^7.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chrome-launcher": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-1.2.3.tgz", + "integrity": "sha512-IpQuNUYnpXXq3VBRJInM7zTZDiAp/cu+zy0X74NjyQtFcZIQBbI64i0PYQO25wNwgmgw2cPBYitVmFz53N11Rg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/node": "*", + "escape-string-regexp": "^4.0.0", + "is-wsl": "^2.2.0", + "lighthouse-logger": "^2.0.1" + }, + "bin": { + "print-chrome-path": "bin/print-chrome-path.cjs" + }, + "engines": { + "node": ">=12.13.0" + } + }, + "node_modules/chromium-bidi": { + "version": "157.0.8090-0", + "resolved": "https://registry.npmjs.org/chromium-bidi/-/chromium-bidi-157.0.8090-0.tgz", + "integrity": "sha512-KJw7IQgqXwxpJgJlEIPg5mr2ZoqA+jkTRtc5EABI7sUJ3bu3cpI7NuEBoj4Gn1AsF78CaT9So5WQWspK3/wYag==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "mitt": "^3.0.1", + "zod": "^4.6.5" + }, + "engines": { + "node": ">=20.19.0 <22.0.0 || >=22.12.0" + }, + "peerDependencies": { + "devtools-protocol": "*" + } + }, + "node_modules/cliui": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-9.0.1.tgz", + "integrity": "sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^7.2.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/cliui/node_modules/ansi-regex": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.6.0.tgz", + "integrity": "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/cliui/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/configstore": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-8.0.0.tgz", + "integrity": "sha512-U51WPZg+o6FDFhBCV6yYFEspGMCoHvCgJSGFw9AwsW2u75gYBPoDlYca5XfDs4TdMUu3/y0R6FFdvvgyH31mKQ==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "atomically": "^2.1.0", + "dot-prop": "^10.1.0", + "graceful-fs": "^4.2.11", + "is-safe-filename": "^0.1.0", + "xdg-basedir": "^5.1.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/csp_evaluator": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/csp_evaluator/-/csp_evaluator-1.1.8.tgz", + "integrity": "sha512-EwOnfYuNbTytvbMKsLixTrRgnjOa0WZCxGy8A9nnSYAicrdwn+T/epU/yjgymmOxlgKnvH+8wXt+7p/8ak5Feg==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decimal.js": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.6.0.tgz", + "integrity": "sha512-YpgQiITW3JXGntzdUmyUR1V812Hn8T1YVXhCu+wO3OpS4eU9l4YdD3qjyiKdV6mvV29zapkMeD390UVEf2lkUg==", + "dev": true, + "license": "MIT" + }, + "node_modules/default-browser": { + "version": "5.5.1", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-5.5.1.tgz", + "integrity": "sha512-m1pAzaJgZ/gssEqlOhJkPJp8Xly7QyW6xcrkUa2KKcDeDSEMP7X8xipU3snUcfisTQx0w1AGae+9UtJSfVnXGw==", + "dev": true, + "license": "MIT", + "dependencies": { + "bundle-name": "^4.1.0", + "default-browser-id": "^5.0.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-5.0.1.tgz", + "integrity": "sha512-x1VCxdX4t+8wVfd1so/9w+vQ4vx7lKd2Qp5tDRutErwmR85OgmfX7RlLRMWafRMY7hbEiXIbudNrjOAPa/hL8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.1727723", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1727723.tgz", + "integrity": "sha512-laxmpDN+zItbpy5klVbHqBsZ38O2rC6VwI9W5daM11Pc3Dj2gruc2wwnHW48CB8wYiWHALDkA6vRg92U2cfdLA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/dot-prop": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-10.2.0.tgz", + "integrity": "sha512-BTJ9aZYL3vCfZlZOBLy9v8TUqWGQ0pzFnygKwFZt5udj6viBoFIBviKPUoZLDCPn1FoXffv6McQFDenrm5Krfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^5.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dotenv": { + "version": "17.4.2", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.2.tgz", + "integrity": "sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://dotenvx.com" + } + }, + "node_modules/emoji-regex": { + "version": "10.6.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.6.0.tgz", + "integrity": "sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==", + "dev": true, + "license": "MIT" + }, + "node_modules/enquirer": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", + "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-colors": "^4.1.1", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/entities": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-9.0.0.tgz", + "integrity": "sha512-oJFNDJg3kTPwAD1cNn2+WmUq4wFoo09npc3Ydf1D7ED4smRiWrsKnaLxykrTWgyGEcusc87P5dxlAleol9kpkg==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=20.19.0" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-uri": { + "version": "3.1.9", + "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.9.tgz", + "integrity": "sha512-hS/0Wt3Ya043oKXs0sIxrMpKQITXhMLIrVAKKXi4gozGC9v7YRWVnXIZzjNPTO02M9BdxLCWqK1yRXgNziVyJQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/fastify" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fastify" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.7.0.tgz", + "integrity": "sha512-XjH1AECxf0giL2V1aU8vKyRR2ppRUb5c0EvT7zuJTokQ74bNo52zOtghqdWIqrhUD79fo3x0WfKZdOqxF6LG1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "14.0.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-14.0.6.tgz", + "integrity": "sha512-OwXjVP2svY5EyLY75Vek96C8qK43gqrt4xsZ+qSILdnaEiJPXkd62mcfUSNx/TQErQRdu5uM5kF67sfONragKw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^11.0.5", + "minipass": "^7.1.3", + "path-scurry": "^3.0.0" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz", + "integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/http-link-header": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/http-link-header/-/http-link-header-1.1.4.tgz", + "integrity": "sha512-xT3GPW6/ZbGuw4UvwHqErSCEjNUlwbQJuZn9/q5U4WEKfp2kENVCAlousG1zLxHeaQ/ffOHUNpWamvkbBW0eNw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/image-ssim": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/image-ssim/-/image-ssim-0.2.0.tgz", + "integrity": "sha512-W7+sO6/yhxy83L0G7xR8YAc5Z5QFtYEXXRV6EaE8tuYBZJnA3gVgp3q7X7muhLZVodeb9UfvjSbwt9VJwjIYAg==", + "dev": true, + "license": "MIT" + }, + "node_modules/intl-messageformat": { + "version": "10.7.18", + "resolved": "https://registry.npmjs.org/intl-messageformat/-/intl-messageformat-10.7.18.tgz", + "integrity": "sha512-m3Ofv/X/tV8Y3tHXLohcuVuhWKo7BBq62cqY15etqmLxg2DZ34AGGgQDeR+SCta2+zICb1NX83af0GJmbQ1++g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@formatjs/ecma402-abstract": "2.3.6", + "@formatjs/fast-memoize": "2.2.7", + "@formatjs/icu-messageformat-parser": "2.11.4", + "tslib": "^2.8.0" + } + }, + "node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-in-ssh": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-in-ssh/-/is-in-ssh-1.0.0.tgz", + "integrity": "sha512-jYa6Q9rH90kR1vKB6NM7qqd1mge3Fx4Dhw5TVlK1MUBqhEOuCagrEHMevNuCcbECmXZ0ThXkRm+Ymr51HwEPAw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-inside-container/node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "license": "MIT", + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-safe-filename": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-safe-filename/-/is-safe-filename-0.1.1.tgz", + "integrity": "sha512-4SrR7AdnY11LHfDKTZY1u6Ga3RuxZdl3YKWWShO5iyuG5h8QS4GD2tOb04peBJ5I7pXbR+CGBNEhTcwK+FzN3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jpeg-js": { + "version": "0.4.4", + "resolved": "https://registry.npmjs.org/jpeg-js/-/jpeg-js-0.4.4.tgz", + "integrity": "sha512-WZzeDOEtTOBK4Mdsar0IqEU5sMr3vSV2RqkAIzUEV2BHnUfKGyswWFPFwK5EeDo93K3FohSHbLAjj0s1Wzd+dg==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/js-library-detector": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/js-library-detector/-/js-library-detector-6.7.0.tgz", + "integrity": "sha512-c80Qupofp43y4cJ7+8TTDN/AsDwLi5oOm/plBrWI+iQt485vKXCco+yVmOwEgdo9VOdsYTuV0UlTeetVPTriXA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true, + "license": "MIT" + }, + "node_modules/lighthouse": { + "version": "13.6.0", + "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-13.6.0.tgz", + "integrity": "sha512-2/HUPUpQyGm01VEgYCUjSlNZY7Zkhk1v3QI4c7UTbnaoRB7HF0qYMPzzaiidNf5iqw5wnmtm9LpGawKKqCfLmg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@paulirish/trace_engine": "0.0.67", + "@sentry/node": "^11.8.0", + "ajv-formats": "^3.0.1", + "axe-core": "4.14.0", + "chrome-launcher": "^1.2.2", + "configstore": "^8.0.0", + "csp_evaluator": "1.1.8", + "devtools-protocol": "0.0.1727723", + "enquirer": "^2.3.6", + "http-link-header": "^1.1.1", + "intl-messageformat": "^10.5.3", + "js-library-detector": "^6.7.0", + "lighthouse-logger": "^2.0.2", + "lighthouse-stack-packs": "1.12.3", + "open": "^11.0.4", + "puppeteer-core": "^25.16.0", + "robots-parser": "^3.0.1", + "speedline-core": "^1.4.3", + "third-party-web": "^0.30.0", + "tldts-icann": "^7.4.19", + "yargs": "^18.2.0", + "yargs-parser": "^22.0.0" + }, + "bin": { + "chrome-debug": "core/scripts/manual-chrome-launcher.js", + "lighthouse": "cli/index.js", + "smokehouse": "cli/test/smokehouse/frontends/smokehouse-bin.js" + }, + "engines": { + "node": ">=22.19" + } + }, + "node_modules/lighthouse-logger": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lighthouse-logger/-/lighthouse-logger-2.0.2.tgz", + "integrity": "sha512-vWl2+u5jgOQuZR55Z1WM0XDdrJT6mzMP8zHUct7xTlWhuQs+eV0g+QL0RQdFjT54zVmbhLCP8vIVpy1wGn/gCg==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "debug": "^4.4.1", + "marky": "^1.2.2" + } + }, + "node_modules/lighthouse-stack-packs": { + "version": "1.12.3", + "resolved": "https://registry.npmjs.org/lighthouse-stack-packs/-/lighthouse-stack-packs-1.12.3.tgz", + "integrity": "sha512-d8IsOpE83kbANgnM+Tp8+x6HcMpX9o2ITBiUERssgzAIFdZCQzs/f4k6D0DLQTE59enml9mbAOU52Wu35exWtg==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/lighthouse/node_modules/axe-core": { + "version": "4.14.0", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-4.14.0.tgz", + "integrity": "sha512-9WTZxEjsZ7b13TH8JPmbV2z8CHbl80/2hm3XPEG4JgNdQLK81IBRXmSxHfMAOkSqQeRxT/0dwNDz2GOm3zzpcQ==", + "dev": true, + "license": "MPL-2.0", + "engines": { + "node": ">=4" + } + }, + "node_modules/lru-cache": { + "version": "11.5.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", + "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/magic-string": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", + "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.6.0" + } + }, + "node_modules/marky": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/marky/-/marky-1.3.0.tgz", + "integrity": "sha512-ocnPZQLNpvbedwTy9kNrQEsknEfgvcLMvOtz3sFeWApDq1MXH1TqkCIx58xlpESsfwQOnuBO9beyQuNGzVvuhQ==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/minimatch": { + "version": "11.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.9.tgz", + "integrity": "sha512-KCFkfyjqerNlSstjlhIGNXIKZGA/6O4V4RlhZ+Dsr621SPPw0mzlypE9D9ZOoPiVefHID+j7/XuMMlqfD/F60Q==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/nonrecursive-glob-match": "^1.1.0", + "brace-expansion": "^5.0.12" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true, + "license": "MIT" + }, + "node_modules/modern-tar": { + "version": "0.8.7", + "resolved": "https://registry.npmjs.org/modern-tar/-/modern-tar-0.8.7.tgz", + "integrity": "sha512-q17gyzLiCw2wf/Rcl5c3EA5ynB2hOHb5+qMpbaILOQBaTiBx9bumfXC5sMk0wQrVoLtlBhW77dJTnLArlczsGg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/open": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/open/-/open-11.0.4.tgz", + "integrity": "sha512-++Zlftm0kVLPmzC06t6epuWmcRMDbI4z5P3NNX979WA/k23+NtSOynEGzsVfZwguKw2mi5umVgnBlJQMwRz4Pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "default-browser": "^5.5.1", + "define-lazy-prop": "^3.0.0", + "is-in-ssh": "^1.0.0", + "is-inside-container": "^1.0.0", + "powershell-utils": "^0.2.1", + "wsl-utils": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/oxc-parser": { + "version": "0.152.0", + "resolved": "https://registry.npmjs.org/oxc-parser/-/oxc-parser-0.152.0.tgz", + "integrity": "sha512-ZztsZgaCWmPeKYMdoTT5e0oV/oxD1NeLWNR3kAtr/G707cUPYaaozRlVDHLCGnszHJRszN9mJwmPNpqgwloC0A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@oxc-project/types": "^0.152.0" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/sponsors/oxc-project" + }, + "optionalDependencies": { + "@oxc-parser/binding-android-arm-eabi": "0.152.0", + "@oxc-parser/binding-android-arm64": "0.152.0", + "@oxc-parser/binding-darwin-arm64": "0.152.0", + "@oxc-parser/binding-darwin-x64": "0.152.0", + "@oxc-parser/binding-freebsd-x64": "0.152.0", + "@oxc-parser/binding-linux-arm-gnueabihf": "0.152.0", + "@oxc-parser/binding-linux-arm-musleabihf": "0.152.0", + "@oxc-parser/binding-linux-arm64-gnu": "0.152.0", + "@oxc-parser/binding-linux-arm64-musl": "0.152.0", + "@oxc-parser/binding-linux-ppc64-gnu": "0.152.0", + "@oxc-parser/binding-linux-riscv64-gnu": "0.152.0", + "@oxc-parser/binding-linux-riscv64-musl": "0.152.0", + "@oxc-parser/binding-linux-s390x-gnu": "0.152.0", + "@oxc-parser/binding-linux-x64-gnu": "0.152.0", + "@oxc-parser/binding-linux-x64-musl": "0.152.0", + "@oxc-parser/binding-openharmony-arm64": "0.152.0", + "@oxc-parser/binding-win32-arm64-msvc": "0.152.0", + "@oxc-parser/binding-win32-ia32-msvc": "0.152.0", + "@oxc-parser/binding-win32-x64-msvc": "0.152.0" + } + }, + "node_modules/parse5": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-8.1.1.tgz", + "integrity": "sha512-EcR/6WDcU7b2N3vQSxKALCk9lXGtUMQxXio008OEMBE0kavu/7JLfBEeFPzi43nMqVDSbEn3QCK+BMCc9zO//w==", + "dev": true, + "license": "MIT", + "dependencies": { + "entities": "^9.0.0" + }, + "funding": { + "url": "https://github.com/inikulin/parse5?sponsor=1" + } + }, + "node_modules/path-scurry": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-3.0.0.tgz", + "integrity": "sha512-1pTbQqH1wIwMi/eleQ5leFTTCkzFsPcgXNjwOA8YGGW/W4/kHT3dssE7Z6NH+zuqNLOzOB0uaD61yl7cAcVhgg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/playwright": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.65.1.tgz", + "integrity": "sha512-vJ1FuoOrNwOKHUIVEvSt3jT1L+wjjDpwhwIstKtfvTh8XIG4FG4bIFuvNdMxi81LGfAhUgUZleVFaOLY4RIUUw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "playwright-core": "1.65.1" + }, + "bin": { + "playwright": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/playwright-core": { + "version": "1.65.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.65.1.tgz", + "integrity": "sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "playwright-core": "cli.js" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/powershell-utils": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/powershell-utils/-/powershell-utils-0.2.1.tgz", + "integrity": "sha512-C+y9x90UElAddDZmV4qOx9W53B61PO7cIqWz2dQsWlwswuq4mr8NEwytdGKboYbQlGZ3awrkTeNvcZiZNHnQ8A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/puppeteer-core": { + "version": "25.19.0", + "resolved": "https://registry.npmjs.org/puppeteer-core/-/puppeteer-core-25.19.0.tgz", + "integrity": "sha512-F4pw8kpSczJS3TCHBw7/qskDxv4cMj09oOv7BwhHGYOerxLF1Sk2t4tpWlLvy6Vx/mM6TuqkDj4j0j3PRN1FiA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@puppeteer/browsers": "3.3.0", + "chromium-bidi": "157.0.8090-0", + "devtools-protocol": "0.0.1724436", + "typed-query-selector": "^2.12.3", + "webdriver-bidi-protocol": "1.0.2", + "ws": "^8.23.0" + }, + "engines": { + "node": ">=22.12.0" + } + }, + "node_modules/puppeteer-core/node_modules/devtools-protocol": { + "version": "0.0.1724436", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1724436.tgz", + "integrity": "sha512-GcO1782pvzpmY4pQO1zjr8WZ95Wv8GodOs0v5J9QWwLGulTzfYIYECEd9iUsnqJmcehu+VMKxZquvjY8T2jhAA==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/robots-parser": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/robots-parser/-/robots-parser-3.1.2.tgz", + "integrity": "sha512-smea6j7PZr2EACspuJLX6wlA1OfRSYcLjmMPiQOttvXaSjju8NLfi5xScYYM2tqz0011OUOYO+QDiLD1Z53UgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/run-applescript": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-7.1.0.tgz", + "integrity": "sha512-DPe5pVFaAsinSaV6QjQ6gdiedWDcRCbUuiQfQa2wmWV7+xC9bGulGI8+TdRmoFkAPaBXk8CrAbnlY2ISniJ47Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/sentry": { + "version": "0.50.0", + "resolved": "https://registry.npmjs.org/sentry/-/sentry-0.50.0.tgz", + "integrity": "sha512-2BCdoK4xO3mN4c0QTXaMtJBJ9rjL5v1VawaV7Wd605hVWVrpZTipLbjGHEFavS8IliI0W68TGi8CuScbHALPjA==", + "dev": true, + "license": "FSL-1.1-Apache-2.0", + "bin": { + "sentry": "dist/bin.cjs" + }, + "engines": { + "node": ">=20.0" + } + }, + "node_modules/speedline-core": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/speedline-core/-/speedline-core-1.4.3.tgz", + "integrity": "sha512-DI7/OuAUD+GMpR6dmu8lliO2Wg5zfeh+/xsdyJZCzd8o5JgFUjCeLsBDuZjIQJdwXS3J0L/uZYrELKYqx+PXog==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "image-ssim": "^0.2.0", + "jpeg-js": "^0.4.1" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/string-width": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", + "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-east-asian-width": "^1.5.0", + "strip-ansi": "^7.1.2" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.6.0.tgz", + "integrity": "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/stubborn-fs": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/stubborn-fs/-/stubborn-fs-2.0.0.tgz", + "integrity": "sha512-Y0AvSwDw8y+nlSNFXMm2g6L51rBGdAQT20J3YSOqxC53Lo3bjWRtr2BKcfYoAf352WYpsZSTURrA0tqhfgudPA==", + "dev": true, + "license": "MIT", + "dependencies": { + "stubborn-utils": "^1.0.1" + } + }, + "node_modules/stubborn-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stubborn-utils/-/stubborn-utils-1.0.2.tgz", + "integrity": "sha512-zOh9jPYI+xrNOyisSelgym4tolKTJCQd5GBhK0+0xJvcYDcwlOoxF/rnFKQ2KRZknXSG9jWAp66fwP6AxN9STg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tagged-tag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/tagged-tag/-/tagged-tag-1.0.0.tgz", + "integrity": "sha512-yEFYrVhod+hdNyx7g5Bnkkb0G6si8HJurOoOEgC8B/O0uXLHlaey/65KRv6cuWBNhBgHKAROVpc7QyYqE5gFng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/third-party-web": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/third-party-web/-/third-party-web-0.30.0.tgz", + "integrity": "sha512-p+PfyL5U0ediGzvwPzMSdD9MnC8rHW6nWJJVLIQvqN7RsSqfaZ+7n4c9GILqH36EYR0eXB9CzAeCRnKFr/9uJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tldts-core": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-7.6.3.tgz", + "integrity": "sha512-HjQiEhyxofqR2GM1cOp8CSwMYoKpmz/guhmZniTUayo7W/8d6uXebMelNanMFwRz0jKcMIprTzQDLuPdDyTBNA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tldts-icann": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/tldts-icann/-/tldts-icann-7.6.3.tgz", + "integrity": "sha512-aC/29OMZoF2mrwfQUSOeC6gk5/T4fWtY5Er/fX5WalsVW3v2TdhmZmaHgAthky1M72CnYXlgspbq3eCX+djaAQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tldts-core": "^7.6.3" + } + }, + "node_modules/tslib": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz", + "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==", + "dev": true, + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-5.10.0.tgz", + "integrity": "sha512-NoSdpq/WEiAg5sjmBkmV/hfxv6HJH4NqPNrqjtSO5CwRmpsDfaf4begxW34KdJykH/l1yHtwBWQkCRdoXO8mPA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "dependencies": { + "tagged-tag": "^1.0.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typed-query-selector": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/typed-query-selector/-/typed-query-selector-2.12.4.tgz", + "integrity": "sha512-lF6/OY655DSWZeuNovde8TZhju6QyC0Xtav57b07oZQ1EQvfSowA3+WfLEhvFJOc9sVfAtW5hie1lGIppOqbpQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/webdriver-bidi-protocol": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/webdriver-bidi-protocol/-/webdriver-bidi-protocol-1.0.2.tgz", + "integrity": "sha512-nghazPI+J5RrLZ+qb6vMjC6l1/tnwqr2muVEax4Ufd6eIdcjeqNnhLsAxTG9s+7Zf4umgf0DrEwDC8CoU91nAA==", + "dev": true, + "license": "Apache-2.0" + }, + "node_modules/when-exit": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/when-exit/-/when-exit-2.1.5.tgz", + "integrity": "sha512-VGkKJ564kzt6Ms1dbgPP/yuIoQCrsFAnRbptpC5wOEsDaNsbCB2bnfnaA8i/vRs5tjUSEOtIuvl9/MyVsvQZCg==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", + "integrity": "sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-regex": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.6.0.tgz", + "integrity": "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.2.0.tgz", + "integrity": "sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wrap-ansi/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/ws": { + "version": "8.23.1", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.23.1.tgz", + "integrity": "sha512-1rzWDSN0NOi3tpwgHsQExjWRoKUGtjCkJ2gZRaaRtzhYLboMytOI9pj9PU7yCgY37auqdd4OyLofZDbkeuZmPA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/wsl-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/wsl-utils/-/wsl-utils-1.0.1.tgz", + "integrity": "sha512-c16PKLIRxBYpR3jSWsdS7SFp0COm5SOQdiFjY818dYFHJbMGuLBszpF07LBWmOS1uzrHa9VGdynsEgoeKy0oOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-wsl": "^3.1.0", + "powershell-utils": "^0.2.0" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/wsl-utils/node_modules/is-wsl": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-3.1.1.tgz", + "integrity": "sha512-e6rvdUCiQCAuumZslxRJWR/Doq4VpPR82kqclvcS0efgt430SlGIk05vdCN58+VrzgtIcfNODjozVielycD4Sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-inside-container": "^1.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/xdg-basedir": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", + "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "18.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-18.2.0.tgz", + "integrity": "sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^9.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "string-width": "^8.2.1", + "y18n": "^5.0.5", + "yargs-parser": "^22.0.0" + }, + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/yargs-parser": { + "version": "22.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-22.0.0.tgz", + "integrity": "sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==", + "dev": true, + "license": "ISC", + "engines": { + "node": "^20.19.0 || ^22.12.0 || >=23" + } + }, + "node_modules/zod": { + "version": "4.6.7", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.7.tgz", + "integrity": "sha512-g8W2D2kU6a8untc053fX1uVBKzM7yqAxW/3zwk83+6RyF2+SKOuV+c0wBDhUwzV1PaGapmZH+rmcUzPf+3CGwg==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/scripts/ci/package.json b/scripts/ci/package.json new file mode 100644 index 0000000..b7ad07a --- /dev/null +++ b/scripts/ci/package.json @@ -0,0 +1,18 @@ +{ + "name": "blog-ci-checks", + "private": true, + "type": "module", + "engines": { + "node": ">=24" + }, + "scripts": { + "test": "node --test *.test.mjs" + }, + "devDependencies": { + "@axe-core/playwright": "4.14.1", + "chrome-launcher": "1.2.3", + "lighthouse": "13.6.0", + "parse5": "8.1.1", + "playwright": "1.65.1" + } +} diff --git a/scripts/ci/report.mjs b/scripts/ci/report.mjs new file mode 100644 index 0000000..c0a1186 --- /dev/null +++ b/scripts/ci/report.mjs @@ -0,0 +1,14 @@ +import { writeFile } from 'node:fs/promises'; +import path from 'node:path'; + +export async function saveReport(result, directory, name, pathname) { + const score = result?.lhr?.categories?.performance?.score; + if (!result?.lhr || !Array.isArray(result.report) || result.report.length !== 2 || + result.report.some(report => typeof report !== 'string' || !report) || + result.lhr.runtimeError || typeof score !== 'number' || !Number.isFinite(score)) { + throw new Error(`Lighthouse did not complete for ${pathname}: ${result?.lhr?.runtimeError?.message || 'missing report or score'}`); + } + await writeFile(path.join(directory, `${name}.html`), result.report[0]); + await writeFile(path.join(directory, `${name}.json`), result.report[1]); + return score; +} diff --git a/scripts/ci/scan.mjs b/scripts/ci/scan.mjs new file mode 100644 index 0000000..e9caf29 --- /dev/null +++ b/scripts/ci/scan.mjs @@ -0,0 +1,11 @@ +import { AxeBuilder } from '@axe-core/playwright'; + +export async function scanPage(page, label) { + const result = await new AxeBuilder({ page }).analyze(); + for (const violation of result.violations) { + console.error(`${label}: ${violation.id} (${violation.impact}): ${violation.help}`); + for (const node of violation.nodes) console.error(` ${node.target.join(' ')}`); + } + console.log(`${label}: ${result.violations.length} axe violations`); + return result.violations.length; +} diff --git a/scripts/test_check_links.py b/scripts/test_check_links.py new file mode 100644 index 0000000..7be8139 --- /dev/null +++ b/scripts/test_check_links.py @@ -0,0 +1,51 @@ +import tempfile +import unittest +from pathlib import Path + +from check_links import check_links + + +class LinkChecksTest(unittest.TestCase): + def setUp(self): + self.directory = tempfile.TemporaryDirectory() + self.addCleanup(self.directory.cleanup) + self.root = Path(self.directory.name) + (self.root / "post").mkdir() + (self.root / "post" / "index.html").write_text('

Title

', encoding="utf-8") + (self.root / "image.webp").write_bytes(b"image") + + def check(self, markup): + (self.root / "index.html").write_text(markup, encoding="utf-8") + return check_links(self.root) + + def test_existing_paths_fragments_and_srcset_pass(self): + self.assertEqual(self.check( + 'Post' + 'Canonical' + '' + ), []) + + def test_missing_page_and_fragment_fail(self): + issues = self.check('MissingAnchor') + self.assertEqual(len(issues), 2) + self.assertTrue(any("target is missing" in issue for issue in issues)) + self.assertTrue(any("fragment is missing" in issue for issue in issues)) + + def test_external_and_non_http_links_are_skipped(self): + self.assertEqual(self.check( + 'External' + 'Mail' + ), []) + + def test_missing_responsive_asset_fails(self): + issues = self.check('') + self.assertEqual(len(issues), 1) + self.assertIn("/missing.webp", issues[0]) + + def test_encoded_paths_and_fragment(self): + (self.root / "post" / "index.html").write_text('

Title

', encoding="utf-8") + self.assertEqual(self.check('Post'), []) + + +if __name__ == "__main__": + unittest.main() diff --git a/static/safari-pinned-tab.svg b/static/safari-pinned-tab.svg new file mode 100644 index 0000000..e8d0f89 --- /dev/null +++ b/static/safari-pinned-tab.svg @@ -0,0 +1,3 @@ + + +