@nuxtjs/sentry
Advanced tools
@@ -89,9 +89,10 @@ import merge from 'lodash.mergewith' | ||
| /** | ||
| * @param {import('../../types/sentry').ModuleConfiguration['tracing']} tracing | ||
| * @param {import('../../types/sentry').ModuleConfiguration} options | ||
| * @param {NonNullable<import('../../types/sentry').ModuleConfiguration['config']>} config | ||
| */ | ||
| function resolveTracingOptions (tracing, config) { | ||
| if (!tracing) { | ||
| function resolveTracingOptions (options, config) { | ||
| if (!options.tracing) { | ||
| return | ||
| } | ||
| const userOptions = typeof options.tracing === 'boolean' ? {} : options.tracing | ||
| /** @type {NonNullable<import('../../types/sentry').TracingConfiguration>} */ | ||
@@ -111,7 +112,8 @@ const tracingOptions = merge( | ||
| }, | ||
| typeof tracing === 'boolean' ? {} : tracing, | ||
| userOptions, | ||
| ) | ||
| if (tracingOptions && !config.tracesSampleRate) { | ||
| if (!config.tracesSampleRate) { | ||
| config.tracesSampleRate = tracingOptions.tracesSampleRate | ||
| } | ||
| options.tracing = tracingOptions | ||
| } | ||
@@ -133,3 +135,3 @@ | ||
| resolveLazyOptions(options, apiMethods, logger) | ||
| resolveTracingOptions(options.tracing, options.config) | ||
| resolveTracingOptions(options, options.config) | ||
@@ -219,3 +221,3 @@ for (const name of Object.keys(options.clientIntegrations)) { | ||
| resolveLazyOptions(options, apiMethods, logger) | ||
| resolveTracingOptions(options.tracing, options.config) | ||
| resolveTracingOptions(options, options.config) | ||
@@ -222,0 +224,0 @@ return { |
| import VueLib from 'vue' | ||
| import merge from 'lodash.mergewith' | ||
| import * as Sentry from '@sentry/browser' | ||
| <% if (options.tracing) { %>import { Integrations as TracingIntegrations } from '@sentry/tracing'<% } %> | ||
| <% | ||
@@ -17,5 +18,2 @@ if (options.initialize) { | ||
| %> | ||
| <% if (options.tracing) { %> | ||
| import { Integrations as TracingIntegrations } from '@sentry/tracing' | ||
| <% } %> | ||
@@ -58,3 +56,3 @@ // eslint-disable-next-line require-await | ||
| <% if (options.tracing) { %> | ||
| config.integrations.push(<%= `new TracingIntegrations.BrowserTracing(${serialize(options.tracing.browserOptions)})` %>) | ||
| config.integrations.push(<%= `new TracingIntegrations.BrowserTracing(${Object.keys(options.tracing.browserOptions).length ? serialize(options.tracing.browserOptions) : ''})` %>) | ||
| <% } %> | ||
@@ -61,0 +59,0 @@ <% if (options.customClientIntegrations) { %> |
+2
-2
| { | ||
| "name": "@nuxtjs/sentry", | ||
| "version": "6.0.1", | ||
| "version": "6.0.2", | ||
| "description": "Sentry module for Nuxt.js", | ||
@@ -25,3 +25,3 @@ "repository": "nuxt-community/sentry-module", | ||
| "scripts": { | ||
| "dev:fixture": "node ./node_modules/nuxt/bin/nuxt.js -c ./test/fixture/lazy/nuxt.config.js", | ||
| "dev:fixture": "node ./node_modules/nuxt/bin/nuxt.js -c ./test/fixture/default/nuxt.config.js", | ||
| "dev:fixture:build": "node ./node_modules/nuxt/bin/nuxt.js build -c ./test/fixture/default/nuxt.config.js", | ||
@@ -28,0 +28,0 @@ "dev:fixture:start": "node ./node_modules/nuxt/bin/nuxt.js start -c ./test/fixture/default/nuxt.config.js", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 10 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 10 instances in 1 package
41281
0.26%