Files
klz-cables.com/.pnpm-store/v10/files/ac/37402ed17e2bf396b37bcc46e552d56cf3f8d4cb89a003392125acc7dbea9e99c8607769b31e42c0638250b4bec5d6aaa93d503d596fbc280bc08aff6039bf
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

38 lines
1.4 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const debugBuild = require('../common/debug-build.js');
const globalWithInjectedValues = core.GLOBAL_OBJ
;
/**
* Applies the `tunnel` option to the Next.js SDK options based on `withSentryConfig`'s `tunnelRoute` option.
*/
function applyTunnelRouteOption(options) {
const tunnelRouteOption = process.env._sentryRewritesTunnelPath || globalWithInjectedValues._sentryRewritesTunnelPath;
if (tunnelRouteOption && options.dsn) {
const dsnComponents = core.dsnFromString(options.dsn);
if (!dsnComponents) {
return;
}
const sentrySaasDsnMatch = dsnComponents.host.match(/^o(\d+)\.ingest(?:\.([a-z]{2}))?\.sentry\.io$/);
if (sentrySaasDsnMatch) {
const orgId = sentrySaasDsnMatch[1];
const regionCode = sentrySaasDsnMatch[2];
let tunnelPath = `${tunnelRouteOption}?o=${orgId}&p=${dsnComponents.projectId}`;
if (regionCode) {
tunnelPath += `&r=${regionCode}`;
}
options.tunnel = tunnelPath;
debugBuild.DEBUG_BUILD && core.debug.log(`Tunneling events to "${tunnelPath}"`);
} else {
debugBuild.DEBUG_BUILD && core.debug.warn('Provided DSN is not a Sentry SaaS DSN. Will not tunnel events.');
}
}
}
exports.applyTunnelRouteOption = applyTunnelRouteOption;
//# sourceMappingURL=tunnelRoute.js.map