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>
1 line
No EOL
5.9 KiB
Text
1 line
No EOL
5.9 KiB
Text
{"version":3,"sources":["../../../src/server/web/globals.ts"],"sourcesContent":["import type {\n InstrumentationModule,\n InstrumentationOnRequestError,\n} from '../instrumentation/types'\n\ndeclare const _ENTRIES: any\n\nexport async function getEdgeInstrumentationModule(): Promise<\n InstrumentationModule | undefined\n> {\n const instrumentation =\n '_ENTRIES' in globalThis &&\n _ENTRIES.middleware_instrumentation &&\n (await _ENTRIES.middleware_instrumentation)\n\n return instrumentation\n}\n\nlet instrumentationModulePromise: Promise<any> | null = null\nasync function registerInstrumentation() {\n // Ensure registerInstrumentation is not called in production build\n if (process.env.NEXT_PHASE === 'phase-production-build') return\n if (!instrumentationModulePromise) {\n instrumentationModulePromise = getEdgeInstrumentationModule()\n }\n const instrumentation = await instrumentationModulePromise\n if (instrumentation?.register) {\n try {\n await instrumentation.register()\n } catch (err: any) {\n err.message = `An error occurred while loading instrumentation hook: ${err.message}`\n throw err\n }\n }\n}\n\nexport async function edgeInstrumentationOnRequestError(\n ...args: Parameters<InstrumentationOnRequestError>\n) {\n const instrumentation = await getEdgeInstrumentationModule()\n try {\n await instrumentation?.onRequestError?.(...args)\n } catch (err) {\n // Log the soft error and continue, since the original error has already been thrown\n console.error('Error in instrumentation.onRequestError:', err)\n }\n}\n\nlet registerInstrumentationPromise: Promise<void> | null = null\nexport function ensureInstrumentationRegistered() {\n if (!registerInstrumentationPromise) {\n registerInstrumentationPromise = registerInstrumentation()\n }\n return registerInstrumentationPromise\n}\n\nfunction getUnsupportedModuleErrorMessage(module: string) {\n // warning: if you change these messages, you must adjust how dev-overlay's middleware detects modules not found\n return `The edge runtime does not support Node.js '${module}' module.\nLearn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime`\n}\n\nfunction __import_unsupported(moduleName: string) {\n const proxy: any = new Proxy(function () {}, {\n get(_obj, prop) {\n if (prop === 'then') {\n return {}\n }\n throw new Error(getUnsupportedModuleErrorMessage(moduleName))\n },\n construct() {\n throw new Error(getUnsupportedModuleErrorMessage(moduleName))\n },\n apply(_target, _this, args) {\n if (typeof args[0] === 'function') {\n return args[0](proxy)\n }\n throw new Error(getUnsupportedModuleErrorMessage(moduleName))\n },\n })\n return new Proxy({}, { get: () => proxy })\n}\n\nfunction enhanceGlobals() {\n if (process.env.NEXT_RUNTIME !== 'edge') {\n return\n }\n\n // The condition is true when the \"process\" module is provided\n if (process !== global.process) {\n // prefer local process but global.process has correct \"env\"\n process.env = global.process.env\n global.process = process\n }\n\n // to allow building code that import but does not use node.js modules,\n // webpack will expect this function to exist in global scope\n try {\n Object.defineProperty(globalThis, '__import_unsupported', {\n value: __import_unsupported,\n enumerable: false,\n configurable: false,\n })\n } catch {}\n\n // Eagerly fire instrumentation hook to make the startup faster.\n void ensureInstrumentationRegistered()\n}\n\nenhanceGlobals()\n"],"names":["getEdgeInstrumentationModule","instrumentation","globalThis","_ENTRIES","middleware_instrumentation","instrumentationModulePromise","registerInstrumentation","process","env","NEXT_PHASE","register","err","message","edgeInstrumentationOnRequestError","args","onRequestError","console","error","registerInstrumentationPromise","ensureInstrumentationRegistered","getUnsupportedModuleErrorMessage","module","__import_unsupported","moduleName","proxy","Proxy","get","_obj","prop","Error","construct","apply","_target","_this","enhanceGlobals","NEXT_RUNTIME","global","Object","defineProperty","value","enumerable","configurable"],"mappings":"AAOA,OAAO,eAAeA;IAGpB,MAAMC,kBACJ,cAAcC,cACdC,SAASC,0BAA0B,IAClC,MAAMD,SAASC,0BAA0B;IAE5C,OAAOH;AACT;AAEA,IAAII,+BAAoD;AACxD,eAAeC;IACb,mEAAmE;IACnE,IAAIC,QAAQC,GAAG,CAACC,UAAU,KAAK,0BAA0B;IACzD,IAAI,CAACJ,8BAA8B;QACjCA,+BAA+BL;IACjC;IACA,MAAMC,k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