@sentry/angular 6.19.1 → 6.19.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ export declare const ANGULAR_ROUTING_OP = "ui.angular.routing";
2
+ export declare const ANGULAR_INIT_OP = "ui.angular.init";
3
+ export declare const ANGULAR_OP = "ui.angular";
4
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,eAAO,MAAM,UAAU,eAAe,CAAC"}
@@ -0,0 +1,41 @@
1
+ import { ErrorHandler as AngularErrorHandler } from '@angular/core';
2
+ import * as Sentry from '@sentry/browser';
3
+ /**
4
+ * Options used to configure the behavior of the Angular ErrorHandler.
5
+ */
6
+ export interface ErrorHandlerOptions {
7
+ logErrors?: boolean;
8
+ showDialog?: boolean;
9
+ dialogOptions?: Sentry.ReportDialogOptions;
10
+ /**
11
+ * Custom implementation of error extraction from the raw value captured by the Angular.
12
+ * @param error Value captured by Angular's ErrorHandler provider
13
+ * @param defaultExtractor Default implementation that can be used as the fallback in case of custom implementation
14
+ */
15
+ extractor?(error: unknown, defaultExtractor: (error: unknown) => unknown): unknown;
16
+ }
17
+ /**
18
+ * Implementation of Angular's ErrorHandler provider that can be used as a drop-in replacement for the stock one.
19
+ */
20
+ declare class SentryErrorHandler implements AngularErrorHandler {
21
+ protected readonly _options: ErrorHandlerOptions;
22
+ constructor(options?: ErrorHandlerOptions);
23
+ /**
24
+ * Method called for every value captured through the ErrorHandler
25
+ */
26
+ handleError(error: unknown): void;
27
+ /**
28
+ * Used to pull a desired value that will be used to capture an event out of the raw value captured by ErrorHandler.
29
+ */
30
+ protected _extractError(error: unknown): unknown;
31
+ /**
32
+ * Default implementation of error extraction that handles default error wrapping, HTTP responses, ErrorEvent and few other known cases.
33
+ */
34
+ protected _defaultExtractor(errorCandidate: unknown): unknown;
35
+ }
36
+ /**
37
+ * Factory function that creates an instance of a preconfigured ErrorHandler provider.
38
+ */
39
+ declare function createErrorHandler(config?: ErrorHandlerOptions): SentryErrorHandler;
40
+ export { createErrorHandler, SentryErrorHandler };
41
+ //# sourceMappingURL=errorhandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorhandler.d.ts","sourceRoot":"","sources":["../../src/errorhandler.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,IAAI,mBAAmB,EAAc,MAAM,eAAe,CAAC;AAChF,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAI1C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC3C;;;;OAIG;IACH,SAAS,CAAC,CAAC,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC;CACpF;AAED;;GAEG;AACH,cACM,kBAAmB,YAAW,mBAAmB;IACrD,SAAS,CAAC,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC;gBAE9B,OAAO,CAAC,EAAE,mBAAmB;IAOhD;;OAEG;IACI,WAAW,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAkBxC;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAUhD;;OAEG;IACH,SAAS,CAAC,iBAAiB,CAAC,cAAc,EAAE,OAAO,GAAG,OAAO;CAsC9D;AAED;;GAEG;AACH,iBAAS,kBAAkB,CAAC,MAAM,CAAC,EAAE,mBAAmB,GAAG,kBAAkB,CAE5E;AAED,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ export * from '@sentry/browser';
2
+ export { init } from './sdk';
3
+ export { createErrorHandler, ErrorHandlerOptions, SentryErrorHandler } from './errorhandler';
4
+ export { getActiveTransaction, instrumentAngularRouting, // new name
5
+ routingInstrumentation, // legacy name
6
+ TraceClassDecorator, TraceMethodDecorator, TraceDirective, TraceModule, TraceService, } from './tracing';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC7F,OAAO,EACL,oBAAoB,EAEpB,wBAAwB,EAAE,WAAW;AACrC,sBAAsB,EAAE,cAAc;AACtC,mBAAmB,EACnB,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,YAAY,GACb,MAAM,WAAW,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { BrowserOptions } from '@sentry/browser';
2
+ /**
3
+ * Inits the Angular SDK
4
+ */
5
+ export declare function init(options: BrowserOptions): void;
6
+ //# sourceMappingURL=sdk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAoC,MAAM,iBAAiB,CAAC;AAEnF;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAalD"}
@@ -0,0 +1,61 @@
1
+ import { AfterViewInit, OnDestroy, OnInit } from '@angular/core';
2
+ import { Event, Router } from '@angular/router';
3
+ import { Transaction, TransactionContext } from '@sentry/types';
4
+ import { Observable } from 'rxjs';
5
+ /**
6
+ * Creates routing instrumentation for Angular Router.
7
+ */
8
+ export declare function routingInstrumentation(customStartTransaction: (context: TransactionContext) => Transaction | undefined, startTransactionOnPageLoad?: boolean, startTransactionOnLocationChange?: boolean): void;
9
+ export declare const instrumentAngularRouting: typeof routingInstrumentation;
10
+ /**
11
+ * Grabs active transaction off scope
12
+ */
13
+ export declare function getActiveTransaction(): Transaction | undefined;
14
+ /**
15
+ * Angular's Service responsible for hooking into Angular Router and tracking current navigation process.
16
+ * Creates a new transaction for every route change and measures a duration of routing process.
17
+ */
18
+ export declare class TraceService implements OnDestroy {
19
+ private readonly _router;
20
+ navStart$: Observable<Event>;
21
+ navEnd$: Observable<Event>;
22
+ private _routingSpan;
23
+ private _subscription;
24
+ constructor(_router: Router);
25
+ /**
26
+ * This is used to prevent memory leaks when the root view is created and destroyed multiple times,
27
+ * since `subscribe` callbacks capture `this` and prevent many resources from being GC'd.
28
+ */
29
+ ngOnDestroy(): void;
30
+ }
31
+ /**
32
+ * A directive that can be used to capture initialization lifecycle of the whole component.
33
+ */
34
+ export declare class TraceDirective implements OnInit, AfterViewInit {
35
+ componentName: string;
36
+ private _tracingSpan?;
37
+ /**
38
+ * Implementation of OnInit lifecycle method
39
+ * @inheritdoc
40
+ */
41
+ ngOnInit(): void;
42
+ /**
43
+ * Implementation of AfterViewInit lifecycle method
44
+ * @inheritdoc
45
+ */
46
+ ngAfterViewInit(): void;
47
+ }
48
+ /**
49
+ * A module serves as a single compilation unit for the `TraceDirective` and can be re-used by any other module.
50
+ */
51
+ export declare class TraceModule {
52
+ }
53
+ /**
54
+ * Decorator function that can be used to capture initialization lifecycle of the whole component.
55
+ */
56
+ export declare function TraceClassDecorator(): ClassDecorator;
57
+ /**
58
+ * Decorator function that can be used to capture a single lifecycle methods of the component.
59
+ */
60
+ export declare function TraceMethodDecorator(): MethodDecorator;
61
+ //# sourceMappingURL=tracing.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tracing.d.ts","sourceRoot":"","sources":["../../src/tracing.ts"],"names":[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+1,5 @@
1
+ /**
2
+ * The function that does the same job as `NgZone.runOutsideAngular`.
3
+ */
4
+ export declare function runOutsideAngular<T>(callback: () => T): T;
5
+ //# sourceMappingURL=zone.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"zone.d.ts","sourceRoot":"","sources":["../../src/zone.ts"],"names":[],"mappings":"AAaA;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAWzD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/angular",
3
- "version": "6.19.1",
3
+ "version": "6.19.4",
4
4
  "description": "Official Sentry SDK for Angular",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/angular",
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "main": "dist/index.js",
13
13
  "module": "esm/index.js",
14
- "types": "dist/index.d.ts",
14
+ "types": "build/types/index.d.ts",
15
15
  "publishConfig": {
16
16
  "access": "public"
17
17
  },
@@ -21,9 +21,9 @@
21
21
  "@angular/router": "10.x || 11.x || 12.x || 13.x"
22
22
  },
23
23
  "dependencies": {
24
- "@sentry/browser": "6.19.1",
25
- "@sentry/types": "6.19.1",
26
- "@sentry/utils": "6.19.1",
24
+ "@sentry/browser": "6.19.4",
25
+ "@sentry/types": "6.19.4",
26
+ "@sentry/utils": "6.19.4",
27
27
  "rxjs": "^6.6.0",
28
28
  "tslib": "^1.9.3"
29
29
  },
@@ -45,16 +45,16 @@
45
45
  "build:es5:watch": "yarn build:cjs:watch # *** backwards compatibility - remove in v7 ***",
46
46
  "build:esm:watch": "tsc -p tsconfig.esm.json --watch",
47
47
  "build:types:watch": "tsc -p tsconfig.types.json --watch",
48
+ "build:npm": "npm pack",
48
49
  "circularDepCheck": "madge --circular src/index.ts",
49
50
  "clean": "rimraf dist esm build coverage",
50
51
  "fix": "run-s fix:eslint fix:prettier",
51
52
  "fix:eslint": "eslint . --format stylish --fix",
52
- "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",
53
+ "fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
53
54
  "link:yarn": "yarn link",
54
55
  "lint": "run-s lint:prettier lint:eslint",
55
56
  "lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
56
- "lint:prettier": "prettier --check \"{src,test}/**/*.ts\"",
57
- "pack": "npm pack"
57
+ "lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\""
58
58
  },
59
59
  "volta": {
60
60
  "extends": "../../package.json"