/opt/canhelp/node_modules/next/dist/esm/server/app-render
NameSizeModeActions
metadata-insertion/-0755rm
module-loading/-0755rm
rsc/-0755rm
action-async-storage-instance.js1920644editdlrm
action-async-storage-instance.js.map5030644editdlrm
action-async-storage.external.js3020644editdlrm
action-async-storage.external.js.map7650644editdlrm
action-handler.js476380644editdlrm
action-handler.js.map686590644editdlrm
action-utils.js37050644editdlrm
action-utils.js.map55600644editdlrm
after-task-async-storage-instance.js1990644editdlrm
after-task-async-storage-instance.js.map5230644editdlrm
after-task-async-storage.external.js3110644editdlrm
after-task-async-storage.external.js.map10640644editdlrm
app-render-prerender-utils.js67620644editdlrm
app-render-prerender-utils.js.map108130644editdlrm
app-render-render-utils.js11190644editdlrm
app-render-render-utils.js.map16180644editdlrm
app-render.js1579020644editdlrm
app-render.js.map2397760644editdlrm
async-local-storage.js14960644editdlrm
async-local-storage.js.map27350644editdlrm
cache-signal.js57300644editdlrm
cache-signal.js.map81190644editdlrm
collect-segment-data.js130050644editdlrm
collect-segment-data.js.map223980644editdlrm
create-component-styles-and-scripts.js11380644editdlrm
create-component-styles-and-scripts.js.map24820644editdlrm
create-component-tree.js394850644editdlrm
create-component-tree.js.map593170644editdlrm
create-error-handler.js89000644editdlrm
create-error-handler.js.map139340644editdlrm
create-flight-router-state-from-loader-tree.js32490644editdlrm
create-flight-router-state-from-loader-tree.js.map56820644editdlrm
csrf-protection.js28010644editdlrm
csrf-protection.js.map39240644editdlrm
dynamic-access-async-storage-instance.js2070644editdlrm
dynamic-access-async-storage-instance.js.map5370644editdlrm
dynamic-access-async-storage.external.js3390644editdlrm
dynamic-access-async-storage.external.js.map8230644editdlrm
dynamic-rendering.js308630644editdlrm
dynamic-rendering.js.map455980644editdlrm
encryption-utils-server.js42770644editdlrm
encryption-utils-server.js.map71310644editdlrm
encryption-utils.js65950644editdlrm
encryption-utils.js.map111280644editdlrm
encryption.js112490644editdlrm
encryption.js.map167680644editdlrm
entry-base.js31810644editdlrm
entry-base.js.map60550644editdlrm
flight-render-result.js5090644editdlrm
flight-render-result.js.map9870644editdlrm
get-asset-query-string.js7790644editdlrm
get-asset-query-string.js.map15730644editdlrm
get-css-inlined-link-tags.js14030644editdlrm
get-css-inlined-link-tags.js.map25700644editdlrm
get-layer-assets.js27870644editdlrm
get-layer-assets.js.map55500644editdlrm
get-preloadable-fonts.js12940644editdlrm
get-preloadable-fonts.js.map23840644editdlrm
get-script-nonce-from-header.js17750644editdlrm
get-script-nonce-from-header.js.map27840644editdlrm
get-segment-param.js13580644editdlrm
get-segment-param.js.map23520644editdlrm
get-short-dynamic-param-type.js6640644editdlrm
get-short-dynamic-param-type.js.map11670644editdlrm
has-loading-component-in-tree.js3120644editdlrm
has-loading-component-in-tree.js.map7960644editdlrm
interop-default.js1810644editdlrm
interop-default.js.map3940644editdlrm
make-get-server-inserted-html.js40760644editdlrm
make-get-server-inserted-html.js.map66150644editdlrm
parse-and-validate-flight-router-state.js15710644editdlrm
parse-and-validate-flight-router-state.js.map24350644editdlrm
parse-loader-tree.js7980644editdlrm
parse-loader-tree.js.map14270644editdlrm
postponed-state.js54310644editdlrm
postponed-state.js.map90910644editdlrm
prospective-render-utils.js22770644editdlrm
prospective-render-utils.js.map34210644editdlrm
react-large-shell-error.js3700644editdlrm
react-large-shell-error.js.map7730644editdlrm
react-server.node.js3160644editdlrm
react-server.node.js.map6370644editdlrm
render-css-resource.js24070644editdlrm
render-css-resource.js.map39630644editdlrm
required-scripts.js24420644editdlrm
required-scripts.js.map42940644editdlrm
segment-explorer-path.js27560644editdlrm
segment-explorer-path.js.map52080644editdlrm
server-inserted-html.js10300644editdlrm
server-inserted-html.js.map17780644editdlrm
strip-flight-headers.js3650644editdlrm
strip-flight-headers.js.map7380644editdlrm
types.js20200644editdlrm
types.js.map131450644editdlrm
use-flight-response.js67580644editdlrm
use-flight-response.js.map111580644editdlrm
walk-tree-with-flight-router-state.js108080644editdlrm
walk-tree-with-flight-router-state.js.map173820644editdlrm
work-async-storage-instance.js1880644editdlrm
work-async-storage-instance.js.map4910644editdlrm
work-async-storage.external.js2920644editdlrm
work-async-storage.external.js.map42740644editdlrm
work-unit-async-storage-instance.js1970644editdlrm
work-unit-async-storage-instance.js.map5170644editdlrm
work-unit-async-storage.external.js64230644editdlrm
work-unit-async-storage.external.js.map209590644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/server/app-render/action-utils.js (3705B)
import { normalizeAppPath } from '../../shared/lib/router/utils/app-paths'; import { pathHasPrefix } from '../../shared/lib/router/utils/path-has-prefix'; import { removePathPrefix } from '../../shared/lib/router/utils/remove-path-prefix'; import { workAsyncStorage } from './work-async-storage.external'; // This function creates a Flight-acceptable server module map proxy from our // Server Reference Manifest similar to our client module map. // This is because our manifest contains a lot of internal Next.js data that // are relevant to the runtime, workers, etc. that React doesn't need to know. export function createServerModuleMap({ serverActionsManifest }) { return new Proxy({}, { get: (_, id)=>{ var _serverActionsManifest__id, _serverActionsManifest_; const workers = (_serverActionsManifest_ = serverActionsManifest[process.env.NEXT_RUNTIME === 'edge' ? 'edge' : 'node']) == null ? void 0 : (_serverActionsManifest__id = _serverActionsManifest_[id]) == null ? void 0 : _serverActionsManifest__id.workers; if (!workers) { return undefined; } const workStore = workAsyncStorage.getStore(); let workerEntry; if (workStore) { workerEntry = workers[normalizeWorkerPageName(workStore.page)]; } else { // If there's no work store defined, we can assume that a server // module map is needed during module evaluation, e.g. to create a // server action using a higher-order function. Therefore it should be // safe to return any entry from the manifest that matches the action // ID. They all refer to the same module ID, which must also exist in // the current page bundle. TODO: This is currently not guaranteed in // Turbopack, and needs to be fixed. workerEntry = Object.values(workers).at(0); } if (!workerEntry) { return undefined; } const { moduleId, async } = workerEntry; return { id: moduleId, name: id, chunks: [], async }; } }); } /** * Checks if the requested action has a worker for the current page. * If not, it returns the first worker that has a handler for the action. */ export function selectWorkerForForwarding(actionId, pageName, serverActionsManifest) { var _serverActionsManifest__actionId; const workers = (_serverActionsManifest__actionId = serverActionsManifest[process.env.NEXT_RUNTIME === 'edge' ? 'edge' : 'node'][actionId]) == null ? void 0 : _serverActionsManifest__actionId.workers; const workerName = normalizeWorkerPageName(pageName); // no workers, nothing to forward to if (!workers) return; // if there is a worker for this page, no need to forward it. if (workers[workerName]) { return; } // otherwise, grab the first worker that has a handler for this action id return denormalizeWorkerPageName(Object.keys(workers)[0]); } /** * The flight entry loader keys actions by bundlePath. * bundlePath corresponds with the relative path (including 'app') to the page entrypoint. */ function normalizeWorkerPageName(pageName) { if (pathHasPrefix(pageName, 'app')) { return pageName; } return 'app' + pageName; } /** * Converts a bundlePath (relative path to the entrypoint) to a routable page name */ function denormalizeWorkerPageName(bundlePath) { return normalizeAppPath(removePathPrefix(bundlePath, 'app')); } //# sourceMappingURL=action-utils.js.map