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
23 KiB
Text
1 line
No EOL
23 KiB
Text
{"version":3,"sources":["../../../../../src/client/components/router-reducer/reducers/server-action-reducer.ts"],"sourcesContent":["import type {\n ActionFlightResponse,\n ActionResult,\n} from '../../../../shared/lib/app-router-types'\nimport { callServer } from '../../../app-call-server'\nimport { findSourceMapURL } from '../../../app-find-source-map-url'\nimport {\n ACTION_HEADER,\n NEXT_ACTION_NOT_FOUND_HEADER,\n NEXT_IS_PRERENDER_HEADER,\n NEXT_HTML_REQUEST_ID_HEADER,\n NEXT_ROUTER_STATE_TREE_HEADER,\n NEXT_URL,\n RSC_CONTENT_TYPE_HEADER,\n NEXT_REQUEST_ID_HEADER,\n} from '../../app-router-headers'\nimport { UnrecognizedActionError } from '../../unrecognized-action-error'\n\n// TODO: Explicitly import from client.browser\n// eslint-disable-next-line import/no-extraneous-dependencies\nimport {\n createFromFetch as createFromFetchBrowser,\n createTemporaryReferenceSet,\n encodeReply,\n} from 'react-server-dom-webpack/client'\n\nimport type {\n ReadonlyReducerState,\n ReducerState,\n ServerActionAction,\n ServerActionMutable,\n} from '../router-reducer-types'\nimport { assignLocation } from '../../../assign-location'\nimport { createHrefFromUrl } from '../create-href-from-url'\nimport { handleExternalUrl } from './navigate-reducer'\nimport { applyRouterStatePatchToTree } from '../apply-router-state-patch-to-tree'\nimport { isNavigatingToNewRootLayout } from '../is-navigating-to-new-root-layout'\nimport type { CacheNode } from '../../../../shared/lib/app-router-types'\nimport { handleMutable } from '../handle-mutable'\nimport { fillLazyItemsTillLeafWithHead } from '../fill-lazy-items-till-leaf-with-head'\nimport { createEmptyCacheNode } from '../../app-router'\nimport { hasInterceptionRouteInCurrentTree } from './has-interception-route-in-current-tree'\nimport { handleSegmentMismatch } from '../handle-segment-mismatch'\nimport { refreshInactiveParallelSegments } from '../refetch-inactive-parallel-segments'\nimport {\n normalizeFlightData,\n prepareFlightRouterStateForRequest,\n type NormalizedFlightData,\n} from '../../../flight-data-helpers'\nimport { getRedirectError } from '../../redirect'\nimport { RedirectType } from '../../redirect-error'\nimport { removeBasePath } from '../../../remove-base-path'\nimport { hasBasePath } from '../../../has-base-path'\nimport {\n extractInfoFromServerReferenceId,\n omitUnusedArgs,\n} from '../../../../shared/lib/server-reference-info'\nimport { revalidateEntireCache } from '../../segment-cache'\n\nconst createFromFetch =\n createFromFetchBrowser as (typeof import('react-server-dom-webpack/client.browser'))['createFromFetch']\n\nlet createDebugChannel:\n | typeof import('../../../dev/debug-channel').createDebugChannel\n | undefined\n\nif (\n process.env.NODE_ENV !== 'production' &&\n process.env.__NEXT_REACT_DEBUG_CHANNEL\n) {\n createDebugChannel = (\n require('../../../dev/debug-channel') as typeof import('../../../dev/debug-channel')\n ).createDebugChannel\n}\n\ntype FetchServerActionResult = {\n redirectLocation: URL | undefined\n redirectType: RedirectType | undefined\n actionResult: ActionResult | undefined\n actionFlightData: NormalizedFlightData[] | string | undefined\n isPrerender: boolean\n revalidatedParts: {\n tag: boolean\n cookie: boolean\n paths: string[]\n }\n}\n\nasync function fetchServerAction(\n state: ReadonlyReducerState,\n nextUrl: ReadonlyReducerState['nextUrl'],\n { actionId, actionArgs }: ServerActionAction\n): Promise<FetchServerActionResult> {\n const temporaryReferences = createTemporaryReferenceSet()\n const info = extractInfoFromServerReferenceId(actionId)\n\n // TODO: Currently, we're only omitting unused args for the experimental \"use\n // cache\" functions. Once the server reference info byte feature is stable, we\n // should apply this to server actions as well.\n const usedArgs =\n info.type === 'use-cache' ? omitUnusedArgs(actionArgs, info) : actionArgs\n\n const body = await encodeReply(usedArgs, { temporaryReferences })\n\n const headers: Record<string, string> = {\n Accept: RSC_CONTENT_TYPE_HEADER,\n [ACTION_HEADER]: actionId,\n [NEXT_ROUTER_STATE_TREE_HEADER]: prepareFlightRouterStateForRequest(\n state.tree\n ),\n }\n\n if (process.env.NEXT_DEPLOYMENT_ID) {\n headers['x-deployment-id'] = process.env.NEXT_DEPLOYMENT_ID\n }\n\n if (nextUrl) {\n headers[NEXT_URL] = nextUrl\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (self.__next_r) {\n headers[NEXT_HTML_REQUEST_ID_HEADER] = self.__next_r\n }\n\n // Create a new request ID for the server action request. The server uses\n // this to tag debug information sent via WebSocket to the client, which\n // then routes those chunks to the debug channel associated with this ID.\n headers[NEXT_REQUEST_ID_HEADER] = crypto\n .getRandomValues(new Uint32Array(1))[0]\n .toString(16)\n }\n\n const res = await fetch(state.canonicalUrl, { method: 'POST', headers, body })\n\n // Handle server actions that the server didn't recognize.\n const unrecognizedActionHeader = res.headers.get(NEXT_ACTION_NOT_FOUND_HEADER)\n if (unrecognizedActionHeader === '1') {\n throw new UnrecognizedActionError(\n `Server Action \"${actionId}\" was not found on the server. \\nRead more: https://nextjs.org/docs/messages/failed-to-find-server-action`\n )\n }\n\n const redirectHeader = res.headers.get('x-action-redirect')\n const [location, _redirectType] = redirectHeader?.split(';') || []\n let redirectType: RedirectType | undefined\n switch (_redirectType) {\n case 'push':\n redirectType = RedirectType.push\n break\n case 'replace':\n redirectType = RedirectType.replace\n break\n default:\n redirectType = undefined\n }\n\n const isPrerender = !!res.headers.get(NEXT_IS_PRERENDER_HEADER)\n let revalidatedParts: FetchServerActionResult['revalidatedParts']\n try {\n const revalidatedHeader = JSON.parse(\n res.headers.get('x-action-revalidated') || '[[],0,0]'\n )\n revalidatedParts = {\n paths: revalidatedHeader[0] || [],\n tag: !!revalidatedHeader[1],\n cookie: revalidatedHeader[2],\n }\n } catch (e) {\n revalidatedParts = NO_REVALIDATED_PARTS\n }\n\n const redirectLocation = location\n ? assignLocation(\n location,\n new URL(state.canonicalUrl, window.location.href)\n )\n : undefined\n\n const contentType = res.headers.get('content-type')\n const isRscResponse = !!(\n contentType && contentType.startsWith(RSC_CONTENT_TYPE_HEADER)\n )\n\n // Handle invalid server action responses.\n // A valid response must have `content-type: text/x-component`, unless it's an external redirect.\n // (external redirects have an 'x-action-redirect' header, but the body is an empty 'text/plain')\n if (!isRscResponse && !redirectLocation) {\n // The server can respond with a text/plain error message, but we'll fallback to something generic\n // if there isn't one.\n const message =\n res.status >= 400 && contentType === 'text/plain'\n ? await res.text()\n : 'An unexpected response was received from the server.'\n\n throw new Error(message)\n }\n\n let actionResult: FetchServerActionResult['actionResult']\n let actionFlightData: FetchServerActionResult['actionFlightData']\n\n if (isRscResponse) {\n const response: ActionFlightResponse = await createFromFetch(\n Promise.resolve(res),\n {\n callServer,\n findSourceMapURL,\n temporaryReferences,\n debugChannel: createDebugChannel && createDebugChannel(headers),\n }\n )\n\n // An internal redirect can send an RSC response, but does not have a useful `actionResult`.\n actionResult = redirectLocation ? undefined : response.a\n actionFlightData = normalizeFlightData(response.f)\n } else {\n // An external redirect doesn't contain RSC data.\n actionResult = undefined\n actionFlightData = undefined\n }\n\n return {\n actionResult,\n actionFlightData,\n redirectLocation,\n redirectType,\n revalidatedParts,\n isPrerender,\n }\n}\n\nconst NO_REVALIDATED_PARTS = {\n paths: [],\n tag: false,\n cookie: false,\n}\n\n/*\n * This reducer is responsible for calling the server action and processing any side-effects from the server action.\n * It does not mutate the state by itself but rather delegates to other reducers to do the actual mutation.\n */\nexport function serverActionReducer(\n state: ReadonlyReducerState,\n action: ServerActionAction\n): ReducerState {\n const { resolve, reject } = action\n const mutable: ServerActionMutable = {}\n\n let currentTree = state.tree\n\n mutable.preserveCustomHistoryState = false\n\n // only pass along the `nextUrl` param (used for interception routes) if the current route was intercepted.\n // If the route has been intercepted, the action should be as well.\n // Otherwise the server action might be intercepted with the wrong action id\n // (ie, one that corresponds with the intercepted route)\n const nextUrl =\n // We always send the last next-url, not the current when\n // performing a dynamic request. This is because we update\n // the next-url after a navigation, but we want the same\n // interception route to be matched that used the last\n // next-url.\n (state.previousNextUrl || state.nextUrl) &&\n hasInterceptionRouteInCurrentTree(state.tree)\n ? state.previousNextUrl || state.nextUrl\n : null\n\n const navigatedAt = Date.now()\n\n return fetchServerAction(state, nextUrl, action).then(\n async ({\n actionResult,\n actionFlightData: flightData,\n redirectLocation,\n redirectType,\n revalidatedParts,\n }) => {\n let redirectHref: string | undefined\n\n // honor the redirect type instead of defaulting to push in case of server actions.\n if (redirectLocation) {\n if (redirectType === RedirectType.replace) {\n state.pushRef.pendingPush = false\n mutable.pendingPush = false\n } else {\n state.pushRef.pendingPush = true\n mutable.pendingPush = true\n }\n\n redirectHref = createHrefFromUrl(redirectLocation, false)\n mutable.canonicalUrl = redirectHref\n }\n\n if (!flightData) {\n resolve(actionResult)\n\n // If there is a redirect but no flight data we need to do a mpaNavigation.\n if (redirectLocation) {\n return handleExternalUrl(\n state,\n mutable,\n redirectLocation.href,\n state.pushRef.pendingPush\n )\n }\n return state\n }\n\n if (typeof flightData === 'string') {\n // Handle case when navigating to page in `pages` from `app`\n resolve(actionResult)\n\n return handleExternalUrl(\n state,\n mutable,\n flightData,\n state.pushRef.pendingPush\n )\n }\n\n const actionRevalidated =\n revalidatedParts.paths.length > 0 ||\n revalidatedParts.tag ||\n revalidatedParts.cookie\n\n // Store whether this action triggered any revalidation\n // The action queue will use this information to potentially\n // trigger a refresh action if the action was discarded\n // (ie, due to a navigation, before the action completed)\n if (actionRevalidated) {\n action.didRevalidate = true\n }\n\n for (const normalizedFlightData of flightData) {\n const {\n tree: treePatch,\n seedData: cacheNodeSeedData,\n head,\n isRootRender,\n } = normalizedFlightData\n\n if (!isRootRender) {\n // TODO-APP: handle this case better\n console.log('SERVER ACTION APPLY FAILED')\n resolve(actionResult)\n\n return state\n }\n\n // Given the path can only have two items the items are only the router state and rsc for the root.\n const newTree = applyRouterStatePatchToTree(\n // TODO-APP: remove ''\n [''],\n currentTree,\n treePatch,\n redirectHref ? redirectHref : state.canonicalUrl\n )\n\n if (newTree === null) {\n resolve(actionResult)\n\n return handleSegmentMismatch(state, action, treePatch)\n }\n\n if (isNavigatingToNewRootLayout(currentTree, newTree)) {\n resolve(actionResult)\n\n return handleExternalUrl(\n state,\n mutable,\n redirectHref || state.canonicalUrl,\n state.pushRef.pendingPush\n )\n }\n\n // The server sent back RSC data for the server action, so we need to apply it to the cache.\n if (cacheNodeSeedData !== null) {\n const rsc = cacheNodeSeedData[0]\n const cache: CacheNode = createEmptyCacheNode()\n cache.rsc = rsc\n cache.prefetchRsc = null\n cache.loading = cacheNodeSeedData[2]\n fillLazyItemsTillLeafWithHead(\n navigatedAt,\n cache,\n // Existing cache is not passed in as server actions have to invalidate the entire cache.\n undefined,\n treePatch,\n cacheNodeSeedData,\n head\n )\n\n mutable.cache = cache\n revalidateEntireCache(state.nextUrl, newTree)\n if (actionRevalidated) {\n await refreshInactiveParallelSegments({\n navigatedAt,\n state,\n updatedTree: newTree,\n updatedCache: cache,\n includeNextUrl: Boolean(nextUrl),\n canonicalUrl: mutable.canonicalUrl || state.canonicalUrl,\n })\n }\n }\n\n mutable.patchedTree = newTree\n currentTree = newTree\n }\n\n if (redirectLocation && redirectHref) {\n // If the action triggered a redirect, the action promise will be rejected with\n // a redirect so that it's handled by RedirectBoundary as we won't have a valid\n // action result to resolve the promise with. This will effectively reset the state of\n // the component that called the action as the error boundary will remount the tree.\n // The status code doesn't matter here as the action handler will have already sent\n // a response with the correct status code.\n reject(\n getRedirectError(\n hasBasePath(redirectHref)\n ? removeBasePath(redirectHref)\n : redirectHref,\n redirectType || RedirectType.push\n )\n )\n\n // TODO: Investigate why this is needed with Activity.\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n return state\n }\n } else {\n resolve(actionResult)\n }\n\n return handleMutable(state, mutable)\n },\n (e: any) => {\n // When the server action is rejected we don't update the state and instead call the reject handler of the promise.\n reject(e)\n\n return state\n }\n )\n}\n"],"names":["serverActionReducer","createFromFetch","createFromFetchBrowser","createDebugChannel","process","env","NODE_ENV","__NEXT_REACT_DEBUG_CHANNEL","require","fetchServerAction","state","nextUrl","actionId","actionArgs","temporaryReferences","createTemporaryReferenceSet","info","extractInfoFromServerReferenceId","usedArgs","type","omitUnusedArgs","body","encodeReply","headers","Accept","RSC_CONTENT_TYPE_HEADER","ACTION_HEADER","NEXT_ROUTER_STATE_TREE_HEADER","prepareFlightRouterStateForRequest","tree","NEXT_DEPLOYMENT_ID","NEXT_URL","self","__next_r","NEXT_HTML_REQUEST_ID_HEADER","NEXT_REQUEST_ID_HEADER","crypto","getRandomValues","Uint32Array","toString","res","fetch","canonicalUrl","method","unrecognizedActionHeader","get","NEXT_ACTION_NOT_FOUND_HEADER","UnrecognizedActionError","redirectHeader","location","_redirectType","split","redirectType","RedirectType","push","replace","undefined","isPrerender","NEXT_IS_PRERENDER_HEADER","revalidatedParts","revalidatedHeader","JSON","parse","paths","tag","cookie","e","NO_REVALIDATED_PARTS","redirectLocation","assignLocation","URL","window","href","contentType","isRscResponse","startsWith","message","status","text","Error","actionResult","actionFlightData","response","Promise","resolve","callServer","findSourceMapURL","debugChannel","a","normalizeFlightData","f","action","reject","mutable","currentTree","preserveCustomHistoryState","previousNextUrl","hasInterceptionRouteInCurrentTree","navigatedAt","Date","now","then","flightData","redirectHref","pushRef","pendingPush","createHrefFromUrl","handleExternalUrl","actionRevalidated","length","didRevalidate","normalizedFlightData","treePatch","seedData","cacheNodeSeedData","head","isRootRender","console","log","newTree","applyRouterStatePatchToTree","handleSegmentMismatch","isNavigatingToNewRootLayout","rsc","cache","createEmptyCacheNode","prefetchRsc","loading","fillLazyItemsTillLeafWithHead","revalidateEntireCache","refreshInactiveParallelSegments","updatedTree","updatedCache","includeNextUrl","Boolean","patchedTree","getRedirectError","hasBasePath","removeBasePath","__NEXT_CACHE_COMPONENTS","handleMutable"],"mappings":";;;;+BAiPgBA;;;eAAAA;;;+BA7OW;qCACM;kCAU1B;yCACiC;wBAQjC;gCAQwB;mCACG;iCACA;6CACU;6CACA;+BAEd;+CACgB;2BACT;mDACa;uCACZ;iDACU;mCAKzC;0BAC0B;+BACJ;gCACE;6BACH;qCAIr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