Skip to content

0xdevalias/poc-source-map-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

poc-source-map-cli

Recover the original code from a minified file and source map.

Installation

⇒ npm install

Usage

Output JSON encoded object of fileUrls -> original source code:

⇒ ./index.js "/path/to/file.js.map"

You could then pipe that into jq to see all of the fileUrls included:

⇒ ./index.js "/path/to/file.js.map" | jq 'keys'

Then choosing one of those keys, use jq again to access just the original source code for that fileUrl:

⇒ ./index.js "/path/to/file.js.map" | jq -r '."webpack:///app/src/cli/main.ts"'

Which you could then pipe into a file, text editor, etc:

⇒ ./index.js "/path/to/file.js.map" | jq -r '."webpack:///app/src/cli/main.ts"' > main.ts.orign

⇒ ./index.js "/path/to/file.js.map" | jq -r '."webpack:///app/src/cli/main.ts"' | $EDITOR

See Also

About

Recover the original code from a minified file and source map

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Packages

No packages published