Rocky_Mountain_Vending/.pnpm-store/v10/files/2a/ce85ddd5f49be4f1c0c682b95cd06fbf52bc35df151fca18834a51ccc7b45b8b8d6ade4da74dad03261ee3e7da2a2dc97e7f676a08d8f71b317e0ff41f0382
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
14 KiB
Text

{"version":3,"sources":["../../../../src/server/web/spec-extension/revalidate.ts"],"sourcesContent":["import {\n abortAndThrowOnSynchronousRequestDataAccess,\n postponeWithTracking,\n} from '../../app-render/dynamic-rendering'\nimport { isDynamicRoute } from '../../../shared/lib/router/utils'\nimport {\n NEXT_CACHE_IMPLICIT_TAG_ID,\n NEXT_CACHE_SOFT_TAG_MAX_LENGTH,\n} from '../../../lib/constants'\nimport { workAsyncStorage } from '../../app-render/work-async-storage.external'\nimport { workUnitAsyncStorage } from '../../app-render/work-unit-async-storage.external'\nimport { DynamicServerError } from '../../../client/components/hooks-server-context'\nimport { InvariantError } from '../../../shared/lib/invariant-error'\n\ntype CacheLifeConfig = {\n expire?: number\n}\n\n/**\n * This function allows you to purge [cached data](https://nextjs.org/docs/app/building-your-application/caching) on-demand for a specific cache tag.\n *\n * Read more: [Next.js Docs: `revalidateTag`](https://nextjs.org/docs/app/api-reference/functions/revalidateTag)\n */\nexport function revalidateTag(tag: string, profile: string | CacheLifeConfig) {\n if (!profile) {\n console.warn(\n '\"revalidateTag\" without the second argument is now deprecated, add second argument of \"max\" or use \"updateTag\". See more info here: https://nextjs.org/docs/messages/revalidate-tag-single-arg'\n )\n }\n return revalidate([tag], `revalidateTag ${tag}`, profile)\n}\n\n/**\n * This function allows you to update [cached data](https://nextjs.org/docs/app/building-your-application/caching) on-demand for a specific cache tag.\n * This can only be called from within a Server Action to enable read-your-own-writes semantics.\n *\n * Read more: [Next.js Docs: `updateTag`](https://nextjs.org/docs/app/api-reference/functions/updateTag)\n */\nexport function updateTag(tag: string) {\n const workStore = workAsyncStorage.getStore()\n\n // TODO: change this after investigating why phase: 'action' is\n // set for route handlers\n if (!workStore || workStore.page.endsWith('/route')) {\n throw new Error(\n 'updateTag can only be called from within a Server Action. ' +\n 'To invalidate cache tags in Route Handlers or other contexts, use revalidateTag instead. ' +\n 'See more info here: https://nextjs.org/docs/app/api-reference/functions/updateTag'\n )\n }\n // updateTag uses immediate expiration (no profile) without deprecation warning\n return revalidate([tag], `updateTag ${tag}`, undefined)\n}\n\n/**\n * This function allows you to refresh client cache from server actions.\n * It's useful as dynamic data can be cached on the client which won't\n * be refreshed by expireTag\n */\nexport function refresh() {\n const workStore = workAsyncStorage.getStore()\n const workUnitStore = workUnitAsyncStorage.getStore()\n\n if (\n !workStore ||\n workStore.page.endsWith('/route') ||\n workUnitStore?.phase !== 'action'\n ) {\n throw new Error(\n 'refresh can only be called from within a Server Action. ' +\n 'See more info here: https://nextjs.org/docs/app/api-reference/functions/refresh'\n )\n }\n\n if (workStore) {\n // TODO: break this to it's own field\n workStore.pathWasRevalidated = true\n }\n}\n\n/**\n * This function allows you to purge [cached data](https://nextjs.org/docs/app/building-your-application/caching) on-demand for a specific path.\n *\n * Read more: [Next.js Docs: `revalidatePath`](https://nextjs.org/docs/app/api-reference/functions/revalidatePath)\n */\nexport function revalidatePath(originalPath: string, type?: 'layout' | 'page') {\n if (originalPath.length > NEXT_CACHE_SOFT_TAG_MAX_LENGTH) {\n console.warn(\n `Warning: revalidatePath received \"${originalPath}\" which exceeded max length of ${NEXT_CACHE_SOFT_TAG_MAX_LENGTH}. See more info here https://nextjs.org/docs/app/api-reference/functions/revalidatePath`\n )\n return\n }\n\n let normalizedPath = `${NEXT_CACHE_IMPLICIT_TAG_ID}${originalPath || '/'}`\n\n if (type) {\n normalizedPath += `${normalizedPath.endsWith('/') ? '' : '/'}${type}`\n } else if (isDynamicRoute(originalPath)) {\n console.warn(\n `Warning: a dynamic page path \"${originalPath}\" was passed to \"revalidatePath\", but the \"type\" parameter is missing. This has no effect by default, see more info here https://nextjs.org/docs/app/api-reference/functions/revalidatePath`\n )\n }\n\n const tags = [normalizedPath]\n if (normalizedPath === `${NEXT_CACHE_IMPLICIT_TAG_ID}/`) {\n tags.push(`${NEXT_CACHE_IMPLICIT_TAG_ID}/index`)\n } else if (normalizedPath === `${NEXT_CACHE_IMPLICIT_TAG_ID}/index`) {\n tags.push(`${NEXT_CACHE_IMPLICIT_TAG_ID}/`)\n }\n\n return revalidate(tags, `revalidatePath ${originalPath}`)\n}\n\nfunction revalidate(\n tags: string[],\n expression: string,\n profile?: string | CacheLifeConfig\n) {\n const store = workAsyncStorage.getStore()\n if (!store || !store.incrementalCache) {\n throw new Error(\n `Invariant: static generation store missing in ${expression}`\n )\n }\n\n const workUnitStore = workUnitAsyncStorage.getStore()\n if (workUnitStore) {\n if (workUnitStore.phase === 'render') {\n throw new Error(\n `Route ${store.route} used \"${expression}\" during render which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n }\n\n switch (workUnitStore.type) {\n case 'cache':\n case 'private-cache':\n throw new Error(\n `Route ${store.route} used \"${expression}\" inside a \"use cache\" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n case 'unstable-cache':\n throw new Error(\n `Route ${store.route} used \"${expression}\" inside a function cached with \"unstable_cache(...)\" which is unsupported. To ensure revalidation is performed consistently it must always happen outside of renders and cached functions. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`\n )\n case 'prerender':\n case 'prerender-runtime':\n // cacheComponents Prerender\n const error = new Error(\n `Route ${store.route} used ${expression} without first calling \\`await connection()\\`.`\n )\n return abortAndThrowOnSynchronousRequestDataAccess(\n store.route,\n expression,\n error,\n workUnitStore\n )\n case 'prerender-client':\n throw new InvariantError(\n `${expression} must not be used within a client component. Next.js should be preventing ${expression} from being included in client components statically, but did not in this case.`\n )\n case 'prerender-ppr':\n return postponeWithTracking(\n store.route,\n expression,\n workUnitStore.dynamicTracking\n )\n case 'prerender-legacy':\n workUnitStore.revalidate = 0\n\n const err = new DynamicServerError(\n `Route ${store.route} couldn't be rendered statically because it used \\`${expression}\\`. See more info here: https://nextjs.org/docs/messages/dynamic-server-error`\n )\n store.dynamicUsageDescription = expression\n store.dynamicUsageStack = err.stack\n\n throw err\n case 'request':\n if (process.env.NODE_ENV !== 'production') {\n // TODO: This is most likely incorrect. It would lead to the ISR\n // status being flipped when revalidating a static page with a server\n // action.\n workUnitStore.usedDynamic = true\n }\n break\n default:\n workUnitStore satisfies never\n }\n }\n\n if (!store.pendingRevalidatedTags) {\n store.pendingRevalidatedTags = []\n }\n\n for (const tag of tags) {\n const existingIndex = store.pendingRevalidatedTags.findIndex((item) => {\n if (item.tag !== tag) return false\n // Compare profiles: both strings, both objects, or both undefined\n if (typeof item.profile === 'string' && typeof profile === 'string') {\n return item.profile === profile\n }\n if (typeof item.profile === 'object' && typeof profile === 'object') {\n return JSON.stringify(item.profile) === JSON.stringify(profile)\n }\n return item.profile === profile\n })\n if (existingIndex === -1) {\n store.pendingRevalidatedTags.push({\n tag,\n profile,\n })\n }\n }\n\n // if profile is provided and this is a stale-while-revalidate\n // update we do not mark the path as revalidated so that server\n // actions don't pull their own writes\n const cacheLife =\n profile && typeof profile === 'object'\n ? profile\n : profile &&\n typeof profile === 'string' &&\n store?.cacheLifeProfiles?.[profile]\n ? store.cacheLifeProfiles[profile]\n : undefined\n\n if (!profile || cacheLife?.expire === 0) {\n // TODO: only revalidate if the path matches\n store.pathWasRevalidated = true\n }\n}\n"],"names":["abortAndThrowOnSynchronousRequestDataAccess","postponeWithTracking","isDynamicRoute","NEXT_CACHE_IMPLICIT_TAG_ID","NEXT_CACHE_SOFT_TAG_MAX_LENGTH","workAsyncStorage","workUnitAsyncStorage","DynamicServerError","InvariantError","revalidateTag","tag","profile","console","warn","revalidate","updateTag","workStore","getStore","page","endsWith","Error","undefined","refresh","workUnitStore","phase","pathWasRevalidated","revalidatePath","originalPath","type","length","normalizedPath","tags","push","expression","store","incrementalCache","route","error","dynamicTracking","err","dynamicUsageDescription","dynamicUsageStack","stack","process","env","NODE_ENV","usedDynamic","pendingRevalidatedTags","existingIndex","findIndex","item","JSON","stringify","cacheLife","cacheLifeProfiles","expire"],"mappings":"AAAA,SACEA,2CAA2C,EAC3CC,oBAAoB,QACf,qCAAoC;AAC3C,SAASC,cAAc,QAAQ,mCAAkC;AACjE,SACEC,0BAA0B,EAC1BC,8BAA8B,QACzB,yBAAwB;AAC/B,SAASC,gBAAgB,QAAQ,+CAA8C;AAC/E,SAASC,oBAAoB,QAAQ,oDAAmD;AACxF,SAASC,kBAAkB,QAAQ,kDAAiD;AACpF,SAASC,cAAc,QAAQ,sCAAqC;AAMpE;;;;CAIC,GACD,OAAO,SAASC,cAAcC,GAAW,EAAEC,OAAiC;IAC1E,IAAI,CAACA,SAAS;QACZC,QAAQC,IAAI,CACV;IAEJ;IACA,OAAOC,WAAW;QAACJ;KAAI,EAAE,CAAC,cAAc,EAAEA,KAAK,EAAEC;AACnD;AAEA;;;;;CAKC,GACD,OAAO,SAASI,UAAUL,GAAW;IACnC,MAAMM,YAAYX,iBAAiBY,QAAQ;IAE3C,+DAA+D;IAC/D,yBAAyB;IACzB,IAAI,CAACD,aAAaA,UAAUE,IAAI,CAACC,QAAQ,CAAC,WAAW;QACnD,MAAM,qBAIL,CAJK,IAAIC,MACR,+DACE,8FACA,sFAHE,qBAAA;mBAAA;wBAAA;0BAAA;QAIN;IACF;IACA,+EAA+E;IAC/E,OAAON,WAAW;QAACJ;KAAI,EAAE,CAAC,UAAU,EAAEA,KAAK,EAAEW;AAC/C;AAEA;;;;CAIC,GACD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