@sentry/gatsby 7.37.2 → 7.39.0
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,5 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
|
+
const core = require('@sentry/core');
|
|
3
4
|
const Tracing = require('@sentry/tracing');
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -9,7 +10,7 @@ const Tracing = require('@sentry/tracing');
|
|
|
9
10
|
* @param options The options users have defined.
|
|
10
11
|
*/
|
|
11
12
|
function getIntegrationsFromOptions(options) {
|
|
12
|
-
const isTracingEnabled =
|
|
13
|
+
const isTracingEnabled = core.hasTracingEnabled(options);
|
|
13
14
|
if (options.integrations === undefined) {
|
|
14
15
|
return getIntegrationsFromArray([], isTracingEnabled);
|
|
15
16
|
} else if (Array.isArray(options.integrations)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","sources":["../../../src/utils/integrations.ts"],"sourcesContent":["import * as Tracing from '@sentry/tracing';\nimport type { Integration } from '@sentry/types';\n\nimport type { GatsbyOptions } from './types';\n\ntype UserFnIntegrations = (integrations: Integration[]) => Integration[];\nexport type UserIntegrations = Integration[] | UserFnIntegrations;\n\n/**\n * Returns the integrations to add to the SDK.\n * If tracing is enabled, `BrowserTracing` is always present.\n *\n * @param options The options users have defined.\n */\nexport function getIntegrationsFromOptions(options: GatsbyOptions): UserIntegrations {\n const isTracingEnabled =
|
|
1
|
+
{"version":3,"file":"integrations.js","sources":["../../../src/utils/integrations.ts"],"sourcesContent":["import { hasTracingEnabled } from '@sentry/core';\nimport * as Tracing from '@sentry/tracing';\nimport type { Integration } from '@sentry/types';\n\nimport type { GatsbyOptions } from './types';\n\ntype UserFnIntegrations = (integrations: Integration[]) => Integration[];\nexport type UserIntegrations = Integration[] | UserFnIntegrations;\n\n/**\n * Returns the integrations to add to the SDK.\n * If tracing is enabled, `BrowserTracing` is always present.\n *\n * @param options The options users have defined.\n */\nexport function getIntegrationsFromOptions(options: GatsbyOptions): UserIntegrations {\n const isTracingEnabled = hasTracingEnabled(options);\n if (options.integrations === undefined) {\n return getIntegrationsFromArray([], isTracingEnabled);\n } else if (Array.isArray(options.integrations)) {\n return getIntegrationsFromArray(options.integrations, isTracingEnabled);\n } else {\n return getIntegrationsFromFunction(options.integrations, isTracingEnabled);\n }\n}\n\n/**\n * Returns the integrations to add to the SDK, from the given integrations array.\n *\n * @param userIntegrations Array of user's integrations.\n * @param isTracingEnabled Whether the user has enabled tracing.\n */\nfunction getIntegrationsFromArray(userIntegrations: Integration[], isTracingEnabled: boolean): Integration[] {\n if (\n isTracingEnabled &&\n !userIntegrations.some(integration => integration.name === Tracing.Integrations.BrowserTracing.name)\n ) {\n userIntegrations.push(new Tracing.Integrations.BrowserTracing());\n }\n return userIntegrations;\n}\n\n/**\n * Returns the integrations to add to the SDK, from the given function.\n *\n * @param userIntegrations Function returning the user's integrations.\n * @param isTracingEnabled Whether the user has enabled tracing.\n */\nfunction getIntegrationsFromFunction(\n userIntegrations: UserFnIntegrations,\n isTracingEnabled: boolean,\n): UserFnIntegrations {\n const wrapper: UserFnIntegrations = (defaultIntegrations: Integration[]) => {\n return getIntegrationsFromArray(userIntegrations(defaultIntegrations), isTracingEnabled);\n };\n return wrapper;\n}\n"],"names":["hasTracingEnabled"],"mappings":";;;;;AASA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,0BAAA,CAAA,OAAA,EAAA;AACA,EAAA,MAAA,gBAAA,GAAAA,sBAAA,CAAA,OAAA,CAAA,CAAA;AACA,EAAA,IAAA,OAAA,CAAA,YAAA,KAAA,SAAA,EAAA;AACA,IAAA,OAAA,wBAAA,CAAA,EAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,MAAA,IAAA,KAAA,CAAA,OAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA;AACA,IAAA,OAAA,wBAAA,CAAA,OAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,MAAA;AACA,IAAA,OAAA,2BAAA,CAAA,OAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,wBAAA,CAAA,gBAAA,EAAA,gBAAA,EAAA;AACA,EAAA;AACA,IAAA,gBAAA;AACA,IAAA,CAAA,gBAAA,CAAA,IAAA,CAAA,WAAA,IAAA,WAAA,CAAA,IAAA,KAAA,OAAA,CAAA,YAAA,CAAA,cAAA,CAAA,IAAA,CAAA;AACA,IAAA;AACA,IAAA,gBAAA,CAAA,IAAA,CAAA,IAAA,OAAA,CAAA,YAAA,CAAA,cAAA,EAAA,CAAA,CAAA;AACA,GAAA;AACA,EAAA,OAAA,gBAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,2BAAA;AACA,EAAA,gBAAA;AACA,EAAA,gBAAA;AACA,EAAA;AACA,EAAA,MAAA,OAAA,GAAA,CAAA,mBAAA,KAAA;AACA,IAAA,OAAA,wBAAA,CAAA,gBAAA,CAAA,mBAAA,CAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,CAAA;AACA,EAAA,OAAA,OAAA,CAAA;AACA;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { hasTracingEnabled } from '@sentry/core';
|
|
1
2
|
import * as Tracing from '@sentry/tracing';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -7,7 +8,7 @@ import * as Tracing from '@sentry/tracing';
|
|
|
7
8
|
* @param options The options users have defined.
|
|
8
9
|
*/
|
|
9
10
|
function getIntegrationsFromOptions(options) {
|
|
10
|
-
const isTracingEnabled =
|
|
11
|
+
const isTracingEnabled = hasTracingEnabled(options);
|
|
11
12
|
if (options.integrations === undefined) {
|
|
12
13
|
return getIntegrationsFromArray([], isTracingEnabled);
|
|
13
14
|
} else if (Array.isArray(options.integrations)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.js","sources":["../../../src/utils/integrations.ts"],"sourcesContent":["import * as Tracing from '@sentry/tracing';\nimport type { Integration } from '@sentry/types';\n\nimport type { GatsbyOptions } from './types';\n\ntype UserFnIntegrations = (integrations: Integration[]) => Integration[];\nexport type UserIntegrations = Integration[] | UserFnIntegrations;\n\n/**\n * Returns the integrations to add to the SDK.\n * If tracing is enabled, `BrowserTracing` is always present.\n *\n * @param options The options users have defined.\n */\nexport function getIntegrationsFromOptions(options: GatsbyOptions): UserIntegrations {\n const isTracingEnabled =
|
|
1
|
+
{"version":3,"file":"integrations.js","sources":["../../../src/utils/integrations.ts"],"sourcesContent":["import { hasTracingEnabled } from '@sentry/core';\nimport * as Tracing from '@sentry/tracing';\nimport type { Integration } from '@sentry/types';\n\nimport type { GatsbyOptions } from './types';\n\ntype UserFnIntegrations = (integrations: Integration[]) => Integration[];\nexport type UserIntegrations = Integration[] | UserFnIntegrations;\n\n/**\n * Returns the integrations to add to the SDK.\n * If tracing is enabled, `BrowserTracing` is always present.\n *\n * @param options The options users have defined.\n */\nexport function getIntegrationsFromOptions(options: GatsbyOptions): UserIntegrations {\n const isTracingEnabled = hasTracingEnabled(options);\n if (options.integrations === undefined) {\n return getIntegrationsFromArray([], isTracingEnabled);\n } else if (Array.isArray(options.integrations)) {\n return getIntegrationsFromArray(options.integrations, isTracingEnabled);\n } else {\n return getIntegrationsFromFunction(options.integrations, isTracingEnabled);\n }\n}\n\n/**\n * Returns the integrations to add to the SDK, from the given integrations array.\n *\n * @param userIntegrations Array of user's integrations.\n * @param isTracingEnabled Whether the user has enabled tracing.\n */\nfunction getIntegrationsFromArray(userIntegrations: Integration[], isTracingEnabled: boolean): Integration[] {\n if (\n isTracingEnabled &&\n !userIntegrations.some(integration => integration.name === Tracing.Integrations.BrowserTracing.name)\n ) {\n userIntegrations.push(new Tracing.Integrations.BrowserTracing());\n }\n return userIntegrations;\n}\n\n/**\n * Returns the integrations to add to the SDK, from the given function.\n *\n * @param userIntegrations Function returning the user's integrations.\n * @param isTracingEnabled Whether the user has enabled tracing.\n */\nfunction getIntegrationsFromFunction(\n userIntegrations: UserFnIntegrations,\n isTracingEnabled: boolean,\n): UserFnIntegrations {\n const wrapper: UserFnIntegrations = (defaultIntegrations: Integration[]) => {\n return getIntegrationsFromArray(userIntegrations(defaultIntegrations), isTracingEnabled);\n };\n return wrapper;\n}\n"],"names":[],"mappings":";;;AASA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,0BAAA,CAAA,OAAA,EAAA;AACA,EAAA,MAAA,gBAAA,GAAA,iBAAA,CAAA,OAAA,CAAA,CAAA;AACA,EAAA,IAAA,OAAA,CAAA,YAAA,KAAA,SAAA,EAAA;AACA,IAAA,OAAA,wBAAA,CAAA,EAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,MAAA,IAAA,KAAA,CAAA,OAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA;AACA,IAAA,OAAA,wBAAA,CAAA,OAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,MAAA;AACA,IAAA,OAAA,2BAAA,CAAA,OAAA,CAAA,YAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,wBAAA,CAAA,gBAAA,EAAA,gBAAA,EAAA;AACA,EAAA;AACA,IAAA,gBAAA;AACA,IAAA,CAAA,gBAAA,CAAA,IAAA,CAAA,WAAA,IAAA,WAAA,CAAA,IAAA,KAAA,OAAA,CAAA,YAAA,CAAA,cAAA,CAAA,IAAA,CAAA;AACA,IAAA;AACA,IAAA,gBAAA,CAAA,IAAA,CAAA,IAAA,OAAA,CAAA,YAAA,CAAA,cAAA,EAAA,CAAA,CAAA;AACA,GAAA;AACA,EAAA,OAAA,gBAAA,CAAA;AACA,CAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAA,2BAAA;AACA,EAAA,gBAAA;AACA,EAAA,gBAAA;AACA,EAAA;AACA,EAAA,MAAA,OAAA,GAAA,CAAA,mBAAA,KAAA;AACA,IAAA,OAAA,wBAAA,CAAA,gBAAA,CAAA,mBAAA,CAAA,EAAA,gBAAA,CAAA,CAAA;AACA,GAAA,CAAA;AACA,EAAA,OAAA,OAAA,CAAA;AACA;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/gatsby",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.39.0",
|
|
4
4
|
"description": "Official Sentry SDK for Gatsby.js",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/gatsby",
|
|
@@ -20,10 +20,11 @@
|
|
|
20
20
|
"access": "public"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@sentry/
|
|
24
|
-
"@sentry/
|
|
25
|
-
"@sentry/
|
|
26
|
-
"@sentry/
|
|
23
|
+
"@sentry/core": "7.39.0",
|
|
24
|
+
"@sentry/react": "7.39.0",
|
|
25
|
+
"@sentry/tracing": "7.39.0",
|
|
26
|
+
"@sentry/types": "7.39.0",
|
|
27
|
+
"@sentry/utils": "7.39.0",
|
|
27
28
|
"@sentry/webpack-plugin": "1.19.0"
|
|
28
29
|
},
|
|
29
30
|
"peerDependencies": {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../../src/utils/integrations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../../src/utils/integrations.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,aAAK,kBAAkB,GAAG,CAAC,YAAY,EAAE,WAAW,EAAE,KAAK,WAAW,EAAE,CAAC;AACzE,oBAAY,gBAAgB,GAAG,WAAW,EAAE,GAAG,kBAAkB,CAAC;AAElE;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,aAAa,GAAG,gBAAgB,CASnF"}
|