Files
klz-cables.com/.pnpm-store/v10/files/96/e35aa583423277ad97251743b5ef2e3aa764c09106cdb42d8f80be0a42a25482588efb8d292d8f5d1bc7c11b724883d619a3aeb8938553074dc3228e43753e
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

87 lines
3.6 KiB
Plaintext

Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
const util = require('../util.js');
const buildTime = require('./buildTime.js');
const deprecatedWebpackOptions = require('./deprecatedWebpackOptions.js');
const getFinalConfigObjectBundlerUtils = require('./getFinalConfigObjectBundlerUtils.js');
const getFinalConfigObjectUtils = require('./getFinalConfigObjectUtils.js');
/**
* Materializes the final Next.js config object with Sentry's build-time integrations applied.
*
* Note: this mutates both `incomingUserNextConfigObject` and `userSentryOptions` (to apply defaults/migrations).
*/
function getFinalConfigObject(
incomingUserNextConfigObject,
userSentryOptions,
) {
deprecatedWebpackOptions.migrateDeprecatedWebpackOptions(userSentryOptions);
const releaseName = getFinalConfigObjectUtils.resolveReleaseName(userSentryOptions);
getFinalConfigObjectUtils.maybeSetUpTunnelRouteRewriteRules(incomingUserNextConfigObject, userSentryOptions);
if (getFinalConfigObjectUtils.shouldReturnEarlyInExperimentalBuildMode()) {
return incomingUserNextConfigObject;
}
const routeManifest = getFinalConfigObjectUtils.maybeCreateRouteManifest(incomingUserNextConfigObject, userSentryOptions);
const vercelCronsConfigResult = getFinalConfigObjectUtils.maybeGetVercelCronsConfig(userSentryOptions);
buildTime.setUpBuildTimeVariables(incomingUserNextConfigObject, userSentryOptions, releaseName);
const nextJsVersion = util.getNextjsVersion();
const nextMajor = getFinalConfigObjectUtils.getNextMajor(nextJsVersion);
getFinalConfigObjectUtils.maybeSetClientTraceMetadataOption(incomingUserNextConfigObject, nextJsVersion);
getFinalConfigObjectUtils.maybeSetInstrumentationHookOption(incomingUserNextConfigObject, nextJsVersion);
getFinalConfigObjectUtils.warnIfMissingOnRouterTransitionStartHook(userSentryOptions);
const bundlerInfo = getFinalConfigObjectBundlerUtils.getBundlerInfo(nextJsVersion);
getFinalConfigObjectBundlerUtils.maybeWarnAboutUnsupportedTurbopack(nextJsVersion, bundlerInfo);
getFinalConfigObjectBundlerUtils.maybeWarnAboutUnsupportedRunAfterProductionCompileHook(nextJsVersion, userSentryOptions, bundlerInfo);
const turboPackConfig = getFinalConfigObjectBundlerUtils.maybeConstructTurbopackConfig(
incomingUserNextConfigObject,
userSentryOptions,
routeManifest,
nextJsVersion,
bundlerInfo,
vercelCronsConfigResult,
);
const shouldUseRunAfterProductionCompileHook = getFinalConfigObjectBundlerUtils.resolveUseRunAfterProductionCompileHookOption(
userSentryOptions,
bundlerInfo,
);
getFinalConfigObjectBundlerUtils.maybeSetUpRunAfterProductionCompileHook({
incomingUserNextConfigObject,
userSentryOptions,
releaseName,
nextJsVersion,
bundlerInfo,
turboPackConfig,
shouldUseRunAfterProductionCompileHook,
});
getFinalConfigObjectBundlerUtils.maybeEnableTurbopackSourcemaps(incomingUserNextConfigObject, userSentryOptions, bundlerInfo);
return {
...incomingUserNextConfigObject,
...getFinalConfigObjectBundlerUtils.getServerExternalPackagesPatch(incomingUserNextConfigObject, nextMajor),
...getFinalConfigObjectBundlerUtils.getWebpackPatch({
incomingUserNextConfigObject,
userSentryOptions,
releaseName,
routeManifest,
nextJsVersion,
shouldUseRunAfterProductionCompileHook,
bundlerInfo,
vercelCronsConfigResult,
}),
...getFinalConfigObjectBundlerUtils.getTurbopackPatch(bundlerInfo, turboPackConfig),
};
}
exports.getFinalConfigObject = getFinalConfigObject;
//# sourceMappingURL=getFinalConfigObject.js.map