In your build pipeline, you will need to run the CLI tool. Here's how to run it:
npx @hyperdx/cli upload-sourcemaps --path="/path/to/sourcemaps" --apiKey="your-api-key"
You can also add this as an npm script
// In package.json
{
"scripts": {
"upload-sourcemaps": "npx @hyperdx/cli upload-sourcemaps --path=\"/path/to/sourcemaps\""
}
}
Optionally, you can set the HYPERDX_API_ACCESS_KEY
environment variable to avoid passing the apiKey
flag.
You can test your changes locally by running the following commands:
yarn build
node dist/index.js upload ...