vike 0.4.160 → 0.4.161-commit-ba539a4
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/cli/bin.js +5 -0
- package/dist/cjs/node/client/router.js +4 -2
- package/dist/cjs/node/plugin/plugins/autoFullBuild.js +2 -2
- package/dist/cjs/node/plugin/plugins/buildConfig/fixServerAssets.js +148 -0
- package/dist/cjs/node/plugin/plugins/buildConfig.js +61 -35
- package/dist/cjs/node/plugin/plugins/commonConfig.js +5 -13
- package/dist/cjs/node/plugin/plugins/config/stemUtils.js +1 -1
- package/dist/cjs/node/plugin/plugins/distFileNames.js +9 -1
- package/dist/cjs/node/plugin/plugins/extractAssetsPlugin.js +7 -2
- package/dist/cjs/node/plugin/plugins/importBuild/index.js +4 -7
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js +1 -5
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/filesystemRouting.js +28 -46
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/{loadFileConfigEnv.js → loadFileAtConfigTime.js} +5 -5
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveFilePath.js +33 -0
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveImportPath.js +2 -2
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/{transformImports.js → transformFileImports.js} +7 -7
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js +21 -27
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +155 -111
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigValuesAll.js +2 -1
- package/dist/cjs/node/plugin/utils.js +3 -2
- package/dist/cjs/node/prerender/runPrerender.js +12 -5
- package/dist/cjs/node/runtime/globalContext.js +7 -4
- package/dist/cjs/node/runtime/html/injectAssets/getHtmlTags.js +2 -2
- package/dist/cjs/node/runtime/html/renderHtml.js +1 -1
- package/dist/cjs/node/runtime/html/stream.js +2 -2
- package/dist/cjs/node/runtime/renderPage/analyzePage.js +2 -2
- package/dist/cjs/node/runtime/renderPage/executeOnRenderHtmlHook.js +2 -2
- package/dist/cjs/node/runtime/renderPage/getHttpResponseBody.js +39 -39
- package/dist/cjs/node/runtime/renderPage/getPageAssets/assertClientEntryId.js +0 -5
- package/dist/cjs/node/runtime/renderPage/getPageAssets/getManifestEntry.js +8 -7
- package/dist/cjs/node/runtime/renderPage/getPageAssets.js +15 -19
- package/dist/cjs/node/runtime/renderPage/loadUserFilesServerSide.js +1 -1
- package/dist/cjs/node/runtime/renderPage/{logHintForCjsEsmError.js → logErrorHint.js} +81 -43
- package/dist/cjs/node/runtime/renderPage/loggerProd.js +3 -3
- package/dist/cjs/node/runtime/utils.js +1 -1
- package/dist/cjs/node/shared/{getClientEntryFilePath.js → getClientEntry.js} +3 -3
- package/dist/cjs/node/shared/prependEntriesDir.js +13 -0
- package/dist/cjs/shared/page-configs/serialize/parseConfigValuesImported.js +53 -26
- package/dist/cjs/shared/route/executeGuardHook.js +3 -2
- package/dist/cjs/shared/utils.js +0 -1
- package/dist/cjs/utils/assertNodeVersion.js +2 -2
- package/dist/cjs/utils/{findUserPackageJsonPath.js → findFile.js} +11 -8
- package/dist/cjs/utils/isVersionOrAbove.js +29 -0
- package/dist/cjs/utils/nodeEnv.js +23 -1
- package/dist/cjs/utils/objectKeys.js +19 -3
- package/dist/cjs/utils/projectInfo.js +1 -1
- package/dist/cjs/utils/sorter.js +62 -1
- package/dist/esm/client/client-routing-runtime/index.d.ts +1 -1
- package/dist/esm/client/client-routing-runtime/index.js +1 -1
- package/dist/esm/node/cli/bin.js +3 -1
- package/dist/esm/node/client/router.d.ts +2 -0
- package/dist/esm/node/client/router.js +3 -1
- package/dist/esm/node/plugin/plugins/autoFullBuild.js +2 -2
- package/dist/esm/node/plugin/plugins/buildConfig/fixServerAssets.d.ts +13 -0
- package/dist/esm/node/plugin/plugins/buildConfig/fixServerAssets.js +142 -0
- package/dist/esm/node/plugin/plugins/buildConfig.d.ts +2 -0
- package/dist/esm/node/plugin/plugins/buildConfig.js +60 -34
- package/dist/esm/node/plugin/plugins/commonConfig.js +6 -14
- package/dist/esm/node/plugin/plugins/config/stemUtils.js +2 -2
- package/dist/esm/node/plugin/plugins/distFileNames.js +9 -1
- package/dist/esm/node/plugin/plugins/extractAssetsPlugin.js +8 -3
- package/dist/esm/node/plugin/plugins/importBuild/index.d.ts +6 -1
- package/dist/esm/node/plugin/plugins/importBuild/index.js +4 -7
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.d.ts +2 -0
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.d.ts +0 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/crawlPlusFiles.js +1 -5
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/filesystemRouting.d.ts +39 -12
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/filesystemRouting.js +29 -47
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/{loadFileConfigEnv.js → loadFileAtConfigTime.js} +4 -4
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveFilePath.d.ts +5 -0
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveFilePath.js +27 -0
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveImportPath.d.ts +1 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/resolveImportPath.js +1 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/{transformImports.d.ts → transformFileImports.d.ts} +2 -2
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/{transformImports.js → transformFileImports.js} +6 -6
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.d.ts +1 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js +20 -26
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.d.ts +4 -0
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +153 -109
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVirtualFilePageConfigValuesAll.js +2 -1
- package/dist/esm/node/plugin/utils.d.ts +3 -2
- package/dist/esm/node/plugin/utils.js +3 -2
- package/dist/esm/node/prerender/runPrerender.js +13 -6
- package/dist/esm/node/runtime/globalContext.js +8 -5
- package/dist/esm/node/runtime/html/injectAssets/getHtmlTags.js +2 -2
- package/dist/esm/node/runtime/html/renderHtml.js +1 -1
- package/dist/esm/node/runtime/html/stream.js +2 -2
- package/dist/esm/node/runtime/renderPage/analyzePage.js +2 -2
- package/dist/esm/node/runtime/renderPage/executeOnRenderHtmlHook.js +2 -2
- package/dist/esm/node/runtime/renderPage/getHttpResponseBody.d.ts +6 -5
- package/dist/esm/node/runtime/renderPage/getHttpResponseBody.js +39 -39
- package/dist/esm/node/runtime/renderPage/getPageAssets/assertClientEntryId.js +0 -5
- package/dist/esm/node/runtime/renderPage/getPageAssets/getManifestEntry.js +8 -7
- package/dist/esm/node/runtime/renderPage/getPageAssets.js +16 -20
- package/dist/esm/node/runtime/renderPage/loadUserFilesServerSide.js +1 -1
- package/dist/esm/node/runtime/renderPage/logErrorHint.d.ts +8 -0
- package/dist/esm/node/runtime/renderPage/{logHintForCjsEsmError.js → logErrorHint.js} +80 -42
- package/dist/esm/node/runtime/renderPage/loggerProd.js +3 -3
- package/dist/esm/node/runtime/utils.d.ts +1 -1
- package/dist/esm/node/runtime/utils.js +1 -1
- package/dist/esm/node/shared/ViteManifest.d.ts +1 -0
- package/dist/esm/node/shared/getClientEntry.d.ts +3 -0
- package/dist/esm/node/shared/{getClientEntryFilePath.js → getClientEntry.js} +2 -2
- package/dist/esm/node/shared/prependEntriesDir.d.ts +2 -0
- package/dist/esm/node/shared/prependEntriesDir.js +10 -0
- package/dist/esm/shared/page-configs/Config.d.ts +1 -1
- package/dist/esm/shared/page-configs/PageConfig.d.ts +2 -0
- package/dist/esm/shared/page-configs/serialize/parseConfigValuesImported.js +53 -26
- package/dist/esm/shared/route/executeGuardHook.js +3 -2
- package/dist/esm/shared/utils.d.ts +0 -1
- package/dist/esm/shared/utils.js +0 -1
- package/dist/esm/utils/assertNodeVersion.js +2 -2
- package/dist/esm/utils/findFile.d.ts +3 -0
- package/dist/esm/utils/findFile.js +21 -0
- package/dist/esm/utils/getOutDirs.d.ts +1 -0
- package/dist/esm/utils/isVersionOrAbove.d.ts +2 -0
- package/dist/esm/utils/isVersionOrAbove.js +26 -0
- package/dist/esm/utils/nodeEnv.d.ts +4 -0
- package/dist/esm/utils/nodeEnv.js +19 -0
- package/dist/esm/utils/objectKeys.d.ts +10 -1
- package/dist/esm/utils/objectKeys.js +20 -3
- package/dist/esm/utils/projectInfo.d.ts +2 -2
- package/dist/esm/utils/projectInfo.js +1 -1
- package/dist/esm/utils/sorter.d.ts +59 -0
- package/dist/esm/utils/sorter.js +61 -0
- package/package.json +2 -2
- package/dist/cjs/utils/objectEntries.js +0 -8
- package/dist/esm/node/runtime/renderPage/logHintForCjsEsmError.d.ts +0 -13
- package/dist/esm/node/shared/getClientEntryFilePath.d.ts +0 -3
- package/dist/esm/utils/findUserPackageJsonPath.d.ts +0 -2
- package/dist/esm/utils/findUserPackageJsonPath.js +0 -18
- package/dist/esm/utils/objectEntries.d.ts +0 -4
- package/dist/esm/utils/objectEntries.js +0 -5
- /package/dist/cjs/node/runtime/renderPage/{logHintForCjsEsmError → logErrorHint}/errors.js +0 -0
- /package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/{loadFileConfigEnv.d.ts → loadFileAtConfigTime.d.ts} +0 -0
- /package/dist/esm/node/runtime/renderPage/{logHintForCjsEsmError → logErrorHint}/errors.d.ts +0 -0
- /package/dist/esm/node/runtime/renderPage/{logHintForCjsEsmError → logErrorHint}/errors.js +0 -0
|
@@ -4,11 +4,11 @@ import { analyzePageClientSide } from '../../../shared/getPageFiles/analyzePageC
|
|
|
4
4
|
import { getVirtualFileIdPageConfigValuesAll } from '../../shared/virtual-files/virtualFilePageConfigValuesAll.js';
|
|
5
5
|
import { analyzeClientSide } from '../../../shared/getPageFiles/analyzeClientSide.js';
|
|
6
6
|
import { getGlobalContext } from '../globalContext.js';
|
|
7
|
-
import {
|
|
7
|
+
import { getClientEntry } from '../../shared/getClientEntry.js';
|
|
8
8
|
function analyzePage(pageFilesAll, pageConfig, pageId) {
|
|
9
9
|
if (pageConfig) {
|
|
10
10
|
const { isClientSideRenderable, isClientRouting } = analyzeClientSide(pageConfig, pageFilesAll, pageId);
|
|
11
|
-
const clientFilePath =
|
|
11
|
+
const clientFilePath = getClientEntry(pageConfig);
|
|
12
12
|
const clientEntry = !isClientSideRenderable ? clientFilePath : getVikeClientEntry(isClientRouting);
|
|
13
13
|
const clientDependencies = [];
|
|
14
14
|
clientDependencies.push({
|
|
@@ -119,11 +119,11 @@ function processHookReturnValue(hookReturnValue, renderHook) {
|
|
|
119
119
|
const val = hookReturnValue.pageContext;
|
|
120
120
|
const errBegin = `${errPrefix} returned ${pc.cyan('{ pageContext }')}, but ${pc.cyan('pageContext')}`;
|
|
121
121
|
if (isPromise(val) || isCallable(val)) {
|
|
122
|
-
assertWarning(!isPromise(val), `${errBegin} is a promise which is deprecated in favor of async functions, see https://vike.dev/
|
|
122
|
+
assertWarning(!isPromise(val), `${errBegin} is a promise which is deprecated in favor of async functions, see https://vike.dev/streaming#initial-data-after-stream-end`, { onlyOnce: true });
|
|
123
123
|
pageContextPromise = val;
|
|
124
124
|
}
|
|
125
125
|
else {
|
|
126
|
-
assertUsage(isObject(val), `${errBegin} should be an object or an async function, see https://vike.dev/
|
|
126
|
+
assertUsage(isObject(val), `${errBegin} should be an object or an async function, see https://vike.dev/streaming#initial-data-after-stream-end`);
|
|
127
127
|
assertPageContextProvidedByUser(val, renderHook);
|
|
128
128
|
pageContextProvidedByRenderHook = val;
|
|
129
129
|
}
|
|
@@ -7,9 +7,10 @@ import { type HtmlRender } from '../html/renderHtml.js';
|
|
|
7
7
|
import type { RenderHook } from './executeOnRenderHtmlHook.js';
|
|
8
8
|
type HttpResponseBody = {
|
|
9
9
|
body: string;
|
|
10
|
-
getBody: () => Promise<string>;
|
|
11
|
-
getReadableWebStream: () => StreamReadableWeb;
|
|
12
10
|
pipe: (writable: StreamWritableWeb | StreamWritableNode) => void;
|
|
11
|
+
getReadableWebStream: () => StreamReadableWeb;
|
|
12
|
+
getReadableNodeStream: () => Promise<StreamReadableNode>;
|
|
13
|
+
getBody: () => Promise<string>;
|
|
13
14
|
/** @deprecated */
|
|
14
15
|
getNodeStream: () => Promise<StreamReadableNode>;
|
|
15
16
|
/** @deprecated */
|
|
@@ -21,12 +22,12 @@ type HttpResponseBody = {
|
|
|
21
22
|
};
|
|
22
23
|
declare function getHttpResponseBody(htmlRender: HtmlRender, renderHook: null | RenderHook): string;
|
|
23
24
|
declare function getHttpResponseBodyStreamHandlers(htmlRender: HtmlRender, renderHook: null | RenderHook): {
|
|
25
|
+
pipe(writable: StreamWritableNode | StreamWritableWeb): void;
|
|
26
|
+
getReadableWebStream(): StreamReadableWeb;
|
|
27
|
+
getReadableNodeStream(): Promise<import("stream").Readable>;
|
|
24
28
|
getBody(): Promise<string>;
|
|
25
29
|
getNodeStream(): Promise<import("stream").Readable>;
|
|
26
30
|
getWebStream(): StreamReadableWeb;
|
|
27
|
-
getReadableNodeStream(): Promise<import("stream").Readable>;
|
|
28
|
-
getReadableWebStream(): StreamReadableWeb;
|
|
29
31
|
pipeToWebWritable(writable: StreamWritableWeb): void;
|
|
30
32
|
pipeToNodeWritable(writable: StreamWritableNode): void;
|
|
31
|
-
pipe(writable: StreamWritableNode | StreamWritableWeb): void;
|
|
32
33
|
};
|
|
@@ -4,7 +4,7 @@ import { isStream, getStreamName, inferStreamName, isStreamWritableWeb, isStream
|
|
|
4
4
|
import { assert, assertUsage, assertWarning } from '../utils.js';
|
|
5
5
|
import { getHtmlString } from '../html/renderHtml.js';
|
|
6
6
|
import pc from '@brillout/picocolors';
|
|
7
|
-
const streamDocs = 'See https://vike.dev/
|
|
7
|
+
const streamDocs = 'See https://vike.dev/streaming for more information.';
|
|
8
8
|
function getHttpResponseBody(htmlRender, renderHook) {
|
|
9
9
|
if (typeof htmlRender !== 'string') {
|
|
10
10
|
assertUsage(false, getErrMsg(htmlRender, renderHook, 'body', `Use ${pc.cyan('pageContext.httpResponse.pipe()')} instead`));
|
|
@@ -14,6 +14,44 @@ function getHttpResponseBody(htmlRender, renderHook) {
|
|
|
14
14
|
}
|
|
15
15
|
function getHttpResponseBodyStreamHandlers(htmlRender, renderHook) {
|
|
16
16
|
return {
|
|
17
|
+
pipe(writable) {
|
|
18
|
+
const getErrMsgMixingStreamTypes = (writableType) => `The ${getErrMsgBody(htmlRender, renderHook)} while a ${writableType} was passed to pageContext.httpResponse.pipe() which is contradictory. You cannot mix a Web Stream with a Node.js Stream.`;
|
|
19
|
+
if (isStreamWritableWeb(writable)) {
|
|
20
|
+
const success = pipeToStreamWritableWeb(htmlRender, writable);
|
|
21
|
+
if (success) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
assert(isStreamReadableNode(htmlRender) || isStreamPipeNode(htmlRender));
|
|
26
|
+
assertUsage(false, getErrMsgMixingStreamTypes('Web Writable'));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
if (isStreamWritableNode(writable)) {
|
|
30
|
+
const success = pipeToStreamWritableNode(htmlRender, writable);
|
|
31
|
+
if (success) {
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
assert(isStreamReadableWeb(htmlRender) || isStreamPipeWeb(htmlRender));
|
|
36
|
+
assertUsage(false, getErrMsgMixingStreamTypes('Node.js Writable'));
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
assertUsage(false, `The argument ${pc.cyan('writable')} passed to ${pc.cyan('pageContext.httpResponse.pipe(writable)')} doesn't seem to be ${getStreamName('writable', 'web')} nor ${getStreamName('writable', 'node')}.`);
|
|
40
|
+
},
|
|
41
|
+
getReadableWebStream() {
|
|
42
|
+
const webStream = getStreamReadableWeb(htmlRender);
|
|
43
|
+
if (webStream === null) {
|
|
44
|
+
assertUsage(false, getErrMsg(htmlRender, renderHook, 'getReadableWebStream()', getFixMsg('readable', 'web')));
|
|
45
|
+
}
|
|
46
|
+
return webStream;
|
|
47
|
+
},
|
|
48
|
+
async getReadableNodeStream() {
|
|
49
|
+
const nodeStream = await getStreamReadableNode(htmlRender);
|
|
50
|
+
if (nodeStream === null) {
|
|
51
|
+
assertUsage(false, getErrMsg(htmlRender, renderHook, 'getReadableNodeStream()', getFixMsg('readable', 'node')));
|
|
52
|
+
}
|
|
53
|
+
return nodeStream;
|
|
54
|
+
},
|
|
17
55
|
async getBody() {
|
|
18
56
|
const body = await getHtmlString(htmlRender);
|
|
19
57
|
return body;
|
|
@@ -38,20 +76,6 @@ function getHttpResponseBodyStreamHandlers(htmlRender, renderHook) {
|
|
|
38
76
|
}
|
|
39
77
|
return webStream;
|
|
40
78
|
},
|
|
41
|
-
async getReadableNodeStream() {
|
|
42
|
-
const nodeStream = await getStreamReadableNode(htmlRender);
|
|
43
|
-
if (nodeStream === null) {
|
|
44
|
-
assertUsage(false, getErrMsg(htmlRender, renderHook, 'getReadableNodeStream()', getFixMsg('readable', 'node')));
|
|
45
|
-
}
|
|
46
|
-
return nodeStream;
|
|
47
|
-
},
|
|
48
|
-
getReadableWebStream() {
|
|
49
|
-
const webStream = getStreamReadableWeb(htmlRender);
|
|
50
|
-
if (webStream === null) {
|
|
51
|
-
assertUsage(false, getErrMsg(htmlRender, renderHook, 'getReadableWebStream()', getFixMsg('readable', 'web')));
|
|
52
|
-
}
|
|
53
|
-
return webStream;
|
|
54
|
-
},
|
|
55
79
|
// TODO/v1-release: remove
|
|
56
80
|
pipeToWebWritable(writable) {
|
|
57
81
|
assertWarning(false, '`pageContext.httpResponse.pipeToWebWritable(res)` is outdated, use `pageContext.httpResponse.pipe(res)` instead. ' +
|
|
@@ -69,30 +93,6 @@ function getHttpResponseBodyStreamHandlers(htmlRender, renderHook) {
|
|
|
69
93
|
if (!success) {
|
|
70
94
|
assertUsage(false, getErrMsg(htmlRender, renderHook, 'pipeToNodeWritable()'));
|
|
71
95
|
}
|
|
72
|
-
},
|
|
73
|
-
pipe(writable) {
|
|
74
|
-
const getErrMsgMixingStreamTypes = (writableType) => `The ${getErrMsgBody(htmlRender, renderHook)} while a ${writableType} was passed to pageContext.httpResponse.pipe() which is contradictory. You cannot mix a Web Stream with a Node.js Stream.`;
|
|
75
|
-
if (isStreamWritableWeb(writable)) {
|
|
76
|
-
const success = pipeToStreamWritableWeb(htmlRender, writable);
|
|
77
|
-
if (success) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
else {
|
|
81
|
-
assert(isStreamReadableNode(htmlRender) || isStreamPipeNode(htmlRender));
|
|
82
|
-
assertUsage(false, getErrMsgMixingStreamTypes('Web Writable'));
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
if (isStreamWritableNode(writable)) {
|
|
86
|
-
const success = pipeToStreamWritableNode(htmlRender, writable);
|
|
87
|
-
if (success) {
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
|
-
else {
|
|
91
|
-
assert(isStreamReadableWeb(htmlRender) || isStreamPipeWeb(htmlRender));
|
|
92
|
-
assertUsage(false, getErrMsgMixingStreamTypes('Node.js Writable'));
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
assertUsage(false, `The argument ${pc.cyan('writable')} passed to ${pc.cyan('pageContext.httpResponse.pipe(writable)')} doesn't seem to be ${getStreamName('writable', 'web')} nor ${getStreamName('writable', 'node')}.`);
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
function getFixMsg(type, standard) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export { assertClientEntryId };
|
|
2
|
-
import { getGlobalContext } from '../../globalContext.js';
|
|
3
2
|
import { assert, assertPosixPath, isNpmPackageImport } from '../../utils.js';
|
|
4
3
|
import { isVirtualFileIdPageConfigValuesAll } from '../../../shared/virtual-files/virtualFilePageConfigValuesAll.js';
|
|
5
4
|
function assertClientEntryId(id) {
|
|
@@ -15,8 +14,4 @@ function assertClientEntryId(id) {
|
|
|
15
14
|
isVirtualFileIdPageConfigValuesAll(id) ||
|
|
16
15
|
// Stem packages
|
|
17
16
|
isPkg, id);
|
|
18
|
-
if (isPkg) {
|
|
19
|
-
const { configVike } = getGlobalContext();
|
|
20
|
-
assert(configVike === null || configVike.extensions.some(({ npmPackageName }) => id.startsWith(npmPackageName)), id);
|
|
21
|
-
}
|
|
22
17
|
}
|
|
@@ -2,7 +2,10 @@ export { getManifestEntry };
|
|
|
2
2
|
import { assert, slice, isNpmPackageImport } from '../../utils.js';
|
|
3
3
|
import { assertClientEntryId } from './assertClientEntryId.js';
|
|
4
4
|
import { isVirtualFileIdPageConfigValuesAll } from '../../../shared/virtual-files/virtualFilePageConfigValuesAll.js';
|
|
5
|
-
|
|
5
|
+
import { prependEntriesDir } from '../../../shared/prependEntriesDir.js';
|
|
6
|
+
function getManifestEntry(id, clientManifest,
|
|
7
|
+
// TODO: remove
|
|
8
|
+
manifestKeyMap) {
|
|
6
9
|
assertClientEntryId(id);
|
|
7
10
|
const debugInfo = getDebugInfo(id, clientManifest);
|
|
8
11
|
// Vike client entry
|
|
@@ -40,13 +43,11 @@ function getManifestEntry(id, clientManifest, manifestKeyMap) {
|
|
|
40
43
|
assert(manifestEntry, debugInfo);
|
|
41
44
|
return { manifestEntry, manifestKey };
|
|
42
45
|
}
|
|
43
|
-
//
|
|
46
|
+
// npm package import
|
|
44
47
|
if (isNpmPackageImport(id)) {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const manifestEntry = clientManifest[manifestKey];
|
|
49
|
-
assert(manifestEntry, debugInfo2);
|
|
48
|
+
const found = Object.entries(clientManifest).find(([, e]) => e.name === prependEntriesDir(id));
|
|
49
|
+
assert(found);
|
|
50
|
+
const [manifestKey, manifestEntry] = found;
|
|
50
51
|
return { manifestEntry, manifestKey };
|
|
51
52
|
}
|
|
52
53
|
// extensions[number].pageConfigsSrcDir
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { getPageAssets };
|
|
2
|
-
import { assert, prependBase, assertPosixPath, toPosixPath, isNpmPackageImport, unique,
|
|
2
|
+
import { assert, prependBase, assertPosixPath, toPosixPath, isNpmPackageImport, unique, pathJoin } from '../utils.js';
|
|
3
3
|
import { retrieveAssetsDev } from './getPageAssets/retrieveAssetsDev.js';
|
|
4
4
|
import { retrieveAssetsProd } from './getPageAssets/retrieveAssetsProd.js';
|
|
5
5
|
import { inferMediaType } from './inferMediaType.js';
|
|
@@ -77,7 +77,7 @@ async function resolveClientEntriesDev(clientEntry, viteDevServer, configVike) {
|
|
|
77
77
|
// User files
|
|
78
78
|
filePath = pathJoin(root, clientEntry);
|
|
79
79
|
}
|
|
80
|
-
else if (clientEntry.startsWith('@@vike/')) {
|
|
80
|
+
else if (clientEntry.startsWith('@@vike/') || isNpmPackageImport(clientEntry)) {
|
|
81
81
|
// Vike client entry
|
|
82
82
|
const { createRequire } = (await import_('module')).default;
|
|
83
83
|
const { dirname } = (await import_('path')).default;
|
|
@@ -89,27 +89,23 @@ async function resolveClientEntriesDev(clientEntry, viteDevServer, configVike) {
|
|
|
89
89
|
// @ts-expect-error
|
|
90
90
|
// Bun workaround https://github.com/vikejs/vike/pull/1048
|
|
91
91
|
const res = typeof Bun !== 'undefined' ? (toPath) => Bun.resolveSync(toPath, __dirname_) : require_.resolve;
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
// For Vitest (which doesn't resolve vike to its dist but to its source files)
|
|
95
|
-
// [RELATIVE_PATH_FROM_DIST] Current file: node_modules/vike/node/runtime/renderPage/getPageAssets.js
|
|
96
|
-
filePath = toPosixPath(res(clientEntry.replace('@@vike/dist/esm/client/', '../../../client/').replace('.js', '.ts')));
|
|
92
|
+
if (isNpmPackageImport(clientEntry)) {
|
|
93
|
+
filePath = res(clientEntry);
|
|
97
94
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
95
|
+
else {
|
|
96
|
+
assert(clientEntry.endsWith('.js'));
|
|
97
|
+
try {
|
|
98
|
+
// For Vitest (which doesn't resolve vike to its dist but to its source files)
|
|
99
|
+
// [RELATIVE_PATH_FROM_DIST] Current file: node_modules/vike/node/runtime/renderPage/getPageAssets.js
|
|
100
|
+
filePath = toPosixPath(res(clientEntry.replace('@@vike/dist/esm/client/', '../../../client/').replace('.js', '.ts')));
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
// For users
|
|
104
|
+
// [RELATIVE_PATH_FROM_DIST] Current file: node_modules/vike/dist/esm/node/runtime/renderPage/getPageAssets.js
|
|
105
|
+
filePath = toPosixPath(res(clientEntry.replace('@@vike/dist/esm/client/', '../../../../../dist/esm/client/')));
|
|
106
|
+
}
|
|
102
107
|
}
|
|
103
108
|
}
|
|
104
|
-
else if (isNpmPackageImport(clientEntry)) {
|
|
105
|
-
const extensionPageFile = configVike.extensions
|
|
106
|
-
.map(({ pageConfigsDistFiles }) => pageConfigsDistFiles)
|
|
107
|
-
.flat()
|
|
108
|
-
.filter(isNotNullish)
|
|
109
|
-
.find((e) => e.importPath === clientEntry);
|
|
110
|
-
assert(extensionPageFile, clientEntry);
|
|
111
|
-
filePath = extensionPageFile.filePath;
|
|
112
|
-
}
|
|
113
109
|
else {
|
|
114
110
|
assert(false);
|
|
115
111
|
}
|
|
@@ -42,7 +42,7 @@ async function loadUserFilesServerSide(pageContext) {
|
|
|
42
42
|
// TODO/v1-release: remove
|
|
43
43
|
Object.assign(pageContextAddendum, {
|
|
44
44
|
_getPageAssets: async () => {
|
|
45
|
-
assertWarning(false, 'pageContext._getPageAssets() deprecated, see https://vike.dev/
|
|
45
|
+
assertWarning(false, 'pageContext._getPageAssets() deprecated, see https://vike.dev/preloading', {
|
|
46
46
|
onlyOnce: true,
|
|
47
47
|
showStackTrace: true
|
|
48
48
|
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { logErrorHint };
|
|
2
|
+
export { isCjsEsmError };
|
|
3
|
+
export { isKnownError };
|
|
4
|
+
export { getHint };
|
|
5
|
+
declare function logErrorHint(error: unknown): void;
|
|
6
|
+
declare function getHint(error: unknown): null | string;
|
|
7
|
+
declare function isKnownError(error: unknown): false | string;
|
|
8
|
+
declare function isCjsEsmError(error: unknown): boolean | string[];
|
|
@@ -1,12 +1,22 @@
|
|
|
1
|
-
export {
|
|
2
|
-
// For ./
|
|
1
|
+
export { logErrorHint };
|
|
2
|
+
// For ./logErrorHint/*.spec.ts
|
|
3
3
|
export { isCjsEsmError };
|
|
4
|
-
export {
|
|
4
|
+
export { isKnownError };
|
|
5
5
|
export { getHint };
|
|
6
6
|
import pc from '@brillout/picocolors';
|
|
7
7
|
import { assert, formatHintLog, isNotNullish, isObject, unique, joinEnglish } from '../utils.js';
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
const knownErrors = [
|
|
9
|
+
{
|
|
10
|
+
errMsg: 'jsxDEV is not a function',
|
|
11
|
+
link: 'https://github.com/vikejs/vike/issues/1469#issuecomment-1919518096'
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
errMsg: 'Element type is invalid: expected a string (for built-in components) or a class/function (for composite components)',
|
|
15
|
+
link: 'https://vike.dev/broken-npm-package#react-invalid-component'
|
|
16
|
+
}
|
|
17
|
+
];
|
|
18
|
+
function logErrorHint(error) {
|
|
19
|
+
/* Collect errors for ./logErrorHint.spec.ts
|
|
10
20
|
collectError(error)
|
|
11
21
|
//*/
|
|
12
22
|
const hint = getHint(error);
|
|
@@ -14,9 +24,10 @@ function logHintForCjsEsmError(error) {
|
|
|
14
24
|
logHint(hint);
|
|
15
25
|
}
|
|
16
26
|
function getHint(error) {
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
27
|
+
{
|
|
28
|
+
const link = isKnownError(error);
|
|
29
|
+
if (link)
|
|
30
|
+
return `To fix this error, see ${link}`;
|
|
20
31
|
}
|
|
21
32
|
const res = isCjsEsmError(error);
|
|
22
33
|
if (res) {
|
|
@@ -37,43 +48,71 @@ function logHint(hint) {
|
|
|
37
48
|
hint = formatHintLog(hint);
|
|
38
49
|
console.error(hint);
|
|
39
50
|
}
|
|
40
|
-
function
|
|
51
|
+
function isKnownError(error) {
|
|
41
52
|
const anywhere = getAnywhere(error);
|
|
42
|
-
|
|
53
|
+
const knownErr = knownErrors.find((knownErorr) => {
|
|
54
|
+
return includes(anywhere, knownErorr.errMsg);
|
|
55
|
+
});
|
|
56
|
+
if (!knownErr)
|
|
57
|
+
return false;
|
|
58
|
+
return knownErr.link;
|
|
43
59
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* `'some-npm-package'` -> add some-npm-package to `ssr.noExternal`
|
|
48
|
-
*/
|
|
60
|
+
// `false` -> noop
|
|
61
|
+
// `true` -> generic message
|
|
62
|
+
// `'some-npm-package'` -> add some-npm-package to `ssr.noExternal`
|
|
49
63
|
function isCjsEsmError(error) {
|
|
64
|
+
const res = check(error);
|
|
65
|
+
if (res === true || res === false)
|
|
66
|
+
return res;
|
|
67
|
+
const packageNames = normalizeRes(res);
|
|
68
|
+
if (packageNames === false)
|
|
69
|
+
return packageNames;
|
|
70
|
+
packageNames.forEach((packageName) => {
|
|
71
|
+
assert(!['vite', 'vike'].includes(packageName));
|
|
72
|
+
});
|
|
73
|
+
return packageNames;
|
|
74
|
+
}
|
|
75
|
+
function normalizeRes(res) {
|
|
76
|
+
let packageNames = Array.isArray(res) ? res : [res];
|
|
77
|
+
packageNames = unique(packageNames.filter(isNotNullish).filter((packageName) => packageName !== '@brillout/import'));
|
|
78
|
+
if (packageNames.length === 0)
|
|
79
|
+
return false;
|
|
80
|
+
return packageNames;
|
|
81
|
+
}
|
|
82
|
+
function check(error) {
|
|
50
83
|
const message = getErrMessage(error);
|
|
51
84
|
const anywhere = getAnywhere(error);
|
|
52
85
|
const packageName_stack1 = getPackageName_stack1(error);
|
|
53
86
|
const packageName_stack2 = getPackageName_stack2(error);
|
|
54
87
|
const isRelatedToNodeModules = !!packageName_stack1 || !!packageName_stack2 || includesNodeModules(message);
|
|
55
|
-
|
|
88
|
+
/*
|
|
89
|
+
const relatedNpmPackages = normalizeArray([
|
|
90
|
+
packageName_stack1 || null,
|
|
91
|
+
packageName_stack2 || null,
|
|
92
|
+
(message && extractFromNodeModulesPath(message)) || null
|
|
93
|
+
])
|
|
94
|
+
*/
|
|
56
95
|
// ERR_UNSUPPORTED_DIR_IMPORT
|
|
57
96
|
{
|
|
58
|
-
const
|
|
59
|
-
if (
|
|
60
|
-
return
|
|
97
|
+
const packageName = parseNodeModulesPathMessage('ERR_UNSUPPORTED_DIR_IMPORT', anywhere);
|
|
98
|
+
if (packageName)
|
|
99
|
+
return packageName;
|
|
61
100
|
}
|
|
62
101
|
// ERR_UNKNOWN_FILE_EXTENSION
|
|
63
102
|
{
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
66
|
-
return
|
|
103
|
+
const packageName = parseUnkownFileExtensionMessage(anywhere);
|
|
104
|
+
if (packageName)
|
|
105
|
+
return packageName;
|
|
67
106
|
}
|
|
68
107
|
{
|
|
69
|
-
const
|
|
70
|
-
if (
|
|
71
|
-
return
|
|
108
|
+
const packageName = parseNodeModulesPathMessage('ERR_UNKNOWN_FILE_EXTENSION', anywhere);
|
|
109
|
+
if (packageName)
|
|
110
|
+
return packageName;
|
|
72
111
|
}
|
|
73
112
|
{
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
76
|
-
return
|
|
113
|
+
const packageName = parseNodeModulesPathMessage('is not exported', anywhere);
|
|
114
|
+
if (packageName)
|
|
115
|
+
return packageName;
|
|
77
116
|
}
|
|
78
117
|
// Using CJS inside ESM modules.
|
|
79
118
|
if (includes(anywhere, 'require is not a function') ||
|
|
@@ -94,7 +133,7 @@ function isCjsEsmError(error) {
|
|
|
94
133
|
if (includes(anywhere, 'ERR_REQUIRE_ESM')) {
|
|
95
134
|
/* The issue is the importer, not the importee.
|
|
96
135
|
if (relatedNpmPackages) return relatedNpmPackages
|
|
97
|
-
|
|
136
|
+
*/
|
|
98
137
|
{
|
|
99
138
|
if (packageName_stack1)
|
|
100
139
|
return packageName_stack1;
|
|
@@ -114,9 +153,9 @@ function isCjsEsmError(error) {
|
|
|
114
153
|
*/
|
|
115
154
|
// `SyntaxError: Named export '${exportName}' not found. The requested module '${packageName}' is a CommonJS module, which may not support all module.exports as named exports.`
|
|
116
155
|
{
|
|
117
|
-
const
|
|
118
|
-
if (
|
|
119
|
-
return
|
|
156
|
+
const packageName = parseImportFrom(anywhere);
|
|
157
|
+
if (packageName)
|
|
158
|
+
return packageName;
|
|
120
159
|
}
|
|
121
160
|
if (includes(anywhere, 'Cannot read properties of undefined')) {
|
|
122
161
|
if (isRelatedToNodeModules) {
|
|
@@ -152,7 +191,7 @@ function parseCannotFindMessage(str) {
|
|
|
152
191
|
return false;
|
|
153
192
|
// const packageNameCannotFind = extractFromPath(match[1]!)
|
|
154
193
|
const packageNameFrom = extractFromPath(match[2]);
|
|
155
|
-
return
|
|
194
|
+
return normalizeArray([
|
|
156
195
|
// packageNameCannotFind,
|
|
157
196
|
packageNameFrom
|
|
158
197
|
]);
|
|
@@ -163,7 +202,7 @@ function parseUnkownFileExtensionMessage(str) {
|
|
|
163
202
|
return false;
|
|
164
203
|
const filePath = match[1];
|
|
165
204
|
const packageName = extractFromPath(filePath);
|
|
166
|
-
return
|
|
205
|
+
return packageName;
|
|
167
206
|
}
|
|
168
207
|
function parseImportFrom(str) {
|
|
169
208
|
const match = /\bimport\b.*?\bfrom\b\s*?"(.+?)"/.exec(str);
|
|
@@ -171,7 +210,7 @@ function parseImportFrom(str) {
|
|
|
171
210
|
return false;
|
|
172
211
|
const importPath = match[1];
|
|
173
212
|
const packageName = extractFromPath(importPath);
|
|
174
|
-
return
|
|
213
|
+
return packageName;
|
|
175
214
|
}
|
|
176
215
|
function parseNodeModulesPathMessage(begin, str) {
|
|
177
216
|
str = str.replaceAll('\\', '/');
|
|
@@ -225,7 +264,6 @@ function extractFromPath(filePath) {
|
|
|
225
264
|
packageName = packageName.split('/')[0];
|
|
226
265
|
}
|
|
227
266
|
packageName = clean(packageName);
|
|
228
|
-
assert(!['vite', 'vike'].includes(packageName));
|
|
229
267
|
return packageName;
|
|
230
268
|
}
|
|
231
269
|
function clean(packageName) {
|
|
@@ -243,7 +281,7 @@ function extractFromNodeModulesPath(str) {
|
|
|
243
281
|
return false;
|
|
244
282
|
const packageName = extractFromPath(str);
|
|
245
283
|
assert(packageName);
|
|
246
|
-
return
|
|
284
|
+
return packageName;
|
|
247
285
|
}
|
|
248
286
|
function includes(str1, str2) {
|
|
249
287
|
return !!str1 && str1.toLowerCase().includes(str2.toLowerCase());
|
|
@@ -258,11 +296,11 @@ function includesNodeModules(str) {
|
|
|
258
296
|
return false;
|
|
259
297
|
return true;
|
|
260
298
|
}
|
|
261
|
-
function
|
|
262
|
-
const
|
|
263
|
-
if (
|
|
264
|
-
return
|
|
265
|
-
return
|
|
299
|
+
function normalizeArray(arr) {
|
|
300
|
+
const arrNormalized = arr.filter(isNotNullish);
|
|
301
|
+
if (arrNormalized.length === 0)
|
|
302
|
+
return null;
|
|
303
|
+
return arrNormalized;
|
|
266
304
|
}
|
|
267
305
|
function getErrMessage(err) {
|
|
268
306
|
if (!isObject(err))
|
|
@@ -6,7 +6,7 @@ import { isAbortError } from '../../../shared/route/abort.js';
|
|
|
6
6
|
import { setAlreadyLogged } from './isNewError.js';
|
|
7
7
|
import { isObject, warnIfErrorIsNotObject } from '../utils.js';
|
|
8
8
|
import pc from '@brillout/picocolors';
|
|
9
|
-
import {
|
|
9
|
+
import { logErrorHint } from './logErrorHint.js';
|
|
10
10
|
function logErrorProd(err, _httpRquestId) {
|
|
11
11
|
warnIfErrorIsNotObject(err);
|
|
12
12
|
setAlreadyLogged(err);
|
|
@@ -20,6 +20,6 @@ function logErrorProd(err, _httpRquestId) {
|
|
|
20
20
|
}
|
|
21
21
|
// Every server-side runtime error is expected to go through onRuntimeError(). (In principle, any runtime error is (or at least should) be catched by Vike, otherwise Vike couldn't render the error page.)
|
|
22
22
|
function onRuntimeError(err) {
|
|
23
|
-
// The more runtime errors we pass to
|
|
24
|
-
|
|
23
|
+
// The more runtime errors we pass to logErrorHint() the better.
|
|
24
|
+
logErrorHint(err);
|
|
25
25
|
}
|
|
@@ -36,7 +36,7 @@ export * from '../../utils/isNpmPackage.js';
|
|
|
36
36
|
export * from '../../utils/isNotNullish.js';
|
|
37
37
|
export * from '../../utils/isScriptFile.js';
|
|
38
38
|
export * from '../../utils/removeFileExtention.js';
|
|
39
|
-
export * from '../../utils/
|
|
39
|
+
export * from '../../utils/objectKeys.js';
|
|
40
40
|
export * from '../../utils/isStringRecord.js';
|
|
41
41
|
export * from '../../utils/getFileExtension.js';
|
|
42
42
|
export * from '../../utils/assertIsNotProductionRuntime.js';
|
|
@@ -39,7 +39,7 @@ export * from '../../utils/isNpmPackage.js';
|
|
|
39
39
|
export * from '../../utils/isNotNullish.js';
|
|
40
40
|
export * from '../../utils/isScriptFile.js';
|
|
41
41
|
export * from '../../utils/removeFileExtention.js';
|
|
42
|
-
export * from '../../utils/
|
|
42
|
+
export * from '../../utils/objectKeys.js';
|
|
43
43
|
export * from '../../utils/isStringRecord.js';
|
|
44
44
|
export * from '../../utils/getFileExtension.js';
|
|
45
45
|
export * from '../../utils/assertIsNotProductionRuntime.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { getClientEntry };
|
|
2
2
|
import { getConfigValue } from '../../shared/page-configs/helpers.js';
|
|
3
|
-
function
|
|
3
|
+
function getClientEntry(pageConfig) {
|
|
4
4
|
const configName = 'client';
|
|
5
5
|
const configValue = getConfigValue(pageConfig, configName, 'string');
|
|
6
6
|
if (!configValue)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { prependEntriesDir };
|
|
2
|
+
import { assert } from './utils.js';
|
|
3
|
+
function prependEntriesDir(entryName) {
|
|
4
|
+
if (entryName.startsWith('/')) {
|
|
5
|
+
entryName = entryName.slice(1);
|
|
6
|
+
}
|
|
7
|
+
assert(!entryName.startsWith('/'));
|
|
8
|
+
entryName = `entries/${entryName}`;
|
|
9
|
+
return entryName;
|
|
10
|
+
}
|
|
@@ -201,7 +201,7 @@ type OnRenderHtmlSync = (pageContext: PageContextServer) => DocumentHtml | {
|
|
|
201
201
|
pageContext: OnRenderHtmlPageContextReturn | (() => Promise<OnRenderHtmlPageContextReturn> | OnRenderHtmlPageContextReturn);
|
|
202
202
|
};
|
|
203
203
|
type OnRenderHtmlPageContextReturn = Partial<Vike.PageContext & {
|
|
204
|
-
/** See https://vike.dev/
|
|
204
|
+
/** See https://vike.dev/streaming */
|
|
205
205
|
enableEagerStreaming: boolean;
|
|
206
206
|
}>;
|
|
207
207
|
/** @deprecated Use a sync route() with an async guard() instead */
|
|
@@ -17,6 +17,7 @@ export type { DefinedAtFileFullInfo };
|
|
|
17
17
|
export type { FilePathResolved };
|
|
18
18
|
export type { FilePath };
|
|
19
19
|
import type { ConfigValueImported, ConfigValueSerialized } from './serialize/PageConfigSerialized.js';
|
|
20
|
+
import type { LocationId } from '../../node/plugin/plugins/importUserCode/v1-design/getVikeConfig/filesystemRouting.js';
|
|
20
21
|
type PageConfigBase = {
|
|
21
22
|
pageId: string;
|
|
22
23
|
isErrorPage?: true;
|
|
@@ -71,6 +72,7 @@ type ConfigValueSource = {
|
|
|
71
72
|
value?: unknown;
|
|
72
73
|
configEnv: ConfigEnvInternal;
|
|
73
74
|
definedAt: DefinedAtFileFullInfo;
|
|
75
|
+
locationId: LocationId;
|
|
74
76
|
/** Wether the config value is loaded at runtime, for example config.Page or config.onBeforeRender */
|
|
75
77
|
valueIsImportedAtRuntime: boolean;
|
|
76
78
|
/** Whether the config value is a file path, for example config.client */
|