├── config ├── .gitignore └── full-suite-jest.config.js ├── examples ├── js │ ├── web-worker │ │ ├── .node-version │ │ ├── .gitignore │ │ ├── bugsnag.png │ │ └── package.json │ ├── koa │ │ ├── .dockerignore │ │ ├── static │ │ │ └── bugsnag.png │ │ ├── Dockerfile │ │ └── package.json │ ├── react │ │ ├── .dockerignore │ │ ├── .env │ │ ├── public │ │ │ ├── bugsnag.png │ │ │ ├── favicon.ico │ │ │ ├── index.html │ │ │ └── manifest.json │ │ ├── src │ │ │ └── index.css │ │ ├── Dockerfile │ │ └── .gitignore │ ├── vue │ │ ├── .dockerignore │ │ ├── public │ │ │ ├── bugsnag.png │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ ├── src │ │ │ ├── assets │ │ │ │ └── logo.png │ │ │ └── main.js │ │ ├── Dockerfile │ │ └── .gitignore │ ├── express │ │ ├── .dockerignore │ │ ├── static │ │ │ └── bugsnag.png │ │ ├── Dockerfile │ │ └── package.json │ ├── plain-node │ │ ├── .dockerignore │ │ ├── Dockerfile │ │ └── package.json │ ├── restify │ │ ├── .dockerignore │ │ ├── static │ │ │ └── bugsnag.png │ │ ├── Dockerfile │ │ └── package.json │ ├── browser-cdn │ │ ├── .dockerignore │ │ ├── bugsnag.png │ │ ├── package.json │ │ └── Dockerfile │ ├── nextjs │ │ ├── .dockerignore │ │ ├── public │ │ │ └── favicon.ico │ │ └── pages │ │ │ ├── _app.js │ │ │ └── ssr │ │ │ ├── scenario1.js │ │ │ └── scenario2.js │ ├── nuxtjs │ │ ├── .dockerignore │ │ ├── assets │ │ │ ├── bugsnag.png │ │ │ └── README.md │ │ ├── static │ │ │ ├── favicon.ico │ │ │ └── README.md │ │ ├── pages │ │ │ ├── borked.vue │ │ │ └── README.md │ │ ├── components │ │ │ └── README.md │ │ ├── modules │ │ │ └── bugsnag │ │ │ │ └── client.js │ │ ├── .editorconfig │ │ ├── Dockerfile │ │ ├── layouts │ │ │ └── README.md │ │ ├── plugins │ │ │ └── README.md │ │ └── middleware │ │ │ └── README.md │ └── gatsby │ │ ├── .dockerignore │ │ ├── .gitignore │ │ ├── src │ │ └── images │ │ │ └── icon.png │ │ └── Dockerfile ├── ts │ ├── angular │ │ ├── src │ │ │ ├── assets │ │ │ │ ├── .gitkeep │ │ │ │ └── bugsnag.png │ │ │ ├── environments │ │ │ │ └── environment.prod.ts │ │ │ ├── favicon.ico │ │ │ ├── typings.d.ts │ │ │ ├── styles.css │ │ │ ├── tsconfig.app.json │ │ │ └── tsconfig.spec.json │ │ ├── .dockerignore │ │ ├── Dockerfile │ │ ├── e2e │ │ │ ├── app.po.ts │ │ │ ├── tsconfig.e2e.json │ │ │ └── app.e2e-spec.ts │ │ └── .editorconfig │ └── plain-node │ │ ├── .gitignore │ │ ├── .dockerignore │ │ ├── Dockerfile │ │ └── package.json ├── reactnative │ ├── rn063example │ │ ├── .watchmanconfig │ │ ├── .gitattributes │ │ ├── app.json │ │ ├── .eslintrc.js │ │ ├── babel.config.js │ │ ├── android │ │ │ ├── app │ │ │ │ ├── src │ │ │ │ │ └── main │ │ │ │ │ │ └── res │ │ │ │ │ │ ├── values │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ │ └── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ └── debug.keystore │ │ │ ├── gradle │ │ │ │ └── wrapper │ │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ │ └── gradle-wrapper.properties │ │ │ └── settings.gradle │ │ ├── ios │ │ │ ├── rn063example │ │ │ │ ├── Images.xcassets │ │ │ │ │ └── Contents.json │ │ │ │ ├── AppDelegate.h │ │ │ │ ├── main.m │ │ │ │ └── CrashyCrashy.h │ │ │ ├── rn063example.xcworkspace │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ └── Podfile │ │ ├── .buckconfig │ │ ├── .prettierrc.js │ │ ├── index.js │ │ ├── __tests__ │ │ │ └── App-test.js │ │ └── metro.config.js │ └── rn071example │ │ ├── .watchmanconfig │ │ ├── _node-version │ │ ├── _ruby-version │ │ ├── ios │ │ ├── .xcode.env │ │ ├── rn071example │ │ │ ├── Images.xcassets │ │ │ │ └── Contents.json │ │ │ ├── AppDelegate.h │ │ │ └── main.m │ │ └── rn071example.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── _bundle │ │ └── config │ │ ├── app.json │ │ ├── tsconfig.json │ │ ├── .eslintrc.js │ │ ├── babel.config.js │ │ ├── android │ │ ├── app │ │ │ ├── src │ │ │ │ └── main │ │ │ │ │ └── res │ │ │ │ │ ├── values │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ └── mipmap-xxxhdpi │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ └── ic_launcher_round.png │ │ │ └── debug.keystore │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ └── settings.gradle │ │ ├── .prettierrc.js │ │ ├── index.js │ │ ├── Gemfile │ │ ├── __tests__ │ │ └── App-test.tsx │ │ └── metro.config.js └── electron │ ├── electron-basic │ └── src │ │ ├── bugsnag.png │ │ └── preload.js │ └── electron-bundled │ ├── webpack.renderer.config.js │ └── webpack.main.config.js ├── test ├── browser │ ├── .gitignore │ ├── features │ │ ├── fixtures │ │ │ ├── null_env │ │ │ ├── plugin_angular │ │ │ │ ├── .gitignore │ │ │ │ ├── angular_12 │ │ │ │ │ ├── src │ │ │ │ │ │ ├── assets │ │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ │ ├── app │ │ │ │ │ │ │ ├── app.component.css │ │ │ │ │ │ │ └── app.component.html │ │ │ │ │ │ ├── environments │ │ │ │ │ │ │ └── environment.prod.ts │ │ │ │ │ │ ├── styles.css │ │ │ │ │ │ └── favicon.ico │ │ │ │ │ ├── .npmrc │ │ │ │ │ └── tsconfig.app.json │ │ │ │ └── angular_17 │ │ │ │ │ ├── src │ │ │ │ │ ├── assets │ │ │ │ │ │ └── .gitkeep │ │ │ │ │ ├── app │ │ │ │ │ │ ├── app.component.css │ │ │ │ │ │ └── app.component.html │ │ │ │ │ ├── environments │ │ │ │ │ │ └── environment.prod.ts │ │ │ │ │ ├── styles.css │ │ │ │ │ └── favicon.ico │ │ │ │ │ ├── .npmrc │ │ │ │ │ └── .browserslistrc │ │ │ ├── handled │ │ │ │ ├── typescript │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── src │ │ │ │ │ │ ├── notify_new_error.ts │ │ │ │ │ │ ├── try_catch_notify.ts │ │ │ │ │ │ └── promise_catch.ts │ │ │ │ │ ├── promise_catch.html │ │ │ │ │ ├── notify_new_error.html │ │ │ │ │ └── try_catch_notify.html │ │ │ │ ├── webpack3 │ │ │ │ │ ├── .npmrc │ │ │ │ │ ├── src │ │ │ │ │ │ ├── notify_new_error.js │ │ │ │ │ │ ├── try_catch_notify.js │ │ │ │ │ │ ├── promise_catch.js │ │ │ │ │ │ └── lib │ │ │ │ │ │ │ └── config.js │ │ │ │ │ ├── promise_catch.html │ │ │ │ │ ├── notify_new_error.html │ │ │ │ │ ├── try_catch_notify.html │ │ │ │ │ └── package.json │ │ │ │ ├── rollup │ │ │ │ │ ├── src │ │ │ │ │ │ ├── notify_new_error.js │ │ │ │ │ │ ├── try_catch_notify.js │ │ │ │ │ │ ├── promise_catch.js │ │ │ │ │ │ └── lib │ │ │ │ │ │ │ └── config.js │ │ │ │ │ ├── promise_catch.html │ │ │ │ │ ├── notify_new_error.html │ │ │ │ │ └── try_catch_notify.html │ │ │ │ ├── script │ │ │ │ │ └── package.json │ │ │ │ ├── webpack4 │ │ │ │ │ ├── src │ │ │ │ │ │ ├── notify_new_error.js │ │ │ │ │ │ ├── try_catch_notify.js │ │ │ │ │ │ ├── promise_catch.js │ │ │ │ │ │ └── lib │ │ │ │ │ │ │ └── config.js │ │ │ │ │ ├── promise_catch.html │ │ │ │ │ ├── notify_new_error.html │ │ │ │ │ ├── try_catch_notify.html │ │ │ │ │ └── package.json │ │ │ │ └── browserify │ │ │ │ │ ├── src │ │ │ │ │ ├── notify_new_error.js │ │ │ │ │ ├── try_catch_notify.js │ │ │ │ │ ├── promise_catch.js │ │ │ │ │ └── lib │ │ │ │ │ │ └── config.js │ │ │ │ │ ├── promise_catch.html │ │ │ │ │ ├── notify_new_error.html │ │ │ │ │ └── try_catch_notify.html │ │ │ ├── plugin_vue │ │ │ │ ├── webpack4 │ │ │ │ │ ├── .browserslistrc │ │ │ │ │ ├── .babelrc │ │ │ │ │ ├── index.html │ │ │ │ │ └── src │ │ │ │ │ │ └── app.js │ │ │ │ ├── typescript_vue3 │ │ │ │ │ ├── README.md │ │ │ │ │ └── index.html │ │ │ │ └── typescript_vue2 │ │ │ │ │ └── index.html │ │ │ ├── unhandled │ │ │ │ └── script │ │ │ │ │ ├── @dist │ │ │ │ │ └── at_filename.js │ │ │ │ │ └── package.json │ │ │ ├── package.json │ │ │ ├── plugin_react │ │ │ │ └── webpack4 │ │ │ │ │ ├── .babelrc │ │ │ │ │ ├── index.html │ │ │ │ │ └── tsconfig.json │ │ │ ├── csp │ │ │ │ └── script │ │ │ │ │ └── package.json │ │ │ ├── delivery │ │ │ │ └── script │ │ │ │ │ └── package.json │ │ │ ├── redaction │ │ │ │ └── script │ │ │ │ │ └── package.json │ │ │ ├── sessions │ │ │ │ └── script │ │ │ │ │ └── package.json │ │ │ ├── inline_script │ │ │ │ └── script │ │ │ │ │ └── package.json │ │ │ ├── on_error │ │ │ │ └── script │ │ │ │ │ └── package.json │ │ │ ├── strict_mode │ │ │ │ └── script │ │ │ │ │ └── package.json │ │ │ ├── user_info │ │ │ │ └── script │ │ │ │ │ └── package.json │ │ │ ├── ip_redaction │ │ │ │ └── script │ │ │ │ │ └── package.json │ │ │ ├── release_stage │ │ │ │ └── script │ │ │ │ │ └── package.json │ │ │ ├── auto_detect_errors │ │ │ │ └── script │ │ │ │ │ └── package.json │ │ │ └── network_breadcrumbs │ │ │ │ └── json │ │ │ │ ├── fetch_failure.json │ │ │ │ ├── fetch_success.json │ │ │ │ ├── xhr_failure.json │ │ │ │ └── xhr_success.json │ │ ├── support │ │ │ └── maze.buildkite.cfg │ │ └── csp.feature │ └── Gemfile ├── electron │ ├── fixtures │ │ ├── events │ │ │ ├── minidump.dmp │ │ │ ├── sample-event.json │ │ │ ├── sample-event2.json │ │ │ └── meta-minidump-event.json │ │ └── app │ │ │ ├── src │ │ │ └── configs │ │ │ │ ├── default.js │ │ │ │ ├── dont-send-code.js │ │ │ │ ├── zero-launch-duration.js │ │ │ │ ├── disable-session-tracking.js │ │ │ │ ├── network-breadcrumbs.js │ │ │ │ ├── null-enabled-breadcrumb-types.js │ │ │ │ ├── disable-unhandled-rejections.js │ │ │ │ ├── feature-flags.js │ │ │ │ ├── feature-flags-on-send-error.js │ │ │ │ ├── disable-uncaught-exceptions.js │ │ │ │ ├── on-send-error.js │ │ │ │ └── mixed-codebundleid.js │ │ │ └── webpack.renderer.config.js │ └── features │ │ └── support │ │ └── utils │ │ └── expect.js ├── react-native │ ├── .gitignore │ └── features │ │ ├── fixtures │ │ ├── .gitignore │ │ ├── scenario-launcher │ │ │ ├── src │ │ │ │ ├── index.js │ │ │ │ ├── scenarios │ │ │ │ │ ├── Scenario.js │ │ │ │ │ ├── DeviceJsUnhandledScenario.js │ │ │ │ │ ├── UnhandledJsErrorScenario.js │ │ │ │ │ ├── RCTFatalScenario.js │ │ │ │ │ ├── UnhandledJsPromiseRejectionScenario.js │ │ │ │ │ ├── HandledJsErrorScenario.js │ │ │ │ │ ├── ContextJsDefaultScenario.js │ │ │ │ │ ├── DeviceJsHandledScenario.js │ │ │ │ │ ├── UserNativeClientScenario.js │ │ │ │ │ ├── DeviceNativeHandledScenario.js │ │ │ │ │ ├── HandledNativeErrorScenario.js │ │ │ │ │ ├── UnhandledNativeErrorScenario.js │ │ │ │ │ ├── DeviceNativeUnhandledScenario.js │ │ │ │ │ ├── BreadcrumbsAutomaticLoadedScenario.js │ │ │ │ │ ├── BreadcrumbsNativeManualScenario.js │ │ │ │ │ ├── SessionAutoEnabledScenario.js │ │ │ │ │ ├── UnhandledNativeErrorSyncScenario.js │ │ │ │ │ ├── SessionAutoDisabledScenario.js │ │ │ │ │ ├── UserJsClientScenario.js │ │ │ │ │ ├── NativePromiseRejectionUnhandledScenario.js │ │ │ │ │ └── EventApiKeyOverrideScenario.js │ │ │ │ └── lib │ │ │ │ │ └── native.js │ │ │ ├── android │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ └── AndroidManifest.xml │ │ │ └── ios │ │ │ │ └── Scenarios │ │ │ │ ├── MetadataNativeScenario.h │ │ │ │ ├── PauseSessionScenario.h │ │ │ │ ├── ResumeSessionScenario.h │ │ │ │ ├── StartSessionScenario.h │ │ │ │ ├── AppNativeHandledScenario.h │ │ │ │ ├── UserNativeClientScenario.h │ │ │ │ ├── AppNativeUnhandledScenario.h │ │ │ │ ├── ContextNativeCustomScenario.h │ │ │ │ ├── DeviceNativeHandledScenario.h │ │ │ │ ├── HandledNativeErrorScenario.h │ │ │ │ ├── NativeFeatureFlagsScenario.h │ │ │ │ ├── DeviceNativeUnhandledScenario.h │ │ │ │ ├── GroupingDiscriminatorScenario.h │ │ │ │ ├── UnhandledNativeErrorScenario.h │ │ │ │ ├── BreadcrumbsNativeManualScenario.h │ │ │ │ ├── FeatureFlagsNativeCrashScenario.h │ │ │ │ ├── MetadataNativeUnhandledScenario.h │ │ │ │ ├── GroupingDiscriminatorNativeScenario.h │ │ │ │ ├── NativePromiseRejectionHandledScenario.h │ │ │ │ ├── NativePromiseRejectionUnhandledScenario.h │ │ │ │ ├── PauseSessionScenario.m │ │ │ │ ├── StartSessionScenario.m │ │ │ │ ├── ResumeSessionScenario.m │ │ │ │ ├── AppNativeUnhandledScenario.m │ │ │ │ ├── GroupingDiscriminatorScenario.m │ │ │ │ └── DeviceNativeUnhandledScenario.m │ │ ├── replacements │ │ │ └── ios │ │ │ │ ├── Gemfile │ │ │ │ └── exportOptions.plist │ │ └── expected_breadcrumbs │ │ │ ├── NativeManualScenario.json │ │ │ ├── JsManualScenario.json │ │ │ ├── HomeReadyNavigation.json │ │ │ └── HomeToDetailsNavigation.json │ │ └── support │ │ ├── maze.all.cfg │ │ └── maze.buildkite.cfg ├── react-native-cli │ ├── features │ │ ├── support │ │ │ ├── maze.all.cfg │ │ │ ├── maze.buildkite.cfg │ │ │ └── env.rb │ │ ├── fixtures │ │ │ └── app │ │ │ │ └── dynamic │ │ │ │ └── ios │ │ │ │ └── exportOptions.plist │ │ └── steps │ │ │ └── react-native-source-maps-steps.rb │ └── .gitignore ├── node │ ├── features │ │ ├── fixtures │ │ │ ├── project_root │ │ │ │ ├── .dockerignore │ │ │ │ ├── out.js │ │ │ │ ├── package.json │ │ │ │ └── Dockerfile │ │ │ ├── .gitignore │ │ │ ├── cause │ │ │ │ ├── package.json │ │ │ │ ├── Dockerfile │ │ │ │ └── scenarios │ │ │ │ │ ├── string.js │ │ │ │ │ ├── error_constructor.js │ │ │ │ │ └── error_assignment.js │ │ │ ├── handled │ │ │ │ ├── package.json │ │ │ │ ├── package-lock.json │ │ │ │ ├── Dockerfile │ │ │ │ └── scenarios │ │ │ │ │ ├── notify-string.js │ │ │ │ │ ├── notify.js │ │ │ │ │ └── notify-try-catch.js │ │ │ ├── sessions │ │ │ │ ├── package.json │ │ │ │ ├── package-lock.json │ │ │ │ └── Dockerfile │ │ │ ├── unhandled │ │ │ │ ├── package.json │ │ │ │ ├── package-lock.json │ │ │ │ ├── Dockerfile │ │ │ │ └── scenarios │ │ │ │ │ ├── thrown-error-not-caught.js │ │ │ │ │ ├── unhandled-promise-rejection.js │ │ │ │ │ ├── thrown-error-not-caught-auto-notify-off.js │ │ │ │ │ ├── unhandled-promise-rejection-auto-notify-off.js │ │ │ │ │ └── modify-unhandled-callback.js │ │ │ ├── contextualize │ │ │ │ ├── package.json │ │ │ │ ├── package-lock.json │ │ │ │ └── Dockerfile │ │ │ ├── surrounding_code │ │ │ │ ├── package.json │ │ │ │ ├── package-lock.json │ │ │ │ ├── Dockerfile │ │ │ │ └── scenarios │ │ │ │ │ └── template.json │ │ │ ├── koa-1x │ │ │ │ ├── osv-scanner.toml │ │ │ │ ├── package.json │ │ │ │ └── Dockerfile │ │ │ ├── connect │ │ │ │ ├── package.json │ │ │ │ └── Dockerfile │ │ │ ├── proxy │ │ │ │ ├── package.json │ │ │ │ └── Dockerfile │ │ │ ├── koa │ │ │ │ ├── package.json │ │ │ │ ├── osv-scanner.toml │ │ │ │ └── Dockerfile │ │ │ ├── express │ │ │ │ ├── package.json │ │ │ │ ├── expected_breadcrumbs │ │ │ │ │ ├── FirstURLConsoleBreadcrumb.json │ │ │ │ │ └── SecondURLConsoleBreadcrumb.json │ │ │ │ └── Dockerfile │ │ │ ├── hono │ │ │ │ ├── package.json │ │ │ │ └── Dockerfile │ │ │ ├── restify │ │ │ │ ├── package.json │ │ │ │ ├── osv-scanner.toml │ │ │ │ └── Dockerfile │ │ │ ├── corporate-proxy │ │ │ │ └── Dockerfile │ │ │ └── webpack │ │ │ │ ├── package.json │ │ │ │ ├── Dockerfile │ │ │ │ └── src │ │ │ │ └── index.js │ │ └── support │ │ │ └── maze.buildkite.cfg │ ├── TESTING.md │ └── Gemfile ├── aws-lambda │ ├── features │ │ └── support │ │ │ ├── maze.buildkite.cfg │ │ │ └── env.rb │ ├── .gitignore │ └── Gemfile └── scripts │ └── create_package.json_tar.sh ├── packages ├── js │ ├── .gitignore │ ├── node │ │ └── notifier.js │ └── browser │ │ └── notifier.js ├── node │ ├── .gitignore │ ├── src │ │ └── notifier.d.ts │ └── README.md ├── react-native │ ├── .gitattributes │ ├── prepare-android-vendor.config │ ├── android │ │ ├── src │ │ │ ├── test │ │ │ │ └── resources │ │ │ │ │ └── mockito-extensions │ │ │ │ │ └── org.mockito.plugins.MockMaker │ │ │ └── main │ │ │ │ └── AndroidManifest.xml │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ └── README.md │ ├── tsconfig.json │ ├── ios │ │ └── BugsnagReactNative │ │ │ ├── BugsnagReactNativePlugin.h │ │ │ └── BugsnagReactNativeEmitter.h │ ├── src │ │ ├── test │ │ │ └── setup.js │ │ └── native.js │ ├── react-native.config.js │ └── bugsnag-react-native.gradle ├── plugin-react │ ├── .gitignore │ └── src │ │ └── test │ │ └── .babelrc ├── plugin-vue │ ├── .gitignore │ └── test │ │ └── vue2.test.ts ├── core │ ├── lib │ │ ├── iserror.js │ │ ├── es-utils │ │ │ ├── keys.d.ts │ │ │ ├── is-array.d.ts │ │ │ ├── includes.d.ts │ │ │ ├── map.d.ts │ │ │ ├── assign.d.ts │ │ │ ├── filter.d.ts │ │ │ ├── reduce.d.ts │ │ │ ├── is-array.js │ │ │ ├── map.js │ │ │ ├── includes.js │ │ │ ├── reduce.js │ │ │ └── filter.js │ │ ├── error-stack-parser.js │ │ ├── validators │ │ │ ├── string-with-length.js │ │ │ ├── int-range.js │ │ │ └── list-of-functions.js │ │ ├── breadcrumb-types.js │ │ ├── async-every.d.ts │ │ ├── callback-runner.d.ts │ │ ├── path-normalizer.js │ │ ├── has-stack.js │ │ └── extract-object.js │ ├── index.js │ ├── types │ │ ├── breadcrumb.d.ts │ │ ├── bugsnag.d.ts │ │ ├── index.d.ts │ │ └── session.d.ts │ └── breadcrumb.d.ts ├── plugin-electron-preload-error │ ├── test │ │ └── fixtures │ │ │ ├── safe-preload.js │ │ │ ├── uncaught-exception-preload.js │ │ │ └── index.html │ └── README.md ├── plugin-node-surrounding-code │ ├── test │ │ └── fixtures │ │ │ ├── .gitignore │ │ │ └── node_modules │ │ │ └── mock-module │ │ │ └── index.js │ └── README.md ├── plugin-hono │ ├── test │ │ └── __mocks__ │ │ │ └── hono │ │ │ └── factory.js │ ├── tsconfig.json │ ├── README.md │ └── src │ │ └── load-connection-info.js ├── react-native-cli │ ├── src │ │ └── lib │ │ │ ├── OnCancel.ts │ │ │ ├── OnPremise.ts │ │ │ └── __test__ │ │ │ └── fixtures │ │ │ ├── index-before.js │ │ │ └── index-after.js │ ├── bin │ │ └── cli │ ├── tsconfig.build.json │ ├── README.md │ └── tsconfig.json ├── browser │ ├── src │ │ └── notifier.d.ts │ ├── .gitignore │ ├── types │ │ └── global.d.ts │ └── README.md ├── web-worker │ └── src │ │ └── notifier.d.ts ├── plugin-angular │ ├── src │ │ └── index.ts │ ├── ng-package.json │ └── .gitignore ├── plugin-electron-app │ ├── src │ │ ├── get_version.h │ │ └── get_version-linux.c │ └── README.md ├── electron │ ├── src │ │ ├── id.js │ │ ├── notifier.js │ │ └── config │ │ │ └── test │ │ │ └── renderer.test.ts │ └── README.md ├── plugin-electron-client-state-persistence │ ├── clib.json │ ├── README.md │ └── src │ │ └── deps │ │ └── parson │ │ └── package.json ├── plugin-electron-renderer-strip-project-root │ ├── strip-project-root.d.ts │ └── README.md ├── plugin-react-navigation │ ├── tsconfig.json │ └── README.md ├── delivery-node │ ├── delivery.d.ts │ └── README.md ├── plugin-react-native-hermes │ ├── tsconfig.json │ ├── README.md │ └── hermes.js ├── plugin-react-native-session │ ├── tsconfig.json │ └── README.md ├── plugin-react-native-client-sync │ ├── tsconfig.json │ └── README.md ├── plugin-react-native-event-sync │ ├── tsconfig.json │ └── README.md ├── plugin-react-native-navigation │ ├── tsconfig.json │ ├── README.md │ └── types │ │ └── react-native-navigation.d.ts ├── plugin-react-native-unhandled-rejection │ ├── tsconfig.json │ └── README.md ├── plugin-react-native-global-error-handler │ ├── tsconfig.json │ └── README.md ├── plugin-react-native-orientation-breadcrumbs │ ├── tsconfig.json │ └── README.md ├── delivery-xml-http-request │ ├── delivery.d.ts │ └── README.md ├── electron-test-helpers │ ├── README.md │ └── helpers.ts ├── plugin-electron-ipc │ └── lib │ │ └── constants.js ├── delivery-fetch │ ├── delivery.d.ts │ └── README.md ├── plugin-electron-session │ └── README.md ├── delivery-electron │ ├── delivery.d.ts │ ├── README.md │ ├── payload-loop.d.ts │ └── queue.d.ts ├── plugin-electron-device │ └── README.md ├── plugin-intercept │ └── README.md ├── electron-network-status │ ├── README.md │ └── network-status.d.ts ├── plugin-electron-network-status │ └── README.md ├── electron-filestore │ └── README.md ├── in-flight │ ├── README.md │ └── types │ │ └── bugsnag-in-flight.d.ts ├── plugin-electron-process-info │ └── README.md ├── plugin-electron-screen-breadcrumbs │ └── README.md ├── plugin-koa │ └── README.md ├── plugin-stackframe-path-normaliser │ └── README.md ├── plugin-electron-app-breadcrumbs │ └── README.md ├── plugin-aws-lambda │ ├── README.md │ └── src │ │ └── lambda-timeout-approaching.js ├── plugin-electron-power-monitor-breadcrumbs │ └── README.md ├── plugin-internal-callback-marker │ └── README.md ├── plugin-restify │ └── README.md ├── plugin-strip-project-root │ └── README.md ├── plugin-electron-net-breadcrumbs │ └── README.md ├── plugin-electron-renderer-event-data │ └── README.md ├── delivery-react-native │ └── README.md ├── plugin-browser-session │ └── README.md ├── plugin-express │ └── README.md ├── plugin-browser-context │ ├── README.md │ └── context.js ├── plugin-browser-request │ └── README.md ├── plugin-strip-query-string │ └── README.md ├── plugin-app-duration │ ├── README.md │ └── app.js ├── plugin-window-onerror │ └── README.md ├── plugin-node-uncaught-exception │ └── README.md ├── plugin-contextualize │ └── README.md ├── plugin-node-unhandled-rejection │ └── README.md ├── plugin-inline-script-content │ └── README.md ├── plugin-node-device │ └── README.md ├── delivery-x-domain-request │ └── delivery.d.ts ├── plugin-node-in-project │ └── README.md ├── plugin-client-ip │ └── README.md ├── plugin-window-unhandled-rejection │ └── README.md ├── plugin-navigation-breadcrumbs │ └── README.md ├── plugin-network-breadcrumbs │ └── README.md └── plugin-browser-device │ └── README.md ├── cucumber.js ├── bin ├── extract-source-map ├── minify └── size ├── lerna.json ├── .dockerignore ├── .gitmodules ├── .env ├── .editorconfig ├── .buildkite ├── README.md └── block │ ├── node-pipeline.block.yml │ ├── expo-pipeline.block.yml │ ├── browser-pipeline.block.yml │ └── electron-pipeline.block.yml ├── .eslintignore ├── Gemfile ├── dockerfiles ├── Dockerfile.package └── Dockerfile.release ├── .github └── pull_request_template.md └── .gitignore /config/.gitignore: -------------------------------------------------------------------------------- 1 | decisions.yml 2 | -------------------------------------------------------------------------------- /examples/js/web-worker/.node-version: -------------------------------------------------------------------------------- 1 | 14 -------------------------------------------------------------------------------- /test/browser/.gitignore: -------------------------------------------------------------------------------- 1 | maze-runner.log -------------------------------------------------------------------------------- /examples/ts/angular/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/js/.gitignore: -------------------------------------------------------------------------------- 1 | bugsnag-js-*.tgz 2 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/null_env: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /examples/js/koa/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /examples/js/react/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /examples/js/vue/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /examples/js/web-worker/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /examples/ts/plain-node/.gitignore: -------------------------------------------------------------------------------- 1 | src/*.js 2 | -------------------------------------------------------------------------------- /packages/node/.gitignore: -------------------------------------------------------------------------------- 1 | bugsnag-node-*.tgz 2 | -------------------------------------------------------------------------------- /examples/js/express/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /examples/js/plain-node/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /examples/js/react/.env: -------------------------------------------------------------------------------- 1 | SKIP_PREFLIGHT_CHECK=true 2 | -------------------------------------------------------------------------------- /examples/js/restify/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /examples/reactnative/rn071example/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /examples/ts/angular/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /examples/ts/plain-node/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /test/electron/fixtures/events/minidump.dmp: -------------------------------------------------------------------------------- 1 | oh no 2 | -------------------------------------------------------------------------------- /examples/js/browser-cdn/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/_node-version: -------------------------------------------------------------------------------- 1 | 18 2 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/_ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.6 2 | -------------------------------------------------------------------------------- /packages/react-native/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /cucumber.js: -------------------------------------------------------------------------------- 1 | module.exports = { default: '--publish-quiet' } 2 | -------------------------------------------------------------------------------- /examples/js/nextjs/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .next 3 | -------------------------------------------------------------------------------- /examples/js/nuxtjs/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .nuxt 3 | -------------------------------------------------------------------------------- /packages/plugin-react/.gitignore: -------------------------------------------------------------------------------- 1 | bugsnag-plugin-react-*.tgz 2 | -------------------------------------------------------------------------------- /packages/plugin-vue/.gitignore: -------------------------------------------------------------------------------- 1 | bugsnag-plugin-vue-*.tgz 2 | -------------------------------------------------------------------------------- /test/react-native/.gitignore: -------------------------------------------------------------------------------- 1 | features/fixtures/generated 2 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/.gitignore: -------------------------------------------------------------------------------- 1 | local-build 2 | -------------------------------------------------------------------------------- /test/react-native/features/support/maze.all.cfg: -------------------------------------------------------------------------------- 1 | --a11y-locator -------------------------------------------------------------------------------- /examples/js/gatsby/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .cache 3 | public -------------------------------------------------------------------------------- /examples/reactnative/rn063example/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /packages/core/lib/iserror.js: -------------------------------------------------------------------------------- 1 | module.exports = require('iserror') 2 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/.gitignore: -------------------------------------------------------------------------------- 1 | .angular -------------------------------------------------------------------------------- /test/react-native-cli/features/support/maze.all.cfg: -------------------------------------------------------------------------------- 1 | --a11y-locator -------------------------------------------------------------------------------- /bin/extract-source-map: -------------------------------------------------------------------------------- 1 | ../../node_modules/.bin/exorcist "$1.map" > $1 2 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/typescript/.gitignore: -------------------------------------------------------------------------------- 1 | **/*.js 2 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_vue/webpack4/.browserslistrc: -------------------------------------------------------------------------------- 1 | IE 8 -------------------------------------------------------------------------------- /test/node/features/fixtures/project_root/.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /packages/js/node/notifier.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@bugsnag/node') 2 | -------------------------------------------------------------------------------- /packages/react-native/prepare-android-vendor.config: -------------------------------------------------------------------------------- 1 | version 2 | 6.20.0 3 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack3/.npmrc: -------------------------------------------------------------------------------- 1 | legacy-peer-deps=true -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_12/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_17/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /packages/js/browser/notifier.js: -------------------------------------------------------------------------------- 1 | module.exports = require('@bugsnag/browser') 2 | -------------------------------------------------------------------------------- /packages/plugin-electron-preload-error/test/fixtures/safe-preload.js: -------------------------------------------------------------------------------- 1 | // :^) 2 | -------------------------------------------------------------------------------- /packages/plugin-node-surrounding-code/test/fixtures/.gitignore: -------------------------------------------------------------------------------- 1 | !node_modules 2 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_12/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_17/src/app/app.component.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/react-native-cli/.gitignore: -------------------------------------------------------------------------------- 1 | local-build 2 | features/fixtures/generated 3 | -------------------------------------------------------------------------------- /packages/core/lib/es-utils/keys.d.ts: -------------------------------------------------------------------------------- 1 | export default function keys(obj: {}): string[] 2 | -------------------------------------------------------------------------------- /test/node/features/fixtures/.gitignore: -------------------------------------------------------------------------------- 1 | bugsnag-node-*.tgz 2 | bugsnag-plugin-*.tgz 3 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/ios/.xcode.env: -------------------------------------------------------------------------------- 1 | export NODE_BINARY=$(command -v node) 2 | -------------------------------------------------------------------------------- /packages/core/lib/error-stack-parser.js: -------------------------------------------------------------------------------- 1 | module.exports = require('error-stack-parser') 2 | -------------------------------------------------------------------------------- /test/node/features/fixtures/cause/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test" 3 | } 4 | -------------------------------------------------------------------------------- /test/node/features/fixtures/handled/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test" 3 | } 4 | -------------------------------------------------------------------------------- /test/node/features/fixtures/sessions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test" 3 | } 4 | -------------------------------------------------------------------------------- /test/node/features/fixtures/unhandled/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test" 3 | } 4 | -------------------------------------------------------------------------------- /examples/js/gatsby/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | .cache/ 3 | public 4 | src/gatsby-types.d.ts 5 | -------------------------------------------------------------------------------- /packages/core/lib/es-utils/is-array.d.ts: -------------------------------------------------------------------------------- 1 | export default function isArray(obj: any): boolean 2 | -------------------------------------------------------------------------------- /packages/plugin-hono/test/__mocks__/hono/factory.js: -------------------------------------------------------------------------------- 1 | export const createMiddleware = (fn) => fn 2 | -------------------------------------------------------------------------------- /test/node/features/fixtures/contextualize/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test" 3 | } 4 | -------------------------------------------------------------------------------- /test/node/features/fixtures/surrounding_code/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test" 3 | } 4 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_17/.npmrc: -------------------------------------------------------------------------------- 1 | node-options="--openssl-legacy-provider" -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/default.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | return {} 3 | } 4 | -------------------------------------------------------------------------------- /test/node/features/fixtures/koa-1x/osv-scanner.toml: -------------------------------------------------------------------------------- 1 | [[IgnoredVulns]] 2 | id = "GHSA-593f-38f6-jp5m" 3 | -------------------------------------------------------------------------------- /test/node/features/support/maze.buildkite.cfg: -------------------------------------------------------------------------------- 1 | --format=junit 2 | --out=reports 3 | --format=pretty 4 | -------------------------------------------------------------------------------- /packages/core/lib/es-utils/includes.d.ts: -------------------------------------------------------------------------------- 1 | export default function includes(arr: T[], item: T): boolean 2 | -------------------------------------------------------------------------------- /packages/core/lib/es-utils/map.d.ts: -------------------------------------------------------------------------------- 1 | export default function map(arr: T[], fn: (item: T) => U): U[] 2 | -------------------------------------------------------------------------------- /packages/react-native-cli/src/lib/OnCancel.ts: -------------------------------------------------------------------------------- 1 | export default function () { 2 | process.exit() 3 | } 4 | -------------------------------------------------------------------------------- /test/aws-lambda/features/support/maze.buildkite.cfg: -------------------------------------------------------------------------------- 1 | --format=junit 2 | --out=reports 3 | --format=pretty 4 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_12/.npmrc: -------------------------------------------------------------------------------- 1 | node-options="--openssl-legacy-provider" 2 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_12/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |

Hello world

2 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_17/src/app/app.component.html: -------------------------------------------------------------------------------- 1 |

Hello world

2 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/unhandled/script/@dist/at_filename.js: -------------------------------------------------------------------------------- 1 | throw new Error('at in filename') 2 | -------------------------------------------------------------------------------- /test/browser/features/support/maze.buildkite.cfg: -------------------------------------------------------------------------------- 1 | --format=junit 2 | --out=reports 3 | --format=pretty 4 | -------------------------------------------------------------------------------- /packages/core/lib/es-utils/assign.d.ts: -------------------------------------------------------------------------------- 1 | export default function assign(target: object, ...sources: any[]): any 2 | -------------------------------------------------------------------------------- /packages/plugin-electron-preload-error/test/fixtures/uncaught-exception-preload.js: -------------------------------------------------------------------------------- 1 | throw new Error('oh no!') 2 | -------------------------------------------------------------------------------- /packages/plugin-react/src/test/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-env", "@babel/preset-react"] 3 | } 4 | -------------------------------------------------------------------------------- /packages/react-native-cli/bin/cli: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | require('../dist/bin/cli.js').default(process.argv) -------------------------------------------------------------------------------- /test/react-native/features/support/maze.buildkite.cfg: -------------------------------------------------------------------------------- 1 | --format=junit 2 | --out=reports 3 | --format=pretty 4 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rn063example", 3 | "displayName": "rn063example" 4 | } -------------------------------------------------------------------------------- /examples/reactnative/rn071example/_bundle/config: -------------------------------------------------------------------------------- 1 | BUNDLE_PATH: "vendor/bundle" 2 | BUNDLE_FORCE_RUBY_PLATFORM: 1 3 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rn071example", 3 | "displayName": "rn071example" 4 | } -------------------------------------------------------------------------------- /examples/reactnative/rn071example/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "@tsconfig/react-native/tsconfig.json" 3 | } 4 | -------------------------------------------------------------------------------- /packages/browser/src/notifier.d.ts: -------------------------------------------------------------------------------- 1 | export { default } from '../types/bugsnag' 2 | export * from '../types/bugsnag' 3 | -------------------------------------------------------------------------------- /packages/core/lib/es-utils/filter.d.ts: -------------------------------------------------------------------------------- 1 | export default function filter(arr: T[], fn: (item: T) => boolean): T[] 2 | -------------------------------------------------------------------------------- /packages/node/src/notifier.d.ts: -------------------------------------------------------------------------------- 1 | export { default } from '../types/bugsnag' 2 | export * from '../types/bugsnag' 3 | -------------------------------------------------------------------------------- /packages/react-native/android/src/test/resources/mockito-extensions/org.mockito.plugins.MockMaker: -------------------------------------------------------------------------------- 1 | mock-maker-inline -------------------------------------------------------------------------------- /test/browser/features/fixtures/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-test-harness", 3 | "private": true 4 | } 5 | -------------------------------------------------------------------------------- /test/react-native-cli/features/support/maze.buildkite.cfg: -------------------------------------------------------------------------------- 1 | --format=junit 2 | --out=reports 3 | --format=pretty 4 | -------------------------------------------------------------------------------- /examples/js/koa/static/bugsnag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/koa/static/bugsnag.png -------------------------------------------------------------------------------- /examples/js/vue/public/bugsnag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/vue/public/bugsnag.png -------------------------------------------------------------------------------- /examples/js/vue/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/vue/public/favicon.ico -------------------------------------------------------------------------------- /examples/js/web-worker/bugsnag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/web-worker/bugsnag.png -------------------------------------------------------------------------------- /examples/ts/angular/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /packages/web-worker/src/notifier.d.ts: -------------------------------------------------------------------------------- 1 | export { default } from '../types/notifier' 2 | export * from '../types/notifier' 3 | -------------------------------------------------------------------------------- /examples/js/browser-cdn/bugsnag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/browser-cdn/bugsnag.png -------------------------------------------------------------------------------- /examples/js/nextjs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/nextjs/public/favicon.ico -------------------------------------------------------------------------------- /examples/js/nuxtjs/assets/bugsnag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/nuxtjs/assets/bugsnag.png -------------------------------------------------------------------------------- /examples/js/nuxtjs/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/nuxtjs/static/favicon.ico -------------------------------------------------------------------------------- /examples/js/react/public/bugsnag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/react/public/bugsnag.png -------------------------------------------------------------------------------- /examples/js/react/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/react/public/favicon.ico -------------------------------------------------------------------------------- /examples/js/vue/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/vue/src/assets/logo.png -------------------------------------------------------------------------------- /examples/ts/angular/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/ts/angular/src/favicon.ico -------------------------------------------------------------------------------- /packages/browser/.gitignore: -------------------------------------------------------------------------------- 1 | bugsnag-browser-*.tgz 2 | browserstack.err 3 | local.log 4 | maze_output 5 | types/fixtures/* 6 | -------------------------------------------------------------------------------- /packages/core/lib/validators/string-with-length.js: -------------------------------------------------------------------------------- 1 | module.exports = value => typeof value === 'string' && !!value.length 2 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_vue/webpack4/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/index.js: -------------------------------------------------------------------------------- 1 | export { launchScenario } from './lib/ScenarioLauncher' 2 | -------------------------------------------------------------------------------- /examples/js/express/static/bugsnag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/express/static/bugsnag.png -------------------------------------------------------------------------------- /examples/js/gatsby/src/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/gatsby/src/images/icon.png -------------------------------------------------------------------------------- /examples/js/restify/static/bugsnag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/js/restify/static/bugsnag.png -------------------------------------------------------------------------------- /packages/browser/types/global.d.ts: -------------------------------------------------------------------------------- 1 | import bugsnag from './bugsnag' 2 | 3 | export as namespace bugsnag; 4 | export = bugsnag; 5 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /examples/ts/angular/src/assets/bugsnag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/ts/angular/src/assets/bugsnag.png -------------------------------------------------------------------------------- /packages/core/lib/breadcrumb-types.js: -------------------------------------------------------------------------------- 1 | module.exports = ['navigation', 'request', 'process', 'log', 'user', 'state', 'error', 'manual'] 2 | -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/dont-send-code.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | return { 3 | sendCode: false 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/zero-launch-duration.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | return { launchDurationMillis: 0 } 3 | } 4 | -------------------------------------------------------------------------------- /packages/core/lib/es-utils/reduce.d.ts: -------------------------------------------------------------------------------- 1 | export default function reduce(arr: T[], fn: (accum: any, item: T) => any, accum: any): any 2 | -------------------------------------------------------------------------------- /packages/react-native-cli/tsconfig.build.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "exclude": [ 4 | "**/*.test.ts" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /packages/core/lib/es-utils/is-array.js: -------------------------------------------------------------------------------- 1 | // Array#isArray 2 | module.exports = obj => Object.prototype.toString.call(obj) === '[object Array]' 3 | -------------------------------------------------------------------------------- /test/node/features/fixtures/handled/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /test/node/features/fixtures/koa-1x/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "dependencies": { 4 | "koa": "^1.6.2" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /examples/electron/electron-basic/src/bugsnag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/electron/electron-basic/src/bugsnag.png -------------------------------------------------------------------------------- /examples/js/react/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: monospace; 3 | max-width: 600px; 4 | margin: 50px auto; 5 | padding: 0 20px; 6 | } 7 | -------------------------------------------------------------------------------- /test/node/features/fixtures/connect/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "dependencies": { 4 | "connect": "^3.6.6" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/node/features/fixtures/sessions/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /test/node/features/fixtures/unhandled/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "packages": [ 3 | "packages/*" 4 | ], 5 | "version": "8.7.0", 6 | "$schema": "node_modules/lerna/schemas/lerna-schema.json" 7 | } -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_12/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_12/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_17/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_17/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/disable-session-tracking.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | return { 3 | autoTrackSessions: false 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /test/node/features/fixtures/contextualize/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /test/node/features/fixtures/project_root/out.js: -------------------------------------------------------------------------------- 1 | module.exports = function (fn) { 2 | console.log('I’m used to test inProject=false') 3 | fn() 4 | } 5 | -------------------------------------------------------------------------------- /test/node/features/fixtures/project_root/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "dependencies": { 4 | "lodash": "^4.17.21" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/node/features/fixtures/proxy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "dependencies": { 4 | "http-proxy-agent": "^2.1.0" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/node/features/fixtures/surrounding_code/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "version": "1.0.0", 4 | "lockfileVersion": 1 5 | } 6 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/replacements/ios/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'cocoapods', '1.14.3' 4 | gem 'xcodeproj', '< 1.26.0' -------------------------------------------------------------------------------- /examples/ts/angular/src/typings.d.ts: -------------------------------------------------------------------------------- 1 | /* SystemJS module definition */ 2 | declare var module: NodeModule; 3 | interface NodeModule { 4 | id: string; 5 | } 6 | -------------------------------------------------------------------------------- /packages/react-native-cli/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/react-native-cli 2 | 3 | A tool to help integrate Bugsnag with a React Native app. 4 | 5 | ## License 6 | MIT 7 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_react/webpack4/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["@babel/preset-env", "@babel/preset-react", "@babel/preset-typescript"] 3 | } 4 | -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/network-breadcrumbs.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | return { 3 | enabledBreadcrumbTypes: ['request'] 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | rn063example 3 | 4 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/ios/rn063example/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | rn071example 3 | 4 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/ios/rn071example/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /packages/plugin-hono/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["."], 4 | "compilerOptions": { 5 | "types": ["jest"], 6 | } 7 | } -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/null-enabled-breadcrumb-types.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | return { 3 | enabledBreadcrumbTypes: null 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/plugin-angular/src/index.ts: -------------------------------------------------------------------------------- 1 | export { default as plugin } from './lib/plugin' 2 | export { default as BugsnagErrorHandler } from './lib/bugsnag-error-handler' 3 | -------------------------------------------------------------------------------- /packages/plugin-electron-app/src/get_version.h: -------------------------------------------------------------------------------- 1 | const char *bugsnag_plugin_app_get_package_version(void); 2 | const char *bugsnag_plugin_app_get_bundle_version(void); 3 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/app/debug.keystore -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/app/debug.keystore -------------------------------------------------------------------------------- /test/node/features/fixtures/koa/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "dependencies": { 4 | "koa": "^2.5.2", 5 | "koa-bodyparser": "^4.3.0" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /packages/react-native/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/packages/react-native/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /packages/react-native/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | **/node_modules 3 | !packages/plugin-node-surrounding-code/test/fixtures/node_modules/mock-module/index.js 4 | lerna-debug.log 5 | npm-debug.log 6 | **/*.tgz -------------------------------------------------------------------------------- /examples/reactnative/rn071example/ios/rn071example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : RCTAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/node/features/fixtures/express/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "dependencies": { 4 | "body-parser": "^1.20.2", 5 | "express": "^4.16.3" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/node/features/fixtures/hono/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "dependencies": { 4 | "@hono/node-server": "^1.13.2", 5 | "hono": "^4.6.3" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/node/features/fixtures/restify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "dependencies": { 4 | "restify": "^11.1.0", 5 | "restify-errors": "^6.1.1" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "packages/react-native/ios/vendor/bugsnag-cocoa"] 2 | path = packages/react-native/ios/vendor/bugsnag-cocoa 3 | url = https://github.com/bugsnag/bugsnag-cocoa.git 4 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | bracketSpacing: false, 3 | jsxBracketSameLine: true, 4 | singleQuote: true, 5 | trailingComma: 'all', 6 | }; 7 | -------------------------------------------------------------------------------- /packages/electron/src/id.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | name: 'Bugsnag Electron', 3 | version: require('../package.json').version, 4 | url: 'https://github.com/bugsnag/bugsnag-js' 5 | } 6 | -------------------------------------------------------------------------------- /packages/plugin-angular/ng-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "node_modules/ng-packagr/ng-package.schema.json", 3 | "dest": "dist", 4 | "lib": { 5 | "entryFile": "src/index.ts" 6 | } 7 | } -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_12/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/test/browser/features/fixtures/plugin_angular/angular_12/src/favicon.ico -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_17/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/test/browser/features/fixtures/plugin_angular/angular_17/src/favicon.ico -------------------------------------------------------------------------------- /test/electron/features/support/utils/expect.js: -------------------------------------------------------------------------------- 1 | const expect = require('expect') 2 | const matchers = require('./payload-matchers') 3 | expect.extend(matchers) 4 | 5 | module.exports = expect 6 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /packages/core/lib/es-utils/map.js: -------------------------------------------------------------------------------- 1 | const reduce = require('./reduce') 2 | 3 | // Array#map 4 | module.exports = (arr, fn) => 5 | reduce(arr, (accum, item, i, arr) => accum.concat(fn(item, i, arr)), []) 6 | -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/disable-unhandled-rejections.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | return { 3 | enabledErrorTypes: { 4 | unhandledRejections: false 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /examples/electron/electron-basic/src/preload.js: -------------------------------------------------------------------------------- 1 | // See the Electron documentation for details on how to use preload scripts: 2 | // https://www.electronjs.org/docs/latest/tutorial/process-model#preload-scripts 3 | -------------------------------------------------------------------------------- /packages/core/lib/es-utils/includes.js: -------------------------------------------------------------------------------- 1 | const reduce = require('./reduce') 2 | // Array#includes 3 | module.exports = (arr, x) => 4 | reduce(arr, (accum, item, i, arr) => accum === true || item === x, false) 5 | -------------------------------------------------------------------------------- /packages/plugin-node-surrounding-code/test/fixtures/node_modules/mock-module/index.js: -------------------------------------------------------------------------------- 1 | function doNotLoadMe(a, b, c) { 2 | console.log('this file should not be loaded by the surrounding code plugin') 3 | } 4 | -------------------------------------------------------------------------------- /packages/react-native/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["."], 4 | "compilerOptions": { 5 | "lib": ["es2015"], 6 | "types": ["jest", "react-native"], 7 | } 8 | } -------------------------------------------------------------------------------- /test/node/features/fixtures/corporate-proxy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:latest@sha256:0bcc32c2d59aa8bf416a43be9672a59fa1b9f0f0fbdb6fe069d67e7be2f98e9e 2 | RUN npm install -g proxy@1.0.2 3 | CMD proxy 4 | EXPOSE 3128 5 | -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | # avoid installing browsers for testing during `npm install` 2 | PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 3 | 4 | # automatically launch `local-npm:start` script when running integration tests 5 | START_LOCAL_NPM=1 6 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | arrowParens: 'avoid', 3 | bracketSameLine: true, 4 | bracketSpacing: false, 5 | singleQuote: true, 6 | trailingComma: 'all', 7 | }; 8 | -------------------------------------------------------------------------------- /packages/core/lib/validators/int-range.js: -------------------------------------------------------------------------------- 1 | module.exports = (min = 1, max = Infinity) => value => 2 | typeof value === 'number' && 3 | parseInt('' + value, 10) === value && 4 | value >= min && value <= max 5 | -------------------------------------------------------------------------------- /packages/plugin-electron-client-state-persistence/clib.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "kgabis/parson": "1.1.0", 4 | "tinycthread/tinycthread": "6957fc8383d6c7db25b60b8c849b29caab1caaee" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/android/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/core/index.js: -------------------------------------------------------------------------------- 1 | module.exports.Breadcrumb = require('./breadcrumb') 2 | module.exports.Client = require('./client') 3 | module.exports.Event = require('./event') 4 | module.exports.Session = require('./session') 5 | -------------------------------------------------------------------------------- /packages/plugin-electron-renderer-strip-project-root/strip-project-root.d.ts: -------------------------------------------------------------------------------- 1 | import Client from '@bugsnag/core' 2 | 3 | declare const plugin: { 4 | load: (client: Client) => void 5 | } 6 | 7 | export default plugin 8 | -------------------------------------------------------------------------------- /packages/plugin-react-navigation/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["."], 4 | "compilerOptions": { 5 | "lib": ["es2015"], 6 | "types": ["jest", "react-native"], 7 | } 8 | } -------------------------------------------------------------------------------- /test/browser/features/fixtures/csp/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-csp-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/MetadataNativeScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface MetadataNativeScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/PauseSessionScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface PauseSessionScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/ResumeSessionScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface ResumeSessionScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/StartSessionScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface StartSessionScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/core/lib/es-utils/reduce.js: -------------------------------------------------------------------------------- 1 | // Array#reduce 2 | module.exports = (arr, fn, accum) => { 3 | let val = accum 4 | for (let i = 0, len = arr.length; i < len; i++) val = fn(val, arr[i], i, arr) 5 | return val 6 | } 7 | -------------------------------------------------------------------------------- /packages/delivery-node/delivery.d.ts: -------------------------------------------------------------------------------- 1 | import { Delivery } from '@bugsnag/core/client' 2 | import { Client } from '@bugsnag/core' 3 | 4 | declare const delivery: (client: Client) => Delivery 5 | 6 | export default delivery 7 | -------------------------------------------------------------------------------- /packages/plugin-electron-app/src/get_version-linux.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | const char *bugsnag_plugin_app_get_package_version() { return NULL; } 4 | const char *bugsnag_plugin_app_get_bundle_version() { return NULL; } 5 | -------------------------------------------------------------------------------- /packages/plugin-react-native-hermes/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["."], 4 | "compilerOptions": { 5 | "lib": ["es2015"], 6 | "types": ["jest", "react-native"], 7 | } 8 | } -------------------------------------------------------------------------------- /packages/plugin-react-native-session/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["."], 4 | "compilerOptions": { 5 | "lib": ["es2015"], 6 | "types": ["jest", "react-native"], 7 | } 8 | } -------------------------------------------------------------------------------- /test/browser/features/fixtures/delivery/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-delivery", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/redaction/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-csp-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/AppNativeHandledScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface AppNativeHandledScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/UserNativeClientScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface UserNativeClientScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /bin/minify: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | cat - | ../../node_modules/.bin/uglifyjs \ 4 | --compress \ 5 | --mangle \ 6 | --ie8 \ 7 | --source-map "includeSources,content=inline,url=$(basename "$1").map" \ 8 | --output "$1" 9 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/core/lib/es-utils/filter.js: -------------------------------------------------------------------------------- 1 | const reduce = require('./reduce') 2 | 3 | // Array#filter 4 | module.exports = (arr, fn) => 5 | reduce(arr, (accum, item, i, arr) => !fn(item, i, arr) ? accum : accum.concat(item), []) 6 | -------------------------------------------------------------------------------- /packages/plugin-react-native-client-sync/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["."], 4 | "compilerOptions": { 5 | "lib": ["es2015"], 6 | "types": ["jest", "react-native"], 7 | } 8 | } -------------------------------------------------------------------------------- /packages/plugin-react-native-event-sync/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["."], 4 | "compilerOptions": { 5 | "lib": ["es2015"], 6 | "types": ["jest", "react-native"], 7 | } 8 | } -------------------------------------------------------------------------------- /packages/react-native/ios/BugsnagReactNative/BugsnagReactNativePlugin.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "BugsnagPlugin.h" 4 | 5 | @interface BugsnagReactNativePlugin : NSObject 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/rollup/src/notify_new_error.js: -------------------------------------------------------------------------------- 1 | import Bugsnag from '@bugsnag/browser' 2 | import config from './lib/config' 3 | 4 | Bugsnag.start(config) 5 | 6 | Bugsnag.notify(new Error('bad things')) 7 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-handled-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/sessions/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-sessions-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/unhandled/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-unhandled-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/AppNativeUnhandledScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface AppNativeUnhandledScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/ContextNativeCustomScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface ContextNativeCustomScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/DeviceNativeHandledScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface DeviceNativeHandledScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/HandledNativeErrorScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface HandledNativeErrorScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/NativeFeatureFlagsScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface NativeFeatureFlagsScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /examples/js/web-worker/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "web-worker", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "serve . -p 8066 -n" 6 | }, 7 | "devDependencies": { 8 | "serve": "^14.1.2" 9 | } 10 | } -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/ts/angular/src/styles.css: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | body { 3 | font-family: monospace; 4 | max-width: 600px; 5 | margin: 50px auto; 6 | padding: 0 20px; 7 | } 8 | -------------------------------------------------------------------------------- /packages/plugin-react-native-navigation/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["."], 4 | "compilerOptions": { 5 | "lib": ["es2015"], 6 | "types": ["jest"], 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/plugin-react-native-unhandled-rejection/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["."], 4 | "compilerOptions": { 5 | "lib": ["es2015"], 6 | "types": ["jest", "react-native"], 7 | } 8 | } -------------------------------------------------------------------------------- /packages/plugin-vue/test/vue2.test.ts: -------------------------------------------------------------------------------- 1 | import { classify } from '../src/vue2' 2 | 3 | it('bugsnag vue: classify(str)', () => { 4 | expect(classify('foo_bar')).toBe('FooBar') 5 | expect(classify('foo-bar')).toBe('FooBar') 6 | }) 7 | -------------------------------------------------------------------------------- /packages/react-native/src/test/setup.js: -------------------------------------------------------------------------------- 1 | if (global.window === undefined) { 2 | global.window = global 3 | } 4 | 5 | // trick the notifier in thinking it's not running in the remote debugger 6 | global.nativeCallSyncHook = () => {} 7 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/typescript/src/notify_new_error.ts: -------------------------------------------------------------------------------- 1 | import Bugsnag from '@bugsnag/browser' 2 | import config from './lib/config' 3 | 4 | Bugsnag.start(config) 5 | 6 | Bugsnag.notify(new Error('bad things')) 7 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack3/src/notify_new_error.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/browser') 2 | var config = require('./lib/config') 3 | 4 | Bugsnag.start(config) 5 | 6 | Bugsnag.notify(new Error('bad things')) 7 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack4/src/notify_new_error.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/browser') 2 | var config = require('./lib/config') 3 | 4 | Bugsnag.start(config) 5 | 6 | Bugsnag.notify(new Error('bad things')) 7 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/inline_script/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-inline-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/on_error/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-before-send-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/strict_mode/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-strict-mode-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/user_info/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-release-stage-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/DeviceNativeUnhandledScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface DeviceNativeUnhandledScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/GroupingDiscriminatorScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface GroupingDiscriminatorScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/UnhandledNativeErrorScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface UnhandledNativeErrorScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /packages/plugin-react-native-global-error-handler/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["."], 4 | "compilerOptions": { 5 | "lib": ["es2015"], 6 | "types": ["jest", "react-native"], 7 | } 8 | } -------------------------------------------------------------------------------- /packages/plugin-react-native-orientation-breadcrumbs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../../tsconfig.json", 3 | "include": ["."], 4 | "compilerOptions": { 5 | "lib": ["es2015"], 6 | "types": ["jest", "react-native"], 7 | } 8 | } -------------------------------------------------------------------------------- /packages/react-native/ios/BugsnagReactNative/BugsnagReactNativeEmitter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface BugsnagReactNativeEmitter : RCTEventEmitter 5 | @end 6 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/browserify/src/notify_new_error.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/browser') 2 | var config = require('./lib/config') 3 | 4 | Bugsnag.start(config) 5 | 6 | Bugsnag.notify(new Error('bad things')) 7 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/ip_redaction/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-ip-redaction-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_vue/typescript_vue3/README.md: -------------------------------------------------------------------------------- 1 | - The version of vue in this fixture has been locked down to `~3.0.5` as using higher minor versions was causing CI to fail. Requires further investigation. [PLAT-8515] 2 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/release_stage/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-release-stage-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/BreadcrumbsNativeManualScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface BreadcrumbsNativeManualScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/FeatureFlagsNativeCrashScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface FeatureFlagsNativeCrashScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/MetadataNativeUnhandledScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface MetadataNativeUnhandledScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/Scenario.js: -------------------------------------------------------------------------------- 1 | export default class Scenario { 2 | run () { 3 | } 4 | 5 | timeout (ms) { 6 | return new Promise(resolve => setTimeout(resolve, ms)) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/js/browser-cdn/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-example", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "serve . -p 65531 -n" 6 | }, 7 | "dependencies": { 8 | "serve": "^11.3.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn063example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugsnag/bugsnag-js/HEAD/examples/reactnative/rn071example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /test/browser/features/fixtures/auto_detect_errors/script/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-auto-notify-script", 3 | "private": true, 4 | "scripts": { 5 | "build": "echo 'Done'" 6 | }, 7 | "dependencies": {} 8 | } 9 | -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/feature-flags.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | return { 3 | featureFlags: [ 4 | { name: 'from main config 1', variant: '1234' }, 5 | { name: 'from main config 2' } 6 | ] 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/scripts/create_package.json_tar.sh: -------------------------------------------------------------------------------- 1 | #! 2 | 3 | rm -f min_packages.tar 4 | 5 | find packages/** -maxdepth 2 -type f \( -name package.json -or -name package-lock.json \) | tar --mtime='1970-01-01' -cf - -T - | gzip --no-name > min_packages.tar -------------------------------------------------------------------------------- /packages/react-native-cli/src/lib/OnPremise.ts: -------------------------------------------------------------------------------- 1 | export enum UrlType { 2 | NOTIFY = 'notify', 3 | SESSIONS = 'sessions', 4 | UPLOAD = 'upload', 5 | BUILD = 'build', 6 | } 7 | 8 | export type OnPremiseUrls = Partial> 9 | -------------------------------------------------------------------------------- /test/node/features/fixtures/webpack/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-test", 3 | "scripts": { 4 | "build": "webpack" 5 | }, 6 | "dependencies": { 7 | "webpack": "^4.47.0", 8 | "webpack-cli": "^3.3.12" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/GroupingDiscriminatorNativeScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface GroupingDiscriminatorNativeScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/NativePromiseRejectionHandledScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface NativePromiseRejectionHandledScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /packages/delivery-xml-http-request/delivery.d.ts: -------------------------------------------------------------------------------- 1 | import { Delivery } from '@bugsnag/core/client' 2 | import { Client } from '@bugsnag/core' 3 | 4 | declare const delivery: (client: Client, window?: Window) => Delivery 5 | 6 | export default delivery 7 | -------------------------------------------------------------------------------- /packages/electron-test-helpers/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/electron-test-helpers 2 | 3 | Test helpers for @bugsnag/electron 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/rollup/promise_catch.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/NativePromiseRejectionUnhandledScenario.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Scenario.h" 3 | 4 | @interface NativePromiseRejectionUnhandledScenario : Scenario 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /examples/js/express/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8@sha256:a681bf74805b80d03eb21a6c0ef168a976108a287a74167ab593fc953aac34df 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package* /usr/src/app/ 6 | RUN npm install 7 | 8 | COPY . /usr/src/app/ 9 | CMD npm start 10 | -------------------------------------------------------------------------------- /examples/js/koa/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8@sha256:a681bf74805b80d03eb21a6c0ef168a976108a287a74167ab593fc953aac34df 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package* /usr/src/app/ 6 | RUN npm install 7 | 8 | COPY . /usr/src/app/ 9 | CMD npm start 10 | -------------------------------------------------------------------------------- /examples/js/restify/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8@sha256:a681bf74805b80d03eb21a6c0ef168a976108a287a74167ab593fc953aac34df 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package* /usr/src/app/ 6 | RUN npm install 7 | 8 | COPY . /usr/src/app/ 9 | CMD npm start 10 | -------------------------------------------------------------------------------- /examples/js/vue/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8@sha256:a681bf74805b80d03eb21a6c0ef168a976108a287a74167ab593fc953aac34df 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package* /usr/src/app/ 6 | RUN npm install 7 | 8 | COPY . /usr/src/app/ 9 | CMD npm run serve 10 | -------------------------------------------------------------------------------- /packages/plugin-electron-ipc/lib/constants.js: -------------------------------------------------------------------------------- 1 | module.exports.CHANNEL_CONFIG = 'bugsnag::configure' 2 | module.exports.CHANNEL_RENDERER_TO_MAIN_SYNC = 'bugsnag::renderer-to-main-sync' 3 | module.exports.CHANNEL_RENDERER_TO_MAIN = 'bugsnag::renderer-to-main' 4 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/browserify/promise_catch.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack3/promise_catch.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack4/promise_catch.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/js/browser-cdn/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8@sha256:a681bf74805b80d03eb21a6c0ef168a976108a287a74167ab593fc953aac34df 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package* /usr/src/app/ 6 | RUN npm install 7 | 8 | COPY . /usr/src/app/ 9 | CMD npm start 10 | -------------------------------------------------------------------------------- /examples/js/nuxtjs/pages/borked.vue: -------------------------------------------------------------------------------- 1 | 3 | 4 | 14 | -------------------------------------------------------------------------------- /examples/js/plain-node/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:12@sha256:01627afeb110b3054ba4a1405541ca095c8bfca1cb6f2be9479c767a2711879e 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package* /usr/src/app/ 6 | RUN npm install 7 | 8 | COPY . /usr/src/app/ 9 | CMD npm start 10 | -------------------------------------------------------------------------------- /examples/js/plain-node/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-example", 3 | "version": "1.0.0", 4 | "main": "app.js", 5 | "scripts": { 6 | "start": "node app" 7 | }, 8 | "dependencies": { 9 | "@bugsnag/js": "^7.0.0" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/js/react/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8@sha256:a681bf74805b80d03eb21a6c0ef168a976108a287a74167ab593fc953aac34df 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package* /usr/src/app/ 6 | RUN npm install 7 | 8 | COPY . /usr/src/app/ 9 | CMD npm run serve 10 | -------------------------------------------------------------------------------- /examples/js/react/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @bugsnag/js: React example 6 | 7 | 8 |
9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'rn063example' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /examples/ts/plain-node/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:12@sha256:01627afeb110b3054ba4a1405541ca095c8bfca1cb6f2be9479c767a2711879e 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package* /usr/src/app/ 6 | RUN npm install 7 | 8 | COPY . /usr/src/app/ 9 | CMD npm start 10 | -------------------------------------------------------------------------------- /packages/delivery-fetch/delivery.d.ts: -------------------------------------------------------------------------------- 1 | import type { Client } from '@bugsnag/core' 2 | import type { Delivery } from '@bugsnag/core/client' 3 | 4 | declare const delivery: (client: Client, fetch?: GlobalFetch['fetch']) => Delivery 5 | 6 | export default delivery 7 | -------------------------------------------------------------------------------- /packages/plugin-angular/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files. 2 | 3 | # Generated bundles for e2e testing 4 | bugsnag-plugin-angular-*.tgz 5 | 6 | # Miscellaneous 7 | .angular 8 | -------------------------------------------------------------------------------- /packages/plugin-electron-session/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-session 2 | 3 | @bugsnag/electron plugin for sessions 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/browserify/notify_new_error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/browserify/try_catch_notify.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/rollup/notify_new_error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/rollup/try_catch_notify.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack3/notify_new_error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack3/try_catch_notify.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack4/notify_new_error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack4/try_catch_notify.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig: https://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | [*] 7 | end_of_line = lf 8 | insert_final_newline = true 9 | indent_style = space 10 | indent_size = 2 11 | trim_trailing_whitespace = true 12 | -------------------------------------------------------------------------------- /examples/js/nuxtjs/components/README.md: -------------------------------------------------------------------------------- 1 | # COMPONENTS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | The components directory contains your Vue.js Components. 6 | 7 | _Nuxt.js doesn't supercharge these components._ 8 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /packages/core/lib/async-every.d.ts: -------------------------------------------------------------------------------- 1 | type NodeCallbackType = (error?: Error | null, result?: T) => void; 2 | 3 | export default function every( 4 | arr: T[], 5 | fn: (item: T, cb: NodeCallbackType) => void, 6 | cb: NodeCallbackType 7 | ): void 8 | -------------------------------------------------------------------------------- /packages/delivery-electron/delivery.d.ts: -------------------------------------------------------------------------------- 1 | import { Delivery } from '@bugsnag/core/client' 2 | import { Client } from '@bugsnag/core' 3 | 4 | declare const delivery: (filestore: any, net: any, app: any) => (client: Client) => Delivery 5 | 6 | export default delivery 7 | -------------------------------------------------------------------------------- /packages/plugin-electron-app/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-app 2 | 3 | @bugsnag/electron plugin to collect app information 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-react-native-hermes/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-react-native-hermes 2 | 3 | Adds support for the Hermes JS engine. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/node/features/fixtures/cause/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | -------------------------------------------------------------------------------- /test/node/features/fixtures/handled/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | -------------------------------------------------------------------------------- /test/node/features/fixtures/proxy/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | -------------------------------------------------------------------------------- /test/node/features/fixtures/sessions/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | -------------------------------------------------------------------------------- /test/node/features/fixtures/unhandled/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | -------------------------------------------------------------------------------- /config/full-suite-jest.config.js: -------------------------------------------------------------------------------- 1 | // Run default and electron runner tests as a single suite 2 | const { projects } = require('./electron-jest.config') 3 | const config = require('../jest.config') 4 | 5 | config.projects.push(...projects) 6 | 7 | module.exports = config 8 | -------------------------------------------------------------------------------- /examples/js/nuxtjs/modules/bugsnag/client.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Bugsnag from '@bugsnag/js' 3 | import BugsnagPluginVue from '@bugsnag/plugin-vue' 4 | 5 | Bugsnag.start({ 6 | apiKey:'<%= options.apiKey %>', 7 | plugins: [new BugsnagPluginVue(Vue)] 8 | }) 9 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | # You may use http://rbenv.org/ or https://rvm.io/ to install and use this version 4 | ruby File.read(File.join(__dir__, '.ruby-version')).strip 5 | 6 | gem 'cocoapods', '~> 1.11', '>= 1.11.3' 7 | -------------------------------------------------------------------------------- /packages/core/lib/callback-runner.d.ts: -------------------------------------------------------------------------------- 1 | import { NodeCallbackType } from './async-every' 2 | 3 | export default function callbackRunner( 4 | callbacks: any, 5 | event: T, 6 | onCallbackError: (err: Error) => void, 7 | cb: NodeCallbackType 8 | ): void 9 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/rollup/src/try_catch_notify.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/browser') 2 | var config = require('./lib/config') 3 | 4 | Bugsnag.start(config) 5 | 6 | try { 7 | foo.bar() 8 | } catch (e) { 9 | Bugsnag.notify(e) 10 | } 11 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_react/webpack4/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/feature-flags-on-send-error.js: -------------------------------------------------------------------------------- 1 | const featureFlagsConfig = require('./feature-flags') 2 | const onSendErrorConfig = require('./on-send-error') 3 | 4 | module.exports = () => Object.assign({}, featureFlagsConfig(), onSendErrorConfig()) 5 | -------------------------------------------------------------------------------- /test/node/features/fixtures/contextualize/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | -------------------------------------------------------------------------------- /test/node/features/fixtures/project_root/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | -------------------------------------------------------------------------------- /packages/plugin-electron-device/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-device 2 | 3 | @bugsnag/electron plugin to collect device information 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-intercept/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-intercept 2 | 3 | This plugin provides a convenience function which can be passed to a node-style error-first callback, or as the catch callback in a promise. It is included in the Node notifier. 4 | 5 | ## License 6 | MIT 7 | -------------------------------------------------------------------------------- /test/browser/features/csp.feature: -------------------------------------------------------------------------------- 1 | @csp 2 | Feature: Compatibility with a Content Security Policy 3 | 4 | Scenario: notifer does not crash for CSP violations 5 | When I navigate to the test URL "/csp/script/no_crash.html" 6 | Then I let the test page run for up to 10 seconds 7 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/browserify/src/try_catch_notify.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/browser') 2 | var config = require('./lib/config') 3 | 4 | Bugsnag.start(config) 5 | 6 | try { 7 | foo.bar() 8 | } catch (e) { 9 | Bugsnag.notify(e) 10 | } 11 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack3/src/try_catch_notify.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/browser') 2 | var config = require('./lib/config') 3 | 4 | Bugsnag.start(config) 5 | 6 | try { 7 | foo.bar() 8 | } catch (e) { 9 | Bugsnag.notify(e) 10 | } 11 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack4/src/try_catch_notify.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/browser') 2 | var config = require('./lib/config') 3 | 4 | Bugsnag.start(config) 5 | 6 | try { 7 | foo.bar() 8 | } catch (e) { 9 | Bugsnag.notify(e) 10 | } 11 | -------------------------------------------------------------------------------- /test/node/features/fixtures/surrounding_code/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/DeviceJsUnhandledScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | 3 | export class DeviceJsUnhandledScenario extends Scenario { 4 | run () { 5 | throw new Error('DeviceJsUnhandledScenario') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/UnhandledJsErrorScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | 3 | export class UnhandledJsErrorScenario extends Scenario { 4 | run () { 5 | throw new Error('UnhandledJsErrorScenario') 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /examples/ts/angular/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:8@sha256:a681bf74805b80d03eb21a6c0ef168a976108a287a74167ab593fc953aac34df 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package* /usr/src/app/ 6 | RUN npm install 7 | 8 | COPY . /usr/src/app/ 9 | CMD npm run serve -- --host 0.0.0.0 10 | -------------------------------------------------------------------------------- /packages/electron/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/electron 2 | 3 | This package contains the Electron implementation of the Bugsnag notifier for JavaScript. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-electron-preload-error/test/fixtures/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | my cool page 5 | 6 | 7 |

my cool page

8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /test/electron/fixtures/app/webpack.renderer.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | resolve: { 3 | fallback: { 4 | fs: false, 5 | path: require.resolve('path-browserify') 6 | } 7 | }, 8 | module: { 9 | rules: require('./webpack.rules') 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/electron/fixtures/events/sample-event.json: -------------------------------------------------------------------------------- 1 | {"events":[{"app":{"version":"5.6.0"},"context":"sale","device":{"osName":"beOS","osVersion":"{REGEX:\\d+\\.\\d+}"},"metadata":{"counters":{"trees":"{TYPE:number}","carrots":9}},"exceptions":[{"stacktrace":[],"errorClass":"Error"}]}]} 2 | -------------------------------------------------------------------------------- /test/node/features/fixtures/koa/osv-scanner.toml: -------------------------------------------------------------------------------- 1 | [[IgnoredVulns]] 2 | id = "GHSA-593f-38f6-jp5m" 3 | reason = "test fixture dependency does not affect end users" 4 | 5 | [[IgnoredVulns]] 6 | id = "GHSA-hrpp-h998-j3pp" 7 | reason = "test fixture dependency does not affect end users" 8 | -------------------------------------------------------------------------------- /examples/js/nextjs/pages/_app.js: -------------------------------------------------------------------------------- 1 | import { start } from '../lib/bugsnag' 2 | 3 | start(); 4 | 5 | export default function App({ Component, pageProps, err }) { 6 | // Workaround for https://github.com/vercel/next.js/issues/8592 7 | return 8 | } 9 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/ios/rn063example/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /packages/react-native/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /test/node/features/fixtures/restify/osv-scanner.toml: -------------------------------------------------------------------------------- 1 | [[IgnoredVulns]] 2 | id = "GHSA-rrr8-f88r-h8q6" 3 | reason = "test fixture dependency does not affect end users" 4 | 5 | [[IgnoredVulns]] 6 | id = "GHSA-m6fv-jmcg-4jfg" 7 | reason = "test fixture dependency does not affect end users" 8 | -------------------------------------------------------------------------------- /examples/ts/angular/e2e/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getParagraphText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/electron-network-status/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/electron-network-status 2 | 3 | @bugsnag/electron package for watching the network connectivity status 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-electron-network-status/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-network-status 2 | 3 | @bugsnag/electron plugin to monitor the network status 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/react-native-cli/src/lib/__test__/fixtures/index-before.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import {AppRegistry} from 'react-native'; 6 | import App from './App'; 7 | import {name as appName} from './app.json'; 8 | 9 | AppRegistry.registerComponent(appName, () => App); 10 | -------------------------------------------------------------------------------- /test/node/features/fixtures/webpack/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | RUN npm run build 13 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/expected_breadcrumbs/NativeManualScenario.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "state", 3 | "name": "oh native crumbs", 4 | "timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$", 5 | "metaData": { 6 | "from": "^android|ios$" 7 | } 8 | } -------------------------------------------------------------------------------- /.buildkite/README.md: -------------------------------------------------------------------------------- 1 | ## Package manifest 2 | 3 | The `package_manifest.json` includes a list of paths for each set of end-to-end tests, which when updated in a given PR, will automatically trigger those tests to be run. Otherwise, test suites can be manually unblocked and run on a case by case basis. -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | dist 2 | examples 3 | **/node_modules/** 4 | scratch 5 | coverage 6 | packages/core/types/test/*.js 7 | packages/react-native/android/build/reports 8 | packages/**/features 9 | packages/**/fixtures 10 | test/browser 11 | test/node 12 | test/react-native-cli/features/fixtures 13 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/ios/rn063example/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/core/lib/path-normalizer.js: -------------------------------------------------------------------------------- 1 | const { join, resolve } = require('path') 2 | 3 | // normalise a path to a directory, adding a trailing slash if it doesn't already 4 | // have one and resolve it to make it absolute (e.g. get rid of any ".."s) 5 | module.exports = p => join(resolve(p), '/') 6 | -------------------------------------------------------------------------------- /packages/plugin-electron-preload-error/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-preload-error 2 | 3 | @bugsnag/electron plugin to handle errors in preload scripts 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-hono/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-hono 2 | 3 | A [@bugsnag/js](https://github.com/bugsnag/bugsnag-js) plugin for capturing errors in Hono applications. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_angular/angular_17/.browserslistrc: -------------------------------------------------------------------------------- 1 | # You can see what browsers were selected by your queries by running: 2 | # npx browserslist 3 | 4 | last 2 Chrome versions 5 | last 1 Firefox version 6 | Edge >= 18 7 | last 2 Safari major versions 8 | iOS >= 12 9 | Firefox ESR -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/disable-uncaught-exceptions.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | // disable alert on exception 3 | process.on('uncaughtException', () => {}) 4 | 5 | return { 6 | enabledErrorTypes: { 7 | unhandledExceptions: false 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/js/nuxtjs/.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /examples/js/nuxtjs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:10@sha256:59531d2835edd5161c8f9512f9e095b1836f7a1fcb0ab73e005ec46047384911 2 | 3 | WORKDIR /usr/src/app 4 | 5 | COPY package* /usr/src/app/ 6 | RUN npm install 7 | 8 | COPY . /usr/src/app/ 9 | RUN npm run build 10 | ENV HOST 0.0.0.0 11 | CMD npm start 12 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/ios/rn071example/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char *argv[]) 6 | { 7 | @autoreleasepool { 8 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/core/lib/validators/list-of-functions.js: -------------------------------------------------------------------------------- 1 | const filter = require('../es-utils/filter') 2 | const isArray = require('../es-utils/is-array') 3 | 4 | module.exports = value => typeof value === 'function' || (isArray(value) && filter(value, f => typeof f === 'function').length === value.length) 5 | -------------------------------------------------------------------------------- /packages/delivery-fetch/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/delivery-fetch 2 | 3 | This package contains the fetch implementation of the BugSnag notifier delivery system for JavaScript. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. -------------------------------------------------------------------------------- /packages/electron-filestore/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/electron-filestore 2 | 3 | @bugsnag/electron package for storing events, sessions and crash dumps on the file system 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/in-flight/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/in-flight 2 | 3 | Internal [@bugsnag/js](https://github.com/bugsnag/bugsnag-js) package to keep track of in-flight requests 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-electron-process-info/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-process-info 2 | 3 | @bugsnag/electron plugin to collect process information for errors 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-electron-screen-breadcrumbs/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-screen-breadcrumbs 2 | 3 | @bugsnag/electron plugin to collect screen breadcrumbs 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-koa/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-koa 2 | 3 | A [@bugsnag/js](https://github.com/bugsnag/bugsnag-js) plugin for capturing errors in Koa web applications. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. -------------------------------------------------------------------------------- /packages/plugin-stackframe-path-normaliser/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-stackframe-path-normaliser 2 | 3 | @bugsnag/js plugin to normalise file paths in stackframes 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/react-native/react-native.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | dependency: { 3 | platforms: { 4 | android: { 5 | packageInstance: 'new BugsnagPackage()', 6 | packageImportPath: 'import com.bugsnag.android.BugsnagPackage;' 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /examples/js/vue/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | @bugsnag/js: Vue example 6 | 7 | 8 |
9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /packages/core/types/breadcrumb.d.ts: -------------------------------------------------------------------------------- 1 | import { BreadcrumbType } from './common' 2 | 3 | declare class Breadcrumb { 4 | public message: string; 5 | public metadata: { [key: string]: any }; 6 | public type: BreadcrumbType; 7 | public timestamp: Date; 8 | } 9 | 10 | export default Breadcrumb 11 | -------------------------------------------------------------------------------- /packages/core/types/bugsnag.d.ts: -------------------------------------------------------------------------------- 1 | import Client from './client' 2 | import { Config } from './common' 3 | 4 | export default interface BugsnagStatic extends Client { 5 | start(apiKeyOrOpts: string | Config): Client 6 | createClient(apiKeyOrOpts: string | Config): Client 7 | isStarted(): boolean 8 | } 9 | -------------------------------------------------------------------------------- /packages/delivery-electron/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/delivery-electron 2 | 3 | @bugsnag/electron delivery mechanism to send events, sessions, and crash dumps from Electron apps 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/aws-lambda/.gitignore: -------------------------------------------------------------------------------- 1 | .aws-sam 2 | node_modules/ 3 | .tgz 4 | 5 | # Ignore the gem lockfile due to Bundler version differences on CI 6 | # We don't really need this anyway because we have one dependency (MazeRunner) 7 | # and we pin it to a specific tag, so it's effectively locked 8 | /Gemfile.lock 9 | -------------------------------------------------------------------------------- /examples/ts/angular/src/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "baseUrl": "./", 6 | "module": "es2015", 7 | "types": [] 8 | }, 9 | "exclude": [ 10 | "test.ts", 11 | "**/*.spec.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /packages/core/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import Breadcrumb from './breadcrumb' 2 | import Client from './client' 3 | import Event from './event' 4 | import Session from './session' 5 | import BugsnagStatic from './bugsnag' 6 | 7 | export * from './common' 8 | export { Breadcrumb, Client, Event, Session, BugsnagStatic } 9 | -------------------------------------------------------------------------------- /packages/electron/src/notifier.js: -------------------------------------------------------------------------------- 1 | const isMain = typeof process !== 'undefined' && process.type === 'browser' 2 | 3 | const Bugsnag = isMain ? require('./client/main') : require('./client/renderer') 4 | 5 | // commonjs 6 | module.exports = Bugsnag 7 | 8 | // ESM 9 | module.exports.default = Bugsnag 10 | -------------------------------------------------------------------------------- /packages/plugin-electron-app-breadcrumbs/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-app-breadcrumbs 2 | 3 | @bugsnag/electron plugin to collect breadcrumbs for app lifecycle events 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | gem 'cocoapods', '~> 1.14.3' 4 | gem 'xcodeproj', '< 1.26.0' 5 | 6 | # Only install bumpsnag if we're using Github actions 7 | unless ENV['GITHUB_ACTIONS'].nil? 8 | gem 'bumpsnag', git: 'https://github.com/bugsnag/platforms-bumpsnag', branch: 'main' 9 | end 10 | -------------------------------------------------------------------------------- /packages/plugin-aws-lambda/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-aws-lambda 2 | 3 | A [@bugsnag/js](https://github.com/bugsnag/bugsnag-js) plugin for capturing errors in AWS Lambda functions. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-electron-power-monitor-breadcrumbs/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-power-monitor-breadcrumbs 2 | 3 | @bugsnag/electron plugin to collect power state breadcrumbs 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-hono/src/load-connection-info.js: -------------------------------------------------------------------------------- 1 | module.exports = async c => { 2 | try { 3 | const { getConnInfo } = await import('@hono/node-server/conninfo') 4 | if (getConnInfo) { 5 | return getConnInfo(c) 6 | } 7 | return null 8 | } catch { 9 | return null 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/plugin-internal-callback-marker/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-internal-callback-marker 2 | 3 | @bugsnag/js plugin to annotate all OnError callbacks added by internal plugins 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-restify/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-restify 2 | 3 | A [@bugsnag/js](https://github.com/bugsnag/bugsnag-js) plugin for capturing errors in Restify web applications. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-strip-project-root/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-strip-project-root 2 | 3 | This plugin strips the project root from stacktraces. It is included in the Node notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/RCTFatalScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import { NativeInterface } from '../lib/native' 3 | 4 | export class RCTFatalScenario extends Scenario { 5 | run () { 6 | NativeInterface.runScenario('RCTFatalScenario') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/UnhandledJsPromiseRejectionScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | 3 | export class UnhandledJsPromiseRejectionScenario extends Scenario { 4 | run () { 5 | Promise.reject(new Error('UnhandledJsPromiseRejectionScenario')) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /dockerfiles/Dockerfile.package: -------------------------------------------------------------------------------- 1 | FROM debian:stable@sha256:2231f455dfe63bb856d6d52c714f0ca602c8c69b1c26ac9f6ab3a5ebafa1c9cd 2 | 3 | WORKDIR /app 4 | 5 | COPY packages ./packages 6 | COPY test/scripts/ ./scripts 7 | 8 | RUN ./scripts/create_package.json_tar.sh 9 | 10 | CMD cp min_packages.tar build/min_packages.tar -------------------------------------------------------------------------------- /examples/js/nuxtjs/layouts/README.md: -------------------------------------------------------------------------------- 1 | # LAYOUTS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your Application Layouts. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/views#layouts). 8 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'rn071example' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | includeBuild('../node_modules/react-native-gradle-plugin') 5 | -------------------------------------------------------------------------------- /test/node/features/fixtures/surrounding_code/scenarios/template.json: -------------------------------------------------------------------------------- 1 | { 2 | "17": "add(5)(2) // -> 7", 3 | "18": "subtract(5)(2) // -> 3", 4 | "19": "", 5 | "20": "Bugsnag.notify(new Error('surround me'))", 6 | "21": "", 7 | "22": "function subtract (a) {", 8 | "23": " return function (b) {" 9 | } 10 | -------------------------------------------------------------------------------- /examples/js/nextjs/pages/ssr/scenario1.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SSR scenario 1 3 | * 4 | * getServerSideProps throws an Error. 5 | */ 6 | 7 | const Scenario1 = () =>

SSR scenario 1

8 | 9 | export function getServerSideProps() { 10 | throw new Error('SSR scenario 1') 11 | } 12 | 13 | export default Scenario1 14 | -------------------------------------------------------------------------------- /packages/plugin-electron-net-breadcrumbs/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-net-breadcrumbs 2 | 3 | @bugsnag/electron plugin to collect breadcrumbs from requests made with the net module 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-electron-renderer-event-data/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-renderer-event-data 2 | 3 | @bugsnag/electron plugin to get fully populated event data in renderer callbacks 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/node/features/fixtures/express/expected_breadcrumbs/FirstURLConsoleBreadcrumb.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "log", 3 | "name": "Console output", 4 | "timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$", 5 | "metaData": { 6 | "severity": "log", 7 | "[0]": "For the first URL" 8 | } 9 | } -------------------------------------------------------------------------------- /test/node/features/fixtures/express/expected_breadcrumbs/SecondURLConsoleBreadcrumb.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "log", 3 | "name": "Console output", 4 | "timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$", 5 | "metaData": { 6 | "severity": "log", 7 | "[0]": "For the second URL" 8 | } 9 | } -------------------------------------------------------------------------------- /test/node/features/fixtures/hono/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | 13 | ENV NODE_ENV production 14 | CMD node scenarios/app 15 | -------------------------------------------------------------------------------- /test/node/features/fixtures/koa-1x/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | 13 | ENV NODE_ENV production 14 | CMD node scenarios/app 15 | -------------------------------------------------------------------------------- /test/node/features/fixtures/koa/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | 13 | ENV NODE_ENV production 14 | CMD node scenarios/app 15 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/expected_breadcrumbs/JsManualScenario.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "state", 3 | "name": "oh crumbs", 4 | "timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$", 5 | "metaData": { 6 | "from": "javascript", 7 | "circle": "[Circular]" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/HandledJsErrorScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import Bugsnag from '@bugsnag/react-native' 3 | 4 | export class HandledJsErrorScenario extends Scenario { 5 | run () { 6 | Bugsnag.notify(new Error('HandledJsErrorScenario')) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Goal 2 | 3 | 4 | 5 | ## Design 6 | 7 | 8 | 9 | ## Changeset 10 | 11 | 12 | 13 | ## Testing 14 | 15 | -------------------------------------------------------------------------------- /packages/delivery-react-native/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/delivery-react-native 2 | 3 | This delivery mechanism defers to the native platform to send events. It is included in the React Native notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/electron-network-status/network-status.d.ts: -------------------------------------------------------------------------------- 1 | import EventEmitter from 'events' 2 | 3 | declare class NetworkStatus { 4 | constructor (plugin: { emitter: EventEmitter }, net: any, app: any) 5 | watch (watcher: (state: boolean) => void) 6 | 7 | isConnected: boolean 8 | } 9 | 10 | export default NetworkStatus 11 | -------------------------------------------------------------------------------- /packages/plugin-browser-session/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-browser-session 2 | 3 | This plugin provides a session implementation for the browser notifier. It is included in the browser notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-electron-client-state-persistence/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-client-state-persistence 2 | 3 | @bugsnag/electron plugin to sync information between JS and native layer 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-electron-renderer-strip-project-root/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-electron-renderer-strip-project-root 2 | 3 | @bugsnag/electron plugin to strip the project root from stack traces 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-express/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-express 2 | 3 | A [@bugsnag/js](https://github.com/bugsnag/bugsnag-js) plugin for capturing errors in Express (and Connect) web applications. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/node/features/fixtures/connect/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | 13 | ENV NODE_ENV production 14 | CMD node scenarios/app 15 | -------------------------------------------------------------------------------- /test/node/features/fixtures/express/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | 13 | ENV NODE_ENV production 14 | CMD node scenarios/app 15 | -------------------------------------------------------------------------------- /test/node/features/fixtures/restify/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG NODE_VERSION=12 2 | FROM node:$NODE_VERSION-alpine 3 | 4 | WORKDIR /app 5 | 6 | COPY package* ./ 7 | RUN npm install 8 | 9 | COPY . ./ 10 | 11 | RUN npm install --no-package-lock --no-save bugsnag-*.tgz 12 | 13 | ENV NODE_ENV production 14 | CMD node scenarios/app 15 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/PauseSessionScenario.m: -------------------------------------------------------------------------------- 1 | #import "PauseSessionScenario.h" 2 | 3 | @implementation PauseSessionScenario 4 | 5 | - (void)run: (RCTPromiseResolveBlock)resolve 6 | reject:(RCTPromiseRejectBlock)reject { 7 | [Bugsnag pauseSession]; 8 | } 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/StartSessionScenario.m: -------------------------------------------------------------------------------- 1 | #import "StartSessionScenario.h" 2 | 3 | @implementation StartSessionScenario 4 | 5 | - (void)run: (RCTPromiseResolveBlock)resolve 6 | reject:(RCTPromiseRejectBlock)reject { 7 | [Bugsnag startSession]; 8 | } 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/ContextJsDefaultScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import Bugsnag from '@bugsnag/react-native' 3 | 4 | export class ContextJsDefaultScenario extends Scenario { 5 | run () { 6 | Bugsnag.notify(new Error('ContextJsDefaultScenario')) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/DeviceJsHandledScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import Bugsnag from '@bugsnag/react-native' 3 | 4 | export class DeviceJsHandledScenario extends Scenario { 5 | run () { 6 | Bugsnag.notify(new Error('DeviceJsHandledScenario')) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/js/express/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-example", 3 | "version": "1.0.0", 4 | "main": "app.js", 5 | "scripts": { 6 | "start": "node app" 7 | }, 8 | "dependencies": { 9 | "@bugsnag/js": "^7.0.0", 10 | "@bugsnag/plugin-express": "^7.0.0", 11 | "express": "^4.17.1" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/js/nuxtjs/pages/README.md: -------------------------------------------------------------------------------- 1 | # PAGES 2 | 3 | This directory contains your Application Views and Routes. 4 | The framework reads all the `*.vue` files inside this directory and create the router of your application. 5 | 6 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/routing). 7 | -------------------------------------------------------------------------------- /packages/in-flight/types/bugsnag-in-flight.d.ts: -------------------------------------------------------------------------------- 1 | import { Client } from '@bugsnag/core' 2 | 3 | interface BugsnagInFlight { 4 | trackInFlight (client: Client): void 5 | flush (timeoutMs: number): Promise 6 | } 7 | 8 | declare const BugsnagInFlightPlugin: BugsnagInFlight 9 | 10 | export default BugsnagInFlightPlugin 11 | -------------------------------------------------------------------------------- /packages/plugin-browser-context/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-browser-context 2 | 3 | This plugin adds `window.location.pathname` as the `context` to each event. It is included in the browser notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/electron/fixtures/events/sample-event2.json: -------------------------------------------------------------------------------- 1 | {"events":[{"app":{"version":"{REGEX:^\\d+\\.\\d+\\.\\d+$}"},"context":"{TYPE:string}","device":{"manufacturer": null, "osName":"beOS","osVersion":"{REGEX:\\d+\\.\\d+}"},"metadata":{"counters":{"trees":"{TYPE:number}","carrots":9}},"exceptions":[{"stacktrace":[],"errorClass":"Error"}]}]} 2 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/expected_breadcrumbs/HomeReadyNavigation.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "navigation", 3 | "name": "(React Navigation onReady|React Native Navigation componentDidAppear)", 4 | "timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$", 5 | "metaData": { 6 | "to": "Home" 7 | } 8 | } -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/ios/Scenarios/ResumeSessionScenario.m: -------------------------------------------------------------------------------- 1 | #import "ResumeSessionScenario.h" 2 | 3 | @implementation ResumeSessionScenario 4 | 5 | - (void)run: (RCTPromiseResolveBlock)resolve 6 | reject:(RCTPromiseRejectBlock)reject { 7 | [Bugsnag resumeSession]; 8 | } 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /examples/js/gatsby/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:18@sha256:f12d34408955b2081f82078e8f96c3299ca0f38d11e76086cb9b9b1b669977e4 2 | ARG GATSBY_BUGSNAG_API_KEY 3 | 4 | WORKDIR /usr/src/app 5 | 6 | COPY package* /usr/src/app/ 7 | RUN npm install 8 | 9 | COPY . /usr/src/app/ 10 | RUN npm run build 11 | 12 | CMD npm run serve -- --host 0.0.0.0 13 | -------------------------------------------------------------------------------- /examples/js/vue/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /examples/ts/angular/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /examples/ts/angular/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/e2e", 5 | "baseUrl": "./", 6 | "module": "commonjs", 7 | "target": "es5", 8 | "types": [ 9 | "jasmine", 10 | "jasminewd2", 11 | "node" 12 | ] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/electron/src/config/test/renderer.test.ts: -------------------------------------------------------------------------------- 1 | import { schema } from '../renderer' 2 | 3 | describe('renderer process client config schema', () => { 4 | describe('codeBundleId', () => { 5 | it('defaults to undefined', () => { 6 | expect(schema.codeBundleId.defaultValue()).toBe(undefined) 7 | }) 8 | }) 9 | }) 10 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/typescript/src/try_catch_notify.ts: -------------------------------------------------------------------------------- 1 | declare var foo: any 2 | 3 | import Bugsnag, { NotifiableError } from '@bugsnag/browser' 4 | import config from './lib/config' 5 | 6 | Bugsnag.start(config) 7 | 8 | try { 9 | foo.bar() 10 | } catch (e) { 11 | Bugsnag.notify(e as NotifiableError) 12 | } 13 | -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/on-send-error.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | return { 3 | onSendError (event) { 4 | event.context = 'checkout page' 5 | event.addMetadata('account', { type: 'VIP', verified: true }) 6 | event.addMetadata('account', 'status', "it's complicated") 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/replacements/ios/exportOptions.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | teamID 6 | 7W9PZ27Y5F 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/UserNativeClientScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import { NativeInterface } from '../lib/native' 3 | 4 | export class UserNativeClientScenario extends Scenario { 5 | run () { 6 | NativeInterface.runScenario('UserNativeClientScenario') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/plugin-browser-request/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-browser-request 2 | 3 | This plugin adds `window.location.href` to the `request.url` section of each event. It is included in the browser notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-strip-query-string/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-strip-query-string 2 | 3 | This plugin removes query strings and document fragments from stackframe URLs. It is included in the browser notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/typescript/promise_catch.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/react-native-cli/features/fixtures/app/dynamic/ios/exportOptions.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | teamID 6 | 7W9PZ27Y5F 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/DeviceNativeHandledScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import { NativeInterface } from '../lib/native' 3 | 4 | export class DeviceNativeHandledScenario extends Scenario { 5 | run () { 6 | NativeInterface.runScenario('DeviceNativeHandledScenario') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/HandledNativeErrorScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import { NativeInterface } from '../lib/native' 3 | 4 | export class HandledNativeErrorScenario extends Scenario { 5 | run () { 6 | NativeInterface.runScenario('HandledNativeErrorScenario') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/ts/plain-node/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-example", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "build": "tsc", 6 | "start": "npm run build && node src/app.js" 7 | }, 8 | "dependencies": { 9 | "@bugsnag/js": "^7.0.0", 10 | "@types/node": "^10.11.3", 11 | "typescript": "^3.1.1" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/plugin-aws-lambda/src/lambda-timeout-approaching.js: -------------------------------------------------------------------------------- 1 | module.exports = class LambdaTimeoutApproaching extends Error { 2 | constructor (remainingMs) { 3 | const message = `Lambda will timeout in ${remainingMs}ms` 4 | 5 | super(message) 6 | 7 | this.name = 'LambdaTimeoutApproaching' 8 | this.stack = [] 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/plugin-browser-context/context.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Sets the default context to be the current URL 3 | */ 4 | module.exports = (win = window) => ({ 5 | load: (client) => { 6 | client.addOnError(event => { 7 | if (event.context !== undefined) return 8 | event.context = win.location.pathname 9 | }, true) 10 | } 11 | }) 12 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/typescript/notify_new_error.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/typescript/try_catch_notify.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_vue/webpack4/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |

{{ message }}

9 | {{ errr() }} 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/UnhandledNativeErrorScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import { NativeInterface } from '../lib/native' 3 | 4 | export class UnhandledNativeErrorScenario extends Scenario { 5 | run () { 6 | NativeInterface.runScenario('UnhandledNativeErrorScenario') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/electron/electron-bundled/webpack.renderer.config.js: -------------------------------------------------------------------------------- 1 | const rules = require('./webpack.rules') 2 | 3 | rules.push({ 4 | test: /\.css$/, 5 | use: [{ loader: 'style-loader' }, { loader: 'css-loader' }] 6 | }) 7 | 8 | module.exports = { 9 | // Put your normal webpack config below here 10 | module: { 11 | rules, 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/js/nextjs/pages/ssr/scenario2.js: -------------------------------------------------------------------------------- 1 | /** 2 | * SSR scenario 2 3 | * 4 | * getServerSideProps returns a Promise that rejects. 5 | */ 6 | 7 | const Scenario2 = () =>

SSR scenario 2

8 | 9 | export async function getServerSideProps() { 10 | return Promise.reject(Error('SSR scenario 2')) 11 | } 12 | 13 | export default Scenario2 14 | -------------------------------------------------------------------------------- /examples/js/nuxtjs/assets/README.md: -------------------------------------------------------------------------------- 1 | # ASSETS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your un-compiled assets such as LESS, SASS, or JavaScript. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/assets#webpacked). 8 | -------------------------------------------------------------------------------- /packages/plugin-electron-client-state-persistence/src/deps/parson/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "parson", 3 | "version": "1.1.0", 4 | "repo": "kgabis/parson", 5 | "description": "Small json parser and reader", 6 | "keywords": [ "json", "parser" ], 7 | "license": "MIT", 8 | "src": [ 9 | "parson.c", 10 | "parson.h" 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /test/electron/fixtures/events/meta-minidump-event.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "version": "5.6.0" 4 | }, 5 | "device": { 6 | "osName": "beOS", 7 | "osVersion": "11.0" 8 | }, 9 | "metadata": { 10 | "counters": { 11 | "trees": 3, 12 | "carrots": 9 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/DeviceNativeUnhandledScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import { NativeInterface } from '../lib/native' 3 | 4 | export class DeviceNativeUnhandledScenario extends Scenario { 5 | run () { 6 | NativeInterface.runScenario('DeviceNativeUnhandledScenario') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/ios/rn063example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/ios/rn071example.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/delivery-node/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/delivery-node 2 | 3 | This delivery mechanism uses [request](https://github.com/request/request) to send events and sessions to Bugsnag's API. It is included in the node notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-node-surrounding-code/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-node-surrounding-code 2 | 3 | This plugin loads the surrounding code for each stackframe in an event, if it is available. It is included in the Node notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-react-navigation/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-react-navigation 2 | 3 | Integrates with the [React Navigation](https://reactnavigation.org/) library to provide better error context and navigation breadcrumbs. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/react-native/src/native.js: -------------------------------------------------------------------------------- 1 | const reactNative = require('react-native') 2 | 3 | const isTurboModuleEnabled = () => global.RN$Bridgeless || global.__turboModuleProxy != null 4 | 5 | export const NativeClient = isTurboModuleEnabled() 6 | ? reactNative.TurboModuleRegistry.get('BugsnagReactNative') 7 | : reactNative.NativeModules.BugsnagReactNative 8 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack3/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-handled-webpack3", 3 | "private": true, 4 | "scripts": { 5 | "build": "webpack" 6 | }, 7 | "dependencies": { 8 | "es3ify-webpack-plugin": "0.0.1", 9 | "uglifyjs-webpack-plugin": "2.0.1", 10 | "webpack": "^3.11.0" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_vue/typescript_vue2/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |

{{ message }}

9 | {{ errr() }} 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/plugin_vue/typescript_vue3/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 |

{{ message }}

9 | {{ errr() }} 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/BreadcrumbsAutomaticLoadedScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import Bugsnag from '@bugsnag/react-native' 3 | 4 | export class BreadcrumbsAutomaticLoadedScenario extends Scenario { 5 | run () { 6 | Bugsnag.notify(new Error('BreadcrumbsAutomaticLoadedScenario')) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/BreadcrumbsNativeManualScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import { NativeInterface } from '../lib/native' 3 | 4 | export class BreadcrumbsNativeManualScenario extends Scenario { 5 | run () { 6 | NativeInterface.runScenario('BreadcrumbsNativeManualScenario') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/SessionAutoEnabledScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | 3 | export class SessionAutoEnabledScenario extends Scenario { 4 | constructor (configuration, jsConfig) { 5 | super() 6 | configuration.autoTrackSessions = true 7 | } 8 | 9 | run () { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/UnhandledNativeErrorSyncScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import { NativeInterface } from '../lib/native' 3 | 4 | export class UnhandledNativeErrorSyncScenario extends Scenario { 5 | run () { 6 | NativeInterface.runScenarioSync('UnhandledNativeErrorScenario') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/ios/rn063example.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/core/lib/has-stack.js: -------------------------------------------------------------------------------- 1 | // Given `err` which may be an error, does it have a stack property which is a string? 2 | module.exports = err => 3 | !!err && 4 | (!!err.stack || !!err.stacktrace || !!err['opera#sourceloc']) && 5 | typeof (err.stack || err.stacktrace || err['opera#sourceloc']) === 'string' && 6 | err.stack !== `${err.name}: ${err.message}` 7 | -------------------------------------------------------------------------------- /packages/plugin-app-duration/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-app-duration 2 | 3 | This plugin adds the duration an application has been running for to the `app` section of each event. It is included in the browser and node notifiers. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-react-native-global-error-handler/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-react-native-global-error-handler 2 | 3 | This plugin hooks in to React Native's `ErrorUtils.globalHandler` to provide unhandled exception reporting. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-window-onerror/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-window-onerror 2 | 3 | This plugin hooks in to the browser's global `onerror` callback to provide unhandled exception reporting. It is included in the browser notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/react-native-cli/src/lib/__test__/fixtures/index-after.js: -------------------------------------------------------------------------------- 1 | import Bugsnag from "@bugsnag/react-native"; 2 | Bugsnag.start(); 3 | 4 | /** 5 | * @format 6 | */ 7 | 8 | import {AppRegistry} from 'react-native'; 9 | import App from './App'; 10 | import {name as appName} from './app.json'; 11 | 12 | AppRegistry.registerComponent(appName, () => App); 13 | -------------------------------------------------------------------------------- /test/node/features/fixtures/handled/scenarios/notify-string.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/node') 2 | Bugsnag.start({ 3 | apiKey: process.env.BUGSNAG_API_KEY, 4 | endpoints: { 5 | notify: process.env.BUGSNAG_NOTIFY_ENDPOINT, 6 | sessions: process.env.BUGSNAG_SESSIONS_ENDPOINT 7 | } 8 | }) 9 | 10 | Bugsnag.notify('create an error for me') 11 | -------------------------------------------------------------------------------- /test/node/features/fixtures/handled/scenarios/notify.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/node') 2 | Bugsnag.start({ 3 | apiKey: process.env.BUGSNAG_API_KEY, 4 | endpoints: { 5 | notify: process.env.BUGSNAG_NOTIFY_ENDPOINT, 6 | sessions: process.env.BUGSNAG_SESSIONS_ENDPOINT 7 | } 8 | }) 9 | 10 | Bugsnag.notify(new Error('hi from the abyss')) 11 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/SessionAutoDisabledScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | 3 | export class SessionAutoDisabledScenario extends Scenario { 4 | constructor (configuration, jsConfig) { 5 | super() 6 | configuration.autoTrackSessions = false 7 | } 8 | 9 | run () { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /examples/js/restify/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-example", 3 | "version": "1.0.0", 4 | "main": "app.js", 5 | "scripts": { 6 | "start": "node app" 7 | }, 8 | "dependencies": { 9 | "@bugsnag/js": "^7.0.0", 10 | "@bugsnag/plugin-restify": "^7.0.0", 11 | "restify": "^7.2.2", 12 | "restify-errors": "^6.1.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/delivery-electron/payload-loop.d.ts: -------------------------------------------------------------------------------- 1 | declare class PayloadDeliveryLoop { 2 | constructor (send: (opts: any, body: any, completion: (err?: Error) => void) => void, 3 | queue: any, 4 | onerror?: (err: Error) => void, 5 | retryInterval?: number) 6 | 7 | stop (): void 8 | start (): void 9 | } 10 | 11 | export default PayloadDeliveryLoop 12 | -------------------------------------------------------------------------------- /packages/react-native/android/README.md: -------------------------------------------------------------------------------- 1 | # Development 2 | 3 | Local changes can be smoke-tested with the following command (the last task requires an emulator): 4 | 5 | ``` 6 | ./gradlew build lint checkstyle connectedCheck 7 | ``` 8 | 9 | Functional changes can be tested by installing the packed npm artefact as described in this package's root directory. 10 | -------------------------------------------------------------------------------- /test/node/features/fixtures/unhandled/scenarios/thrown-error-not-caught.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/node') 2 | Bugsnag.start({ 3 | apiKey: process.env.BUGSNAG_API_KEY, 4 | endpoints: { 5 | notify: process.env.BUGSNAG_NOTIFY_ENDPOINT, 6 | sessions: process.env.BUGSNAG_SESSIONS_ENDPOINT 7 | } 8 | }) 9 | 10 | throw new Error('not handled') 11 | -------------------------------------------------------------------------------- /examples/js/nuxtjs/plugins/README.md: -------------------------------------------------------------------------------- 1 | # PLUGINS 2 | 3 | **This directory is not required, you can delete it if you don't want to use it.** 4 | 5 | This directory contains your Javascript plugins that you want to run before mounting the root Vue.js application. 6 | 7 | More information about the usage of this directory in [the documentation](https://nuxtjs.org/guide/plugins). 8 | -------------------------------------------------------------------------------- /packages/core/lib/extract-object.js: -------------------------------------------------------------------------------- 1 | // Given a host object, return the value at host[key] if it is an object 2 | // and it has at least one key/value 3 | 4 | module.exports = (host, key) => { 5 | if (host[key] && typeof host[key] === 'object' && Object.keys(host[key]).length > 0) { 6 | return host[key] 7 | } else { 8 | return undefined 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /packages/plugin-react-native-client-sync/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-react-native-client-sync 2 | 3 | This plugin maintains client state between the JS client and the native client in React Native. It is included in the React Native notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. -------------------------------------------------------------------------------- /test/node/features/fixtures/webpack/src/index.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/node') 2 | Bugsnag.start({ 3 | apiKey: process.env.BUGSNAG_API_KEY, 4 | endpoints: { 5 | notify: process.env.BUGSNAG_NOTIFY_ENDPOINT, 6 | sessions: process.env.BUGSNAG_SESSIONS_ENDPOINT 7 | } 8 | }) 9 | 10 | Bugsnag.notify(new Error('hello from a webpack node bundle')) 11 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/expected_breadcrumbs/HomeToDetailsNavigation.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "navigation", 3 | "name": "(React Navigation onStateChange|React Native Navigation componentDidAppear)", 4 | "timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$", 5 | "metaData": { 6 | "from": "Home", 7 | "to": "Details" 8 | } 9 | } -------------------------------------------------------------------------------- /examples/electron/electron-bundled/webpack.main.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | /** 3 | * This is the main entry point for your application, it's the first file 4 | * that runs in the main process. 5 | */ 6 | entry: './src/main.js', 7 | // Put your normal webpack config below here 8 | module: { 9 | rules: require('./webpack.rules'), 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/core/types/session.d.ts: -------------------------------------------------------------------------------- 1 | import { App, Device, User } from './common' 2 | 3 | declare class Session { 4 | public startedAt: Date; 5 | public id: string; 6 | 7 | public device?: Device; 8 | public app?: App; 9 | 10 | public getUser(): User; 11 | public setUser(id?: string, email?: string, name?: string): void; 12 | } 13 | 14 | export default Session 15 | -------------------------------------------------------------------------------- /packages/plugin-node-uncaught-exception/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-node-uncaught-exception 2 | 3 | This plugin hooks in to Node's `process#uncaughtException` event to provide reporting for unhandled errors. It is included in the Node notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-react-native-event-sync/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-react-native-event-sync 2 | 3 | This plugin retrieves native event information so that it is available in JS `onError` callbacks. It is included in the React Native notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-react-native-orientation-breadcrumbs/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-react-native-orientation-breadcrumbs 2 | 3 | This plugin adds the ability to record changes in the device's orientation. It is included in the React Native notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/rollup/src/promise_catch.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/browser') 2 | var config = require('./lib/config') 3 | 4 | Bugsnag.start(config) 5 | 6 | go() 7 | .then(function () {}) 8 | .catch(function (e) { 9 | Bugsnag.notify(e) 10 | }) 11 | 12 | function go() { 13 | return Promise.reject(new Error('bad things')) 14 | } 15 | -------------------------------------------------------------------------------- /test/electron/fixtures/app/src/configs/mixed-codebundleid.js: -------------------------------------------------------------------------------- 1 | module.exports = () => { 2 | return { 3 | appType: 'mixed-bundle', 4 | appVersion: '1.0.0', 5 | codeBundleId: 'main-bundle-abc123', 6 | releaseStage: 'test' 7 | } 8 | } 9 | 10 | module.exports.renderer = () => { 11 | return { 12 | codeBundleId: 'renderer-bundle-xyz789' 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /test/node/features/fixtures/unhandled/scenarios/unhandled-promise-rejection.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/node') 2 | Bugsnag.start({ 3 | apiKey: process.env.BUGSNAG_API_KEY, 4 | endpoints: { 5 | notify: process.env.BUGSNAG_NOTIFY_ENDPOINT, 6 | sessions: process.env.BUGSNAG_SESSIONS_ENDPOINT 7 | } 8 | }) 9 | 10 | Promise.reject(new Error('not handled')) 11 | -------------------------------------------------------------------------------- /.buildkite/block/node-pipeline.block.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - block: "Trigger node pipeline" 3 | key: "trigger-node-pipeline" 4 | 5 | - label: ":pipeline: Upload node pipeline" 6 | depends_on: "trigger-node-pipeline" 7 | agents: 8 | queue: macos 9 | timeout_in_minutes: 5 10 | command: buildkite-agent pipeline upload .buildkite/basic/node-pipeline.yml 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | docker-temp 3 | node_modules 4 | lerna-debug.log 5 | coverage 6 | .nyc_output 7 | dist 8 | .DS_Store 9 | maze_output 10 | *.ngsummary.json 11 | .diff 12 | *.tgz 13 | min_packages.tar 14 | .verdaccio 15 | .cucumber-failures 16 | .webpack 17 | out 18 | compile_commands.json 19 | .cache 20 | .clangd 21 | Gemfile.lock 22 | # IDE files 23 | .idea/ 24 | *.iml 25 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/__tests__/App-test.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/__tests__/App-test.tsx: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import 'react-native'; 6 | import React from 'react'; 7 | import App from '../App'; 8 | 9 | // Note: test renderer must be required after react-native. 10 | import renderer from 'react-test-renderer'; 11 | 12 | it('renders correctly', () => { 13 | renderer.create(); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/node/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/node 2 | 3 | This package contains the Node.js implementation of the Bugsnag notifier for JavaScript. The normal use case is to install this package via `@bugsnag/js`, but you can install it directly if you want to. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-app-duration/app.js: -------------------------------------------------------------------------------- 1 | let appStart = new Date() 2 | const reset = () => { appStart = new Date() } 3 | 4 | module.exports = { 5 | name: 'appDuration', 6 | load: client => { 7 | client.addOnError(event => { 8 | const now = new Date() 9 | 10 | event.app.duration = now - appStart 11 | }, true) 12 | 13 | return { reset } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /packages/plugin-contextualize/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-contextualize 2 | 3 | This plugin provides a means of attaching context to a callback which gets included in an event in the case of an unhandled error. It is included in the Node notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-react-native-navigation/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-react-native-navigation 2 | 3 | This plugin hooks in to React Native Navigation, updating the `context` with the current component name and leaving breadcrumbs for navigation changes. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/plugin-react-native-session/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-react-native-session 2 | 3 | This plugin implements a session delegate which defers all session management to the underlying native platform. It is included in the React Native notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/browserify/src/promise_catch.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/browser') 2 | var config = require('./lib/config') 3 | 4 | Bugsnag.start(config) 5 | 6 | go() 7 | .then(function () {}) 8 | .catch(function (e) { 9 | Bugsnag.notify(e) 10 | }) 11 | 12 | function go() { 13 | return Promise.reject(new Error('bad things')) 14 | } 15 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/typescript/src/promise_catch.ts: -------------------------------------------------------------------------------- 1 | import Bugsnag from '@bugsnag/browser' 2 | import config from './lib/config' 3 | 4 | Bugsnag.start(config) 5 | 6 | go() 7 | .then(function () {}) 8 | .catch(function (e: any) { 9 | Bugsnag.notify(e) 10 | }) 11 | 12 | function go() { 13 | return Promise.reject(new Error('bad things')) 14 | } 15 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack3/src/promise_catch.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/browser') 2 | var config = require('./lib/config') 3 | 4 | Bugsnag.start(config) 5 | 6 | go() 7 | .then(function () {}) 8 | .catch(function (e) { 9 | Bugsnag.notify(e) 10 | }) 11 | 12 | function go() { 13 | return Promise.reject(new Error('bad things')) 14 | } 15 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack4/src/promise_catch.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/browser') 2 | var config = require('./lib/config') 3 | 4 | Bugsnag.start(config) 5 | 6 | go() 7 | .then(function () {}) 8 | .catch(function (e) { 9 | Bugsnag.notify(e) 10 | }) 11 | 12 | function go() { 13 | return Promise.reject(new Error('bad things')) 14 | } 15 | -------------------------------------------------------------------------------- /test/node/TESTING.md: -------------------------------------------------------------------------------- 1 | ### Node testing 2 | 3 | To run the Node test suite: 4 | 5 | ```sh 6 | npm run test:node 7 | ``` 8 | 9 | You can use the `NODE_VERSION` env var to choose which version of Node to run the tests on. The default version is `12`. 10 | 11 | To run a single feature file: 12 | 13 | ```sh 14 | npm run test:node -- features/unhandled_errors.feature 15 | ``` 16 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/UserJsClientScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import Bugsnag from '@bugsnag/react-native' 3 | 4 | export class UserJsClientScenario extends Scenario { 5 | run () { 6 | Bugsnag.setUser('123', 'bug@sn.ag', 'Bug Snag') 7 | Bugsnag.notify(new Error('UserJsClientScenario')) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/browser/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/browser 2 | 3 | This package contains the browser implementation of the Bugsnag notifier for JavaScript. The normal use case is to install this package via `@bugsnag/js`, but you can install it directly if you want to. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /packages/delivery-electron/queue.d.ts: -------------------------------------------------------------------------------- 1 | declare class PayloadQueue { 2 | constructor (path: string, resource: string, onerror?: (err: Error) => void) 3 | 4 | peek (): Promise<{ payload: { url: string}, path: string } | null> 5 | init (): Promise 6 | enqueue (req?: {}): Promise 7 | remove (path: string): Promise 8 | } 9 | 10 | export default PayloadQueue 11 | -------------------------------------------------------------------------------- /packages/electron-test-helpers/helpers.ts: -------------------------------------------------------------------------------- 1 | export { makeApp } from './src/App' 2 | export { makeBrowserWindow } from './src/BrowserWindow' 3 | export { makeClientForPlugin } from './src/client' 4 | export { makeDisplay } from './src/Display' 5 | export { makePowerMonitor } from './src/PowerMonitor' 6 | export { makeProcess } from './src/process' 7 | export { makeScreen } from './src/Screen' 8 | -------------------------------------------------------------------------------- /test/aws-lambda/features/support/env.rb: -------------------------------------------------------------------------------- 1 | BeforeAll do 2 | success = system(File.realpath("#{__dir__}/../scripts/build-fixtures")) 3 | 4 | unless success 5 | puts "Unable to build fixtures!" 6 | exit 1 7 | end 8 | 9 | Maze.config.enforce_bugsnag_integrity = false 10 | Maze.config.receive_no_requests_wait = 10 11 | Maze.config.receive_requests_wait = 10 12 | end 13 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/handled/webpack4/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-fixtures-handled-webpack4", 3 | "private": true, 4 | "scripts": { 5 | "build": "webpack" 6 | }, 7 | "dependencies": { 8 | "es3ify-webpack-plugin": "0.0.1", 9 | "uglifyjs-webpack-plugin": "2.0.1", 10 | "webpack": "^4.8.1", 11 | "webpack-cli": "^3.1.2" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/network_breadcrumbs/json/fetch_failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "request", 3 | "name": "fetch() failed", 4 | "timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$", 5 | "metaData": { 6 | "status": 404, 7 | "method": "GET", 8 | "url": "i_dont_exist.html", 9 | "duration": "NUMBER" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.buildkite/block/expo-pipeline.block.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - block: "Trigger expo pipeline (external)" 3 | key: "trigger-expo-pipeline" 4 | 5 | - label: ":pipeline: Upload expo pipeline" 6 | depends_on: "trigger-expo-pipeline" 7 | agents: 8 | queue: macos 9 | timeout_in_minutes: 5 10 | command: buildkite-agent pipeline upload .buildkite/basic/expo-pipeline.yml 11 | -------------------------------------------------------------------------------- /examples/js/koa/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bugsnag-js-example", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "start": "node app" 6 | }, 7 | "dependencies": { 8 | "@bugsnag/js": "^7.0.0", 9 | "@bugsnag/plugin-koa": "^7.0.0", 10 | "koa": "^2.6.1", 11 | "koa-mount": "^4.0.0", 12 | "koa-router": "^7.4.0", 13 | "koa-static": "^5.0.0" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/ts/angular/e2e/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('angular1 App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getParagraphText()).toEqual('Welcome to app!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/plugin-node-unhandled-rejection/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-node-unhandled-rejection 2 | 3 | This plugin hooks in to Node's `process#unhandledRejection` event to provide unhandled exception reporting for Promises. It is included in the Node notifier. 4 | 5 | ## License 6 | 7 | This package is free software released under the MIT License. See [LICENSE.txt](./LICENSE.txt) for details. 8 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/network_breadcrumbs/json/fetch_success.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "request", 3 | "name": "fetch() succeeded", 4 | "timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$", 5 | "metaData": { 6 | "status": 200, 7 | "method": "GET", 8 | "url": "fetch_success.html", 9 | "duration": "NUMBER" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/browser/features/fixtures/network_breadcrumbs/json/xhr_failure.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "request", 3 | "name": "XMLHttpRequest failed", 4 | "timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$", 5 | "metaData": { 6 | "status": 404, 7 | "method": "GET", 8 | "url": "i_dont_exist.html", 9 | "duration": "NUMBER" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/node/features/fixtures/cause/scenarios/string.js: -------------------------------------------------------------------------------- 1 | var Bugsnag = require('@bugsnag/node') 2 | 3 | Bugsnag.start({ 4 | apiKey: process.env.BUGSNAG_API_KEY, 5 | endpoints: { 6 | notify: process.env.BUGSNAG_NOTIFY_ENDPOINT, 7 | sessions: process.env.BUGSNAG_SESSIONS_ENDPOINT 8 | } 9 | }) 10 | 11 | Bugsnag.notify(new Error('I am the error', { cause: 'I am the cause' })) 12 | -------------------------------------------------------------------------------- /test/react-native/features/fixtures/scenario-launcher/src/scenarios/NativePromiseRejectionUnhandledScenario.js: -------------------------------------------------------------------------------- 1 | import Scenario from './Scenario' 2 | import { NativeInterface } from '../lib/native' 3 | 4 | export class NativePromiseRejectionUnhandledScenario extends Scenario { 5 | async run () { 6 | await NativeInterface.runScenario('NativePromiseRejectionUnhandledScenario') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.buildkite/block/browser-pipeline.block.yml: -------------------------------------------------------------------------------- 1 | steps: 2 | - block: "Trigger browser pipeline" 3 | key: "trigger-browser-pipeline" 4 | 5 | - label: ":pipeline: Upload browser pipeline" 6 | depends_on: "trigger-browser-pipeline" 7 | agents: 8 | queue: macos 9 | timeout_in_minutes: 5 10 | command: buildkite-agent pipeline upload .buildkite/basic/browser-pipeline.yml 11 | -------------------------------------------------------------------------------- /examples/reactnative/rn063example/ios/Podfile: -------------------------------------------------------------------------------- 1 | require_relative '../node_modules/react-native/scripts/react_native_pods' 2 | require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules' 3 | 4 | platform :ios, '10.0' 5 | 6 | target 'rn063example' do 7 | config = use_native_modules! 8 | 9 | use_react_native!(:path => config["reactNativePath"]) 10 | 11 | end 12 | -------------------------------------------------------------------------------- /examples/reactnative/rn071example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /packages/plugin-inline-script-content/README.md: -------------------------------------------------------------------------------- 1 | # @bugsnag/plugin-inline-script-content 2 | 3 | This plugin detects when an error originated in an inline `