Rocky_Mountain_Vending/.pnpm-store/v10/files/a9/dff37bb3e22027499628f67a1a5dd23c656deb2c2675240c831477095cc9b37c2949c91751592f63e82a66a400f0ea611e57c86b0d9032328ff202c3d27216
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

1 line
No EOL
9.9 KiB
Text

{"version":3,"sources":["../../../src/build/templates/pages-api.ts"],"sourcesContent":["import type { NextApiResponse } from '../../types'\nimport type { IncomingMessage, ServerResponse } from 'node:http'\n\nimport { sendError } from '../../server/api-utils'\nimport { RouteKind } from '../../server/route-kind'\nimport type { Span } from '../../server/lib/trace/tracer'\nimport { PagesAPIRouteModule } from '../../server/route-modules/pages-api/module.compiled'\n\nimport { hoist } from './helpers'\n\n// Import the userland code.\nimport * as userland from 'VAR_USERLAND'\nimport { getTracer, SpanKind } from '../../server/lib/trace/tracer'\nimport { BaseServerSpan } from '../../server/lib/trace/constants'\nimport type { InstrumentationOnRequestError } from '../../server/instrumentation/types'\nimport { addRequestMeta } from '../../server/request-meta'\n\n// Re-export the handler (should be the default export).\nexport default hoist(userland, 'default')\n\n// Re-export config.\nexport const config = hoist(userland, 'config')\n\n// Create and export the route module that will be consumed.\nconst routeModule = new PagesAPIRouteModule({\n definition: {\n kind: RouteKind.PAGES_API,\n page: 'VAR_DEFINITION_PAGE',\n pathname: 'VAR_DEFINITION_PATHNAME',\n // The following aren't used in production.\n bundlePath: '',\n filename: '',\n },\n userland,\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n})\n\nexport async function handler(\n req: IncomingMessage,\n res: ServerResponse,\n ctx: {\n waitUntil?: (prom: Promise<void>) => void\n }\n): Promise<void> {\n if (routeModule.isDev) {\n addRequestMeta(req, 'devRequestTimingInternalsEnd', process.hrtime.bigint())\n }\n let srcPage = 'VAR_DEFINITION_PAGE'\n\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/'\n }\n\n const prepareResult = await routeModule.prepare(req, res, { srcPage })\n\n if (!prepareResult) {\n res.statusCode = 400\n res.end('Bad Request')\n ctx.waitUntil?.(Promise.resolve())\n return\n }\n\n const { query, params, prerenderManifest, routerServerContext } =\n prepareResult\n\n try {\n const method = req.method || 'GET'\n const tracer = getTracer()\n\n const activeSpan = tracer.getActiveScopeSpan()\n const onRequestError =\n routeModule.instrumentationOnRequestError.bind(routeModule)\n\n const invokeRouteModule = async (span?: Span) =>\n routeModule\n .render(req, res, {\n query: {\n ...query,\n ...params,\n },\n params,\n allowedRevalidateHeaderKeys: process.env\n .__NEXT_ALLOWED_REVALIDATE_HEADERS as any as string[],\n multiZoneDraftMode: Boolean(process.env.__NEXT_MULTI_ZONE_DRAFT_MODE),\n trustHostHeader: process.env\n .__NEXT_TRUST_HOST_HEADER as any as boolean,\n // TODO: get this from from runtime env so manifest\n // doesn't need to load\n previewProps: prerenderManifest.preview,\n propagateError: false,\n dev: routeModule.isDev,\n page: 'VAR_DEFINITION_PAGE',\n\n internalRevalidate: routerServerContext?.revalidate,\n\n onError: (...args: Parameters<InstrumentationOnRequestError>) =>\n onRequestError(req, ...args),\n })\n .finally(() => {\n if (!span) return\n\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false,\n })\n\n const rootSpanAttributes = tracer.getRootSpanAttributes()\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return\n }\n\n if (\n rootSpanAttributes.get('next.span_type') !==\n BaseServerSpan.handleRequest\n ) {\n console.warn(\n `Unexpected root span type '${rootSpanAttributes.get(\n 'next.span_type'\n )}'. Please report this Next.js issue https://github.com/vercel/next.js`\n )\n return\n }\n\n const route = rootSpanAttributes.get('next.route')\n if (route) {\n const name = `${method} ${route}`\n\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name,\n })\n span.updateName(name)\n } else {\n span.updateName(`${method} ${srcPage}`)\n }\n })\n\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await invokeRouteModule(activeSpan)\n } else {\n await tracer.withPropagatedContext(req.headers, () =>\n tracer.trace(\n BaseServerSpan.handleRequest,\n {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url,\n },\n },\n invokeRouteModule\n )\n )\n }\n } catch (err) {\n // we re-throw in dev to show the error overlay\n if (routeModule.isDev) {\n throw err\n }\n // this is technically an invariant as error handling\n // should be done inside of api-resolver onError\n sendError(res as NextApiResponse, 500, 'Internal Server Error')\n } finally {\n // We don't allow any waitUntil work in pages API routes currently\n // so if callback is present return with resolved promise since no\n // pending work\n ctx.waitUntil?.(Promise.resolve())\n }\n}\n"],"names":["config","handler","hoist","userland","routeModule","PagesAPIRouteModule","definition","kind","RouteKind","PAGES_API","page","pathname","bundlePath","filename","distDir","process","env","__NEXT_RELATIVE_DIST_DIR","relativeProjectDir","__NEXT_RELATIVE_PROJECT_DIR","req","res","ctx","isDev","addRequestMeta","hrtime","bigint","srcPage","TURBOPACK","replace","prepareResult","prepare","statusCode","end","waitUntil","Promise","resolve","query","params","prerenderManifest","routerServerContext","method","tracer","getTracer","activeSpan","getActiveScopeSpan","onRequestError","instrumentationOnRequestError","bind","invokeRouteModule","span","render","allowedRevalidateHeaderKeys","__NEXT_ALLOWED_REVALIDATE_HEADERS","multiZoneDraftMode","Boolean","__NEXT_MULTI_ZONE_DRAFT_MODE","trustHostHeader","__NEXT_TRUST_HOST_HEADER","previewProps","preview","propagateError","dev","internalRevalidate","revalidate","onError","args","finally","setAttributes","rootSpanAttributes","getRootSpanAttributes","get","BaseServerSpan","handleRequest","console","warn","route","name","updateName","withPropagatedContext","headers","trace","spanName","SpanKind","SERVER","attributes","url","err","sendError"],"mappings":";;;;;;;;;;;;;;;;IAqBaA,MAAM;eAANA;;IAJb,wDAAwD;IACxD,OAAyC;eAAzC;;IAoBsBC,OAAO;eAAPA;;;0BAnCI;2BACA;gCAEU;yBAEd;sEAGI;wBACU;2BACL;6BAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAG/B,WAAeC,IAAAA,cAAK,EAACC,eAAU;AAGxB,MAAMH,SAASE,IAAAA,cAAK,EAACC,eAAU;AAEtC,4DAA4D;AAC5D,MAAMC,cAAc,IAAIC,mCAAmB,CAAC;IAC1CC,YAAY;QACVC,MAAMC,oBAAS,CAACC,SAAS;QACzBC,MAAM;QACNC,UAAU;QACV,2CAA2C;QAC3CC,YAAY;QACZC,UAAU;IACZ;IACAV,UAAAA;IACAW,SAASC,QAAQC,GAAG,CAACC,wBAAwB,IAAI;IACjDC,oBAAoBH,QAAQC,GAAG,CAACG,2BAA2B,IAAI;AACjE;AAEO,eAAelB,QACpBmB,GAAoB,EACpBC,GAAmB,EACnBC,GAEC;IAED,IAAIlB,YAAYmB,KAAK,EAAE;QACrBC,IAAAA,2BAAc,EAACJ,KAAK,gCAAgCL,QAAQU,MAAM,CAACC,MAAM;IAC3E;IACA,IAAIC,UAAU;IAEd,wDAAwD;IACxD,mDAAmD;IACnD,6DAA6D;IAC7D,IAAIZ,QAAQC,GAAG,CAACY,SAAS,EAAE;QACzBD,UAAUA,QAAQE,OAAO,CAAC,YAAY,OAAO;IAC/C;IAEA,MAAMC,gBAAgB,MAAM1B,YAAY2B,OAAO,CAACX,KAAKC,KAAK;QAAEM;IAAQ;IAEpE,IAAI,CAACG,eAAe;QAClBT,IAAIW,UAAU,GAAG;QACjBX,IAAIY,GAAG,CAAC;QACRX,IAAIY,SAAS,oBAAbZ,IAAIY,SAAS,MAAbZ,KAAgBa,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