Files
klz-cables.com/.pnpm-store/v10/files/f1/9b89017b45c4466192cefd5c60abbafb8b1e6247c88802654f6fe7c61c8594b1f7f0ddc6e4dd35858826cc83cd6ce1142fb3a9f4e10cd4827771ad742c846c
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

67 lines
2.1 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const core = require('@sentry/core');
const getBuildPluginOptions = require('./getBuildPluginOptions.js');
/**
* This function is called by Next.js after the production build is complete.
* It is used to upload sourcemaps to Sentry.
*/
async function handleRunAfterProductionCompile(
{
releaseName,
distDir,
buildTool,
usesNativeDebugIds,
},
sentryBuildOptions,
) {
if (sentryBuildOptions.debug) {
// eslint-disable-next-line no-console
console.debug('[@sentry/nextjs] Running runAfterProductionCompile logic.');
}
const { createSentryBuildPluginManager } =
core.loadModule(
'@sentry/bundler-plugin-core',
module,
) ?? {};
if (!createSentryBuildPluginManager) {
// eslint-disable-next-line no-console
console.warn(
'[@sentry/nextjs] Could not load build manager package. Will not run runAfterProductionCompile logic.',
);
return;
}
const options = getBuildPluginOptions.getBuildPluginOptions({
sentryBuildOptions,
releaseName,
distDirAbsPath: distDir,
buildTool: `after-production-compile-${buildTool}`,
});
const sentryBuildPluginManager = createSentryBuildPluginManager(options, {
buildTool,
loggerPrefix: '[@sentry/nextjs - After Production Compile]',
});
await sentryBuildPluginManager.telemetry.emitBundlerPluginExecutionSignal();
await sentryBuildPluginManager.createRelease();
// Skip debug ID injection if sourcemaps are disabled which are only relevant for sourcemap correlation
if (!usesNativeDebugIds && sentryBuildOptions.sourcemaps?.disable !== true) {
await sentryBuildPluginManager.injectDebugIds([distDir]);
}
await sentryBuildPluginManager.uploadSourcemaps([distDir], {
// We don't want to prepare the artifacts because we injected debug ids manually before
prepareArtifacts: false,
});
await sentryBuildPluginManager.deleteArtifacts();
}
exports.handleRunAfterProductionCompile = handleRunAfterProductionCompile;
//# sourceMappingURL=handleRunAfterProductionCompile.js.map