Files
klz-cables.com/.pnpm-store/v10/files/a8/845115ed1a9188e17c6fba01b3244651ec38c8b95cb8ac3600f3cddd58342808b49425661a9d2ef7aa4e109b2d02175b1b6f97e23d015df877199d98d2f5ea
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
3.5 KiB
Plaintext

{"version":3,"file":"wrapGetServerSidePropsWithSentry.js","sources":["../../../../src/common/pages-router-instrumentation/wrapGetServerSidePropsWithSentry.ts"],"sourcesContent":["import type { GetServerSideProps } from 'next';\nimport { isBuild } from '../utils/isBuild';\nimport { withErrorInstrumentation, withTracedServerSideDataFetcher } from '../utils/wrapperUtils';\n\n/**\n * Create a wrapped version of the user's exported `getServerSideProps` function\n *\n * @param origGetServerSideProps The user's `getServerSideProps` function\n * @param parameterizedRoute The page's parameterized route\n * @returns A wrapped version of the function\n */\nexport function wrapGetServerSidePropsWithSentry(\n origGetServerSideProps: GetServerSideProps,\n parameterizedRoute: string,\n): GetServerSideProps {\n return new Proxy(origGetServerSideProps, {\n apply: async (wrappingTarget, thisArg, args: Parameters<GetServerSideProps>) => {\n if (isBuild()) {\n return wrappingTarget.apply(thisArg, args);\n }\n\n const [context] = args;\n const { req, res } = context;\n\n const errorWrappedGetServerSideProps = withErrorInstrumentation(wrappingTarget);\n const tracedGetServerSideProps = withTracedServerSideDataFetcher(errorWrappedGetServerSideProps, req, res, {\n dataFetcherRouteName: parameterizedRoute,\n requestedRouteName: parameterizedRoute,\n dataFetchingMethodName: 'getServerSideProps',\n });\n\n const {\n data: serverSideProps,\n baggage,\n sentryTrace,\n }: {\n data?: unknown;\n baggage?: string;\n sentryTrace?: string;\n } = await (tracedGetServerSideProps.apply(thisArg, args) as ReturnType<typeof tracedGetServerSideProps>);\n\n if (typeof serverSideProps === 'object' && serverSideProps !== null && 'props' in serverSideProps) {\n // The Next.js serializer throws on undefined values so we need to guard for it (#12102)\n if (sentryTrace) {\n (serverSideProps.props as Record<string, unknown>)._sentryTraceData = sentryTrace;\n }\n\n // The Next.js serializer throws on undefined values so we need to guard for it (#12102)\n if (baggage) {\n (serverSideProps.props as Record<string, unknown>)._sentryBaggage = baggage;\n }\n }\n\n return serverSideProps;\n },\n });\n}\n"],"names":["isBuild","withErrorInstrumentation","withTracedServerSideDataFetcher"],"mappings":";;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,gCAAgC;AAChD,EAAE,sBAAsB;AACxB,EAAE,kBAAkB;AACpB,EAAsB;AACtB,EAAE,OAAO,IAAI,KAAK,CAAC,sBAAsB,EAAE;AAC3C,IAAI,KAAK,EAAE,OAAO,cAAc,EAAE,OAAO,EAAE,IAAI,KAAqC;AACpF,MAAM,IAAIA,eAAO,EAAE,EAAE;AACrB,QAAQ,OAAO,cAAc,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;AAClD,MAAM;;AAEN,MAAM,MAAM,CAAC,OAAO,CAAA,GAAI,IAAI;AAC5B,MAAM,MAAM,EAAE,GAAG,EAAE,GAAA,EAAI,GAAI,OAAO;;AAElC,MAAM,MAAM,8BAAA,GAAiCC,qCAAwB,CAAC,cAAc,CAAC;AACrF,MAAM,MAAM,wBAAA,GAA2BC,4CAA+B,CAAC,8BAA8B,EAAE,GAAG,EAAE,GAAG,EAAE;AACjH,QAAQ,oBAAoB,EAAE,kBAAkB;AAChD,QAAQ,kBAAkB,EAAE,kBAAkB;AAC9C,QAAQ,sBAAsB,EAAE,oBAAoB;AACpD,OAAO,CAAC;;AAER,MAAM,MAAM;AACZ,QAAQ,IAAI,EAAE,eAAe;AAC7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