Rocky_Mountain_Vending/.pnpm-store/v10/files/e8/b61518456cd7200970729cd1afb42386ca2b5a396c36d90427b96bbaa9129f2cc124c89d8a068303749f8cc1da5234a5467f1e6905b7b2c1995656620d21e5
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
15 KiB
Text

{"version":3,"sources":["../../src/server/load-components.ts"],"sourcesContent":["import type {\n AppType,\n DocumentType,\n NextComponentType,\n} from '../shared/lib/utils'\nimport type { ClientReferenceManifest } from '../build/webpack/plugins/flight-manifest-plugin'\nimport type {\n PageConfig,\n GetStaticPaths,\n GetServerSideProps,\n GetStaticProps,\n} from '../types'\nimport type { RouteModule } from './route-modules/route-module'\nimport type { BuildManifest } from './get-page-files'\nimport type { ActionManifest } from '../build/webpack/plugins/flight-client-entry-plugin'\n\nimport {\n BUILD_MANIFEST,\n REACT_LOADABLE_MANIFEST,\n CLIENT_REFERENCE_MANIFEST,\n SERVER_REFERENCE_MANIFEST,\n DYNAMIC_CSS_MANIFEST,\n SUBRESOURCE_INTEGRITY_MANIFEST,\n} from '../shared/lib/constants'\nimport { join } from 'path'\nimport { requirePage } from './require'\nimport { interopDefault } from '../lib/interop-default'\nimport { getTracer } from './lib/trace/tracer'\nimport { LoadComponentsSpan } from './lib/trace/constants'\nimport { evalManifest, loadManifest } from './load-manifest.external'\nimport { wait } from '../lib/wait'\nimport { setReferenceManifestsSingleton } from './app-render/encryption-utils'\nimport { createServerModuleMap } from './app-render/action-utils'\nimport type { DeepReadonly } from '../shared/lib/deep-readonly'\nimport { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'\nimport { isStaticMetadataRoute } from '../lib/metadata/is-metadata-route'\n\nexport type ManifestItem = {\n id: number | string\n files: string[]\n}\n\nexport type ReactLoadableManifest = { [moduleId: string]: ManifestItem }\n/**\n * This manifest prevents removing server rendered <link> tags after client\n * navigation. This is only needed under `Pages dir && Production && Webpack`.\n * @see https://github.com/vercel/next.js/pull/72959\n */\nexport type DynamicCssManifest = string[]\n\n/**\n * A manifest entry type for the react-loadable-manifest.json.\n *\n * The whole manifest.json is a type of `Record<pathname, LoadableManifest>`\n * where pathname is a string-based key points to the path of the page contains\n * each dynamic imports.\n */\nexport interface LoadableManifest {\n [k: string]: { id: string | number; files: string[] }\n}\n\nexport type LoadComponentsReturnType<NextModule = any> = {\n Component: NextComponentType\n pageConfig: PageConfig\n buildManifest: DeepReadonly<BuildManifest>\n subresourceIntegrityManifest?: DeepReadonly<Record<string, string>>\n reactLoadableManifest: DeepReadonly<ReactLoadableManifest>\n dynamicCssManifest?: DeepReadonly<DynamicCssManifest>\n clientReferenceManifest?: DeepReadonly<ClientReferenceManifest>\n serverActionsManifest?: any\n Document: DocumentType\n App: AppType\n getStaticProps?: GetStaticProps\n getStaticPaths?: GetStaticPaths\n getServerSideProps?: GetServerSideProps\n ComponentMod: NextModule\n routeModule: RouteModule\n isAppPath?: boolean\n page: string\n multiZoneDraftMode?: boolean\n}\n\n/**\n * Load manifest file with retries, defaults to 3 attempts.\n */\nexport async function loadManifestWithRetries<T extends object>(\n manifestPath: string,\n attempts = 3\n) {\n while (true) {\n try {\n return loadManifest<T>(manifestPath)\n } catch (err) {\n attempts--\n if (attempts <= 0) throw err\n\n await wait(100)\n }\n }\n}\n\n/**\n * Load manifest file with retries, defaults to 3 attempts, or return undefined.\n */\nexport async function tryLoadManifestWithRetries<T extends object>(\n manifestPath: string,\n attempts = 3\n) {\n try {\n return await loadManifestWithRetries<T>(manifestPath, attempts)\n } catch (err) {\n return undefined\n }\n}\n\n/**\n * Load manifest file with retries, defaults to 3 attempts.\n */\nexport async function evalManifestWithRetries<T extends object>(\n manifestPath: string,\n attempts = 3\n) {\n while (true) {\n try {\n return evalManifest<T>(manifestPath)\n } catch (err) {\n attempts--\n if (attempts <= 0) throw err\n\n await wait(100)\n }\n }\n}\n\nasync function tryLoadClientReferenceManifest(\n manifestPath: string,\n entryName: string,\n attempts?: number\n) {\n try {\n const context = await evalManifestWithRetries<{\n __RSC_MANIFEST: { [key: string]: ClientReferenceManifest }\n }>(manifestPath, attempts)\n return context.__RSC_MANIFEST[entryName]\n } catch (err) {\n return undefined\n }\n}\n\nasync function loadComponentsImpl<N = any>({\n distDir,\n page,\n isAppPath,\n isDev,\n sriEnabled,\n // When route modules are used, which is the case for the server calls to loadComponents, it no longer needs manifest to be loaded here.\n // Static generation still needs the manifests to be loaded here.\n // In the future static generation will also use route modules, and we will remove this flag.\n needsManifestsForLegacyReasons,\n}: {\n distDir: string\n page: string\n isAppPath: boolean\n isDev: boolean\n sriEnabled: boolean\n needsManifestsForLegacyReasons: boolean\n}): Promise<LoadComponentsReturnType<N>> {\n let DocumentMod = {}\n let AppMod = {}\n if (!isAppPath) {\n ;[DocumentMod, AppMod] = await Promise.all([\n requirePage('/_document', distDir, false),\n requirePage('/_app', distDir, false),\n ])\n }\n\n if (needsManifestsForLegacyReasons) {\n // In dev mode we retry loading a manifest file to handle a race condition\n // that can occur while app and pages are compiling at the same time, and the\n // build-manifest is still being written to disk while an app path is\n // attempting to load.\n const manifestLoadAttempts = isDev ? 3 : 1\n\n let reactLoadableManifestPath: string\n if (!process.env.TURBOPACK) {\n reactLoadableManifestPath = join(\n /* turbopackIgnore: true */ distDir,\n REACT_LOADABLE_MANIFEST\n )\n } else if (isAppPath) {\n reactLoadableManifestPath = join(\n /* turbopackIgnore: true */ distDir,\n 'server',\n 'app',\n page,\n REACT_LOADABLE_MANIFEST\n )\n } else {\n reactLoadableManifestPath = join(\n /* turbopackIgnore: true */ distDir,\n 'server',\n 'pages',\n normalizePagePath(page),\n REACT_LOADABLE_MANIFEST\n )\n }\n\n // Make sure to avoid loading the manifest for static metadata routes for better performance.\n const hasClientManifest = !isStaticMetadataRoute(page)\n\n // Load the manifest files first\n //\n // Loading page-specific manifests shouldn't throw an error if the manifest couldn't be found, so\n // that the `requirePage` call below will throw the correct error in that case\n // (a `PageNotFoundError`).\n const [\n buildManifest,\n reactLoadableManifest,\n dynamicCssManifest,\n clientReferenceManifest,\n serverActionsManifest,\n subresourceIntegrityManifest,\n ] = await Promise.all([\n loadManifestWithRetries<BuildManifest>(\n join(/* turbopackIgnore: true */ distDir, BUILD_MANIFEST),\n manifestLoadAttempts\n ),\n tryLoadManifestWithRetries<ReactLoadableManifest>(\n reactLoadableManifestPath,\n manifestLoadAttempts\n ),\n // This manifest will only exist in Pages dir && Production && Webpack.\n isAppPath || process.env.TURBOPACK\n ? undefined\n : loadManifestWithRetries<DynamicCssManifest>(\n join(\n /* turbopackIgnore: true */ distDir,\n `${DYNAMIC_CSS_MANIFEST}.json`\n ),\n manifestLoadAttempts\n ).catch(() => undefined),\n isAppPath && hasClientManifest\n ? tryLoadClientReferenceManifest(\n join(\n /* turbopackIgnore: true */ distDir,\n 'server',\n 'app',\n page.replace(/%5F/g, '_') +\n '_' +\n CLIENT_REFERENCE_MANIFEST +\n '.js'\n ),\n page.replace(/%5F/g, '_'),\n manifestLoadAttempts\n )\n : undefined,\n isAppPath\n ? loadManifestWithRetries<ActionManifest>(\n join(\n /* turbopackIgnore: true */ distDir,\n 'server',\n SERVER_REFERENCE_MANIFEST + '.json'\n ),\n manifestLoadAttempts\n ).catch(() => null)\n : null,\n sriEnabled\n ? loadManifestWithRetries<DeepReadonly<Record<string, string>>>(\n join(\n /* turbopackIgnore: true */ distDir,\n 'server',\n SUBRESOURCE_INTEGRITY_MANIFEST + '.json'\n )\n ).catch(() => undefined)\n : undefined,\n ])\n\n // Before requiring the actual page module, we have to set the reference\n // manifests to our global store so Server Action's encryption util can access\n // to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest,\n }),\n })\n }\n\n const ComponentMod = await requirePage(page, distDir, isAppPath)\n\n const Component = interopDefault(ComponentMod)\n const Document = interopDefault(DocumentMod)\n const App = interopDefault(AppMod)\n\n const { getServerSideProps, getStaticProps, getStaticPaths, routeModule } =\n ComponentMod\n\n return {\n App,\n Document,\n Component,\n buildManifest,\n subresourceIntegrityManifest,\n reactLoadableManifest: reactLoadableManifest || {},\n dynamicCssManifest,\n pageConfig: ComponentMod.config || {},\n ComponentMod,\n getServerSideProps,\n getStaticProps,\n getStaticPaths,\n clientReferenceManifest,\n serverActionsManifest,\n isAppPath,\n page,\n routeModule,\n }\n } else {\n const ComponentMod = await requirePage(page, distDir, isAppPath)\n\n const Component = interopDefault(ComponentMod)\n const Document = interopDefault(DocumentMod)\n const App = interopDefault(AppMod)\n\n const { getServerSideProps, getStaticProps, getStaticPaths, routeModule } =\n ComponentMod\n\n return {\n App,\n Document,\n Component,\n pageConfig: ComponentMod.config || {},\n ComponentMod,\n getServerSideProps,\n getStaticProps,\n getStaticPaths,\n isAppPath,\n page,\n routeModule,\n } as any // temporary `as any` to make TypeScript not fail so that the tests will run on the PR.\n }\n}\n\nexport const loadComponents = getTracer().wrap(\n LoadComponentsSpan.loadComponents,\n loadComponentsImpl\n)\n"],"names":["evalManifestWithRetries","loadComponents","loadManifestWithRetries","tryLoadManifestWithRetries","manifestPath","attempts","loadManifest","err","wait","undefined","evalManifest","tryLoadClientReferenceManifest","entryName","context","__RSC_MANIFEST","loadComponentsImpl","distDir","page","isAppPath","isDev","sriEnabled","needsManifestsForLegacyReasons","DocumentMod","AppMod","Promise","all","requirePage","manifestLoadAttempts","reactLoadableManifestPath","process","env","TURBOPACK","join","REACT_LOADABLE_MANIFEST","normalizePagePath","hasClientManifest","isStaticMetadataRoute","buildManifest","reactLoadableManifest","dynamicCssManifest","clientReferenceManifest","serverActionsManifest","subresourceIntegrityManifest","BUILD_MANIFEST","DYNAMIC_CSS_MANIFEST","catch","replace","CLIENT_REFERENCE_MANIFEST","SERVER_REFERENCE_MANIFEST","SUBRESOURCE_INTEGRITY_MANIFEST","setReferenceManifestsSingleton","serverModuleMap","createServerModuleMap","ComponentMod","Component","interopDefault","Document","App","getServerSideProps","getStaticProps","getStaticPaths","routeModule","pageConfig","config","getTracer","wrap","LoadComponentsSpan"],"mappings":";;;;;;;;;;;;;;;;;IAsHsBA,uBAAuB;eAAvBA;;IAmOTC,cAAc;eAAdA;;IApQSC,uBAAuB;eAAvBA;;IAmBAC,0BAA0B;eAA1BA;;;2BAjFf;sBACc;yBACO;gCACG;wBACL;4BACS;sCACQ;sBACtB;iCAC0B;6BACT;mCAEJ;iCACI;AAkD/B,eAAeD,wBACpBE,YAAoB,EACpBC,WAAW,CAAC;IAEZ,MAAO,KAAM;QACX,IAAI;YACF,OAAOC,IAAAA,kCAAY,EAAIF;QACzB,EAAE,OAAOG,KAAK;YACZF;YACA,IAAIA,YAAY,GAAG,MAAME;YAEzB,MAAMC,IAAAA,UAAI,EAAC;QACb;IACF;AACF;AAKO,eAAeL,2BACpBC,YAAoB,EACpBC,WAAW,CAAC;IAEZ,IAAI;QACF,OAAO,MAAMH,wBAA2BE,cAAcC;IACxD,EAAE,OAAOE,KAAK;QACZ,OAAOE;IACT;AACF;AAKO,eAAeT,wBACpBI,YAAoB,EACpBC,WAAW,CAAC;IAEZ,MAAO,KAAM;QACX,IAAI;YACF,OAAOK,IAAAA,kCAAY,EAAIN;QACzB,EAAE,OAAOG,KAAK;YACZF;YACA,IAAIA,YAAY,GAAG,MAAME;YAEzB,MAAMC,IAAAA,UAAI,EAAC;QACb;IACF;AACF;AAEA,eAAeG,+BACbP,YAAoB,EACpBQ,SAAiB,EACjBP,QAAiB;IAEjB,IAAI;QACF,MAAMQ,UAAU,MAAMb,wBAEnBI,cAAcC;QACjB,OAAOQ,QAAQC,cAAc,CAACF,UAAU;IAC1C,EAAE,OAAOL,KAAK;QACZ,OAAOE;IACT;AACF;AAEA,eAAeM,mBAA4B,EACzCC,OAAO,EACPC,IAAI,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