vike 0.4.231-commit-e1c3295 → 0.4.232-commit-134207d
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/README.md +4 -2
- package/dist/cjs/__internal/index.js +2 -2
- package/dist/cjs/client/runtime-client-routing/globalContext.js +1 -1
- package/dist/cjs/client/shared/createGetGlobalContextClient.js +2 -2
- package/dist/cjs/client/shared/preparePageContextForPublicUsageClientShared.js +2 -2
- package/dist/cjs/node/api/build.js +6 -2
- package/dist/cjs/node/api/dev.js +1 -1
- package/dist/cjs/node/api/prepareViteApiCall.js +8 -8
- package/dist/cjs/node/api/prerender.js +1 -1
- package/dist/cjs/node/api/preview.js +2 -2
- package/dist/cjs/node/cli/entry.js +1 -1
- package/dist/cjs/node/cli/parseCli.js +2 -2
- package/dist/cjs/node/client/router.js +1 -1
- package/dist/cjs/node/createPageRenderer.js +1 -1
- package/dist/cjs/node/prerender/context.js +1 -1
- package/dist/cjs/node/prerender/resolvePrerenderConfig.js +3 -2
- package/dist/cjs/node/prerender/runPrerender.js +91 -46
- package/dist/cjs/node/prerender/runPrerenderEntry.js +1 -1
- package/dist/cjs/node/prerender/utils.js +1 -0
- package/dist/cjs/node/runtime/globalContext.js +22 -15
- package/dist/cjs/node/runtime/html/injectAssets/getHtmlTags.js +7 -7
- package/dist/cjs/node/runtime/html/injectAssets/getViteDevScript.js +1 -1
- package/dist/cjs/node/runtime/html/injectAssets/inferHtmlTags.js +1 -1
- package/dist/cjs/node/runtime/html/injectAssets/injectAssets__public.js +5 -5
- package/dist/cjs/node/runtime/html/injectAssets/injectHtmlTags.js +3 -3
- package/dist/cjs/node/runtime/html/injectAssets.js +1 -1
- package/dist/cjs/node/runtime/html/renderHtml.js +8 -8
- package/dist/cjs/node/runtime/html/serializeContext.js +5 -5
- package/dist/cjs/node/runtime/html/stream.js +19 -19
- package/dist/cjs/node/runtime/index-deprecated.js +2 -2
- package/dist/cjs/node/runtime/index.js +1 -1
- package/dist/cjs/node/runtime/renderPage/analyzePage.js +4 -4
- package/dist/cjs/node/runtime/renderPage/assertArguments.js +1 -1
- package/dist/cjs/node/runtime/renderPage/createHttpResponse/assertNoInfiniteHttpRedirect.js +1 -1
- package/dist/cjs/node/runtime/renderPage/createHttpResponse.js +5 -6
- package/dist/cjs/node/runtime/renderPage/createPageContextServerSide.js +4 -4
- package/dist/cjs/node/runtime/renderPage/debugPageFiles.js +1 -1
- package/dist/cjs/node/runtime/renderPage/execHookServer.js +1 -4
- package/dist/cjs/node/runtime/renderPage/executeOnBeforeRenderAndDataHooks.js +1 -1
- package/dist/cjs/node/runtime/renderPage/executeOnRenderHtmlHook.js +3 -3
- package/dist/cjs/node/runtime/renderPage/getEarlyHints.js +1 -1
- package/dist/cjs/node/runtime/renderPage/getHttpResponseBody.js +1 -1
- package/dist/cjs/node/runtime/renderPage/getPageAssets/getManifestEntry.js +1 -1
- package/dist/cjs/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.js +1 -1
- package/dist/cjs/node/runtime/renderPage/getPageAssets.js +2 -2
- package/dist/cjs/node/runtime/renderPage/handleErrorWithoutErrorPage.js +1 -1
- package/dist/cjs/node/runtime/renderPage/handlePageContextRequestUrl.js +1 -1
- package/dist/cjs/node/runtime/renderPage/isFontFallback.js +3 -3
- package/dist/cjs/node/runtime/renderPage/isNewError.js +2 -1
- package/dist/cjs/node/runtime/renderPage/loadPageConfigsLazyServerSide.js +10 -10
- package/dist/cjs/node/runtime/renderPage/log404/index.js +4 -8
- package/dist/cjs/node/runtime/renderPage/logErrorHint/errors.js +2 -2
- package/dist/cjs/node/runtime/renderPage/logErrorHint.js +18 -18
- package/dist/cjs/node/runtime/renderPage/loggerProd.js +3 -3
- package/dist/cjs/node/runtime/renderPage/renderPageAlreadyRouted.js +1 -1
- package/dist/cjs/node/runtime/renderPage/resolveRedirects.js +22 -4
- package/dist/cjs/node/runtime/renderPage.js +17 -34
- package/dist/cjs/node/runtime/universal-middleware.js +2 -2
- package/dist/cjs/node/runtime/utils.js +1 -1
- package/dist/cjs/node/runtime-dev/createDevMiddleware.js +3 -3
- package/dist/cjs/node/shared/extractAssetsQuery.js +1 -1
- package/dist/cjs/node/shared/getVikeConfigError.js +22 -0
- package/dist/cjs/node/shared/resolveBase.js +1 -1
- package/dist/cjs/node/shared/utils.js +1 -0
- package/dist/cjs/node/shared/virtualFiles/virtualFilePageConfigLazy.js +2 -2
- package/dist/cjs/node/vite/index.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginBaseUrls.js +3 -3
- package/dist/cjs/node/vite/plugins/pluginBuild/handleAssetsManifest.js +30 -28
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginAutoFullBuild.js +10 -10
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginBuildApp.js +10 -10
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginBuildConfig.js +10 -10
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginBuildEntry.js +12 -13
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginDistFileNames.js +14 -12
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginDistPackageJsonFile.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginModuleBanner.js +3 -3
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginSuppressRollupWarning.js +3 -3
- package/dist/cjs/node/vite/plugins/pluginBuild.js +1 -1
- package/dist/cjs/node/vite/plugins/pluginCommon/assertResolveAlias.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginCommon.js +14 -14
- package/dist/cjs/node/vite/plugins/pluginDev/determineFsAllowList.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginDev/determineOptimizeDeps.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginDev.js +8 -8
- package/dist/cjs/node/vite/plugins/pluginEnvVars.js +4 -4
- package/dist/cjs/node/vite/plugins/pluginExtractAssets.js +6 -6
- package/dist/cjs/node/vite/plugins/pluginExtractExportNames.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginFileEnv.js +3 -3
- package/dist/cjs/node/vite/plugins/pluginPreview.js +9 -9
- package/dist/cjs/node/vite/plugins/pluginReplaceConstants.js +3 -3
- package/dist/cjs/node/vite/plugins/pluginSetGlobalContext.js +6 -6
- package/dist/cjs/node/vite/plugins/pluginVirtualFiles/getVirtualFileEntry.js +10 -10
- package/dist/cjs/node/vite/plugins/pluginVirtualFiles/getVirtualFilePageConfigLazy.js +11 -1
- package/dist/cjs/node/vite/plugins/pluginVirtualFiles.js +3 -3
- package/dist/cjs/node/vite/plugins/pluginWorkaroundCssModuleHmr.js +1 -1
- package/dist/cjs/node/vite/plugins/pluginWorkaroundVite6HmrRegression.js +2 -2
- package/dist/cjs/node/vite/shared/addSsrMiddleware.js +3 -3
- package/dist/cjs/node/vite/shared/findPageFiles.js +1 -1
- package/dist/cjs/node/vite/shared/getFilePath.js +24 -24
- package/dist/cjs/node/vite/shared/getHttpRequestAsyncStore.js +4 -4
- package/dist/cjs/node/vite/shared/getOutDirs.js +2 -2
- package/dist/cjs/node/vite/shared/getViteConfigRuntime.js +3 -3
- package/dist/cjs/node/vite/shared/isAsset.js +1 -1
- package/dist/cjs/node/vite/shared/isViteCliCall.js +1 -1
- package/dist/cjs/node/vite/shared/isViteServerBuild.js +2 -2
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errBabelReact.js +1 -1
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errBabelSolid.js +1 -1
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errEsbuild.js +5 -5
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errMdx1.js +3 -3
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errMdx2.js +10 -10
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errPostcss.js +2 -2
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errSwc.js +2 -2
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errSwcBig.js +2 -2
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errVueCss.js +2 -2
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errVueHtml.js +1 -1
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errVueJavascript.js +1 -1
- package/dist/cjs/node/vite/shared/loggerNotProd/errorWithCodeSnippet.js +3 -3
- package/dist/cjs/node/vite/shared/loggerNotProd.js +1 -1
- package/dist/cjs/node/vite/shared/resolveClientEntriesDev.js +2 -2
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/assertExtensions.js +2 -2
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/configDefinitionsBuiltIn.js +50 -50
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/crawlPlusFiles/ignorePatternsBuiltIn.js +1 -1
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/crawlPlusFiles.js +13 -13
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/filesystemRouting.js +14 -5
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/getPlusFilesAll.js +4 -4
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/loadFileAtConfigTime.js +1 -1
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/pointerImports.js +5 -5
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/resolvePointerImport.js +5 -5
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/transpileAndExecuteFile.js +25 -25
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal.js +46 -46
- package/dist/cjs/node/vite/utils.js +2 -7
- package/dist/cjs/shared/assertHookReturnedObject.js +1 -1
- package/dist/cjs/shared/assertPageContextProvidedByUser.js +2 -2
- package/dist/cjs/shared/createGlobalContextShared.js +26 -18
- package/dist/cjs/shared/createPageContextShared.js +1 -1
- package/dist/cjs/shared/getPageContextRequestUrl.js +1 -1
- package/dist/cjs/shared/getPageContextUrlComputed.js +5 -5
- package/dist/cjs/shared/getPageFiles/analyzePageClientSide/analyzeExports.js +3 -3
- package/dist/cjs/shared/getPageFiles/analyzePageClientSide/determineClientEntry.js +1 -1
- package/dist/cjs/shared/getPageFiles/analyzePageClientSide.js +3 -3
- package/dist/cjs/shared/getPageFiles/fileTypes.js +1 -1
- package/dist/cjs/shared/getPageFiles/getAllPageIdFiles.js +2 -2
- package/dist/cjs/shared/getPageFiles/getPageFileObject.js +1 -1
- package/dist/cjs/shared/getProxyForPublicUsage.js +2 -2
- package/dist/cjs/shared/hooks/execHook.js +2 -2
- package/dist/cjs/shared/hooks/getHook.js +4 -4
- package/dist/cjs/shared/modifyUrl.js +1 -1
- package/dist/cjs/shared/page-configs/assertPlusFileExport.js +2 -2
- package/dist/cjs/shared/page-configs/getConfigValueBuildTime.js +4 -4
- package/dist/cjs/shared/page-configs/resolveVikeConfigPublic.js +21 -21
- package/dist/cjs/shared/page-configs/serialize/parsePageConfigs.js +3 -3
- package/dist/cjs/shared/page-configs/serialize/serializeConfigValues.js +9 -9
- package/dist/cjs/shared/preparePageContextForPublicUsage.js +3 -3
- package/dist/cjs/shared/route/abort.js +7 -7
- package/dist/cjs/shared/route/debug.js +1 -1
- package/dist/cjs/shared/route/deduceRouteStringFromFilesystemPath.js +1 -1
- package/dist/cjs/shared/route/executeOnBeforeRouteHook.js +3 -3
- package/dist/cjs/shared/route/index.js +5 -5
- package/dist/cjs/shared/route/loadPageRoutes.js +8 -8
- package/dist/cjs/shared/route/resolvePrecedence.js +2 -2
- package/dist/cjs/shared/route/resolveRoute.js +1 -1
- package/dist/cjs/shared/route/resolveRouteFunction.js +2 -2
- package/dist/cjs/shared/utils.js +1 -0
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/cjs/utils/assert.js +9 -9
- package/dist/cjs/utils/assertKeys.js +1 -1
- package/dist/cjs/utils/assertSetup.js +1 -1
- package/dist/cjs/utils/assertSingleInstance.js +5 -5
- package/dist/cjs/utils/catchInfiniteLoop.js +1 -1
- package/dist/cjs/utils/debug.js +1 -1
- package/dist/cjs/utils/findFile.js +5 -5
- package/dist/cjs/utils/findPackageJson.js +3 -3
- package/dist/cjs/utils/formatHintLog.js +1 -1
- package/dist/cjs/utils/freezePartial.js +1 -1
- package/dist/cjs/utils/genPromise.js +2 -2
- package/dist/cjs/utils/getMostSimilar.js +1 -1
- package/dist/cjs/utils/injectRollupInputs.js +2 -2
- package/dist/cjs/utils/isFilePathAbsoluteFilesystem.js +1 -1
- package/dist/cjs/utils/objectAssignSafe.js +1 -1
- package/dist/cjs/utils/pLimit.js +4 -4
- package/dist/cjs/utils/parseNpmPackage.js +2 -2
- package/dist/cjs/utils/parseUrl.js +3 -3
- package/dist/cjs/utils/path.js +1 -1
- package/dist/cjs/utils/preservePropertyGetters.js +1 -1
- package/dist/cjs/utils/{removeFileExtention.js → removeFileExtension.js} +2 -2
- package/dist/cjs/utils/requireResolve.js +10 -10
- package/dist/cjs/utils/rollupSourceMap.js +2 -2
- package/dist/cjs/utils/stripAnsi.js +1 -1
- package/dist/cjs/utils/styleFileRE.js +1 -0
- package/dist/cjs/utils/trimWithAnsi.js +1 -1
- package/dist/esm/__internal/index.js +2 -2
- package/dist/esm/client/index.d.ts +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/client/node.js +1 -1
- package/dist/esm/client/runtime-client-routing/createPageContextClientSide.js +1 -1
- package/dist/esm/client/runtime-client-routing/getPageContext/removeBuiltInOverrides.js +1 -1
- package/dist/esm/client/runtime-client-routing/getPageContextCurrent.js +1 -1
- package/dist/esm/client/runtime-client-routing/getPageContextFromHooks.d.ts +2 -3
- package/dist/esm/client/runtime-client-routing/getPageContextFromHooks.js +5 -5
- package/dist/esm/client/runtime-client-routing/globalContext.js +1 -1
- package/dist/esm/client/runtime-client-routing/history.js +6 -6
- package/dist/esm/client/runtime-client-routing/initClientRouter.js +1 -1
- package/dist/esm/client/runtime-client-routing/initOnLinkClick.js +1 -1
- package/dist/esm/client/runtime-client-routing/initOnPopState.js +1 -1
- package/dist/esm/client/runtime-client-routing/isClientSideRoutable.js +1 -1
- package/dist/esm/client/runtime-client-routing/navigate.js +1 -1
- package/dist/esm/client/runtime-client-routing/prefetch/getPrefetchSettings.js +2 -2
- package/dist/esm/client/runtime-client-routing/prefetch.js +10 -10
- package/dist/esm/client/runtime-client-routing/renderPageClientSide.d.ts +1 -1
- package/dist/esm/client/runtime-client-routing/renderPageClientSide.js +20 -20
- package/dist/esm/client/runtime-client-routing/setScrollPosition.js +1 -1
- package/dist/esm/client/runtime-server-routing/createPageContextClientSide.js +1 -1
- package/dist/esm/client/shared/createGetGlobalContextClient.js +3 -3
- package/dist/esm/client/shared/loadPageConfigsLazyClientSide.js +1 -1
- package/dist/esm/client/shared/preparePageContextForPublicUsageClientShared.js +3 -3
- package/dist/esm/node/api/build.js +6 -2
- package/dist/esm/node/api/dev.js +1 -1
- package/dist/esm/node/api/prepareViteApiCall.js +8 -8
- package/dist/esm/node/api/prerender.js +1 -1
- package/dist/esm/node/api/preview.js +2 -2
- package/dist/esm/node/cli/entry.js +1 -1
- package/dist/esm/node/cli/parseCli.js +2 -2
- package/dist/esm/node/client/router.js +1 -1
- package/dist/esm/node/createPageRenderer.js +1 -1
- package/dist/esm/node/prerender/context.d.ts +1 -1
- package/dist/esm/node/prerender/context.js +1 -1
- package/dist/esm/node/prerender/resolvePrerenderConfig.d.ts +1 -0
- package/dist/esm/node/prerender/resolvePrerenderConfig.js +3 -2
- package/dist/esm/node/prerender/runPrerender.d.ts +9 -6
- package/dist/esm/node/prerender/runPrerender.js +90 -45
- package/dist/esm/node/prerender/runPrerenderEntry.js +1 -1
- package/dist/esm/node/prerender/utils.d.ts +1 -0
- package/dist/esm/node/prerender/utils.js +1 -0
- package/dist/esm/node/runtime/globalContext.js +25 -18
- package/dist/esm/node/runtime/html/injectAssets/getHtmlTags.js +8 -8
- package/dist/esm/node/runtime/html/injectAssets/getViteDevScript.js +1 -1
- package/dist/esm/node/runtime/html/injectAssets/inferHtmlTags.js +1 -1
- package/dist/esm/node/runtime/html/injectAssets/injectAssets__public.js +5 -5
- package/dist/esm/node/runtime/html/injectAssets/injectHtmlTags.js +3 -3
- package/dist/esm/node/runtime/html/injectAssets.js +2 -2
- package/dist/esm/node/runtime/html/renderHtml.js +10 -10
- package/dist/esm/node/runtime/html/serializeContext.js +5 -5
- package/dist/esm/node/runtime/html/stream.d.ts +1 -1
- package/dist/esm/node/runtime/html/stream.js +21 -21
- package/dist/esm/node/runtime/index-deprecated.js +2 -2
- package/dist/esm/node/runtime/index.js +1 -1
- package/dist/esm/node/runtime/renderPage/analyzePage.js +4 -4
- package/dist/esm/node/runtime/renderPage/assertArguments.js +1 -1
- package/dist/esm/node/runtime/renderPage/createHttpResponse/assertNoInfiniteHttpRedirect.js +1 -1
- package/dist/esm/node/runtime/renderPage/createHttpResponse.js +5 -6
- package/dist/esm/node/runtime/renderPage/createPageContextServerSide.d.ts +1 -1
- package/dist/esm/node/runtime/renderPage/createPageContextServerSide.js +4 -4
- package/dist/esm/node/runtime/renderPage/debugPageFiles.d.ts +1 -1
- package/dist/esm/node/runtime/renderPage/debugPageFiles.js +1 -1
- package/dist/esm/node/runtime/renderPage/execHookServer.js +2 -5
- package/dist/esm/node/runtime/renderPage/executeOnBeforeRenderAndDataHooks.js +1 -1
- package/dist/esm/node/runtime/renderPage/executeOnRenderHtmlHook.js +5 -5
- package/dist/esm/node/runtime/renderPage/getEarlyHints.js +1 -1
- package/dist/esm/node/runtime/renderPage/getHttpResponseBody.js +2 -2
- package/dist/esm/node/runtime/renderPage/getPageAssets/getManifestEntry.js +1 -1
- package/dist/esm/node/runtime/renderPage/getPageAssets/retrieveAssetsProd.js +1 -1
- package/dist/esm/node/runtime/renderPage/getPageAssets.js +2 -2
- package/dist/esm/node/runtime/renderPage/handleErrorWithoutErrorPage.js +1 -1
- package/dist/esm/node/runtime/renderPage/handlePageContextRequestUrl.js +1 -1
- package/dist/esm/node/runtime/renderPage/isFontFallback.js +3 -3
- package/dist/esm/node/runtime/renderPage/isNewError.d.ts +2 -0
- package/dist/esm/node/runtime/renderPage/isNewError.js +2 -1
- package/dist/esm/node/runtime/renderPage/loadPageConfigsLazyServerSide.js +11 -11
- package/dist/esm/node/runtime/renderPage/log404/index.js +5 -9
- package/dist/esm/node/runtime/renderPage/logErrorHint/errors.d.ts +1 -1
- package/dist/esm/node/runtime/renderPage/logErrorHint/errors.js +1 -1
- package/dist/esm/node/runtime/renderPage/logErrorHint.js +18 -18
- package/dist/esm/node/runtime/renderPage/loggerProd.d.ts +1 -1
- package/dist/esm/node/runtime/renderPage/loggerProd.js +3 -3
- package/dist/esm/node/runtime/renderPage/preparePageContextForPublicUsageServer.js +1 -1
- package/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.js +2 -2
- package/dist/esm/node/runtime/renderPage/resolveRedirects.d.ts +2 -0
- package/dist/esm/node/runtime/renderPage/resolveRedirects.js +24 -6
- package/dist/esm/node/runtime/renderPage.d.ts +0 -11
- package/dist/esm/node/runtime/renderPage.js +20 -37
- package/dist/esm/node/runtime/universal-middleware.js +2 -2
- package/dist/esm/node/runtime/utils.d.ts +1 -1
- package/dist/esm/node/runtime/utils.js +1 -1
- package/dist/esm/node/runtime-dev/createDevMiddleware.js +3 -3
- package/dist/esm/node/shared/extractAssetsQuery.js +1 -1
- package/dist/esm/node/shared/getVikeConfigError.d.ts +13 -0
- package/dist/esm/node/shared/getVikeConfigError.js +20 -0
- package/dist/esm/node/shared/resolveBase.js +1 -1
- package/dist/esm/node/shared/utils.d.ts +1 -0
- package/dist/esm/node/shared/utils.js +1 -0
- package/dist/esm/node/shared/virtualFiles/virtualFilePageConfigLazy.js +2 -2
- package/dist/esm/node/vite/index.js +2 -2
- package/dist/esm/node/vite/plugins/pluginBaseUrls.js +3 -3
- package/dist/esm/node/vite/plugins/pluginBuild/handleAssetsManifest.d.ts +3 -2
- package/dist/esm/node/vite/plugins/pluginBuild/handleAssetsManifest.js +14 -12
- package/dist/esm/node/vite/plugins/pluginBuild/pluginAutoFullBuild.js +10 -10
- package/dist/esm/node/vite/plugins/pluginBuild/pluginBuildApp.js +10 -10
- package/dist/esm/node/vite/plugins/pluginBuild/pluginBuildConfig.js +12 -12
- package/dist/esm/node/vite/plugins/pluginBuild/pluginBuildEntry.d.ts +1 -2
- package/dist/esm/node/vite/plugins/pluginBuild/pluginBuildEntry.js +11 -12
- package/dist/esm/node/vite/plugins/pluginBuild/pluginDistFileNames.js +11 -9
- package/dist/esm/node/vite/plugins/pluginBuild/pluginDistPackageJsonFile.js +2 -2
- package/dist/esm/node/vite/plugins/pluginBuild/pluginModuleBanner.js +3 -3
- package/dist/esm/node/vite/plugins/pluginBuild/pluginSuppressRollupWarning.js +3 -3
- package/dist/esm/node/vite/plugins/pluginBuild.js +1 -1
- package/dist/esm/node/vite/plugins/pluginCommon/assertResolveAlias.js +2 -2
- package/dist/esm/node/vite/plugins/pluginCommon.js +14 -14
- package/dist/esm/node/vite/plugins/pluginDev/determineFsAllowList.js +1 -1
- package/dist/esm/node/vite/plugins/pluginDev/determineOptimizeDeps.js +5 -5
- package/dist/esm/node/vite/plugins/pluginDev.js +8 -8
- package/dist/esm/node/vite/plugins/pluginEnvVars.js +5 -5
- package/dist/esm/node/vite/plugins/pluginExtractAssets.js +8 -8
- package/dist/esm/node/vite/plugins/pluginExtractExportNames.js +3 -3
- package/dist/esm/node/vite/plugins/pluginFileEnv.js +4 -4
- package/dist/esm/node/vite/plugins/pluginPreview.js +5 -5
- package/dist/esm/node/vite/plugins/pluginReplaceConstants.js +3 -3
- package/dist/esm/node/vite/plugins/pluginSetGlobalContext.js +7 -7
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/getVirtualFileEntry.js +11 -11
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/getVirtualFilePageConfigLazy.js +13 -3
- package/dist/esm/node/vite/plugins/pluginVirtualFiles.js +3 -3
- package/dist/esm/node/vite/plugins/pluginWorkaroundCssModuleHmr.js +1 -1
- package/dist/esm/node/vite/plugins/pluginWorkaroundVite6HmrRegression.js +2 -2
- package/dist/esm/node/vite/shared/addSsrMiddleware.js +3 -3
- package/dist/esm/node/vite/shared/findPageFiles.js +1 -1
- package/dist/esm/node/vite/shared/getFilePath.d.ts +5 -5
- package/dist/esm/node/vite/shared/getFilePath.js +22 -22
- package/dist/esm/node/vite/shared/getHttpRequestAsyncStore.js +4 -4
- package/dist/esm/node/vite/shared/getOutDirs.js +2 -2
- package/dist/esm/node/vite/shared/getViteConfigRuntime.js +3 -3
- package/dist/esm/node/vite/shared/isAsset.js +1 -1
- package/dist/esm/node/vite/shared/isViteCliCall.js +1 -1
- package/dist/esm/node/vite/shared/isViteServerBuild.js +2 -2
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errBabelReact.js +1 -1
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errBabelSolid.js +1 -1
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errEsbuild.js +5 -5
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errMdx1.js +3 -3
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errMdx2.js +10 -10
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errPostcss.js +2 -2
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errSwc.js +2 -2
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errSwcBig.js +2 -2
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errVueCss.js +2 -2
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errVueHtml.js +1 -1
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet/fixture-errors/errVueJavascript.js +1 -1
- package/dist/esm/node/vite/shared/loggerNotProd/errorWithCodeSnippet.js +4 -4
- package/dist/esm/node/vite/shared/loggerNotProd.js +3 -3
- package/dist/esm/node/vite/shared/resolveClientEntriesDev.js +3 -3
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/assertExtensions.js +1 -1
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/configDefinitionsBuiltIn.js +50 -50
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/crawlPlusFiles/ignorePatternsBuiltIn.js +1 -1
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/crawlPlusFiles.js +10 -10
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/filesystemRouting.js +14 -5
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/getPlusFilesAll.js +4 -4
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/loadFileAtConfigTime.js +1 -1
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/pointerImports.js +5 -5
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/resolvePointerImport.js +6 -6
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/transpileAndExecuteFile.js +14 -14
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal.d.ts +2 -2
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal.js +52 -52
- package/dist/esm/node/vite/utils.d.ts +0 -6
- package/dist/esm/node/vite/utils.js +2 -7
- package/dist/esm/shared/assertHookReturnedObject.js +1 -1
- package/dist/esm/shared/assertPageContextProvidedByUser.d.ts +1 -1
- package/dist/esm/shared/assertPageContextProvidedByUser.js +2 -2
- package/dist/esm/shared/createGlobalContextShared.d.ts +2 -0
- package/dist/esm/shared/createGlobalContextShared.js +28 -20
- package/dist/esm/shared/createPageContextShared.js +1 -1
- package/dist/esm/shared/getPageContextRequestUrl.js +1 -1
- package/dist/esm/shared/getPageContextUrlComputed.js +5 -5
- package/dist/esm/shared/getPageFiles/analyzePageClientSide/analyzeExports.d.ts +1 -1
- package/dist/esm/shared/getPageFiles/analyzePageClientSide/analyzeExports.js +3 -3
- package/dist/esm/shared/getPageFiles/analyzePageClientSide/determineClientEntry.d.ts +1 -1
- package/dist/esm/shared/getPageFiles/analyzePageClientSide/determineClientEntry.js +1 -1
- package/dist/esm/shared/getPageFiles/analyzePageClientSide.js +3 -3
- package/dist/esm/shared/getPageFiles/fileTypes.js +1 -1
- package/dist/esm/shared/getPageFiles/getAllPageIdFiles.js +2 -2
- package/dist/esm/shared/getPageFiles/getPageFileObject.js +1 -1
- package/dist/esm/shared/getProxyForPublicUsage.js +2 -2
- package/dist/esm/shared/hooks/execHook.js +3 -3
- package/dist/esm/shared/hooks/getHook.js +4 -4
- package/dist/esm/shared/modifyUrl.js +1 -1
- package/dist/esm/shared/modifyUrlSameOrigin.js +1 -1
- package/dist/esm/shared/page-configs/assertPlusFileExport.js +2 -2
- package/dist/esm/shared/page-configs/getConfigValueBuildTime.js +4 -4
- package/dist/esm/shared/page-configs/resolveVikeConfigPublic.d.ts +2 -2
- package/dist/esm/shared/page-configs/resolveVikeConfigPublic.js +22 -22
- package/dist/esm/shared/page-configs/serialize/parsePageConfigs.js +3 -3
- package/dist/esm/shared/page-configs/serialize/serializeConfigValues.js +11 -11
- package/dist/esm/shared/preparePageContextForPublicUsage.js +4 -4
- package/dist/esm/shared/route/abort.js +8 -8
- package/dist/esm/shared/route/debug.js +1 -1
- package/dist/esm/shared/route/deduceRouteStringFromFilesystemPath.js +1 -1
- package/dist/esm/shared/route/executeOnBeforeRouteHook.js +5 -5
- package/dist/esm/shared/route/index.js +6 -6
- package/dist/esm/shared/route/loadPageRoutes.js +8 -8
- package/dist/esm/shared/route/resolvePrecedence.d.ts +2 -2
- package/dist/esm/shared/route/resolvePrecedence.js +2 -2
- package/dist/esm/shared/route/resolveRoute.js +1 -1
- package/dist/esm/shared/route/resolveRouteFunction.js +2 -2
- package/dist/esm/shared/utils.d.ts +1 -0
- package/dist/esm/shared/utils.js +1 -0
- package/dist/esm/types/Config.d.ts +6 -0
- package/dist/esm/types/FilePath.d.ts +1 -1
- package/dist/esm/types/PageConfig.d.ts +1 -1
- package/dist/esm/types/PageContext.d.ts +2 -2
- package/dist/esm/types/index-dreprecated.d.ts +1 -1
- package/dist/esm/types/index.d.ts +3 -3
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/utils/assert.js +9 -9
- package/dist/esm/utils/assertKeys.js +1 -1
- package/dist/esm/utils/assertSetup.js +1 -1
- package/dist/esm/utils/assertSingleInstance.js +5 -5
- package/dist/esm/utils/catchInfiniteLoop.js +1 -1
- package/dist/esm/utils/debug.js +1 -1
- package/dist/esm/utils/findFile.js +2 -2
- package/dist/esm/utils/findPackageJson.js +2 -2
- package/dist/esm/utils/formatHintLog.js +1 -1
- package/dist/esm/utils/freezePartial.js +1 -1
- package/dist/esm/utils/genPromise.d.ts +1 -1
- package/dist/esm/utils/genPromise.js +2 -2
- package/dist/esm/utils/getMostSimilar.js +1 -1
- package/dist/esm/utils/injectRollupInputs.js +2 -2
- package/dist/esm/utils/isFilePathAbsoluteFilesystem.js +1 -1
- package/dist/esm/utils/objectAssignSafe.js +1 -1
- package/dist/esm/utils/pLimit.js +4 -4
- package/dist/esm/utils/parseNpmPackage.js +2 -2
- package/dist/esm/utils/parseUrl.js +3 -3
- package/dist/esm/utils/path.js +1 -1
- package/dist/esm/utils/preservePropertyGetters.js +1 -1
- package/dist/esm/utils/removeFileExtension.d.ts +1 -0
- package/dist/esm/utils/{removeFileExtention.js → removeFileExtension.js} +1 -1
- package/dist/esm/utils/requireResolve.d.ts +3 -3
- package/dist/esm/utils/requireResolve.js +10 -10
- package/dist/esm/utils/rollupSourceMap.js +2 -2
- package/dist/esm/utils/stripAnsi.js +1 -1
- package/dist/esm/utils/styleFileRE.js +1 -0
- package/dist/esm/utils/trimWithAnsi.js +1 -1
- package/package.json +2 -2
- package/dist/esm/utils/removeFileExtention.d.ts +0 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.resolvePrecedence = resolvePrecedence;
|
|
4
4
|
// export type { RouteMatch }
|
|
5
5
|
const resolveRouteString_js_1 = require("./resolveRouteString.js");
|
|
6
6
|
const utils_js_1 = require("./utils.js");
|
|
7
7
|
const utils_js_2 = require("./utils.js");
|
|
8
8
|
const resolveRouteString_js_2 = require("./resolveRouteString.js");
|
|
9
9
|
// See https://vike.dev/route-function#precedence
|
|
10
|
-
function
|
|
10
|
+
function resolvePrecedence(routeMatches) {
|
|
11
11
|
// prettier-ignore
|
|
12
12
|
// biome-ignore format:
|
|
13
13
|
routeMatches
|
|
@@ -15,6 +15,6 @@ function resolveRoute(routeString, urlPathname) {
|
|
|
15
15
|
const result = (0, resolveRouteString_js_1.resolveRouteString)(routeString, urlPathname);
|
|
16
16
|
return {
|
|
17
17
|
match: !!result,
|
|
18
|
-
routeParams: result?.routeParams ?? {}
|
|
18
|
+
routeParams: result?.routeParams ?? {},
|
|
19
19
|
};
|
|
20
20
|
}
|
|
@@ -15,7 +15,7 @@ async function resolveRouteFunction(routeFunction, pageContext, routeFunctionFil
|
|
|
15
15
|
let { hookReturn: result } = (0, execHook_js_1.execHookSync)({
|
|
16
16
|
hookFn: routeFunction,
|
|
17
17
|
hookFilePath: routeFunctionFilePath,
|
|
18
|
-
hookName: 'route'
|
|
18
|
+
hookName: 'route',
|
|
19
19
|
}, pageContext, preparePageContextForPublicUsage_js_1.preparePageContextForPublicUsage);
|
|
20
20
|
assertSyncRouting(result, `The Route Function ${routeFunctionFilePath}`);
|
|
21
21
|
// TODO/v1-release: make resolveRouteFunction() and route() sync
|
|
@@ -51,7 +51,7 @@ async function resolveRouteFunction(routeFunction, pageContext, routeFunctionFil
|
|
|
51
51
|
});
|
|
52
52
|
return {
|
|
53
53
|
precedence,
|
|
54
|
-
routeParams
|
|
54
|
+
routeParams,
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
57
|
// TODO/v1-release: remove, and make routing synchronous (enabling Vike to synchronously check whether a link is a Vike link before even calling ev.preventDefault())
|
package/dist/cjs/shared/utils.js
CHANGED
|
@@ -21,6 +21,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
21
21
|
__exportStar(require("../utils/assert.js"), exports);
|
|
22
22
|
__exportStar(require("../utils/parseUrl.js"), exports);
|
|
23
23
|
__exportStar(require("../utils/objectAssign.js"), exports);
|
|
24
|
+
__exportStar(require("../utils/objectReplace.js"), exports);
|
|
24
25
|
__exportStar(require("../utils/isCallable.js"), exports);
|
|
25
26
|
__exportStar(require("../utils/isObject.js"), exports);
|
|
26
27
|
__exportStar(require("../utils/unique.js"), exports);
|
package/dist/cjs/utils/assert.js
CHANGED
|
@@ -30,7 +30,7 @@ const globalObject = (0, getGlobalObject_js_1.getGlobalObject)('utils/assert.ts'
|
|
|
30
30
|
console.warn(msg);
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
showStackTraceList: new WeakSet()
|
|
33
|
+
showStackTraceList: new WeakSet(),
|
|
34
34
|
});
|
|
35
35
|
(0, assertSingleInstance_js_1.assertSingleInstance_onAssertModuleLoad)();
|
|
36
36
|
const projectTag = `[vike]`;
|
|
@@ -45,18 +45,18 @@ function assert(condition, debugInfo) {
|
|
|
45
45
|
return null;
|
|
46
46
|
}
|
|
47
47
|
const debugInfoSerialized = typeof debugInfo === 'string' ? debugInfo : JSON.stringify(debugInfo);
|
|
48
|
-
return picocolors_1.default.dim(`Debug info
|
|
48
|
+
return picocolors_1.default.dim(`Debug info for Vike maintainers (you can ignore this): ${debugInfoSerialized}`);
|
|
49
49
|
})();
|
|
50
50
|
const link = picocolors_1.default.underline('https://github.com/vikejs/vike/issues/new?template=bug.yml');
|
|
51
51
|
let errMsg = [
|
|
52
52
|
`You stumbled upon a Vike bug. Go to ${link} and copy-paste this error. A maintainer will fix the bug (usually within 24 hours).`,
|
|
53
|
-
debugStr
|
|
53
|
+
debugStr,
|
|
54
54
|
]
|
|
55
55
|
.filter(Boolean)
|
|
56
56
|
.join(' ');
|
|
57
57
|
errMsg = addWhitespace(errMsg);
|
|
58
58
|
errMsg = addPrefixAssertType(errMsg, bugTag);
|
|
59
|
-
errMsg =
|
|
59
|
+
errMsg = addPrefixProjectName(errMsg, true);
|
|
60
60
|
const internalError = (0, createErrorWithCleanStackTrace_js_1.createErrorWithCleanStackTrace)(errMsg, numberOfStackTraceLinesToRemove);
|
|
61
61
|
globalObject.onBeforeLog?.();
|
|
62
62
|
throw internalError;
|
|
@@ -67,7 +67,7 @@ function assertUsage(condition, errMsg, { showStackTrace, exitOnError } = {}) {
|
|
|
67
67
|
showStackTrace = showStackTrace || globalObject.alwaysShowStackTrace;
|
|
68
68
|
errMsg = addWhitespace(errMsg);
|
|
69
69
|
errMsg = addPrefixAssertType(errMsg, 'Wrong Usage');
|
|
70
|
-
errMsg =
|
|
70
|
+
errMsg = addPrefixProjectName(errMsg);
|
|
71
71
|
const usageError = (0, createErrorWithCleanStackTrace_js_1.createErrorWithCleanStackTrace)(errMsg, numberOfStackTraceLinesToRemove);
|
|
72
72
|
if (showStackTrace) {
|
|
73
73
|
globalObject.showStackTraceList.add(usageError);
|
|
@@ -84,7 +84,7 @@ function assertUsage(condition, errMsg, { showStackTrace, exitOnError } = {}) {
|
|
|
84
84
|
function getProjectError(errMsg) {
|
|
85
85
|
errMsg = addWhitespace(errMsg);
|
|
86
86
|
errMsg = addPrefixAssertType(errMsg, 'Error');
|
|
87
|
-
errMsg =
|
|
87
|
+
errMsg = addPrefixProjectName(errMsg);
|
|
88
88
|
const projectError = (0, createErrorWithCleanStackTrace_js_1.createErrorWithCleanStackTrace)(errMsg, numberOfStackTraceLinesToRemove);
|
|
89
89
|
return projectError;
|
|
90
90
|
}
|
|
@@ -94,7 +94,7 @@ function assertWarning(condition, msg, { onlyOnce, showStackTrace }) {
|
|
|
94
94
|
showStackTrace = showStackTrace || globalObject.alwaysShowStackTrace;
|
|
95
95
|
msg = addWhitespace(msg);
|
|
96
96
|
msg = addPrefixAssertType(msg, 'Warning');
|
|
97
|
-
msg =
|
|
97
|
+
msg = addPrefixProjectName(msg);
|
|
98
98
|
if (onlyOnce) {
|
|
99
99
|
const { alreadyLogged } = globalObject;
|
|
100
100
|
const key = onlyOnce === true ? msg : onlyOnce;
|
|
@@ -117,7 +117,7 @@ function assertInfo(condition, msg, { onlyOnce }) {
|
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
119
|
msg = addWhitespace(msg);
|
|
120
|
-
msg =
|
|
120
|
+
msg = addPrefixProjectName(msg);
|
|
121
121
|
if (onlyOnce) {
|
|
122
122
|
const { alreadyLogged } = globalObject;
|
|
123
123
|
const key = msg;
|
|
@@ -148,7 +148,7 @@ function addWhitespace(msg) {
|
|
|
148
148
|
return ` ${msg}`;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function addPrefixProjectName(msg, showProjectVersion = false) {
|
|
152
152
|
const prefix = showProjectVersion ? projectTagWithVersion : projectTag;
|
|
153
153
|
return `${prefix}${msg}`;
|
|
154
154
|
}
|
|
@@ -21,7 +21,7 @@ function assertKeys(obj, keysExpected, errPrefix) {
|
|
|
21
21
|
`unknown key${keysUnknown.length === 1 ? '' : 's'}`,
|
|
22
22
|
(0, joinEnglish_js_1.joinEnglish)(keysUnknown, 'and', picocolors_1.default.cyan) + '.',
|
|
23
23
|
'Only following keys are allowed:',
|
|
24
|
-
(0, joinEnglish_js_1.joinEnglish)(keysExpected, 'and', picocolors_1.default.cyan) + '.'
|
|
24
|
+
(0, joinEnglish_js_1.joinEnglish)(keysExpected, 'and', picocolors_1.default.cyan) + '.',
|
|
25
25
|
].join(' '));
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -148,7 +148,7 @@ function getNodeEnv() {
|
|
|
148
148
|
/*
|
|
149
149
|
// Should we show the following warning? So far I don't think so because of the following. Maybe we can show it once we enable users to disable warnings.
|
|
150
150
|
// - The warning isn't always actionable, e.g. if it's a tool that dynamically sets `process.env.NODE_ENV`.
|
|
151
|
-
// - We assume that tools use `process.env.NODE_ENV` and not
|
|
151
|
+
// - We assume that tools use `process.env.NODE_ENV` and not something like `const { env } = process; env.NODE_ENV`. Thus, in practice, `val` overrides `val2` so having `val!==val2` isn't an issue.
|
|
152
152
|
{
|
|
153
153
|
const val2 = process.env['NODE' + '_ENV']
|
|
154
154
|
if (val2)
|
|
@@ -22,7 +22,7 @@ globalObject ?? (globalObject = genGlobalConfig());
|
|
|
22
22
|
function genGlobalConfig() {
|
|
23
23
|
return (0, getGlobalObject_js_1.getGlobalObject)('utils/assertSingleInstance.ts', {
|
|
24
24
|
instances: [],
|
|
25
|
-
alreadyLogged: new Set()
|
|
25
|
+
alreadyLogged: new Set(),
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
// We need getGlobalObjectSafe() because globalObject is `undefined` when exported functions are called before globalObject is initialized
|
|
@@ -53,11 +53,11 @@ function assertSingleInstance_onClientEntryServerRouting(isProduction) {
|
|
|
53
53
|
const globalObject = getGlobalObjectSafe();
|
|
54
54
|
assertWarning(globalObject.isClientRouting !== true, clientRuntimesClonflict, {
|
|
55
55
|
onlyOnce: true,
|
|
56
|
-
showStackTrace: true
|
|
56
|
+
showStackTrace: true,
|
|
57
57
|
});
|
|
58
58
|
assertWarning(globalObject.isClientRouting === undefined, clientNotSingleInstance, {
|
|
59
59
|
onlyOnce: true,
|
|
60
|
-
showStackTrace: true
|
|
60
|
+
showStackTrace: true,
|
|
61
61
|
});
|
|
62
62
|
globalObject.isClientRouting = false;
|
|
63
63
|
if (isProduction)
|
|
@@ -68,11 +68,11 @@ function assertSingleInstance_onClientEntryClientRouting(isProduction) {
|
|
|
68
68
|
const globalObject = getGlobalObjectSafe();
|
|
69
69
|
assertWarning(globalObject.isClientRouting !== false, clientRuntimesClonflict, {
|
|
70
70
|
onlyOnce: true,
|
|
71
|
-
showStackTrace: true
|
|
71
|
+
showStackTrace: true,
|
|
72
72
|
});
|
|
73
73
|
assertWarning(globalObject.isClientRouting === undefined, clientNotSingleInstance, {
|
|
74
74
|
onlyOnce: true,
|
|
75
|
-
showStackTrace: true
|
|
75
|
+
showStackTrace: true,
|
|
76
76
|
});
|
|
77
77
|
globalObject.isClientRouting = true;
|
|
78
78
|
if (isProduction)
|
package/dist/cjs/utils/debug.js
CHANGED
|
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.findFile = findFile;
|
|
7
|
-
const
|
|
8
|
-
const
|
|
7
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
8
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
9
|
const isArray_js_1 = require("./isArray.js");
|
|
10
10
|
const path_js_1 = require("./path.js");
|
|
11
11
|
// We need to be able to crawl the filesystem, regardless of Vike's `$ git ls-files` command call, because we need to fallback if the user didn't setup Git (e.g. we cannot remove the tinyglobby fallback).
|
|
@@ -15,14 +15,14 @@ function findFile(arg, cwd) {
|
|
|
15
15
|
let dir = cwd;
|
|
16
16
|
while (true) {
|
|
17
17
|
for (const filename of filenames) {
|
|
18
|
-
const configFilePath =
|
|
19
|
-
if (
|
|
18
|
+
const configFilePath = node_path_1.default.posix.join(dir, `./${filename}`);
|
|
19
|
+
if (node_fs_1.default.existsSync(configFilePath)) {
|
|
20
20
|
(0, path_js_1.assertPosixPath)(configFilePath);
|
|
21
21
|
return configFilePath;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
const dirPrevious = dir;
|
|
25
|
-
dir =
|
|
25
|
+
dir = node_path_1.default.posix.dirname(dir);
|
|
26
26
|
if (dir === dirPrevious) {
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.findPackageJson = findPackageJson;
|
|
4
4
|
const findFile_js_1 = require("./findFile.js");
|
|
5
|
-
const
|
|
5
|
+
const node_module_1 = require("node:module");
|
|
6
6
|
// @ts-ignore `file:///${__filename.split('\\').join('/')}` is shimmed at dist/cjs by dist-cjs-fixup.js.
|
|
7
7
|
const importMetaUrl = `file:///${__filename.split('\\').join('/')}`;
|
|
8
|
-
const require_ = (0,
|
|
8
|
+
const require_ = (0, node_module_1.createRequire)(importMetaUrl);
|
|
9
9
|
function findPackageJson(cwd) {
|
|
10
10
|
const packageJsonPath = (0, findFile_js_1.findFile)('package.json', cwd);
|
|
11
11
|
if (!packageJsonPath)
|
|
@@ -13,6 +13,6 @@ function findPackageJson(cwd) {
|
|
|
13
13
|
const packageJson = require_(packageJsonPath);
|
|
14
14
|
return {
|
|
15
15
|
packageJson,
|
|
16
|
-
packageJsonPath
|
|
16
|
+
packageJsonPath,
|
|
17
17
|
};
|
|
18
18
|
}
|
|
@@ -4,7 +4,7 @@ exports.genPromise = genPromise;
|
|
|
4
4
|
// Simple implementation without timeout: https://github.com/vikejs/vike/blob/2e59b922e7e0f227d26018dc2b74877c9b0f581b/vike/utils/genPromise.ts
|
|
5
5
|
const assert_js_1 = require("./assert.js");
|
|
6
6
|
const timeoutSecondsDefault = 25;
|
|
7
|
-
function genPromise({ timeout: timeoutSeconds = timeoutSecondsDefault } = {}) {
|
|
7
|
+
function genPromise({ timeout: timeoutSeconds = timeoutSecondsDefault, } = {}) {
|
|
8
8
|
let resolve;
|
|
9
9
|
let reject;
|
|
10
10
|
let finished = false;
|
|
@@ -38,7 +38,7 @@ function genPromise({ timeout: timeoutSeconds = timeoutSecondsDefault } = {}) {
|
|
|
38
38
|
}
|
|
39
39
|
const value = Reflect.get(target, prop);
|
|
40
40
|
return typeof value === 'function' ? value.bind(target) : value;
|
|
41
|
-
}
|
|
41
|
+
},
|
|
42
42
|
});
|
|
43
43
|
}
|
|
44
44
|
return { promise, resolve, reject };
|
|
@@ -17,7 +17,7 @@ function getMostSimilar(word, words) {
|
|
|
17
17
|
const mostSimilar = words
|
|
18
18
|
.map((w) => ({
|
|
19
19
|
word: w,
|
|
20
|
-
similarity: getSimilarity(w, word)
|
|
20
|
+
similarity: getSimilarity(w, word),
|
|
21
21
|
}))
|
|
22
22
|
.sort((0, sorter_js_1.higherFirst)(({ similarity }) => similarity))[0];
|
|
23
23
|
(0, assert_js_1.assert)(mostSimilar);
|
|
@@ -9,7 +9,7 @@ function injectRollupInputs(inputsNew, config) {
|
|
|
9
9
|
const inputsCurrent = normalizeRollupInput(config.build.rollupOptions.input);
|
|
10
10
|
const input = {
|
|
11
11
|
...inputsNew,
|
|
12
|
-
...inputsCurrent
|
|
12
|
+
...inputsCurrent,
|
|
13
13
|
};
|
|
14
14
|
return input;
|
|
15
15
|
}
|
|
@@ -17,7 +17,7 @@ function normalizeRollupInput(input) {
|
|
|
17
17
|
if (!input) {
|
|
18
18
|
return {};
|
|
19
19
|
}
|
|
20
|
-
// Usually `input` is an
|
|
20
|
+
// Usually `input` is an object, but the user can set it as a `string` or `string[]`
|
|
21
21
|
if (typeof input === 'string') {
|
|
22
22
|
input = [input];
|
|
23
23
|
}
|
|
@@ -39,7 +39,7 @@ function isFilePathAbsoluteFilesystem(filePath) {
|
|
|
39
39
|
// - File path absolute starting from filesystem root, e.g. /home/rom/code/my-app/pages/about/+Page.js
|
|
40
40
|
// - File path absolute starting from user root dir (Vite's `config.root`), e.g. /pages/about/+Page.js
|
|
41
41
|
// - Checking whether `p` starts with the first directory of process.cwd() (or `userRootDir`) can be erroneous, most notably when using docker: https://github.com/vikejs/vike/issues/703
|
|
42
|
-
// - Using require.resolve() or node:fs to check
|
|
42
|
+
// - Using require.resolve() or node:fs to check whether the file/dir exists would be a solution, but maybe too slow?
|
|
43
43
|
return filePath.startsWith('/');
|
|
44
44
|
}
|
|
45
45
|
else {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.objectAssignSafe = objectAssignSafe;
|
|
4
|
-
// Same as `Object.assign(obj, objNewVals)` but ensure that `objNewVals` properties
|
|
4
|
+
// Same as `Object.assign(obj, objNewVals)` but ensure that `objNewVals` properties already exist on `obj`
|
|
5
5
|
function objectAssignSafe(obj, objNewVals) {
|
|
6
6
|
Object.assign(obj, objNewVals);
|
|
7
7
|
}
|
package/dist/cjs/utils/pLimit.js
CHANGED
|
@@ -57,16 +57,16 @@ function pLimit(concurrency) {
|
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperties(generator, {
|
|
59
59
|
activeCount: {
|
|
60
|
-
get: () => activeCount
|
|
60
|
+
get: () => activeCount,
|
|
61
61
|
},
|
|
62
62
|
pendingCount: {
|
|
63
|
-
get: () => queue.size
|
|
63
|
+
get: () => queue.size,
|
|
64
64
|
},
|
|
65
65
|
clearQueue: {
|
|
66
66
|
value: () => {
|
|
67
67
|
queue.clear();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
70
|
});
|
|
71
71
|
// @ts-ignore
|
|
72
72
|
return generator;
|
|
@@ -22,7 +22,7 @@ function isImportPathNpmPackageOrPathAlias(str) {
|
|
|
22
22
|
function assertIsImportPathNpmPackage(str) {
|
|
23
23
|
(0, assert_js_1.assert)(isImportPathNpmPackage(str, {
|
|
24
24
|
// If `str` is a path alias that looks like an npm package => assertIsImportPathNpmPackage() is erroneous but that's okay because the assertion will eventually fail for some other user using a disambiguated path alias.
|
|
25
|
-
cannotBePathAlias: true
|
|
25
|
+
cannotBePathAlias: true,
|
|
26
26
|
}), str);
|
|
27
27
|
}
|
|
28
28
|
function isNpmPackageName(str) {
|
|
@@ -93,7 +93,7 @@ function parseNpmPackage(str) {
|
|
|
93
93
|
const importPath = importPathParts.length === 0 ? null : importPathParts.join('/');
|
|
94
94
|
return {
|
|
95
95
|
pkgName: scope ? `${scope}/${name}` : name,
|
|
96
|
-
importPath
|
|
96
|
+
importPath,
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
99
|
function invalid(s) {
|
|
@@ -71,7 +71,7 @@ function parseUrl(url, baseServer) {
|
|
|
71
71
|
searchAll,
|
|
72
72
|
searchOriginal,
|
|
73
73
|
hash,
|
|
74
|
-
hashOriginal
|
|
74
|
+
hashOriginal,
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
function extractHash(url) {
|
|
@@ -191,7 +191,7 @@ function isUrlProtocol(protocol) {
|
|
|
191
191
|
const blocklist = [
|
|
192
192
|
// https://docs.ipfs.tech/how-to/address-ipfs-on-web
|
|
193
193
|
'ipfs://',
|
|
194
|
-
'ipns://'
|
|
194
|
+
'ipns://',
|
|
195
195
|
];
|
|
196
196
|
if (blocklist.includes(protocol))
|
|
197
197
|
return false;
|
|
@@ -283,7 +283,7 @@ function isUrlExternal(url) {
|
|
|
283
283
|
URL with protocol.
|
|
284
284
|
|
|
285
285
|
http://example.com
|
|
286
|
-
https://
|
|
286
|
+
https://example.com
|
|
287
287
|
tauri://localhost
|
|
288
288
|
file://example.com
|
|
289
289
|
capacitor://localhost/assets/chunks/chunk-DJBYDrsP.js
|
package/dist/cjs/utils/path.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.pathJoin = pathJoin;
|
|
|
4
4
|
exports.pathIsRelative = pathIsRelative;
|
|
5
5
|
exports.toPosixPath = toPosixPath;
|
|
6
6
|
exports.assertPosixPath = assertPosixPath;
|
|
7
|
-
//
|
|
7
|
+
// Utilities for handling file paths.
|
|
8
8
|
// - Shims `import * from "node:path"` for server runtime.
|
|
9
9
|
// - Robust shim reference: https://github.com/unjs/pathe
|
|
10
10
|
const assert_js_1 = require("./assert.js");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
function
|
|
3
|
+
exports.removeFileExtension = removeFileExtension;
|
|
4
|
+
function removeFileExtension(filePath) {
|
|
5
5
|
return filePath.split('.').slice(0, -1).join('.');
|
|
6
6
|
}
|
|
@@ -29,7 +29,7 @@ const debug = (0, debug_js_1.createDebugger)('vike:resolve');
|
|
|
29
29
|
// - Passing context to createRequire(context) isn't equivalent to passing it to the `paths` argument of require.resolve()
|
|
30
30
|
// - https://github.com/brillout/require-test
|
|
31
31
|
// - In practice, I guess it doesn't make a difference? It just seems to be small Node.js weirdness.
|
|
32
|
-
// - The argument createRequire(argument) seems to be
|
|
32
|
+
// - The argument createRequire(argument) seems to be overridden by the `paths` argument require.resolve()
|
|
33
33
|
// - For example, passing an empty array to `paths` kills the argument passed to `createRequire()`
|
|
34
34
|
// - Thus, when `paths` is defined, then the context needs to be passed to both createRequire() as well as the `paths` argument of require.resolve()
|
|
35
35
|
function requireResolve_(importPath, importerFilePath, userRootDir, doNotHandleFileExtension = false) {
|
|
@@ -47,7 +47,7 @@ function requireResolve_(importPath, importerFilePath, userRootDir, doNotHandleF
|
|
|
47
47
|
const require_ = (0, node_module_1.createRequire)(contextNode);
|
|
48
48
|
if (!doNotHandleFileExtension) {
|
|
49
49
|
addFileExtensionsToRequireResolve(require_);
|
|
50
|
-
importPathNode =
|
|
50
|
+
importPathNode = removeFileExtension(importPathNode);
|
|
51
51
|
}
|
|
52
52
|
try {
|
|
53
53
|
importPathResolvedFilePath = require_.resolve(importPathNode);
|
|
@@ -71,7 +71,7 @@ function requireResolve_(importPath, importerFilePath, userRootDir, doNotHandleF
|
|
|
71
71
|
userRootDir,
|
|
72
72
|
doNotHandleFileExtension,
|
|
73
73
|
importMetaUrl,
|
|
74
|
-
contexts
|
|
74
|
+
contexts,
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
77
|
return { importPathResolvedFilePath: undefined, err: failure.err, hasFailed: true };
|
|
@@ -80,7 +80,7 @@ function requireResolve_(importPath, importerFilePath, userRootDir, doNotHandleF
|
|
|
80
80
|
if (failure && debug.isActivated) {
|
|
81
81
|
debug('SUCCESS', {
|
|
82
82
|
importPath,
|
|
83
|
-
contexts
|
|
83
|
+
contexts,
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
(0, assert_js_1.assert)(importPathResolvedFilePath);
|
|
@@ -88,20 +88,20 @@ function requireResolve_(importPath, importerFilePath, userRootDir, doNotHandleF
|
|
|
88
88
|
return { importPathResolvedFilePath, err: undefined, hasFailed: false };
|
|
89
89
|
}
|
|
90
90
|
}
|
|
91
|
-
function requireResolveOptional({ importPath, importerFilePath, userRootDir }) {
|
|
91
|
+
function requireResolveOptional({ importPath, importerFilePath, userRootDir, }) {
|
|
92
92
|
const res = requireResolve_(importPath, importerFilePath, userRootDir);
|
|
93
93
|
if (res.hasFailed)
|
|
94
94
|
return null;
|
|
95
95
|
return res.importPathResolvedFilePath;
|
|
96
96
|
}
|
|
97
|
-
function requireResolveOptionalDir({ importPath, importerDir, userRootDir }) {
|
|
97
|
+
function requireResolveOptionalDir({ importPath, importerDir, userRootDir, }) {
|
|
98
98
|
const importerFilePath = getFakeImporterFile(importerDir);
|
|
99
99
|
const res = requireResolve_(importPath, importerFilePath, userRootDir);
|
|
100
100
|
if (res.hasFailed)
|
|
101
101
|
return null;
|
|
102
102
|
return res.importPathResolvedFilePath;
|
|
103
103
|
}
|
|
104
|
-
function requireResolveNpmPackage({ importPathNpmPackage, userRootDir }) {
|
|
104
|
+
function requireResolveNpmPackage({ importPathNpmPackage, userRootDir, }) {
|
|
105
105
|
(0, parseNpmPackage_js_1.assertIsImportPathNpmPackage)(importPathNpmPackage);
|
|
106
106
|
const importerFilePath = getFakeImporterFile(userRootDir);
|
|
107
107
|
const res = requireResolve_(importPathNpmPackage, importerFilePath, userRootDir);
|
|
@@ -133,8 +133,8 @@ function addExtraContextForNpmPackageImport(contexts, importPath, userRootDir) {
|
|
|
133
133
|
[
|
|
134
134
|
// Workaround for monorepo resolve issue: https://github.com/vikejs/vike-react/pull/161/commits/dbaa6643e78015ac2797c237552800fef29b72a7
|
|
135
135
|
userRootDirFakeFile,
|
|
136
|
-
// I can't think of a use case where this would be needed, but let's add one extra last chance to
|
|
137
|
-
importMetaUrl
|
|
136
|
+
// I can't think of a use case where this would be needed, but let's add one extra last chance to successfully resolve some complex monorepo setups
|
|
137
|
+
importMetaUrl,
|
|
138
138
|
]
|
|
139
139
|
.filter(isNullish_js_1.isNotNullish)
|
|
140
140
|
.forEach((context) => {
|
|
@@ -144,7 +144,7 @@ function addExtraContextForNpmPackageImport(contexts, importPath, userRootDir) {
|
|
|
144
144
|
contexts.push(context);
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function removeFileExtension(importPath) {
|
|
148
148
|
// Skip for Bun: https://github.com/vikejs/vike/issues/2204
|
|
149
149
|
//@ts-ignore
|
|
150
150
|
if (typeof Bun !== 'undefined') {
|
|
@@ -7,13 +7,13 @@ exports.rollupSourceMapPassthrough = rollupSourceMapPassthrough;
|
|
|
7
7
|
function rollupSourceMapRemove(code) {
|
|
8
8
|
return {
|
|
9
9
|
code,
|
|
10
|
-
map: { mappings: '' }
|
|
10
|
+
map: { mappings: '' },
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
/** Don't provide any source map, pass through current source map instead. */
|
|
14
14
|
function rollupSourceMapPassthrough(code) {
|
|
15
15
|
return {
|
|
16
16
|
code,
|
|
17
|
-
map: null
|
|
17
|
+
map: null,
|
|
18
18
|
};
|
|
19
19
|
}
|
|
@@ -15,7 +15,7 @@ function stripAnsi(string) {
|
|
|
15
15
|
function getAnsiRegex() {
|
|
16
16
|
const pattern = [
|
|
17
17
|
'[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)',
|
|
18
|
-
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))'
|
|
18
|
+
'(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))',
|
|
19
19
|
].join('|');
|
|
20
20
|
return new RegExp(pattern, 'g');
|
|
21
21
|
}
|
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.styleFileRE = void 0;
|
|
4
4
|
// Copied from https://github.com/vitejs/vite/blob/d649daba7682791178b711d9a3e44a6b5d00990c/packages/vite/src/node/plugins/css.ts#L90-L91
|
|
5
|
+
// spellcheck-ignore
|
|
5
6
|
exports.styleFileRE = /\.(css|less|sass|scss|styl|stylus|pcss|postcss)($|\?)/;
|
|
@@ -4,7 +4,7 @@ exports.trimWithAnsi = trimWithAnsi;
|
|
|
4
4
|
exports.trimWithAnsiTrailOnly = trimWithAnsiTrailOnly;
|
|
5
5
|
const assert_js_1 = require("./assert.js");
|
|
6
6
|
const stripAnsi_js_1 = require("./stripAnsi.js");
|
|
7
|
-
const whitespaceRegex = /(\s+)/; // Capturing parathesis so that split preserves
|
|
7
|
+
const whitespaceRegex = /(\s+)/; // Capturing parathesis so that split preserves separator
|
|
8
8
|
/* Same as trim() but works with ANSI escape codes */
|
|
9
9
|
function trimWithAnsi(str) {
|
|
10
10
|
str = trimWithAnsiHead(str);
|
|
@@ -16,12 +16,12 @@ async function getPagesAndRoutes() {
|
|
|
16
16
|
const { globalContext } = await getGlobalContextServerInternal();
|
|
17
17
|
const {
|
|
18
18
|
//
|
|
19
|
-
_pageRoutes: pageRoutes, _pageFilesAll: pageFilesAll, _pageConfigs: pageConfigs, _allPageIds: allPageIds } = globalContext;
|
|
19
|
+
_pageRoutes: pageRoutes, _pageFilesAll: pageFilesAll, _pageConfigs: pageConfigs, _allPageIds: allPageIds, } = globalContext;
|
|
20
20
|
return {
|
|
21
21
|
pageRoutes,
|
|
22
22
|
pageFilesAll,
|
|
23
23
|
pageConfigs,
|
|
24
|
-
allPageIds
|
|
24
|
+
allPageIds,
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
27
|
async function route(pageContext) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { getGlobalContext, getGlobalContext as getGlobalContextAsync, getGlobalContextSync } from './shared/createGetGlobalContextClient.js';
|
|
1
|
+
export { getGlobalContext, getGlobalContext as getGlobalContextAsync, getGlobalContextSync, } from './shared/createGetGlobalContextClient.js';
|
package/dist/esm/client/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { isBrowser } from '../utils/isBrowser.js';
|
|
2
2
|
import { assert } from '../utils/assert.js';
|
|
3
3
|
assert(isBrowser());
|
|
4
|
-
export { getGlobalContext, getGlobalContext as getGlobalContextAsync, getGlobalContextSync } from './shared/createGetGlobalContextClient.js';
|
|
4
|
+
export { getGlobalContext, getGlobalContext as getGlobalContextAsync, getGlobalContextSync, } from './shared/createGetGlobalContextClient.js';
|
package/dist/esm/client/node.js
CHANGED
|
@@ -3,5 +3,5 @@ assertUsage(false, [
|
|
|
3
3
|
'Server imports are forbidden on the client-side:',
|
|
4
4
|
" import { something } from 'vike/server'",
|
|
5
5
|
'Did you mean the following instead?',
|
|
6
|
-
" import { something } from 'vike/client/router'"
|
|
6
|
+
" import { something } from 'vike/client/router'",
|
|
7
7
|
].join('\n'), { showStackTrace: true });
|
|
@@ -17,7 +17,7 @@ async function createPageContextClientSide(urlOriginal) {
|
|
|
17
17
|
_pageFilesAll: globalContext._pageFilesAll, // TODO/v1-release: remove
|
|
18
18
|
_urlHandler: null,
|
|
19
19
|
_urlRewrite: null,
|
|
20
|
-
_baseServer: baseServer
|
|
20
|
+
_baseServer: baseServer,
|
|
21
21
|
});
|
|
22
22
|
const pageContextUrlComputed = getPageContextUrlComputed(pageContextCreated);
|
|
23
23
|
objectAssign(pageContextCreated, pageContextUrlComputed);
|
|
@@ -14,7 +14,7 @@ function removeBuiltInOverrides(pageContext) {
|
|
|
14
14
|
assertWarning(false, `pageContext.${prop} is already available in the browser when using Client Routing; adding '${prop}' to passToClient has no effect`, { onlyOnce: true });
|
|
15
15
|
}
|
|
16
16
|
else {
|
|
17
|
-
assertWarning(false, `pageContext.${prop} is a built-in that cannot be
|
|
17
|
+
assertWarning(false, `pageContext.${prop} is a built-in that cannot be overridden; adding '${prop}' to passToClient has no effect`, { onlyOnce: true });
|
|
18
18
|
}
|
|
19
19
|
delete pageContext[prop];
|
|
20
20
|
}
|