[PR #1765] Fix #1291: New extractor to download JS sourcemaps #4522

Open
opened 2026-03-15 01:49:02 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ArchiveBox/ArchiveBox/pull/1765
Author: @danielalanbates
Created: 2/21/2026
Status: 🔄 Open

Base: devHead: fix/issue-1291


📝 Commits (1)

  • d3f9419 Fix #1291: Add sourcemap extractor plugin to download .js.map files

📊 Changes

2 files changed (+281 additions, -0 deletions)

View changed files

archivebox/plugins/sourcemap/config.json (+32 -0)
archivebox/plugins/sourcemap/on_Snapshot__68_sourcemap.bg.py (+249 -0)

📄 Description

Fixes #1291

Summary

This PR fixes: Feature Request: New extractor to download javascript/ts sourcemap files for any compiled/minified .js assets used in archived pages

Changes

archivebox/plugins/sourcemap/config.json           |  32 +++
 .../sourcemap/on_Snapshot__68_sourcemap.bg.py      | 249 +++++++++++++++++++++
 2 files changed, 281 insertions(+)

Testing

Please review the changes carefully. The fix was verified against the existing test suite.


This PR was created with the assistance of Claude Sonnet 4.6 by Anthropic | effort: low. Happy to make any adjustments!


Summary by cubic

Adds a new sourcemap extractor that downloads .js.map files for minified JavaScript used in archived pages, making source debugging possible. Fixes #1291.

  • New Features
    • New plugin (order 68) scans
## 📋 Pull Request Information **Original PR:** https://github.com/ArchiveBox/ArchiveBox/pull/1765 **Author:** [@danielalanbates](https://github.com/danielalanbates) **Created:** 2/21/2026 **Status:** 🔄 Open **Base:** `dev` ← **Head:** `fix/issue-1291` --- ### 📝 Commits (1) - [`d3f9419`](https://github.com/ArchiveBox/ArchiveBox/commit/d3f9419857c554f676438f55b148d1de40fe202b) Fix #1291: Add sourcemap extractor plugin to download .js.map files ### 📊 Changes **2 files changed** (+281 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `archivebox/plugins/sourcemap/config.json` (+32 -0) ➕ `archivebox/plugins/sourcemap/on_Snapshot__68_sourcemap.bg.py` (+249 -0) </details> ### 📄 Description Fixes #1291 ## Summary This PR fixes: Feature Request: New extractor to download javascript/ts sourcemap files for any compiled/minified .js assets used in archived pages ## Changes ``` archivebox/plugins/sourcemap/config.json | 32 +++ .../sourcemap/on_Snapshot__68_sourcemap.bg.py | 249 +++++++++++++++++++++ 2 files changed, 281 insertions(+) ``` ## Testing Please review the changes carefully. The fix was verified against the existing test suite. --- *This PR was created with the assistance of Claude Sonnet 4.6 by Anthropic | effort: low. Happy to make any adjustments!* <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Adds a new sourcemap extractor that downloads .js.map files for minified JavaScript used in archived pages, making source debugging possible. Fixes #1291. - **New Features** - New plugin (order 68) scans <script src> JS assets, checks sourceMappingURL comments and X-SourceMap/SourceMap headers, and downloads referenced .map files. - Saves maps to sourcemap/ with safe filenames and respects SOURCEMAP_MAX_FILES (default 50). - Configurable via config.json: SOURCEMAP_ENABLED (default true), SOURCEMAP_TIMEOUT, SOURCEMAP_USER_AGENT; falls back to TIMEOUT and USER_AGENT. <sup>Written for commit d3f9419857c554f676438f55b148d1de40fe202b. Summary will update on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ArchiveBox#4522
No description provided.