sentry-vir 1.0.0 → 1.0.1
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var _a;
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
4
|
exports.throwWithExtraContext = exports.ExtraContextError = void 0;
|
|
4
5
|
const common_1 = require("@augment-vir/common");
|
|
@@ -19,10 +20,17 @@ const extra_event_context_1 = require("./extra-event-context");
|
|
|
19
20
|
class ExtraContextError extends Error {
|
|
20
21
|
constructor(message, extraData) {
|
|
21
22
|
super(message);
|
|
23
|
+
Object.defineProperty(this, _a, {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
configurable: true,
|
|
26
|
+
writable: true,
|
|
27
|
+
value: void 0
|
|
28
|
+
});
|
|
22
29
|
this[extra_event_context_1.extraEventContextSymbol] = extraData;
|
|
23
30
|
}
|
|
24
31
|
}
|
|
25
32
|
exports.ExtraContextError = ExtraContextError;
|
|
33
|
+
_a = extra_event_context_1.extraEventContextSymbol;
|
|
26
34
|
/**
|
|
27
35
|
* Adds extra context to an error without modifying the error's message or stack trace (or any of
|
|
28
36
|
* its other properties), then throws the error so it can propagate as usual.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.sendLog = void 0;
|
|
4
|
-
const
|
|
4
|
+
const run_time_assertions_1 = require("run-time-assertions");
|
|
5
5
|
const event_context_1 = require("../event-context/event-context");
|
|
6
6
|
const event_severity_1 = require("../event-context/event-severity");
|
|
7
7
|
const premature_events_1 = require("./premature-events");
|
|
@@ -36,7 +36,7 @@ function sendLogToSentry(logInfo, eventDetails) {
|
|
|
36
36
|
return undefined;
|
|
37
37
|
}
|
|
38
38
|
const scopeContext = (0, event_context_1.convertEventDetailsToSentryContext)(eventDetails);
|
|
39
|
-
const eventId = (0,
|
|
39
|
+
const eventId = (0, run_time_assertions_1.isRunTimeType)(logInfo, 'string')
|
|
40
40
|
? sentry_client_for_logging_1.sentryClientForLogging.captureMessage(logInfo, scopeContext)
|
|
41
41
|
: sentry_client_for_logging_1.sentryClientForLogging.captureEvent({
|
|
42
42
|
...logInfo,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
var _a;
|
|
1
2
|
import { ensureError } from '@augment-vir/common';
|
|
2
3
|
import { extraEventContextSymbol } from './extra-event-context';
|
|
3
4
|
/**
|
|
@@ -16,9 +17,16 @@ import { extraEventContextSymbol } from './extra-event-context';
|
|
|
16
17
|
export class ExtraContextError extends Error {
|
|
17
18
|
constructor(message, extraData) {
|
|
18
19
|
super(message);
|
|
20
|
+
Object.defineProperty(this, _a, {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
configurable: true,
|
|
23
|
+
writable: true,
|
|
24
|
+
value: void 0
|
|
25
|
+
});
|
|
19
26
|
this[extraEventContextSymbol] = extraData;
|
|
20
27
|
}
|
|
21
28
|
}
|
|
29
|
+
_a = extraEventContextSymbol;
|
|
22
30
|
/**
|
|
23
31
|
* Adds extra context to an error without modifying the error's message or stack trace (or any of
|
|
24
32
|
* its other properties), then throws the error so it can propagate as usual.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isRunTimeType } from 'run-time-assertions';
|
|
2
2
|
import { convertEventDetailsToSentryContext, } from '../event-context/event-context';
|
|
3
3
|
import { EventSeverityEnum } from '../event-context/event-severity';
|
|
4
4
|
import { addPrematureEvent } from './premature-events';
|
|
@@ -33,7 +33,7 @@ function sendLogToSentry(logInfo, eventDetails) {
|
|
|
33
33
|
return undefined;
|
|
34
34
|
}
|
|
35
35
|
const scopeContext = convertEventDetailsToSentryContext(eventDetails);
|
|
36
|
-
const eventId =
|
|
36
|
+
const eventId = isRunTimeType(logInfo, 'string')
|
|
37
37
|
? sentryClientForLogging.captureMessage(logInfo, scopeContext)
|
|
38
38
|
: sentryClientForLogging.captureEvent({
|
|
39
39
|
...logInfo,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sentry-vir",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"config",
|
|
6
6
|
"helper",
|
|
@@ -38,38 +38,38 @@
|
|
|
38
38
|
"test:types": "tsc --noEmit"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@augment-vir/common": "^
|
|
42
|
-
"@sentry/browser": "^7.
|
|
43
|
-
"@sentry/core": "^7.
|
|
44
|
-
"@sentry/node": "^7.
|
|
45
|
-
"@sentry/types": "^7.
|
|
46
|
-
"type-fest": "^4.
|
|
41
|
+
"@augment-vir/common": "^23.1.1",
|
|
42
|
+
"@sentry/browser": "^7.99.0",
|
|
43
|
+
"@sentry/core": "^7.99.0",
|
|
44
|
+
"@sentry/node": "^7.99.0",
|
|
45
|
+
"@sentry/types": "^7.99.0",
|
|
46
|
+
"type-fest": "^4.10.2"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@augment-vir/browser-testing": "^
|
|
49
|
+
"@augment-vir/browser-testing": "^23.1.1",
|
|
50
50
|
"@open-wc/testing": "^4.0.0",
|
|
51
|
-
"@types/mocha": "^10.0.
|
|
51
|
+
"@types/mocha": "^10.0.6",
|
|
52
52
|
"@web/dev-server-esbuild": "^1.0.1",
|
|
53
53
|
"@web/test-runner": "^0.18.0",
|
|
54
54
|
"@web/test-runner-commands": "^0.9.0",
|
|
55
55
|
"@web/test-runner-playwright": "^0.11.0",
|
|
56
56
|
"@web/test-runner-visual-regression": "^0.9.0",
|
|
57
|
-
"cspell": "^8.
|
|
58
|
-
"dependency-cruiser": "^
|
|
59
|
-
"esbuild": "^0.
|
|
60
|
-
"istanbul-smart-text-reporter": "^1.1.
|
|
61
|
-
"markdown-code-example-inserter": "^0.3.
|
|
57
|
+
"cspell": "^8.3.2",
|
|
58
|
+
"dependency-cruiser": "^16.1.0",
|
|
59
|
+
"esbuild": "^0.20.0",
|
|
60
|
+
"istanbul-smart-text-reporter": "^1.1.3",
|
|
61
|
+
"markdown-code-example-inserter": "^0.3.3",
|
|
62
62
|
"npm-check-updates": "~16.12.3",
|
|
63
|
-
"prettier": "^3.
|
|
64
|
-
"prettier-plugin-interpolated-html-tags": "^1.0.
|
|
65
|
-
"prettier-plugin-jsdoc": "^1.
|
|
66
|
-
"prettier-plugin-multiline-arrays": "^3.0.
|
|
63
|
+
"prettier": "^3.2.2",
|
|
64
|
+
"prettier-plugin-interpolated-html-tags": "^1.0.3",
|
|
65
|
+
"prettier-plugin-jsdoc": "^1.3.0",
|
|
66
|
+
"prettier-plugin-multiline-arrays": "^3.0.3",
|
|
67
67
|
"prettier-plugin-organize-imports": "^3.2.4",
|
|
68
|
-
"prettier-plugin-packagejson": "^2.4.
|
|
68
|
+
"prettier-plugin-packagejson": "^2.4.10",
|
|
69
69
|
"prettier-plugin-sort-json": "^3.1.0",
|
|
70
|
-
"prettier-plugin-toml": "^
|
|
71
|
-
"run-time-assertions": "^0.
|
|
72
|
-
"typedoc": "^0.25.
|
|
73
|
-
"virmator": "^11.1
|
|
70
|
+
"prettier-plugin-toml": "^2.0.1",
|
|
71
|
+
"run-time-assertions": "^0.3.0",
|
|
72
|
+
"typedoc": "^0.25.7",
|
|
73
|
+
"virmator": "^11.3.1"
|
|
74
74
|
}
|
|
75
75
|
}
|