@bugsplat/symbol-upload

中文文档
11.1.0发布于 2026/11/02MITTypeScriptCommonJS构建来源已验证近 30 天下载 4468

Cross platform symbol upload tool

原始使用文档
文档目录6 节
  1. Crash and error reporting built for busy developers.
  2. Action
  3. Command Line
  4. Self-Hosted Symbol Servers
  5. API
  6. Module Compatibility

bugsplat-github-banner-basic-outline

BugSplat

Crash and error reporting built for busy developers.


symbol-upload

This repo is a simple Node.js utility, set of libraries, and GitHub action for uploading symbol files or source maps to BugSplat. This utility is designed to be used in your build process to upload symbols to BugSplat automatically for each production build. This package can be used as a library or a command line utility.

Action

Use the symbol-upload action in your GitHub Actions workflow by modifying the following snippet.

- name: Symbols 📦
  uses: BugSplat-Git/symbol-upload@v11
  with:
    clientId: "${{ secrets.SYMBOL_UPLOAD_CLIENT_ID }}"
    clientSecret: "${{ secrets.SYMBOL_UPLOAD_CLIENT_SECRET }}"
    database: "${{ secrets.BUGSPLAT_DATABASE }}"
    application: "your-application"
    version: "your-version"
    files: "**/*.{pdb,exe,dll}"
    directory: "your-build-directory"
    node-version: "24"
    dumpSyms: false

Be sure to use secrets so that you don't expose the values for clientId, clientSecret, and database.

Pin @v11 to track the latest 11.x release, or an exact tag like @v11.0.0. The action installs the @bugsplat/symbol-upload npm package version matching the pinned ref; SHA and branch refs install the version recorded in that commit's package.json. Set symbol-upload-version to override.

Command Line

Install this symbol-upload globally using npm.

npm i -g @bugsplat/symbol-upload

Alternatively, you can download a binary version using the terminal.

macos

curl -sL -O "https://app.bugsplat.com/download/symbol-upload-macos" && chmod +x symbol-upload-macos

windows

Invoke-WebRequest -Uri "https://app.bugsplat.com/download/symbol-upload-windows.exe" -OutFile "symbol-upload-windows.exe"

linux

curl -sL -O  "https://app.bugsplat.com/download/symbol-upload-linux" && chmod +x symbol-upload-linux

Run symbol-upload with -h to see the latest usage information and package version:

bobby@BugSplat % ~ % symbol-upload -h

@bugsplat/symbol-upload v10.5.2

  symbol-upload contains a command line utility and a set of libraries to help  
  you upload symbol files to BugSplat.                                          

Usage

  -h, --help                          Print this usage guide.                   
  -b, --database string               Your BugSplat database name. The value of 
                                      database must match the value used to     
                                      post crash reports. This value can also   
                                      be provided via the BUGSPLAT_DATABASE     
                                      environment variable.                     
  -a, --application string            The name of your application. If not      
                                      provided symbol-upload will attempt to    
                                      use the value of the name field in        
                                      package.json if it exists in the current  
                                      working directory.                        
  -v, --version string                Your application's version. If not        
                                      provided symbol-upload will attempt to    
                                      use the value of the version field in     
                                      package.json if it exists in the current  
                                      working directory.                        
  -i, --clientId string               An OAuth2 Client Credentials Client ID    
                                      for the specified database. If provided   
                                      --clientSecret must also be provided.     
                                      This value can also be provided via the   
                                      SYMBOL_UPLOAD_CLIENT_ID environment       
                                      variable.                                 
  -s, --clientSecret string           An OAuth2 Client Credentials Client       
                                      Secret for the specified database. If     
                                      provided --clientId must also be          
                                      provided. This value can also be provided 
                                      via the SYMBOL_UPLOAD_CLIENT_SECRET       
                                      environment variable.                     
  -r, --remove                        Removes symbols for a specified database, 
                                      application, and version. If this option  
                                      is provided no other actions are taken.   
  -f, --files string (optional)       Glob pattern that specifies a set of      
                                      files to upload. For example,             
                                      **/*.{pdb,exe,dll} will recursively       
                                      search for .pdb, .exe, and .dll files.    
                                      Defaults to "*.js.map"                    
  -d, --directory string (optional)   Path of the base directory used to search 
                                      for symbol files. This value will be      
                                      combined with the --files glob. Defaults  
                                      to '.'                                    
  -m, --dumpSyms boolean (optional)   Use dump_syms to generate and upload sym  
                                      files for specified binaries.             
  -l, --localPath string (optional)   Path to a directory to copy symbols to.   
                                      If provided, the files will be copied to  
                                      the provided path instead of being        
                                      uploaded to BugSplat. Useful for creating 
                                      a self-hosted symbol server.              

  The -i and -s arguments are not required if you set the environment variables 
  SYMBOL_UPLOAD_CLIENT_ID and SYMBOL_UPLOAD_CLIENT_SECRET.                      

Example

  symbol-upload -b your-bugsplat-database -a your-application-name -v your-     
  version -i your-client-id -s your-client-secret [ -f "*.js.map" -d            
  "/path/to/containing/dir" ]                                                   

Links

  🐛 https://bugsplat.com                          
                                                   
  💻 https://github.com/BugSplat-Git/symbol-upload 
                                                   
  💌 [email protected]

Run symbol-upload specifying a glob pattern for -f and a path with forward slashes for -d. Multiple file types can be specified in curly brackets separated by a comma, and wildcards can be used to search directories recursively. For example, **/*.{pdb,exe,dll} will search for all .pdb, .exe, and .dll files in the current directory and all subdirectories. Optionally, you can specify the -m flag to run dump_syms against the specified binaries and upload the resulting .sym files.

Self-Hosted Symbol Servers

The symbol-upload tool can be used to create a SymSrv directory structure for Windows symbols that is compatible with both BugSplat and Microsoft Visual Studio. Additionally, symbol-upload can also create a SymSrv directory structure for macOS and Crashpad symbols that is compatible with BugSplat.

To upload symbols to a local directory, provide the -l flag and a path where the symbols will be copied.

symbol-upload -f "**/*.{pdb,exe,dll}" -l "C:\path\to\output"

Next, use a sync tool to upload the directory to a cloud services provider. The following is an example that uses s3 sync via the AWS CLI.

aws s3 sync . s3://your-bucket-name-here

To connect BugSplat to your self-hosted symbol server please refer to our Symbol Server documentation.

API

Install this package locally

npm i @bugsplat/symbol-upload

Module Compatibility

This package supports both ES modules (ESM) and CommonJS (CJS) formats. You can use it in either environment:

ES Modules (ESM):

import { OAuthClientCredentialsClient, uploadSymbolFiles } from '@bugsplat/symbol-upload';

CommonJS (CJS):

const { OAuthClientCredentialsClient, uploadSymbolFiles } = require('@bugsplat/symbol-upload');

Import OAuthClientCredentialsClient from @bugsplat/symbol-upload and authenticate with an OAuth2 Client Credentials Client ID and Client Secret.

Create a new instance of OAuthClientCredentialsClient using the createAuthenticatedClient async factory function.

const bugsplat = await OAuthClientCredentialsClient.createAuthenticatedClient(clientId, clientSecret);

Upload your symbol files to bugsplat by calling the uploadSymbolFiles function.

const directory = '/path/to/symbols/dir';
const files = ['my-cool-app.exe', 'my-cool-app.pdb'];
await uploadSymbolFiles(bugsplat, database, application, version, directory, files);

If you've done everything correctly, your symbols should appear when you click the application link on the Versions page.

image

Thanks for using BugSplat!

版本与发布记录

@bugsplat/symbol-upload 共发布 72 个版本,首次发布于 2021/03/29;过去 12 个月发布了 11 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
11.1.0latest2026/11/026 天前
11.0.12026/10/031 个月前
11.0.02026/08/142 个月前
10.5.42026/08/142 个月前
10.5.32026/08/122 个月前
10.5.22026/08/043 个月前

关于 @bugsplat/symbol-upload 的常见问题

@bugsplat/symbol-upload 是什么?

Cross platform symbol upload tool

如何安装 @bugsplat/symbol-upload?

在项目目录运行 npm install @bugsplat/symbol-upload,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 symbol-upload,可以用 npx symbol-upload 直接运行。

@bugsplat/symbol-upload 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bugsplat/symbol-upload 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@bugsplat/symbol-upload 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.23.4 || ^24.22.1 || >=26.12.1。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bugsplat/symbol-upload 可以商用吗?

@bugsplat/symbol-upload 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bugsplat/symbol-upload 的下载量有多少?

根据 npm 官方下载统计,@bugsplat/symbol-upload 在 2026/10/09 – 2026/11/07 这 30 天内被下载 4,468 次,日均约 149 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bugsplat/symbol-upload 还在维护吗?

最新版本 11.1.0 发布于 2026/11/02(6 天前);至今共发布 72 个版本,其中过去 12 个月发布了 11 个;首次发布于 2021/03/29。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。