Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ steps:
commands:
- bundle install
- chmod +x bin/arm64-macos-bugsnag-cli
- bundle exec maze-runner features/cli
- bundle exec maze-runner --port=$((MAZE_RUNNER_PORT)) features/cli
plugins:
artifacts#v1.5.0:
download:
Expand All @@ -53,7 +53,7 @@ steps:
commands:
- bundle install
- chmod +x bin/arm64-macos-bugsnag-cli
- bundle exec maze-runner features/android
- bundle exec maze-runner --port=$((MAZE_RUNNER_PORT)) features/android
env:
JAVA_VERSION: 17
plugins:
Expand All @@ -68,7 +68,7 @@ steps:
commands:
- bundle install
- chmod +x bin/arm64-macos-bugsnag-cli
- bundle exec maze-runner features/dart
- bundle exec maze-runner --port=$((MAZE_RUNNER_PORT)) features/dart
env:
FLUTTER_BIN: "/opt/flutter/3.19.0/bin/flutter"
plugins:
Expand All @@ -85,7 +85,7 @@ steps:
commands:
- bundle install
- chmod +x bin/arm64-macos-bugsnag-cli
- bundle exec maze-runner features/xcode
- bundle exec maze-runner --port=$((MAZE_RUNNER_PORT)) features/xcode
plugins:
artifacts#v1.5.0:
download:
Expand All @@ -98,7 +98,7 @@ steps:
commands:
- chmod +x bin/arm64-macos-bugsnag-cli
- bundle install
- bundle exec maze-runner features/js
- bundle exec maze-runner --port=$((MAZE_RUNNER_PORT)) features/js
plugins:
artifacts#v1.5.0:
download:
Expand All @@ -109,11 +109,13 @@ steps:
- label: ":video_game: Unity Android Integration Tests"
depends_on: build
env:
UNITY_VERSION: 6000.0.36f1
UNITY_VERSION: 6000.0.47f1
agents:
queue: macos-14-isolated
commands:
- chmod +x bin/arm64-macos-bugsnag-cli
- bundle install
- bundle exec maze-runner features/unity-android
- bundle exec maze-runner --port=$((MAZE_RUNNER_PORT)) features/unity-android
plugins:
artifacts#v1.5.0:
download:
Expand All @@ -126,7 +128,7 @@ steps:
commands:
- chmod +x bin/arm64-macos-bugsnag-cli
- bundle install
- bundle exec maze-runner features/breakpad
- bundle exec maze-runner --port=$((MAZE_RUNNER_PORT)) features/breakpad
plugins:
artifacts#v1.5.0:
download:
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/react-native/android.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
commands:
- "chmod +x bin/arm64-macos-bugsnag-cli"
- "bundle install"
- "bundle exec maze-runner features/react-native/android.feature"
- "bundle exec maze-runner --port=$((MAZE_RUNNER_PORT)) --document-server-port=$((MAZE_RUNNER_PORT + 1)) features/react-native/android.feature"
matrix:
- "0.70"
- "0.73"
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/react-native/ios.pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ steps:
commands:
- "chmod +x bin/arm64-macos-bugsnag-cli"
- "bundle install"
- "bundle exec maze-runner features/react-native/ios.feature"
- "bundle exec maze-runner --port=$((MAZE_RUNNER_PORT)) --document-server-port=$((MAZE_RUNNER_PORT + 1)) features/react-native/ios.feature"
matrix:
- "0.70"
- "0.73"
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [3.0.1] - 2025-04-29

### Added
- Add TypeScript definitions to cli wrapper [#196](https://github.com/bugsnag/bugsnag-cli/pull/196)

### Fixed
- Update the command referenced in the missing bundle error message [#195](https://github.com/bugsnag/bugsnag-cli/pull/195)

## [3.0.0] - 2025-04-07

This major release includes some breaking changes – please see our [Upgrading Guide](./UPGRADING.md) for full details.
Expand Down
85 changes: 85 additions & 0 deletions bugsnag-cli-wrapper.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
declare module '@bugsnag/cli' {
interface BugsnagCreateBuildOptions {
apiKey?: string
dryRun?: boolean
logLevel?: string
port?: number
failOnUploadError?: boolean
verbose?: boolean
overwrite?: boolean
retries?: number
timeout?: number
}

interface BugsnagUploadReactNativeOptions {
bundle?: string
codeBundleId?: string
sourceMap?: string
versionName?: string
androidAppManifest?: string
androidVariant?: string
androidVersionCode?: string
iosBundleVersion?: string
iosPlist?: string
iosScheme?: string
iosXcodeProject?: string
}

interface BugsnagUploadiOSOptions {
bundle?: string
codeBundleId?: string
sourceMap?: string
versionName?: string
bundleVersion?: string
plist?: string
scheme?: string
xcodeProject?: string
}

interface BugsnagUploadAndroidOptions {
bundle?: string
codeBundleId?: string
sourceMap?: string
versionName?: string
appManifest?: string
variant?: string
versionCode?: string
}

interface BugsnagUploadJsOptions {
baseUrl?: string
bundle?: string
bundleUrl?: string
projectRoot?: string
sourceMap?: string
versionName?: string
codeBundleId?: string
}

/**
* Convert camelCase to kebab-case
*/
export function camelToKebab (str: string): string;

/**
* Execute a Bugsnag CLI command
*/
export function run (command: string, options?: object, target?: string): Promise<string>;

/**
* Send build information to Bugsnag
*/
export function CreateBuild (options: BugsnagCreateBuildOptions, target?: string): Promise<string>;

/**
* Upload sourcemaps to Bugsnag
* Provides nested methods for specific upload types.
*/
export const Upload: {
ReactNative: ((options: BugsnagUploadReactNativeOptions, target?: string) => Promise<string>) & {
Android: (options: BugsnagUploadAndroidOptions, target?: string) => Promise<string>,
iOS: (options: BugsnagUploadiOSOptions, target?: string) => Promise<string>
},
Js: (options: BugsnagUploadJsOptions, target?: string) => Promise<string>,
}
}
6 changes: 3 additions & 3 deletions features/Unity-Android/unity.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Feature: Unity Android integration tests
Given I build the Unity Android example project
And I wait for the Unity symbols to generate

When I run bugsnag-cli with upload unity-android --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite platforms-examples/Unity/
When I run bugsnag-cli with upload unity-android --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite platforms-examples/Unity/
Then I wait to receive 5 sourcemaps
Then the sourcemap is valid for the Android Build API
Then the sourcemaps Content-Type header is valid multipart form-data
Expand All @@ -18,7 +18,7 @@ Feature: Unity Android integration tests
And I wait for the Unity symbols to generate

Given I set the NDK path to the Unity bundled version
When I run bugsnag-cli with upload unity-android --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite platforms-examples/Unity/
When I run bugsnag-cli with upload unity-android --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite platforms-examples/Unity/
Then I wait to receive 5 sourcemaps
Then the sourcemap is valid for the Android Build API
Then the sourcemaps Content-Type header is valid multipart form-data
Expand All @@ -33,7 +33,7 @@ Feature: Unity Android integration tests
Given I build the Unity Android example project
And I wait for the Unity symbols to generate

When I run bugsnag-cli with upload unity-android --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite --aab-path platforms-examples/Unity/UnityExample.aab platforms-examples/Unity/
When I run bugsnag-cli with upload unity-android --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite --aab-path platforms-examples/Unity/UnityExample.aab platforms-examples/Unity/
Then I wait to receive 5 sourcemaps
Then the sourcemap is valid for the Android Build API
Then the sourcemaps Content-Type header is valid multipart form-data
Expand Down
18 changes: 9 additions & 9 deletions features/android/android-aab.feature
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Feature: Android AAB Integration Test

Scenario: Uploading Android AAB file
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/aab/app-release.aab
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/aab/app-release.aab
And I wait to receive 1 sourcemaps
Then the sourcemap is valid for the Android Build API
Then the sourcemaps Content-Type header is valid multipart form-data
Expand All @@ -11,7 +11,7 @@ Feature: Android AAB Integration Test
And the sourcemap payload field "overwrite" equals "true"

Scenario: Uploading Android AAB file with --verbose
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/aab/app-release.aab --verbose
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/aab/app-release.aab --verbose
And I wait to receive 1 sourcemaps
Then the sourcemap is valid for the Android Build API
And "f3112c3dbdd73ae5dee677e407af196f101e97f5" should be used as "build ID"
Expand All @@ -22,7 +22,7 @@ Feature: Android AAB Integration Test
And the sourcemap payload field "overwrite" equals "true"

Scenario: Uploading Android AAB file with Dexguard
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/aab/app-release-dexguard.aab
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/aab/app-release-dexguard.aab
And I wait to receive 5 sourcemaps
Then the sourcemap is valid for the Android Build API
Then the sourcemaps Content-Type header is valid multipart form-data
Expand All @@ -32,7 +32,7 @@ Feature: Android AAB Integration Test
And the sourcemap payload field "overwrite" equals "true"

Scenario: Uploading Android AAB file with Dexguard with --verbose
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/aab/app-release-dexguard.aab --verbose
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/aab/app-release-dexguard.aab --verbose
And I wait to receive 5 sourcemaps
Then the sourcemap is valid for the Android Build API
And "fb0d77a7-5df2-4f47-a823-b011f89a2b70" should be used as "build ID"
Expand All @@ -46,7 +46,7 @@ Feature: Android AAB Integration Test
When I make the "features/base-fixtures/android"
And I wait for the build to succeed

When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/base-fixtures/android/app/build/outputs/bundle/release/app-release.aab
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/base-fixtures/android/app/build/outputs/bundle/release/app-release.aab
And I wait to receive 5 sourcemaps
Then the sourcemap is valid for the Android Build API
Then the sourcemaps Content-Type header is valid multipart form-data
Expand All @@ -59,7 +59,7 @@ Feature: Android AAB Integration Test
When I make the "features/base-fixtures/android"
And I wait for the build to succeed

When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/base-fixtures/android/app/build/outputs/bundle/release/app-release.aab --verbose
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/base-fixtures/android/app/build/outputs/bundle/release/app-release.aab --verbose
And I wait to receive 5 sourcemaps
Then the sourcemap is valid for the Android Build API
And "f88f420ede59cd6695cea71aa0c7345eccd594cb" should be used as "build ID"
Expand All @@ -70,7 +70,7 @@ Feature: Android AAB Integration Test
And the sourcemap payload field "overwrite" equals "true"

Scenario: Uploading Android AAB file when command is run from project root
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/ --verbose
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/ --verbose
And I wait to receive 1 sourcemaps
Then the sourcemap is valid for the Android Build API
And "f3112c3dbdd73ae5dee677e407af196f101e97f5" should be used as "build ID"
Expand All @@ -81,7 +81,7 @@ Feature: Android AAB Integration Test
And the sourcemap payload field "overwrite" equals "true"

Scenario: Uploading Android AAB file when command is run from within app directory
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/app/ --verbose
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/app/ --verbose
And I wait to receive 1 sourcemaps
Then the sourcemap is valid for the Android Build API
And "f3112c3dbdd73ae5dee677e407af196f101e97f5" should be used as "build ID"
Expand All @@ -92,5 +92,5 @@ Feature: Android AAB Integration Test
And the sourcemap payload field "overwrite" equals "true"

Scenario: Uploading Android AAB file when more than a single AAB is found
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:9339 --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/aab/
When I run bugsnag-cli with upload android-aab --upload-api-root-url=http://localhost:$MAZE_RUNNER_PORT --api-key=1234567890ABCDEF1234567890ABCDEF --overwrite features/android/fixtures/aab/
Then I should see the path ambiguous error
Loading