Files
klz-cables.com/.pnpm-store/v10/files/5f/8010bc1a2e92ca6416a363449d957d0b9b894aeb8deffe657ee597e907a9bab1601d49d1c797c946e615af44ba78c35bb7ae84a06dcf180d0e4191013508f0
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

26 lines
1.1 KiB
Plaintext

import { defineIntegration, escapeStringForRegex, rewriteFramesIntegration } from '@sentry/core';
const distDirRewriteFramesIntegration = defineIntegration(({ distDirName }) => {
const distDirAbsPath = distDirName.replace(/(\/|\\)$/, ''); // We strip trailing slashes because "app:///_next" also doesn't have one
// Normally we would use `path.resolve` to obtain the absolute path we will strip from the stack frame to align with
// the uploaded artifacts, however we don't have access to that API in edge so we need to be a bit more lax.
// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor -- user input is escaped
const SOURCEMAP_FILENAME_REGEX = new RegExp(`.*${escapeStringForRegex(distDirAbsPath)}`);
const rewriteFramesIntegrationInstance = rewriteFramesIntegration({
iteratee: frame => {
frame.filename = frame.filename?.replace(SOURCEMAP_FILENAME_REGEX, 'app:///_next');
return frame;
},
});
return {
...rewriteFramesIntegrationInstance,
name: 'DistDirRewriteFrames',
};
});
export { distDirRewriteFramesIntegration };
//# sourceMappingURL=distDirRewriteFramesIntegration.js.map