ov.analysis.arch.bundles#
Source-map detection + recovery – the decisive bimodal lever (D2).
Reconstruction quality is bimodal: WITH source maps you recover the original file
tree, source text, and node_modules version paths; WITHOUT them you get a
beautified-but-renamed approximation. So this analyzer detects map presence from
the captured JS bodies and asset URLs and sets source_maps_present (which
gates downstream reconstruction confidence everywhere).
Recovery is pure-Python and Node-free (see ov.analysis.arch.sourcemaps):
it parses any captured .map body (explicit source_map artifacts, incidental
.map responses, or inline data: maps), persists each recovered file
content-addressed (recovered_source artifacts indexed by a manifest blob), and
surfaces recovered node_modules packages as top-provenance
artifacts`, so re-analysis stays idempotent.
Functions
|
Set |
|
Detect source-map presence from JS bodies + asset urls (pure, testable). |
|
Return |
- ov.analysis.arch.bundles.analyze_bundles(ctx)[source]#
Set
run.source_maps_presentand emit an arch_fact (+ optional recovery).- Return type:
- ov.analysis.arch.bundles.detect_source_maps(js_bodies, asset_urls)[source]#
Detect source-map presence from JS bodies + asset urls (pure, testable).
>>> detect_source_maps([("a.js", "x=1\n//# sourceMappingURL=a.js.map")], [])[0] True >>> detect_source_maps([("a.js", "x=1")], ["https://x/b.js.map"])[0] True >>> detect_source_maps([("a.js", "x=1")], [])[0] False