sentry-vir 0.2.3 → 0.2.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.
package/dist/cjs/auto.js CHANGED
@@ -25,17 +25,14 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.autoInitSentry = exports.sentryDepByEnv = void 0;
27
27
  const execution_env_1 = require("./env/execution-env");
28
- const sentry_config_1 = require("./init-sentry/sentry-config");
29
- const event_processor_1 = require("./processing/event-processor");
28
+ const base_sentry_init_1 = require("./init-sentry/base-sentry-init");
30
29
  /** The sentry dep import for each execution env. */
31
- /* c8 ignore next 6 */
32
30
  exports.sentryDepByEnv = {
33
31
  /** Sentry client for the browser. */
34
32
  [execution_env_1.SentryExecutionEnvEnum.Browser]: () => Promise.resolve().then(() => __importStar(require('@sentry/browser'))),
35
33
  /** Sentry client for the Node.js. */
36
34
  [execution_env_1.SentryExecutionEnvEnum.Node]: () => Promise.resolve().then(() => __importStar(require('@sentry/node'))),
37
35
  };
38
- /* c8 ignore next 6 */
39
36
  /** Determine which Sentry client dependency to use and then import it. */
40
37
  async function getSentryByEnv(env) {
41
38
  return (await exports.sentryDepByEnv[env]());
@@ -48,16 +45,17 @@ async function getSentryByEnv(env) {
48
45
  *
49
46
  * To override any default sentry-vir settings, include them in the userConfig input.
50
47
  */
51
- /* c8 ignore next 30 */
52
48
  async function autoInitSentry({ executionEnv, dsn, releaseEnv, releaseName, sentryConfigOverrides, createUniversalContext, }) {
53
49
  const sentryDep = await getSentryByEnv(executionEnv);
54
- const finalSentryConfig = await (0, sentry_config_1.createSentryConfig)(executionEnv, sentryDep, {
50
+ await (0, base_sentry_init_1.baseInitSentry)({
55
51
  dsn,
56
- environment: releaseEnv,
57
- release: releaseName,
58
- }, sentryConfigOverrides, releaseEnv);
59
- sentryDep.init(finalSentryConfig);
60
- sentryDep.addGlobalEventProcessor((event, hint) => (0, event_processor_1.processSentryEvent)(event, hint, createUniversalContext));
52
+ releaseEnv,
53
+ releaseName,
54
+ sentryConfigOverrides,
55
+ createUniversalContext,
56
+ sentryDep,
57
+ executionEnv,
58
+ });
61
59
  return sentryDep;
62
60
  }
63
61
  exports.autoInitSentry = autoInitSentry;
@@ -54,7 +54,7 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
54
54
  startInactiveSpan: typeof import("@sentry/browser").startInactiveSpan;
55
55
  startSpanManual: typeof import("@sentry/browser").startSpanManual;
56
56
  continueTrace: typeof import("@sentry/browser").continueTrace;
57
- SDK_VERSION: "7.74.1";
57
+ SDK_VERSION: "7.80.1";
58
58
  setContext: typeof import("@sentry/browser").setContext;
59
59
  setExtra: typeof import("@sentry/browser").setExtra;
60
60
  setExtras: typeof import("@sentry/browser").setExtras;
@@ -25,24 +25,24 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.initSentry = void 0;
27
27
  const execution_env_1 = require("./env/execution-env");
28
- const sentry_config_1 = require("./init-sentry/sentry-config");
29
- const event_processor_1 = require("./processing/event-processor");
28
+ const base_sentry_init_1 = require("./init-sentry/base-sentry-init");
30
29
  /**
31
30
  * Base Sentry init. Requires the Sentry module to already have been imported. Setup a sentry client
32
31
  * with all the default sentry-vir integrations and configs.
33
32
  *
34
33
  * To override any default sentry-vir settings, include them in the userConfig input.
35
34
  */
36
- /* c8 ignore next */
37
35
  async function initSentry({ dsn, releaseEnv, releaseName, sentryConfigOverrides, createUniversalContext, }) {
38
36
  const sentryDep = await Promise.resolve().then(() => __importStar(require('@sentry/browser')));
39
- const finalSentryConfig = await (0, sentry_config_1.createSentryConfig)(execution_env_1.SentryExecutionEnvEnum.Browser, sentryDep, {
37
+ await (0, base_sentry_init_1.baseInitSentry)({
40
38
  dsn,
41
- environment: releaseEnv,
42
- release: releaseName,
43
- }, sentryConfigOverrides, releaseEnv);
44
- sentryDep.init(finalSentryConfig);
45
- sentryDep.addGlobalEventProcessor((event, hint) => (0, event_processor_1.processSentryEvent)(event, hint, createUniversalContext));
39
+ releaseEnv,
40
+ releaseName,
41
+ sentryConfigOverrides,
42
+ createUniversalContext,
43
+ sentryDep,
44
+ executionEnv: execution_env_1.SentryExecutionEnvEnum.Browser,
45
+ });
46
46
  return sentryDep;
47
47
  }
48
48
  exports.initSentry = initSentry;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SentryExecutionEnvEnum = void 0;
4
4
  /** Used to determine which Sentry client dependency to import. */
5
- /* c8 ignore next */
6
5
  var SentryExecutionEnvEnum;
7
6
  (function (SentryExecutionEnvEnum) {
8
7
  SentryExecutionEnvEnum["Browser"] = "browser";
@@ -5,7 +5,6 @@ exports.SentryReleaseEnvEnum = void 0;
5
5
  * Used to determine logging behavior (dev does not send events to Sentry but still logs them
6
6
  * locally).
7
7
  */
8
- /* c8 ignore next */
9
8
  var SentryReleaseEnvEnum;
10
9
  (function (SentryReleaseEnvEnum) {
11
10
  SentryReleaseEnvEnum["Prod"] = "prod";
@@ -10,7 +10,6 @@ const sentry_config_1 = require("./sentry-config");
10
10
  *
11
11
  * To override any default sentry-vir settings, include them in the userConfig input.
12
12
  */
13
- /* c8 ignore next */
14
13
  async function baseInitSentry({ dsn, releaseEnv, releaseName, sentryConfigOverrides, createUniversalContext, sentryDep, executionEnv, }) {
15
14
  const finalSentryConfig = await (0, sentry_config_1.createSentryConfig)(executionEnv, sentryDep, {
16
15
  dsn,
@@ -5,8 +5,6 @@ const common_1 = require("@augment-vir/common");
5
5
  const execution_env_1 = require("../env/execution-env");
6
6
  const handle_sentry_send_1 = require("../processing/handle-sentry-send");
7
7
  /** Creates the sentry config used internally by sentry-vir. */
8
- // can't test config creation because it depends on execution environment
9
- /* c8 ignore next 60 */
10
8
  async function createSentryConfig(env, sentryDep, requiredSentryOptions, userOverrides, releaseEnv) {
11
9
  const sharedSentryConfig = {
12
10
  beforeSend: (0, handle_sentry_send_1.createSentryHandler)(releaseEnv),
@@ -21,7 +19,7 @@ async function createSentryConfig(env, sentryDep, requiredSentryOptions, userOve
21
19
  * this functions parameters already imposes the requirement that they are coupled.
22
20
  */
23
21
  sentryDep);
24
- const combinedConfig = (0, common_1.mergeDeep)(sharedSentryConfig, envSentryConfig, requiredSentryOptions, userOverrides);
22
+ const combinedConfig = (0, common_1.mergeDeep)(sharedSentryConfig, envSentryConfig, requiredSentryOptions, userOverrides || {});
25
23
  return combinedConfig;
26
24
  }
27
25
  exports.createSentryConfig = createSentryConfig;
@@ -27,7 +27,7 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
27
27
  runWithAsyncContext: typeof import("@sentry/node").runWithAsyncContext;
28
28
  Scope: typeof import("@sentry/node").Scope;
29
29
  startTransaction: typeof import("@sentry/node").startTransaction;
30
- SDK_VERSION: "7.74.1";
30
+ SDK_VERSION: "7.80.1";
31
31
  setContext: typeof import("@sentry/node").setContext;
32
32
  setExtra: typeof import("@sentry/node").setExtra;
33
33
  setExtras: typeof import("@sentry/node").setExtras;
@@ -38,6 +38,7 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
38
38
  trace: typeof import("@sentry/node").trace;
39
39
  withScope: typeof import("@sentry/node").withScope;
40
40
  captureCheckIn: typeof import("@sentry/node").captureCheckIn;
41
+ withMonitor: typeof import("@sentry/node").withMonitor;
41
42
  setMeasurement: typeof import("@sentry/node").setMeasurement;
42
43
  getActiveSpan: typeof import("@sentry/node").getActiveSpan;
43
44
  startSpan: typeof import("@sentry/node").startSpan;
@@ -48,7 +49,7 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
48
49
  autoDiscoverNodePerformanceMonitoringIntegrations: typeof import("@sentry/node").autoDiscoverNodePerformanceMonitoringIntegrations;
49
50
  NodeClient: typeof import("@sentry/node").NodeClient;
50
51
  makeNodeTransport: typeof import("@sentry/node").makeNodeTransport;
51
- defaultIntegrations: (import("@sentry/core").InboundFilters | import("@sentry/core").FunctionToString | import("@sentry/node/types/integrations").OnUncaughtException | import("@sentry/node/types/integrations").OnUnhandledRejection | import("@sentry/node/types/integrations").ContextLines | import("@sentry/node/types/integrations").Context | import("@sentry/node/types/integrations").Console | import("@sentry/node/types/integrations").Http | import("@sentry/node/types/integrations").LinkedErrors | import("@sentry/node/types/integrations").Modules | import("@sentry/node/types/integrations").RequestData | import("@sentry/node/types/integrations").LocalVariables | import("@sentry/node/types/integrations").Undici)[];
52
+ defaultIntegrations: (import("@sentry/core").InboundFilters | import("@sentry/core").FunctionToString | import("@sentry/node/types/integrations").OnUncaughtException | import("@sentry/node/types/integrations").OnUnhandledRejection | import("@sentry/node/types/integrations").ContextLines | import("@sentry/node/types/integrations").Context | import("@sentry/node/types/integrations").Console | import("@sentry/node/types/integrations").Http | import("@sentry/node/types/integrations").Modules | import("@sentry/node/types/integrations").RequestData | import("@sentry/node/types/integrations").LocalVariables | import("@sentry/node/types/integrations").Undici | import("@sentry/core").LinkedErrors)[];
52
53
  init: typeof import("@sentry/node").init;
53
54
  defaultStackParser: import("@sentry/types").StackParser;
54
55
  getSentryRelease: typeof import("@sentry/node").getSentryRelease;
@@ -70,7 +71,6 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
70
71
  Http: typeof import("@sentry/node/types/integrations").Http;
71
72
  OnUncaughtException: typeof import("@sentry/node/types/integrations").OnUncaughtException;
72
73
  OnUnhandledRejection: typeof import("@sentry/node/types/integrations").OnUnhandledRejection;
73
- LinkedErrors: typeof import("@sentry/node/types/integrations").LinkedErrors;
74
74
  Modules: typeof import("@sentry/node/types/integrations").Modules;
75
75
  ContextLines: typeof import("@sentry/node/types/integrations").ContextLines;
76
76
  Context: typeof import("@sentry/node/types/integrations").Context;
@@ -79,6 +79,7 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
79
79
  Undici: typeof import("@sentry/node/types/integrations").Undici;
80
80
  FunctionToString: typeof import("@sentry/core").FunctionToString;
81
81
  InboundFilters: typeof import("@sentry/core").InboundFilters;
82
+ LinkedErrors: typeof import("@sentry/core").LinkedErrors;
82
83
  };
83
84
  Handlers: typeof import("@sentry/node/types/handlers");
84
85
  }>;
package/dist/cjs/node.js CHANGED
@@ -25,24 +25,24 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.initSentry = void 0;
27
27
  const execution_env_1 = require("./env/execution-env");
28
- const sentry_config_1 = require("./init-sentry/sentry-config");
29
- const event_processor_1 = require("./processing/event-processor");
28
+ const base_sentry_init_1 = require("./init-sentry/base-sentry-init");
30
29
  /**
31
30
  * Base Sentry init. Requires the Sentry module to already have been imported. Setup a sentry client
32
31
  * with all the default sentry-vir integrations and configs.
33
32
  *
34
33
  * To override any default sentry-vir settings, include them in the userConfig input.
35
34
  */
36
- /* c8 ignore next */
37
35
  async function initSentry({ dsn, releaseEnv, releaseName, sentryConfigOverrides, createUniversalContext, }) {
38
36
  const sentryDep = await Promise.resolve().then(() => __importStar(require('@sentry/node')));
39
- const finalSentryConfig = await (0, sentry_config_1.createSentryConfig)(execution_env_1.SentryExecutionEnvEnum.Node, sentryDep, {
37
+ await (0, base_sentry_init_1.baseInitSentry)({
40
38
  dsn,
41
- environment: releaseEnv,
42
- release: releaseName,
43
- }, sentryConfigOverrides, releaseEnv);
44
- sentryDep.init(finalSentryConfig);
45
- sentryDep.addGlobalEventProcessor((event, hint) => (0, event_processor_1.processSentryEvent)(event, hint, createUniversalContext));
39
+ releaseEnv,
40
+ releaseName,
41
+ sentryConfigOverrides,
42
+ createUniversalContext,
43
+ sentryDep,
44
+ executionEnv: execution_env_1.SentryExecutionEnvEnum.Node,
45
+ });
46
46
  return sentryDep;
47
47
  }
48
48
  exports.initSentry = initSentry;
package/dist/esm/auto.js CHANGED
@@ -1,15 +1,12 @@
1
1
  import { SentryExecutionEnvEnum } from './env/execution-env';
2
- import { createSentryConfig } from './init-sentry/sentry-config';
3
- import { processSentryEvent } from './processing/event-processor';
2
+ import { baseInitSentry } from './init-sentry/base-sentry-init';
4
3
  /** The sentry dep import for each execution env. */
5
- /* c8 ignore next 6 */
6
4
  export const sentryDepByEnv = {
7
5
  /** Sentry client for the browser. */
8
6
  [SentryExecutionEnvEnum.Browser]: () => import('@sentry/browser'),
9
7
  /** Sentry client for the Node.js. */
10
8
  [SentryExecutionEnvEnum.Node]: () => import('@sentry/node'),
11
9
  };
12
- /* c8 ignore next 6 */
13
10
  /** Determine which Sentry client dependency to use and then import it. */
14
11
  async function getSentryByEnv(env) {
15
12
  return (await sentryDepByEnv[env]());
@@ -22,15 +19,16 @@ async function getSentryByEnv(env) {
22
19
  *
23
20
  * To override any default sentry-vir settings, include them in the userConfig input.
24
21
  */
25
- /* c8 ignore next 30 */
26
22
  export async function autoInitSentry({ executionEnv, dsn, releaseEnv, releaseName, sentryConfigOverrides, createUniversalContext, }) {
27
23
  const sentryDep = await getSentryByEnv(executionEnv);
28
- const finalSentryConfig = await createSentryConfig(executionEnv, sentryDep, {
24
+ await baseInitSentry({
29
25
  dsn,
30
- environment: releaseEnv,
31
- release: releaseName,
32
- }, sentryConfigOverrides, releaseEnv);
33
- sentryDep.init(finalSentryConfig);
34
- sentryDep.addGlobalEventProcessor((event, hint) => processSentryEvent(event, hint, createUniversalContext));
26
+ releaseEnv,
27
+ releaseName,
28
+ sentryConfigOverrides,
29
+ createUniversalContext,
30
+ sentryDep,
31
+ executionEnv,
32
+ });
35
33
  return sentryDep;
36
34
  }
@@ -54,7 +54,7 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
54
54
  startInactiveSpan: typeof import("@sentry/browser").startInactiveSpan;
55
55
  startSpanManual: typeof import("@sentry/browser").startSpanManual;
56
56
  continueTrace: typeof import("@sentry/browser").continueTrace;
57
- SDK_VERSION: "7.74.1";
57
+ SDK_VERSION: "7.80.1";
58
58
  setContext: typeof import("@sentry/browser").setContext;
59
59
  setExtra: typeof import("@sentry/browser").setExtra;
60
60
  setExtras: typeof import("@sentry/browser").setExtras;
@@ -1,21 +1,21 @@
1
1
  import { SentryExecutionEnvEnum } from './env/execution-env';
2
- import { createSentryConfig } from './init-sentry/sentry-config';
3
- import { processSentryEvent } from './processing/event-processor';
2
+ import { baseInitSentry } from './init-sentry/base-sentry-init';
4
3
  /**
5
4
  * Base Sentry init. Requires the Sentry module to already have been imported. Setup a sentry client
6
5
  * with all the default sentry-vir integrations and configs.
7
6
  *
8
7
  * To override any default sentry-vir settings, include them in the userConfig input.
9
8
  */
10
- /* c8 ignore next */
11
9
  export async function initSentry({ dsn, releaseEnv, releaseName, sentryConfigOverrides, createUniversalContext, }) {
12
10
  const sentryDep = await import('@sentry/browser');
13
- const finalSentryConfig = await createSentryConfig(SentryExecutionEnvEnum.Browser, sentryDep, {
11
+ await baseInitSentry({
14
12
  dsn,
15
- environment: releaseEnv,
16
- release: releaseName,
17
- }, sentryConfigOverrides, releaseEnv);
18
- sentryDep.init(finalSentryConfig);
19
- sentryDep.addGlobalEventProcessor((event, hint) => processSentryEvent(event, hint, createUniversalContext));
13
+ releaseEnv,
14
+ releaseName,
15
+ sentryConfigOverrides,
16
+ createUniversalContext,
17
+ sentryDep,
18
+ executionEnv: SentryExecutionEnvEnum.Browser,
19
+ });
20
20
  return sentryDep;
21
21
  }
@@ -1,5 +1,4 @@
1
1
  /** Used to determine which Sentry client dependency to import. */
2
- /* c8 ignore next */
3
2
  export var SentryExecutionEnvEnum;
4
3
  (function (SentryExecutionEnvEnum) {
5
4
  SentryExecutionEnvEnum["Browser"] = "browser";
@@ -2,7 +2,6 @@
2
2
  * Used to determine logging behavior (dev does not send events to Sentry but still logs them
3
3
  * locally).
4
4
  */
5
- /* c8 ignore next */
6
5
  export var SentryReleaseEnvEnum;
7
6
  (function (SentryReleaseEnvEnum) {
8
7
  SentryReleaseEnvEnum["Prod"] = "prod";
@@ -7,7 +7,6 @@ import { createSentryConfig } from './sentry-config';
7
7
  *
8
8
  * To override any default sentry-vir settings, include them in the userConfig input.
9
9
  */
10
- /* c8 ignore next */
11
10
  export async function baseInitSentry({ dsn, releaseEnv, releaseName, sentryConfigOverrides, createUniversalContext, sentryDep, executionEnv, }) {
12
11
  const finalSentryConfig = await createSentryConfig(executionEnv, sentryDep, {
13
12
  dsn,
@@ -2,8 +2,6 @@ import { mergeDeep } from '@augment-vir/common';
2
2
  import { SentryExecutionEnvEnum, } from '../env/execution-env';
3
3
  import { createSentryHandler } from '../processing/handle-sentry-send';
4
4
  /** Creates the sentry config used internally by sentry-vir. */
5
- // can't test config creation because it depends on execution environment
6
- /* c8 ignore next 60 */
7
5
  export async function createSentryConfig(env, sentryDep, requiredSentryOptions, userOverrides, releaseEnv) {
8
6
  const sharedSentryConfig = {
9
7
  beforeSend: createSentryHandler(releaseEnv),
@@ -18,7 +16,7 @@ export async function createSentryConfig(env, sentryDep, requiredSentryOptions,
18
16
  * this functions parameters already imposes the requirement that they are coupled.
19
17
  */
20
18
  sentryDep);
21
- const combinedConfig = mergeDeep(sharedSentryConfig, envSentryConfig, requiredSentryOptions, userOverrides);
19
+ const combinedConfig = mergeDeep(sharedSentryConfig, envSentryConfig, requiredSentryOptions, userOverrides || {});
22
20
  return combinedConfig;
23
21
  }
24
22
  const sentryConfigByEnv = {
@@ -27,7 +27,7 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
27
27
  runWithAsyncContext: typeof import("@sentry/node").runWithAsyncContext;
28
28
  Scope: typeof import("@sentry/node").Scope;
29
29
  startTransaction: typeof import("@sentry/node").startTransaction;
30
- SDK_VERSION: "7.74.1";
30
+ SDK_VERSION: "7.80.1";
31
31
  setContext: typeof import("@sentry/node").setContext;
32
32
  setExtra: typeof import("@sentry/node").setExtra;
33
33
  setExtras: typeof import("@sentry/node").setExtras;
@@ -38,6 +38,7 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
38
38
  trace: typeof import("@sentry/node").trace;
39
39
  withScope: typeof import("@sentry/node").withScope;
40
40
  captureCheckIn: typeof import("@sentry/node").captureCheckIn;
41
+ withMonitor: typeof import("@sentry/node").withMonitor;
41
42
  setMeasurement: typeof import("@sentry/node").setMeasurement;
42
43
  getActiveSpan: typeof import("@sentry/node").getActiveSpan;
43
44
  startSpan: typeof import("@sentry/node").startSpan;
@@ -48,7 +49,7 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
48
49
  autoDiscoverNodePerformanceMonitoringIntegrations: typeof import("@sentry/node").autoDiscoverNodePerformanceMonitoringIntegrations;
49
50
  NodeClient: typeof import("@sentry/node").NodeClient;
50
51
  makeNodeTransport: typeof import("@sentry/node").makeNodeTransport;
51
- defaultIntegrations: (import("@sentry/core").InboundFilters | import("@sentry/core").FunctionToString | import("@sentry/node/types/integrations").OnUncaughtException | import("@sentry/node/types/integrations").OnUnhandledRejection | import("@sentry/node/types/integrations").ContextLines | import("@sentry/node/types/integrations").Context | import("@sentry/node/types/integrations").Console | import("@sentry/node/types/integrations").Http | import("@sentry/node/types/integrations").LinkedErrors | import("@sentry/node/types/integrations").Modules | import("@sentry/node/types/integrations").RequestData | import("@sentry/node/types/integrations").LocalVariables | import("@sentry/node/types/integrations").Undici)[];
52
+ defaultIntegrations: (import("@sentry/core").InboundFilters | import("@sentry/core").FunctionToString | import("@sentry/node/types/integrations").OnUncaughtException | import("@sentry/node/types/integrations").OnUnhandledRejection | import("@sentry/node/types/integrations").ContextLines | import("@sentry/node/types/integrations").Context | import("@sentry/node/types/integrations").Console | import("@sentry/node/types/integrations").Http | import("@sentry/node/types/integrations").Modules | import("@sentry/node/types/integrations").RequestData | import("@sentry/node/types/integrations").LocalVariables | import("@sentry/node/types/integrations").Undici | import("@sentry/core").LinkedErrors)[];
52
53
  init: typeof import("@sentry/node").init;
53
54
  defaultStackParser: import("@sentry/types").StackParser;
54
55
  getSentryRelease: typeof import("@sentry/node").getSentryRelease;
@@ -70,7 +71,6 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
70
71
  Http: typeof import("@sentry/node/types/integrations").Http;
71
72
  OnUncaughtException: typeof import("@sentry/node/types/integrations").OnUncaughtException;
72
73
  OnUnhandledRejection: typeof import("@sentry/node/types/integrations").OnUnhandledRejection;
73
- LinkedErrors: typeof import("@sentry/node/types/integrations").LinkedErrors;
74
74
  Modules: typeof import("@sentry/node/types/integrations").Modules;
75
75
  ContextLines: typeof import("@sentry/node/types/integrations").ContextLines;
76
76
  Context: typeof import("@sentry/node/types/integrations").Context;
@@ -79,6 +79,7 @@ export declare function initSentry({ dsn, releaseEnv, releaseName, sentryConfigO
79
79
  Undici: typeof import("@sentry/node/types/integrations").Undici;
80
80
  FunctionToString: typeof import("@sentry/core").FunctionToString;
81
81
  InboundFilters: typeof import("@sentry/core").InboundFilters;
82
+ LinkedErrors: typeof import("@sentry/core").LinkedErrors;
82
83
  };
83
84
  Handlers: typeof import("@sentry/node/types/handlers");
84
85
  }>;
package/dist/esm/node.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import { SentryExecutionEnvEnum } from './env/execution-env';
2
- import { createSentryConfig } from './init-sentry/sentry-config';
3
- import { processSentryEvent } from './processing/event-processor';
2
+ import { baseInitSentry } from './init-sentry/base-sentry-init';
4
3
  /**
5
4
  * Base Sentry init. Requires the Sentry module to already have been imported. Setup a sentry client
6
5
  * with all the default sentry-vir integrations and configs.
7
6
  *
8
7
  * To override any default sentry-vir settings, include them in the userConfig input.
9
8
  */
10
- /* c8 ignore next */
11
9
  export async function initSentry({ dsn, releaseEnv, releaseName, sentryConfigOverrides, createUniversalContext, }) {
12
10
  const sentryDep = await import('@sentry/node');
13
- const finalSentryConfig = await createSentryConfig(SentryExecutionEnvEnum.Node, sentryDep, {
11
+ await baseInitSentry({
14
12
  dsn,
15
- environment: releaseEnv,
16
- release: releaseName,
17
- }, sentryConfigOverrides, releaseEnv);
18
- sentryDep.init(finalSentryConfig);
19
- sentryDep.addGlobalEventProcessor((event, hint) => processSentryEvent(event, hint, createUniversalContext));
13
+ releaseEnv,
14
+ releaseName,
15
+ sentryConfigOverrides,
16
+ createUniversalContext,
17
+ sentryDep,
18
+ executionEnv: SentryExecutionEnvEnum.Node,
19
+ });
20
20
  return sentryDep;
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sentry-vir",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "keywords": [
5
5
  "config",
6
6
  "helper",
@@ -38,37 +38,38 @@
38
38
  "test:types": "tsc --noEmit"
39
39
  },
40
40
  "dependencies": {
41
- "@augment-vir/common": "^20.0.1",
42
- "@sentry/browser": "^7.74.1",
43
- "@sentry/core": "^7.74.1",
44
- "@sentry/node": "^7.74.1",
45
- "@sentry/types": "^7.74.1",
46
- "type-fest": "^4.5.0"
41
+ "@augment-vir/common": "^21.6.0",
42
+ "@sentry/browser": "^7.80.1",
43
+ "@sentry/core": "^7.80.1",
44
+ "@sentry/node": "^7.80.1",
45
+ "@sentry/types": "^7.80.1",
46
+ "type-fest": "^4.7.1"
47
47
  },
48
48
  "devDependencies": {
49
- "@augment-vir/browser-testing": "^20.0.1",
50
- "@open-wc/testing": "^3.2.0",
51
- "@types/mocha": "^10.0.3",
52
- "@web/dev-server-esbuild": "^0.4.2",
53
- "@web/test-runner": "^0.17.2",
54
- "@web/test-runner-commands": "^0.8.1",
55
- "@web/test-runner-playwright": "^0.10.1",
56
- "@web/test-runner-visual-regression": "^0.8.2",
57
- "cspell": "^7.3.8",
58
- "dependency-cruiser": "^14.1.2",
49
+ "@augment-vir/browser-testing": "^21.6.0",
50
+ "@open-wc/testing": "^4.0.0",
51
+ "@types/mocha": "^10.0.4",
52
+ "@web/dev-server-esbuild": "^1.0.1",
53
+ "@web/test-runner": "^0.18.0",
54
+ "@web/test-runner-commands": "^0.9.0",
55
+ "@web/test-runner-playwright": "^0.11.0",
56
+ "@web/test-runner-visual-regression": "^0.9.0",
57
+ "cspell": "^8.0.0",
58
+ "dependency-cruiser": "^15.3.0",
59
59
  "esbuild": "^0.19.5",
60
60
  "istanbul-smart-text-reporter": "^1.1.2",
61
61
  "markdown-code-example-inserter": "^0.3.2",
62
62
  "npm-check-updates": "~16.12.3",
63
- "prettier": "^2.8.8",
64
- "prettier-plugin-interpolated-html-tags": "^0.0.4",
65
- "prettier-plugin-jsdoc": "^0.4.2",
66
- "prettier-plugin-multiline-arrays": "^2.0.0",
67
- "prettier-plugin-organize-imports": "^3.2.3",
63
+ "prettier": "^3.1.0",
64
+ "prettier-plugin-interpolated-html-tags": "^1.0.2",
65
+ "prettier-plugin-jsdoc": "^1.1.1",
66
+ "prettier-plugin-multiline-arrays": "^3.0.0",
67
+ "prettier-plugin-organize-imports": "^3.2.4",
68
68
  "prettier-plugin-packagejson": "^2.4.6",
69
- "prettier-plugin-sort-json": "^2.0.0",
70
- "prettier-plugin-toml": "^0.3.5",
71
- "typedoc": "^0.25.2",
72
- "virmator": "^9.1.3"
69
+ "prettier-plugin-sort-json": "^3.1.0",
70
+ "prettier-plugin-toml": "^1.0.0",
71
+ "run-time-assertions": "^0.1.3",
72
+ "typedoc": "^0.25.3",
73
+ "virmator": "^11.1.0"
73
74
  }
74
75
  }