openreplay/sourcemap-uploader
2021-05-10 12:35:17 +02:00
..
lib fix (sourcemap-uploader): logs to show the map-realted files & readme info 2021-05-10 12:35:17 +02:00
.eslintrc.json feat: init sourcemap-uploader 2021-05-03 17:17:26 +02:00
.gitignore feat: init sourcemap-uploader 2021-05-03 17:17:26 +02:00
.npmignore feat: init sourcemap-uploader 2021-05-03 17:17:26 +02:00
cli.js fix (sourcemap-uploader): logs to show the map-realted files & readme info 2021-05-10 12:35:17 +02:00
index.js feat: init sourcemap-uploader 2021-05-03 17:17:26 +02:00
LICENSE feat: init sourcemap-uploader 2021-05-03 17:17:26 +02:00
package-lock.json fix (sourcemap-uploader): logs to show the map-realted files & readme info 2021-05-10 12:35:17 +02:00
package.json feat: init sourcemap-uploader 2021-05-03 17:17:26 +02:00
README.md fix (sourcemap-uploader): logs to show the map-realted files & readme info 2021-05-10 12:35:17 +02:00

sourcemaps-uploader

A NPM module to upload your JS sourcemaps files to OpenReplay.

Installation

npm i @openreplay/sourcemap-uploader -D

CLI

Upload sourcemap for one file

sourcemap-uploader -k API_KEY -p PROJECT_KEY file -m ./dist/index.js.map -u https://myapp.com/index.js

Upload all sourcemaps in the directory. The url must correspond to the root where you upload JS files from the directory.

Thus, if you have your app-42.js along with the app-42.js.map in the ./build folder and then want to upload it to you server (you might want to avoid uploading soursemaps) so it can be reachable through the link https://myapp.com/static/app-42.js, the command would be the next:

sourcemap-uploader -k API_KEY -p PROJECT_KEY dir -m ./build -u https://myapp.com/static

NPM

There are two functions inside index.js of the package

uploadFile(api_key, project_key, sourcemap_file_path, js_file_url)
uploadDir(api_key, project_key, sourcemap_dir_path, js_dir_url)

Both functions return Promise.