npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tracewayapp/sourcemap-upload

v1.0.7

Published

CLI tool for uploading source maps to Traceway

Readme

Traceway Source Map Upload CLI

Uploads .map files to your Traceway backend so the dashboard can resolve minified production stack traces back to the original file, line, and column. Run it once per build, after your bundler has emitted the maps.

Traceway is a completely open-source error tracking platform. You can self-host it or use Traceway Cloud.

Features

  • Walks a directory and uploads every .map file it finds
  • Single-purpose CLI — no config file, no plugin, just one command
  • Reads credentials from flags or environment variables (CI-friendly)
  • Tags each map with the version you pass; the SDK's version option ties production exceptions back to the right map
  • Skips files larger than 50 MB

Generate an Upload Token

  1. Open your Traceway dashboard
  2. Go to the Connection page
  3. Under Source Map Upload, click Generate Upload Token
  4. Copy the token

The upload token is separate from the project's reporting token. It can be revoked or rotated independently and only allows uploading source maps for that project.

Quick Start

Run after your production build:

npx @tracewayapp/sourcemap-upload \
  --url https://traceway.example.com \
  --token YOUR_SOURCE_MAP_TOKEN \
  --version 1.0.0 \
  --directory dist/assets

The --version you pass here must match the version option you give the SDK at runtime — the dashboard joins exceptions and maps by that string.

Options

| Flag | Env variable | Required | Description | |------|--------------|----------|-------------| | --url | TRACEWAY_URL | Yes | Traceway backend URL (no trailing slash) | | --token | TRACEWAY_SOURCEMAP_TOKEN | Yes | Source map upload token from the dashboard | | --version | — | Yes | App version to associate with the source maps | | --directory | — | No | Directory to walk for .map files (default: .) |

Environment variables

In CI/CD, prefer environment variables so the token is never on the command line:

export TRACEWAY_URL=https://traceway.example.com
export TRACEWAY_SOURCEMAP_TOKEN=$TRACEWAY_TOKEN_FROM_SECRETS

npx @tracewayapp/sourcemap-upload \
  --version $CI_COMMIT_SHA \
  --directory dist/assets

CI/CD Integration

Add source-map upload as a step after your build. Use the same --version you embed in the SDK so the dashboard can resolve stack traces.

GitHub Actions

- name: Build
  run: npm run build

- name: Upload source maps
  run: |
    npx @tracewayapp/sourcemap-upload \
      --url ${{ secrets.TRACEWAY_URL }} \
      --token ${{ secrets.TRACEWAY_SOURCEMAP_TOKEN }} \
      --version ${{ github.sha }} \
      --directory dist/assets

GitLab CI

deploy:
  script:
    - npm run build
    - npx @tracewayapp/sourcemap-upload
        --url $TRACEWAY_URL
        --token $TRACEWAY_SOURCEMAP_TOKEN
        --version $CI_COMMIT_SHA
        --directory dist/assets

Limits

  • Each .map file must be under 50 MB
  • Only .map files are uploaded — siblings (.js, .css, etc.) are ignored
  • Maps are identified by (version, filename) on the backend, so re-running the upload for the same version overwrites previous uploads

Tying Maps to Exceptions

Pass the same version to the SDK at runtime so the backend can resolve uploaded maps:

// Browser
init("token@https://traceway.example.com/api/report", { version: "1.0.0" });

// React Native
<TracewayProvider connectionString={DSN} options={{ version: "1.0.0" }}>

Once a map is uploaded, every exception captured under that version shows the original source location in the dashboard.

Links

License

MIT