vike 0.4.204-commit-7f41ba2 → 0.4.204-commit-9a97c22
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/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js +5 -1
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/client/client-routing-runtime/navigate.d.ts +2 -1
- package/dist/esm/client/client-routing-runtime/navigate.js +3 -2
- package/dist/esm/client/client-routing-runtime/renderPageClientSide.d.ts +1 -0
- package/dist/esm/client/client-routing-runtime/renderPageClientSide.js +3 -2
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js +5 -1
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/utils/projectInfo.d.ts +1 -1
- package/package.json +2 -2
package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js
CHANGED
|
@@ -291,7 +291,11 @@ async function getFileStats(filePathAbsolute) {
|
|
|
291
291
|
return stats;
|
|
292
292
|
}
|
|
293
293
|
async function runCmd1(cmd, cwd) {
|
|
294
|
-
const { stdout } = await execA(cmd, {
|
|
294
|
+
const { stdout } = await execA(cmd, {
|
|
295
|
+
cwd,
|
|
296
|
+
// https://github.com/vikejs/vike/issues/1982
|
|
297
|
+
maxBuffer: Infinity
|
|
298
|
+
});
|
|
295
299
|
/* Not always true: https://github.com/vikejs/vike/issues/1440#issuecomment-1892831303
|
|
296
300
|
assert(res.stderr === '')
|
|
297
301
|
*/
|
|
@@ -8,8 +8,9 @@ export { reload };
|
|
|
8
8
|
* @param keepScrollPosition - Don't scroll to the top of the page, instead keep the current scroll position.
|
|
9
9
|
* @param overwriteLastHistoryEntry - Don't create a new entry in the browser's history, instead let the new URL replace the current URL. (This effectively removes the current URL from the browser history).
|
|
10
10
|
*/
|
|
11
|
-
declare function navigate(url: string, { keepScrollPosition, overwriteLastHistoryEntry }?: {
|
|
11
|
+
declare function navigate(url: string, { keepScrollPosition, overwriteLastHistoryEntry, pageContext }?: {
|
|
12
12
|
keepScrollPosition?: boolean;
|
|
13
13
|
overwriteLastHistoryEntry?: boolean;
|
|
14
|
+
pageContext?: Record<string, unknown>;
|
|
14
15
|
}): Promise<void>;
|
|
15
16
|
declare function reload(): Promise<void>;
|
|
@@ -13,7 +13,7 @@ assertClientRouting();
|
|
|
13
13
|
* @param keepScrollPosition - Don't scroll to the top of the page, instead keep the current scroll position.
|
|
14
14
|
* @param overwriteLastHistoryEntry - Don't create a new entry in the browser's history, instead let the new URL replace the current URL. (This effectively removes the current URL from the browser history).
|
|
15
15
|
*/
|
|
16
|
-
async function navigate(url, { keepScrollPosition = false, overwriteLastHistoryEntry = false } = {}) {
|
|
16
|
+
async function navigate(url, { keepScrollPosition = false, overwriteLastHistoryEntry = false, pageContext } = {}) {
|
|
17
17
|
normalizeUrlArgument(url, 'navigate');
|
|
18
18
|
// If `hydrationCanBeAborted === false` (e.g. Vue) then we can apply navigate() only after hydration is done
|
|
19
19
|
await firstRenderStartPromise;
|
|
@@ -22,7 +22,8 @@ async function navigate(url, { keepScrollPosition = false, overwriteLastHistoryE
|
|
|
22
22
|
scrollTarget,
|
|
23
23
|
urlOriginal: url,
|
|
24
24
|
overwriteLastHistoryEntry,
|
|
25
|
-
isBackwardNavigation: false
|
|
25
|
+
isBackwardNavigation: false,
|
|
26
|
+
pageContextInitClient: pageContext
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
29
|
async function reload() {
|
|
@@ -14,6 +14,7 @@ type RenderArgs = {
|
|
|
14
14
|
redirectCount?: number;
|
|
15
15
|
doNotRenderIfSamePage?: boolean;
|
|
16
16
|
isClientSideNavigation?: boolean;
|
|
17
|
+
pageContextInitClient?: Record<string, unknown>;
|
|
17
18
|
};
|
|
18
19
|
declare function renderPageClientSide(renderArgs: RenderArgs): Promise<void>;
|
|
19
20
|
declare function disableClientRouting(err: unknown, log: boolean): void;
|
|
@@ -30,7 +30,7 @@ const globalObject = getGlobalObject('renderPageClientSide.ts', (() => {
|
|
|
30
30
|
})());
|
|
31
31
|
const { firstRenderStartPromise } = globalObject;
|
|
32
32
|
async function renderPageClientSide(renderArgs) {
|
|
33
|
-
const { urlOriginal = getCurrentUrl(), overwriteLastHistoryEntry = false, isBackwardNavigation, pageContextsFromRewrite = [], redirectCount = 0, doNotRenderIfSamePage, isClientSideNavigation = true } = renderArgs;
|
|
33
|
+
const { urlOriginal = getCurrentUrl(), overwriteLastHistoryEntry = false, isBackwardNavigation, pageContextsFromRewrite = [], redirectCount = 0, doNotRenderIfSamePage, isClientSideNavigation = true, pageContextInitClient } = renderArgs;
|
|
34
34
|
let { scrollTarget } = renderArgs;
|
|
35
35
|
const { previousPageContext } = globalObject;
|
|
36
36
|
addLinkPrefetchHandlers_unwatch();
|
|
@@ -218,7 +218,8 @@ async function renderPageClientSide(renderArgs) {
|
|
|
218
218
|
isBackwardNavigation,
|
|
219
219
|
isClientSideNavigation,
|
|
220
220
|
isHydration: isFirstRender && !isForErrorPage,
|
|
221
|
-
_previousPageContext: previousPageContext
|
|
221
|
+
_previousPageContext: previousPageContext,
|
|
222
|
+
...pageContextInitClient
|
|
222
223
|
});
|
|
223
224
|
{
|
|
224
225
|
const pageContextFromAllRewrites = getPageContextFromAllRewrites(pageContextsFromRewrite);
|
package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js
CHANGED
|
@@ -286,7 +286,11 @@ async function getFileStats(filePathAbsolute) {
|
|
|
286
286
|
return stats;
|
|
287
287
|
}
|
|
288
288
|
async function runCmd1(cmd, cwd) {
|
|
289
|
-
const { stdout } = await execA(cmd, {
|
|
289
|
+
const { stdout } = await execA(cmd, {
|
|
290
|
+
cwd,
|
|
291
|
+
// https://github.com/vikejs/vike/issues/1982
|
|
292
|
+
maxBuffer: Infinity
|
|
293
|
+
});
|
|
290
294
|
/* Not always true: https://github.com/vikejs/vike/issues/1440#issuecomment-1892831303
|
|
291
295
|
assert(res.stderr === '')
|
|
292
296
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.204-commit-
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.204-commit-9a97c22";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.204-commit-
|
|
2
|
+
export const PROJECT_VERSION = '0.4.204-commit-9a97c22';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vike",
|
|
3
|
-
"version": "0.4.204-commit-
|
|
3
|
+
"version": "0.4.204-commit-9a97c22",
|
|
4
4
|
"repository": "https://github.com/vikejs/vike",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./server": {
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"acorn": "^8.0.0",
|
|
130
130
|
"cac": "^6.0.0",
|
|
131
131
|
"es-module-lexer": "^1.0.0",
|
|
132
|
-
"esbuild": "^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0",
|
|
132
|
+
"esbuild": "^0.19.0 || ^0.20.0 || ^0.21.0 || ^0.22.0 || ^0.23.0 || ^0.24.0",
|
|
133
133
|
"fast-glob": "^3.0.0",
|
|
134
134
|
"semver": "^7.0.0",
|
|
135
135
|
"source-map-support": "^0.5.0"
|