vike 0.4.218 → 0.4.220-commit-a9f46b8
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 +11 -11
- package/dist/cjs/node/api/build.js +22 -48
- package/dist/cjs/node/api/context.js +8 -6
- package/dist/cjs/node/api/index.js +17 -7
- package/dist/cjs/node/api/prepareViteApiCall.js +40 -13
- package/dist/cjs/node/cli/context.js +16 -0
- package/dist/cjs/node/cli/entry.js +21 -7
- package/dist/cjs/node/cli/utils.js +1 -0
- package/dist/cjs/node/plugin/index.js +5 -5
- package/dist/cjs/node/plugin/plugins/autoFullBuild.js +32 -20
- package/dist/cjs/node/plugin/plugins/baseUrls.js +3 -10
- package/dist/cjs/node/plugin/plugins/buildConfig.js +2 -2
- package/dist/cjs/node/plugin/plugins/{importBuild → buildEntry}/index.js +16 -17
- package/dist/cjs/node/plugin/plugins/commonConfig.js +41 -4
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js +26 -23
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +171 -68
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigValuesAll.js +1 -1
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigs.js +7 -5
- package/dist/cjs/node/plugin/plugins/setGlobalContext.js +1 -1
- package/dist/cjs/node/plugin/plugins/{vite6HmrRegressionWorkaround.js → workaroundVite6HmrRegression.js} +3 -3
- package/dist/cjs/node/plugin/shared/getHttpRequestAsyncStore.js +17 -7
- package/dist/cjs/node/prerender/context.js +24 -0
- package/dist/cjs/node/prerender/runPrerender.js +146 -96
- package/dist/cjs/node/prerender/utils.js +2 -0
- package/dist/cjs/node/runtime/globalContext.js +109 -55
- package/dist/cjs/node/runtime/html/injectAssets/getHtmlTags.js +2 -2
- package/dist/cjs/node/runtime/index-common.js +0 -15
- package/dist/cjs/node/runtime/onLoad.js +17 -3
- package/dist/cjs/node/runtime/page-files/setup.js +2 -4
- package/dist/cjs/node/runtime/renderPage/analyzePage.js +2 -2
- package/dist/cjs/node/runtime/renderPage/createHttpResponse/getCacheControl.js +2 -2
- package/dist/cjs/node/runtime/renderPage/loadUserFilesServerSide.js +1 -1
- package/dist/cjs/node/runtime/renderPage/renderPageAlreadyRouted.js +11 -33
- package/dist/cjs/node/runtime/renderPage/resolveRedirects.js +9 -1
- package/dist/cjs/node/runtime/renderPage.js +21 -22
- package/dist/cjs/node/runtime/utils.js +2 -0
- package/dist/cjs/node/runtime-dev/index.js +17 -7
- package/dist/cjs/node/shared/assertRuntimeManifest.js +0 -2
- package/dist/cjs/shared/getPageFiles/analyzeClientSide.js +3 -3
- package/dist/cjs/shared/getPageFiles/{setPageFiles.js → getPageFiles.js} +8 -6
- package/dist/cjs/shared/getPageFiles.js +3 -9
- package/dist/cjs/shared/hooks/getHook.js +3 -3
- package/dist/cjs/shared/{getPageFiles/getExports.js → page-configs/getPageConfigUserFriendly.js} +113 -81
- package/dist/cjs/shared/page-configs/loadConfigValues.js +5 -1
- package/dist/cjs/shared/page-configs/serialize/serializeConfigValues.js +80 -55
- package/dist/cjs/shared/route/loadPageRoutes.js +3 -3
- package/dist/cjs/shared/utils.js +1 -0
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/cjs/utils/assert.js +4 -3
- package/dist/cjs/utils/assertSetup.js +47 -16
- package/dist/cjs/utils/catchInfiniteLoop.js +34 -0
- package/dist/cjs/utils/debug.js +11 -6
- package/dist/cjs/utils/getGlobalObject.js +1 -2
- package/dist/cjs/utils/isDev.js +2 -0
- package/dist/cjs/utils/makePublicCopy.js +32 -0
- package/dist/cjs/utils/objectReplace.js +9 -0
- package/dist/esm/__internal/index.d.ts +3 -5
- package/dist/esm/__internal/index.js +6 -8
- package/dist/esm/client/client-routing-runtime/createPageContext.js +4 -1
- package/dist/esm/client/client-routing-runtime/entry.d.ts +1 -1
- package/dist/esm/client/client-routing-runtime/entry.js +0 -1
- package/dist/esm/client/client-routing-runtime/getPageContextCurrent.d.ts +2 -2
- package/dist/esm/client/client-routing-runtime/getPageContextFromHooks.d.ts +4 -4
- package/dist/esm/client/client-routing-runtime/getPageContextFromHooks.js +1 -1
- package/dist/esm/client/client-routing-runtime/history.d.ts +3 -1
- package/dist/esm/client/client-routing-runtime/history.js +23 -18
- package/dist/esm/client/client-routing-runtime/index.d.ts +0 -1
- package/dist/esm/client/client-routing-runtime/index.js +0 -1
- package/dist/esm/client/client-routing-runtime/initClientRouter.js +2 -2
- package/dist/esm/client/client-routing-runtime/initOnLinkClick.js +3 -4
- package/dist/esm/client/client-routing-runtime/initOnPopState.d.ts +0 -10
- package/dist/esm/client/client-routing-runtime/initOnPopState.js +50 -62
- package/dist/esm/client/client-routing-runtime/prefetch/getPrefetchSettings.d.ts +2 -2
- package/dist/esm/client/client-routing-runtime/prefetch.d.ts +2 -2
- package/dist/esm/client/client-routing-runtime/prefetch.js +2 -2
- package/dist/esm/client/client-routing-runtime/renderPageClientSide.js +15 -15
- package/dist/esm/client/client-routing-runtime/scrollRestoration.d.ts +4 -6
- package/dist/esm/client/client-routing-runtime/scrollRestoration.js +17 -12
- package/dist/esm/client/client-routing-runtime/setScrollPosition.d.ts +1 -1
- package/dist/esm/client/client-routing-runtime/setScrollPosition.js +29 -5
- package/dist/esm/client/client-routing-runtime/utils.d.ts +1 -0
- package/dist/esm/client/client-routing-runtime/utils.js +1 -0
- package/dist/esm/client/server-routing-runtime/entry.d.ts +1 -1
- package/dist/esm/client/server-routing-runtime/entry.js +0 -1
- package/dist/esm/client/server-routing-runtime/getPageContext.d.ts +1 -1
- package/dist/esm/client/server-routing-runtime/getPageContext.js +5 -2
- package/dist/esm/client/shared/executeOnRenderClientHook.d.ts +2 -2
- package/dist/esm/client/shared/loadUserFilesClientSide.d.ts +2 -2
- package/dist/esm/client/shared/loadUserFilesClientSide.js +2 -2
- package/dist/esm/client/shared/normalizeClientSideUrl.js +2 -3
- package/dist/esm/client/shared/preparePageContextForUserConsumptionClientSide.d.ts +2 -2
- package/dist/esm/node/api/build.d.ts +1 -6
- package/dist/esm/node/api/build.js +20 -26
- package/dist/esm/node/api/context.d.ts +4 -2
- package/dist/esm/node/api/context.js +8 -7
- package/dist/esm/node/api/prepareViteApiCall.d.ts +0 -1
- package/dist/esm/node/api/prepareViteApiCall.js +26 -9
- package/dist/esm/node/cli/context.d.ts +5 -0
- package/dist/esm/node/cli/context.js +14 -0
- package/dist/esm/node/cli/entry.js +4 -0
- package/dist/esm/node/cli/parseCli.d.ts +3 -1
- package/dist/esm/node/cli/utils.d.ts +1 -0
- package/dist/esm/node/cli/utils.js +1 -0
- package/dist/esm/node/plugin/index.d.ts +1 -1
- package/dist/esm/node/plugin/index.js +5 -5
- package/dist/esm/node/plugin/plugins/autoFullBuild.js +32 -20
- package/dist/esm/node/plugin/plugins/baseUrls.d.ts +1 -1
- package/dist/esm/node/plugin/plugins/baseUrls.js +4 -11
- package/dist/esm/node/plugin/plugins/buildConfig.js +2 -2
- package/dist/esm/node/plugin/plugins/{importBuild → buildEntry}/getVikeManifest.d.ts +1 -1
- package/dist/esm/node/plugin/plugins/{importBuild → buildEntry}/index.d.ts +2 -2
- package/dist/esm/node/plugin/plugins/{importBuild → buildEntry}/index.js +16 -17
- package/dist/esm/node/plugin/plugins/commonConfig.d.ts +10 -1
- package/dist/esm/node/plugin/plugins/commonConfig.js +42 -5
- package/dist/esm/node/plugin/plugins/importUserCode/getVirtualFileImportUserCode.d.ts +1 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.d.ts +6 -9
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js +25 -22
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.d.ts +96 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +167 -64
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigValuesAll.js +1 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigs.js +7 -5
- package/dist/esm/node/plugin/plugins/setGlobalContext.js +1 -1
- package/dist/esm/node/plugin/plugins/workaroundVite6HmrRegression.d.ts +3 -0
- package/dist/esm/node/plugin/plugins/{vite6HmrRegressionWorkaround.js → workaroundVite6HmrRegression.js} +3 -3
- package/dist/esm/node/prerender/context.d.ts +9 -0
- package/dist/esm/node/prerender/context.js +22 -0
- package/dist/esm/node/prerender/runPrerender.d.ts +42 -2
- package/dist/esm/node/prerender/runPrerender.js +130 -90
- package/dist/esm/node/prerender/utils.d.ts +2 -0
- package/dist/esm/node/prerender/utils.js +2 -0
- package/dist/esm/node/runtime/globalContext.d.ts +23 -7
- package/dist/esm/node/runtime/globalContext.js +109 -55
- package/dist/esm/node/runtime/html/injectAssets/getHtmlTags.js +1 -1
- package/dist/esm/node/runtime/index-common.d.ts +0 -1
- package/dist/esm/node/runtime/index-common.js +0 -15
- package/dist/esm/node/runtime/index-deprecated.d.ts +1 -0
- package/dist/esm/node/runtime/onLoad.js +16 -2
- package/dist/esm/node/runtime/page-files/setup.js +3 -3
- package/dist/esm/node/runtime/renderPage/analyzePage.js +1 -1
- package/dist/esm/node/runtime/renderPage/createHttpResponse/getCacheControl.js +1 -1
- package/dist/esm/node/runtime/renderPage/executeOnBeforeRenderAndDataHooks.d.ts +2 -2
- package/dist/esm/node/runtime/renderPage/loadUserFilesServerSide.d.ts +1 -1
- package/dist/esm/node/runtime/renderPage/loadUserFilesServerSide.js +2 -2
- package/dist/esm/node/runtime/renderPage/preparePageContextForUserConsumptionServerSide.d.ts +2 -2
- package/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.d.ts +31 -46
- package/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.js +11 -33
- package/dist/esm/node/runtime/renderPage/resolveRedirects.d.ts +1 -1
- package/dist/esm/node/runtime/renderPage/resolveRedirects.js +9 -1
- package/dist/esm/node/runtime/renderPage.js +22 -23
- package/dist/esm/node/runtime/utils.d.ts +2 -0
- package/dist/esm/node/runtime/utils.js +2 -0
- package/dist/esm/node/shared/assertPluginManifest.d.ts +0 -1
- package/dist/esm/node/shared/assertRuntimeManifest.d.ts +0 -1
- package/dist/esm/node/shared/assertRuntimeManifest.js +1 -3
- package/dist/esm/shared/getPageFiles/analyzeClientSide.js +1 -1
- package/dist/esm/shared/getPageFiles/{setPageFiles.d.ts → getPageFiles.d.ts} +3 -1
- package/dist/esm/shared/getPageFiles/{setPageFiles.js → getPageFiles.js} +8 -6
- package/dist/esm/shared/getPageFiles.d.ts +2 -5
- package/dist/esm/shared/getPageFiles.js +1 -4
- package/dist/esm/shared/hooks/getHook.d.ts +3 -3
- package/dist/esm/shared/hooks/getHook.js +1 -1
- package/dist/esm/shared/page-configs/Config/PageContextConfig.d.ts +9 -5
- package/dist/esm/shared/page-configs/Config.d.ts +20 -2
- package/dist/esm/shared/page-configs/PageConfig.d.ts +13 -6
- package/dist/esm/shared/{getPageFiles/getExports.d.ts → page-configs/getPageConfigUserFriendly.d.ts} +26 -12
- package/dist/esm/shared/{getPageFiles/getExports.js → page-configs/getPageConfigUserFriendly.js} +112 -80
- package/dist/esm/shared/page-configs/loadConfigValues.js +6 -2
- package/dist/esm/shared/page-configs/serialize/serializeConfigValues.d.ts +26 -6
- package/dist/esm/shared/page-configs/serialize/serializeConfigValues.js +80 -55
- package/dist/esm/shared/route/executeGuardHook.d.ts +2 -2
- package/dist/esm/shared/route/loadPageRoutes.js +1 -1
- package/dist/esm/shared/types.d.ts +1 -1
- package/dist/esm/shared/utils.d.ts +1 -0
- package/dist/esm/shared/utils.js +1 -0
- package/dist/esm/types/index.d.ts +1 -1
- 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 +4 -3
- package/dist/esm/utils/assertSetup.js +47 -16
- package/dist/esm/utils/catchInfiniteLoop.d.ts +2 -0
- package/dist/esm/utils/catchInfiniteLoop.js +32 -0
- package/dist/esm/utils/debug.d.ts +1 -1
- package/dist/esm/utils/debug.js +11 -6
- package/dist/esm/utils/getGlobalObject.js +1 -2
- package/dist/esm/utils/isDev.js +2 -0
- package/dist/esm/utils/makePublicCopy.d.ts +3 -0
- package/dist/esm/utils/makePublicCopy.js +30 -0
- package/dist/esm/utils/objectReplace.d.ts +1 -0
- package/dist/esm/utils/objectReplace.js +6 -0
- package/dist/esm/utils/projectInfo.d.ts +1 -1
- package/package.json +4 -13
- package/__internal/loadImportBuild.js +0 -3
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveVikeConfigGlobal.js +0 -128
- package/dist/cjs/node/runtime/globalContext/loadImportBuild.js +0 -25
- package/dist/cjs/node/runtime/page-files/getPageFilesExports.js +0 -22
- package/dist/esm/client/client-routing-runtime/pageFiles.d.ts +0 -1
- package/dist/esm/client/client-routing-runtime/pageFiles.js +0 -4
- package/dist/esm/client/server-routing-runtime/pageFiles.d.ts +0 -1
- package/dist/esm/client/server-routing-runtime/pageFiles.js +0 -4
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveVikeConfigGlobal.d.ts +0 -104
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveVikeConfigGlobal.js +0 -123
- package/dist/esm/node/plugin/plugins/vite6HmrRegressionWorkaround.d.ts +0 -3
- package/dist/esm/node/runtime/globalContext/loadImportBuild.d.ts +0 -18
- package/dist/esm/node/runtime/globalContext/loadImportBuild.js +0 -23
- package/dist/esm/node/runtime/page-files/getPageFilesExports.d.ts +0 -2
- package/dist/esm/node/runtime/page-files/getPageFilesExports.js +0 -20
- /package/dist/cjs/node/plugin/plugins/{importBuild → buildEntry}/getVikeManifest.js +0 -0
- /package/dist/cjs/shared/page-configs/{getConfigValue.js → getConfigValueRuntime.js} +0 -0
- /package/dist/esm/node/plugin/plugins/{importBuild → buildEntry}/getVikeManifest.js +0 -0
- /package/dist/esm/shared/page-configs/{getConfigValue.d.ts → getConfigValueRuntime.d.ts} +0 -0
- /package/dist/esm/shared/page-configs/{getConfigValue.js → getConfigValueRuntime.js} +0 -0
|
@@ -12,40 +12,43 @@ export { setGlobalContext_viteConfig };
|
|
|
12
12
|
export { setGlobalContext_vikeConfig };
|
|
13
13
|
export { setGlobalContext_isViteDev };
|
|
14
14
|
export { setGlobalContext_isPrerendering };
|
|
15
|
+
export { setGlobalContext_buildEntry };
|
|
16
|
+
export { clearGlobalContext };
|
|
15
17
|
import type { ViteManifest } from '../shared/ViteManifest.js';
|
|
16
18
|
import type { ResolvedConfig, ViteDevServer } from 'vite';
|
|
17
|
-
import {
|
|
18
|
-
import type { VikeConfigGlobal } from '../plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveVikeConfigGlobal.js';
|
|
19
|
+
import type { VikeConfigGlobal } from '../plugin/plugins/importUserCode/v1-design/getVikeConfig.js';
|
|
19
20
|
import { type RuntimeManifest } from '../shared/assertRuntimeManifest.js';
|
|
20
21
|
import type { VikeConfigObject } from '../plugin/plugins/importUserCode/v1-design/getVikeConfig.js';
|
|
22
|
+
import type { ConfigUserFriendly } from '../../shared/page-configs/getPageConfigUserFriendly.js';
|
|
21
23
|
type GlobalContextPublic = {
|
|
22
24
|
assetsManifest: null | ViteManifest;
|
|
23
25
|
};
|
|
26
|
+
type PageRuntimeInfo = Awaited<ReturnType<typeof getPageRuntimeInfo>>['userFiles'];
|
|
24
27
|
type GlobalContext = {
|
|
25
28
|
baseServer: string;
|
|
26
29
|
baseAssets: null | string;
|
|
27
30
|
includeAssetsImportedByServer: boolean;
|
|
28
|
-
redirects: Record<string, string>;
|
|
29
31
|
trailingSlash: boolean;
|
|
30
32
|
disableUrlNormalization: boolean;
|
|
31
|
-
|
|
33
|
+
vikeConfig: {
|
|
34
|
+
global: ConfigUserFriendly;
|
|
35
|
+
};
|
|
36
|
+
} & PageRuntimeInfo & ({
|
|
32
37
|
isProduction: false;
|
|
33
38
|
isPrerendering: false;
|
|
34
39
|
viteConfig: ResolvedConfig;
|
|
35
|
-
vikeConfig: VikeConfigObject;
|
|
36
40
|
viteDevServer: ViteDevServer;
|
|
37
41
|
assetsManifest: null;
|
|
38
|
-
pluginManifest: null;
|
|
39
42
|
} | ({
|
|
40
43
|
isProduction: true;
|
|
41
44
|
assetsManifest: ViteManifest;
|
|
42
|
-
pluginManifest: PluginManifest;
|
|
43
45
|
viteDevServer: null;
|
|
44
46
|
} & ({
|
|
45
47
|
isPrerendering: false;
|
|
46
48
|
viteConfig: null;
|
|
47
49
|
} | {
|
|
48
50
|
isPrerendering: true;
|
|
51
|
+
usesClientRouter: boolean;
|
|
49
52
|
viteConfig: ResolvedConfig;
|
|
50
53
|
})));
|
|
51
54
|
declare function getGlobalContext(): GlobalContext;
|
|
@@ -63,4 +66,17 @@ declare function getViteConfig(): ResolvedConfig | null;
|
|
|
63
66
|
declare function initGlobalContext_renderPage(): Promise<void>;
|
|
64
67
|
declare function initGlobalContext_runPrerender(): Promise<void>;
|
|
65
68
|
declare function initGlobalContext_getGlobalContextAsync(isProduction: boolean): Promise<void>;
|
|
69
|
+
declare function getPageRuntimeInfo(isProduction: boolean): Promise<{
|
|
70
|
+
userFiles: {
|
|
71
|
+
pageFilesAll: import("../../shared/getPageFiles.js").PageFile[];
|
|
72
|
+
pageConfigs: import("../../__internal/index.js").PageConfig[];
|
|
73
|
+
pageConfigGlobal: import("../../shared/page-configs/PageConfig.js").PageConfigGlobalRuntime;
|
|
74
|
+
allPageIds: string[];
|
|
75
|
+
pageRoutes: import("../../shared/route/loadPageRoutes.js").PageRoutes;
|
|
76
|
+
onBeforeRouteHook: import("../../shared/hooks/getHook.js").Hook | null;
|
|
77
|
+
};
|
|
78
|
+
globalConfig: ConfigUserFriendly;
|
|
79
|
+
}>;
|
|
66
80
|
declare function getRuntimeManifest(vikeConfigGlobal: VikeConfigGlobal, viteConfig: ResolvedConfig): RuntimeManifest;
|
|
81
|
+
declare function setGlobalContext_buildEntry(buildEntry: unknown): void;
|
|
82
|
+
declare function clearGlobalContext(): void;
|
|
@@ -14,23 +14,26 @@ export { setGlobalContext_viteConfig };
|
|
|
14
14
|
export { setGlobalContext_vikeConfig };
|
|
15
15
|
export { setGlobalContext_isViteDev };
|
|
16
16
|
export { setGlobalContext_isPrerendering };
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import {
|
|
17
|
+
export { setGlobalContext_buildEntry };
|
|
18
|
+
export { clearGlobalContext };
|
|
19
|
+
import { assert, onSetupRuntime, assertUsage, assertWarning, isPlainObject, objectAssign, objectReplace, isObject, hasProp, debugGlob, getGlobalObject, genPromise, createDebugger, makePublicCopy } from './utils.js';
|
|
20
|
+
import { importServerProductionEntry } from '@brillout/vite-plugin-server-entry/runtime';
|
|
21
|
+
import { virtualFileIdImportUserCodeServer } from '../shared/virtual-files/virtualFileImportUserCode.js';
|
|
22
|
+
import { getPageFilesAll, setPageFiles, setPageFilesAsync } from '../../shared/getPageFiles/getPageFiles.js';
|
|
20
23
|
import { assertPluginManifest } from '../shared/assertPluginManifest.js';
|
|
21
24
|
import { assertRuntimeManifest } from '../shared/assertRuntimeManifest.js';
|
|
22
25
|
import pc from '@brillout/picocolors';
|
|
23
|
-
import { getPageFilesExports } from './page-files/getPageFilesExports.js';
|
|
24
26
|
import { resolveBaseFromResolvedConfig } from '../shared/resolveBase.js';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
})());
|
|
27
|
+
import { loadPageRoutes } from '../../shared/route/loadPageRoutes.js';
|
|
28
|
+
import { assertV1Design } from '../shared/assertV1Design.js';
|
|
29
|
+
const debug = createDebugger('vike:globalContext');
|
|
30
|
+
const globalObject = getGlobalObject('globalContext.ts', getInitialGlobalContext());
|
|
31
|
+
initDevEntry();
|
|
32
32
|
function getGlobalContext() {
|
|
33
|
-
|
|
33
|
+
if (!globalObject.globalContext) {
|
|
34
|
+
debug('getGlobalContext()', new Error().stack);
|
|
35
|
+
assert(false);
|
|
36
|
+
}
|
|
34
37
|
return globalObject.globalContext;
|
|
35
38
|
}
|
|
36
39
|
/** @experimental https://vike.dev/getGlobalContext */
|
|
@@ -47,27 +50,8 @@ async function getGlobalContextAsync(isProduction) {
|
|
|
47
50
|
return makePublic(globalContext);
|
|
48
51
|
}
|
|
49
52
|
function makePublic(globalContext) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
};
|
|
53
|
-
// Add internals (and prepended _ prefix to their keys)
|
|
54
|
-
{
|
|
55
|
-
const publicKeys = Object.keys(globalContextPublic);
|
|
56
|
-
objectKeys(globalContext)
|
|
57
|
-
.filter((key) => !publicKeys.includes(key))
|
|
58
|
-
.forEach((key) => {
|
|
59
|
-
const keyPublic = `_${key}`;
|
|
60
|
-
Object.defineProperty(globalContextPublic, keyPublic, {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get() {
|
|
63
|
-
assertWarning(false, `Using internal globalContext.${keyPublic} which is discouraged: it may break in any minor version update. Instead, reach out on GitHub and elaborate your use case.`, {
|
|
64
|
-
onlyOnce: true
|
|
65
|
-
});
|
|
66
|
-
return globalContext[key];
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
}
|
|
53
|
+
// TODO/now: add viteConfig and vikeConfig
|
|
54
|
+
const globalContextPublic = makePublicCopy(globalContext, 'globalContext', ['assetsManifest']);
|
|
71
55
|
return globalContextPublic;
|
|
72
56
|
}
|
|
73
57
|
function setGlobalContext_viteDevServer(viteDevServer) {
|
|
@@ -109,9 +93,11 @@ function getViteConfig() {
|
|
|
109
93
|
return globalObject.viteConfig ?? null;
|
|
110
94
|
}
|
|
111
95
|
async function initGlobalContext_renderPage() {
|
|
96
|
+
debug('initGlobalContext_renderPage()');
|
|
112
97
|
await initGlobalContext(!globalObject.isViteDev);
|
|
113
98
|
}
|
|
114
99
|
async function initGlobalContext_runPrerender() {
|
|
100
|
+
debug('initGlobalContext_runPrerender()');
|
|
115
101
|
if (globalObject.initGlobalContext_runPrerender_alreadyCalled)
|
|
116
102
|
return;
|
|
117
103
|
globalObject.initGlobalContext_runPrerender_alreadyCalled = true;
|
|
@@ -125,6 +111,7 @@ async function initGlobalContext_runPrerender() {
|
|
|
125
111
|
await initGlobalContext(true);
|
|
126
112
|
}
|
|
127
113
|
async function initGlobalContext_getGlobalContextAsync(isProduction) {
|
|
114
|
+
debug('initGlobalContext_getGlobalContextAsync()');
|
|
128
115
|
if (!isProduction) {
|
|
129
116
|
const waitFor = 20;
|
|
130
117
|
const timeout = setTimeout(() => {
|
|
@@ -138,6 +125,7 @@ async function initGlobalContext_getGlobalContextAsync(isProduction) {
|
|
|
138
125
|
}
|
|
139
126
|
await initGlobalContext(isProduction);
|
|
140
127
|
}
|
|
128
|
+
// TODO/now: refactor: move this to the top of the file
|
|
141
129
|
async function initGlobalContext(isProduction) {
|
|
142
130
|
if (globalObject.globalContext) {
|
|
143
131
|
assert(globalObject.globalContext.isProduction === isProduction);
|
|
@@ -152,41 +140,45 @@ async function initGlobalContext(isProduction) {
|
|
|
152
140
|
assert(vikeConfig);
|
|
153
141
|
assert(viteDevServer);
|
|
154
142
|
assert(!isPrerendering);
|
|
155
|
-
const
|
|
156
|
-
const pluginManifest = getRuntimeManifest(vikeConfigGlobal, viteConfig);
|
|
143
|
+
const { globalConfig, userFiles } = await getPageRuntimeInfo(isProduction);
|
|
144
|
+
const pluginManifest = getRuntimeManifest(vikeConfig.vikeConfigGlobal, viteConfig);
|
|
157
145
|
globalObject.globalContext = {
|
|
158
146
|
isProduction: false,
|
|
159
147
|
isPrerendering: false,
|
|
160
148
|
assetsManifest: null,
|
|
161
|
-
pluginManifest: null,
|
|
162
149
|
viteDevServer,
|
|
163
150
|
viteConfig,
|
|
164
|
-
vikeConfig
|
|
151
|
+
vikeConfig: {
|
|
152
|
+
global: globalConfig
|
|
153
|
+
},
|
|
154
|
+
...userFiles,
|
|
165
155
|
baseServer: pluginManifest.baseServer,
|
|
166
156
|
baseAssets: pluginManifest.baseAssets,
|
|
167
157
|
includeAssetsImportedByServer: pluginManifest.includeAssetsImportedByServer,
|
|
168
|
-
redirects: pluginManifest.redirects,
|
|
169
158
|
trailingSlash: pluginManifest.trailingSlash,
|
|
170
159
|
disableUrlNormalization: pluginManifest.disableUrlNormalization
|
|
171
160
|
};
|
|
172
161
|
}
|
|
173
162
|
else {
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
163
|
+
const buildEntry = await getBuildEntry(globalObject.outDirRoot, isPrerendering);
|
|
164
|
+
const { assetsManifest, pluginManifest } = buildEntry;
|
|
165
|
+
setPageFiles(buildEntry.pageFiles);
|
|
166
|
+
const { globalConfig, userFiles } = await getPageRuntimeInfo(isProduction);
|
|
178
167
|
assertViteManifest(assetsManifest);
|
|
179
168
|
assertPluginManifest(pluginManifest);
|
|
180
169
|
const globalContext = {
|
|
181
170
|
isProduction: true,
|
|
182
171
|
assetsManifest,
|
|
183
|
-
|
|
172
|
+
vikeConfig: {
|
|
173
|
+
global: globalConfig
|
|
174
|
+
},
|
|
175
|
+
...userFiles,
|
|
184
176
|
viteDevServer: null,
|
|
185
177
|
baseServer: pluginManifest.baseServer,
|
|
186
178
|
baseAssets: pluginManifest.baseAssets,
|
|
187
179
|
includeAssetsImportedByServer: pluginManifest.includeAssetsImportedByServer,
|
|
188
|
-
redirects: pluginManifest.redirects,
|
|
189
180
|
trailingSlash: pluginManifest.trailingSlash,
|
|
181
|
+
usesClientRouter: pluginManifest.usesClientRouter,
|
|
190
182
|
disableUrlNormalization: pluginManifest.disableUrlNormalization
|
|
191
183
|
};
|
|
192
184
|
if (isPrerendering) {
|
|
@@ -206,29 +198,35 @@ async function initGlobalContext(isProduction) {
|
|
|
206
198
|
}
|
|
207
199
|
}
|
|
208
200
|
}
|
|
201
|
+
async function getPageRuntimeInfo(isProduction) {
|
|
202
|
+
const { pageFilesAll, allPageIds, pageConfigs, pageConfigGlobal, globalConfig } = await getPageFilesAll(false, isProduction);
|
|
203
|
+
const { pageRoutes, onBeforeRouteHook } = await loadPageRoutes(pageFilesAll, pageConfigs, pageConfigGlobal, allPageIds);
|
|
204
|
+
const userFiles = {
|
|
205
|
+
pageFilesAll,
|
|
206
|
+
pageConfigs,
|
|
207
|
+
pageConfigGlobal,
|
|
208
|
+
allPageIds,
|
|
209
|
+
pageRoutes,
|
|
210
|
+
onBeforeRouteHook
|
|
211
|
+
};
|
|
212
|
+
assertV1Design(
|
|
213
|
+
// pageConfigs is PageConfigRuntime[] but assertV1Design() requires PageConfigBuildTime[]
|
|
214
|
+
pageConfigs.length > 0, pageFilesAll);
|
|
215
|
+
return { userFiles, globalConfig };
|
|
216
|
+
}
|
|
209
217
|
function getRuntimeManifest(vikeConfigGlobal, viteConfig) {
|
|
210
|
-
const { includeAssetsImportedByServer,
|
|
218
|
+
const { includeAssetsImportedByServer, trailingSlash, disableUrlNormalization } = vikeConfigGlobal;
|
|
211
219
|
const { baseServer, baseAssets } = resolveBaseFromResolvedConfig(vikeConfigGlobal.baseServer, vikeConfigGlobal.baseAssets, viteConfig);
|
|
212
220
|
const manifest = {
|
|
213
221
|
baseServer,
|
|
214
222
|
baseAssets,
|
|
215
223
|
includeAssetsImportedByServer,
|
|
216
|
-
redirects,
|
|
217
224
|
trailingSlash,
|
|
218
225
|
disableUrlNormalization
|
|
219
226
|
};
|
|
220
227
|
assertRuntimeManifest(manifest);
|
|
221
228
|
return manifest;
|
|
222
229
|
}
|
|
223
|
-
function assertBuildEntries(buildEntries, isPreRendering) {
|
|
224
|
-
const errMsg = [
|
|
225
|
-
`You are tyring to run`,
|
|
226
|
-
isPreRendering ? 'pre-rendering' : 'the server for production',
|
|
227
|
-
`but your app isn't built yet. Run ${pc.cyan('$ vike build')} before `,
|
|
228
|
-
isPreRendering ? 'pre-rendering.' : 'running the server.'
|
|
229
|
-
].join(' ');
|
|
230
|
-
assertUsage(buildEntries, errMsg);
|
|
231
|
-
}
|
|
232
230
|
function assertViteManifest(manifest) {
|
|
233
231
|
assert(isPlainObject(manifest));
|
|
234
232
|
/* We should include these assertions but we don't as a workaround for PWA manifests: https://github.com/vikejs/vike/issues/769
|
|
@@ -247,3 +245,59 @@ function eagerlyLoadUserFiles() {
|
|
|
247
245
|
// We call it as early as possible here for better performance.
|
|
248
246
|
getPageFilesExports();
|
|
249
247
|
}
|
|
248
|
+
async function getBuildEntry(outDir, isPrerendering) {
|
|
249
|
+
debug('getBuildEntry()');
|
|
250
|
+
if (!globalObject.buildEntry) {
|
|
251
|
+
debug('importServerProductionEntry()');
|
|
252
|
+
// importServerProductionEntry() loads dist/server/entry.mjs which calls setGlobalContext_buildEntry()
|
|
253
|
+
await importServerProductionEntry({ outDir, doNotLoadServer: isPrerendering });
|
|
254
|
+
if (!globalObject.buildEntry) {
|
|
255
|
+
debug('globalObject.buildEntryPrevious');
|
|
256
|
+
// Needed, for example, when calling the API prerender() then preview() because both trigger a importServerProductionEntry() call but only the first only is applied because of the import() cache. (A proper implementation would be to clear the import() cache, but it probably isn't possible on platforms such as Cloudflare Workers.)
|
|
257
|
+
globalObject.buildEntry = globalObject.buildEntryPrevious;
|
|
258
|
+
}
|
|
259
|
+
assert(globalObject.buildEntry);
|
|
260
|
+
}
|
|
261
|
+
const { buildEntry } = globalObject;
|
|
262
|
+
assert(isObject(buildEntry));
|
|
263
|
+
assert(hasProp(buildEntry, 'pageFiles', 'object'));
|
|
264
|
+
assert(hasProp(buildEntry, 'assetsManifest', 'object'));
|
|
265
|
+
assert(hasProp(buildEntry, 'pluginManifest', 'object'));
|
|
266
|
+
return buildEntry;
|
|
267
|
+
}
|
|
268
|
+
function setGlobalContext_buildEntry(buildEntry) {
|
|
269
|
+
debug('setGlobalContext_buildEntry()');
|
|
270
|
+
globalObject.buildEntry = buildEntry;
|
|
271
|
+
globalObject.buildEntryPrevious = buildEntry;
|
|
272
|
+
}
|
|
273
|
+
function initDevEntry() {
|
|
274
|
+
setPageFilesAsync(getPageFilesExports);
|
|
275
|
+
}
|
|
276
|
+
async function getPageFilesExports() {
|
|
277
|
+
const viteDevServer = getViteDevServer();
|
|
278
|
+
assert(viteDevServer);
|
|
279
|
+
let moduleExports;
|
|
280
|
+
try {
|
|
281
|
+
moduleExports = await viteDevServer.ssrLoadModule(virtualFileIdImportUserCodeServer);
|
|
282
|
+
}
|
|
283
|
+
catch (err) {
|
|
284
|
+
debugGlob(`Glob error: ${virtualFileIdImportUserCodeServer} transpile error: `, err);
|
|
285
|
+
throw err;
|
|
286
|
+
}
|
|
287
|
+
moduleExports = moduleExports.default || moduleExports;
|
|
288
|
+
debugGlob('Glob result: ', moduleExports);
|
|
289
|
+
assert(isObject(moduleExports));
|
|
290
|
+
return moduleExports;
|
|
291
|
+
}
|
|
292
|
+
function clearGlobalContext() {
|
|
293
|
+
debug('clearGlobalContext()');
|
|
294
|
+
objectReplace(globalObject, getInitialGlobalContext(), ['buildEntryPrevious']);
|
|
295
|
+
}
|
|
296
|
+
function getInitialGlobalContext() {
|
|
297
|
+
debug('getInitialGlobalContext()');
|
|
298
|
+
const { promise: viteDevServerPromise, resolve: viteDevServerPromiseResolve } = genPromise();
|
|
299
|
+
return {
|
|
300
|
+
viteDevServerPromise,
|
|
301
|
+
viteDevServerPromiseResolve
|
|
302
|
+
};
|
|
303
|
+
}
|
|
@@ -5,7 +5,7 @@ import { sanitizeJson } from './sanitizeJson.js';
|
|
|
5
5
|
import { inferAssetTag, inferPreloadTag } from './inferHtmlTags.js';
|
|
6
6
|
import { mergeScriptTags } from './mergeScriptTags.js';
|
|
7
7
|
import { getPageConfig } from '../../../../shared/page-configs/helpers.js';
|
|
8
|
-
import { getConfigValueRuntime } from '../../../../shared/page-configs/
|
|
8
|
+
import { getConfigValueRuntime } from '../../../../shared/page-configs/getConfigValueRuntime.js';
|
|
9
9
|
import { getGlobalContext } from '../../globalContext.js';
|
|
10
10
|
import pc from '@brillout/picocolors';
|
|
11
11
|
import { getConfigDefinedAt } from '../../../../shared/page-configs/getConfigDefinedAt.js';
|
|
@@ -6,4 +6,3 @@ export { getGlobalContextSync, getGlobalContextAsync } from './globalContext.js'
|
|
|
6
6
|
export { createDevMiddleware } from '../runtime-dev/index.js';
|
|
7
7
|
export { injectAssets__public as _injectAssets } from './html/injectAssets/injectAssets__public.js';
|
|
8
8
|
export { createPageRenderer } from '../createPageRenderer.js';
|
|
9
|
-
import './page-files/setup.js';
|
|
@@ -8,18 +8,3 @@ export { createDevMiddleware } from '../runtime-dev/index.js';
|
|
|
8
8
|
export { injectAssets__public as _injectAssets } from './html/injectAssets/injectAssets__public.js';
|
|
9
9
|
// TODO/v1-release: remove
|
|
10
10
|
export { createPageRenderer } from '../createPageRenderer.js';
|
|
11
|
-
addEcosystemStamp();
|
|
12
|
-
import './page-files/setup.js';
|
|
13
|
-
// Used by:
|
|
14
|
-
// - Telefunc (to detect the user's stack https://github.com/brillout/telefunc/blob/8288310e88e06a42b710d39c39fb502364ca6d30/telefunc/utils/isVikeApp.ts#L4)
|
|
15
|
-
function addEcosystemStamp() {
|
|
16
|
-
const g = globalThis;
|
|
17
|
-
g._isVikeApp =
|
|
18
|
-
/* Don't set to true so that consumers do `!!globalThis._isVikeApp` instead of `globalThis._isVikeApp === true`.
|
|
19
|
-
true
|
|
20
|
-
*/
|
|
21
|
-
// We use an object so that we can eventually, in the future, add helpful information as needed. (E.g. the Vike version, or global settings.)
|
|
22
|
-
{};
|
|
23
|
-
// We keep the old stamp for older Telefunc versions
|
|
24
|
-
g._isVitePluginSsr = true;
|
|
25
|
-
}
|
|
@@ -1,13 +1,27 @@
|
|
|
1
1
|
export { onLoad };
|
|
2
2
|
import { assertIsNotBrowser } from '../../utils/assertIsNotBrowser.js';
|
|
3
3
|
import { assertNodeVersion } from '../../utils/assertNodeVersion.js';
|
|
4
|
+
import { setAlwaysShowStackTrace } from '../../utils/assert.js';
|
|
4
5
|
import { installRequireShim } from '@brillout/require-shim';
|
|
5
|
-
import { setAlwaysShowStackTrace } from './utils.js';
|
|
6
6
|
import { isErrorDebug } from '../shared/isErrorDebug.js';
|
|
7
7
|
function onLoad() {
|
|
8
8
|
assertIsNotBrowser();
|
|
9
9
|
assertNodeVersion();
|
|
10
|
-
installRequireShim();
|
|
11
10
|
if (isErrorDebug())
|
|
12
11
|
setAlwaysShowStackTrace();
|
|
12
|
+
addEcosystemStamp();
|
|
13
|
+
installRequireShim();
|
|
14
|
+
}
|
|
15
|
+
// Used by:
|
|
16
|
+
// - Telefunc (to detect the user's stack https://github.com/brillout/telefunc/blob/8288310e88e06a42b710d39c39fb502364ca6d30/telefunc/utils/isVikeApp.ts#L4)
|
|
17
|
+
function addEcosystemStamp() {
|
|
18
|
+
const g = globalThis;
|
|
19
|
+
g._isVikeApp =
|
|
20
|
+
/* Don't set to true so that consumers do `!!globalThis._isVikeApp` instead of `globalThis._isVikeApp === true`.
|
|
21
|
+
true
|
|
22
|
+
*/
|
|
23
|
+
// We use an object so that we can eventually, in the future, add helpful information as needed. (E.g. the Vike version, or global settings.)
|
|
24
|
+
{};
|
|
25
|
+
// We keep the old stamp for older Telefunc versions
|
|
26
|
+
g._isVitePluginSsr = true;
|
|
13
27
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
export {};
|
|
2
|
+
// TODO/v1-release: remove https://github.com/vikejs/vike/issues/2122
|
|
3
|
+
// This doesn't do anything anymore. (It's kept to avoid introducing a breaking change.)
|
|
@@ -4,7 +4,7 @@ import { analyzePageClientSide } from '../../../shared/getPageFiles/analyzePageC
|
|
|
4
4
|
import { getVirtualFileIdPageConfigValuesAll } from '../../shared/virtual-files/virtualFilePageConfigValuesAll.js';
|
|
5
5
|
import { analyzeClientSide } from '../../../shared/getPageFiles/analyzeClientSide.js';
|
|
6
6
|
import { getGlobalContext } from '../globalContext.js';
|
|
7
|
-
import { getConfigValueRuntime } from '../../../shared/page-configs/
|
|
7
|
+
import { getConfigValueRuntime } from '../../../shared/page-configs/getConfigValueRuntime.js';
|
|
8
8
|
function analyzePage(pageFilesAll, pageConfig, pageId) {
|
|
9
9
|
if (pageConfig) {
|
|
10
10
|
const { isClientRuntimeLoaded, isClientRouting } = analyzeClientSide(pageConfig, pageFilesAll, pageId);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { getCacheControl };
|
|
2
2
|
import { getPageConfig } from '../../../../shared/page-configs/helpers.js';
|
|
3
|
-
import { getConfigValueRuntime } from '../../../../shared/page-configs/
|
|
3
|
+
import { getConfigValueRuntime } from '../../../../shared/page-configs/getConfigValueRuntime.js';
|
|
4
4
|
const defaultValue = 'no-store, max-age=0';
|
|
5
5
|
function getCacheControl(pageId, pageConfigs, statusCode) {
|
|
6
6
|
// TODO/v1-release: remove
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { executeOnBeforeRenderAndDataHooks };
|
|
2
|
-
import { type
|
|
2
|
+
import { type PageConfigUserFriendly } from '../../../shared/getPageFiles.js';
|
|
3
3
|
import { type PageContextForUserConsumptionServerSide } from './preparePageContextForUserConsumptionServerSide.js';
|
|
4
4
|
declare function executeOnBeforeRenderAndDataHooks(pageContext: {
|
|
5
5
|
pageId: string;
|
|
6
6
|
_pageContextAlreadyProvidedByOnPrerenderHook?: true;
|
|
7
|
-
} &
|
|
7
|
+
} & PageConfigUserFriendly & PageContextForUserConsumptionServerSide): Promise<void>;
|
|
@@ -14,7 +14,7 @@ type PageContext_loadUserFilesServerSide = PageContextGetPageAssets & PageContex
|
|
|
14
14
|
type PageFiles = PromiseType<ReturnType<typeof loadUserFilesServerSide>>;
|
|
15
15
|
declare function loadUserFilesServerSide(pageContext: {
|
|
16
16
|
pageId: string;
|
|
17
|
-
} & PageContext_loadUserFilesServerSide): Promise<import("../../../shared/getPageFiles.js").
|
|
17
|
+
} & PageContext_loadUserFilesServerSide): Promise<import("../../../shared/getPageFiles.js").PageConfigUserFriendly & {
|
|
18
18
|
Page: unknown;
|
|
19
19
|
_isHtmlOnly: boolean;
|
|
20
20
|
_passToClient: string[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { loadUserFilesServerSide };
|
|
2
|
-
import { getPageFilesServerSide,
|
|
2
|
+
import { getPageFilesServerSide, getPageConfigUserFriendly } from '../../../shared/getPageFiles.js';
|
|
3
3
|
import { analyzePageClientSideInit } from '../../../shared/getPageFiles/analyzePageClientSide.js';
|
|
4
4
|
import { assert, assertUsage, assertWarning, hasProp, isArrayOfStrings, objectAssign, isArray } from '../utils.js';
|
|
5
5
|
import { getPageAssets } from './getPageAssets.js';
|
|
@@ -99,7 +99,7 @@ async function loadPageUserFiles(pageFilesAll, pageConfig, pageId, isDev) {
|
|
|
99
99
|
const pageFilesServerSide = getPageFilesServerSide(pageFilesAll, pageId);
|
|
100
100
|
const pageConfigLoaded = !pageConfig ? null : await loadConfigValues(pageConfig, isDev);
|
|
101
101
|
await Promise.all(pageFilesServerSide.map((p) => p.loadFile?.()));
|
|
102
|
-
const pageContextExports =
|
|
102
|
+
const pageContextExports = getPageConfigUserFriendly(pageFilesServerSide, pageConfigLoaded);
|
|
103
103
|
return {
|
|
104
104
|
pageContextExports,
|
|
105
105
|
pageFilesLoaded: pageFilesServerSide
|
package/dist/esm/node/runtime/renderPage/preparePageContextForUserConsumptionServerSide.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ export { preparePageContextForUserConsumptionServerSide };
|
|
|
2
2
|
export type { PageContextForUserConsumptionServerSide };
|
|
3
3
|
import { PageContextUrlInternal } from '../../../shared/getPageContextUrlComputed.js';
|
|
4
4
|
import type { PageConfigRuntime } from '../../../shared/page-configs/PageConfig.js';
|
|
5
|
-
import type {
|
|
5
|
+
import type { PageConfigUserFriendly } from '../../../shared/page-configs/getPageConfigUserFriendly.js';
|
|
6
6
|
import { PageContextBuiltInServerInternal } from '../../../shared/types.js';
|
|
7
|
-
type PageContextForUserConsumptionServerSide = PageContextBuiltInServerInternal &
|
|
7
|
+
type PageContextForUserConsumptionServerSide = PageContextBuiltInServerInternal & PageConfigUserFriendly & {
|
|
8
8
|
urlOriginal: string;
|
|
9
9
|
/** @deprecated */
|
|
10
10
|
url: string;
|