Files
klz-cables.com/.pnpm-store/v10/files/8c/922f7785d50b3b9053e463838aa173c19829ab9f675aebfafac84d917995216cfbe92d5f9f06359c84c19fa6e8bc55f3967598003a4459d76081260b8a225f
Marc Mintel 5397309103
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
fix(products): fix breadcrumbs and product filtering (backport from main)
2026-02-24 16:04:21 +01:00

1 line
9.7 KiB
Plaintext

{"version":3,"file":"index.js","sources":["../../../src/client/index.ts"],"sourcesContent":["// import/export got a false positive, and affects most of our index barrel files\n// can be removed once following issue is fixed: https://github.com/import-js/eslint-plugin-import/issues/703\n/* eslint-disable import/export */\nimport type { Client, EventProcessor, Integration } from '@sentry/core';\nimport { addEventProcessor, applySdkMetadata, consoleSandbox, getGlobalScope, GLOBAL_OBJ } from '@sentry/core';\nimport type { BrowserOptions } from '@sentry/react';\nimport { getDefaultIntegrations as getReactDefaultIntegrations, init as reactInit } from '@sentry/react';\nimport { DEBUG_BUILD } from '../common/debug-build';\nimport { devErrorSymbolicationEventProcessor } from '../common/devErrorSymbolicationEventProcessor';\nimport { getVercelEnv } from '../common/getVercelEnv';\nimport { isRedirectNavigationError } from '../common/nextNavigationErrorUtils';\nimport { browserTracingIntegration } from './browserTracingIntegration';\nimport { nextjsClientStackFrameNormalizationIntegration } from './clientNormalizationIntegration';\nimport { INCOMPLETE_APP_ROUTER_INSTRUMENTATION_TRANSACTION_NAME } from './routing/appRouterRoutingInstrumentation';\nimport { removeIsrSsgTraceMetaTags } from './routing/isrRoutingTracing';\nimport { applyTunnelRouteOption } from './tunnelRoute';\n\nexport * from '@sentry/react';\nexport * from '../common';\nexport { captureUnderscoreErrorException } from '../common/pages-router-instrumentation/_error';\n\n// Override core span methods with Next.js-specific implementations that support Cache Components\nexport { startSpan, startSpanManual, startInactiveSpan } from '../common/utils/nextSpan';\nexport { browserTracingIntegration } from './browserTracingIntegration';\nexport { captureRouterTransitionStart } from './routing/appRouterRoutingInstrumentation';\n\nlet clientIsInitialized = false;\n\nconst globalWithInjectedValues = GLOBAL_OBJ as typeof GLOBAL_OBJ & {\n _sentryRewriteFramesAssetPrefixPath: string;\n _sentryAssetPrefix?: string;\n _sentryBasePath?: string;\n _sentryRelease?: string;\n _experimentalThirdPartyOriginStackFrames?: string;\n};\n\n// Treeshakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\n/** Inits the Sentry NextJS SDK on the browser with the React SDK. */\nexport function init(options: BrowserOptions): Client | undefined {\n if (clientIsInitialized) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/nextjs] You are calling `Sentry.init()` more than once on the client. This can happen if you have both a `sentry.client.config.ts` and a `instrumentation-client.ts` file with `Sentry.init()` calls. It is recommended to call `Sentry.init()` once in `instrumentation-client.ts`.',\n );\n });\n }\n clientIsInitialized = true;\n\n if (!DEBUG_BUILD && options.debug) {\n consoleSandbox(() => {\n // eslint-disable-next-line no-console\n console.warn(\n '[@sentry/nextjs] You have enabled `debug: true`, but Sentry debug logging was removed from your bundle (likely via `withSentryConfig({ disableLogger: true })` / `webpack.treeshake.removeDebugLogging: true`). Set that option to `false` to see Sentry debug output.',\n );\n });\n }\n\n // Remove cached trace meta tags for ISR/SSG pages before initializing\n // This prevents the browser tracing integration from using stale trace IDs\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n removeIsrSsgTraceMetaTags();\n }\n\n const opts = {\n environment: getVercelEnv(true) || process.env.NODE_ENV,\n defaultIntegrations: getDefaultIntegrations(options),\n release: process.env._sentryRelease || globalWithInjectedValues._sentryRelease,\n ...options,\n } satisfies BrowserOptions;\n\n applyTunnelRouteOption(opts);\n applySdkMetadata(opts, 'nextjs', ['nextjs', 'react']);\n\n const client = reactInit(opts);\n\n const filterTransactions: EventProcessor = event =>\n event.type === 'transaction' && event.transaction === '/404' ? null : event;\n filterTransactions.id = 'NextClient404Filter';\n addEventProcessor(filterTransactions);\n\n const filterIncompleteNavigationTransactions: EventProcessor = event =>\n event.type === 'transaction' && event.transaction === INCOMPLETE_APP_ROUTER_INSTRUMENTATION_TRANSACTION_NAME\n ? null\n : event;\n filterIncompleteNavigationTransactions.id = 'IncompleteTransactionFilter';\n addEventProcessor(filterIncompleteNavigationTransactions);\n\n const filterNextRedirectError: EventProcessor = (event, hint) =>\n isRedirectNavigationError(hint?.originalException) || event.exception?.values?.[0]?.value === 'NEXT_REDIRECT'\n ? null\n : event;\n filterNextRedirectError.id = 'NextRedirectErrorFilter';\n addEventProcessor(filterNextRedirectError);\n\n if (process.env.NODE_ENV === 'development') {\n addEventProcessor(devErrorSymbolicationEventProcessor);\n }\n\n try {\n // @ts-expect-error `process.turbopack` is a magic string that will be replaced by Next.js\n if (process.turbopack) {\n getGlobalScope().setTag('turbopack', true);\n }\n } catch {\n // Noop\n // The statement above can throw because process is not defined on the client\n }\n\n return client;\n}\n\nfunction getDefaultIntegrations(options: BrowserOptions): Integration[] {\n const customDefaultIntegrations = getReactDefaultIntegrations(options);\n // This evaluates to true unless __SENTRY_TRACING__ is text-replaced with \"false\",\n // in which case everything inside will get tree-shaken away\n if (typeof __SENTRY_TRACING__ === 'undefined' || __SENTRY_TRACING__) {\n customDefaultIntegrations.push(browserTracingIntegration());\n }\n\n // These values are injected at build time, based on the output directory specified in the build config. Though a default\n // is set there, we set it here as well, just in case something has gone wrong with the injection.\n const rewriteFramesAssetPrefixPath =\n process.env._sentryRewriteFramesAssetPrefixPath ||\n globalWithInjectedValues._sentryRewriteFramesAssetPrefixPath ||\n '';\n const assetPrefix = process.env._sentryAssetPrefix || globalWithInjectedValues._sentryAssetPrefix;\n const basePath = process.env._sentryBasePath || globalWithInjectedValues._sentryBasePath;\n const experimentalThirdPartyOriginStackFrames =\n process.env._experimentalThirdPartyOriginStackFrames === 'true' ||\n globalWithInjectedValues._experimentalThirdPartyOriginStackFrames === 'true';\n customDefaultIntegrations.push(\n nextjsClientStackFrameNormalizationIntegration({\n assetPrefix,\n basePath,\n rewriteFramesAssetPrefixPath,\n experimentalThirdPartyOriginStackFrames,\n }),\n );\n\n return customDefaultIntegrations;\n}\n\n/**\n * Just a passthrough in case this is imported from the client.\n */\nexport function withSentryConfig<T>(exportedUserNextConfig: T): T {\n return exportedUserNextConfig;\n}\n"],"names":["reactInit","getReactDefaultIntegrations"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,IAAI,mBAAA,GAAsB,KAAK;;AAE/B,MAAM,wBAAA,GAA2B;;AAMjC;;AAEA;;AAGA;AACO,SAAS,IAAI,CAAC,OAAO,EAAsC;AAClE,EAAE,IAAI,mBAAmB,EAAE;AAC3B,IAAI,cAAc,CAAC,MAAM;AACzB;AACA,MAAM,OAAO,CAAC,IAAI;AAClB,QAAQ,+RAA+R;AACvS,OAAO;AACP,IAAI,CAAC,CAAC;AACN,EAAE;AACF,EAAE,mBAAA,GAAsB,IAAI;;AAE5B,EAAE,IAAI,CAAC,WAAA,IAAe,OAAO,CAAC,KAAK,EAAE;AACrC,IAAI,cAAc,CAAC,MAAM;AACzB;AACA,MAAM,OAAO,CAAC,IAAI;AAClB,QAAQ,wQAAwQ;AAChR,OAAO;AACP,IAAI,CAAC,CAAC;AACN,EAAE;;AAEF;AACA;AACA,EAAE,IAAI,OAAO,kBAAA,KAAuB,WAAA,IAAe,kBAAkB,EAAE;AACvE,IAAI,yBAAyB,EAAE;AAC/B,EAAE;;AAEF,EAAE,MAAM,OAAO;AACf,IAAI,WAAW,EAAE,YAAY,CAAC,IAAI,CAAA,IAAK,OAAO,CAAC,GAAG,CAAC,QAAQ;AAC3D,IAAI,mBAAmB,EAAE,sBAAsB,CAAC,OAAO,CAAC;AAC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