vike 0.4.243-commit-0d0395a → 0.4.243-commit-743f6b8
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/esm/client/runtime-client-routing/getPageContextFromHooks.d.ts +0 -8
- package/dist/esm/client/runtime-client-routing/renderPageClientSide.d.ts +148 -3
- package/dist/esm/client/runtime-client-routing/renderPageClientSide.js +4 -4
- package/dist/esm/client/shared/preparePageContextForPublicUsageClientShared.d.ts +1 -1
- package/dist/esm/node/api/preview.js +1 -2
- package/dist/esm/node/api/utils.d.ts +1 -0
- package/dist/esm/node/api/utils.js +1 -0
- package/dist/esm/node/runtime/renderPage.d.ts +283 -0
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal.d.ts +2 -2
- package/dist/esm/shared/getProxyForPublicUsage.d.ts +3 -3
- package/dist/esm/shared/getProxyForPublicUsage.js +2 -2
- package/dist/esm/shared/prepareGlobalContextForPublicUsage.d.ts +1 -1
- package/dist/esm/shared/preparePageContextForPublicUsage.d.ts +1 -1
- package/dist/esm/types/GlobalContext.d.ts +8 -7
- package/dist/esm/types/PageContext.d.ts +11 -5
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/package.json +1 -1
|
@@ -117,7 +117,6 @@ declare function getPageContextFromHooks_isHydration(pageContext: PageContextSer
|
|
|
117
117
|
url: string;
|
|
118
118
|
pageExports: Record<string, unknown>;
|
|
119
119
|
isBaseMissing?: true;
|
|
120
|
-
ignoreWarning?: import("../../shared/getProxyForPublicUsage.js").IgnoreWarning;
|
|
121
120
|
}> & Pick<PageContextConfig & {
|
|
122
121
|
isPageContext: true;
|
|
123
122
|
Page: import("../../types/Config.js").Config["Page"];
|
|
@@ -139,7 +138,6 @@ declare function getPageContextFromHooks_isHydration(pageContext: PageContextSer
|
|
|
139
138
|
url: string;
|
|
140
139
|
pageExports: Record<string, unknown>;
|
|
141
140
|
isBaseMissing?: true;
|
|
142
|
-
ignoreWarning?: import("../../shared/getProxyForPublicUsage.js").IgnoreWarning;
|
|
143
141
|
}, "exports" | "pageId" | "pageExports" | "config" | "Page" | "data" | "source" | "sources" | "from" | "configEntries" | "exportsAll" | "routeParams" | "abortReason"> & {
|
|
144
142
|
isClientSide: true;
|
|
145
143
|
isPrerendering: false;
|
|
@@ -184,7 +182,6 @@ declare function getPageContextFromHooks_isHydration(pageContext: PageContextSer
|
|
|
184
182
|
url: string;
|
|
185
183
|
pageExports: Record<string, unknown>;
|
|
186
184
|
isBaseMissing?: true;
|
|
187
|
-
ignoreWarning?: import("../../shared/getProxyForPublicUsage.js").IgnoreWarning;
|
|
188
185
|
}> & Pick<PageContextConfig & {
|
|
189
186
|
isPageContext: true;
|
|
190
187
|
Page: import("../../types/Config.js").Config["Page"];
|
|
@@ -206,7 +203,6 @@ declare function getPageContextFromHooks_isHydration(pageContext: PageContextSer
|
|
|
206
203
|
url: string;
|
|
207
204
|
pageExports: Record<string, unknown>;
|
|
208
205
|
isBaseMissing?: true;
|
|
209
|
-
ignoreWarning?: import("../../shared/getProxyForPublicUsage.js").IgnoreWarning;
|
|
210
206
|
}, "exports" | "pageId" | "pageExports" | "config" | "Page" | "data" | "source" | "sources" | "from" | "configEntries" | "exportsAll" | "routeParams" | "abortReason"> & {
|
|
211
207
|
isClientSide: true;
|
|
212
208
|
isPrerendering: false;
|
|
@@ -342,7 +338,6 @@ declare function getPageContextFromClientHooks(pageContext: {
|
|
|
342
338
|
url: string;
|
|
343
339
|
pageExports: Record<string, unknown>;
|
|
344
340
|
isBaseMissing?: true;
|
|
345
|
-
ignoreWarning?: import("../../shared/getProxyForPublicUsage.js").IgnoreWarning;
|
|
346
341
|
}> & Pick<PageContextConfig & {
|
|
347
342
|
isPageContext: true;
|
|
348
343
|
Page: import("../../types/Config.js").Config["Page"];
|
|
@@ -364,7 +359,6 @@ declare function getPageContextFromClientHooks(pageContext: {
|
|
|
364
359
|
url: string;
|
|
365
360
|
pageExports: Record<string, unknown>;
|
|
366
361
|
isBaseMissing?: true;
|
|
367
|
-
ignoreWarning?: import("../../shared/getProxyForPublicUsage.js").IgnoreWarning;
|
|
368
362
|
}, "exports" | "pageId" | "pageExports" | "config" | "Page" | "data" | "source" | "sources" | "from" | "configEntries" | "exportsAll" | "routeParams" | "abortReason"> & {
|
|
369
363
|
isClientSide: true;
|
|
370
364
|
isPrerendering: false;
|
|
@@ -407,7 +401,6 @@ declare function getPageContextFromClientHooks(pageContext: {
|
|
|
407
401
|
url: string;
|
|
408
402
|
pageExports: Record<string, unknown>;
|
|
409
403
|
isBaseMissing?: true;
|
|
410
|
-
ignoreWarning?: import("../../shared/getProxyForPublicUsage.js").IgnoreWarning;
|
|
411
404
|
}> & Pick<PageContextConfig & {
|
|
412
405
|
isPageContext: true;
|
|
413
406
|
Page: import("../../types/Config.js").Config["Page"];
|
|
@@ -429,7 +422,6 @@ declare function getPageContextFromClientHooks(pageContext: {
|
|
|
429
422
|
url: string;
|
|
430
423
|
pageExports: Record<string, unknown>;
|
|
431
424
|
isBaseMissing?: true;
|
|
432
|
-
ignoreWarning?: import("../../shared/getProxyForPublicUsage.js").IgnoreWarning;
|
|
433
425
|
}, "exports" | "pageId" | "pageExports" | "config" | "Page" | "data" | "source" | "sources" | "from" | "configEntries" | "exportsAll" | "routeParams" | "abortReason"> & {
|
|
434
426
|
isClientSide: true;
|
|
435
427
|
isPrerendering: false;
|
|
@@ -4,11 +4,13 @@ export { disableClientRouting };
|
|
|
4
4
|
export { firstRenderStartPromise };
|
|
5
5
|
export { getPageContextClient };
|
|
6
6
|
export type { PageContextBegin };
|
|
7
|
+
export type { PageContextInternalClientAfterRender };
|
|
7
8
|
import { type PageContextFromRewrite } from '../../shared/route/abort.js';
|
|
8
9
|
import { type ScrollTarget } from './setScrollPosition.js';
|
|
9
10
|
import type { PageContextConfig } from '../../shared/getPageFiles.js';
|
|
10
11
|
import type { PageContextClient, PageContextInternalClient } from '../../types/PageContext.js';
|
|
11
12
|
import type { VikeGlobalInternal } from '../../types/VikeGlobalInternal.js';
|
|
13
|
+
type PageContextInternalClientAfterRender = NonNullable<Awaited<ReturnType<typeof renderPageClientSide>>>;
|
|
12
14
|
declare const firstRenderStartPromise: Promise<void>;
|
|
13
15
|
type PageContextRouted = {
|
|
14
16
|
pageId: string;
|
|
@@ -26,7 +28,152 @@ type RenderArgs = {
|
|
|
26
28
|
isClientSideNavigation?: boolean;
|
|
27
29
|
pageContextInitClient?: Record<string, unknown>;
|
|
28
30
|
};
|
|
29
|
-
declare function renderPageClientSide(renderArgs: RenderArgs): Promise<
|
|
31
|
+
declare function renderPageClientSide(renderArgs: RenderArgs): Promise<({
|
|
32
|
+
_pageFilesLoaded: import("../../shared/getPageFiles.js").PageFile[];
|
|
33
|
+
urlOriginal?: string;
|
|
34
|
+
urlPathname?: string;
|
|
35
|
+
pageId: string;
|
|
36
|
+
_globalContext: import("../shared/getGlobalContextClientInternalShared.js").GlobalContextClientInternalShared;
|
|
37
|
+
} & PageContextConfig & import("../../shared/preparePageContextForPublicUsage.js").PageContextPrepareMinimum & PageContextInternalClient & {
|
|
38
|
+
_isOriginalObject: true;
|
|
39
|
+
isPageContext: true;
|
|
40
|
+
} & {
|
|
41
|
+
isClientSide: true;
|
|
42
|
+
isPrerendering: false;
|
|
43
|
+
urlOriginal: string;
|
|
44
|
+
_globalContext: {
|
|
45
|
+
_globalConfigPublic: {
|
|
46
|
+
pages: {
|
|
47
|
+
[k: string]: {
|
|
48
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
49
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
50
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
51
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
52
|
+
} & ({
|
|
53
|
+
route: import("../../types/Config.js").Route;
|
|
54
|
+
isErrorPage?: undefined;
|
|
55
|
+
} | {
|
|
56
|
+
route?: undefined;
|
|
57
|
+
isErrorPage: true;
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
61
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
62
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
63
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
64
|
+
};
|
|
65
|
+
pages: {
|
|
66
|
+
[k: string]: {
|
|
67
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
68
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
69
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
70
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
71
|
+
} & ({
|
|
72
|
+
route: import("../../types/Config.js").Route;
|
|
73
|
+
isErrorPage?: undefined;
|
|
74
|
+
} | {
|
|
75
|
+
route?: undefined;
|
|
76
|
+
isErrorPage: true;
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
80
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
81
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
82
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
83
|
+
isGlobalContext: true;
|
|
84
|
+
_isOriginalObject: true;
|
|
85
|
+
_virtualFileExportsGlobalEntry: unknown;
|
|
86
|
+
_pageFilesAll: import("../../shared/getPageFiles.js").PageFile[];
|
|
87
|
+
_pageConfigs: import("../../types/PageConfig.js").PageConfigRuntime[];
|
|
88
|
+
_pageConfigGlobal: import("../../types/PageConfig.js").PageConfigGlobalRuntime;
|
|
89
|
+
_allPageIds: string[];
|
|
90
|
+
} & {
|
|
91
|
+
isClientSide: true;
|
|
92
|
+
} & {
|
|
93
|
+
_pageRoutes: import("../../shared/route/loadPageRoutes.js").PageRoutes;
|
|
94
|
+
_onBeforeRouteHook: import("../../shared/hooks/getHook.js").Hook | null;
|
|
95
|
+
};
|
|
96
|
+
_pageFilesAll: import("../../shared/getPageFiles.js").PageFile[];
|
|
97
|
+
_urlHandler: null;
|
|
98
|
+
_urlRewrite: null | string;
|
|
99
|
+
_baseServer: string;
|
|
100
|
+
} & {
|
|
101
|
+
urlParsed: import("./utils.js").UrlPublic;
|
|
102
|
+
urlPathname: string;
|
|
103
|
+
url: string;
|
|
104
|
+
} & import("../../shared/page-configs/resolveVikeConfigPublic.js").GlobalConfigPublic & {
|
|
105
|
+
isBackwardNavigation: boolean | null;
|
|
106
|
+
isClientSideNavigation: boolean;
|
|
107
|
+
isHydration: boolean;
|
|
108
|
+
previousPageContext: ({
|
|
109
|
+
pageId: string;
|
|
110
|
+
} & PageContextConfig & PageContextRouted & import("../../shared/preparePageContextForPublicUsage.js").PageContextPrepareMinimum & PageContextInternalClient & Omit<Partial<PageContextConfig & {
|
|
111
|
+
isPageContext: true;
|
|
112
|
+
Page: import("../../types/Config.js").Config["Page"];
|
|
113
|
+
routeParams: Record<string, string>;
|
|
114
|
+
data: unknown;
|
|
115
|
+
urlOriginal: string;
|
|
116
|
+
headers: Record<string, string> | null;
|
|
117
|
+
headersOriginal?: unknown;
|
|
118
|
+
headersResponse: Headers;
|
|
119
|
+
is404: boolean | null;
|
|
120
|
+
isClientSideNavigation: boolean;
|
|
121
|
+
abortReason?: unknown;
|
|
122
|
+
abortStatusCode?: import("../../shared/route/abort.js").AbortStatusCode;
|
|
123
|
+
errorWhileRendering?: unknown;
|
|
124
|
+
pageId: string | null;
|
|
125
|
+
from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
126
|
+
source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
127
|
+
sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
128
|
+
url: string;
|
|
129
|
+
pageExports: Record<string, unknown>;
|
|
130
|
+
isBaseMissing?: true;
|
|
131
|
+
}> & Pick<PageContextConfig & {
|
|
132
|
+
isPageContext: true;
|
|
133
|
+
Page: import("../../types/Config.js").Config["Page"];
|
|
134
|
+
routeParams: Record<string, string>;
|
|
135
|
+
data: unknown;
|
|
136
|
+
urlOriginal: string;
|
|
137
|
+
headers: Record<string, string> | null;
|
|
138
|
+
headersOriginal?: unknown;
|
|
139
|
+
headersResponse: Headers;
|
|
140
|
+
is404: boolean | null;
|
|
141
|
+
isClientSideNavigation: boolean;
|
|
142
|
+
abortReason?: unknown;
|
|
143
|
+
abortStatusCode?: import("../../shared/route/abort.js").AbortStatusCode;
|
|
144
|
+
errorWhileRendering?: unknown;
|
|
145
|
+
pageId: string | null;
|
|
146
|
+
from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
147
|
+
source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
148
|
+
sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
149
|
+
url: string;
|
|
150
|
+
pageExports: Record<string, unknown>;
|
|
151
|
+
isBaseMissing?: true;
|
|
152
|
+
}, "exports" | "pageId" | "pageExports" | "config" | "Page" | "data" | "source" | "sources" | "from" | "configEntries" | "exportsAll" | "routeParams" | "abortReason"> & {
|
|
153
|
+
isClientSide: true;
|
|
154
|
+
isPrerendering: false;
|
|
155
|
+
} & {
|
|
156
|
+
isHydration: boolean;
|
|
157
|
+
isBackwardNavigation: boolean | null;
|
|
158
|
+
previousPageContext: PageContextClient<unknown> | null;
|
|
159
|
+
globalContext: import("../../types/GlobalContext.js").GlobalContextClient;
|
|
160
|
+
} & {
|
|
161
|
+
urlOriginal: string;
|
|
162
|
+
} & {
|
|
163
|
+
urlParsed: import("./utils.js").UrlPublic;
|
|
164
|
+
urlPathname: string;
|
|
165
|
+
url: string;
|
|
166
|
+
}, ("globalContext" | "Page" | "data") | "previousPageContext"> & {
|
|
167
|
+
previousPageContext: {
|
|
168
|
+
pageId: string;
|
|
169
|
+
} | null;
|
|
170
|
+
} & {
|
|
171
|
+
urlOriginal: string;
|
|
172
|
+
}) | null;
|
|
173
|
+
} & {
|
|
174
|
+
urlPathname: string;
|
|
175
|
+
_hasPageContextFromServer: boolean;
|
|
176
|
+
} & PageContextRouted) | undefined>;
|
|
30
177
|
declare function getPageContextBegin(isForErrorPage: boolean, { urlOriginal, isBackwardNavigation, pageContextsFromRewrite, isClientSideNavigation, pageContextInitClient, isFirstRender, }: {
|
|
31
178
|
urlOriginal: string;
|
|
32
179
|
isBackwardNavigation: boolean | null;
|
|
@@ -128,7 +275,6 @@ declare function getPageContextBegin(isForErrorPage: boolean, { urlOriginal, isB
|
|
|
128
275
|
url: string;
|
|
129
276
|
pageExports: Record<string, unknown>;
|
|
130
277
|
isBaseMissing?: true;
|
|
131
|
-
ignoreWarning?: import("../../shared/getProxyForPublicUsage.js").IgnoreWarning;
|
|
132
278
|
}> & Pick<PageContextConfig & {
|
|
133
279
|
isPageContext: true;
|
|
134
280
|
Page: import("../../types/Config.js").Config["Page"];
|
|
@@ -150,7 +296,6 @@ declare function getPageContextBegin(isForErrorPage: boolean, { urlOriginal, isB
|
|
|
150
296
|
url: string;
|
|
151
297
|
pageExports: Record<string, unknown>;
|
|
152
298
|
isBaseMissing?: true;
|
|
153
|
-
ignoreWarning?: import("../../shared/getProxyForPublicUsage.js").IgnoreWarning;
|
|
154
299
|
}, "exports" | "pageId" | "pageExports" | "config" | "Page" | "data" | "source" | "sources" | "from" | "configEntries" | "exportsAll" | "routeParams" | "abortReason"> & {
|
|
155
300
|
isClientSide: true;
|
|
156
301
|
isPrerendering: false;
|
|
@@ -57,8 +57,7 @@ async function renderPageClientSide(renderArgs) {
|
|
|
57
57
|
globalObject.firstRenderStartPromiseResolve();
|
|
58
58
|
if (isRenderOutdated())
|
|
59
59
|
return;
|
|
60
|
-
await renderPageNominal();
|
|
61
|
-
return;
|
|
60
|
+
return await renderPageNominal();
|
|
62
61
|
async function renderPageNominal() {
|
|
63
62
|
const onError = async (err) => {
|
|
64
63
|
await handleError({ err });
|
|
@@ -187,7 +186,7 @@ async function renderPageClientSide(renderArgs) {
|
|
|
187
186
|
return;
|
|
188
187
|
updateType(pageContext, pageContextAugmented);
|
|
189
188
|
// Render page view
|
|
190
|
-
await renderPageView(pageContext);
|
|
189
|
+
return await renderPageView(pageContext);
|
|
191
190
|
}
|
|
192
191
|
else {
|
|
193
192
|
// Fetch pageContext from server-side hooks
|
|
@@ -227,7 +226,7 @@ async function renderPageClientSide(renderArgs) {
|
|
|
227
226
|
if (isRenderOutdated())
|
|
228
227
|
return;
|
|
229
228
|
updateType(pageContext, pageContextFromClientHooks);
|
|
230
|
-
await renderPageView(pageContext);
|
|
229
|
+
return await renderPageView(pageContext);
|
|
231
230
|
}
|
|
232
231
|
}
|
|
233
232
|
// When the normal page threw an error:
|
|
@@ -474,6 +473,7 @@ async function renderPageClientSide(renderArgs) {
|
|
|
474
473
|
addLinkPrefetchHandlers();
|
|
475
474
|
globalObject.renderedPageContext = pageContext;
|
|
476
475
|
stampFinished(urlOriginal);
|
|
476
|
+
return pageContext;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
async function getPageContextBegin(isForErrorPage, { urlOriginal, isBackwardNavigation, pageContextsFromRewrite, isClientSideNavigation, pageContextInitClient, isFirstRender, }) {
|
|
@@ -10,5 +10,5 @@ declare function preparePageContextForPublicUsageClientShared<PageContext extend
|
|
|
10
10
|
};
|
|
11
11
|
declare function preparePageContextForPublicUsageClientMinimal<PageContext extends PageContextPrepareMinimum>(pageContext: PageContext): PageContext & {
|
|
12
12
|
_isProxyObject: true;
|
|
13
|
-
|
|
13
|
+
dangerouslyUseInternals: PageContext;
|
|
14
14
|
};
|
|
@@ -3,11 +3,10 @@ import { prepareViteApiCall } from './prepareViteApiCall.js';
|
|
|
3
3
|
import { preview as previewVite } from 'vite';
|
|
4
4
|
import { importServerProductionIndex } from '@brillout/vite-plugin-server-entry/runtime';
|
|
5
5
|
import { getOutDirs } from '../vite/shared/getOutDirs.js';
|
|
6
|
-
import { assertUsage, assertWarning, onSetupPreview } from './utils.js';
|
|
6
|
+
import { assertUsage, assertWarning, onSetupPreview, isCallable } from './utils.js';
|
|
7
7
|
import pc from '@brillout/picocolors';
|
|
8
8
|
import path from 'node:path';
|
|
9
9
|
import { getVikeConfigInternal } from '../vite/shared/resolveVikeConfigInternal.js';
|
|
10
|
-
import { isCallable } from '../runtime/utils.js';
|
|
11
10
|
/**
|
|
12
11
|
* Programmatically trigger `$ vike preview`
|
|
13
12
|
*
|
|
@@ -2,6 +2,7 @@ export { renderPage };
|
|
|
2
2
|
export { renderPage_addAsyncHookwrapper };
|
|
3
3
|
export type { PageContextInit };
|
|
4
4
|
export type { PageContextBegin };
|
|
5
|
+
export type { PageContextInternalServerAfterRender };
|
|
5
6
|
import { type GlobalContextServerInternal } from './globalContext.js';
|
|
6
7
|
import { type HttpResponse } from './renderPage/createHttpResponse.js';
|
|
7
8
|
import type { PageContextServer } from '../../types/index.js';
|
|
@@ -21,6 +22,288 @@ declare function renderPage<PageContextUserAdded extends {}, PageContextInitUser
|
|
|
21
22
|
httpResponse: HttpResponse;
|
|
22
23
|
} & Partial<PageContextServer & PageContextUserAdded>>;
|
|
23
24
|
declare function renderPage_addAsyncHookwrapper(wrapper: typeof globalObject.asyncHookWrapper): void;
|
|
25
|
+
type PageContextInternalServerAfterRender = Awaited<ReturnType<typeof renderPageNominal>>;
|
|
26
|
+
declare function renderPageNominal(pageContext: PageContextBegin): Promise<({
|
|
27
|
+
_isOriginalObject: true;
|
|
28
|
+
isPageContext: true;
|
|
29
|
+
} & {
|
|
30
|
+
isClientSide: false;
|
|
31
|
+
isPrerendering: boolean;
|
|
32
|
+
} & Pick<PageContextInternalServer, "urlOriginal" | "headersOriginal"> & {
|
|
33
|
+
/** @deprecated Set `pageContextInit.urlOriginal` instead */ url?: string;
|
|
34
|
+
/** @deprecated Set pageContextInit.headersOriginal instead */ headers?: Record<string, string>;
|
|
35
|
+
} & {
|
|
36
|
+
_globalContext: ({
|
|
37
|
+
_globalConfigPublic: {
|
|
38
|
+
pages: {
|
|
39
|
+
[k: string]: {
|
|
40
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
41
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
42
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
43
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
44
|
+
} & ({
|
|
45
|
+
route: import("../../types/Config.js").Route;
|
|
46
|
+
isErrorPage?: undefined;
|
|
47
|
+
} | {
|
|
48
|
+
route?: undefined;
|
|
49
|
+
isErrorPage: true;
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
53
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
54
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
55
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
56
|
+
};
|
|
57
|
+
pages: {
|
|
58
|
+
[k: string]: {
|
|
59
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
60
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
61
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
62
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
63
|
+
} & ({
|
|
64
|
+
route: import("../../types/Config.js").Route;
|
|
65
|
+
isErrorPage?: undefined;
|
|
66
|
+
} | {
|
|
67
|
+
route?: undefined;
|
|
68
|
+
isErrorPage: true;
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
72
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
73
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
74
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
75
|
+
isGlobalContext: true;
|
|
76
|
+
_isOriginalObject: true;
|
|
77
|
+
_virtualFileExportsGlobalEntry: unknown;
|
|
78
|
+
_pageFilesAll: import("../../shared/getPageFiles.js").PageFile[];
|
|
79
|
+
_pageConfigs: import("../../types/PageConfig.js").PageConfigRuntime[];
|
|
80
|
+
_pageConfigGlobal: import("../../types/PageConfig.js").PageConfigGlobalRuntime;
|
|
81
|
+
_allPageIds: string[];
|
|
82
|
+
} & (({
|
|
83
|
+
_isProduction: false;
|
|
84
|
+
_isPrerendering: false;
|
|
85
|
+
assetsManifest: null;
|
|
86
|
+
_viteDevServer: import("vite").ViteDevServer | undefined;
|
|
87
|
+
viteConfig: import("vite").ResolvedConfig | undefined;
|
|
88
|
+
isClientSide: false;
|
|
89
|
+
_pageRoutes: import("../../shared/route/loadPageRoutes.js").PageRoutes;
|
|
90
|
+
_onBeforeRouteHook: import("../../shared/hooks/getHook.js").Hook | null;
|
|
91
|
+
} | {
|
|
92
|
+
_isPrerendering: true;
|
|
93
|
+
viteConfig: import("vite").ResolvedConfig;
|
|
94
|
+
_isProduction: true;
|
|
95
|
+
assetsManifest: import("../../types/ViteManifest.js").ViteManifest;
|
|
96
|
+
_viteDevServer: null;
|
|
97
|
+
_usesClientRouter: boolean;
|
|
98
|
+
isClientSide: false;
|
|
99
|
+
_pageRoutes: import("../../shared/route/loadPageRoutes.js").PageRoutes;
|
|
100
|
+
_onBeforeRouteHook: import("../../shared/hooks/getHook.js").Hook | null;
|
|
101
|
+
} | {
|
|
102
|
+
_isPrerendering: false;
|
|
103
|
+
viteConfig: null;
|
|
104
|
+
_isProduction: true;
|
|
105
|
+
assetsManifest: import("../../types/ViteManifest.js").ViteManifest;
|
|
106
|
+
_viteDevServer: null;
|
|
107
|
+
_usesClientRouter: boolean;
|
|
108
|
+
isClientSide: false;
|
|
109
|
+
_pageRoutes: import("../../shared/route/loadPageRoutes.js").PageRoutes;
|
|
110
|
+
_onBeforeRouteHook: import("../../shared/hooks/getHook.js").Hook | null;
|
|
111
|
+
}) & {
|
|
112
|
+
baseServer: string;
|
|
113
|
+
baseAssets: string;
|
|
114
|
+
viteConfigRuntime: {
|
|
115
|
+
root: string;
|
|
116
|
+
build: {
|
|
117
|
+
outDir: string;
|
|
118
|
+
};
|
|
119
|
+
_baseViteOriginal: string;
|
|
120
|
+
vitePluginServerEntry: {
|
|
121
|
+
inject: boolean | undefined;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
})) & {
|
|
125
|
+
prerenderContext: import("../prerender/runPrerender.js").PrerenderContextPublic | undefined;
|
|
126
|
+
};
|
|
127
|
+
_pageFilesAll: import("../../shared/getPageFiles.js").PageFile[];
|
|
128
|
+
_baseServer: string;
|
|
129
|
+
_baseAssets: string;
|
|
130
|
+
_pageContextInit: PageContextInit;
|
|
131
|
+
_urlRewrite: null;
|
|
132
|
+
_urlHandler: ((url: string) => string) | null;
|
|
133
|
+
isClientSideNavigation: boolean;
|
|
134
|
+
} & {
|
|
135
|
+
pages: {
|
|
136
|
+
[k: string]: {
|
|
137
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
138
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
139
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
140
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
141
|
+
} & ({
|
|
142
|
+
route: import("../../types/Config.js").Route;
|
|
143
|
+
isErrorPage?: undefined;
|
|
144
|
+
} | {
|
|
145
|
+
route?: undefined;
|
|
146
|
+
isErrorPage: true;
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
150
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
151
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
152
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
153
|
+
} & {
|
|
154
|
+
urlParsed: import("./utils.js").UrlPublic;
|
|
155
|
+
urlPathname: string;
|
|
156
|
+
url: string;
|
|
157
|
+
} & {
|
|
158
|
+
headers: Record<string, string> | null;
|
|
159
|
+
} & {
|
|
160
|
+
_httpRequestId: number;
|
|
161
|
+
_isPageContextJsonRequest: boolean;
|
|
162
|
+
} & {
|
|
163
|
+
errorWhileRendering: null;
|
|
164
|
+
} & import("../../shared/route/index.js").PageContextAfterRoute & {
|
|
165
|
+
is404: boolean | null;
|
|
166
|
+
} & Record<"pageId", null> & import("./renderPage/renderPageAfterRoute.js").PageContextAfterRender) | ({
|
|
167
|
+
_isOriginalObject: true;
|
|
168
|
+
isPageContext: true;
|
|
169
|
+
} & {
|
|
170
|
+
isClientSide: false;
|
|
171
|
+
isPrerendering: boolean;
|
|
172
|
+
} & Pick<PageContextInternalServer, "urlOriginal" | "headersOriginal"> & {
|
|
173
|
+
/** @deprecated Set `pageContextInit.urlOriginal` instead */ url?: string;
|
|
174
|
+
/** @deprecated Set pageContextInit.headersOriginal instead */ headers?: Record<string, string>;
|
|
175
|
+
} & {
|
|
176
|
+
_globalContext: ({
|
|
177
|
+
_globalConfigPublic: {
|
|
178
|
+
pages: {
|
|
179
|
+
[k: string]: {
|
|
180
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
181
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
182
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
183
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
184
|
+
} & ({
|
|
185
|
+
route: import("../../types/Config.js").Route;
|
|
186
|
+
isErrorPage?: undefined;
|
|
187
|
+
} | {
|
|
188
|
+
route?: undefined;
|
|
189
|
+
isErrorPage: true;
|
|
190
|
+
});
|
|
191
|
+
};
|
|
192
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
193
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
194
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
195
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
196
|
+
};
|
|
197
|
+
pages: {
|
|
198
|
+
[k: string]: {
|
|
199
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
200
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
201
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
202
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
203
|
+
} & ({
|
|
204
|
+
route: import("../../types/Config.js").Route;
|
|
205
|
+
isErrorPage?: undefined;
|
|
206
|
+
} | {
|
|
207
|
+
route?: undefined;
|
|
208
|
+
isErrorPage: true;
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
212
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
213
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
214
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
215
|
+
isGlobalContext: true;
|
|
216
|
+
_isOriginalObject: true;
|
|
217
|
+
_virtualFileExportsGlobalEntry: unknown;
|
|
218
|
+
_pageFilesAll: import("../../shared/getPageFiles.js").PageFile[];
|
|
219
|
+
_pageConfigs: import("../../types/PageConfig.js").PageConfigRuntime[];
|
|
220
|
+
_pageConfigGlobal: import("../../types/PageConfig.js").PageConfigGlobalRuntime;
|
|
221
|
+
_allPageIds: string[];
|
|
222
|
+
} & (({
|
|
223
|
+
_isProduction: false;
|
|
224
|
+
_isPrerendering: false;
|
|
225
|
+
assetsManifest: null;
|
|
226
|
+
_viteDevServer: import("vite").ViteDevServer | undefined;
|
|
227
|
+
viteConfig: import("vite").ResolvedConfig | undefined;
|
|
228
|
+
isClientSide: false;
|
|
229
|
+
_pageRoutes: import("../../shared/route/loadPageRoutes.js").PageRoutes;
|
|
230
|
+
_onBeforeRouteHook: import("../../shared/hooks/getHook.js").Hook | null;
|
|
231
|
+
} | {
|
|
232
|
+
_isPrerendering: true;
|
|
233
|
+
viteConfig: import("vite").ResolvedConfig;
|
|
234
|
+
_isProduction: true;
|
|
235
|
+
assetsManifest: import("../../types/ViteManifest.js").ViteManifest;
|
|
236
|
+
_viteDevServer: null;
|
|
237
|
+
_usesClientRouter: boolean;
|
|
238
|
+
isClientSide: false;
|
|
239
|
+
_pageRoutes: import("../../shared/route/loadPageRoutes.js").PageRoutes;
|
|
240
|
+
_onBeforeRouteHook: import("../../shared/hooks/getHook.js").Hook | null;
|
|
241
|
+
} | {
|
|
242
|
+
_isPrerendering: false;
|
|
243
|
+
viteConfig: null;
|
|
244
|
+
_isProduction: true;
|
|
245
|
+
assetsManifest: import("../../types/ViteManifest.js").ViteManifest;
|
|
246
|
+
_viteDevServer: null;
|
|
247
|
+
_usesClientRouter: boolean;
|
|
248
|
+
isClientSide: false;
|
|
249
|
+
_pageRoutes: import("../../shared/route/loadPageRoutes.js").PageRoutes;
|
|
250
|
+
_onBeforeRouteHook: import("../../shared/hooks/getHook.js").Hook | null;
|
|
251
|
+
}) & {
|
|
252
|
+
baseServer: string;
|
|
253
|
+
baseAssets: string;
|
|
254
|
+
viteConfigRuntime: {
|
|
255
|
+
root: string;
|
|
256
|
+
build: {
|
|
257
|
+
outDir: string;
|
|
258
|
+
};
|
|
259
|
+
_baseViteOriginal: string;
|
|
260
|
+
vitePluginServerEntry: {
|
|
261
|
+
inject: boolean | undefined;
|
|
262
|
+
};
|
|
263
|
+
};
|
|
264
|
+
})) & {
|
|
265
|
+
prerenderContext: import("../prerender/runPrerender.js").PrerenderContextPublic | undefined;
|
|
266
|
+
};
|
|
267
|
+
_pageFilesAll: import("../../shared/getPageFiles.js").PageFile[];
|
|
268
|
+
_baseServer: string;
|
|
269
|
+
_baseAssets: string;
|
|
270
|
+
_pageContextInit: PageContextInit;
|
|
271
|
+
_urlRewrite: null;
|
|
272
|
+
_urlHandler: ((url: string) => string) | null;
|
|
273
|
+
isClientSideNavigation: boolean;
|
|
274
|
+
} & {
|
|
275
|
+
pages: {
|
|
276
|
+
[k: string]: {
|
|
277
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
278
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
279
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
280
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
281
|
+
} & ({
|
|
282
|
+
route: import("../../types/Config.js").Route;
|
|
283
|
+
isErrorPage?: undefined;
|
|
284
|
+
} | {
|
|
285
|
+
route?: undefined;
|
|
286
|
+
isErrorPage: true;
|
|
287
|
+
});
|
|
288
|
+
};
|
|
289
|
+
config: import("../../types/index.js").ConfigResolved;
|
|
290
|
+
_source: import("../../shared/page-configs/resolveVikeConfigPublic.js").Source;
|
|
291
|
+
_sources: import("../../shared/page-configs/resolveVikeConfigPublic.js").Sources;
|
|
292
|
+
_from: import("../../shared/page-configs/resolveVikeConfigPublic.js").From;
|
|
293
|
+
} & {
|
|
294
|
+
urlParsed: import("./utils.js").UrlPublic;
|
|
295
|
+
urlPathname: string;
|
|
296
|
+
url: string;
|
|
297
|
+
} & {
|
|
298
|
+
headers: Record<string, string> | null;
|
|
299
|
+
} & {
|
|
300
|
+
_httpRequestId: number;
|
|
301
|
+
_isPageContextJsonRequest: boolean;
|
|
302
|
+
} & {
|
|
303
|
+
errorWhileRendering: null;
|
|
304
|
+
} & import("../../shared/route/index.js").PageContextAfterRoute & {
|
|
305
|
+
is404: boolean | null;
|
|
306
|
+
} & Record<"pageId", string> & import("./renderPage/renderPageAfterRoute.js").PageContextAfterRender)>;
|
|
24
307
|
declare function getPageContextBegin(pageContextInit: PageContextInit, globalContext: GlobalContextServerInternal, httpRequestId: number): {
|
|
25
308
|
_isOriginalObject: true;
|
|
26
309
|
isPageContext: true;
|
|
@@ -18,7 +18,7 @@ import { type GlobalConfigPublic } from '../../../shared/page-configs/resolveVik
|
|
|
18
18
|
import { type PlusFile } from './resolveVikeConfigInternal/getPlusFilesAll.js';
|
|
19
19
|
import type { PrerenderContextPublic } from '../../prerender/runPrerender.js';
|
|
20
20
|
import type { ResolvedConfig, UserConfig } from 'vite';
|
|
21
|
-
import { type
|
|
21
|
+
import { type DangerouslyUseInternals } from '../../../shared/getProxyForPublicUsage.js';
|
|
22
22
|
type VikeConfigContext = {
|
|
23
23
|
userRootDir: string;
|
|
24
24
|
isDev: boolean;
|
|
@@ -47,7 +47,7 @@ declare function getVikeConfigInternalSync(): VikeConfigInternal;
|
|
|
47
47
|
declare function getVikeConfig(config: ResolvedConfig | UserConfig): VikeConfig;
|
|
48
48
|
type VikeConfig = Pick<VikeConfigInternal, 'config' | 'pages' | 'prerenderContext'> & {
|
|
49
49
|
/** https://vike.dev/warning/internals */
|
|
50
|
-
|
|
50
|
+
dangerouslyUseInternals: DangerouslyUseInternals<VikeConfigInternal>;
|
|
51
51
|
};
|
|
52
52
|
declare function setVikeConfigContext(vikeConfigCtx_: VikeConfigContext): void;
|
|
53
53
|
declare function isVikeConfigContextSet(): boolean;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { getProxyForPublicUsage };
|
|
2
|
-
export type {
|
|
2
|
+
export type { DangerouslyUseInternals };
|
|
3
3
|
type Target = Record<string, unknown>;
|
|
4
4
|
type Fallback = (prop: string | symbol) => unknown;
|
|
5
5
|
declare function getProxyForPublicUsage<Obj extends Target>(obj: Obj, objName: 'pageContext' | 'globalContext' | 'prerenderContext' | 'vikeConfig', skipOnInternalProp?: true, fallback?: Fallback): Obj & {
|
|
6
6
|
_isProxyObject: true;
|
|
7
7
|
/** https://vike.dev/warning/internals */
|
|
8
|
-
|
|
8
|
+
dangerouslyUseInternals: DangerouslyUseInternals<Obj>;
|
|
9
9
|
};
|
|
10
10
|
/** https://vike.dev/warning/internals */
|
|
11
|
-
type
|
|
11
|
+
type DangerouslyUseInternals<Obj> = Obj;
|
|
@@ -17,9 +17,9 @@ function getProp(prop, obj, objName, skipOnInternalProp, fallback) {
|
|
|
17
17
|
const propStr = String(prop);
|
|
18
18
|
if (prop === '_isProxyObject')
|
|
19
19
|
return true;
|
|
20
|
+
if (prop === 'dangerouslyUseInternals')
|
|
21
|
+
return obj;
|
|
20
22
|
if (!skipOnInternalProp) {
|
|
21
|
-
if (prop === 'ignoreWarning')
|
|
22
|
-
return (prop) => getProp(prop, obj, objName, true, fallback);
|
|
23
23
|
if (!globalThis.__VIKE__IS_CLIENT)
|
|
24
24
|
onInternalProp(propStr, objName);
|
|
25
25
|
}
|
|
@@ -6,5 +6,5 @@ type GlobalContextPrepareMinimum = {
|
|
|
6
6
|
};
|
|
7
7
|
declare function prepareGlobalContextForPublicUsage<GlobalContext extends GlobalContextPrepareMinimum>(globalContext: GlobalContext): GlobalContext & {
|
|
8
8
|
_isProxyObject: true;
|
|
9
|
-
|
|
9
|
+
dangerouslyUseInternals: GlobalContext;
|
|
10
10
|
};
|
|
@@ -9,6 +9,6 @@ type PageContextPrepareMinimum = {
|
|
|
9
9
|
};
|
|
10
10
|
declare function preparePageContextForPublicUsage<PageContext extends PageContextPrepareMinimum>(pageContext: PageContext): PageContext & {
|
|
11
11
|
_isProxyObject: true;
|
|
12
|
-
|
|
12
|
+
dangerouslyUseInternals: PageContext;
|
|
13
13
|
};
|
|
14
14
|
declare function assertPropertyGetters(pageContext: Record<string, unknown>): void;
|
|
@@ -6,12 +6,13 @@ import type { GlobalContextServerInternal } from '../node/runtime/globalContext.
|
|
|
6
6
|
import type { GlobalContextClientInternalWithServerRouting } from '../client/runtime-server-routing/getGlobalContextClientInternal.js';
|
|
7
7
|
import type { GlobalContextBasePublic } from '../shared/createGlobalContextShared.js';
|
|
8
8
|
import type { GlobalContextClientInternal } from '../client/runtime-client-routing/getGlobalContextClientInternal.js';
|
|
9
|
-
import type { IgnoreWarning } from '../shared/getProxyForPublicUsage.js';
|
|
10
9
|
type GlobalContext = GlobalContextServer | GlobalContextClient;
|
|
11
|
-
type GlobalContextServer =
|
|
12
|
-
type GlobalContextClient = GlobalContextCommon & GlobalContextBasePublic & Pick<GlobalContextClientInternal, 'isClientSide'> & Vike.GlobalContext & Vike.GlobalContextClient & {};
|
|
13
|
-
type GlobalContextClientWithServerRouting = GlobalContextCommon & GlobalContextBasePublic & Pick<GlobalContextClientInternalWithServerRouting, 'isClientSide'> & Vike.GlobalContext & Vike.GlobalContextClient & {};
|
|
14
|
-
type GlobalContextCommon = {
|
|
10
|
+
type GlobalContextServer = Pick<GlobalContextServerInternal, 'assetsManifest' | 'config' | 'viteConfig' | 'viteConfigRuntime' | 'pages' | 'baseServer' | 'baseAssets' | 'isClientSide'> & {
|
|
15
11
|
/** https://vike.dev/warning/internals */
|
|
16
|
-
|
|
17
|
-
};
|
|
12
|
+
dangerouslyUseInternals: GlobalContextServerInternal;
|
|
13
|
+
} & Vike.GlobalContext & Vike.GlobalContextServer;
|
|
14
|
+
type GlobalContextClient = GlobalContextBasePublic & {
|
|
15
|
+
/** https://vike.dev/warning/internals */
|
|
16
|
+
dangerouslyUseInternals: GlobalContextClientInternal;
|
|
17
|
+
} & Pick<GlobalContextClientInternal, 'isClientSide'> & Vike.GlobalContext & Vike.GlobalContextClient & {};
|
|
18
|
+
type GlobalContextClientWithServerRouting = GlobalContextBasePublic & Pick<GlobalContextClientInternalWithServerRouting, 'isClientSide'> & Vike.GlobalContext & Vike.GlobalContextClient & {};
|
|
@@ -15,10 +15,18 @@ import type { From, PageContextConfig, Source, Sources } from '../shared/page-co
|
|
|
15
15
|
import type { Config } from './Config.js';
|
|
16
16
|
import type { AbortStatusCode } from '../shared/route/abort.js';
|
|
17
17
|
import type { GlobalContextClient, GlobalContextServer, GlobalContextClientWithServerRouting } from './GlobalContext.js';
|
|
18
|
-
import type {
|
|
19
|
-
type
|
|
18
|
+
import type { DangerouslyUseInternals } from '../shared/getProxyForPublicUsage.js';
|
|
19
|
+
import type { PageContextInternalServerAfterRender } from '../node/runtime/renderPage.js';
|
|
20
|
+
import type { PageContextInternalClientAfterRender } from '../client/runtime-client-routing/renderPageClientSide.js';
|
|
21
|
+
type PageContextServer<Data = unknown> = PageContextBuiltInServer<Data> & {
|
|
22
|
+
/** https://vike.dev/warning/internals */
|
|
23
|
+
dangerouslyUseInternals: DangerouslyUseInternals<PageContextInternalServer & PageContextInternalServerAfterRender>;
|
|
24
|
+
} & Vike.PageContext & Vike.PageContextServer;
|
|
20
25
|
type PageContext<Data = unknown> = PageContextClient<Data> | PageContextServer<Data>;
|
|
21
|
-
type PageContextClient<Data = unknown> = PageContextBuiltInClientWithClientRouting<Data> &
|
|
26
|
+
type PageContextClient<Data = unknown> = PageContextBuiltInClientWithClientRouting<Data> & {
|
|
27
|
+
/** https://vike.dev/warning/internals */
|
|
28
|
+
dangerouslyUseInternals: DangerouslyUseInternals<PageContextInternalClient_ClientRouting & PageContextInternalClientAfterRender>;
|
|
29
|
+
} & Vike.PageContext & Vike.PageContextClient;
|
|
22
30
|
type PageContextWithServerRouting<Data = unknown> = PageContextClientWithServerRouting<Data> | PageContextServer<Data>;
|
|
23
31
|
type PageContextClientWithServerRouting<Data = unknown> = PageContextBuiltInClientWithServerRouting<Data> & Vike.PageContext & Vike.PageContextClient;
|
|
24
32
|
type PageContextBuiltInCommon<Data> = PageContextConfig & {
|
|
@@ -128,8 +136,6 @@ type PageContextBuiltInCommon<Data> = PageContextConfig & {
|
|
|
128
136
|
* https://vike.dev/pageContext#isBaseMissing
|
|
129
137
|
*/
|
|
130
138
|
isBaseMissing?: true;
|
|
131
|
-
/** https://vike.dev/warning/internals */
|
|
132
|
-
ignoreWarning?: IgnoreWarning;
|
|
133
139
|
};
|
|
134
140
|
type PageContextBuiltInServer<Data> = PageContextBuiltInCommon<Data> & PageContextUrlServer & {
|
|
135
141
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.243-commit-
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.243-commit-743f6b8";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.243-commit-
|
|
2
|
+
export const PROJECT_VERSION = '0.4.243-commit-743f6b8';
|