vike 0.4.144-commit-6aef8a6 → 0.4.144-commit-f7ab002
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/buildConfig.js +2 -2
- package/dist/cjs/node/plugin/plugins/devConfig/determineOptimizeDeps.js +5 -5
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js +4 -3
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +29 -42
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigValuesAll.js +2 -2
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigs.js +13 -5
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/helpers.js +1 -14
- package/dist/cjs/node/plugin/plugins/previewConfig.js +6 -2
- package/dist/cjs/node/prerender/runPrerender.js +8 -8
- package/dist/cjs/node/runtime/html/serializePageContextClientSide.js +19 -6
- package/dist/cjs/node/runtime/renderPage/renderPageAlreadyRouted.js +2 -2
- package/dist/cjs/node/shared/getClientEntryFilePath.js +2 -2
- package/dist/cjs/shared/getPageFiles/analyzeClientSide.js +4 -6
- package/dist/cjs/shared/getPageFiles/getExports.js +3 -3
- package/dist/cjs/shared/hooks/getHook.js +1 -1
- package/dist/cjs/shared/page-configs/helpers/getConfigDefinedAtString.js +43 -0
- package/dist/cjs/shared/page-configs/helpers/getConfigValue.js +44 -0
- package/dist/cjs/shared/page-configs/helpers.js +33 -0
- package/dist/cjs/shared/page-configs/serialize/parseConfigValuesImported.js +6 -8
- package/dist/cjs/shared/page-configs/serialize/parsePageConfigs.js +2 -2
- package/dist/cjs/shared/page-configs/serialize/serializeConfigValue.js +2 -2
- package/dist/cjs/shared/route/loadPageRoutes.js +11 -10
- package/dist/cjs/utils/projectInfo.js +1 -1
- package/dist/esm/client/client-routing-runtime/getPageContext.js +1 -1
- package/dist/esm/node/plugin/plugins/buildConfig.js +1 -1
- package/dist/esm/node/plugin/plugins/devConfig/determineOptimizeDeps.js +5 -5
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.d.ts +2 -2
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js +4 -3
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +29 -42
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigValuesAll.js +1 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigs.js +14 -6
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/helpers.js +1 -14
- package/dist/esm/node/plugin/plugins/previewConfig.js +6 -2
- package/dist/esm/node/prerender/runPrerender.js +2 -2
- package/dist/esm/node/runtime/html/serializePageContextClientSide.js +20 -7
- package/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.js +1 -1
- package/dist/esm/node/shared/getClientEntryFilePath.js +1 -1
- package/dist/esm/shared/getPageFiles/analyzeClientSide.js +2 -4
- package/dist/esm/shared/getPageFiles/getExports.js +2 -2
- package/dist/esm/shared/hooks/getHook.js +1 -1
- package/dist/esm/shared/page-configs/PageConfig.d.ts +4 -12
- package/dist/esm/shared/page-configs/helpers/getConfigDefinedAtString.d.ts +7 -0
- package/dist/esm/shared/page-configs/helpers/getConfigDefinedAtString.js +37 -0
- package/dist/esm/shared/page-configs/helpers/getConfigValue.d.ts +14 -0
- package/dist/esm/shared/page-configs/helpers/getConfigValue.js +38 -0
- package/dist/esm/shared/page-configs/helpers.d.ts +13 -0
- package/dist/esm/shared/page-configs/helpers.js +27 -0
- package/dist/esm/shared/page-configs/serialize/parseConfigValuesImported.js +6 -8
- package/dist/esm/shared/page-configs/serialize/parsePageConfigs.js +2 -2
- package/dist/esm/shared/page-configs/serialize/serializeConfigValue.js +2 -2
- package/dist/esm/shared/route/loadPageRoutes.js +7 -6
- package/dist/esm/utils/projectInfo.d.ts +1 -1
- package/dist/esm/utils/projectInfo.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/shared/page-configs/utils.js +0 -96
- package/dist/esm/shared/page-configs/utils.d.ts +0 -35
- package/dist/esm/shared/page-configs/utils.js +0 -90
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getConfigValue = void 0;
|
|
7
|
+
const utils_js_1 = require("../../utils.js");
|
|
8
|
+
const picocolors_1 = __importDefault(require("@brillout/picocolors"));
|
|
9
|
+
const getConfigDefinedAtString_js_1 = require("./getConfigDefinedAtString.js");
|
|
10
|
+
// prettier-ignore
|
|
11
|
+
function getConfigValue(pageConfig, configName, type) {
|
|
12
|
+
const configValue = getConfigValueEntry(pageConfig, configName);
|
|
13
|
+
if (configValue === null)
|
|
14
|
+
return null;
|
|
15
|
+
const { value, definedAt } = configValue;
|
|
16
|
+
if (type)
|
|
17
|
+
assertConfigValueType(value, type, configName, definedAt);
|
|
18
|
+
return configValue;
|
|
19
|
+
}
|
|
20
|
+
exports.getConfigValue = getConfigValue;
|
|
21
|
+
function assertConfigValueType(value, type, configName, definedAt) {
|
|
22
|
+
(0, utils_js_1.assert)(value !== null);
|
|
23
|
+
const typeActual = typeof value;
|
|
24
|
+
if (typeActual === type)
|
|
25
|
+
return;
|
|
26
|
+
const valuePrintable = (0, utils_js_1.getValuePrintable)(value);
|
|
27
|
+
const problem = valuePrintable !== null
|
|
28
|
+
? `value ${picocolors_1.default.cyan(valuePrintable)}`
|
|
29
|
+
: `type ${picocolors_1.default.cyan(typeActual)}`;
|
|
30
|
+
const configDefinedAt = (0, getConfigDefinedAtString_js_1.getConfigDefinedAtString)('Config', configName, {
|
|
31
|
+
definedAt
|
|
32
|
+
});
|
|
33
|
+
const errMsg = `${configDefinedAt} has an invalid ${problem}: it should be a ${picocolors_1.default.cyan(type)} instead`;
|
|
34
|
+
(0, utils_js_1.assertUsage)(false, errMsg);
|
|
35
|
+
}
|
|
36
|
+
function getConfigValueEntry(pageConfig, configName) {
|
|
37
|
+
const configValue = pageConfig.configValues[configName];
|
|
38
|
+
if (!configValue)
|
|
39
|
+
return null;
|
|
40
|
+
// Enable users to suppress global config values by setting the local config value to null
|
|
41
|
+
if (configValue.value === null)
|
|
42
|
+
return null;
|
|
43
|
+
return configValue;
|
|
44
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getConfigValue = exports.getDefinedAtString = exports.getConfigDefinedAtString = exports.getHookFilePathToShowToUser = exports.getConfigValueFilePathToShowToUser = exports.getPageConfig = void 0;
|
|
4
|
+
var getConfigDefinedAtString_js_1 = require("./helpers/getConfigDefinedAtString.js");
|
|
5
|
+
Object.defineProperty(exports, "getConfigDefinedAtString", { enumerable: true, get: function () { return getConfigDefinedAtString_js_1.getConfigDefinedAtString; } });
|
|
6
|
+
Object.defineProperty(exports, "getDefinedAtString", { enumerable: true, get: function () { return getConfigDefinedAtString_js_1.getDefinedAtString; } });
|
|
7
|
+
var getConfigValue_js_1 = require("./helpers/getConfigValue.js");
|
|
8
|
+
Object.defineProperty(exports, "getConfigValue", { enumerable: true, get: function () { return getConfigValue_js_1.getConfigValue; } });
|
|
9
|
+
const utils_js_1 = require("../utils.js");
|
|
10
|
+
function getPageConfig(pageId, pageConfigs) {
|
|
11
|
+
const pageConfig = pageConfigs.find((p) => p.pageId === pageId);
|
|
12
|
+
(0, utils_js_1.assert)(pageConfigs.length > 0);
|
|
13
|
+
(0, utils_js_1.assert)(pageConfig);
|
|
14
|
+
return pageConfig;
|
|
15
|
+
}
|
|
16
|
+
exports.getPageConfig = getPageConfig;
|
|
17
|
+
function getConfigValueFilePathToShowToUser({ definedAt }) {
|
|
18
|
+
// A unique file path only exists if the config value isn't cumulative nor computed:
|
|
19
|
+
// - cumulative config values have multiple file paths
|
|
20
|
+
// - computed values don't have any file path
|
|
21
|
+
if ('isComputed' in definedAt || 'files' in definedAt)
|
|
22
|
+
return null;
|
|
23
|
+
const { filePathToShowToUser } = definedAt;
|
|
24
|
+
(0, utils_js_1.assert)(filePathToShowToUser);
|
|
25
|
+
return filePathToShowToUser;
|
|
26
|
+
}
|
|
27
|
+
exports.getConfigValueFilePathToShowToUser = getConfigValueFilePathToShowToUser;
|
|
28
|
+
function getHookFilePathToShowToUser({ definedAt }) {
|
|
29
|
+
const filePathToShowToUser = getConfigValueFilePathToShowToUser({ definedAt });
|
|
30
|
+
(0, utils_js_1.assert)(filePathToShowToUser);
|
|
31
|
+
return filePathToShowToUser;
|
|
32
|
+
}
|
|
33
|
+
exports.getHookFilePathToShowToUser = getHookFilePathToShowToUser;
|
|
@@ -13,14 +13,12 @@ function parseConfigValuesImported(configValuesImported) {
|
|
|
13
13
|
configValues[configName] = {
|
|
14
14
|
value,
|
|
15
15
|
definedAt: {
|
|
16
|
-
file
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
[exportName]
|
|
23
|
-
}
|
|
16
|
+
// importPath cannot be relative to the current file, since the current file is a virtual file
|
|
17
|
+
filePathToShowToUser: importPath,
|
|
18
|
+
fileExportPathToShowToUser: [configName, 'default'].includes(exportName)
|
|
19
|
+
? []
|
|
20
|
+
: // Side-effect config
|
|
21
|
+
[exportName]
|
|
24
22
|
}
|
|
25
23
|
};
|
|
26
24
|
assertIsNotNull(value, configName, importPath);
|
|
@@ -4,7 +4,7 @@ exports.parsePageConfigs = void 0;
|
|
|
4
4
|
const parse_1 = require("@brillout/json-serializer/parse");
|
|
5
5
|
const parseConfigValuesImported_js_1 = require("./parseConfigValuesImported.js");
|
|
6
6
|
const utils_js_1 = require("../../utils.js");
|
|
7
|
-
const
|
|
7
|
+
const helpers_js_1 = require("../helpers.js");
|
|
8
8
|
function parsePageConfigs(pageConfigsSerialized, pageConfigGlobalSerialized) {
|
|
9
9
|
const pageConfigs = pageConfigsSerialized.map((pageConfigSerialized) => {
|
|
10
10
|
const configValues = {};
|
|
@@ -52,7 +52,7 @@ function assertRouteConfigValue(configValues) {
|
|
|
52
52
|
return;
|
|
53
53
|
const { value } = configValue;
|
|
54
54
|
const configValueType = typeof value;
|
|
55
|
-
const configDefinedAt = (0,
|
|
55
|
+
const configDefinedAt = (0, helpers_js_1.getConfigDefinedAtString)('Config', configName, configValue);
|
|
56
56
|
(0, utils_js_1.assertUsage)(configValueType === 'string' || (0, utils_js_1.isCallable)(value), `${configDefinedAt} has an invalid type '${configValueType}': it should be a string or a function instead, see https://vike.dev/route`);
|
|
57
57
|
/* We don't use assertRouteString() in order to avoid unnecessarily bloating the client-side bundle when using Server Routing:
|
|
58
58
|
* - When using Server Routing, this file is loaded => loading assertRouteString() would bloat the client bundle.
|
|
@@ -28,9 +28,9 @@ exports.serializeConfigValue = serializeConfigValue;
|
|
|
28
28
|
function serializeConfigValueImported(configValueSource, configName, whitespace, varCounterContainer, importStatements) {
|
|
29
29
|
(0, utils_js_1.assert)(!configValueSource.valueIsFilePath);
|
|
30
30
|
(0, utils_js_1.assert)(whitespace.replaceAll(' ', '').length === 0);
|
|
31
|
-
const { valueIsImportedAtRuntime,
|
|
31
|
+
const { valueIsImportedAtRuntime, definedAt } = configValueSource;
|
|
32
32
|
(0, utils_js_1.assert)(valueIsImportedAtRuntime);
|
|
33
|
-
const { filePathAbsoluteVite, fileExportName } =
|
|
33
|
+
const { filePathAbsoluteVite, fileExportName } = definedAt;
|
|
34
34
|
(0, utils_js_1.assertPosixPath)(filePathAbsoluteVite);
|
|
35
35
|
const fileName = path_1.default.posix.basename(filePathAbsoluteVite);
|
|
36
36
|
const isValueFile = fileName.startsWith('+');
|
|
@@ -5,10 +5,10 @@ const error_page_js_1 = require("../error-page.js");
|
|
|
5
5
|
const utils_js_1 = require("./utils.js");
|
|
6
6
|
const deduceRouteStringFromFilesystemPath_js_1 = require("./deduceRouteStringFromFilesystemPath.js");
|
|
7
7
|
const utils_js_2 = require("../utils.js");
|
|
8
|
-
const
|
|
8
|
+
const helpers_js_1 = require("../page-configs/helpers.js");
|
|
9
9
|
const resolveRouteFunction_js_1 = require("./resolveRouteFunction.js");
|
|
10
10
|
async function loadPageRoutes(
|
|
11
|
-
//
|
|
11
|
+
// Remove all arguments and use GlobalContext instead?
|
|
12
12
|
pageFilesAll, pageConfigs, pageConfigGlobal, allPageIds) {
|
|
13
13
|
await Promise.all(pageFilesAll.filter((p) => p.fileType === '.page.route').map((p) => p.loadFile?.()));
|
|
14
14
|
const { onBeforeRouteHook, filesystemRoots } = getGlobalHooks(pageFilesAll, pageConfigs, pageConfigGlobal);
|
|
@@ -31,10 +31,10 @@ function getPageRoutes(filesystemRoots, pageFilesAll, pageConfigs, allPageIds) {
|
|
|
31
31
|
let pageRoute = null;
|
|
32
32
|
{
|
|
33
33
|
const configName = 'route';
|
|
34
|
-
const configValue = (0,
|
|
34
|
+
const configValue = (0, helpers_js_1.getConfigValue)(pageConfig, configName);
|
|
35
35
|
if (configValue) {
|
|
36
36
|
const route = configValue.value;
|
|
37
|
-
const definedAt = (0,
|
|
37
|
+
const definedAt = (0, helpers_js_1.getDefinedAtString)(configValue.definedAt, configName);
|
|
38
38
|
if (typeof route === 'string') {
|
|
39
39
|
pageRoute = {
|
|
40
40
|
pageId,
|
|
@@ -46,7 +46,7 @@ function getPageRoutes(filesystemRoots, pageFilesAll, pageConfigs, allPageIds) {
|
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
48
|
(0, utils_js_1.assert)((0, utils_js_2.isCallable)(route));
|
|
49
|
-
if ((0,
|
|
49
|
+
if ((0, helpers_js_1.getConfigValue)(pageConfig, 'iKnowThePerformanceRisksOfAsyncRouteFunctions', 'boolean'))
|
|
50
50
|
(0, resolveRouteFunction_js_1.warnDeprecatedAllowKey)();
|
|
51
51
|
pageRoute = {
|
|
52
52
|
pageId,
|
|
@@ -139,12 +139,13 @@ function getPageRoutes(filesystemRoots, pageFilesAll, pageConfigs, allPageIds) {
|
|
|
139
139
|
function getGlobalHooks(pageFilesAll, pageConfigs, pageConfigGlobal) {
|
|
140
140
|
// V1 Design
|
|
141
141
|
if (pageConfigs.length > 0) {
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
const hookName = 'onBeforeRoute';
|
|
143
|
+
if (pageConfigGlobal.configValues[hookName]?.value) {
|
|
144
|
+
const configValue = pageConfigGlobal.configValues[hookName];
|
|
144
145
|
const { value: hookFn } = configValue;
|
|
145
|
-
const hookFilePath = (0,
|
|
146
|
-
|
|
147
|
-
(0, utils_js_1.assertUsage)((0, utils_js_2.isCallable)(hookFn),
|
|
146
|
+
const hookFilePath = (0, helpers_js_1.getHookFilePathToShowToUser)(configValue);
|
|
147
|
+
const hookDefinedAt = (0, helpers_js_1.getConfigDefinedAtString)('Hook', hookName, configValue);
|
|
148
|
+
(0, utils_js_1.assertUsage)((0, utils_js_2.isCallable)(hookFn), `${hookDefinedAt} should be a function.`);
|
|
148
149
|
const onBeforeRouteHook = {
|
|
149
150
|
hookFilePath: hookFilePath,
|
|
150
151
|
onBeforeRoute: hookFn
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.projectInfo = void 0;
|
|
4
4
|
const assertSingleInstance_js_1 = require("./assertSingleInstance.js");
|
|
5
|
-
const PROJECT_VERSION = '0.4.144-commit-
|
|
5
|
+
const PROJECT_VERSION = '0.4.144-commit-f7ab002';
|
|
6
6
|
const projectInfo = {
|
|
7
7
|
projectName: 'Vike',
|
|
8
8
|
projectVersion: PROJECT_VERSION,
|
|
@@ -14,7 +14,7 @@ import { preparePageContextForUserConsumptionClientSide } from '../shared/prepar
|
|
|
14
14
|
import { loadPageFilesClientSide } from '../shared/loadPageFilesClientSide.js';
|
|
15
15
|
import { removeBuiltInOverrides } from './getPageContext/removeBuiltInOverrides.js';
|
|
16
16
|
import { getPageContextRequestUrl } from '../../shared/getPageContextRequestUrl.js';
|
|
17
|
-
import { getConfigValue, getPageConfig } from '../../shared/page-configs/
|
|
17
|
+
import { getConfigValue, getPageConfig } from '../../shared/page-configs/helpers.js';
|
|
18
18
|
import { assertOnBeforeRenderHookReturn } from '../../shared/assertOnBeforeRenderHookReturn.js';
|
|
19
19
|
import { executeGuardHook } from '../../shared/route/executeGuardHook.js';
|
|
20
20
|
import { AbortRender, isAbortPageContext } from '../../shared/route/abort.js';
|
|
@@ -4,7 +4,7 @@ export { analyzeClientEntries };
|
|
|
4
4
|
import { assert, resolveOutDir, isObject, viteIsSSR, getFilePathAbsolute, addOnBeforeLogHook, removeFileExtention, unique, assertPosixPath, assertUsage, getOutDirs } from '../utils.js';
|
|
5
5
|
import { virtualFileIdImportUserCodeServer } from '../../shared/virtual-files/virtualFileImportUserCode.js';
|
|
6
6
|
import { getVikeConfig } from './importUserCode/v1-design/getVikeConfig.js';
|
|
7
|
-
import { getConfigValue } from '../../../shared/page-configs/
|
|
7
|
+
import { getConfigValue } from '../../../shared/page-configs/helpers.js';
|
|
8
8
|
import { findPageFiles } from '../shared/findPageFiles.js';
|
|
9
9
|
import { getConfigVike } from '../../shared/getConfigVike.js';
|
|
10
10
|
import { getVirtualFileIdPageConfigValuesAll } from '../../shared/virtual-files/virtualFilePageConfigValuesAll.js';
|
|
@@ -34,18 +34,18 @@ async function getPageDeps(config, pageConfigs, isDev) {
|
|
|
34
34
|
configValueSourcesRelevant.forEach((configValueSource) => {
|
|
35
35
|
if (!configValueSource.valueIsImportedAtRuntime)
|
|
36
36
|
return;
|
|
37
|
-
const {
|
|
37
|
+
const { definedAt, configEnv } = configValueSource;
|
|
38
38
|
if (configEnv !== 'client-only' && configEnv !== 'server-and-client')
|
|
39
39
|
return;
|
|
40
|
-
if (
|
|
41
|
-
const { filePathAbsoluteFilesystem } =
|
|
40
|
+
if (definedAt.filePathRelativeToUserRootDir !== null) {
|
|
41
|
+
const { filePathAbsoluteFilesystem } = definedAt;
|
|
42
42
|
assert(filePathAbsoluteFilesystem);
|
|
43
43
|
// Surprisingly Vite expects entries to be absolute paths
|
|
44
44
|
entries.push(filePathAbsoluteFilesystem);
|
|
45
45
|
}
|
|
46
46
|
else {
|
|
47
|
-
// Adding
|
|
48
|
-
const { importPathAbsolute } =
|
|
47
|
+
// Adding definedAt.filePathAbsoluteFilesystem doesn't work for npm packages, I guess because of Vite's config.server.fs.allow
|
|
48
|
+
const { importPathAbsolute } = definedAt;
|
|
49
49
|
assert(importPathAbsolute);
|
|
50
50
|
// We need to differentiate between npm package imports and path aliases.
|
|
51
51
|
// There are path aliases that cannot be distinguished from npm package names.
|
|
@@ -4,7 +4,7 @@ export type { ConfigDefinition };
|
|
|
4
4
|
export type { ConfigDefinitionInternal };
|
|
5
5
|
export type { ConfigNameGlobal };
|
|
6
6
|
export type { ConfigEffect };
|
|
7
|
-
import type { ConfigEnvInternal, ConfigEnv, ConfigValueSources,
|
|
7
|
+
import type { ConfigEnvInternal, ConfigEnv, ConfigValueSources, DefinedAtFileFullInfo } from '../../../../../../shared/page-configs/PageConfig.js';
|
|
8
8
|
import type { Config, ConfigNameBuiltIn } from '../../../../../../shared/page-configs/Config.js';
|
|
9
9
|
/** The meta definition of a config.
|
|
10
10
|
*
|
|
@@ -46,7 +46,7 @@ type ConfigEffect = (config: {
|
|
|
46
46
|
type ConfigDefinitionInternal = Omit<ConfigDefinition, 'env'> & {
|
|
47
47
|
_computed?: (configValueSources: ConfigValueSources) => unknown;
|
|
48
48
|
_valueIsFilePath?: true;
|
|
49
|
-
_userEffectDefinedAt?:
|
|
49
|
+
_userEffectDefinedAt?: DefinedAtFileFullInfo;
|
|
50
50
|
env: ConfigEnvInternal;
|
|
51
51
|
};
|
|
52
52
|
type ConfigDefinitionsBuiltIn = Record<ConfigNameBuiltIn, ConfigDefinitionInternal>;
|
|
@@ -48,16 +48,17 @@ const configDefinitionsBuiltIn = {
|
|
|
48
48
|
_valueIsFilePath: true
|
|
49
49
|
},
|
|
50
50
|
clientRouting: {
|
|
51
|
-
|
|
51
|
+
// We could make it 'server-only' (we don't yet because of some legacy V0.4 design code)
|
|
52
|
+
env: 'server-and-client'
|
|
52
53
|
},
|
|
53
54
|
prerender: {
|
|
54
55
|
env: 'server-only'
|
|
55
56
|
},
|
|
56
57
|
hydrationCanBeAborted: {
|
|
57
|
-
env: 'client-only'
|
|
58
|
+
env: 'client-only'
|
|
58
59
|
},
|
|
59
60
|
prefetchStaticAssets: {
|
|
60
|
-
env: 'client-only'
|
|
61
|
+
env: 'client-only'
|
|
61
62
|
},
|
|
62
63
|
extends: {
|
|
63
64
|
env: 'config-only'
|
|
@@ -14,7 +14,7 @@ import { getViteDevServer } from '../../../../runtime/globalContext.js';
|
|
|
14
14
|
import { logConfigError, logConfigErrorRecover } from '../../../shared/loggerNotProd.js';
|
|
15
15
|
import { removeSuperfluousViteLog_enable, removeSuperfluousViteLog_disable } from '../../../shared/loggerVite/removeSuperfluousViteLog.js';
|
|
16
16
|
import pc from '@brillout/picocolors';
|
|
17
|
-
import { getConfigDefinedAtString } from '../../../../../shared/page-configs/
|
|
17
|
+
import { getConfigDefinedAtString } from '../../../../../shared/page-configs/helpers.js';
|
|
18
18
|
import { assertExportsOfConfigFile, assertExportsOfValueFile } from '../../../../../shared/page-configs/assertExports.js';
|
|
19
19
|
import { getConfigValueSerialized } from './getVirtualFilePageConfigs.js';
|
|
20
20
|
assertIsNotProductionRuntime();
|
|
@@ -329,7 +329,7 @@ function getGlobalConfigs(interfaceFilesByLocationId, userRootDir) {
|
|
|
329
329
|
assert('value' in configValueSource);
|
|
330
330
|
if (configName === 'prerender' && typeof configValueSource.value === 'boolean')
|
|
331
331
|
return;
|
|
332
|
-
const { filePathToShowToUser } = configValueSource.
|
|
332
|
+
const { filePathToShowToUser } = configValueSource.definedAt;
|
|
333
333
|
assertWarning(false, `Being able to define config ${pc.cyan(configName)} in ${filePathToShowToUser} is experimental and will likely be removed. Define the config ${pc.cyan(configName)} in Vike's Vite plugin options instead.`, { onlyOnce: true });
|
|
334
334
|
globalVikeConfig[configName] = configValueSource.value;
|
|
335
335
|
}
|
|
@@ -411,9 +411,14 @@ function makeOrderDeterministic(interfaceFile1, interfaceFile2) {
|
|
|
411
411
|
}
|
|
412
412
|
function warnOverridenConfigValues(interfaceFileWinner, interfaceFilesOverriden, configName, configDef, userRootDir) {
|
|
413
413
|
interfaceFilesOverriden.forEach((interfaceFileLoser) => {
|
|
414
|
+
const configValueSourceLoser_ = getConfigValueSource(configName, interfaceFileLoser, configDef, userRootDir);
|
|
414
415
|
const configValueSourceWinner = getConfigValueSource(configName, interfaceFileWinner, configDef, userRootDir);
|
|
415
|
-
|
|
416
|
-
|
|
416
|
+
// prettier-ignore
|
|
417
|
+
const configLoser_DefinedAt = getConfigDefinedAtString('Config', configName, configValueSourceLoser_);
|
|
418
|
+
// prettier-ignore
|
|
419
|
+
const configWinnerDefinedAt = getConfigDefinedAtString('config', configName, configValueSourceWinner);
|
|
420
|
+
const errMsg = `${configLoser_DefinedAt} is overriden by another ${configWinnerDefinedAt}, remove one of the two`;
|
|
421
|
+
assertWarning(false, errMsg, { onlyOnce: false });
|
|
417
422
|
});
|
|
418
423
|
}
|
|
419
424
|
function isInterfaceFileUserLand(interfaceFile) {
|
|
@@ -428,20 +433,20 @@ function getConfigValueSource(configName, interfaceFile, configDef, userRootDir)
|
|
|
428
433
|
fileExportPathToShowToUser: ['default', configName]
|
|
429
434
|
};
|
|
430
435
|
if (configDef._valueIsFilePath) {
|
|
431
|
-
let
|
|
436
|
+
let definedAt;
|
|
432
437
|
let valueFilePath;
|
|
433
438
|
if (interfaceFile.isConfigFile) {
|
|
434
439
|
const { configValue } = conf;
|
|
435
440
|
const import_ = resolveImport(configValue, interfaceFile.filePath, userRootDir, configEnv, configName);
|
|
436
|
-
const configDefinedAt =
|
|
441
|
+
const configDefinedAt = getConfigDefinedAtString('Config', configName, { definedAt: definedAtConfigFile });
|
|
437
442
|
assertUsage(import_, `${configDefinedAt} should be an import`);
|
|
438
443
|
valueFilePath = import_.filePathAbsoluteVite;
|
|
439
|
-
|
|
444
|
+
definedAt = import_;
|
|
440
445
|
}
|
|
441
446
|
else {
|
|
442
447
|
assert(interfaceFile.isValueFile);
|
|
443
448
|
valueFilePath = interfaceFile.filePath.filePathAbsoluteVite;
|
|
444
|
-
|
|
449
|
+
definedAt = {
|
|
445
450
|
...interfaceFile.filePath,
|
|
446
451
|
fileExportPathToShowToUser: []
|
|
447
452
|
};
|
|
@@ -451,7 +456,7 @@ function getConfigValueSource(configName, interfaceFile, configDef, userRootDir)
|
|
|
451
456
|
valueIsFilePath: true,
|
|
452
457
|
configEnv,
|
|
453
458
|
valueIsImportedAtRuntime: true,
|
|
454
|
-
|
|
459
|
+
definedAt
|
|
455
460
|
};
|
|
456
461
|
return configValueSource;
|
|
457
462
|
}
|
|
@@ -463,7 +468,7 @@ function getConfigValueSource(configName, interfaceFile, configDef, userRootDir)
|
|
|
463
468
|
const configValueSource = {
|
|
464
469
|
configEnv,
|
|
465
470
|
valueIsImportedAtRuntime: true,
|
|
466
|
-
|
|
471
|
+
definedAt: import_
|
|
467
472
|
};
|
|
468
473
|
return configValueSource;
|
|
469
474
|
}
|
|
@@ -472,7 +477,7 @@ function getConfigValueSource(configName, interfaceFile, configDef, userRootDir)
|
|
|
472
477
|
value: configValue,
|
|
473
478
|
configEnv,
|
|
474
479
|
valueIsImportedAtRuntime: false,
|
|
475
|
-
|
|
480
|
+
definedAt: definedAtConfigFile
|
|
476
481
|
};
|
|
477
482
|
return configValueSource;
|
|
478
483
|
}
|
|
@@ -482,7 +487,7 @@ function getConfigValueSource(configName, interfaceFile, configDef, userRootDir)
|
|
|
482
487
|
const configValueSource = {
|
|
483
488
|
configEnv,
|
|
484
489
|
valueIsImportedAtRuntime: !valueAlreadyLoaded,
|
|
485
|
-
|
|
490
|
+
definedAt: {
|
|
486
491
|
...interfaceFile.filePath,
|
|
487
492
|
fileExportPathToShowToUser: configName === interfaceFile.configName
|
|
488
493
|
? []
|
|
@@ -615,9 +620,7 @@ function getConfigDefinitions(interfaceFilesRelevant) {
|
|
|
615
620
|
if (!configMeta)
|
|
616
621
|
return;
|
|
617
622
|
const meta = configMeta.configValue;
|
|
618
|
-
assertMetaValue(meta,
|
|
619
|
-
// TODO: Maybe we should use the getConfigDefinedAtString() helper?
|
|
620
|
-
`Config ${pc.cyan('meta')} defined at ${interfaceFile.filePath.filePathToShowToUser}`);
|
|
623
|
+
assertMetaValue(meta, `Config ${pc.cyan('meta')} defined at ${interfaceFile.filePath.filePathToShowToUser}`);
|
|
621
624
|
// Set configDef._userEffectDefinedAt
|
|
622
625
|
Object.entries(meta).forEach(([configName, configDef]) => {
|
|
623
626
|
if (!configDef.effect)
|
|
@@ -705,7 +708,7 @@ function applyEffectsAll(configValueSources, configDefinitionsRelevant) {
|
|
|
705
708
|
// Call effect
|
|
706
709
|
const configModFromEffect = configDef.effect({
|
|
707
710
|
configValue: source.value,
|
|
708
|
-
configDefinedAt:
|
|
711
|
+
configDefinedAt: getConfigDefinedAtString('Config', configName, source)
|
|
709
712
|
});
|
|
710
713
|
if (!configModFromEffect)
|
|
711
714
|
return;
|
|
@@ -719,8 +722,8 @@ function applyEffect(configModFromEffect, configValueSources, configDefEffect) {
|
|
|
719
722
|
if (configName === 'meta') {
|
|
720
723
|
let configDefinedAtString;
|
|
721
724
|
if (configDefEffect._userEffectDefinedAt) {
|
|
722
|
-
configDefinedAtString =
|
|
723
|
-
|
|
725
|
+
configDefinedAtString = getConfigDefinedAtString('Config', configName, {
|
|
726
|
+
definedAt: configDefEffect._userEffectDefinedAt
|
|
724
727
|
});
|
|
725
728
|
}
|
|
726
729
|
else {
|
|
@@ -744,7 +747,7 @@ function applyEffect(configModFromEffect, configValueSources, configDefEffect) {
|
|
|
744
747
|
else {
|
|
745
748
|
assertUsage(false, notSupported);
|
|
746
749
|
// If we do end implementing being able to set the value of a config:
|
|
747
|
-
// - For setting
|
|
750
|
+
// - For setting definedAt: we could take the definedAt of the effect config while appending '(effect)' to definedAt.fileExportPathToShowToUser
|
|
748
751
|
}
|
|
749
752
|
});
|
|
750
753
|
}
|
|
@@ -874,8 +877,6 @@ async function loadExtendsConfigs(configFileExports, configFilePath, userRootDir
|
|
|
874
877
|
const extendsConfigFiles = [];
|
|
875
878
|
extendsImportData.map((importData) => {
|
|
876
879
|
const { importPath: importPath } = importData;
|
|
877
|
-
// TODO
|
|
878
|
-
// - validate extends configs
|
|
879
880
|
const filePathAbsoluteFilesystem = resolveImportPath(importData, configFilePath);
|
|
880
881
|
assertImportPath(filePathAbsoluteFilesystem, importData, configFilePath);
|
|
881
882
|
assertExtendsImportPath(importPath, filePathAbsoluteFilesystem, configFilePath);
|
|
@@ -1019,10 +1020,10 @@ function getFilesystemRoutingRootEffect(configFilesystemRoutingRoot, configName)
|
|
|
1019
1020
|
// Eagerly loaded since it's config-only
|
|
1020
1021
|
assert('value' in configFilesystemRoutingRoot);
|
|
1021
1022
|
const { value } = configFilesystemRoutingRoot;
|
|
1022
|
-
const configDefinedAt =
|
|
1023
|
+
const configDefinedAt = getConfigDefinedAtString('Config', configName, configFilesystemRoutingRoot);
|
|
1023
1024
|
assertUsage(typeof value === 'string', `${configDefinedAt} should be a string`);
|
|
1024
1025
|
assertUsage(value.startsWith('/'), `${configDefinedAt} is ${pc.cyan(value)} but it should start with a leading slash ${pc.cyan('/')}`);
|
|
1025
|
-
const { filePathRelativeToUserRootDir } = configFilesystemRoutingRoot.
|
|
1026
|
+
const { filePathRelativeToUserRootDir } = configFilesystemRoutingRoot.definedAt;
|
|
1026
1027
|
assert(filePathRelativeToUserRootDir);
|
|
1027
1028
|
const before = getFilesystemRouteString(getLocationId(filePathRelativeToUserRootDir));
|
|
1028
1029
|
const after = value;
|
|
@@ -1086,7 +1087,6 @@ function getConfigValues(configValueSources, configValuesComputed, configDefinit
|
|
|
1086
1087
|
configValues[configName] = {
|
|
1087
1088
|
value,
|
|
1088
1089
|
definedAt: {
|
|
1089
|
-
isCumulative: true,
|
|
1090
1090
|
files: sources.map((source) => getDefinedAtFile(source))
|
|
1091
1091
|
}
|
|
1092
1092
|
};
|
|
@@ -1096,21 +1096,19 @@ function getConfigValues(configValueSources, configValuesComputed, configDefinit
|
|
|
1096
1096
|
}
|
|
1097
1097
|
function getDefinedAtFile(configValueSource) {
|
|
1098
1098
|
return {
|
|
1099
|
-
filePathToShowToUser: configValueSource.
|
|
1100
|
-
fileExportPathToShowToUser: configValueSource.
|
|
1099
|
+
filePathToShowToUser: configValueSource.definedAt.filePathToShowToUser,
|
|
1100
|
+
fileExportPathToShowToUser: configValueSource.definedAt.fileExportPathToShowToUser
|
|
1101
1101
|
};
|
|
1102
1102
|
}
|
|
1103
1103
|
function getDefinedAt(configValueSource) {
|
|
1104
|
-
return
|
|
1105
|
-
file: getDefinedAtFile(configValueSource)
|
|
1106
|
-
};
|
|
1104
|
+
return getDefinedAtFile(configValueSource);
|
|
1107
1105
|
}
|
|
1108
1106
|
function mergeCumulative(configName, configValueSources) {
|
|
1109
1107
|
const valuesArr = [];
|
|
1110
1108
|
const valuesSet = [];
|
|
1111
1109
|
let configValueSourcePrevious = null;
|
|
1112
1110
|
configValueSources.forEach((configValueSource) => {
|
|
1113
|
-
const configDefinedAt =
|
|
1111
|
+
const configDefinedAt = getConfigDefinedAtString('Config', configName, configValueSource);
|
|
1114
1112
|
const configNameColored = pc.cyan(configName);
|
|
1115
1113
|
// We could, in principle, also support cumulative values to be defined in +${configName}.js but it ins't completely trivial to implement
|
|
1116
1114
|
assertUsage('value' in configValueSource, `${configDefinedAt} is only allowed to be defined in a +config.h.js file. (Because the values of ${configNameColored} are cumulative.)`);
|
|
@@ -1128,7 +1126,7 @@ function mergeCumulative(configName, configValueSources) {
|
|
|
1128
1126
|
if (vals2.length === 0)
|
|
1129
1127
|
return;
|
|
1130
1128
|
assert(configValueSourcePrevious);
|
|
1131
|
-
const configPreviousDefinedAt =
|
|
1129
|
+
const configPreviousDefinedAt = getConfigDefinedAtString('Config', configName, configValueSourcePrevious);
|
|
1132
1130
|
assertUsage(false, `${configDefinedAt} sets ${t1} but another ${configPreviousDefinedAt} sets ${t2} which is forbidden: the values must be all arrays or all sets (you cannot mix).`);
|
|
1133
1131
|
};
|
|
1134
1132
|
const { value } = configValueSource;
|
|
@@ -1159,14 +1157,3 @@ function mergeCumulative(configName, configValueSources) {
|
|
|
1159
1157
|
}
|
|
1160
1158
|
assert(false);
|
|
1161
1159
|
}
|
|
1162
|
-
// TODO: rename and/or refactor
|
|
1163
|
-
function getConfigSourceDefinedAtString(configName, { definedAtInfo }, sentenceBegin = true) {
|
|
1164
|
-
return getConfigDefinedAtString(configName, {
|
|
1165
|
-
definedAt: {
|
|
1166
|
-
file: {
|
|
1167
|
-
filePathToShowToUser: definedAtInfo.filePathToShowToUser,
|
|
1168
|
-
fileExportPathToShowToUser: definedAtInfo.fileExportPathToShowToUser
|
|
1169
|
-
}
|
|
1170
|
-
}
|
|
1171
|
-
}, sentenceBegin);
|
|
1172
|
-
}
|
package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigValuesAll.js
CHANGED
|
@@ -4,7 +4,7 @@ import { getVirtualFileIdPageConfigValuesAll, isVirtualFileIdPageConfigValuesAll
|
|
|
4
4
|
import { getVikeConfig } from './getVikeConfig.js';
|
|
5
5
|
import { extractAssetsAddQuery } from '../../../../shared/extractAssetsQuery.js';
|
|
6
6
|
import { debug } from './debug.js';
|
|
7
|
-
import { getConfigValue } from '../../../../../shared/page-configs/
|
|
7
|
+
import { getConfigValue } from '../../../../../shared/page-configs/helpers.js';
|
|
8
8
|
import { getConfigValueSourcesRelevant } from '../../../shared/getConfigValueSourcesRelevant.js';
|
|
9
9
|
import { isRuntimeEnvMatch } from './isRuntimeEnvMatch.js';
|
|
10
10
|
import { serializeConfigValueImported } from '../../../../../shared/page-configs/serialize/serializeConfigValue.js';
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export { getVirtualFilePageConfigs };
|
|
2
2
|
export { getConfigValueSerialized };
|
|
3
|
-
import { assert, assertUsage, getPropAccessNotation,
|
|
3
|
+
import { assert, assertUsage, getPropAccessNotation, objectEntries } from '../../../utils.js';
|
|
4
4
|
import { getVirtualFileIdPageConfigValuesAll } from '../../../../shared/virtual-files/virtualFilePageConfigValuesAll.js';
|
|
5
5
|
import { debug } from './debug.js';
|
|
6
|
-
import { stringify } from '@brillout/json-serializer/stringify';
|
|
6
|
+
import { isJsonSerializerError, stringify } from '@brillout/json-serializer/stringify';
|
|
7
7
|
import { getConfigEnv } from './helpers.js';
|
|
8
8
|
import pc from '@brillout/picocolors';
|
|
9
9
|
import { getVikeConfig } from './getVikeConfig.js';
|
|
10
10
|
import { isRuntimeEnvMatch } from './isRuntimeEnvMatch.js';
|
|
11
|
-
import { getConfigValueFilePathToShowToUser } from '../../../../../shared/page-configs/
|
|
11
|
+
import { getConfigValueFilePathToShowToUser } from '../../../../../shared/page-configs/helpers.js';
|
|
12
12
|
import { serializeConfigValue, serializeConfigValueImported } from '../../../../../shared/page-configs/serialize/serializeConfigValue.js';
|
|
13
13
|
async function getVirtualFilePageConfigs(userRootDir, outDirRoot, isForClientSide, isDev, id, configVike, isClientRouting) {
|
|
14
14
|
const { pageConfigs, pageConfigGlobal } = await getVikeConfig(userRootDir, outDirRoot, isDev, configVike.extensions, true);
|
|
@@ -105,15 +105,23 @@ function getConfigValueSerialized(value, configName, definedAt) {
|
|
|
105
105
|
const valueName = `config${getPropAccessNotation(configName)}`;
|
|
106
106
|
let configValueSerialized;
|
|
107
107
|
try {
|
|
108
|
-
configValueSerialized = stringify(value, { valueName });
|
|
108
|
+
configValueSerialized = stringify(value, { valueName, forbidReactElements: true });
|
|
109
109
|
}
|
|
110
110
|
catch (err) {
|
|
111
|
-
|
|
111
|
+
let serializationErrMsg = '';
|
|
112
|
+
if (isJsonSerializerError(err)) {
|
|
113
|
+
serializationErrMsg = err.messageCore;
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
console.error('Serialization error:');
|
|
117
|
+
console.error(err);
|
|
118
|
+
serializationErrMsg = 'see serialization error printed above';
|
|
119
|
+
}
|
|
112
120
|
const configValueFilePathToShowToUser = getConfigValueFilePathToShowToUser({ definedAt });
|
|
113
121
|
assert(configValueFilePathToShowToUser);
|
|
114
122
|
assertUsage(false, [
|
|
115
123
|
`The value of the config ${pc.cyan(configName)} cannot be defined inside the file ${configValueFilePathToShowToUser}:`,
|
|
116
|
-
`its value must be defined in an another file and then imported by ${configValueFilePathToShowToUser}. (Because
|
|
124
|
+
`its value must be defined in an another file and then imported by ${configValueFilePathToShowToUser}. (Because its value isn't serializable: ${serializationErrMsg}.)`,
|
|
117
125
|
`Only serializable config values can be defined inside +config.h.js files, see https://vike.dev/header-file.`
|
|
118
126
|
].join(' '));
|
|
119
127
|
}
|
|
@@ -6,20 +6,7 @@ function getConfigEnv(configValueSources, configName) {
|
|
|
6
6
|
const configValueSource = getConfigValueSource(configValueSources, configName);
|
|
7
7
|
if (!configValueSource)
|
|
8
8
|
return null;
|
|
9
|
-
|
|
10
|
-
return configValueSource.configEnv;
|
|
11
|
-
}
|
|
12
|
-
else {
|
|
13
|
-
// In case of effect/computed config values, there isn't any configValueSource
|
|
14
|
-
// TODO: make it work for custom config definitions
|
|
15
|
-
// - Ideally set configValueSource also for effect/computed config values?
|
|
16
|
-
assert(false, 'TODO');
|
|
17
|
-
/*
|
|
18
|
-
const configDef = configDefinitionsBuiltIn[configName as keyof typeof configDefinitionsBuiltIn]
|
|
19
|
-
if (!configDef) return null
|
|
20
|
-
return configDef.env
|
|
21
|
-
*/
|
|
22
|
-
}
|
|
9
|
+
return configValueSource.configEnv;
|
|
23
10
|
}
|
|
24
11
|
function isConfigSet(configValueSources, configName) {
|
|
25
12
|
const configValueSource = getConfigValueSource(configValueSources, configName);
|
|
@@ -26,9 +26,13 @@ function previewConfig() {
|
|
|
26
26
|
markEnvAsPreview();
|
|
27
27
|
return () => {
|
|
28
28
|
assertDist();
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
/* We don't use this condition (we wrongfully always use the SSR middleware) because of the regression introduced by https://github.com/vitejs/vite/pull/14756 which stops servering .html files when `appType: 'custom'`.
|
|
30
|
+
if (!configVike.prerender || configVike.prerender.partial) {
|
|
31
|
+
addSsrMiddleware(server.middlewares)
|
|
31
32
|
}
|
|
33
|
+
/*/
|
|
34
|
+
addSsrMiddleware(server.middlewares);
|
|
35
|
+
//*/
|
|
32
36
|
addStatic404Middleware(server.middlewares);
|
|
33
37
|
};
|
|
34
38
|
}
|
|
@@ -16,7 +16,7 @@ import { getConfigVike } from '../shared/getConfigVike.js';
|
|
|
16
16
|
import { getPageFilesServerSide } from '../../shared/getPageFiles.js';
|
|
17
17
|
import { getPageContextRequestUrl } from '../../shared/getPageContextRequestUrl.js';
|
|
18
18
|
import { getUrlFromRouteString } from '../../shared/route/resolveRouteString.js';
|
|
19
|
-
import { getConfigValue, getConfigValueFilePathToShowToUser, getHookFilePathToShowToUser } from '../../shared/page-configs/
|
|
19
|
+
import { getConfigValue, getConfigValueFilePathToShowToUser, getHookFilePathToShowToUser } from '../../shared/page-configs/helpers.js';
|
|
20
20
|
import { loadConfigValues } from '../../shared/page-configs/loadConfigValues.js';
|
|
21
21
|
import { isErrorPage } from '../../shared/error-page.js';
|
|
22
22
|
import { addUrlComputedProps } from '../../shared/addUrlComputedProps.js';
|
|
@@ -285,7 +285,7 @@ async function callOnPrerenderStartHook(prerenderContext, renderContext) {
|
|
|
285
285
|
const configValue = pageConfigGlobal.configValues.onPrerenderStart;
|
|
286
286
|
if (configValue?.value) {
|
|
287
287
|
const { value: hookFn } = configValue;
|
|
288
|
-
// config.onPrerenderStart isn't a computed nor a cumulative config =>
|
|
288
|
+
// config.onPrerenderStart isn't a computed nor a cumulative config => definedAt should always be defined
|
|
289
289
|
const hookFilePath = getHookFilePathToShowToUser(configValue);
|
|
290
290
|
assert(hookFilePath);
|
|
291
291
|
onPrerenderStartHook = {
|