Universal JS bundle extractor: routes, API endpoints, UI strings, i18n keys, source maps
Project description
bundle-parser
Universal JS bundle extractor for routes, API endpoints, UI strings, i18n keys, and source maps.
Install
pip install .
Use
Command Line
bundle-parser path/to/bundle.js [output.json]
Example:
bundle-parser app.min.js report.json
Python API
from bundle_parser import parse_bundle_file
report = parse_bundle_file('app.min.js')
print("Bundler:", report.detection['bundler'])
print("Routes:", report.extraction['routes'])
print("API Endpoints:", report.extraction['api_endpoints'])
print("UI Strings:", report.extraction['ui_strings'])
print("Confidence:", report.confidence)
Example Output
{
"detection": {
"bundler": "webpack",
"obfuscation": "partial",
"has_source_map": true,
"is_split_chunks": true,
"detector_confidence": 0.92
},
"extraction": {
"routes": ["/api/users", "/api/posts", "/dashboard"],
"ui_strings": ["Welcome", "Loading...", "Error"],
"ui_elements": ["Button", "Form", "Modal"],
"api_endpoints": ["https://api.example.com/v1/users", "https://api.example.com/v1/posts"],
"i18n_keys": ["common.welcome", "common.error"],
"source_maps": ["app.min.js.map"],
"chunks": ["app.chunk1.js", "app.chunk2.js"],
"counts": {
"routes": 3,
"ui_strings": 3,
"ui_elements": 3,
"api_endpoints": 2,
"i18n_keys": 2,
"source_maps": 1,
"chunks": 2
}
},
"confidence": 0.87
}
What it provides
bundle_parser.parse_bundle_file(...)for programmatic usebundle-parserconsole script for CLI runs
Dependencies
pyjsparser>=2.7.1
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bundle_parser-0.1.0.tar.gz
(15.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bundle_parser-0.1.0.tar.gz.
File metadata
- Download URL: bundle_parser-0.1.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4dd1edb05c52dac0e516a867f491b7fd00314acf94743d89595c675464571d4f
|
|
| MD5 |
253dbf83c5d8f54df2c8986c2007605d
|
|
| BLAKE2b-256 |
684a41057b0c1c3c73f7490f4ec9f5ad0c1b0e2d0ddefa4a56fe999c82492893
|
File details
Details for the file bundle_parser-0.1.0-py3-none-any.whl.
File metadata
- Download URL: bundle_parser-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e0bc4923c873553c56373ea5f608afcfda4ddb065862355cd69f6d7037032b0
|
|
| MD5 |
3e15b54d18c283447d82cf87b65c591d
|
|
| BLAKE2b-256 |
e379fc45e05f5e67b0b58988e2674d2e6b4f9583fd5ab0d79eb1122e673f4492
|