PHP 7.4.33
Preview: static-paths-worker.js Size: 3.69 KB
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/next/dist/server/dev/static-paths-worker.js
"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "loadStaticPaths", {
    enumerable: true,
    get: function() {
        return loadStaticPaths;
    }
});
require("../require-hook");
require("../node-environment");
const _utils = require("../../build/utils");
const _appsegments = require("../../build/segment-config/app/app-segments");
const _loadcomponents = require("../load-components");
const _setuphttpagentenv = require("../setup-http-agent-env");
const _checks = require("../route-modules/checks");
const _ppr = require("../lib/experimental/ppr");
const _invarianterror = require("../../shared/lib/invariant-error");
const _collectrootparamkeys = require("../../build/segment-config/app/collect-root-param-keys");
const _app = require("../../build/static-paths/app");
const _pages = require("../../build/static-paths/pages");
const _createincrementalcache = require("../../export/helpers/create-incremental-cache");
async function loadStaticPaths({ dir, distDir, pathname, config, httpAgentOptions, locales, defaultLocale, isAppPath, page, isrFlushToDisk, fetchCacheKeyPrefix, maxMemoryCacheSize, requestHeaders, cacheHandler, cacheHandlers, cacheLifeProfiles, nextConfigOutput, buildId, authInterrupts, sriEnabled }) {
    // this needs to be initialized before loadComponents otherwise
    // "use cache" could be missing it's cache handlers
    await (0, _createincrementalcache.createIncrementalCache)({
        dir,
        distDir,
        cacheHandler,
        cacheHandlers,
        requestHeaders,
        fetchCacheKeyPrefix,
        flushToDisk: isrFlushToDisk,
        cacheMaxMemorySize: maxMemoryCacheSize
    });
    // update work memory runtime-config
    require('../../shared/lib/runtime-config.external').setConfig(config);
    (0, _setuphttpagentenv.setHttpClientAndAgentOptions)({
        httpAgentOptions
    });
    const components = await (0, _loadcomponents.loadComponents)({
        distDir,
        // In `pages/`, the page is the same as the pathname.
        page: page || pathname,
        isAppPath,
        isDev: true,
        sriEnabled
    });
    if (isAppPath) {
        const segments = await (0, _appsegments.collectSegments)(components);
        const isRoutePPREnabled = (0, _checks.isAppPageRouteModule)(components.routeModule) && (0, _ppr.checkIsRoutePPREnabled)(config.pprConfig, (0, _utils.reduceAppConfig)(segments));
        const rootParamKeys = (0, _collectrootparamkeys.collectRootParamKeys)(components);
        return (0, _app.buildAppStaticPaths)({
            dir,
            page: pathname,
            dynamicIO: config.dynamicIO,
            segments,
            distDir,
            requestHeaders,
            cacheHandler,
            cacheLifeProfiles,
            isrFlushToDisk,
            fetchCacheKeyPrefix,
            maxMemoryCacheSize,
            ComponentMod: components.ComponentMod,
            nextConfigOutput,
            isRoutePPREnabled,
            buildId,
            authInterrupts,
            rootParamKeys
        });
    } else if (!components.getStaticPaths) {
        // We shouldn't get to this point since the worker should only be called for
        // SSG pages with getStaticPaths.
        throw Object.defineProperty(new _invarianterror.InvariantError(`Failed to load page with getStaticPaths for ${pathname}`), "__NEXT_ERROR_CODE", {
            value: "E605",
            enumerable: false,
            configurable: true
        });
    }
    return (0, _pages.buildPagesStaticPaths)({
        page: pathname,
        getStaticPaths: components.getStaticPaths,
        configFileName: config.configFileName,
        locales,
        defaultLocale
    });
}

//# sourceMappingURL=static-paths-worker.js.map

Directory Contents

Dirs: 0 × Files: 45
Name Size Perms Modified Actions
201 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
2.98 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
2.56 KB lrw-r--r-- 2025-03-28 11:04:43
Edit Download
148 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
348 B lrw-r--r-- 2025-03-28 11:04:40
Edit Download
363 B lrw-r--r-- 2025-03-28 11:04:43
Edit Download
188 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.22 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
1.93 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
1.65 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
9.39 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
13.81 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
338 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
41.91 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
60.34 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
5.46 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
1.49 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
5.64 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
3.78 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
63.35 KB lrw-r--r-- 2025-03-28 11:04:40
Edit Download
91.72 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
637 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
4.74 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
8.24 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
120 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
385 B lrw-r--r-- 2025-03-28 11:04:41
Edit Download
291 B lrw-r--r-- 2025-03-28 11:04:44
Edit Download
5.72 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
30.42 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
48.81 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
4.79 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
29.54 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
47.86 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
329 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
3.57 KB lrw-r--r-- 2025-03-28 11:04:41
Edit Download
3.27 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
115 B lrw-r--r-- 2025-03-28 11:04:45
Edit Download
2.02 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
2.42 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
1.66 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
3.69 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
6.61 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
5.50 KB lrw-r--r-- 2025-03-28 11:04:45
Edit Download
29.55 KB lrw-r--r-- 2025-03-28 11:04:42
Edit Download
44.55 KB lrw-r--r-- 2025-03-28 11:04:44
Edit Download
If ZipArchive is unavailable, a .tar will be created (no compression).