openreplay/sourcemap-uploader
2021-07-14 20:59:43 +05:30
..
lib v1.1.0 (#31) 2021-06-11 23:31:29 +05:30
.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): rename conflicting argument 2021-06-28 19:48:00 +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 fix(sourcemap-uploader): rename conflicting argument 2021-06-28 19:48:00 +02:00
README.md 🧹 Updated source-map uploader readme 2021-06-23 20:48:47 +02:00

sourcemap-uploader

An NPM module to upload your JS sourcemap files to your OpenReplay instance.

Installation

npm i -D @openreplay/sourcemap-uploader

CLI

Upload sourcemap for one file:

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

Upload all sourcemaps in a given directory. The URL must correspond to the root where you upload JS files from the directory. In other words, 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 your OpenReplay instance so it can be reachable through the link https://myapp.com/static/app-42.js, then the command should be like:

sourcemap-uploader -s https://opnereplay.mycompany.com/api -k API_KEY -p PROJECT_KEY dir -m ./build -u https://myapp.com/static
  • Use -s (--server) to specify the URL of your OpenReplay instance (make to append it with /api)
  • Use -v (--verbose) to see the logs.

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.