sourcemaps-uploaderA NPM module to upload your JS sourcemaps files to Asayer.
npm i @asayerio/sourcemaps-uploader
CLIUpload sourcemap for one file
sourcemaps-uploader -k API_KEY -p PROJECT_ID file -m ./dist/index.js.map -u https://asayer.io/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.jsalong with the
./buildfolder 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:
sourcemaps-uploader -k API_KEY -p PROJECT_ID dir -m ./build -u https://myapp.com/static
NPMThere are two functions inside
index.jsof the package
uploadFile(api_key, project_id, sourcemap_file_path, js_file_url) uploadDir(api_key, project_id, sourcemap_dir_path, js_dir_url)
Both functions return Promise.