vike 0.4.176-commit-03270e7 → 0.4.176-commit-1442a4a
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/configDefinitionsBuiltIn.js +1 -1
- package/dist/cjs/node/shared/assertV1Design.js +7 -9
- package/dist/cjs/utils/projectInfo.js +1 -1
- package/dist/esm/client/client-routing-runtime/setScrollPosition.d.ts +1 -1
- package/dist/esm/client/client-routing-runtime/setScrollPosition.js +2 -4
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js +1 -1
- package/dist/esm/node/shared/assertV1Design.js +7 -9
- package/dist/esm/utils/projectInfo.d.ts +2 -2
- package/dist/esm/utils/projectInfo.js +1 -1
- package/package.json +1 -1
|
@@ -115,7 +115,7 @@ const configDefinitionsBuiltIn = {
|
|
|
115
115
|
exports.configDefinitionsBuiltIn = configDefinitionsBuiltIn;
|
|
116
116
|
const configDefinitionsBuiltInGlobal = {
|
|
117
117
|
onPrerenderStart: {
|
|
118
|
-
env: { server: true, production: true }
|
|
118
|
+
env: { server: true, production: true, eager: true }
|
|
119
119
|
},
|
|
120
120
|
onBeforeRoute: {
|
|
121
121
|
env: { server: true, client: 'if-client-routing', eager: true }
|
|
@@ -10,15 +10,13 @@ function assertV1Design(pageConfigs, pageFilesAll) {
|
|
|
10
10
|
const indent = '- ';
|
|
11
11
|
if (typeof pageConfigs !== 'boolean') {
|
|
12
12
|
(0, utils_js_1.assert)(pageConfigs.length > 0);
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
lines.push(...['V1 design files:', ...filesV1]);
|
|
21
|
-
}
|
|
13
|
+
const filesV1 = (0, utils_js_1.unique)(pageConfigs
|
|
14
|
+
.map((p) => Object.values(p.configValueSources).map((sources) => sources
|
|
15
|
+
.map((c) => c.definedAtFilePath.filePathAbsoluteUserRootDir)
|
|
16
|
+
.filter(utils_js_1.isNotNullish)
|
|
17
|
+
.map((filePathToShowToUser) => indent + filePathToShowToUser)))
|
|
18
|
+
.flat(2));
|
|
19
|
+
lines.push(...['V1 design files:', ...filesV1]);
|
|
22
20
|
}
|
|
23
21
|
if (typeof pageFilesAll !== 'boolean') {
|
|
24
22
|
(0, utils_js_1.assert)(pageFilesAll.length > 0);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.PROJECT_VERSION = exports.projectInfo = void 0;
|
|
4
|
-
const PROJECT_VERSION = '0.4.176-commit-
|
|
4
|
+
const PROJECT_VERSION = '0.4.176-commit-1442a4a';
|
|
5
5
|
exports.PROJECT_VERSION = PROJECT_VERSION;
|
|
6
6
|
const projectInfo = {
|
|
7
7
|
projectName: 'Vike',
|
|
@@ -3,7 +3,7 @@ export { autoSaveScrollPosition };
|
|
|
3
3
|
export type { ScrollTarget };
|
|
4
4
|
import { type ScrollPosition } from './history.js';
|
|
5
5
|
type ScrollTarget = undefined | {
|
|
6
|
-
preserveScroll
|
|
6
|
+
preserveScroll: boolean;
|
|
7
7
|
} | ScrollPosition;
|
|
8
8
|
declare function setScrollPosition(scrollTarget: ScrollTarget): void;
|
|
9
9
|
declare function autoSaveScrollPosition(): void;
|
|
@@ -3,13 +3,11 @@ export { autoSaveScrollPosition };
|
|
|
3
3
|
import { assert, onPageHide, sleep, throttle } from './utils.js';
|
|
4
4
|
import { saveScrollPosition } from './history.js';
|
|
5
5
|
function setScrollPosition(scrollTarget) {
|
|
6
|
-
if (
|
|
7
|
-
scrollTarget = {};
|
|
8
|
-
if ('x' in scrollTarget) {
|
|
6
|
+
if (scrollTarget && 'x' in scrollTarget) {
|
|
9
7
|
setScroll(scrollTarget);
|
|
10
8
|
return;
|
|
11
9
|
}
|
|
12
|
-
if (scrollTarget
|
|
10
|
+
if (scrollTarget?.preserveScroll) {
|
|
13
11
|
return;
|
|
14
12
|
}
|
|
15
13
|
scrollToTopOrHash();
|
|
@@ -113,7 +113,7 @@ const configDefinitionsBuiltIn = {
|
|
|
113
113
|
};
|
|
114
114
|
const configDefinitionsBuiltInGlobal = {
|
|
115
115
|
onPrerenderStart: {
|
|
116
|
-
env: { server: true, production: true }
|
|
116
|
+
env: { server: true, production: true, eager: true }
|
|
117
117
|
},
|
|
118
118
|
onBeforeRoute: {
|
|
119
119
|
env: { server: true, client: 'if-client-routing', eager: true }
|
|
@@ -8,15 +8,13 @@ function assertV1Design(pageConfigs, pageFilesAll) {
|
|
|
8
8
|
const indent = '- ';
|
|
9
9
|
if (typeof pageConfigs !== 'boolean') {
|
|
10
10
|
assert(pageConfigs.length > 0);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
lines.push(...['V1 design files:', ...filesV1]);
|
|
19
|
-
}
|
|
11
|
+
const filesV1 = unique(pageConfigs
|
|
12
|
+
.map((p) => Object.values(p.configValueSources).map((sources) => sources
|
|
13
|
+
.map((c) => c.definedAtFilePath.filePathAbsoluteUserRootDir)
|
|
14
|
+
.filter(isNotNullish)
|
|
15
|
+
.map((filePathToShowToUser) => indent + filePathToShowToUser)))
|
|
16
|
+
.flat(2));
|
|
17
|
+
lines.push(...['V1 design files:', ...filesV1]);
|
|
20
18
|
}
|
|
21
19
|
if (typeof pageFilesAll !== 'boolean') {
|
|
22
20
|
assert(pageFilesAll.length > 0);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { projectInfo };
|
|
2
2
|
export { PROJECT_VERSION };
|
|
3
|
-
declare const PROJECT_VERSION: "0.4.176-commit-
|
|
3
|
+
declare const PROJECT_VERSION: "0.4.176-commit-1442a4a";
|
|
4
4
|
declare const projectInfo: {
|
|
5
5
|
projectName: "Vike";
|
|
6
|
-
projectVersion: "0.4.176-commit-
|
|
6
|
+
projectVersion: "0.4.176-commit-1442a4a";
|
|
7
7
|
};
|