@nuxtjs/sentry
Advanced tools
+1
-1
| { | ||
| "name": "@nuxtjs/sentry", | ||
| "configKey": "sentry", | ||
| "version": "8.0.4" | ||
| "version": "8.0.5" | ||
| } |
+15
-4
@@ -216,5 +216,8 @@ import { fileURLToPath } from 'node:url'; | ||
| const SERVER_PROFILING_INTEGRATION = "ProfilingIntegration"; | ||
| function filterDisabledIntegrations(integrations) { | ||
| function getEnabledIntegrations(integrations) { | ||
| return getIntegrationsKeys(integrations).filter((key) => integrations[key]); | ||
| } | ||
| function getDisabledIntegrationKeys(integrations) { | ||
| return getIntegrationsKeys(integrations).filter((key) => integrations[key] === false); | ||
| } | ||
| function getIntegrationsKeys(integrations) { | ||
@@ -352,2 +355,3 @@ return Object.keys(integrations); | ||
| clientConfigPath, | ||
| DISABLED_INTEGRATION_KEYS: getDisabledIntegrationKeys(options.clientIntegrations), | ||
| lazy: options.lazy, | ||
@@ -360,3 +364,3 @@ apiMethods, | ||
| initialize: canInitialize(options), | ||
| integrations: filterDisabledIntegrations(options.clientIntegrations).reduce((res, key) => { | ||
| integrations: getEnabledIntegrations(options.clientIntegrations).reduce((res, key) => { | ||
| res[key] = options.clientIntegrations[key]; | ||
@@ -417,6 +421,6 @@ return res; | ||
| } | ||
| options.config.integrations = [ | ||
| const resolvedIntegrations = [ | ||
| // Automatically instrument Node.js libraries and frameworks | ||
| ...options.tracing ? autoDiscoverNodePerformanceMonitoringIntegrations() : [], | ||
| ...filterDisabledIntegrations(options.serverIntegrations).map((name) => { | ||
| ...getEnabledIntegrations(options.serverIntegrations).map((name) => { | ||
| const opt = options.serverIntegrations[name]; | ||
@@ -438,2 +442,9 @@ try { | ||
| ]; | ||
| const disabledIntegrationKeys = getDisabledIntegrationKeys(options.serverIntegrations); | ||
| options.config.integrations = (defaultIntegrations) => { | ||
| return [ | ||
| ...defaultIntegrations.filter((integration) => !disabledIntegrationKeys.includes(integration.name)), | ||
| ...resolvedIntegrations | ||
| ]; | ||
| }; | ||
| return { | ||
@@ -440,0 +451,0 @@ config: { |
@@ -27,4 +27,6 @@ <% | ||
| /* eslint-disable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */ | ||
| const DISABLED_INTEGRATION_KEYS = <%= serialize(options.DISABLED_INTEGRATION_KEYS) %> | ||
| export<%= (options.clientConfigPath || options.customClientIntegrations) ? ' async' : '' %> function getConfig (ctx) { | ||
| /* eslint-disable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */ | ||
| const config = { | ||
@@ -43,3 +45,3 @@ <%= Object | ||
| <%}%> | ||
| config.integrations = [ | ||
| const resolvedIntegrations = [ | ||
| <%= Object | ||
@@ -62,3 +64,3 @@ .entries(options.integrations) | ||
| const { browserTracing, vueOptions, vueRouterInstrumentationOptions, ...tracingOptions } = <%= serialize(options.tracing) %> | ||
| config.integrations.push(new BrowserTracing({ | ||
| resolvedIntegrations.push(new BrowserTracing({ | ||
| ...(ctx.app.router ? { routingInstrumentation: vueRouterInstrumentation(ctx.app.router, vueRouterInstrumentationOptions) } : {}), | ||
@@ -78,3 +80,3 @@ ...browserTracing, | ||
| if (Array.isArray(customIntegrations)) { | ||
| config.integrations.push(...customIntegrations) | ||
| resolvedIntegrations.push(...customIntegrations) | ||
| } else { | ||
@@ -84,3 +86,8 @@ console.error(`[@nuxtjs/sentry] Invalid value returned from customClientIntegrations plugin. Expected an array, got "${typeof customIntegrations}".`) | ||
| <% } %> | ||
| config.integrations = (defaultIntegrations) => { | ||
| return [ | ||
| ...defaultIntegrations.filter(integration => !DISABLED_INTEGRATION_KEYS.includes(integration.name)), | ||
| ...resolvedIntegrations, | ||
| ] | ||
| } | ||
| const runtimeConfigKey = <%= serialize(options.runtimeConfigKey) %> | ||
@@ -87,0 +94,0 @@ if (ctx.$config && runtimeConfigKey && ctx.$config[runtimeConfigKey]) { |
+4
-4
| { | ||
| "name": "@nuxtjs/sentry", | ||
| "version": "8.0.4", | ||
| "version": "8.0.5", | ||
| "description": "Sentry module for Nuxt.js", | ||
@@ -87,3 +87,3 @@ "repository": "nuxt-community/sentry-module", | ||
| "@types/lodash.mergewith": "4.6.9", | ||
| "@types/node": "18.18.10", | ||
| "@types/node": "18.18.13", | ||
| "@types/request-promise-native": "1.0.21", | ||
@@ -100,5 +100,5 @@ "codecov": "3.8.3", | ||
| "sass": "1.69.5", | ||
| "sentry-testkit": "5.0.7", | ||
| "sentry-testkit": "5.0.8", | ||
| "size-limit": "11.0.0", | ||
| "typescript": "5.2.2", | ||
| "typescript": "5.3.2", | ||
| "vitest": "0.34.6", | ||
@@ -105,0 +105,0 @@ "vue": "2.7.15", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 8 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 8 instances in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
52830
1.6%1111
1.65%