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

Open
opened 2026-03-01 18:01:24 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/ArchiveBox/ArchiveBox/pull/1765

State: open
Merged: No


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
**Original Pull Request:** https://github.com/ArchiveBox/ArchiveBox/pull/1765 **State:** open **Merged:** No --- 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. -->
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#3018
No description provided.