Rocky_Mountain_Vending/.pnpm-store/v10/files/6f/6c7d509e6896a9e8859e833095d5366d7794395c77f9f0d33b22f4c0060ed5553bcc61c619a7f364bed7d47636f8f2be08c0499147a0dc95fe950913f10841
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
6.5 KiB
Text

{"version":3,"sources":["../../../src/server/route-matcher-managers/dev-route-matcher-manager.ts"],"sourcesContent":["import { RouteKind } from '../route-kind'\nimport type { RouteMatch } from '../route-matches/route-match'\nimport type { RouteDefinition } from '../route-definitions/route-definition'\nimport { DefaultRouteMatcherManager } from './default-route-matcher-manager'\nimport type { MatchOptions, RouteMatcherManager } from './route-matcher-manager'\nimport path from '../../shared/lib/isomorphic/path'\nimport * as Log from '../../build/output/log'\nimport { cyan } from '../../lib/picocolors'\nimport type { RouteMatcher } from '../route-matchers/route-matcher'\n\nexport interface RouteEnsurer {\n ensure(match: RouteMatch, pathname: string): Promise<void>\n}\n\nexport class DevRouteMatcherManager extends DefaultRouteMatcherManager {\n constructor(\n private readonly production: RouteMatcherManager,\n private readonly ensurer: RouteEnsurer,\n private readonly dir: string\n ) {\n super()\n }\n\n public async test(pathname: string, options: MatchOptions): Promise<boolean> {\n // Try to find a match within the developer routes.\n const match = await super.match(pathname, options)\n\n // Return if the match wasn't null. Unlike the implementation of `match`\n // which uses `matchAll` here, this does not call `ensure` on the match\n // found via the development matches.\n return match !== null\n }\n\n protected validate(\n pathname: string,\n matcher: RouteMatcher,\n options: MatchOptions\n ): RouteMatch | null {\n const match = super.validate(pathname, matcher, options)\n\n // If a match was found, check to see if there were any conflicting app or\n // pages files.\n // TODO: maybe expand this to _any_ duplicated routes instead?\n if (\n match &&\n matcher.duplicated &&\n matcher.duplicated.some(\n (duplicate) =>\n duplicate.definition.kind === RouteKind.APP_PAGE ||\n duplicate.definition.kind === RouteKind.APP_ROUTE\n ) &&\n matcher.duplicated.some(\n (duplicate) =>\n duplicate.definition.kind === RouteKind.PAGES ||\n duplicate.definition.kind === RouteKind.PAGES_API\n )\n ) {\n return null\n }\n\n return match\n }\n\n public async *matchAll(\n pathname: string,\n options: MatchOptions\n ): AsyncGenerator<RouteMatch<RouteDefinition<RouteKind>>, null, undefined> {\n // Iterate over the development matches to see if one of them match the\n // request path.\n for await (const developmentMatch of super.matchAll(pathname, options)) {\n // We're here, which means that we haven't seen this match yet, so we\n // should try to ensure it and recompile the production matcher.\n await this.ensurer.ensure(developmentMatch, pathname)\n await this.production.reload()\n\n // Iterate over the production matches again, this time we should be able\n // to match it against the production matcher unless there's an error.\n for await (const productionMatch of this.production.matchAll(\n pathname,\n options\n )) {\n yield productionMatch\n }\n }\n\n // We tried direct matching against the pathname and against all the dynamic\n // paths, so there was no match.\n return null\n }\n\n public async reload(): Promise<void> {\n // Compile the production routes again.\n await this.production.reload()\n\n // Compile the development routes.\n await super.reload()\n\n // Check for and warn of any duplicates.\n for (const [pathname, matchers] of Object.entries(\n this.matchers.duplicates\n )) {\n // We only want to warn about matchers resolving to the same path if their\n // identities are different.\n const identity = matchers[0].identity\n if (matchers.slice(1).some((matcher) => matcher.identity !== identity)) {\n continue\n }\n\n Log.warn(\n `Duplicate page detected. ${matchers\n .map((matcher) =>\n cyan(path.relative(this.dir, matcher.definition.filename))\n )\n .join(' and ')} resolve to ${cyan(pathname)}`\n )\n }\n }\n}\n"],"names":["DevRouteMatcherManager","DefaultRouteMatcherManager","constructor","production","ensurer","dir","test","pathname","options","match","validate","matcher","duplicated","some","duplicate","definition","kind","RouteKind","APP_PAGE","APP_ROUTE","PAGES","PAGES_API","matchAll","developmentMatch","ensure","reload","productionMatch","matchers","Object","entries","duplicates","identity","slice","Log","warn","map","cyan","path","relative","filename","join"],"mappings":";;;;+BAcaA;;;eAAAA;;;2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