https://github.com/mediamonks/tawang-server
Submit your source map and code location, get the location in the original code.
https://github.com/mediamonks/tawang-server
api mediamonks source-map tawang
Last synced: 4 days ago
JSON representation
Submit your source map and code location, get the location in the original code.
- Host: GitHub
- URL: https://github.com/mediamonks/tawang-server
- Owner: mediamonks
- Created: 2018-08-24T11:37:06.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-24T11:47:01.000Z (almost 8 years ago)
- Last Synced: 2025-08-30T23:52:39.253Z (11 months ago)
- Topics: api, mediamonks, source-map, tawang
- Language: JavaScript
- Homepage:
- Size: 22.5 KB
- Stars: 0
- Watchers: 8
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sourcemap-parse-api
Submit your source map and code location, get the location in the original code.
## Usage
`npm install`
Run in development mode:
`npm run dev`
Run in production mode:
`npm run start`
## API Documentation
### POST /source-map
Saves a new source-map on the server.
#### Request
The request must contain the following post body:
```javascript
{
"map": The source map as a JSON string.
}
```
#### Response
```javascript
{
"id": The id of the source map on the server.
}
```
### POST /source-map/:id
Returns an array with the original source locations for all generated source locations in the request.
Each location object contains the original source, line, and column.
#### Request
The request must contain the following post body:
```javascript
{
"errors": [
{
"line": The line number in the generated file.
"column": The column number in the generated file.
}
...
]
}
```
#### Response
```javascript
[
{
"source": The original source file of the location.
"line": The line number in the original file.
"column": The column number in the original file.
}
...
]
```