The `rollbar-cli` package provides a command-line interface for interacting with the Rollbar API, focusing on critical development and deployment tasks. Its primary functions include uploading JavaScript source maps and notifying Rollbar of new code deployments. The current stable version is 0.2.1, which primarily includes an internal dependency security fix. While a formal release cadence isn't explicitly defined, updates appear to be driven by feature additions or security patches as needed. Key differentiators lie in its direct integration with the Rollbar platform, simplifying the workflow for developers needing to associate minified production code with its original source for debugging, and to track deployment lifecycles. It offers both traditional source map uploads and a newer method (since v0.2.0) for zipping and uploading multiple maps as a single file.
npm install rollbar-cliNo compatibility data collected yet for this library.
Demonstrates how to programmatically execute `rollbar-cli` commands to upload source maps and notify a deployment from a Node.js script, suitable for CI/CD pipelines.
Always review the command help (`rollbar-cli <command> --help`) and provide all mandatory options with their correct values. For sensitive data like `--access-token`, consider using environment variables.
Ensure `--url-prefix` exactly matches the base URL of your assets in production stack traces, and `--code-version` matches the value sent with your Rollbar error items (e.g., from your Rollbar.js configuration).
For new projects or existing ones with many source maps, consider using the `--next` flag with `upload-sourcemaps`. Test both methods to see which performs better for your build process.
Upgrade to `rollbar-cli` version `0.2.1` or higher to ensure the patched `axios` version is in use: `npm install -g rollbar-cli@latest`.
Review the command's requirements and add the missing option with its corresponding value. For example, `rollbar-cli upload-sourcemaps ... --access-token YOUR_TOKEN`.
Provide the absolute or relative path to your build output directory as the first argument to the command. Example: `rollbar-cli upload-sourcemaps ./dist ...`.
Install the package globally using `npm install -g rollbar-cli`. If already installed, ensure your system's PATH includes the directory where global npm binaries are stored.
Verify that the `--access-token` is correct and active in your Rollbar project settings. Ensure it is a 'post_server_item' token and has the required read/write permissions for source maps and deployments.
No dependency data recorded yet.