/opt/canhelp/node_modules/next/dist/server/web/spec-extension
NameSizeModeActions
adapters/-0755rm
cookies.d.ts1100644editdlrm
cookies.js7140644editdlrm
cookies.js.map4100644editdlrm
fetch-event.d.ts14780644editdlrm
fetch-event.js32770644editdlrm
fetch-event.js.map48770644editdlrm
image-response.d.ts2950644editdlrm
image-response.js7950644editdlrm
image-response.js.map7340644editdlrm
request.d.ts12670644editdlrm
request.js31680644editdlrm
request.js.map55810644editdlrm
response.d.ts16100644editdlrm
response.js49770644editdlrm
response.js.map87040644editdlrm
revalidate.d.ts14500644editdlrm
revalidate.js83440644editdlrm
revalidate.js.map114760644editdlrm
unstable-cache.d.ts5460644editdlrm
unstable-cache.js169200644editdlrm
unstable-cache.js.map237470644editdlrm
unstable-no-store.d.ts7480644editdlrm
unstable-no-store.js19160644editdlrm
unstable-no-store.js.map29990644editdlrm
url-pattern.d.ts800644editdlrm
url-pattern.js4000644editdlrm
url-pattern.js.map4620644editdlrm
user-agent.d.ts6680644editdlrm
user-agent.js14870644editdlrm
user-agent.js.map17930644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/server/web/spec-extension/revalidate.js.map (11476B)
{"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\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) {\n return revalidate([tag], `revalidateTag ${tag}`)\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: `unstable_expirePath`](https://nextjs.org/docs/app/api-reference/functions/unstable_expirePath)\n */\nexport function unstable_expirePath(\n originalPath: string,\n type?: 'layout' | 'page'\n) {\n if (originalPath.length > NEXT_CACHE_SOFT_TAG_MAX_LENGTH) {\n console.warn(\n `Warning: expirePath 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/unstable_expirePath`\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 \"expirePath\", but the \"type\" parameter is missing. This has no effect by default, see more info here https://nextjs.org/docs/app/api-reference/functions/unstable_expirePath`\n )\n }\n return revalidate([normalizedPath], `unstable_expirePath ${originalPath}`)\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: `unstable_expireTag`](https://nextjs.org/docs/app/api-reference/functions/unstable_expireTag)\n */\nexport function unstable_expireTag(...tags: string[]) {\n return revalidate(tags, `unstable_expireTag ${tags.join(', ')}`)\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 return revalidate([normalizedPath], `revalidatePath ${originalPath}`)\n}\n\nfunction revalidate(tags: string[], expression: string) {\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 if (!store.pendingRevalidatedTags.includes(tag)) {\n store.pendingRevalidatedTags.push(tag)\n }\n }\n\n // TODO: only revalidate if the path matches\n store.pathWasRevalidated = true\n}\n"],"names":["revalidatePath","revalidateTag","unstable_expirePath","unstable_expireTag","tag","revalidate","originalPath","type","length","NEXT_CACHE_SOFT_TAG_MAX_LENGTH","console","warn","normalizedPath","NEXT_CACHE_IMPLICIT_TAG_ID","endsWith","isDynamicRoute","tags","join","expression","store","workAsyncStorage","getStore","incrementalCache","Error","workUnitStore","workUnitAsyncStorage","phase","route","error","abortAndThrowOnSynchronousRequestDataAccess","InvariantError","postponeWithTracking","dynamicTracking","err","DynamicServerError","dynamicUsageDescription","dynamicUsageStack","stack","process","env","NODE_ENV","usedDynamic","pendingRevalidatedTags","includes","push","pathWasRevalidated"],"mappings":";;;;;;;;;;;;;;;;;IAiEgBA,cAAc;eAAdA;;IA9CAC,aAAa;eAAbA;;IASAC,mBAAmB;eAAnBA;;IA4BAC,kBAAkB;eAAlBA;;;k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