/opt/canhelp/node_modules/next/dist/esm/server
NameSizeModeActions
after/-0755rm
api-utils/-0755rm
app-render/-0755rm
async-storage/-0755rm
base-http/-0755rm
dev/-0755rm
instrumentation/-0755rm
lib/-0755rm
node-environment-extensions/-0755rm
normalizers/-0755rm
og/-0755rm
request/-0755rm
response-cache/-0755rm
resume-data-cache/-0755rm
route-definitions/-0755rm
route-matcher-managers/-0755rm
route-matcher-providers/-0755rm
route-matchers/-0755rm
route-matches/-0755rm
route-modules/-0755rm
stream-utils/-0755rm
typescript/-0755rm
use-cache/-0755rm
web/-0755rm
accept-header.js38520644editdlrm
accept-header.js.map64540644editdlrm
base-server.js965210644editdlrm
base-server.js.map1621330644editdlrm
body-streams.js29790644editdlrm
body-streams.js.map54080644editdlrm
cache-dir.js3240644editdlrm
cache-dir.js.map6980644editdlrm
ci-info.js6560644editdlrm
ci-info.js.map13170644editdlrm
client-component-renderer-logger.js17390644editdlrm
client-component-renderer-logger.js.map29840644editdlrm
config-schema.js273500644editdlrm
config-schema.js.map541600644editdlrm
config-shared.js66020644editdlrm
config-shared.js.map580730644editdlrm
config-utils.js56760644editdlrm
config-utils.js.map65820644editdlrm
config.js714880644editdlrm
config.js.map996810644editdlrm
create-deduped-by-callsite-server-error-logger.js23300644editdlrm
create-deduped-by-callsite-server-error-logger.js.map36410644editdlrm
crypto-utils.js23300644editdlrm
crypto-utils.js.map42990644editdlrm
dynamic-rendering-utils.js29840644editdlrm
dynamic-rendering-utils.js.map48830644editdlrm
font-utils.js15540644editdlrm
font-utils.js.map30730644editdlrm
get-app-route-from-entrypoint.js4520644editdlrm
get-app-route-from-entrypoint.js.map8520644editdlrm
get-page-files.js5470644editdlrm
get-page-files.js.map16990644editdlrm
get-route-from-entrypoint.js7940644editdlrm
get-route-from-entrypoint.js.map13980644editdlrm
htmlescape.js5100644editdlrm
htmlescape.js.map9610644editdlrm
image-optimizer.js334240644editdlrm
image-optimizer.js.map553920644editdlrm
internal-utils.js5780644editdlrm
internal-utils.js.map13080644editdlrm
load-components.js62050644editdlrm
load-components.js.map131850644editdlrm
load-default-error-components.js15560644editdlrm
load-default-error-components.js.map38870644editdlrm
load-manifest.external.js23080644editdlrm
load-manifest.external.js.map57630644editdlrm
match-bundle.js3200644editdlrm
match-bundle.js.map7050644editdlrm
next-server.js654510644editdlrm
next-server.js.map1101450644editdlrm
next-typescript.js910644editdlrm
next-typescript.js.map2150644editdlrm
next.js135400644editdlrm
next.js.map269300644editdlrm
node-environment-baseline.js8760644editdlrm
node-environment-baseline.js.map15540644editdlrm
node-environment.js7570644editdlrm
node-environment.js.map11650644editdlrm
node-polyfill-crypto.js5440644editdlrm
node-polyfill-crypto.js.map10130644editdlrm
optimize-amp.js3600644editdlrm
optimize-amp.js.map8230644editdlrm
patch-error-inspect.js175330644editdlrm
patch-error-inspect.js.map285930644editdlrm
pipe-readable.js50210644editdlrm
pipe-readable.js.map77020644editdlrm
post-process.js18000644editdlrm
post-process.js.map39970644editdlrm
ReactDOMServerPages.d.ts380644editdlrm
ReactDOMServerPages.js5840644editdlrm
ReactDOMServerPages.js.map9560644editdlrm
render-result.js72040644editdlrm
render-result.js.map142390644editdlrm
render.js534870644editdlrm
render.js.map854420644editdlrm
request-meta.js13410644editdlrm
request-meta.js.map94330644editdlrm
require-hook.js22770644editdlrm
require-hook.js.map43970644editdlrm
require.js30420644editdlrm
require.js.map61070644editdlrm
revalidation-utils.js29170644editdlrm
revalidation-utils.js.map57080644editdlrm
route-kind.js8290644editdlrm
route-kind.js.map9270644editdlrm
send-payload.js21740644editdlrm
send-payload.js.map42120644editdlrm
send-response.js30400644editdlrm
send-response.js.map45980644editdlrm
serve-static.js13340644editdlrm
serve-static.js.map26030644editdlrm
server-route-utils.js10610644editdlrm
server-route-utils.js.map19990644editdlrm
server-utils.js153150644editdlrm
server-utils.js.map261390644editdlrm
setup-http-agent-env.js8320644editdlrm
setup-http-agent-env.js.map14390644editdlrm
utils.js26720644editdlrm
utils.js.map41390644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/esm/server/load-components.js (6205B)
import { BUILD_MANIFEST, REACT_LOADABLE_MANIFEST, CLIENT_REFERENCE_MANIFEST, SERVER_REFERENCE_MANIFEST, DYNAMIC_CSS_MANIFEST, SUBRESOURCE_INTEGRITY_MANIFEST } from '../shared/lib/constants'; import { join } from 'path'; import { requirePage } from './require'; import { interopDefault } from '../lib/interop-default'; import { getTracer } from './lib/trace/tracer'; import { LoadComponentsSpan } from './lib/trace/constants'; import { evalManifest, loadManifest } from './load-manifest.external'; import { wait } from '../lib/wait'; import { setReferenceManifestsSingleton } from './app-render/encryption-utils'; import { createServerModuleMap } from './app-render/action-utils'; import { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'; import { isStaticMetadataRoute } from '../lib/metadata/is-metadata-route'; /** * Load manifest file with retries, defaults to 3 attempts. */ export async function loadManifestWithRetries(manifestPath, attempts = 3) { while(true){ try { return loadManifest(manifestPath); } catch (err) { attempts--; if (attempts <= 0) throw err; await wait(100); } } } /** * Load manifest file with retries, defaults to 3 attempts, or return undefined. */ export async function tryLoadManifestWithRetries(manifestPath, attempts = 3) { try { return await loadManifestWithRetries(manifestPath, attempts); } catch (err) { return undefined; } } /** * Load manifest file with retries, defaults to 3 attempts. */ export async function evalManifestWithRetries(manifestPath, attempts = 3) { while(true){ try { return evalManifest(manifestPath); } catch (err) { attempts--; if (attempts <= 0) throw err; await wait(100); } } } async function tryLoadClientReferenceManifest(manifestPath, entryName, attempts) { try { const context = await evalManifestWithRetries(manifestPath, attempts); return context.__RSC_MANIFEST[entryName]; } catch (err) { return undefined; } } async function loadComponentsImpl({ distDir, page, isAppPath, isDev, sriEnabled }) { let DocumentMod = {}; let AppMod = {}; if (!isAppPath) { ; [DocumentMod, AppMod] = await Promise.all([ requirePage('/_document', distDir, false), requirePage('/_app', distDir, false) ]); } // In dev mode we retry loading a manifest file to handle a race condition // that can occur while app and pages are compiling at the same time, and the // build-manifest is still being written to disk while an app path is // attempting to load. const manifestLoadAttempts = isDev ? 3 : 1; let reactLoadableManifestPath; if (!process.env.TURBOPACK) { reactLoadableManifestPath = join(distDir, REACT_LOADABLE_MANIFEST); } else if (isAppPath) { reactLoadableManifestPath = join(distDir, 'server', 'app', page, REACT_LOADABLE_MANIFEST); } else { reactLoadableManifestPath = join(distDir, 'server', 'pages', normalizePagePath(page), REACT_LOADABLE_MANIFEST); } // Make sure to avoid loading the manifest for static metadata routes for better performance. const hasClientManifest = !isStaticMetadataRoute(page); // Load the manifest files first // // Loading page-specific manifests shouldn't throw an error if the manifest couldn't be found, so // that the `requirePage` call below will throw the correct error in that case // (a `PageNotFoundError`). const [buildManifest, reactLoadableManifest, dynamicCssManifest, clientReferenceManifest, serverActionsManifest, subresourceIntegrityManifest] = await Promise.all([ loadManifestWithRetries(join(distDir, BUILD_MANIFEST), manifestLoadAttempts), tryLoadManifestWithRetries(reactLoadableManifestPath, manifestLoadAttempts), // This manifest will only exist in Pages dir && Production && Webpack. isAppPath || process.env.TURBOPACK ? undefined : loadManifestWithRetries(join(distDir, `${DYNAMIC_CSS_MANIFEST}.json`), manifestLoadAttempts).catch(()=>undefined), isAppPath && hasClientManifest ? tryLoadClientReferenceManifest(join(distDir, 'server', 'app', page.replace(/%5F/g, '_') + '_' + CLIENT_REFERENCE_MANIFEST + '.js'), page.replace(/%5F/g, '_'), manifestLoadAttempts) : undefined, isAppPath ? loadManifestWithRetries(join(distDir, 'server', SERVER_REFERENCE_MANIFEST + '.json'), manifestLoadAttempts).catch(()=>null) : null, sriEnabled ? loadManifestWithRetries(join(distDir, 'server', SUBRESOURCE_INTEGRITY_MANIFEST + '.json')).catch(()=>undefined) : undefined ]); // Before requiring the actual page module, we have to set the reference // manifests to our global store so Server Action's encryption util can access // to them at the top level of the page module. if (serverActionsManifest && clientReferenceManifest) { setReferenceManifestsSingleton({ page, clientReferenceManifest, serverActionsManifest, serverModuleMap: createServerModuleMap({ serverActionsManifest }) }); } const ComponentMod = await requirePage(page, distDir, isAppPath); const Component = interopDefault(ComponentMod); const Document = interopDefault(DocumentMod); const App = interopDefault(AppMod); const { getServerSideProps, getStaticProps, getStaticPaths, routeModule } = ComponentMod; return { App, Document, Component, buildManifest, subresourceIntegrityManifest, reactLoadableManifest: reactLoadableManifest || {}, dynamicCssManifest, pageConfig: ComponentMod.config || {}, ComponentMod, getServerSideProps, getStaticProps, getStaticPaths, clientReferenceManifest, serverActionsManifest, isAppPath, page, routeModule }; } export const loadComponents = getTracer().wrap(LoadComponentsSpan.loadComponents, loadComponentsImpl); //# sourceMappingURL=load-components.js.map