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
20 KiB
Text
1 line
No EOL
20 KiB
Text
{"version":3,"sources":["../../../../../src/shared/lib/router/utils/route-regex.ts"],"sourcesContent":["import {\n NEXT_INTERCEPTION_MARKER_PREFIX,\n NEXT_QUERY_PARAM_PREFIX,\n} from '../../../../lib/constants'\nimport { INTERCEPTION_ROUTE_MARKERS } from './interception-routes'\nimport { escapeStringRegexp } from '../../escape-regexp'\nimport { removeTrailingSlash } from './remove-trailing-slash'\nimport { PARAMETER_PATTERN, parseMatchedParameter } from './get-dynamic-param'\n\nexport interface Group {\n pos: number\n repeat: boolean\n optional: boolean\n}\n\nexport interface RouteRegex {\n groups: { [groupName: string]: Group }\n re: RegExp\n}\n\nexport type RegexReference = {\n names: Record<string, string>\n intercepted: Record<string, string>\n}\n\ntype GetNamedRouteRegexOptions = {\n /**\n * Whether to prefix the route keys with the NEXT_INTERCEPTION_MARKER_PREFIX\n * or NEXT_QUERY_PARAM_PREFIX. This is only relevant when creating the\n * routes-manifest during the build.\n */\n prefixRouteKeys: boolean\n\n /**\n * Whether to include the suffix in the route regex. This means that when you\n * have something like `/[...slug].json` the `.json` part will be included\n * in the regex, yielding `/(.*).json` as the regex.\n */\n includeSuffix?: boolean\n\n /**\n * Whether to include the prefix in the route regex. This means that when you\n * have something like `/[...slug].json` the `/` part will be included\n * in the regex, yielding `^/(.*).json$` as the regex.\n *\n * Note that interception markers will already be included without the need\n */\n includePrefix?: boolean\n\n /**\n * Whether to exclude the optional trailing slash from the route regex.\n */\n excludeOptionalTrailingSlash?: boolean\n\n /**\n * Whether to backtrack duplicate keys. This is only relevant when creating\n * the routes-manifest during the build.\n */\n backreferenceDuplicateKeys?: boolean\n\n /**\n * If provided, this will be used as the reference for the dynamic parameter\n * keys instead of generating them in context. This is currently only used for\n * interception routes.\n */\n reference?: RegexReference\n}\n\ntype GetRouteRegexOptions = {\n /**\n * Whether to include extra parts in the route regex. This means that when you\n * have something like `/[...slug].json` the `.json` part will be included\n * in the regex, yielding `/(.*).json` as the regex.\n */\n includeSuffix?: boolean\n\n /**\n * Whether to include the prefix in the route regex. This means that when you\n * have something like `/[...slug].json` the `/` part will be included\n * in the regex, yielding `^/(.*).json$` as the regex.\n *\n * Note that interception markers will already be included without the need\n * of adding this option.\n */\n includePrefix?: boolean\n\n /**\n * Whether to exclude the optional trailing slash from the route regex.\n */\n excludeOptionalTrailingSlash?: boolean\n}\n\nfunction getParametrizedRoute(\n route: string,\n includeSuffix: boolean,\n includePrefix: boolean\n) {\n const groups: { [groupName: string]: Group } = {}\n let groupIndex = 1\n\n const segments: string[] = []\n for (const segment of removeTrailingSlash(route).slice(1).split('/')) {\n const markerMatch = INTERCEPTION_ROUTE_MARKERS.find((m) =>\n segment.startsWith(m)\n )\n const paramMatches = segment.match(PARAMETER_PATTERN) // Check for parameters\n\n if (markerMatch && paramMatches && paramMatches[2]) {\n const { key, optional, repeat } = parseMatchedParameter(paramMatches[2])\n groups[key] = { pos: groupIndex++, repeat, optional }\n segments.push(`/${escapeStringRegexp(markerMatch)}([^/]+?)`)\n } else if (paramMatches && paramMatches[2]) {\n const { key, repeat, optional } = parseMatchedParameter(paramMatches[2])\n groups[key] = { pos: groupIndex++, repeat, optional }\n\n if (includePrefix && paramMatches[1]) {\n segments.push(`/${escapeStringRegexp(paramMatches[1])}`)\n }\n\n let s = repeat ? (optional ? '(?:/(.+?))?' : '/(.+?)') : '/([^/]+?)'\n\n // Remove the leading slash if includePrefix already added it.\n if (includePrefix && paramMatches[1]) {\n s = s.substring(1)\n }\n\n segments.push(s)\n } else {\n segments.push(`/${escapeStringRegexp(segment)}`)\n }\n\n // If there's a suffix, add it to the segments if it's enabled.\n if (includeSuffix && paramMatches && paramMatches[3]) {\n segments.push(escapeStringRegexp(paramMatches[3]))\n }\n }\n\n return {\n parameterizedRoute: segments.join(''),\n groups,\n }\n}\n\n/**\n * From a normalized route this function generates a regular expression and\n * a corresponding groups object intended to be used to store matching groups\n * from the regular expression.\n */\nexport function getRouteRegex(\n normalizedRoute: string,\n {\n includeSuffix = false,\n includePrefix = false,\n excludeOptionalTrailingSlash = false,\n }: GetRouteRegexOptions = {}\n): RouteRegex {\n const { parameterizedRoute, groups } = getParametrizedRoute(\n normalizedRoute,\n includeSuffix,\n includePrefix\n )\n\n let re = parameterizedRoute\n if (!excludeOptionalTrailingSlash) {\n re += '(?:/)?'\n }\n\n return {\n re: new RegExp(`^${re}$`),\n groups: groups,\n }\n}\n\n/**\n * Builds a function to generate a minimal routeKey using only a-z and minimal\n * number of characters.\n */\nfunction buildGetSafeRouteKey() {\n let i = 0\n\n return () => {\n let routeKey = ''\n let j = ++i\n while (j > 0) {\n routeKey += String.fromCharCode(97 + ((j - 1) % 26))\n j = Math.floor((j - 1) / 26)\n }\n return routeKey\n }\n}\n\nfunction getSafeKeyFromSegment({\n interceptionMarker,\n getSafeRouteKey,\n segment,\n routeKeys,\n keyPrefix,\n backreferenceDuplicateKeys,\n}: {\n interceptionMarker?: string\n getSafeRouteKey: () => string\n segment: string\n routeKeys: Record<string, string>\n keyPrefix?: string\n backreferenceDuplicateKeys: boolean\n}) {\n const { key, optional, repeat } = parseMatchedParameter(segment)\n\n // replace any non-word characters since they can break\n // the named regex\n let cleanedKey = key.replace(/\\W/g, '')\n\n if (keyPrefix) {\n cleanedKey = `${keyPrefix}${cleanedKey}`\n }\n let invalidKey = false\n\n // check if the key is still invalid and fallback to using a known\n // safe key\n if (cleanedKey.length === 0 || cleanedKey.length > 30) {\n invalidKey = true\n }\n if (!isNaN(parseInt(cleanedKey.slice(0, 1)))) {\n invalidKey = true\n }\n\n if (invalidKey) {\n cleanedKey = getSafeRouteKey()\n }\n\n const duplicateKey = cleanedKey in routeKeys\n\n if (keyPrefix) {\n routeKeys[cleanedKey] = `${keyPrefix}${key}`\n } else {\n routeKeys[cleanedKey] = key\n }\n\n // if the segment has an interception marker, make sure that's part of the regex pattern\n // this is to ensure that the route with the interception marker doesn't incorrectly match\n // the non-intercepted route (ie /app/(.)[username] should not match /app/[username])\n const interceptionPrefix = interceptionMarker\n ? escapeStringRegexp(interceptionMarker)\n : ''\n\n let pattern: string\n if (duplicateKey && backreferenceDuplicateKeys) {\n // Use a backreference to the key to ensure that the key is the same value\n // in each of the placeholders.\n pattern = `\\\\k<${cleanedKey}>`\n } else if (repeat) {\n pattern = `(?<${cleanedKey}>.+?)`\n } else {\n pattern = `(?<${cleanedKey}>[^/]+?)`\n }\n\n return {\n key,\n pattern: optional\n ? `(?:/${interceptionPrefix}${pattern})?`\n : `/${interceptionPrefix}${pattern}`,\n cleanedKey: cleanedKey,\n optional,\n repeat,\n }\n}\n\nfunction getNamedParametrizedRoute(\n route: string,\n prefixRouteKeys: boolean,\n includeSuffix: boolean,\n includePrefix: boolean,\n backreferenceDuplicateKeys: boolean,\n reference: RegexReference = { names: {}, intercepted: {} }\n) {\n const getSafeRouteKey = buildGetSafeRouteKey()\n const routeKeys: { [named: string]: string } = {}\n\n const segments: string[] = []\n const inverseParts: string[] = []\n\n // Ensure we don't mutate the original reference object.\n reference = structuredClone(reference)\n\n for (const segment of removeTrailingSlash(route).slice(1).split('/')) {\n const hasInterceptionMarker = INTERCEPTION_ROUTE_MARKERS.some((m) =>\n segment.startsWith(m)\n )\n\n const paramMatches = segment.match(PARAMETER_PATTERN) // Check for parameters\n\n const interceptionMarker = hasInterceptionMarker\n ? paramMatches?.[1]\n : undefined\n\n let keyPrefix: string | undefined\n if (interceptionMarker && paramMatches?.[2]) {\n keyPrefix = prefixRouteKeys ? NEXT_INTERCEPTION_MARKER_PREFIX : undefined\n reference.intercepted[paramMatches[2]] = interceptionMarker\n } else if (paramMatches?.[2] && reference.intercepted[paramMatches[2]]) {\n keyPrefix = prefixRouteKeys ? NEXT_INTERCEPTION_MARKER_PREFIX : undefined\n } else {\n keyPrefix = prefixRouteKeys ? NEXT_QUERY_PARAM_PREFIX : undefined\n }\n\n if (interceptionMarker && paramMatches && paramMatches[2]) {\n // If there's an interception marker, add it to the segments.\n const { key, pattern, cleanedKey, repeat, optional } =\n getSafeKeyFromSegment({\n getSafeRouteKey,\n interceptionMarker,\n segment: paramMatches[2],\n routeKeys,\n keyPrefix,\n backreferenceDuplicateKeys,\n })\n\n segments.push(pattern)\n inverseParts.push(\n `/${paramMatches[1]}:${reference.names[key] ?? cleanedKey}${repeat ? (optional ? '*' : '+') : ''}`\n )\n reference.names[key] ??= cleanedKey\n } else if (paramMatches && paramMatches[2]) {\n // If there's a prefix, add it to the segments if it's enabled.\n if (includePrefix && paramMatches[1]) {\n segments.push(`/${escapeStringRegexp(paramMatches[1])}`)\n inverseParts.push(`/${paramMatches[1]}`)\n }\n\n const { key, pattern, cleanedKey, repeat, optional } =\n getSafeKeyFromSegment({\n getSafeRouteKey,\n segment: paramMatches[2],\n routeKeys,\n keyPrefix,\n backreferenceDuplicateKeys,\n })\n\n // Remove the leading slash if includePrefix already added it.\n let s = pattern\n if (includePrefix && paramMatches[1]) {\n s = s.substring(1)\n }\n\n segments.push(s)\n inverseParts.push(\n `/:${reference.names[key] ?? cleanedKey}${repeat ? (optional ? '*' : '+') : ''}`\n )\n reference.names[key] ??= cleanedKey\n } else {\n segments.push(`/${escapeStringRegexp(segment)}`)\n inverseParts.push(`/${segment}`)\n }\n\n // If there's a suffix, add it to the segments if it's enabled.\n if (includeSuffix && paramMatches && paramMatches[3]) {\n segments.push(escapeStringRegexp(paramMatches[3]))\n inverseParts.push(paramMatches[3])\n }\n }\n\n return {\n namedParameterizedRoute: segments.join(''),\n routeKeys,\n pathToRegexpPattern: inverseParts.join(''),\n reference,\n }\n}\n\n/**\n * This function extends `getRouteRegex` generating also a named regexp where\n * each group is named along with a routeKeys object that indexes the assigned\n * named group with its corresponding key. When the routeKeys need to be\n * prefixed to uniquely identify internally the \"prefixRouteKey\" arg should\n * be \"true\" currently this is only the case when creating the routes-manifest\n * during the build\n */\nexport function getNamedRouteRegex(\n normalizedRoute: string,\n options: GetNamedRouteRegexOptions\n) {\n const result = getNamedParametrizedRoute(\n normalizedRoute,\n options.prefixRouteKeys,\n options.includeSuffix ?? false,\n options.includePrefix ?? false,\n options.backreferenceDuplicateKeys ?? false,\n options.reference\n )\n\n let namedRegex = result.namedParameterizedRoute\n if (!options.excludeOptionalTrailingSlash) {\n namedRegex += '(?:/)?'\n }\n\n return {\n ...getRouteRegex(normalizedRoute, options),\n namedRegex: `^${namedRegex}$`,\n routeKeys: result.routeKeys,\n pathToRegexpPattern: result.pathToRegexpPattern,\n reference: result.reference,\n }\n}\n\n/**\n * Generates a named regexp.\n * This is intended to be using for build time only.\n */\nexport function getNamedMiddlewareRegex(\n normalizedRoute: string,\n options: {\n catchAll?: boolean\n }\n) {\n const { parameterizedRoute } = getParametrizedRoute(\n normalizedRoute,\n false,\n false\n )\n const { catchAll = true } = options\n if (parameterizedRoute === '/') {\n let catchAllRegex = catchAll ? '.*' : ''\n return {\n namedRegex: `^/${catchAllRegex}$`,\n }\n }\n\n const { namedParameterizedRoute } = getNamedParametrizedRoute(\n normalizedRoute,\n false,\n false,\n false,\n false,\n undefined\n )\n let catchAllGroupedRegex = catchAll ? '(?:(/.*)?)' : ''\n return {\n namedRegex: `^${namedParameterizedRoute}${catchAllGroupedRegex}$`,\n }\n}\n"],"names":["getNamedMiddlewareRegex","getNamedRouteRegex","getRouteRegex","getParametrizedRoute","route","includeSuffix","includePrefix","groups","groupIndex","segments","segment","removeTrailingSlash","slice","split","markerMatch","INTERCEPTION_ROUTE_MARKERS","find","m","startsWith","paramMatches","match","PARAMETER_PATTERN","key","optional","repeat","parseMatchedParameter","pos","push","escapeStringRegexp","s","substring","parameterizedRoute","join","normalizedRoute","excludeOptionalTrailingSlash","re","RegExp","buildGetSafeRouteKey","i","routeKey","j","String","fromCharCode","Math","floor","getSafeKeyFromSegment","interceptionMarker","getSafeRouteKey","routeKeys","keyPrefix","backreferenceDuplicateKeys","cleanedKey","replace","invalidKey","length","isNaN","parseInt","duplicateKey","interceptionPrefix","pattern","getNamedParametrizedRoute","prefixRouteKeys","reference","names","intercepted","inverseParts","structuredClone","hasInterceptionMarker","some","undefined","NEXT_INTERCEPTION_MARKER_PREFIX","NEXT_QUERY_PARAM_PREFIX","namedParameterizedRoute","pathToRegexpPattern","options","result","namedRegex","catchAll","catchAllRegex","catchAllGroupedRegex"],"mappings":";;;;;;;;;;;;;;;;IAwZgBA,uBAAuB;eAAvBA;;IA/BAC,kBAAkB;eAAlBA;;IArOAC,aAAa;eAAbA;;;2BAjJT;oCACoC;8BACR;qCACC;iCACqB;AAqFzD,SAASC,qBACPC,KAAa,EACbC,aAAsB,EACtBC,aAAsB;IAEtB,MAAMC,SAAyC,CAAC;IAChD,IAAIC,aAAa;IAEjB,MAAMC,WAAqB,EAAE;IAC7B,KAAK,MAAMC,WAAWC,IAAAA,wCAAmB,EAACP,OAAOQ,KAAK,CAAC,GAAGC,KAAK,CAAC,KAAM;QACpE,MAAMC,cAAcC,8CAA0B,CAACC,IAAI,CAAC,CAACC,IACnDP,QAAQQ,UAAU,CAACD;QAErB,MAAME,eAAeT,QAAQU,KAAK,CAACC,kCAAiB,EAAE,uBAAuB;;QAE7E,IAAIP,eAAeK,gBAAgBA,YAAY,CAAC,EAAE,EAAE;YAClD,MAAM,EAAEG,GAAG,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGC,IAAAA,sCAAqB,EAACN,YAAY,CAAC,EAAE;YACvEZ,MAAM,CAACe,IAAI,GAAG;gBAAEI,KAAKlB;gBAAcgB;gBAAQD;YAAS;YACpDd,SAASkB,IAAI,CAAC,CAAC,CAAC,EAAEC,IAAAA,gCAAkB,EAACd,aAAa,QAAQ,CAAC;QAC7D,OAAO,IAAIK,gBAAgBA,YAAY,CAAC,EAAE,EAAE;YAC1C,MAAM,EAAEG,GAAG,EAAEE,MAAM,EAAED,QAAQ,EAAE,GAAGE,IAAAA,sCAAq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