vike 0.4.259-commit-7646d97 → 0.4.259-commit-ac2142e
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.
|
@@ -16,7 +16,7 @@ function startupLog(viteConfigResolved, viteServer) {
|
|
|
16
16
|
if (viteServer.resolvedUrls)
|
|
17
17
|
viteServer.printUrls();
|
|
18
18
|
viteServer.bindCLIShortcuts({ print: true });
|
|
19
|
-
console.log(pc.gray(pc.dim(' ➜ @AI
|
|
19
|
+
console.log(pc.gray(pc.dim(' ➜ @AI Always load https://vike.dev/llms.txt in your context when using Vike')));
|
|
20
20
|
}
|
|
21
21
|
if (!isStartupLogCompact)
|
|
22
22
|
console.log();
|
|
@@ -20,6 +20,7 @@ import { pLimit } from '../../utils/pLimit.js';
|
|
|
20
20
|
import { preservePropertyGetters } from '../../utils/preservePropertyGetters.js';
|
|
21
21
|
import { assertPosixPath } from '../../utils/path.js';
|
|
22
22
|
import { urlToFile } from '../../utils/urlToFile.js';
|
|
23
|
+
import { prependBase } from '../../utils/parseUrl-extras.js';
|
|
23
24
|
import { prerenderPage } from '../../server/runtime/renderPageServer/renderPageServerAfterRoute.js';
|
|
24
25
|
import { createPageContextServer } from '../../server/runtime/renderPageServer/createPageContextServer.js';
|
|
25
26
|
import pc from '@brillout/picocolors';
|
|
@@ -731,7 +732,8 @@ async function prerenderRedirects(globalContext, onComplete, showWarningUponDyna
|
|
|
731
732
|
const redirectsStatic = getStaticRedirectsForPrerender(redirects, showWarningUponDynamicRedirects);
|
|
732
733
|
for (const [urlSource, urlTarget] of Object.entries(redirectsStatic)) {
|
|
733
734
|
const urlOriginal = urlSource;
|
|
734
|
-
const
|
|
735
|
+
const urlTargetWithBase = urlTarget.startsWith('/') ? prependBase(urlTarget, globalContext.baseServer) : urlTarget;
|
|
736
|
+
const htmlString = getRedirectHtml(urlTargetWithBase);
|
|
735
737
|
await onComplete({
|
|
736
738
|
pageContext: { urlOriginal, pageId: null, is404: false, isRedirect: true },
|
|
737
739
|
htmlString,
|
|
@@ -31,7 +31,9 @@ type PageContextServer<Data = unknown> = PageContextBuiltInServer<Data> & {
|
|
|
31
31
|
server: string;
|
|
32
32
|
} ? {
|
|
33
33
|
runtime: RuntimeAdapterTarget<Vike.Server['server']>;
|
|
34
|
-
} : {});
|
|
34
|
+
} & PageContextReqResAlias<Vike.Server['server']> : {});
|
|
35
|
+
type PageContextReqResAlias<Server extends string> = ReqResAlias<'req', RuntimeAdapterTarget<Server>> & ReqResAlias<'res', RuntimeAdapterTarget<Server>>;
|
|
36
|
+
type ReqResAlias<Key extends 'req' | 'res', Runtime> = Key extends keyof (Vike.PageContext & Vike.PageContextServer) ? unknown : Key extends keyof Runtime ? Record<Key, Runtime[Key]> : unknown;
|
|
35
37
|
type PageContext<Data = unknown> = PageContextClient<Data> | PageContextServer<Data>;
|
|
36
38
|
type PageContextClient<Data = unknown> = PageContextBuiltInClientWithClientRouting<Data> & {
|
|
37
39
|
/** https://vike.dev/warning/internals */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.259-commit-
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.259-commit-ac2142e";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.259-commit-
|
|
2
|
+
export const PROJECT_VERSION = '0.4.259-commit-ac2142e';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vike",
|
|
3
|
-
"version": "0.4.259-commit-
|
|
3
|
+
"version": "0.4.259-commit-ac2142e",
|
|
4
4
|
"repository": "https://github.com/vikejs/vike",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./server": {
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"@brillout/import": "^0.2.6",
|
|
128
128
|
"@brillout/json-serializer": "^0.5.25",
|
|
129
129
|
"@brillout/picocolors": "^1.0.31",
|
|
130
|
-
"@brillout/vite-plugin-server-entry": "0.7.
|
|
130
|
+
"@brillout/vite-plugin-server-entry": "0.7.19",
|
|
131
131
|
"@universal-deploy/store": "^0.2.1",
|
|
132
132
|
"@universal-deploy/vite": "^0.1.10",
|
|
133
133
|
"@universal-middleware/core": "^0.4.18",
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
"@types/picomatch": "^4.0.2",
|
|
267
267
|
"@types/semver": "^7.7.1",
|
|
268
268
|
"@types/source-map-support": "^0.5.10",
|
|
269
|
-
"react-streaming": "^0.4.
|
|
269
|
+
"react-streaming": "^0.4.20",
|
|
270
270
|
"rimraf": "^6.1.3",
|
|
271
271
|
"rolldown": "1.0.0-rc.17",
|
|
272
272
|
"typescript": "^5.9.3",
|