vike 0.4.237 → 0.4.238-commit-3c1a09d
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/__internal/index.js +3 -3
- package/dist/cjs/client/runtime-client-routing/globalContext.js +2 -2
- package/dist/cjs/client/runtime-server-routing/globalContext.js +2 -2
- package/dist/cjs/client/runtime-server-routing/utils.js +1 -1
- package/dist/cjs/client/shared/createGetGlobalContextClient.js +5 -5
- package/dist/cjs/node/api/build.js +5 -31
- package/dist/cjs/node/api/context.js +13 -12
- package/dist/cjs/node/api/dev.js +0 -2
- package/dist/cjs/node/api/index.js +0 -2
- package/dist/cjs/node/api/onLoad.js +2 -2
- package/dist/cjs/node/api/prepareViteApiCall.js +2 -3
- package/dist/cjs/node/api/preview.js +2 -3
- package/dist/cjs/node/api/utils.js +1 -0
- package/dist/cjs/node/cli/index.js +2 -2
- package/dist/cjs/node/cli/onLoad.js +2 -2
- package/dist/cjs/node/prerender/runPrerender.js +7 -8
- package/dist/cjs/node/prerender/runPrerenderEntry.js +1 -1
- package/dist/cjs/node/runtime/csp.js +46 -0
- package/dist/cjs/node/runtime/globalContext.js +128 -112
- package/dist/cjs/node/runtime/html/injectAssets/getHtmlTags.js +11 -8
- package/dist/cjs/node/runtime/html/injectAssets/inferHtmlTags.js +5 -2
- package/dist/cjs/node/runtime/html/injectAssets/mergeScriptTags.js +4 -2
- package/dist/cjs/node/runtime/renderPage/analyzePage.js +6 -4
- package/dist/cjs/node/runtime/renderPage/createPageContextServerSide.js +1 -1
- package/dist/cjs/node/runtime/renderPage/execHookOnRenderHtml.js +1 -11
- package/dist/cjs/node/runtime/renderPage/getPageAssets/getManifestEntry.js +5 -4
- package/dist/cjs/node/runtime/renderPage/getPageAssets/{retrieveAssetsDev.js → retrievePageAssetsDev.js} +21 -6
- package/dist/cjs/node/runtime/renderPage/getPageAssets/{retrieveAssetsProd.js → retrievePageAssetsProd.js} +19 -2
- package/dist/cjs/node/runtime/renderPage/getPageAssets.js +5 -34
- package/dist/cjs/node/runtime/renderPage/loadPageConfigsLazyServerSide.js +57 -50
- package/dist/cjs/node/runtime/renderPage/{renderPageAlreadyRouted.js → renderPageAfterRoute.js} +3 -4
- package/dist/cjs/node/runtime/renderPage.js +18 -16
- package/dist/cjs/node/runtime/utils.js +3 -2
- package/dist/cjs/node/runtime-dev/createDevMiddleware.js +0 -2
- package/dist/cjs/node/shared/virtualFileId.js +110 -0
- package/dist/cjs/node/vite/index.js +3 -3
- package/dist/cjs/node/vite/onLoad.js +5 -3
- package/dist/cjs/node/vite/plugins/pluginBuild/handleAssetsManifest.js +29 -30
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginBuildApp.js +122 -10
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginBuildConfig.js +12 -17
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginDistPackageJsonFile.js +2 -10
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginModuleBanner.js +5 -11
- package/dist/cjs/node/vite/plugins/pluginBuild/{pluginBuildEntry.js → pluginProdBuildEntry.js} +11 -11
- package/dist/cjs/node/vite/plugins/pluginBuild.js +2 -4
- package/dist/cjs/node/vite/plugins/pluginDev/determineFsAllowList.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginDev/determineOptimizeDeps.js +6 -5
- package/dist/cjs/node/vite/plugins/pluginEnvVars.js +6 -13
- package/dist/cjs/node/vite/plugins/pluginExtractAssets.js +7 -7
- package/dist/cjs/node/vite/plugins/pluginExtractExportNames.js +6 -2
- package/dist/cjs/node/vite/plugins/pluginFileEnv.js +4 -3
- package/dist/cjs/node/vite/plugins/pluginNonRunnableDev.js +11 -11
- package/dist/cjs/node/vite/plugins/pluginPreview.js +4 -7
- package/dist/cjs/node/vite/plugins/pluginReplaceConstants.js +6 -13
- package/dist/cjs/node/vite/plugins/pluginSetGlobalContext.js +1 -1
- package/dist/cjs/node/vite/plugins/pluginVirtualFiles/{getVirtualFilePageConfigsEager.js → generateVirtualFileGlobalEntry.js} +5 -6
- package/dist/cjs/node/vite/plugins/pluginVirtualFiles/{getVirtualFileEntry.js → generateVirtualFileGlobalEntryWithOldDesign.js} +12 -12
- package/dist/cjs/node/vite/plugins/pluginVirtualFiles/{getVirtualFilePageConfigLazy.js → generateVirtualFilePageEntry.js} +10 -11
- package/dist/cjs/node/vite/plugins/pluginVirtualFiles/getConfigValueSourcesRelevant.js +51 -21
- package/dist/cjs/node/vite/plugins/pluginVirtualFiles.js +14 -12
- package/dist/cjs/node/vite/shared/findPageFiles.js +1 -1
- package/dist/cjs/node/vite/shared/{resolveClientEntriesDev.js → getClientEntrySrcDev.js} +3 -3
- package/dist/cjs/node/vite/shared/getHttpRequestAsyncStore.js +8 -6
- package/dist/cjs/node/vite/shared/getMagicString.js +1 -1
- package/dist/cjs/node/vite/shared/getOutDirs.js +21 -22
- package/dist/cjs/node/vite/shared/getViteConfigRuntime.js +1 -1
- package/dist/cjs/node/vite/shared/isViteServerSide.js +68 -0
- package/dist/cjs/node/vite/shared/loggerVite/removeSuperfluousViteLog.js +6 -4
- package/dist/cjs/node/vite/shared/loggerVite.js +1 -1
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/configDefinitionsBuiltIn.js +23 -36
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/crawlPlusFiles.js +5 -4
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal.js +46 -48
- package/dist/cjs/shared/createGlobalContextShared.js +16 -14
- package/dist/cjs/shared/getPageFiles/{parseVirtualFileExports.js → parseVirtualFileExportsGlobalEntry.js} +20 -26
- package/dist/cjs/shared/page-configs/loadAndParseVirtualFilePageEntry.js +25 -0
- package/dist/cjs/shared/page-configs/resolveVikeConfigPublic.js +10 -4
- package/dist/cjs/shared/page-configs/serialize/{parsePageConfigs.js → parsePageConfigsSerialized.js} +2 -2
- package/dist/cjs/shared/page-configs/serialize/serializeConfigValues.js +3 -3
- package/dist/cjs/shared/route/execHookOnBeforeRoute.js +0 -1
- package/dist/cjs/shared/route/index.js +0 -1
- package/dist/cjs/types/VikeGlobalInternal.js +2 -0
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/cjs/utils/assertSetup.js +2 -3
- package/dist/cjs/utils/assertVersion.js +2 -0
- package/dist/cjs/utils/debug.js +4 -4
- package/dist/cjs/utils/getGlobalObject.js +8 -15
- package/dist/cjs/utils/isNonRunnableDev.js +12 -0
- package/dist/cjs/utils/isScriptFile.js +1 -1
- package/dist/cjs/utils/path.js +5 -5
- package/dist/cjs/utils/requireResolve.js +13 -12
- package/dist/cjs/utils/{augmentType.js → updateType.js} +3 -3
- package/dist/esm/__internal/index.d.ts +2 -2
- package/dist/esm/__internal/index.js +3 -3
- package/dist/esm/client/runtime-client-routing/createPageContextClientSide.d.ts +2 -2
- package/dist/esm/client/runtime-client-routing/createPageContextClientSide.js +2 -2
- package/dist/esm/client/runtime-client-routing/getPageContextCurrent.d.ts +2 -2
- package/dist/esm/client/runtime-client-routing/getPageContextFromHooks.d.ts +12 -12
- package/dist/esm/client/runtime-client-routing/globalContext.d.ts +2 -2
- package/dist/esm/client/runtime-client-routing/globalContext.js +2 -2
- package/dist/esm/client/runtime-client-routing/prefetch/getPrefetchSettings.d.ts +2 -2
- package/dist/esm/client/runtime-client-routing/prefetch.d.ts +2 -2
- package/dist/esm/client/runtime-client-routing/prefetch.js +2 -2
- package/dist/esm/client/runtime-client-routing/preparePageContextForPublicUsageClient.d.ts +2 -2
- package/dist/esm/client/runtime-client-routing/renderPageClientSide.d.ts +6 -7
- package/dist/esm/client/runtime-client-routing/renderPageClientSide.js +6 -6
- package/dist/esm/client/runtime-client-routing/utils.d.ts +1 -1
- package/dist/esm/client/runtime-client-routing/utils.js +1 -1
- package/dist/esm/client/runtime-server-routing/createPageContextClientSide.d.ts +3 -3
- package/dist/esm/client/runtime-server-routing/createPageContextClientSide.js +3 -3
- package/dist/esm/client/runtime-server-routing/globalContext.d.ts +2 -2
- package/dist/esm/client/runtime-server-routing/globalContext.js +2 -2
- package/dist/esm/client/runtime-server-routing/preparePageContextForPublicUsageClient.d.ts +2 -2
- package/dist/esm/client/runtime-server-routing/utils.d.ts +1 -1
- package/dist/esm/client/runtime-server-routing/utils.js +1 -1
- package/dist/esm/client/shared/createGetGlobalContextClient.d.ts +3 -3
- package/dist/esm/client/shared/createGetGlobalContextClient.js +5 -5
- package/dist/esm/client/shared/execHookOnRenderClient.d.ts +2 -2
- package/dist/esm/client/shared/loadPageConfigsLazyClientSide.d.ts +1 -1
- package/dist/esm/client/shared/loadPageConfigsLazyClientSide.js +4 -4
- package/dist/esm/client/shared/preparePageContextForPublicUsageClientShared.d.ts +2 -2
- package/dist/esm/node/api/build.d.ts +2 -2
- package/dist/esm/node/api/build.js +6 -32
- package/dist/esm/node/api/context.d.ts +10 -10
- package/dist/esm/node/api/context.js +13 -12
- package/dist/esm/node/api/dev.d.ts +2 -2
- package/dist/esm/node/api/dev.js +0 -2
- package/dist/esm/node/api/index.js +0 -2
- package/dist/esm/node/api/onLoad.js +1 -1
- package/dist/esm/node/api/prepareViteApiCall.d.ts +3 -5
- package/dist/esm/node/api/prepareViteApiCall.js +3 -4
- package/dist/esm/node/api/preview.d.ts +2 -2
- package/dist/esm/node/api/preview.js +2 -3
- package/dist/esm/node/api/types.d.ts +4 -4
- package/dist/esm/node/api/utils.d.ts +1 -0
- package/dist/esm/node/api/utils.js +1 -0
- package/dist/esm/node/cli/index.js +1 -1
- package/dist/esm/node/cli/onLoad.js +1 -1
- package/dist/esm/node/prerender/runPrerender.d.ts +14 -303
- package/dist/esm/node/prerender/runPrerender.js +8 -9
- package/dist/esm/node/prerender/runPrerenderEntry.js +1 -1
- package/dist/esm/node/runtime/csp.d.ts +12 -0
- package/dist/esm/node/runtime/csp.js +44 -0
- package/dist/esm/node/runtime/globalContext.d.ts +13 -13
- package/dist/esm/node/runtime/globalContext.js +125 -109
- package/dist/esm/node/runtime/html/injectAssets/getHtmlTags.js +11 -8
- package/dist/esm/node/runtime/html/injectAssets/inferHtmlTags.d.ts +2 -1
- package/dist/esm/node/runtime/html/injectAssets/inferHtmlTags.js +5 -2
- package/dist/esm/node/runtime/html/injectAssets/mergeScriptTags.d.ts +2 -1
- package/dist/esm/node/runtime/html/injectAssets/mergeScriptTags.js +4 -2
- package/dist/esm/node/runtime/html/serializeContext.d.ts +2 -1
- package/dist/esm/node/runtime/renderPage/analyzePage.d.ts +4 -3
- package/dist/esm/node/runtime/renderPage/analyzePage.js +6 -4
- package/dist/esm/node/runtime/renderPage/createPageContextServerSide.d.ts +2 -2
- package/dist/esm/node/runtime/renderPage/createPageContextServerSide.js +2 -2
- package/dist/esm/node/runtime/renderPage/execHookOnRenderHtml.d.ts +0 -1
- package/dist/esm/node/runtime/renderPage/execHookOnRenderHtml.js +1 -11
- package/dist/esm/node/runtime/renderPage/execHookServer.d.ts +2 -2
- package/dist/esm/node/runtime/renderPage/getPageAssets/getManifestEntry.js +5 -4
- package/dist/esm/node/runtime/renderPage/getPageAssets/retrievePageAssetsDev.d.ts +10 -0
- package/dist/esm/node/runtime/renderPage/getPageAssets/{retrieveAssetsDev.js → retrievePageAssetsDev.js} +22 -7
- package/dist/esm/node/runtime/renderPage/getPageAssets/retrievePageAssetsProd.d.ts +10 -0
- package/dist/esm/node/runtime/renderPage/getPageAssets/{retrieveAssetsProd.js → retrievePageAssetsProd.js} +19 -2
- package/dist/esm/node/runtime/renderPage/getPageAssets.d.ts +2 -10
- package/dist/esm/node/runtime/renderPage/getPageAssets.js +4 -33
- package/dist/esm/node/runtime/renderPage/handleErrorWithoutErrorPage.d.ts +1 -1
- package/dist/esm/node/runtime/renderPage/loadPageConfigsLazyServerSide.d.ts +108 -20
- package/dist/esm/node/runtime/renderPage/loadPageConfigsLazyServerSide.js +59 -52
- package/dist/esm/node/runtime/renderPage/preparePageContextForPublicUsageServer.d.ts +2 -2
- package/dist/esm/node/runtime/renderPage/{renderPageAlreadyRouted.d.ts → renderPageAfterRoute.d.ts} +30 -10
- package/dist/esm/node/runtime/renderPage/{renderPageAlreadyRouted.js → renderPageAfterRoute.js} +5 -6
- package/dist/esm/node/runtime/renderPage.d.ts +9 -6
- package/dist/esm/node/runtime/renderPage.js +20 -18
- package/dist/esm/node/runtime/utils.d.ts +3 -2
- package/dist/esm/node/runtime/utils.js +3 -2
- package/dist/esm/node/runtime-dev/createDevMiddleware.d.ts +2 -2
- package/dist/esm/node/runtime-dev/createDevMiddleware.js +0 -2
- package/dist/esm/node/shared/virtualFileId.d.ts +28 -0
- package/dist/esm/node/shared/virtualFileId.js +107 -0
- package/dist/esm/node/vite/index.js +3 -3
- package/dist/esm/node/vite/onLoad.js +5 -3
- package/dist/esm/node/vite/plugins/pluginBuild/handleAssetsManifest.d.ts +5 -6
- package/dist/esm/node/vite/plugins/pluginBuild/handleAssetsManifest.js +31 -32
- package/dist/esm/node/vite/plugins/pluginBuild/pluginBuildApp.js +119 -10
- package/dist/esm/node/vite/plugins/pluginBuild/pluginBuildConfig.js +12 -17
- package/dist/esm/node/vite/plugins/pluginBuild/pluginDistPackageJsonFile.js +2 -10
- package/dist/esm/node/vite/plugins/pluginBuild/pluginModuleBanner.js +5 -8
- package/dist/esm/node/vite/plugins/pluginBuild/{pluginBuildEntry.d.ts → pluginProdBuildEntry.d.ts} +2 -2
- package/dist/esm/node/vite/plugins/pluginBuild/{pluginBuildEntry.js → pluginProdBuildEntry.js} +12 -12
- package/dist/esm/node/vite/plugins/pluginBuild.js +2 -4
- package/dist/esm/node/vite/plugins/pluginDev/determineFsAllowList.js +3 -3
- package/dist/esm/node/vite/plugins/pluginDev/determineOptimizeDeps.js +6 -5
- package/dist/esm/node/vite/plugins/pluginEnvVars.js +6 -10
- package/dist/esm/node/vite/plugins/pluginExtractAssets.js +5 -5
- package/dist/esm/node/vite/plugins/pluginExtractExportNames.js +6 -2
- package/dist/esm/node/vite/plugins/pluginFileEnv.js +4 -3
- package/dist/esm/node/vite/plugins/pluginNonRunnableDev.js +12 -12
- package/dist/esm/node/vite/plugins/pluginPreview.js +5 -8
- package/dist/esm/node/vite/plugins/pluginReplaceConstants.js +6 -10
- package/dist/esm/node/vite/plugins/pluginSetGlobalContext.js +2 -2
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/generateVirtualFileGlobalEntry.d.ts +2 -0
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/{getVirtualFilePageConfigsEager.js → generateVirtualFileGlobalEntry.js} +5 -6
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/generateVirtualFileGlobalEntryWithOldDesign.d.ts +6 -0
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/{getVirtualFileEntry.js → generateVirtualFileGlobalEntryWithOldDesign.js} +11 -11
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/generateVirtualFilePageEntry.d.ts +2 -0
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/{getVirtualFilePageConfigLazy.js → generateVirtualFilePageEntry.js} +10 -11
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/getConfigValueSourcesRelevant.d.ts +5 -1
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/getConfigValueSourcesRelevant.js +52 -22
- package/dist/esm/node/vite/plugins/pluginVirtualFiles.js +14 -12
- package/dist/esm/node/vite/shared/findPageFiles.js +1 -1
- package/dist/esm/node/vite/shared/getClientEntrySrcDev.d.ts +4 -0
- package/dist/esm/node/vite/shared/{resolveClientEntriesDev.js → getClientEntrySrcDev.js} +4 -4
- package/dist/esm/node/vite/shared/getHttpRequestAsyncStore.js +9 -7
- package/dist/esm/node/vite/shared/getMagicString.js +1 -1
- package/dist/esm/node/vite/shared/getOutDirs.d.ts +4 -3
- package/dist/esm/node/vite/shared/getOutDirs.js +21 -22
- package/dist/esm/node/vite/shared/getViteConfigRuntime.js +1 -1
- package/dist/esm/node/vite/shared/isViteServerSide.d.ts +18 -0
- package/dist/esm/node/vite/shared/isViteServerSide.js +66 -0
- package/dist/esm/node/vite/shared/loggerVite/removeSuperfluousViteLog.js +7 -5
- package/dist/esm/node/vite/shared/loggerVite.js +1 -1
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/configDefinitionsBuiltIn.d.ts +3 -2
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/configDefinitionsBuiltIn.js +24 -37
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/crawlPlusFiles.js +6 -5
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal.d.ts +4 -2
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal.js +49 -51
- package/dist/esm/shared/createGlobalContextShared.d.ts +7 -6
- package/dist/esm/shared/createGlobalContextShared.js +18 -16
- package/dist/esm/shared/getPageFiles/{parseVirtualFileExports.d.ts → parseVirtualFileExportsGlobalEntry.d.ts} +2 -2
- package/dist/esm/shared/getPageFiles/{parseVirtualFileExports.js → parseVirtualFileExportsGlobalEntry.js} +20 -26
- package/dist/esm/shared/getPageFiles.d.ts +1 -1
- package/dist/esm/shared/hooks/execHook.d.ts +2 -2
- package/dist/esm/shared/hooks/getHook.d.ts +3 -3
- package/dist/esm/shared/page-configs/loadAndParseVirtualFilePageEntry.d.ts +3 -0
- package/dist/esm/shared/page-configs/loadAndParseVirtualFilePageEntry.js +23 -0
- package/dist/esm/shared/page-configs/resolveVikeConfigPublic.d.ts +9 -9
- package/dist/esm/shared/page-configs/resolveVikeConfigPublic.js +10 -4
- package/dist/esm/shared/page-configs/serialize/PageConfigSerialized.d.ts +1 -1
- package/dist/esm/shared/page-configs/serialize/{parsePageConfigs.d.ts → parsePageConfigsSerialized.d.ts} +2 -2
- package/dist/esm/shared/page-configs/serialize/{parsePageConfigs.js → parsePageConfigsSerialized.js} +2 -2
- package/dist/esm/shared/page-configs/serialize/serializeConfigValues.js +3 -3
- package/dist/esm/shared/route/execHookOnBeforeRoute.d.ts +3 -3
- package/dist/esm/shared/route/execHookOnBeforeRoute.js +0 -1
- package/dist/esm/shared/route/index.d.ts +5 -6
- package/dist/esm/shared/route/index.js +0 -1
- package/dist/esm/types/Config.d.ts +13 -9
- package/dist/esm/types/PageConfig.d.ts +11 -9
- package/dist/esm/types/PageContext.d.ts +6 -0
- package/dist/esm/types/VikeGlobalInternal.d.ts +4 -0
- package/dist/esm/types/VikeGlobalInternal.js +1 -0
- package/dist/esm/types/VikeNamespace.d.ts +13 -0
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/utils/assertSetup.js +2 -3
- package/dist/esm/utils/assertVersion.js +2 -0
- package/dist/esm/utils/debug.js +3 -3
- package/dist/esm/utils/getGlobalObject.d.ts +6 -5
- package/dist/esm/utils/getGlobalObject.js +8 -15
- package/dist/esm/utils/isNonRunnableDev.d.ts +2 -0
- package/dist/esm/utils/isNonRunnableDev.js +10 -0
- package/dist/esm/utils/isScriptFile.d.ts +1 -1
- package/dist/esm/utils/isScriptFile.js +1 -1
- package/dist/esm/utils/path.d.ts +2 -0
- package/dist/esm/utils/path.js +5 -5
- package/dist/esm/utils/requireResolve.d.ts +4 -4
- package/dist/esm/utils/requireResolve.js +13 -12
- package/dist/esm/utils/updateType.d.ts +3 -0
- package/dist/esm/utils/updateType.js +7 -0
- package/package.json +6 -6
- package/dist/cjs/node/runtime/renderPage/debugPageFiles.js +0 -52
- package/dist/cjs/node/shared/virtualFiles/virtualFileEntry.js +0 -31
- package/dist/cjs/node/shared/virtualFiles/virtualFilePageConfigLazy.js +0 -45
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginAutoFullBuild.js +0 -149
- package/dist/cjs/node/vite/shared/applyRegExWithMagicString.js +0 -11
- package/dist/cjs/node/vite/shared/isViteServerBuild.js +0 -47
- package/dist/cjs/shared/page-configs/loadConfigValues.js +0 -21
- package/dist/esm/node/runtime/renderPage/debugPageFiles.d.ts +0 -23
- package/dist/esm/node/runtime/renderPage/debugPageFiles.js +0 -47
- package/dist/esm/node/runtime/renderPage/getPageAssets/retrieveAssetsDev.d.ts +0 -4
- package/dist/esm/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.d.ts +0 -4
- package/dist/esm/node/shared/virtualFiles/virtualFileEntry.d.ts +0 -11
- package/dist/esm/node/shared/virtualFiles/virtualFileEntry.js +0 -28
- package/dist/esm/node/shared/virtualFiles/virtualFilePageConfigLazy.d.ts +0 -9
- package/dist/esm/node/shared/virtualFiles/virtualFilePageConfigLazy.js +0 -43
- package/dist/esm/node/vite/plugins/pluginBuild/pluginAutoFullBuild.d.ts +0 -5
- package/dist/esm/node/vite/plugins/pluginBuild/pluginAutoFullBuild.js +0 -144
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/getVirtualFileEntry.d.ts +0 -5
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/getVirtualFilePageConfigLazy.d.ts +0 -3
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/getVirtualFilePageConfigsEager.d.ts +0 -2
- package/dist/esm/node/vite/shared/applyRegExWithMagicString.d.ts +0 -3
- package/dist/esm/node/vite/shared/applyRegExWithMagicString.js +0 -9
- package/dist/esm/node/vite/shared/isViteServerBuild.d.ts +0 -15
- package/dist/esm/node/vite/shared/isViteServerBuild.js +0 -45
- package/dist/esm/node/vite/shared/resolveClientEntriesDev.d.ts +0 -4
- package/dist/esm/shared/page-configs/loadConfigValues.d.ts +0 -3
- package/dist/esm/shared/page-configs/loadConfigValues.js +0 -19
- package/dist/esm/utils/augmentType.d.ts +0 -3
- package/dist/esm/utils/augmentType.js +0 -7
- /package/dist/cjs/utils/{getTerminWidth.js → getTerminalWidth.js} +0 -0
- /package/dist/esm/utils/{getTerminWidth.d.ts → getTerminalWidth.d.ts} +0 -0
- /package/dist/esm/utils/{getTerminWidth.js → getTerminalWidth.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { crawlPlusFiles };
|
|
2
2
|
export { isPlusFile };
|
|
3
3
|
export { getPlusFileValueConfigName };
|
|
4
|
-
import { assertPosixPath, assert, scriptFileExtensionPattern,
|
|
4
|
+
import { assertPosixPath, assert, scriptFileExtensionPattern, assertIsNotProductionRuntime, isVersionOrAbove, isScriptFile, scriptFileExtensionList, createDebugger, deepEqual, assertUsage, assertFilePathAbsoluteFilesystem, assertWarning, hasProp, isNotNullish, getGlobalObject, } from '../../utils.js';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
import { glob } from 'tinyglobby';
|
|
7
7
|
import { exec } from 'node:child_process';
|
|
@@ -14,8 +14,9 @@ import { ignorePatternsBuiltIn } from './crawlPlusFiles/ignorePatternsBuiltIn.js
|
|
|
14
14
|
const execA = promisify(exec);
|
|
15
15
|
const debug = createDebugger('vike:crawl');
|
|
16
16
|
assertIsNotProductionRuntime();
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
const globalObject = getGlobalObject('getVikeConfig/crawlPlusFiles.ts', {
|
|
18
|
+
gitIsNotUsable: false,
|
|
19
|
+
});
|
|
19
20
|
async function crawlPlusFiles(userRootDir) {
|
|
20
21
|
assertPosixPath(userRootDir);
|
|
21
22
|
assertFilePathAbsoluteFilesystem(userRootDir);
|
|
@@ -48,7 +49,7 @@ async function crawlPlusFiles(userRootDir) {
|
|
|
48
49
|
}
|
|
49
50
|
// Same as tinyglobby() but using `$ git ls-files`
|
|
50
51
|
async function gitLsFiles(userRootDir, ignorePatterns, ignoreMatchers) {
|
|
51
|
-
if (gitIsNotUsable)
|
|
52
|
+
if (globalObject.gitIsNotUsable)
|
|
52
53
|
return null;
|
|
53
54
|
// Preserve UTF-8 file paths.
|
|
54
55
|
// https://github.com/vikejs/vike/issues/1658
|
|
@@ -82,7 +83,7 @@ async function gitLsFiles(userRootDir, ignorePatterns, ignoreMatchers) {
|
|
|
82
83
|
}
|
|
83
84
|
catch (err) {
|
|
84
85
|
if (await isGitNotUsable(userRootDir)) {
|
|
85
|
-
gitIsNotUsable = true;
|
|
86
|
+
globalObject.gitIsNotUsable = true;
|
|
86
87
|
return null;
|
|
87
88
|
}
|
|
88
89
|
throw err;
|
|
@@ -8,11 +8,12 @@ export { getConfVal };
|
|
|
8
8
|
export { getConfigDefinitionOptional };
|
|
9
9
|
export { getVikeConfigFromCliOrEnv };
|
|
10
10
|
export type { VikeConfigInternal };
|
|
11
|
+
export type { PageConfigBuildTimeBeforeComputed };
|
|
11
12
|
export { getVikeConfig };
|
|
12
13
|
export type { VikeConfig };
|
|
13
14
|
import type { PageConfigGlobalBuildTime, PageConfigBuildTime } from '../../../types/PageConfig.js';
|
|
14
15
|
import { type ConfigDefinitionsInternal, type ConfigDefinitionInternal } from './resolveVikeConfigInternal/configDefinitionsBuiltIn.js';
|
|
15
|
-
import { type VikeConfigPublicGlobal, type
|
|
16
|
+
import { type VikeConfigPublicGlobal, type VikeConfigPublicPageEagerLoaded } from '../../../shared/page-configs/resolveVikeConfigPublic.js';
|
|
16
17
|
import { type PlusFile } from './resolveVikeConfigInternal/getPlusFilesAll.js';
|
|
17
18
|
import type { PrerenderContextPublic } from '../../prerender/runPrerender.js';
|
|
18
19
|
import type { ResolvedConfig, UserConfig } from 'vite';
|
|
@@ -33,7 +34,7 @@ type VikeConfigInternal = {
|
|
|
33
34
|
config: VikeConfigPublicGlobal['config'];
|
|
34
35
|
_from: VikeConfigPublicGlobal['_from'];
|
|
35
36
|
pages: Record<string, // pageId
|
|
36
|
-
|
|
37
|
+
VikeConfigPublicPageEagerLoaded>;
|
|
37
38
|
_vikeConfigDependencies: Set<string>;
|
|
38
39
|
prerenderContext: PrerenderContext;
|
|
39
40
|
};
|
|
@@ -57,6 +58,7 @@ declare function getVikeConfigFromCliOrEnv(): {
|
|
|
57
58
|
configFromCliOptions: import("../../cli/parseCli.js").CliOptions | null;
|
|
58
59
|
configFromEnvVar: Record<string, unknown> | null;
|
|
59
60
|
};
|
|
61
|
+
type PageConfigBuildTimeBeforeComputed = Omit<PageConfigBuildTime, 'configValuesComputed'>;
|
|
60
62
|
declare function getConfigDefinitionOptional(configDefinitions: ConfigDefinitionsInternal, configName: string): ConfigDefinitionInternal | null;
|
|
61
63
|
declare function getConfVal(plusFile: PlusFile, configName: string): null | {
|
|
62
64
|
value: unknown;
|
|
@@ -10,7 +10,7 @@ export { getConfigDefinitionOptional };
|
|
|
10
10
|
export { getVikeConfigFromCliOrEnv };
|
|
11
11
|
// Public usage
|
|
12
12
|
export { getVikeConfig };
|
|
13
|
-
import { assertPosixPath, assert, isObject, assertUsage, assertWarning, objectEntries, hasProp, includes, assertIsNotProductionRuntime, getMostSimilar, joinEnglish, assertKeys, objectKeys, objectFromEntries, unique, isCallable, makeFirst, lowerFirst, makeLast,
|
|
13
|
+
import { assertPosixPath, assert, isObject, assertUsage, assertWarning, objectEntries, hasProp, includes, assertIsNotProductionRuntime, getMostSimilar, joinEnglish, assertKeys, objectKeys, objectFromEntries, unique, isCallable, makeFirst, lowerFirst, makeLast, genPromise, checkType, objectAssign, getGlobalObject, } from '../utils.js';
|
|
14
14
|
import { configDefinitionsBuiltIn, } from './resolveVikeConfigInternal/configDefinitionsBuiltIn.js';
|
|
15
15
|
import { getLocationId, getFilesystemRouteString, getFilesystemRouteDefinedBy, isInherited, sortAfterInheritanceOrder, applyFilesystemRoutingRootEffect, } from './resolveVikeConfigInternal/filesystemRouting.js';
|
|
16
16
|
import { getViteDevServer } from '../../runtime/globalContext.js';
|
|
@@ -22,31 +22,29 @@ import { loadPointerImport, loadValueFile } from './resolveVikeConfigInternal/lo
|
|
|
22
22
|
import { resolvePointerImport } from './resolveVikeConfigInternal/resolvePointerImport.js';
|
|
23
23
|
import { getFilePathResolved } from './getFilePath.js';
|
|
24
24
|
import { getConfigValueBuildTime } from '../../../shared/page-configs/getConfigValueBuildTime.js';
|
|
25
|
-
import { resolveVikeConfigPublicGlobal,
|
|
25
|
+
import { resolveVikeConfigPublicGlobal, resolveVikeConfigPublicPageEagerLoaded, } from '../../../shared/page-configs/resolveVikeConfigPublic.js';
|
|
26
26
|
import { getConfigValuesBase, isJsonValue } from '../../../shared/page-configs/serialize/serializeConfigValues.js';
|
|
27
27
|
import { getPlusFilesAll, } from './resolveVikeConfigInternal/getPlusFilesAll.js';
|
|
28
28
|
import { getEnvVarObject } from './getEnvVarObject.js';
|
|
29
|
-
import {
|
|
29
|
+
import { getVikeApiOperation } from '../../api/context.js';
|
|
30
30
|
import { getCliOptions } from '../../cli/context.js';
|
|
31
31
|
import { resolvePrerenderConfigGlobal } from '../../prerender/resolvePrerenderConfig.js';
|
|
32
32
|
import { getProxyForPublicUsage } from '../../../shared/getProxyForPublicUsage.js';
|
|
33
33
|
import { setVikeConfigError } from '../../shared/getVikeConfigError.js';
|
|
34
34
|
assertIsNotProductionRuntime();
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
let vikeConfigCtx = null; // Information provided by Vite's `config` and Vike's CLI. We could, if we want or need to, completely remove the dependency on Vite.
|
|
46
|
-
let prerenderContext;
|
|
35
|
+
const globalObject = getGlobalObject('vite/shared/resolveVikeConfigInternal.ts', {
|
|
36
|
+
restartVite: false,
|
|
37
|
+
vikeConfigHasBuildError: null,
|
|
38
|
+
isV1Design_: null,
|
|
39
|
+
vikeConfigPromise: null,
|
|
40
|
+
// TO-DO/next-major-release: remove
|
|
41
|
+
vikeConfigSync: null,
|
|
42
|
+
vikeConfigCtx: null, // Information provided by Vite's `config` and Vike's CLI. We could, if we want or need to, completely remove the dependency on Vite.
|
|
43
|
+
prerenderContext: null,
|
|
44
|
+
});
|
|
47
45
|
function reloadVikeConfig() {
|
|
48
|
-
assert(vikeConfigCtx);
|
|
49
|
-
const { userRootDir, vikeVitePluginOptions } = vikeConfigCtx;
|
|
46
|
+
assert(globalObject.vikeConfigCtx);
|
|
47
|
+
const { userRootDir, vikeVitePluginOptions } = globalObject.vikeConfigCtx;
|
|
50
48
|
assert(vikeVitePluginOptions);
|
|
51
49
|
resolveVikeConfigInternal_withErrorHandling(userRootDir, true, vikeVitePluginOptions);
|
|
52
50
|
}
|
|
@@ -54,15 +52,15 @@ async function getVikeConfigInternal(
|
|
|
54
52
|
// I don't remember the logic behind it — neither why we restart Vite's dev server, nor why we sometimes don't.
|
|
55
53
|
// TO-DO/eventually: re-think all that. Some + settings are expected to influence Vite's config (restarting Vite's dev server is needed) while some don't.
|
|
56
54
|
doNotRestartViteOnError = false) {
|
|
57
|
-
assert(vikeConfigCtx);
|
|
58
|
-
const { userRootDir, isDev, vikeVitePluginOptions } = vikeConfigCtx;
|
|
55
|
+
assert(globalObject.vikeConfigCtx);
|
|
56
|
+
const { userRootDir, isDev, vikeVitePluginOptions } = globalObject.vikeConfigCtx;
|
|
59
57
|
const vikeConfig = await getOrResolveVikeConfig(userRootDir, isDev, vikeVitePluginOptions, doNotRestartViteOnError);
|
|
60
58
|
return vikeConfig;
|
|
61
59
|
}
|
|
62
60
|
// TO-DO/next-major-release: remove
|
|
63
61
|
function getVikeConfigInternalSync() {
|
|
64
|
-
assert(vikeConfigSync);
|
|
65
|
-
return vikeConfigSync;
|
|
62
|
+
assert(globalObject.vikeConfigSync);
|
|
63
|
+
return globalObject.vikeConfigSync;
|
|
66
64
|
}
|
|
67
65
|
// TO-DO/eventually: this maybe(/probably?) isn't safe against race conditions upon file changes in development, thus:
|
|
68
66
|
// - Like getGlobalContext() and getGlobalContextSync() — make getVikeConfig() async and provide a getVikeConfigSync() while discourage using it
|
|
@@ -83,29 +81,29 @@ config) {
|
|
|
83
81
|
}
|
|
84
82
|
function setVikeConfigContext(vikeConfigCtx_) {
|
|
85
83
|
// If the user changes Vite's `config.root` => Vite completely reloads itself => setVikeConfigContext() is called again
|
|
86
|
-
vikeConfigCtx = vikeConfigCtx_;
|
|
84
|
+
globalObject.vikeConfigCtx = vikeConfigCtx_;
|
|
87
85
|
}
|
|
88
86
|
async function getOrResolveVikeConfig(userRootDir, isDev, vikeVitePluginOptions, doNotRestartViteOnError) {
|
|
89
|
-
if (!vikeConfigPromise) {
|
|
87
|
+
if (!globalObject.vikeConfigPromise) {
|
|
90
88
|
resolveVikeConfigInternal_withErrorHandling(userRootDir, isDev, vikeVitePluginOptions, doNotRestartViteOnError);
|
|
91
89
|
}
|
|
92
|
-
assert(vikeConfigPromise);
|
|
93
|
-
const vikeConfig = await vikeConfigPromise;
|
|
90
|
+
assert(globalObject.vikeConfigPromise);
|
|
91
|
+
const vikeConfig = await globalObject.vikeConfigPromise;
|
|
94
92
|
return vikeConfig;
|
|
95
93
|
}
|
|
96
94
|
async function getVikeConfigInternalOptional() {
|
|
97
|
-
if (!vikeConfigPromise)
|
|
95
|
+
if (!globalObject.vikeConfigPromise)
|
|
98
96
|
return null;
|
|
99
|
-
const vikeConfig = await vikeConfigPromise;
|
|
97
|
+
const vikeConfig = await globalObject.vikeConfigPromise;
|
|
100
98
|
return vikeConfig;
|
|
101
99
|
}
|
|
102
100
|
function isV1Design() {
|
|
103
|
-
assert(typeof isV1Design_ === 'boolean');
|
|
104
|
-
return isV1Design_;
|
|
101
|
+
assert(typeof globalObject.isV1Design_ === 'boolean');
|
|
102
|
+
return globalObject.isV1Design_;
|
|
105
103
|
}
|
|
106
104
|
async function resolveVikeConfigInternal_withErrorHandling(userRootDir, isDev, vikeVitePluginOptions, doNotRestartViteOnError) {
|
|
107
105
|
const { promise, resolve, reject } = genPromise();
|
|
108
|
-
vikeConfigPromise = promise;
|
|
106
|
+
globalObject.vikeConfigPromise = promise;
|
|
109
107
|
const esbuildCache = {
|
|
110
108
|
transpileCache: {},
|
|
111
109
|
vikeConfigDependencies: new Set(),
|
|
@@ -122,10 +120,10 @@ async function resolveVikeConfigInternal_withErrorHandling(userRootDir, isDev, v
|
|
|
122
120
|
}
|
|
123
121
|
// There is a newer call — let the new call supersede the old one.
|
|
124
122
|
// We deliberately swallow the intermetidate state (including any potential error) — it's now outdated and has existed only for a very short period of time.
|
|
125
|
-
if (vikeConfigPromise !== promise) {
|
|
123
|
+
if (globalObject.vikeConfigPromise !== promise) {
|
|
126
124
|
// vikeConfigPromise.then(resolve).catch(reject)
|
|
127
125
|
try {
|
|
128
|
-
resolve(await vikeConfigPromise);
|
|
126
|
+
resolve(await globalObject.vikeConfigPromise);
|
|
129
127
|
}
|
|
130
128
|
catch (err) {
|
|
131
129
|
reject(err);
|
|
@@ -135,13 +133,13 @@ async function resolveVikeConfigInternal_withErrorHandling(userRootDir, isDev, v
|
|
|
135
133
|
if (!hasError) {
|
|
136
134
|
assert(ret);
|
|
137
135
|
assert(err === undefined);
|
|
138
|
-
const hadError = vikeConfigHasBuildError;
|
|
139
|
-
vikeConfigHasBuildError = false;
|
|
136
|
+
const hadError = globalObject.vikeConfigHasBuildError;
|
|
137
|
+
globalObject.vikeConfigHasBuildError = false;
|
|
140
138
|
setVikeConfigError({ errorBuild: false });
|
|
141
139
|
if (hadError) {
|
|
142
140
|
logConfigErrorRecover();
|
|
143
|
-
if (restartVite) {
|
|
144
|
-
restartVite = false;
|
|
141
|
+
if (globalObject.restartVite) {
|
|
142
|
+
globalObject.restartVite = false;
|
|
145
143
|
restartViteDevServer();
|
|
146
144
|
}
|
|
147
145
|
}
|
|
@@ -150,10 +148,10 @@ async function resolveVikeConfigInternal_withErrorHandling(userRootDir, isDev, v
|
|
|
150
148
|
else {
|
|
151
149
|
assert(ret === undefined);
|
|
152
150
|
assert(err);
|
|
153
|
-
vikeConfigHasBuildError = true;
|
|
151
|
+
globalObject.vikeConfigHasBuildError = true;
|
|
154
152
|
setVikeConfigError({ errorBuild: { err } });
|
|
155
153
|
if (!doNotRestartViteOnError)
|
|
156
|
-
restartVite = true;
|
|
154
|
+
globalObject.restartVite = true;
|
|
157
155
|
if (!isDev) {
|
|
158
156
|
reject(err);
|
|
159
157
|
}
|
|
@@ -167,8 +165,8 @@ async function resolveVikeConfigInternal(userRootDir, vikeVitePluginOptions, esb
|
|
|
167
165
|
const plusFilesAll = await getPlusFilesAll(userRootDir, esbuildCache);
|
|
168
166
|
const configDefinitionsResolved = await resolveConfigDefinitions(plusFilesAll, userRootDir, esbuildCache);
|
|
169
167
|
const { pageConfigGlobal, pageConfigs } = getPageConfigsBuildTime(configDefinitionsResolved, plusFilesAll, userRootDir);
|
|
170
|
-
if (!isV1Design_)
|
|
171
|
-
isV1Design_ = pageConfigs.length > 0;
|
|
168
|
+
if (!globalObject.isV1Design_)
|
|
169
|
+
globalObject.isV1Design_ = pageConfigs.length > 0;
|
|
172
170
|
// Backwards compatibility for vike(options) in vite.config.js
|
|
173
171
|
temp_interopVikeVitePlugin(pageConfigGlobal, vikeVitePluginOptions, userRootDir);
|
|
174
172
|
setCliAndApiOptions(pageConfigGlobal, configDefinitionsResolved);
|
|
@@ -178,7 +176,7 @@ async function resolveVikeConfigInternal(userRootDir, vikeVitePluginOptions, esb
|
|
|
178
176
|
// pages
|
|
179
177
|
const vikeConfigPublicPagesEager = objectFromEntries(pageConfigs.map((pageConfig) => {
|
|
180
178
|
const pageConfigValues = getConfigValues(pageConfig, true);
|
|
181
|
-
return
|
|
179
|
+
return resolveVikeConfigPublicPageEagerLoaded(pageConfigGlobalValues, pageConfig, pageConfigValues);
|
|
182
180
|
}));
|
|
183
181
|
const prerenderContext = resolvePrerenderContext({
|
|
184
182
|
config: vikeConfigPublicGlobal.config,
|
|
@@ -194,7 +192,7 @@ async function resolveVikeConfigInternal(userRootDir, vikeVitePluginOptions, esb
|
|
|
194
192
|
prerenderContext,
|
|
195
193
|
_vikeConfigDependencies: esbuildCache.vikeConfigDependencies,
|
|
196
194
|
};
|
|
197
|
-
vikeConfigSync = vikeConfig;
|
|
195
|
+
globalObject.vikeConfigSync = vikeConfig;
|
|
198
196
|
return vikeConfig;
|
|
199
197
|
}
|
|
200
198
|
async function resolveConfigDefinitions(plusFilesAll, userRootDir, esbuildCache) {
|
|
@@ -418,9 +416,9 @@ function temp_interopVikeVitePlugin(pageConfigGlobal, vikeVitePluginOptions, use
|
|
|
418
416
|
}
|
|
419
417
|
function setCliAndApiOptions(pageConfigGlobal, configDefinitionsResolved) {
|
|
420
418
|
// Vike API — passed options [lowest precedence]
|
|
421
|
-
const
|
|
422
|
-
if (
|
|
423
|
-
addSources(
|
|
419
|
+
const vikeApiOperation = getVikeApiOperation();
|
|
420
|
+
if (vikeApiOperation?.options.vikeConfig) {
|
|
421
|
+
addSources(vikeApiOperation.options.vikeConfig, { definedBy: 'api', operation: vikeApiOperation.operation }, false);
|
|
424
422
|
}
|
|
425
423
|
const { configFromCliOptions, configFromEnvVar } = getVikeConfigFromCliOrEnv();
|
|
426
424
|
// Vike CLI options
|
|
@@ -1099,7 +1097,7 @@ function isGlobalLocation(locationId, plusFilesAll) {
|
|
|
1099
1097
|
}
|
|
1100
1098
|
function resolvePrerenderContext(vikeConfig) {
|
|
1101
1099
|
const { isPrerenderingEnabled, isPrerenderingEnabledForAllPages } = resolvePrerenderConfigGlobal(vikeConfig);
|
|
1102
|
-
prerenderContext ?? (prerenderContext = {
|
|
1100
|
+
globalObject.prerenderContext ?? (globalObject.prerenderContext = {
|
|
1103
1101
|
isPrerenderingEnabled: false,
|
|
1104
1102
|
isPrerenderingEnabledForAllPages: false,
|
|
1105
1103
|
// Set at runPrerender()
|
|
@@ -1107,9 +1105,9 @@ function resolvePrerenderContext(vikeConfig) {
|
|
|
1107
1105
|
// Set at runPrerender()
|
|
1108
1106
|
pageContexts: null,
|
|
1109
1107
|
});
|
|
1110
|
-
prerenderContext.isPrerenderingEnabled = isPrerenderingEnabled;
|
|
1111
|
-
prerenderContext.isPrerenderingEnabledForAllPages = isPrerenderingEnabledForAllPages;
|
|
1112
|
-
return prerenderContext;
|
|
1108
|
+
globalObject.prerenderContext.isPrerenderingEnabled = isPrerenderingEnabled;
|
|
1109
|
+
globalObject.prerenderContext.isPrerenderingEnabledForAllPages = isPrerenderingEnabledForAllPages;
|
|
1110
|
+
return globalObject.prerenderContext;
|
|
1113
1111
|
}
|
|
1114
1112
|
function restartViteDevServer() {
|
|
1115
1113
|
const viteDevServer = getViteDevServer();
|
|
@@ -1146,7 +1144,7 @@ function getVikeConfigDummy(esbuildCache) {
|
|
|
1146
1144
|
prerenderContext: prerenderContextDummy,
|
|
1147
1145
|
_vikeConfigDependencies: esbuildCache.vikeConfigDependencies,
|
|
1148
1146
|
};
|
|
1149
|
-
vikeConfigSync = vikeConfigDummy;
|
|
1150
|
-
isV1Design_ = true;
|
|
1147
|
+
globalObject.vikeConfigSync = vikeConfigDummy;
|
|
1148
|
+
globalObject.isV1Design_ = true;
|
|
1151
1149
|
return vikeConfigDummy;
|
|
1152
1150
|
}
|
|
@@ -9,9 +9,10 @@ import type { GlobalContextServerInternal } from '../node/runtime/globalContext.
|
|
|
9
9
|
import type { GlobalContextClientInternal } from '../client/runtime-client-routing/globalContext.js';
|
|
10
10
|
import { type Hook } from './hooks/getHook.js';
|
|
11
11
|
declare const getGlobalContextSyncErrMsg = "The global context isn't set yet, call getGlobalContextSync() later or use getGlobalContext() instead.";
|
|
12
|
-
declare function createGlobalContextShared<GlobalContextAdded extends Record<string, any>, GlobalContextAddedAsync extends Record<string, any>>(
|
|
12
|
+
declare function createGlobalContextShared<GlobalContextAdded extends Record<string, any>, GlobalContextAddedAsync extends Record<string, any>>(virtualFileExportsGlobalEntry: unknown, globalObject: {
|
|
13
13
|
globalContext?: Record<string, unknown>;
|
|
14
14
|
onCreateGlobalContextHooks?: Hook[];
|
|
15
|
+
previousCreateGlobalContextPromise?: Promise<void>;
|
|
15
16
|
}, addGlobalContext?: (globalContext: GlobalContextBase) => GlobalContextAdded, addGlobalContextTmp?: (globalContext: GlobalContextBase) => Promise<GlobalContextAdded>, addGlobalContextAsync?: (globalContext: GlobalContextBase) => Promise<GlobalContextAddedAsync>): Promise<{
|
|
16
17
|
/**
|
|
17
18
|
* Useful for distinguishing `globalContext` from other objects and narrowing down TypeScript unions.
|
|
@@ -20,7 +21,7 @@ declare function createGlobalContextShared<GlobalContextAdded extends Record<str
|
|
|
20
21
|
*/
|
|
21
22
|
isGlobalContext: true;
|
|
22
23
|
_isOriginalObject: true;
|
|
23
|
-
|
|
24
|
+
_virtualFileExportsGlobalEntry: unknown;
|
|
24
25
|
_pageFilesAll: PageFile[];
|
|
25
26
|
_pageConfigs: PageConfigRuntime[];
|
|
26
27
|
_pageConfigGlobal: import("../types/PageConfig.js").PageConfigGlobalRuntime;
|
|
@@ -33,12 +34,12 @@ declare function createGlobalContextShared<GlobalContextAdded extends Record<str
|
|
|
33
34
|
};
|
|
34
35
|
config: import("../types/index.js").ConfigResolved;
|
|
35
36
|
pages: {
|
|
36
|
-
[k: string]: import("./page-configs/resolveVikeConfigPublic.js").
|
|
37
|
+
[k: string]: import("./page-configs/resolveVikeConfigPublic.js").VikeConfigPublicPageEagerLoaded;
|
|
37
38
|
};
|
|
38
39
|
} & GlobalContextAdded & GlobalContextAddedAsync>;
|
|
39
40
|
type GlobalContextBasePublic = Pick<GlobalContextBase, 'config' | 'pages' | 'isGlobalContext'>;
|
|
40
41
|
type GlobalContextBase = ReturnType<typeof createGlobalContextBase>;
|
|
41
|
-
declare function createGlobalContextBase(
|
|
42
|
+
declare function createGlobalContextBase(virtualFileExportsGlobalEntry: unknown): {
|
|
42
43
|
/**
|
|
43
44
|
* Useful for distinguishing `globalContext` from other objects and narrowing down TypeScript unions.
|
|
44
45
|
*
|
|
@@ -46,7 +47,7 @@ declare function createGlobalContextBase(virtualFileExports: unknown): {
|
|
|
46
47
|
*/
|
|
47
48
|
isGlobalContext: true;
|
|
48
49
|
_isOriginalObject: true;
|
|
49
|
-
|
|
50
|
+
_virtualFileExportsGlobalEntry: unknown;
|
|
50
51
|
_pageFilesAll: PageFile[];
|
|
51
52
|
_pageConfigs: PageConfigRuntime[];
|
|
52
53
|
_pageConfigGlobal: import("../types/PageConfig.js").PageConfigGlobalRuntime;
|
|
@@ -59,6 +60,6 @@ declare function createGlobalContextBase(virtualFileExports: unknown): {
|
|
|
59
60
|
};
|
|
60
61
|
config: import("../types/index.js").ConfigResolved;
|
|
61
62
|
pages: {
|
|
62
|
-
[k: string]: import("./page-configs/resolveVikeConfigPublic.js").
|
|
63
|
+
[k: string]: import("./page-configs/resolveVikeConfigPublic.js").VikeConfigPublicPageEagerLoaded;
|
|
63
64
|
};
|
|
64
65
|
};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
1
|
export { createGlobalContextShared };
|
|
2
2
|
export { getGlobalContextSyncErrMsg };
|
|
3
|
-
import { changeEnumerable, genPromise,
|
|
4
|
-
import {
|
|
5
|
-
import { resolveVikeConfigPublicGlobal,
|
|
3
|
+
import { assert, changeEnumerable, genPromise, objectAssign, objectReplace, unique } from './utils.js';
|
|
4
|
+
import { parseVirtualFileExportsGlobalEntry } from './getPageFiles/parseVirtualFileExportsGlobalEntry.js';
|
|
5
|
+
import { resolveVikeConfigPublicGlobal, resolveVikeConfigPublicPageEagerLoaded, } from './page-configs/resolveVikeConfigPublic.js';
|
|
6
6
|
import { execHookGlobal } from './hooks/execHook.js';
|
|
7
7
|
import { prepareGlobalContextForPublicUsage } from './prepareGlobalContextForPublicUsage.js';
|
|
8
8
|
import { getHookFromPageConfigGlobalCumulative } from './hooks/getHook.js';
|
|
9
9
|
const getGlobalContextSyncErrMsg = "The global context isn't set yet, call getGlobalContextSync() later or use getGlobalContext() instead.";
|
|
10
|
-
const globalObject_ = getGlobalObject('shared/createGlobalContextShared.ts', {});
|
|
11
10
|
// TO-DO/eventually use flat globalContext — like flat pageContext
|
|
12
|
-
async function createGlobalContextShared(
|
|
11
|
+
async function createGlobalContextShared(virtualFileExportsGlobalEntry, globalObject, addGlobalContext,
|
|
13
12
|
// TO-DO/next-major-release: we'll be able to remove addGlobalContextTmp after loadPageRoutes() is sync (it will be sync after we remove the old design)
|
|
14
13
|
addGlobalContextTmp, addGlobalContextAsync) {
|
|
15
|
-
const {
|
|
14
|
+
const { previousCreateGlobalContextPromise } = globalObject;
|
|
16
15
|
const { promise, resolve } = genPromise({
|
|
17
16
|
// Avoid this Cloudflare Worker error:
|
|
18
17
|
// ```console
|
|
@@ -20,9 +19,12 @@ addGlobalContextTmp, addGlobalContextAsync) {
|
|
|
20
19
|
// ```
|
|
21
20
|
timeout: null,
|
|
22
21
|
});
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
globalObject.previousCreateGlobalContextPromise = promise;
|
|
23
|
+
if (previousCreateGlobalContextPromise) {
|
|
24
|
+
assert(globalObject.globalContext);
|
|
25
|
+
await previousCreateGlobalContextPromise;
|
|
26
|
+
}
|
|
27
|
+
const globalContext = createGlobalContextBase(virtualFileExportsGlobalEntry);
|
|
26
28
|
let isNewGlobalContext;
|
|
27
29
|
if (!globalObject.globalContext) {
|
|
28
30
|
// We set globalObject.globalContext early and before any async operations, so that getGlobalContextSync() can be used early.
|
|
@@ -34,7 +36,7 @@ addGlobalContextTmp, addGlobalContextAsync) {
|
|
|
34
36
|
isNewGlobalContext = true;
|
|
35
37
|
}
|
|
36
38
|
if (addGlobalContext &&
|
|
37
|
-
//
|
|
39
|
+
// TO-DO/next-major-release: remove
|
|
38
40
|
globalContext._pageConfigs.length > 0) {
|
|
39
41
|
const globalContextAdded = addGlobalContext?.(globalContext);
|
|
40
42
|
objectAssign(globalContext, globalContextAdded);
|
|
@@ -67,8 +69,8 @@ addGlobalContextTmp, addGlobalContextAsync) {
|
|
|
67
69
|
resolve();
|
|
68
70
|
return globalObject.globalContext;
|
|
69
71
|
}
|
|
70
|
-
function createGlobalContextBase(
|
|
71
|
-
const { pageFilesAll, allPageIds, pageConfigs, pageConfigGlobal, vikeConfigPublicGlobal, vikeConfigPublicPagesEager, } = getConfigsAll(
|
|
72
|
+
function createGlobalContextBase(virtualFileExportsGlobalEntry) {
|
|
73
|
+
const { pageFilesAll, allPageIds, pageConfigs, pageConfigGlobal, vikeConfigPublicGlobal, vikeConfigPublicPagesEager, } = getConfigsAll(virtualFileExportsGlobalEntry);
|
|
72
74
|
const globalContext = {
|
|
73
75
|
/**
|
|
74
76
|
* Useful for distinguishing `globalContext` from other objects and narrowing down TypeScript unions.
|
|
@@ -77,7 +79,7 @@ function createGlobalContextBase(virtualFileExports) {
|
|
|
77
79
|
*/
|
|
78
80
|
isGlobalContext: true,
|
|
79
81
|
_isOriginalObject: true,
|
|
80
|
-
|
|
82
|
+
_virtualFileExportsGlobalEntry: virtualFileExportsGlobalEntry,
|
|
81
83
|
_pageFilesAll: pageFilesAll,
|
|
82
84
|
_pageConfigs: pageConfigs,
|
|
83
85
|
_pageConfigGlobal: pageConfigGlobal,
|
|
@@ -89,14 +91,14 @@ function createGlobalContextBase(virtualFileExports) {
|
|
|
89
91
|
changeEnumerable(globalContext, '_isOriginalObject', false);
|
|
90
92
|
return globalContext;
|
|
91
93
|
}
|
|
92
|
-
function getConfigsAll(
|
|
93
|
-
const { pageFilesAll, pageConfigs, pageConfigGlobal } =
|
|
94
|
+
function getConfigsAll(virtualFileExportsGlobalEntry) {
|
|
95
|
+
const { pageFilesAll, pageConfigs, pageConfigGlobal } = parseVirtualFileExportsGlobalEntry(virtualFileExportsGlobalEntry);
|
|
94
96
|
const allPageIds = getAllPageIds(pageFilesAll, pageConfigs);
|
|
95
97
|
const vikeConfigPublicGlobal = resolveVikeConfigPublicGlobal({
|
|
96
98
|
pageConfigGlobalValues: pageConfigGlobal.configValues,
|
|
97
99
|
});
|
|
98
100
|
const vikeConfigPublicPagesEager = Object.fromEntries(pageConfigs.map((pageConfig) => {
|
|
99
|
-
return
|
|
101
|
+
return resolveVikeConfigPublicPageEagerLoaded(pageConfigGlobal.configValues, pageConfig, pageConfig.configValues);
|
|
100
102
|
}));
|
|
101
103
|
return {
|
|
102
104
|
pageFilesAll,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { parseVirtualFileExportsGlobalEntry };
|
|
2
2
|
import { type PageFile } from './getPageFileObject.js';
|
|
3
3
|
import type { PageConfigRuntime, PageConfigGlobalRuntime } from '../../types/PageConfig.js';
|
|
4
|
-
declare function
|
|
4
|
+
declare function parseVirtualFileExportsGlobalEntry(virtualFileExportsGlobalEntry: unknown): {
|
|
5
5
|
pageFilesAll: PageFile[];
|
|
6
6
|
pageConfigs: PageConfigRuntime[];
|
|
7
7
|
pageConfigGlobal: PageConfigGlobalRuntime;
|
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
export {
|
|
2
|
-
// TODO/now: rename parseVirtualFileExportsEntryGlobal
|
|
3
|
-
// TODO/now: merge or collocate following both files?
|
|
4
|
-
// ```filesystem
|
|
5
|
-
// vike/packages/vike/shared/getPageFiles/parseVirtualFileExports.ts
|
|
6
|
-
// vike/shared/page-configs/serialize/parsePageConfigs.ts
|
|
7
|
-
// ```
|
|
1
|
+
export { parseVirtualFileExportsGlobalEntry };
|
|
8
2
|
// TO-DO/next-major-release: remove old design code, and remove all assertions.
|
|
9
3
|
import { assert, hasProp, isCallable, isObject, cast, isArray } from '../utils.js';
|
|
10
4
|
import { assertExportValues } from './assert_exports_old_design.js';
|
|
11
5
|
import { getPageFileObject } from './getPageFileObject.js';
|
|
12
6
|
import { fileTypes } from './fileTypes.js';
|
|
13
|
-
import {
|
|
14
|
-
function
|
|
15
|
-
assert(hasProp(
|
|
16
|
-
assert(hasProp(
|
|
17
|
-
assert(hasProp(
|
|
18
|
-
assert(hasProp(
|
|
19
|
-
assert(hasProp(
|
|
20
|
-
assert(hasProp(
|
|
21
|
-
hasProp(
|
|
22
|
-
assert(hasProp(
|
|
23
|
-
assert(hasProp(
|
|
24
|
-
assert(hasProp(
|
|
25
|
-
const { pageConfigsSerialized, pageConfigGlobalSerialized } =
|
|
7
|
+
import { parsePageConfigsSerialized } from '../page-configs/serialize/parsePageConfigsSerialized.js';
|
|
8
|
+
function parseVirtualFileExportsGlobalEntry(virtualFileExportsGlobalEntry) {
|
|
9
|
+
assert(hasProp(virtualFileExportsGlobalEntry, 'pageFilesLazy', 'object'));
|
|
10
|
+
assert(hasProp(virtualFileExportsGlobalEntry, 'pageFilesEager', 'object'));
|
|
11
|
+
assert(hasProp(virtualFileExportsGlobalEntry, 'pageFilesExportNamesLazy', 'object'));
|
|
12
|
+
assert(hasProp(virtualFileExportsGlobalEntry, 'pageFilesExportNamesEager', 'object'));
|
|
13
|
+
assert(hasProp(virtualFileExportsGlobalEntry.pageFilesLazy, '.page'));
|
|
14
|
+
assert(hasProp(virtualFileExportsGlobalEntry.pageFilesLazy, '.page.client') ||
|
|
15
|
+
hasProp(virtualFileExportsGlobalEntry.pageFilesLazy, '.page.server'));
|
|
16
|
+
assert(hasProp(virtualFileExportsGlobalEntry, 'pageFilesList', 'string[]'));
|
|
17
|
+
assert(hasProp(virtualFileExportsGlobalEntry, 'pageConfigsSerialized'));
|
|
18
|
+
assert(hasProp(virtualFileExportsGlobalEntry, 'pageConfigGlobalSerialized'));
|
|
19
|
+
const { pageConfigsSerialized, pageConfigGlobalSerialized } = virtualFileExportsGlobalEntry;
|
|
26
20
|
assertPageConfigsSerialized(pageConfigsSerialized);
|
|
27
21
|
assertPageConfigGlobalSerialized(pageConfigGlobalSerialized);
|
|
28
|
-
const { pageConfigs, pageConfigGlobal } =
|
|
22
|
+
const { pageConfigs, pageConfigGlobal } = parsePageConfigsSerialized(pageConfigsSerialized, pageConfigGlobalSerialized);
|
|
29
23
|
const pageFilesMap = {};
|
|
30
|
-
parseGlobResult(
|
|
24
|
+
parseGlobResult(virtualFileExportsGlobalEntry.pageFilesLazy).forEach(({ filePath, pageFile, globValue }) => {
|
|
31
25
|
pageFile = pageFilesMap[filePath] = pageFilesMap[filePath] ?? pageFile;
|
|
32
26
|
const loadModule = globValue;
|
|
33
27
|
assertLoadModule(loadModule);
|
|
@@ -38,7 +32,7 @@ function parseVirtualFileExports(virtualFileExports) {
|
|
|
38
32
|
}
|
|
39
33
|
};
|
|
40
34
|
});
|
|
41
|
-
parseGlobResult(
|
|
35
|
+
parseGlobResult(virtualFileExportsGlobalEntry.pageFilesExportNamesLazy).forEach(({ filePath, pageFile, globValue }) => {
|
|
42
36
|
pageFile = pageFilesMap[filePath] = pageFilesMap[filePath] ?? pageFile;
|
|
43
37
|
const loadModule = globValue;
|
|
44
38
|
assertLoadModule(loadModule);
|
|
@@ -51,20 +45,20 @@ function parseVirtualFileExports(virtualFileExports) {
|
|
|
51
45
|
};
|
|
52
46
|
});
|
|
53
47
|
// `pageFilesEager` contains `.page.route.js` files
|
|
54
|
-
parseGlobResult(
|
|
48
|
+
parseGlobResult(virtualFileExportsGlobalEntry.pageFilesEager).forEach(({ filePath, pageFile, globValue }) => {
|
|
55
49
|
pageFile = pageFilesMap[filePath] = pageFilesMap[filePath] ?? pageFile;
|
|
56
50
|
const moduleExports = globValue;
|
|
57
51
|
assert(isObject(moduleExports));
|
|
58
52
|
pageFile.fileExports = moduleExports;
|
|
59
53
|
});
|
|
60
|
-
parseGlobResult(
|
|
54
|
+
parseGlobResult(virtualFileExportsGlobalEntry.pageFilesExportNamesEager).forEach(({ filePath, pageFile, globValue }) => {
|
|
61
55
|
pageFile = pageFilesMap[filePath] = pageFilesMap[filePath] ?? pageFile;
|
|
62
56
|
const moduleExports = globValue;
|
|
63
57
|
assert(isObject(moduleExports));
|
|
64
58
|
assert(hasProp(moduleExports, 'exportNames', 'string[]'), pageFile.filePath);
|
|
65
59
|
pageFile.exportNames = moduleExports.exportNames;
|
|
66
60
|
});
|
|
67
|
-
|
|
61
|
+
virtualFileExportsGlobalEntry.pageFilesList.forEach((filePath) => {
|
|
68
62
|
pageFilesMap[filePath] = pageFilesMap[filePath] ?? getPageFileObject(filePath);
|
|
69
63
|
});
|
|
70
64
|
const pageFilesAll = Object.values(pageFilesMap);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export type { PageFile } from './getPageFiles/getPageFileObject.js';
|
|
2
|
-
export type { ExportsAll,
|
|
2
|
+
export type { ExportsAll, VikeConfigPublicPageLazyLoaded } from './page-configs/resolveVikeConfigPublic.js';
|
|
3
3
|
export { getPageFilesClientSide } from './getPageFiles/getAllPageIdFiles.js';
|
|
4
4
|
export { getPageFilesServerSide } from './getPageFiles/getAllPageIdFiles.js';
|
|
@@ -11,14 +11,14 @@ export { isUserHookError };
|
|
|
11
11
|
export type { PageContextExecHook };
|
|
12
12
|
import type { PageContextClient, PageContextServer } from '../../types/PageContext.js';
|
|
13
13
|
import type { Hook, HookLoc } from './getHook.js';
|
|
14
|
-
import type {
|
|
14
|
+
import type { VikeConfigPublicPageLazyLoaded } from '../getPageFiles.js';
|
|
15
15
|
import type { HookName, HookNameGlobal } from '../../types/Config.js';
|
|
16
16
|
import type { PageConfigGlobalRuntime } from '../../types/PageConfig.js';
|
|
17
17
|
import type { PageContextForPublicUsageServer } from '../../node/runtime/renderPage/preparePageContextForPublicUsageServer.js';
|
|
18
18
|
import type { PageContextForPublicUsageClientShared } from '../../client/shared/preparePageContextForPublicUsageClientShared.js';
|
|
19
19
|
import { type PageContextPrepareMinimum } from '../preparePageContextForPublicUsage.js';
|
|
20
20
|
import type { GlobalContextPrepareMinimum } from '../prepareGlobalContextForPublicUsage.js';
|
|
21
|
-
type PageContextExecHook =
|
|
21
|
+
type PageContextExecHook = VikeConfigPublicPageLazyLoaded & PageContextForPublicUsage;
|
|
22
22
|
type PageContextForPublicUsage = PageContextForPublicUsageServer | PageContextForPublicUsageClientShared;
|
|
23
23
|
type HookWithResult = Hook & {
|
|
24
24
|
hookReturn: unknown;
|
|
@@ -9,7 +9,7 @@ export type { HookLoc };
|
|
|
9
9
|
export type { HookTimeout };
|
|
10
10
|
export type { HooksTimeoutProvidedByUser };
|
|
11
11
|
export { getHookTimeoutDefault };
|
|
12
|
-
import type {
|
|
12
|
+
import type { VikeConfigPublicPageLazyLoaded } from '../getPageFiles.js';
|
|
13
13
|
import type { HookNameOld, HookNamePage, HookNameGlobal, HookName } from '../../types/Config.js';
|
|
14
14
|
import type { PageConfigGlobalRuntime, PageConfigRuntime } from '../../types/PageConfig.js';
|
|
15
15
|
import type { GlobalContextPrepareMinimum } from '../prepareGlobalContextForPublicUsage.js';
|
|
@@ -28,8 +28,8 @@ type HookTimeout = {
|
|
|
28
28
|
warning: number | false;
|
|
29
29
|
};
|
|
30
30
|
type HooksTimeoutProvidedByUser = false | Partial<Record<HookNameOld, false | Partial<HookTimeout>>>;
|
|
31
|
-
declare function getHookFromPageContext(pageContext:
|
|
32
|
-
declare function getHookFromPageContextNew(hookName: HookName, pageContext:
|
|
31
|
+
declare function getHookFromPageContext(pageContext: VikeConfigPublicPageLazyLoaded, hookName: HookNameOld): null | Hook;
|
|
32
|
+
declare function getHookFromPageContextNew(hookName: HookName, pageContext: VikeConfigPublicPageLazyLoaded): Hook[];
|
|
33
33
|
declare function getHookFromPageConfig(pageConfig: PageConfigRuntime, hookName: HookNamePage): null | Hook;
|
|
34
34
|
declare function getHookFromPageConfigGlobal(pageConfigGlobal: PageConfigGlobalRuntime, hookName: HookNameGlobal): null | Hook;
|
|
35
35
|
declare function getHookFromPageConfigGlobalCumulative(pageConfigGlobal: PageConfigGlobalRuntime, hookName: HookNameGlobal): Hook[];
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export { loadAndParseVirtualFilePageEntry };
|
|
2
|
+
import { assert, objectAssign } from '../utils.js';
|
|
3
|
+
import { parseConfigValuesSerialized } from './serialize/parsePageConfigsSerialized.js';
|
|
4
|
+
async function loadAndParseVirtualFilePageEntry(pageConfig, isDev) {
|
|
5
|
+
if ('isPageEntryLoaded' in pageConfig &&
|
|
6
|
+
// We don't need to cache in dev, since Vite already caches the virtual module
|
|
7
|
+
!isDev) {
|
|
8
|
+
return pageConfig;
|
|
9
|
+
}
|
|
10
|
+
const { moduleId, moduleExportsPromise } = pageConfig.loadVirtualFilePageEntry();
|
|
11
|
+
const virtualFileExportsPageEntry = await moduleExportsPromise;
|
|
12
|
+
// `configValuesLoaded` is sometimes `undefined` https://github.com/vikejs/vike/discussions/2092
|
|
13
|
+
if (!virtualFileExportsPageEntry)
|
|
14
|
+
assert(false, { moduleExportsPromise, virtualFileExportsPageEntry, moduleId });
|
|
15
|
+
const configValues = parseVirtualFileExportsPageEntry(virtualFileExportsPageEntry);
|
|
16
|
+
Object.assign(pageConfig.configValues, configValues);
|
|
17
|
+
objectAssign(pageConfig, { isPageEntryLoaded: true });
|
|
18
|
+
return pageConfig;
|
|
19
|
+
}
|
|
20
|
+
function parseVirtualFileExportsPageEntry(virtualFileExportsPageEntry) {
|
|
21
|
+
const configValues = parseConfigValuesSerialized(virtualFileExportsPageEntry.configValuesSerialized);
|
|
22
|
+
return configValues;
|
|
23
|
+
}
|