Commit f2538075 authored by David Burke's avatar David Burke

Update sentry

parent 42655d8f
Pipeline #64249108 failed with stage
in 8 minutes and 3 seconds
This diff is collapsed.
......@@ -31,24 +31,28 @@
"type": "git",
"url": "git@gitlab.com:burke-software/passit-frontend.git"
},
"browser": {
"path": false
},
"dependencies": {
"@angular/animations": "~8.0.0",
"@angular/cdk": "^7.1.0",
"@angular/cdk": "~8.0.0",
"@angular/common": "~8.0.0",
"@angular/compiler": "~8.0.0",
"@angular/core": "~8.0.0",
"@angular/forms": "~8.0.0",
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/pwa": "^0.11",
"@angular/pwa": "^0.800.1",
"@angular/router": "~8.0.0",
"@angular/service-worker": "^8.0.0",
"@braintree/sanitize-url": "~3.0.0",
"@braintree/sanitize-url": "~3.1.0",
"@ngrx/effects": "^7.0.0",
"@ngrx/entity": "^7.0.0",
"@ngrx/router-store": "^7.0.0",
"@ngrx/store": "^7.0.0",
"@ngrx/store-devtools": "^7.0.0",
"@sentry/browser": "^5.4.0",
"@types/file-saver": "^2.0.0",
"@types/jspdf": "^1.2.2",
"@types/libsodium-wrappers": "^0.7.0",
......@@ -56,10 +60,9 @@
"@types/qrcode": "^1.3.0",
"angular2-hotkeys": "^2.1.4",
"babel-loader": "^8.0.2",
"canvg": "^2.0.0",
"canvas": "^2.5.0",
"canvg": "^2.0.0",
"core-js": "^2.6.1",
"fetch-mock": "^7.2.5",
"file-saver": "~2.0.1",
"global": "^4.3.2",
"jasmine-marbles": "^0.4.0",
......@@ -67,7 +70,7 @@
"jsqr": "^1.2.0",
"karma-webdriver-launcher": "^1.0.5",
"libsodium-wrappers": "0.7.4",
"nativescript-angular": "^7.2.3",
"nativescript-angular": "^8.0.0",
"nativescript-checkbox": "^3.0.3",
"nativescript-clipboard": "^1.1.7",
"nativescript-floatingactionbutton": "^5.0.1",
......@@ -79,20 +82,17 @@
"nativescript-sentry": "^1.9.1",
"nativescript-share-file": "^1.0.4",
"nativescript-theme-core": "~1.0.4",
"ng-inline-svg": "~8.3.0",
"ng-inline-svg": "~8.4.1",
"ng-select": "~1.0.1",
"ngrx-forms": "^4.0.1",
"ngrx-forms": "^4.1.0",
"ngrx-store-localstorage": "~7.0.0",
"ngx-clipboard": "^11.1.9",
"ngx-clipboard": "^12.1.0",
"ngx-tooltip": "^0.0.9",
"normalize-scss": "~7.0.0",
"papaparse": "~4.6.0",
"papaparse": "~5.0.0",
"qrcode": "^1.3.2",
"raven-js": "^3.27.0",
"reflect-metadata": "~0.1.8",
"rxjs": "^6.3.3",
"deepmerge": "^3.2.0",
"rxjs-tslint": "0.1.5",
"stream": "^0.0.2",
"susy": "^2.2.12",
"text-encoding-utf-8": "^1.0.2",
......@@ -102,7 +102,7 @@
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.800.1",
"@angular-devkit/build-angular": "^0.800.1",
"@angular-devkit/build-ng-packagr": "~0.800.1",
"@angular/cli": "^8.0.1",
"@angular/compiler-cli": "~8.0.0",
......@@ -117,12 +117,12 @@
"@storybook/angular": "^5.0.6",
"@types/jasmine": "~2.8.2",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~10.12.8",
"@types/node": "~12.0.4",
"@types/storybook__addon-actions": "^3.4.2",
"@types/storybook__addon-knobs": "^4.0.5",
"@types/storybook__addon-knobs": "^5.0.0",
"@types/storybook__addon-links": "^3.3.4",
"breakpoint-sass": "~2.7.1",
"codelyzer": "~4.5.0",
"codelyzer": "~5.0.1",
"jasmine-core": "^2.99.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~3.1.1",
......@@ -131,17 +131,17 @@
"karma-coverage-istanbul-reporter": "~2.0.4",
"karma-jasmine": "~1.1.0",
"karma-jasmine-html-reporter": "~0.2.2",
"nativescript-dev-typescript": "^0.9.0",
"nativescript-dev-webpack": "^0.22.0",
"nativescript-dev-typescript": "^0.10.0",
"nativescript-dev-webpack": "^0.24.0",
"prettier": "^1.10.2",
"protractor": "~5.4.0",
"tns-platform-declarations": "^5.1.0",
"tns-platform-declarations": "^5.4.1",
"ts-node": "~7.0.0",
"tslint": "~5.11.0",
"typescript": "~3.4.5",
"uglifyjs-webpack-plugin": "^2.1.2",
"web-ext": "^2.9.2",
"web-ext-types": "^3.0.0"
"web-ext": "^3.0.0",
"web-ext-types": "^3.1.0"
},
"nativescript": {
"id": "com.burkesoftware.Passit",
......
......@@ -3,7 +3,7 @@ import { Title } from "@angular/platform-browser";
import { Router, RoutesRecognized } from "@angular/router";
import { filter } from "rxjs/operators";
import { Store, select } from "@ngrx/store";
import * as Raven from "raven-js";
import * as Sentry from "@sentry/browser";
import { environment } from "../environments/environment";
import * as fromRoot from "./app.reducers";
......@@ -50,10 +50,13 @@ export class AppComponent implements OnInit {
filter(conf => conf.ravenDsn !== null)
)
.subscribe(conf => {
Raven.config(conf.ravenDsn!, {
release: environment.VERSION,
environment: conf.environment || undefined
}).install();
if (conf.ravenDsn) {
Sentry.init({
dsn: conf.ravenDsn,
release: environment.VERSION,
environment: conf.environment || undefined
});
}
});
}
}
import { Injectable, ErrorHandler, Injector } from "@angular/core";
import * as Raven from "raven-js";
import * as Sentry from "@sentry/browser";
import { Store, select } from "@ngrx/store";
import { getOptInErrorReporting } from "./app.reducers";
......@@ -19,12 +19,12 @@ export class RavenErrorHandler implements ErrorHandler {
});
}
handleError(err: any) {
handleError(error: any) {
if (this.reportError) {
Raven.captureException(err);
Sentry.captureException(error.originalError || error);
} else {
console.warn("Did not send error report because user did not opt in.");
}
console.error(err);
console.error(error);
}
}
import { HttpClient, HttpHeaders, HttpResponse } from "@angular/common/http";
import { HttpObserve } from "@angular/common/http/src/client";
import { HttpClient, HttpHeaders } from "@angular/common/http";
import { Injectable } from "@angular/core";
import { Store, select } from "@ngrx/store";
import { getToken, getUrl, IState } from "../app.reducers";
......@@ -34,13 +33,12 @@ export class Api extends sdkAPI {
headers: IHeaders,
returnsJSON: boolean
): Promise<any> {
const observe: HttpObserve = "response";
const requestOptions = {
const requestOptions: any = {
body,
headers: new HttpHeaders(headers),
observe
observe: "response"
};
let resp: HttpResponse<object>;
let resp: any;
try {
resp = await this.http.request(method, url, requestOptions).toPromise();
} catch (res) {
......
......@@ -50,7 +50,6 @@
/**
* Evergreen browsers require these.
*/
import "core-js/es7/reflect";
/**
* ALL Firefox browsers require the following to support `@angular/animation`.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment