🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

@nuxtjs/sentry

Package Overview
Dependencies
Maintainers
9
Versions
123
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxtjs/sentry - npm Package Compare versions

Comparing version
8.0.6
to
8.0.7-beta.0
+69
-13
dist/module.d.mts

@@ -1,21 +0,77 @@

import { Configuration } from 'webpack';
import { Options as Options$1, IntegrationClass } from '@sentry/types';
import * as PluggableIntegrations from '@sentry/integrations';
import { Integrations, Replay, BrowserTracing, vueRouterInstrumentation } from '@sentry/vue';
import { IntegrationFn, IntegrationClass, Integration, Options as Options$1 } from '@sentry/types';
import { browserTracingIntegration, vueRouterInstrumentation } from '@sentry/vue';
import { Options, TracingOptions } from '@sentry/vue/types/types';
import { SentryWebpackPluginOptions } from '@sentry/webpack-plugin';
import * as SentryNode from '@sentry/node';
import { NodeOptions, Handlers, Integrations as Integrations$1 } from '@sentry/node';
import { Integrations, NodeOptions, Handlers } from '@sentry/node';
import { Configuration } from 'webpack';
import { breadcrumbsIntegration, globalHandlersIntegration, httpContextIntegration, replayIntegration, browserApiErrorsIntegration } from '@sentry/browser';
import * as SentryTypes from '@sentry/core';
import { functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, requestDataIntegration } from '@sentry/core';
import { captureConsoleIntegration, contextLinesIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, httpClientIntegration, reportingObserverIntegration, rewriteFramesIntegration, sessionTimingIntegration } from '@sentry/integrations';
type IntegrationsConfig<T extends Record<keyof T, IntegrationClass<unknown>>> = Partial<{
[K in keyof T]: ConstructorParameters<T[K]>[0] | Record<string, never> | false
}>
type IntegrationConfig<T extends IntegrationFn> = Parameters<T>[0] | Record<string, never> | false
type ClassIntegrationConfig<T extends IntegrationClass<Integration>> = ConstructorParameters<T>[0] | Record<string, never> | false
// A replacement type since we don't want to depend on `@sentry/profiling-node`
type ProfilingIntegration = { ProfilingIntegration?: Record<string, never> | false }
type BrowserIntegrations = {
Breadcrumbs?: IntegrationConfig<typeof breadcrumbsIntegration>
GlobalHandlers?: IntegrationConfig<typeof globalHandlersIntegration>
HttpContext?: IntegrationConfig<typeof httpContextIntegration>
Replay?: IntegrationConfig<typeof replayIntegration>
TryCatch?: IntegrationConfig<typeof browserApiErrorsIntegration>
}
type ClientIntegrations = IntegrationsConfig<typeof Integrations & typeof PluggableIntegrations & { Replay: typeof Replay }>
type ServerIntegrations = IntegrationsConfig<typeof Integrations$1 & typeof PluggableIntegrations> & ProfilingIntegration
type CoreIntegrations = {
FunctionToString?: IntegrationConfig<typeof functionToStringIntegration>
InboundFilters?: IntegrationConfig<typeof inboundFiltersIntegration>
LinkedErrors?: IntegrationConfig<typeof linkedErrorsIntegration>
RequestData?: IntegrationConfig<typeof requestDataIntegration>
}
type PluggableIntegrations = {
CaptureConsole?: IntegrationConfig<typeof captureConsoleIntegration>
ContextLines?: IntegrationConfig<typeof contextLinesIntegration>
Debug?: IntegrationConfig<typeof debugIntegration>
Dedupe?: IntegrationConfig<typeof dedupeIntegration>
ExtraErrorData?: IntegrationConfig<typeof extraErrorDataIntegration>
HttpClient?: IntegrationConfig<typeof httpClientIntegration>
ReportingObserver?: IntegrationConfig<typeof reportingObserverIntegration>
RewriteFrames?: IntegrationConfig<typeof rewriteFramesIntegration>
SessionTiming?: IntegrationConfig<typeof sessionTimingIntegration>
}
type NodeProfilingIntegrations = {
ProfilingIntegration?: IntegrationConfig<IntegrationFn> // Dummy type since we don't want to depend on `@sentry/profiling-node`
}
type NodeIntegrations = {
Anr?: ClassIntegrationConfig<typeof Integrations.Anr>
Apollo?: ClassIntegrationConfig<typeof Integrations.Apollo>
Console?: ClassIntegrationConfig<typeof Integrations.Console>
Context?: ClassIntegrationConfig<typeof Integrations.Context>
ContextLines?: ClassIntegrationConfig<typeof Integrations.ContextLines>
Express?: ClassIntegrationConfig<typeof Integrations.Express>
GraphQL?: ClassIntegrationConfig<typeof Integrations.GraphQL>
Hapi?: ClassIntegrationConfig<typeof Integrations.Hapi>
Http?: ClassIntegrationConfig<typeof Integrations.Http>
LocalVariables?: ClassIntegrationConfig<typeof Integrations.LocalVariables>
Modules?: ClassIntegrationConfig<typeof Integrations.Modules>
Mongo?: ClassIntegrationConfig<typeof Integrations.Mongo>
Mysql?: ClassIntegrationConfig<typeof Integrations.Mysql>
OnUncaughtException?: ClassIntegrationConfig<typeof Integrations.OnUncaughtException>
OnUnhandledRejection?: ClassIntegrationConfig<typeof Integrations.OnUnhandledRejection>
Postgres?: ClassIntegrationConfig<typeof Integrations.Postgres>
Prisma?: ClassIntegrationConfig<typeof Integrations.Prisma>
Spotlight?: ClassIntegrationConfig<typeof Integrations.Spotlight>
Undici?: ClassIntegrationConfig<typeof Integrations.Undici>
}
type ClientCoreIntegrations = Pick<CoreIntegrations, 'FunctionToString' | 'InboundFilters' | 'LinkedErrors'>
type ClientPluggableIntegrations = PluggableIntegrations
type ClientIntegrations = ClientCoreIntegrations & ClientPluggableIntegrations & BrowserIntegrations
type ServerCoreIntegrations = CoreIntegrations
type ServerPluggableIntegrations = Omit<PluggableIntegrations, 'ContextLines'>
type ServerIntegrations = ServerCoreIntegrations & ServerPluggableIntegrations & NodeProfilingIntegrations & NodeIntegrations
interface LazyConfiguration {

@@ -31,3 +87,3 @@ chunkName?: string

interface TracingConfiguration extends Pick<Options$1, 'tracesSampleRate'> {
browserTracing?: Partial<BrowserTracing['options']>
browserTracing?: Parameters<typeof browserTracingIntegration>[0]
vueOptions?: Partial<TracingOptions>

@@ -34,0 +90,0 @@ vueRouterInstrumentationOptions?: Parameters<typeof vueRouterInstrumentation>[1]

@@ -1,21 +0,77 @@

import { Configuration } from 'webpack';
import { Options as Options$1, IntegrationClass } from '@sentry/types';
import * as PluggableIntegrations from '@sentry/integrations';
import { Integrations, Replay, BrowserTracing, vueRouterInstrumentation } from '@sentry/vue';
import { IntegrationFn, IntegrationClass, Integration, Options as Options$1 } from '@sentry/types';
import { browserTracingIntegration, vueRouterInstrumentation } from '@sentry/vue';
import { Options, TracingOptions } from '@sentry/vue/types/types';
import { SentryWebpackPluginOptions } from '@sentry/webpack-plugin';
import * as SentryNode from '@sentry/node';
import { NodeOptions, Handlers, Integrations as Integrations$1 } from '@sentry/node';
import { Integrations, NodeOptions, Handlers } from '@sentry/node';
import { Configuration } from 'webpack';
import { breadcrumbsIntegration, globalHandlersIntegration, httpContextIntegration, replayIntegration, browserApiErrorsIntegration } from '@sentry/browser';
import * as SentryTypes from '@sentry/core';
import { functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, requestDataIntegration } from '@sentry/core';
import { captureConsoleIntegration, contextLinesIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, httpClientIntegration, reportingObserverIntegration, rewriteFramesIntegration, sessionTimingIntegration } from '@sentry/integrations';
type IntegrationsConfig<T extends Record<keyof T, IntegrationClass<unknown>>> = Partial<{
[K in keyof T]: ConstructorParameters<T[K]>[0] | Record<string, never> | false
}>
type IntegrationConfig<T extends IntegrationFn> = Parameters<T>[0] | Record<string, never> | false
type ClassIntegrationConfig<T extends IntegrationClass<Integration>> = ConstructorParameters<T>[0] | Record<string, never> | false
// A replacement type since we don't want to depend on `@sentry/profiling-node`
type ProfilingIntegration = { ProfilingIntegration?: Record<string, never> | false }
type BrowserIntegrations = {
Breadcrumbs?: IntegrationConfig<typeof breadcrumbsIntegration>
GlobalHandlers?: IntegrationConfig<typeof globalHandlersIntegration>
HttpContext?: IntegrationConfig<typeof httpContextIntegration>
Replay?: IntegrationConfig<typeof replayIntegration>
TryCatch?: IntegrationConfig<typeof browserApiErrorsIntegration>
}
type ClientIntegrations = IntegrationsConfig<typeof Integrations & typeof PluggableIntegrations & { Replay: typeof Replay }>
type ServerIntegrations = IntegrationsConfig<typeof Integrations$1 & typeof PluggableIntegrations> & ProfilingIntegration
type CoreIntegrations = {
FunctionToString?: IntegrationConfig<typeof functionToStringIntegration>
InboundFilters?: IntegrationConfig<typeof inboundFiltersIntegration>
LinkedErrors?: IntegrationConfig<typeof linkedErrorsIntegration>
RequestData?: IntegrationConfig<typeof requestDataIntegration>
}
type PluggableIntegrations = {
CaptureConsole?: IntegrationConfig<typeof captureConsoleIntegration>
ContextLines?: IntegrationConfig<typeof contextLinesIntegration>
Debug?: IntegrationConfig<typeof debugIntegration>
Dedupe?: IntegrationConfig<typeof dedupeIntegration>
ExtraErrorData?: IntegrationConfig<typeof extraErrorDataIntegration>
HttpClient?: IntegrationConfig<typeof httpClientIntegration>
ReportingObserver?: IntegrationConfig<typeof reportingObserverIntegration>
RewriteFrames?: IntegrationConfig<typeof rewriteFramesIntegration>
SessionTiming?: IntegrationConfig<typeof sessionTimingIntegration>
}
type NodeProfilingIntegrations = {
ProfilingIntegration?: IntegrationConfig<IntegrationFn> // Dummy type since we don't want to depend on `@sentry/profiling-node`
}
type NodeIntegrations = {
Anr?: ClassIntegrationConfig<typeof Integrations.Anr>
Apollo?: ClassIntegrationConfig<typeof Integrations.Apollo>
Console?: ClassIntegrationConfig<typeof Integrations.Console>
Context?: ClassIntegrationConfig<typeof Integrations.Context>
ContextLines?: ClassIntegrationConfig<typeof Integrations.ContextLines>
Express?: ClassIntegrationConfig<typeof Integrations.Express>
GraphQL?: ClassIntegrationConfig<typeof Integrations.GraphQL>
Hapi?: ClassIntegrationConfig<typeof Integrations.Hapi>
Http?: ClassIntegrationConfig<typeof Integrations.Http>
LocalVariables?: ClassIntegrationConfig<typeof Integrations.LocalVariables>
Modules?: ClassIntegrationConfig<typeof Integrations.Modules>
Mongo?: ClassIntegrationConfig<typeof Integrations.Mongo>
Mysql?: ClassIntegrationConfig<typeof Integrations.Mysql>
OnUncaughtException?: ClassIntegrationConfig<typeof Integrations.OnUncaughtException>
OnUnhandledRejection?: ClassIntegrationConfig<typeof Integrations.OnUnhandledRejection>
Postgres?: ClassIntegrationConfig<typeof Integrations.Postgres>
Prisma?: ClassIntegrationConfig<typeof Integrations.Prisma>
Spotlight?: ClassIntegrationConfig<typeof Integrations.Spotlight>
Undici?: ClassIntegrationConfig<typeof Integrations.Undici>
}
type ClientCoreIntegrations = Pick<CoreIntegrations, 'FunctionToString' | 'InboundFilters' | 'LinkedErrors'>
type ClientPluggableIntegrations = PluggableIntegrations
type ClientIntegrations = ClientCoreIntegrations & ClientPluggableIntegrations & BrowserIntegrations
type ServerCoreIntegrations = CoreIntegrations
type ServerPluggableIntegrations = Omit<PluggableIntegrations, 'ContextLines'>
type ServerIntegrations = ServerCoreIntegrations & ServerPluggableIntegrations & NodeProfilingIntegrations & NodeIntegrations
interface LazyConfiguration {

@@ -31,3 +87,3 @@ chunkName?: string

interface TracingConfiguration extends Pick<Options$1, 'tracesSampleRate'> {
browserTracing?: Partial<BrowserTracing['options']>
browserTracing?: Parameters<typeof browserTracingIntegration>[0]
vueOptions?: Partial<TracingOptions>

@@ -34,0 +90,0 @@ vueRouterInstrumentationOptions?: Parameters<typeof vueRouterInstrumentation>[1]

+1
-1
{
"name": "@nuxtjs/sentry",
"configKey": "sentry",
"version": "8.0.6"
"version": "8.0.7-beta.0"
}

@@ -14,2 +14,3 @@ import { fileURLToPath } from 'node:url';

import initJiti from 'jiti';
import * as SentryCore from '@sentry/core';
import * as PluggableIntegrations from '@sentry/integrations';

@@ -211,7 +212,110 @@

const jiti = initJiti(fileURLToPath(import.meta.url));
const BROWSER_INTEGRATIONS = ["Breadcrumbs", "Dedupe", "FunctionToString", "GlobalHandlers", "HttpContext", "InboundFilters", "LinkedErrors", "TryCatch"];
const BROWSER_PLUGGABLE_INTEGRATIONS = ["CaptureConsole", "ContextLines", "Debug", "ExtraErrorData", "HttpClient", "ReportingObserver", "RewriteFrames"];
const BROWSER_VUE_INTEGRATIONS = ["Replay"];
const SERVER_INTEGRATIONS = ["Console", "ContextLines", "FunctionToString", "Http", "InboundFilters", "LinkedErrors", "LocalVariables", "Modules", "OnUncaughtException", "OnUnhandledRejection", "RequestData"];
const SERVER_PLUGGABLE_INTEGRATIONS = ["CaptureConsole", "Debug", "Dedupe", "ExtraErrorData", "RewriteFrames", "Transaction"];
const BROWSER_CORE_INTEGRATIONS = {
FunctionToString: true,
InboundFilters: true,
LinkedErrors: true
};
const BROWSER_INTEGRATIONS = {
Breadcrumbs: true,
GlobalHandlers: true,
HttpContext: true,
Replay: true,
TryCatch: true
};
const BROWSER_PLUGGABLE_INTEGRATIONS = {
CaptureConsole: true,
ContextLines: true,
Debug: true,
Dedupe: true,
ExtraErrorData: true,
HttpClient: true,
ReportingObserver: true,
RewriteFrames: true,
SessionTiming: true
};
const SERVER_CORE_INTEGRATIONS = {
FunctionToString: true,
InboundFilters: true,
LinkedErrors: true,
RequestData: true
};
const SERVER_NODE_INTEGRATIONS = {
Anr: true,
Apollo: true,
Console: true,
Context: true,
ContextLines: true,
Express: true,
GraphQL: true,
Hapi: true,
Http: true,
LocalVariables: true,
Modules: true,
Mongo: true,
Mysql: true,
OnUncaughtException: true,
OnUnhandledRejection: true,
Postgres: true,
Prisma: true,
Spotlight: true,
Undici: true
};
const SERVER_PLUGGABLE_INTEGRATIONS = {
CaptureConsole: true,
Debug: true,
Dedupe: true,
ExtraErrorData: true,
HttpClient: true,
ReportingObserver: true,
RewriteFrames: true,
SessionTiming: true
};
const INTEGRATION_TO_IMPORT_NAME_MAP = {
Anr: "Anr",
Apollo: "Apollo",
Breadcrumbs: "breadcrumbsIntegration",
CaptureConsole: "captureConsoleIntegration",
Console: "Console",
Context: "Context",
ContextLines: "contextLinesIntegration",
Debug: "debugIntegration",
Dedupe: "dedupeIntegration",
Express: "Express",
ExtraErrorData: "extraErrorDataIntegration",
FunctionToString: "functionToStringIntegration",
GlobalHandlers: "globalHandlersIntegration",
GraphQL: "GraphQL",
Hapi: "Hapi",
Http: "Http",
HttpClient: "httpClientIntegration",
HttpContext: "httpContextIntegration",
InboundFilters: "inboundFiltersIntegration",
LinkedErrors: "linkedErrorsIntegration",
LocalVariables: "LocalVariables",
Modules: "Modules",
Mongo: "Mongo",
Mysql: "Mysql",
OnUncaughtException: "OnUncaughtException",
OnUnhandledRejection: "OnUnhandledRejection",
Postgres: "Postgres",
Prisma: "Prisma",
ProfilingIntegration: "ProfilingIntegration",
Replay: "replayIntegration",
ReportingObserver: "reportingObserverIntegration",
RequestData: "requestDataIntegration",
RewriteFrames: "rewriteFramesIntegration",
SessionTiming: "sessionTimingIntegration",
Spotlight: "Spotlight",
TryCatch: "browserApiErrorsIntegration",
Undici: "Undici"
};
function mapClientIntegrationToImportName(key) {
return INTEGRATION_TO_IMPORT_NAME_MAP[key];
}
function mapServerIntegrationToImportName(key) {
if (key === "ContextLines") {
return "ContextLines";
}
return INTEGRATION_TO_IMPORT_NAME_MAP[key];
}
const SERVER_PROFILING_INTEGRATION = "ProfilingIntegration";

@@ -227,16 +331,19 @@ function getEnabledIntegrations(integrations) {

}
function isBrowserCoreIntegration(name) {
return name in BROWSER_CORE_INTEGRATIONS;
}
function isBrowserDefaultIntegration(name) {
return BROWSER_INTEGRATIONS.includes(name);
return name in BROWSER_INTEGRATIONS;
}
function isBrowserPluggableIntegration(name) {
return BROWSER_PLUGGABLE_INTEGRATIONS.includes(name);
return name in BROWSER_PLUGGABLE_INTEGRATIONS;
}
function isBrowserVueIntegration(name) {
return BROWSER_VUE_INTEGRATIONS.includes(name);
function isServerCoreIntegration(name) {
return name in SERVER_CORE_INTEGRATIONS;
}
function isServerDefaultIntegration(name) {
return SERVER_INTEGRATIONS.includes(name);
function isServerNodeIntegration(name) {
return name in SERVER_NODE_INTEGRATIONS;
}
function isServerPlugabbleIntegration(name) {
return SERVER_PLUGGABLE_INTEGRATIONS.includes(name);
return name in SERVER_PLUGGABLE_INTEGRATIONS;
}

@@ -332,3 +439,3 @@ async function getApiMethods(packageName) {

for (const name of getIntegrationsKeys(options.clientIntegrations)) {
if (!isBrowserDefaultIntegration(name) && !isBrowserPluggableIntegration(name) && !isBrowserVueIntegration(name)) {
if (!isBrowserDefaultIntegration(name) && !isBrowserCoreIntegration(name) && !isBrowserPluggableIntegration(name)) {
logger.warn(`Sentry clientIntegration "${name}" is not recognized and will be ignored.`);

@@ -347,6 +454,24 @@ delete options.clientIntegrations[name];

}
const importsBrowser = [];
const importsCore = [];
const importsPluggable = [];
const integrations = getEnabledIntegrations(options.clientIntegrations).reduce((res, key) => {
const importName = mapClientIntegrationToImportName(key);
if (key in BROWSER_INTEGRATIONS) {
importsBrowser.push(importName);
} else if (key in BROWSER_CORE_INTEGRATIONS) {
importsCore.push(importName);
} else if (key in BROWSER_PLUGGABLE_INTEGRATIONS) {
importsPluggable.push(importName);
}
res[importName] = options.clientIntegrations[key];
return res;
}, {});
const imports = {
"~@sentry/browser": importsBrowser,
"~@sentry/core": importsCore,
"~@sentry/integrations": importsPluggable,
"~@sentry/vue": ["init", ...options.tracing ? ["browserTracingIntegration"] : []]
};
return {
BROWSER_INTEGRATIONS,
BROWSER_PLUGGABLE_INTEGRATIONS,
BROWSER_VUE_INTEGRATIONS,
dev: nuxt.options.dev,

@@ -366,7 +491,5 @@ runtimeConfigKey: options.runtimeConfigKey,

tracing: options.tracing,
imports,
initialize: canInitialize(options),
integrations: getEnabledIntegrations(options.clientIntegrations).reduce((res, key) => {
res[key] = options.clientIntegrations[key];
return res;
}, {})
integrations
};

@@ -392,3 +515,3 @@ }

for (const name of getIntegrationsKeys(options.serverIntegrations)) {
if (!isServerDefaultIntegration(name) && !isServerPlugabbleIntegration(name) && name !== SERVER_PROFILING_INTEGRATION) {
if (!isServerNodeIntegration(name) && !isServerCoreIntegration(name) && !isServerPlugabbleIntegration(name) && name !== SERVER_PROFILING_INTEGRATION) {
logger.warn(`Sentry serverIntegration "${name}" is not recognized and will be ignored.`);

@@ -429,8 +552,11 @@ delete options.serverIntegrations[name];

...getEnabledIntegrations(options.serverIntegrations).map((name) => {
const importName = mapServerIntegrationToImportName(name);
const opt = options.serverIntegrations[name];
try {
if (isServerDefaultIntegration(name)) {
if (isServerCoreIntegration(name)) {
return Object.keys(opt).length ? SentryCore[importName](opt) : SentryCore[importName]();
} else if (isServerNodeIntegration(name)) {
return Object.keys(opt).length ? new Integrations[name](opt) : new Integrations[name]();
} else if (isServerPlugabbleIntegration(name)) {
return Object.keys(opt).length ? new PluggableIntegrations[name](opt) : new PluggableIntegrations[name]();
return Object.keys(opt).length ? PluggableIntegrations[importName](opt) : PluggableIntegrations[importName]();
} else {

@@ -605,4 +731,3 @@ throw new Error(`Unsupported server integration "${name}"`);

ExtraErrorData: {},
RewriteFrames: { root: nuxt.options.rootDir },
Transaction: {}
RewriteFrames: { root: nuxt.options.rootDir }
},

@@ -647,2 +772,3 @@ customClientIntegrations: "",

"lodash.mergewith",
"@sentry/browser",
"@sentry/core",

@@ -656,3 +782,2 @@ "@sentry/integrations",

}
nuxt.options.alias["~@sentry/browser-sdk"] = await resolvePath("@sentry/browser/esm/sdk", { url: moduleDir });
if (serverSentryEnabled(options)) {

@@ -659,0 +784,0 @@ const sentryHandlerProxy = {

@@ -0,2 +1,11 @@

import merge from '~lodash.mergewith'
import * as CoreSdk from '~@sentry/core'
import { captureUserFeedback, forceLoad, onLoad, showReportDialog, wrap } from '~@sentry/browser'
<%
for (const [package, imports] of Object.entries(options.imports)) {
if (imports.length) {
%>import { <%= imports.join(', ') %> } from '<%= package %>'
<%
}
}
if (options.clientConfigPath) {%>import getClientConfig from '<%= options.clientConfigPath %>'

@@ -6,27 +15,16 @@ <%}

<%}%>
import merge from '~lodash.mergewith'
<%
const browserIntegrations = options.BROWSER_INTEGRATIONS.filter(key => key in options.integrations)
const browserVueIntegrations = options.BROWSER_VUE_INTEGRATIONS.filter(key => key in options.integrations)
const vueImports = [
'init',
...(browserIntegrations.length ? ['Integrations'] : []),
...browserVueIntegrations,
...(options.tracing ? ['vueRouterInstrumentation', 'BrowserTracing'] : [])
]
%>import { <%= vueImports.join(', ') %> } from '~@sentry/vue'
import * as CoreSdk from '~@sentry/core'
import * as BrowserSdk from '~@sentry/browser-sdk'
<%
let integrations = options.BROWSER_PLUGGABLE_INTEGRATIONS.filter(key => key in options.integrations)
if (integrations.length) {%>import { <%= integrations.join(', ') %> } from '~@sentry/integrations'
<%}%>
export { init }
export const SentrySdk = { ...CoreSdk, ...BrowserSdk }
export const SentrySdk = { ...CoreSdk, ...{ captureUserFeedback, forceLoad, onLoad, showReportDialog, wrap } }
/* eslint-disable object-curly-spacing, quote-props, quotes, key-spacing, comma-spacing */
/** @type {string[]} */
const DISABLED_INTEGRATION_KEYS = <%= serialize(options.DISABLED_INTEGRATION_KEYS) %>
/**
* @typedef {Parameters<typeof init>[0]} InitConfig
* @param {import('@nuxt/types').Context} ctx
* @return {Promise<InitConfig>}
*/
export<%= (options.clientConfigPath || options.customClientIntegrations) ? ' async' : '' %> function getConfig (ctx) {
/** @type {InitConfig} */
const config = {

@@ -42,5 +40,3 @@ <%= Object

<% if (browserIntegrations.length) {%>
const { <%= browserIntegrations.join(', ') %> } = Integrations
<%}%>
/** @type {NonNullable<InitConfig>['integrations']} */
const resolvedIntegrations = [

@@ -58,13 +54,16 @@ <%= Object

return `new ${name}(${integrationOptions.length ? '{ ' + integrationOptions.join(',') + ' }' : ''})`
return `${name}(${integrationOptions.length ? '{ ' + integrationOptions.join(',') + ' }' : ''})`
})
.join(',\n ') %>,
]
<% if (options.tracing) { %>
const { browserTracing, vueOptions, vueRouterInstrumentationOptions, ...tracingOptions } = <%= serialize(options.tracing) %>
resolvedIntegrations.push(new BrowserTracing({
...(ctx.app.router ? { routingInstrumentation: vueRouterInstrumentation(ctx.app.router, vueRouterInstrumentationOptions) } : {}),
...browserTracing,
<%
if (options.tracing) {
const { browserTracing, vueOptions, vueRouterInstrumentationOptions, ...tracingOptions } = options.tracing
%>
resolvedIntegrations.push(browserTracingIntegration({
router: ctx.app.router,
...<%= serialize(vueRouterInstrumentationOptions) %>,
...<%= serialize(browserTracing) %>,
}))
merge(config, vueOptions, tracingOptions)
merge(config, <%= serialize(vueOptions) %>, <%= serialize(tracingOptions) %>)
<% } %>

@@ -71,0 +70,0 @@

import Vue from 'vue'
import { getConfig, init, SentrySdk } from './sentry.client.shared'
/** @type {import('@nuxt/types').Plugin} */
export default async function (ctx, inject) {

@@ -5,0 +6,0 @@ const config = await getConfig(ctx)

import Vue from 'vue'
<% if (options.lazy.injectMock) { %>
/* eslint-disable-next-line quotes, comma-spacing */
const API_METHODS = <%= JSON.stringify(options.lazy.mockApiMethods)%>

@@ -6,0 +5,0 @@ let delayedCalls = []

<% if (options.tracing) { %>
import { getActiveSpan, getDynamicSamplingContextFromSpan, spanToTraceHeader } from '~@sentry/core'
import { dynamicSamplingContextToSentryBaggageHeader } from '~@sentry/utils'
<% } %>
/** @type {import('@nuxt/types').Module} */
/** @type {import('@nuxt/types').Plugin} */
export default function (ctx, inject) {

@@ -24,2 +25,3 @@ const sentry = process.sentry || null

<% if (options.tracing) { %>
/** @param {import('@nuxt/types').Context} ctx */
function connectBackendTraces (ctx) {

@@ -31,15 +33,16 @@ const { head } = ctx.app

}
const scope = ctx.$sentry.getCurrentHub().getScope()
const span = scope.getSpan()
const transaction = scope.getTransaction()
if (!span || !transaction) {
const span = getActiveSpan()
if (!span) {
return
}
head.meta = head.meta || []
head.meta.push({ hid: 'sentry-trace', name: 'sentry-trace', content: span.toTraceparent() })
const dsc = transaction.getDynamicSamplingContext()
head.meta.push({ hid: 'sentry-trace', name: 'sentry-trace', content: spanToTraceHeader(span) })
const dsc = getDynamicSamplingContextFromSpan(span)
if (dsc) {
head.meta.push({ hid: 'sentry-baggage', name: 'baggage', content: dynamicSamplingContextToSentryBaggageHeader(dsc) })
const baggage = dynamicSamplingContextToSentryBaggageHeader(dsc)
if (baggage) {
head.meta.push({ hid: 'sentry-baggage', name: 'baggage', content: baggage })
}
}
}
<% } %>
import type { ModuleOptions, ModulePublicRuntimeConfig } from './module'
import type { ModuleOptions, ModulePublicRuntimeConfig } from './module.js'

@@ -18,2 +18,2 @@

export type { ModuleOptions, ModulePublicRuntimeConfig, default } from './module'
export type { ModuleOptions, ModulePublicRuntimeConfig, default } from './module.js'
{
"name": "@nuxtjs/sentry",
"version": "8.0.6",
"version": "8.0.7-beta.0",
"description": "Sentry module for Nuxt.js",

@@ -45,5 +45,5 @@ "repository": "nuxt-community/sentry-module",

"release": "release-it",
"test": "yarn prepack && vitest run --single-thread && yarn lint:fixture && yarn typecheck",
"test": "yarn prepack && vitest run --poolOptions.threads.singleThread && yarn lint:fixture && yarn typecheck",
"test:watch": "vitest",
"typecheck": "yarn dev:prepare && tsc",
"typecheck": "yarn dev:prepare && tsc && tsc -p ./test/tsconfig.json",
"coverage": "codecov"

@@ -63,50 +63,50 @@ },

"dependencies": {
"@sentry/core": "^7.81.1",
"@sentry/integrations": "^7.81.1",
"@sentry/node": "^7.81.1",
"@sentry/utils": "^7.81.1",
"@sentry/vue": "^7.81.1",
"@sentry/core": "^7.100.0",
"@sentry/integrations": "^7.100.0",
"@sentry/node": "^7.100.0",
"@sentry/utils": "^7.100.0",
"@sentry/vue": "^7.100.0",
"consola": "^3.2.3",
"defu": "^6.1.2",
"defu": "^6.1.4",
"hash-sum": "^2.0.0",
"jiti": "^1.20.0",
"jiti": "^1.21.0",
"lodash.mergewith": "^4.6.2",
"mlly": "^1.4.2",
"pathe": "^1.1.1"
"mlly": "^1.5.0",
"pathe": "^1.1.2"
},
"devDependencies": {
"@nuxt/module-builder": "0.5.4",
"@nuxt/types": "2.17.2",
"@nuxt/typescript-build": "^3.0.1",
"@nuxt/module-builder": "0.5.5",
"@nuxt/types": "2.17.3",
"@nuxt/typescript-build": "^3.0.2",
"@nuxtjs/eslint-config-typescript": "12.1.0",
"@nuxtjs/module-test-utils": "1.6.3",
"@release-it/conventional-changelog": "8.0.1",
"@sentry/profiling-node": "1.2.6",
"@sentry/webpack-plugin": "2.10.1",
"@size-limit/file": "11.0.0",
"@sentry/profiling-node": "7.100.0",
"@sentry/webpack-plugin": "2.14.0",
"@size-limit/file": "11.0.2",
"@types/hash-sum": "1.0.2",
"@types/lodash.mergewith": "4.6.9",
"@types/node": "18.18.13",
"@types/node": "18.19.14",
"@types/request-promise-native": "1.0.21",
"codecov": "3.8.3",
"eslint": "8.54.0",
"eslint": "8.56.0",
"hookable": "5.5.3",
"husky": "4.3.8",
"lint-staged": "15.1.0",
"npm-run-all": "4.1.5",
"nuxt": "2.17.2",
"playwright-chromium": "1.40.0",
"release-it": "17.0.0",
"sass": "1.69.5",
"lint-staged": "15.2.2",
"npm-run-all2": "6.1.2",
"nuxt": "2.17.3",
"playwright-chromium": "1.41.2",
"release-it": "17.0.3",
"sass": "1.70.0",
"sentry-testkit": "5.0.8",
"size-limit": "11.0.0",
"typescript": "5.3.2",
"vitest": "0.34.6",
"vue": "2.7.15",
"size-limit": "11.0.2",
"typescript": "5.3.3",
"vitest": "1.2.2",
"vue": "2.7.16",
"vuex": "3.6.2"
},
"resolutions": {
"vite": "^4.5.0",
"vite": "^5.1.0-beta.6",
"watchpack": "^2.0.0"
}
}