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
6.7 KiB
Text
1 line
No EOL
6.7 KiB
Text
{"version":3,"sources":["../../../src/server/dev/static-paths-worker.ts"],"sourcesContent":["import type { NextConfigComplete } from '../config-shared'\n\nimport '../require-hook'\nimport '../node-environment'\n\nimport { collectSegments } from '../../build/segment-config/app/app-segments'\nimport type { StaticPathsResult } from '../../build/static-paths/types'\nimport { loadComponents } from '../load-components'\nimport { setHttpClientAndAgentOptions } from '../setup-http-agent-env'\nimport type { IncrementalCache } from '../lib/incremental-cache'\nimport { isAppPageRouteModule } from '../route-modules/checks'\nimport {\n checkIsRoutePPREnabled,\n type ExperimentalPPRConfig,\n} from '../lib/experimental/ppr'\nimport { InvariantError } from '../../shared/lib/invariant-error'\nimport { collectRootParamKeys } from '../../build/segment-config/app/collect-root-param-keys'\nimport { buildAppStaticPaths } from '../../build/static-paths/app'\nimport { buildPagesStaticPaths } from '../../build/static-paths/pages'\nimport { createIncrementalCache } from '../../export/helpers/create-incremental-cache'\nimport type { AppPageRouteModule } from '../route-modules/app-page/module'\nimport type { AppRouteRouteModule } from '../route-modules/app-route/module'\n\ntype RuntimeConfig = {\n pprConfig: ExperimentalPPRConfig | undefined\n configFileName: string\n cacheComponents: boolean\n}\n\n// we call getStaticPaths in a separate process to ensure\n// side-effects aren't relied on in dev that will break\n// during a production build\nexport async function loadStaticPaths({\n dir,\n distDir,\n pathname,\n config,\n httpAgentOptions,\n locales,\n defaultLocale,\n isAppPath,\n page,\n isrFlushToDisk,\n fetchCacheKeyPrefix,\n cacheMaxMemorySize,\n requestHeaders,\n cacheHandler,\n cacheHandlers,\n cacheLifeProfiles,\n nextConfigOutput,\n buildId,\n authInterrupts,\n sriEnabled,\n}: {\n dir: string\n distDir: string\n pathname: string\n config: RuntimeConfig\n httpAgentOptions: NextConfigComplete['httpAgentOptions']\n locales?: readonly string[]\n defaultLocale?: string\n isAppPath: boolean\n page: string\n isrFlushToDisk?: boolean\n fetchCacheKeyPrefix?: string\n cacheMaxMemorySize: number\n requestHeaders: IncrementalCache['requestHeaders']\n cacheHandler?: string\n cacheHandlers?: NextConfigComplete['cacheHandlers']\n cacheLifeProfiles?: {\n [profile: string]: import('../../server/use-cache/cache-life').CacheLife\n }\n nextConfigOutput: 'standalone' | 'export' | undefined\n buildId: string\n authInterrupts: boolean\n sriEnabled: boolean\n}): Promise<StaticPathsResult> {\n // this needs to be initialized before loadComponents otherwise\n // \"use cache\" could be missing it's cache handlers\n await createIncrementalCache({\n dir,\n distDir,\n cacheHandler,\n cacheHandlers,\n requestHeaders,\n fetchCacheKeyPrefix,\n flushToDisk: isrFlushToDisk,\n cacheMaxMemorySize,\n })\n\n // update work memory runtime-config\n setHttpClientAndAgentOptions({\n httpAgentOptions,\n })\n\n const components = await loadComponents({\n distDir,\n // In `pages/`, the page is the same as the pathname.\n page: page || pathname,\n isAppPath,\n isDev: true,\n sriEnabled,\n needsManifestsForLegacyReasons: true,\n })\n\n if (isAppPath) {\n const routeModule = components.routeModule\n const segments = await collectSegments(\n // We know this is an app page or app route module because we checked\n // above that the page type is 'app'.\n routeModule as AppPageRouteModule | AppRouteRouteModule\n )\n\n const isRoutePPREnabled =\n isAppPageRouteModule(routeModule) &&\n checkIsRoutePPREnabled(config.pprConfig)\n\n const rootParamKeys = collectRootParamKeys(routeModule)\n\n return buildAppStaticPaths({\n dir,\n page: pathname,\n cacheComponents: config.cacheComponents,\n segments,\n distDir,\n requestHeaders,\n cacheHandler,\n cacheLifeProfiles,\n isrFlushToDisk,\n fetchCacheKeyPrefix,\n cacheMaxMemorySize,\n ComponentMod: components.ComponentMod,\n nextConfigOutput,\n isRoutePPREnabled,\n buildId,\n authInterrupts,\n rootParamKeys,\n })\n } else if (!components.getStaticPaths) {\n // We shouldn't get to this point since the worker should only be called for\n // SSG pages with getStaticPaths.\n throw new InvariantError(\n `Failed to load page with getStaticPaths for ${pathname}`\n )\n }\n\n return buildPagesStaticPaths({\n page: pathname,\n getStaticPaths: components.getStaticPaths,\n configFileName: config.configFileName,\n locales,\n defaultLocale,\n })\n}\n"],"names":["loadStaticPaths","dir","distDir","pathname","config","httpAgentOptions","locales","defaultLocale","isAppPath","page","isrFlushToDisk","fetchCacheKeyPrefix","cacheMaxMemorySize","requestHeaders","cacheHandler","cacheHandlers","cacheLifeProfiles","nextConfigOutput","buildId","authInterrupts","sriEnabled","createIncrementalCache","flushToDisk","setHttpClientAndAgentOptions","components","loadComponents","isDev","needsManifestsForLegacyReasons","routeModule","segments","collectSegments","isRoutePPREnabled","isAppPageRouteModule","checkIsRoutePPREnabled","pprConfig","rootParamKeys","collectRootParamKeys","buildAppStaticPaths","cacheComponents","ComponentMod","getStaticPaths","InvariantError","buildPagesStaticPaths","configFileName"],"mappings":";;;;+BAgCsBA;;;eAAAA;;;QA9Bf;QACA;6BAEyB;gCAED;mCACc;wBAER;qBAI9B;gCACwB;sCACM;qBACD;uBACE;wCACC;AAahC,eAAeA,gBAAgB,EACpCC,GAAG,EACHC,OAAO,EACPC,QAAQ,EACRC,MAAM,EACNC,gBAAgB,EAChBC,OAAO,EACPC,aAAa,EACbC,SAAS,EACTC,IAAI,EACJC,cAAc,EACdC,mBAAmB,EACnBC,kBAAkB,EAClBC,cAAc,EACdC,YAAY,EACZC,aAAa,EACbC,iBAAiB,EACjBC,gBAAgB,EAChBC,OAAO,EACPC,cAAc,EACdC,UAAU,EAwBX;IACC,+DAA+D;IAC/D,mDAAmD;IACnD,MAAMC,IAAAA,8CAAsB,EAAC;QAC3BpB;QACAC;QACAY;QACAC;QACAF;QACAF;QACAW,aAAaZ;QACbE;IACF;IAEA,oCAAoC;IACpCW,IAAAA,+CAA4B,EAAC;QAC3BlB;IACF;IAEA,MAAMmB,aAAa,MAAMC,IAAAA,8BAAc,EAAC;QACtCvB;QACA,qDAAqD;QACrDO,MAAMA,Q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