vike 0.4.224 → 0.4.225-commit-37a36a5
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/api/build.js +1 -1
- package/dist/cjs/node/api/context.js +4 -4
- package/dist/cjs/node/api/dev.js +1 -1
- package/dist/cjs/node/api/prepareViteApiCall.js +3 -2
- package/dist/cjs/node/api/prerender.js +1 -1
- package/dist/cjs/node/api/preview.js +1 -1
- package/dist/cjs/node/cli/context.js +5 -4
- package/dist/cjs/node/cli/entry.js +3 -3
- package/dist/cjs/node/cli/parseCli.js +43 -15
- package/dist/cjs/node/cli/utils.js +1 -1
- package/dist/cjs/node/plugin/plugins/build/pluginBuildEntry.js +1 -1
- package/dist/cjs/node/plugin/plugins/commonConfig.js +16 -5
- package/dist/cjs/node/plugin/plugins/devConfig/determineOptimizeDeps.js +6 -4
- package/dist/cjs/node/plugin/plugins/devConfig/index.js +1 -1
- package/dist/cjs/node/plugin/plugins/importUserCode/index.js +14 -10
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js +10 -2
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js +11 -12
- package/dist/cjs/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +138 -83
- package/dist/cjs/node/plugin/plugins/previewConfig.js +12 -7
- package/dist/cjs/node/plugin/plugins/setGlobalContext.js +10 -1
- package/dist/cjs/node/plugin/shared/addSsrMiddleware.js +5 -1
- package/dist/cjs/node/plugin/shared/getEnvVarObject.js +9 -8
- package/dist/cjs/node/plugin/shared/loggerNotProd/log.js +1 -1
- package/dist/cjs/node/prerender/context.js +1 -1
- package/dist/cjs/node/prerender/resolvePrerenderConfig.js +33 -18
- package/dist/cjs/node/prerender/runPrerender.js +6 -8
- package/dist/cjs/node/prerender/utils.js +1 -1
- package/dist/cjs/node/runtime/globalContext.js +9 -5
- package/dist/cjs/node/runtime/html/injectAssets/getViteDevScript.js +6 -3
- package/dist/cjs/node/runtime/html/stream.js +7 -0
- package/dist/cjs/node/runtime/renderPage/createHttpResponse/assertNoInfiniteHttpRedirect.js +14 -5
- package/dist/cjs/node/runtime/renderPage/createHttpResponse.js +2 -4
- package/dist/cjs/node/runtime/renderPage/logErrorHint.js +6 -1
- package/dist/cjs/node/runtime/renderPage.js +6 -10
- package/dist/cjs/node/runtime/utils.js +0 -1
- package/dist/cjs/node/runtime-dev/createDevMiddleware.js +10 -8
- package/dist/cjs/node/shared/assertV1Design.js +2 -1
- package/dist/cjs/node/shared/utils.js +0 -1
- package/dist/cjs/shared/page-configs/getConfigDefinedAt.js +19 -2
- package/dist/cjs/shared/page-configs/getConfigValueBuildTime.js +8 -5
- package/dist/cjs/shared/page-configs/helpers.js +1 -1
- package/dist/cjs/shared/page-configs/serialize/parsePageConfigs.js +2 -5
- package/dist/cjs/shared/page-configs/serialize/serializeConfigValues.js +9 -5
- package/dist/cjs/shared/route/loadPageRoutes.js +2 -2
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/cjs/utils/assert.js +11 -4
- package/dist/cjs/utils/assertSingleInstance.js +11 -17
- package/dist/cjs/utils/debug.js +2 -1
- package/dist/cjs/utils/getRandomId.js +1 -1
- package/dist/cjs/utils/normalizeHeaders.js +1 -1
- package/dist/cjs/utils/parseUrl-extras.js +1 -0
- package/dist/esm/client/client-routing-runtime/createPageContext.d.ts +1 -1
- package/dist/esm/client/client-routing-runtime/createPageContext.js +2 -2
- package/dist/esm/node/api/build.js +1 -1
- package/dist/esm/node/api/context.d.ts +8 -2
- package/dist/esm/node/api/context.js +4 -4
- package/dist/esm/node/api/dev.js +1 -1
- package/dist/esm/node/api/prepareViteApiCall.d.ts +2 -2
- package/dist/esm/node/api/prepareViteApiCall.js +3 -2
- package/dist/esm/node/api/prerender.js +1 -1
- package/dist/esm/node/api/preview.js +1 -1
- package/dist/esm/node/api/types.d.ts +7 -0
- package/dist/esm/node/cli/context.d.ts +4 -2
- package/dist/esm/node/cli/context.js +5 -4
- package/dist/esm/node/cli/entry.js +4 -4
- package/dist/esm/node/cli/parseCli.d.ts +3 -0
- package/dist/esm/node/cli/parseCli.js +44 -16
- package/dist/esm/node/cli/utils.d.ts +1 -1
- package/dist/esm/node/cli/utils.js +1 -1
- package/dist/esm/node/plugin/plugins/build/pluginBuildEntry.js +2 -2
- package/dist/esm/node/plugin/plugins/commonConfig.d.ts +1 -0
- package/dist/esm/node/plugin/plugins/commonConfig.js +16 -5
- package/dist/esm/node/plugin/plugins/devConfig/determineOptimizeDeps.js +6 -4
- package/dist/esm/node/plugin/plugins/devConfig/index.js +1 -1
- package/dist/esm/node/plugin/plugins/importUserCode/index.js +15 -11
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.d.ts +3 -1
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js +10 -2
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.d.ts +5 -2
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig/transpileAndExecuteFile.js +11 -12
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.d.ts +3 -2
- package/dist/esm/node/plugin/plugins/importUserCode/v1-design/getVikeConfig.js +140 -84
- package/dist/esm/node/plugin/plugins/previewConfig.js +12 -7
- package/dist/esm/node/plugin/plugins/setGlobalContext.js +11 -2
- package/dist/esm/node/plugin/shared/addSsrMiddleware.d.ts +1 -1
- package/dist/esm/node/plugin/shared/addSsrMiddleware.js +5 -1
- package/dist/esm/node/plugin/shared/getEnvVarObject.d.ts +3 -1
- package/dist/esm/node/plugin/shared/getEnvVarObject.js +9 -8
- package/dist/esm/node/plugin/shared/loggerNotProd/log.js +2 -2
- package/dist/esm/node/prerender/context.js +1 -1
- package/dist/esm/node/prerender/resolvePrerenderConfig.d.ts +2 -1
- package/dist/esm/node/prerender/resolvePrerenderConfig.js +34 -19
- package/dist/esm/node/prerender/runPrerender.js +7 -9
- package/dist/esm/node/prerender/utils.d.ts +1 -1
- package/dist/esm/node/prerender/utils.js +1 -1
- package/dist/esm/node/runtime/globalContext.d.ts +1 -1
- package/dist/esm/node/runtime/globalContext.js +10 -6
- package/dist/esm/node/runtime/html/injectAssets/getViteDevScript.js +6 -3
- package/dist/esm/node/runtime/html/stream.js +7 -0
- package/dist/esm/node/runtime/index-deprecated.d.ts +1 -3
- package/dist/esm/node/runtime/renderPage/createHttpResponse/assertNoInfiniteHttpRedirect.d.ts +3 -1
- package/dist/esm/node/runtime/renderPage/createHttpResponse/assertNoInfiniteHttpRedirect.js +15 -6
- package/dist/esm/node/runtime/renderPage/createHttpResponse.d.ts +3 -1
- package/dist/esm/node/runtime/renderPage/createHttpResponse.js +2 -4
- package/dist/esm/node/runtime/renderPage/logErrorHint.js +6 -1
- package/dist/esm/node/runtime/renderPage/renderPageAlreadyRouted.d.ts +5 -5
- package/dist/esm/node/runtime/renderPage.js +7 -11
- package/dist/esm/node/runtime/utils.d.ts +0 -1
- package/dist/esm/node/runtime/utils.js +0 -1
- package/dist/esm/node/runtime-dev/createDevMiddleware.js +10 -8
- package/dist/esm/node/shared/assertV1Design.js +2 -1
- package/dist/esm/node/shared/utils.d.ts +0 -1
- package/dist/esm/node/shared/utils.js +0 -1
- package/dist/esm/shared/page-configs/Config.d.ts +19 -1
- package/dist/esm/shared/page-configs/PageConfig.d.ts +16 -5
- package/dist/esm/shared/page-configs/getConfigDefinedAt.d.ts +5 -3
- package/dist/esm/shared/page-configs/getConfigDefinedAt.js +20 -3
- package/dist/esm/shared/page-configs/getConfigValueBuildTime.js +8 -5
- package/dist/esm/shared/page-configs/helpers.js +1 -1
- package/dist/esm/shared/page-configs/serialize/parsePageConfigs.d.ts +1 -1
- package/dist/esm/shared/page-configs/serialize/parsePageConfigs.js +2 -5
- package/dist/esm/shared/page-configs/serialize/serializeConfigValues.d.ts +3 -3
- package/dist/esm/shared/page-configs/serialize/serializeConfigValues.js +9 -5
- package/dist/esm/shared/route/loadPageRoutes.js +2 -2
- package/dist/esm/shared/types.d.ts +5 -1
- package/dist/esm/types/index.d.ts +2 -0
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/utils/assert.d.ts +2 -1
- package/dist/esm/utils/assert.js +11 -4
- package/dist/esm/utils/assertSingleInstance.js +11 -17
- package/dist/esm/utils/debug.js +2 -1
- package/dist/esm/utils/getRandomId.d.ts +1 -1
- package/dist/esm/utils/getRandomId.js +1 -1
- package/dist/esm/utils/normalizeHeaders.js +1 -1
- package/dist/esm/utils/parseUrl-extras.js +1 -0
- package/package.json +6 -3
- package/dist/cjs/utils/projectInfo.js +0 -8
- package/dist/esm/utils/projectInfo.d.ts +0 -4
- package/dist/esm/utils/projectInfo.js +0 -5
|
@@ -297,7 +297,9 @@ type ConfigBuiltIn = {
|
|
|
297
297
|
*/
|
|
298
298
|
disableAutoRun?: boolean;
|
|
299
299
|
/**
|
|
300
|
-
*
|
|
300
|
+
* Whether to enable pre-rendering.
|
|
301
|
+
*
|
|
302
|
+
* Setting `value: null` enables you to set prerender settings without activating pre-rendering. (Useful for Vike extensions.)
|
|
301
303
|
*
|
|
302
304
|
* https://vike.dev/prerender#value
|
|
303
305
|
*
|
|
@@ -471,6 +473,22 @@ type ConfigBuiltIn = {
|
|
|
471
473
|
* https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
|
|
472
474
|
*/
|
|
473
475
|
cacheControl?: string;
|
|
476
|
+
/**
|
|
477
|
+
* Make development/preview server available over LAN and public addresses.
|
|
478
|
+
*
|
|
479
|
+
* Default: `false` (or `true` if running inside Docker/Podman).
|
|
480
|
+
*
|
|
481
|
+
* https://vike.dev/host
|
|
482
|
+
*/
|
|
483
|
+
host?: boolean | string;
|
|
484
|
+
/**
|
|
485
|
+
* Change port of development/preview server.
|
|
486
|
+
*
|
|
487
|
+
* @default 3000
|
|
488
|
+
*
|
|
489
|
+
* https://vike.dev/port
|
|
490
|
+
*/
|
|
491
|
+
port?: number;
|
|
474
492
|
/** Where scripts are injected in the HTML.
|
|
475
493
|
*
|
|
476
494
|
* https://vike.dev/injectScriptsAt
|
|
@@ -17,12 +17,15 @@ export type { ConfigValueSources };
|
|
|
17
17
|
export type { ConfigValuesComputed };
|
|
18
18
|
export type { DefinedAtData };
|
|
19
19
|
export type { DefinedAtFile };
|
|
20
|
+
export type { DefinedAt };
|
|
21
|
+
export type { DefinedBy };
|
|
20
22
|
export type { DefinedAtFilePath };
|
|
21
23
|
import type { ConfigValueSerialized } from './serialize/PageConfigSerialized.js';
|
|
22
24
|
import type { LocationId } from '../../node/plugin/plugins/importUserCode/v1-design/getVikeConfig/filesystemRouting.js';
|
|
23
25
|
import type { FilePath } from './FilePath.js';
|
|
24
26
|
import type { ConfigDefinitions } from '../../node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js';
|
|
25
27
|
import type { PlusFile } from '../../node/plugin/plugins/importUserCode/v1-design/getVikeConfig/getPlusFilesAll.js';
|
|
28
|
+
import type { Operation } from '../../node/api/types.js';
|
|
26
29
|
type PageConfigCommon = {
|
|
27
30
|
pageId: string;
|
|
28
31
|
} & PageConfigRoute;
|
|
@@ -33,7 +36,7 @@ type PageConfigRoute = {
|
|
|
33
36
|
isErrorPage?: undefined;
|
|
34
37
|
routeFilesystem: {
|
|
35
38
|
routeString: string;
|
|
36
|
-
|
|
39
|
+
definedAtLocation: string;
|
|
37
40
|
};
|
|
38
41
|
};
|
|
39
42
|
/** Page config, runtime data structure */
|
|
@@ -89,7 +92,7 @@ type ConfigValueSources = Record<string, // configName
|
|
|
89
92
|
ConfigValueSource[]>;
|
|
90
93
|
type ConfigValueSource = {
|
|
91
94
|
configEnv: ConfigEnvInternal;
|
|
92
|
-
|
|
95
|
+
definedAt: DefinedAtFilePath | DefinedBy;
|
|
93
96
|
plusFile: PlusFile | null;
|
|
94
97
|
locationId: LocationId;
|
|
95
98
|
/** Wether the config value is loaded at runtime, for example config.Page or config.onBeforeRender */
|
|
@@ -119,13 +122,13 @@ type ConfigValue = ConfigValueStandard | ConfigValueCumulative | ConfigValueComp
|
|
|
119
122
|
type ConfigValueStandard = {
|
|
120
123
|
type: 'standard';
|
|
121
124
|
value: unknown;
|
|
122
|
-
definedAtData:
|
|
125
|
+
definedAtData: DefinedAt;
|
|
123
126
|
};
|
|
124
127
|
/** Defined by multiple sources (thus multiple file paths). */
|
|
125
128
|
type ConfigValueCumulative = {
|
|
126
129
|
type: 'cumulative';
|
|
127
130
|
value: unknown[];
|
|
128
|
-
definedAtData:
|
|
131
|
+
definedAtData: DefinedAt[];
|
|
129
132
|
};
|
|
130
133
|
/** Defined internally by Vike (currently, Vike doesn't support computed configs created by users). */
|
|
131
134
|
type ConfigValueComputed = {
|
|
@@ -133,8 +136,16 @@ type ConfigValueComputed = {
|
|
|
133
136
|
value: unknown;
|
|
134
137
|
definedAtData: null;
|
|
135
138
|
};
|
|
136
|
-
type DefinedAtData =
|
|
139
|
+
type DefinedAtData = DefinedAt | DefinedAt[] | null;
|
|
140
|
+
type DefinedAt = DefinedAtFile | DefinedBy;
|
|
141
|
+
type DefinedBy = {
|
|
142
|
+
definedBy: 'cli' | 'env';
|
|
143
|
+
} | {
|
|
144
|
+
definedBy: 'api';
|
|
145
|
+
operation: Operation;
|
|
146
|
+
};
|
|
137
147
|
type DefinedAtFile = {
|
|
138
148
|
filePathToShowToUser: string;
|
|
139
149
|
fileExportPathToShowToUser: null | string[];
|
|
150
|
+
definedBy?: undefined;
|
|
140
151
|
};
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export { getConfigDefinedAt };
|
|
2
2
|
export { getConfigDefinedAtOptional };
|
|
3
3
|
export { getDefinedAtString };
|
|
4
|
+
export { getDefinedByString };
|
|
4
5
|
export type { ConfigDefinedAt };
|
|
5
6
|
export type { ConfigDefinedAtOptional };
|
|
6
|
-
import type { DefinedAtData,
|
|
7
|
+
import type { DefinedAtData, DefinedBy } from './PageConfig.js';
|
|
7
8
|
type ConfigDefinedAtOptional = ConfigDefinedAt | `Config ${string} defined internally`;
|
|
8
9
|
type ConfigDefinedAt = `Config ${string} defined at ${string}`;
|
|
9
|
-
declare function getConfigDefinedAt<SentenceBegin extends 'Config' | 'config', ConfigName extends string>(sentenceBegin: SentenceBegin, configName: ConfigName, definedAtData:
|
|
10
|
+
declare function getConfigDefinedAt<SentenceBegin extends 'Config' | 'config', ConfigName extends string>(sentenceBegin: SentenceBegin, configName: ConfigName, definedAtData: NonNullable<DefinedAtData>): `${SentenceBegin} ${ConfigName} defined at ${string}`;
|
|
10
11
|
declare function getConfigDefinedAtOptional<SentenceBegin extends 'Config' | 'config', ConfigName extends string>(sentenceBegin: SentenceBegin, configName: ConfigName, definedAtData: DefinedAtData): `${SentenceBegin} ${ConfigName} defined ${'internally' | `at ${string}`}`;
|
|
11
|
-
declare function getDefinedAtString(definedAtData:
|
|
12
|
+
declare function getDefinedAtString(definedAtData: NonNullable<DefinedAtData>, configName: string): string;
|
|
13
|
+
declare function getDefinedByString(definedAt: DefinedBy, configName: string): `API call dev({ vikeConfig: { ${string} } })` | `API call build({ vikeConfig: { ${string} } })` | `API call preview({ vikeConfig: { ${string} } })` | `API call prerender({ vikeConfig: { ${string} } })` | `CLI option --${string}` | `environment variable VIKE_CONFIG="{${string}}"`;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { getConfigDefinedAt };
|
|
2
2
|
export { getConfigDefinedAtOptional };
|
|
3
3
|
export { getDefinedAtString };
|
|
4
|
-
|
|
4
|
+
export { getDefinedByString };
|
|
5
|
+
import { assert, checkType, isArray } from '../utils.js';
|
|
5
6
|
import pc from '@brillout/picocolors';
|
|
6
7
|
import { getExportPath } from './getExportPath.js';
|
|
7
8
|
function getConfigDefinedAt(sentenceBegin, configName, definedAtData) {
|
|
@@ -28,8 +29,10 @@ function getDefinedAtString(definedAtData, configName) {
|
|
|
28
29
|
}
|
|
29
30
|
assert(files.length >= 1);
|
|
30
31
|
const definedAtString = files
|
|
31
|
-
.map((
|
|
32
|
-
|
|
32
|
+
.map((definedAt) => {
|
|
33
|
+
if (definedAt.definedBy)
|
|
34
|
+
return getDefinedByString(definedAt, configName);
|
|
35
|
+
const { filePathToShowToUser, fileExportPathToShowToUser } = definedAt;
|
|
33
36
|
let s = filePathToShowToUser;
|
|
34
37
|
const exportPath = getExportPath(fileExportPathToShowToUser, configName);
|
|
35
38
|
if (exportPath) {
|
|
@@ -40,3 +43,17 @@ function getDefinedAtString(definedAtData, configName) {
|
|
|
40
43
|
.join(' / ');
|
|
41
44
|
return definedAtString;
|
|
42
45
|
}
|
|
46
|
+
function getDefinedByString(definedAt, configName) {
|
|
47
|
+
if (definedAt.definedBy === 'api') {
|
|
48
|
+
return `API call ${pc.cyan(`${definedAt.operation}({ vikeConfig: { ${configName} } })`)}`;
|
|
49
|
+
}
|
|
50
|
+
const { definedBy } = definedAt;
|
|
51
|
+
if (definedBy === 'cli') {
|
|
52
|
+
return `CLI option ${pc.cyan(`--${configName}`)}`;
|
|
53
|
+
}
|
|
54
|
+
if (definedBy === 'env') {
|
|
55
|
+
return `environment variable ${pc.cyan(`VIKE_CONFIG="{${configName}}"`)}`;
|
|
56
|
+
}
|
|
57
|
+
checkType(definedBy);
|
|
58
|
+
assert(false);
|
|
59
|
+
}
|
|
@@ -31,7 +31,7 @@ function getConfigValue(pageConfig, configName) {
|
|
|
31
31
|
return {
|
|
32
32
|
type: 'standard',
|
|
33
33
|
value: configValueSource.value,
|
|
34
|
-
definedAtData:
|
|
34
|
+
definedAtData: getDefinedAt(configValueSource)
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
else {
|
|
@@ -51,13 +51,16 @@ function mergeCumulative(configValueSources) {
|
|
|
51
51
|
assert(configValueSource.configEnv.config === true);
|
|
52
52
|
assert(configValueSource.valueIsLoaded);
|
|
53
53
|
value.push(configValueSource.value);
|
|
54
|
-
definedAtData.push(
|
|
54
|
+
definedAtData.push(getDefinedAt(configValueSource));
|
|
55
55
|
});
|
|
56
56
|
return { value, definedAtData };
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function getDefinedAt(configValueSource) {
|
|
59
|
+
const { definedAt } = configValueSource;
|
|
60
|
+
if (definedAt.definedBy)
|
|
61
|
+
return definedAt;
|
|
59
62
|
return {
|
|
60
|
-
filePathToShowToUser:
|
|
61
|
-
fileExportPathToShowToUser:
|
|
63
|
+
filePathToShowToUser: definedAt.filePathToShowToUser,
|
|
64
|
+
fileExportPathToShowToUser: definedAt.fileExportPathToShowToUser
|
|
62
65
|
};
|
|
63
66
|
}
|
|
@@ -12,7 +12,7 @@ function getConfigValueFilePathToShowToUser(definedAtData) {
|
|
|
12
12
|
// A unique file path only exists if the config value isn't cumulative nor computed:
|
|
13
13
|
// - cumulative config values have multiple file paths
|
|
14
14
|
// - computed values don't have any file path
|
|
15
|
-
if (!definedAtData || isArray(definedAtData))
|
|
15
|
+
if (!definedAtData || isArray(definedAtData) || definedAtData.definedBy)
|
|
16
16
|
return null;
|
|
17
17
|
const { filePathToShowToUser } = definedAtData;
|
|
18
18
|
assert(filePathToShowToUser);
|
|
@@ -3,8 +3,8 @@ export { parseConfigValuesSerialized };
|
|
|
3
3
|
import type { ConfigValues, PageConfigRuntime, PageConfigGlobalRuntime } from '../PageConfig.js';
|
|
4
4
|
import type { PageConfigGlobalRuntimeSerialized, PageConfigRuntimeSerialized } from './PageConfigSerialized.js';
|
|
5
5
|
import type { ConfigValueSerialized } from './PageConfigSerialized.js';
|
|
6
|
-
declare function parseConfigValuesSerialized(configValuesSerialized: Record<string, ConfigValueSerialized>): ConfigValues;
|
|
7
6
|
declare function parsePageConfigs(pageConfigsSerialized: PageConfigRuntimeSerialized[], pageConfigGlobalSerialized: PageConfigGlobalRuntimeSerialized): {
|
|
8
7
|
pageConfigs: PageConfigRuntime[];
|
|
9
8
|
pageConfigGlobal: PageConfigGlobalRuntime;
|
|
10
9
|
};
|
|
10
|
+
declare function parseConfigValuesSerialized(configValuesSerialized: Record<string, ConfigValueSerialized>): ConfigValues;
|
|
@@ -4,10 +4,6 @@ import { assert, assertUsage, isCallable } from '../../utils.js';
|
|
|
4
4
|
import { getConfigDefinedAt } from '../getConfigDefinedAt.js';
|
|
5
5
|
import { parseTransform } from '@brillout/json-serializer/parse';
|
|
6
6
|
import { assertPlusFileExport } from '../assertPlusFileExport.js';
|
|
7
|
-
function parseConfigValuesSerialized(configValuesSerialized) {
|
|
8
|
-
const configValues = parseConfigValuesSerialized_tmp(configValuesSerialized);
|
|
9
|
-
return configValues;
|
|
10
|
-
}
|
|
11
7
|
function parsePageConfigs(pageConfigsSerialized, pageConfigGlobalSerialized) {
|
|
12
8
|
// pageConfigs
|
|
13
9
|
const pageConfigs = pageConfigsSerialized.map((pageConfigSerialized) => {
|
|
@@ -43,7 +39,7 @@ function assertRouteConfigValue(configValues) {
|
|
|
43
39
|
}
|
|
44
40
|
*/
|
|
45
41
|
}
|
|
46
|
-
function
|
|
42
|
+
function parseConfigValuesSerialized(configValuesSerialized) {
|
|
47
43
|
const configValues = {};
|
|
48
44
|
Object.entries(configValuesSerialized).forEach(([configName, configValueSeriliazed]) => {
|
|
49
45
|
let configValue;
|
|
@@ -100,6 +96,7 @@ function parseValueSerialized(valueSerialized, configName, getDefinedAtFile) {
|
|
|
100
96
|
if (valueSerialized.type === 'plus-file') {
|
|
101
97
|
const definedAtFile = getDefinedAtFile();
|
|
102
98
|
const { exportValues } = valueSerialized;
|
|
99
|
+
assert(!definedAtFile.definedBy);
|
|
103
100
|
assertPlusFileExport(exportValues, definedAtFile.filePathToShowToUser, configName);
|
|
104
101
|
let value;
|
|
105
102
|
let valueWasFound = false;
|
|
@@ -2,7 +2,7 @@ export { serializeConfigValues };
|
|
|
2
2
|
export { getConfigValuesBase };
|
|
3
3
|
export { isJsonValue };
|
|
4
4
|
export type { FilesEnv };
|
|
5
|
-
import type { ConfigEnvInternal, ConfigValueSource,
|
|
5
|
+
import type { ConfigEnvInternal, ConfigValueSource, DefinedAt, PageConfigBuildTime, PageConfigGlobalBuildTime } from '../PageConfig.js';
|
|
6
6
|
declare function serializeConfigValues(pageConfig: PageConfigBuildTime | PageConfigGlobalBuildTime, importStatements: string[], filesEnv: FilesEnv, isEnvMatch: (configEnv: ConfigEnvInternal) => boolean, tabspace: string, isEager: boolean | null): string[];
|
|
7
7
|
declare function isJsonValue(value: unknown): boolean;
|
|
8
8
|
declare function getConfigValuesBase(pageConfig: PageConfigBuildTime | PageConfigGlobalBuildTime, isEnvMatch: (configEnv: ConfigEnvInternal) => boolean, isEager: boolean | null): ConfigValuesBase;
|
|
@@ -17,14 +17,14 @@ type ConfigValuesBase = ({
|
|
|
17
17
|
} | {
|
|
18
18
|
configValueBase: {
|
|
19
19
|
type: 'standard';
|
|
20
|
-
definedAtData:
|
|
20
|
+
definedAtData: DefinedAt;
|
|
21
21
|
};
|
|
22
22
|
sourceRelevant: ConfigValueSource;
|
|
23
23
|
configName: string;
|
|
24
24
|
} | {
|
|
25
25
|
configValueBase: {
|
|
26
26
|
type: 'cumulative';
|
|
27
|
-
definedAtData:
|
|
27
|
+
definedAtData: DefinedAt[];
|
|
28
28
|
};
|
|
29
29
|
sourcesRelevant: ConfigValueSource[];
|
|
30
30
|
configName: string;
|
|
@@ -47,7 +47,7 @@ function serializeConfigValues(pageConfig, importStatements, filesEnv, isEnvMatc
|
|
|
47
47
|
function getValueSerializedFromSource(configValueSource, configName, importStatements, filesEnv) {
|
|
48
48
|
let valueData;
|
|
49
49
|
if (configValueSource.valueIsLoaded && !configValueSource.valueIsLoadedWithImport) {
|
|
50
|
-
valueData = getValueSerializedWithJson(configValueSource.value, configName, configValueSource.
|
|
50
|
+
valueData = getValueSerializedWithJson(configValueSource.value, configName, configValueSource.definedAt, importStatements, filesEnv, configValueSource.configEnv);
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
53
|
valueData = getValueSerializedWithImport(configValueSource, importStatements, filesEnv, configName);
|
|
@@ -98,8 +98,9 @@ function serializeConfigValue(configValueBase, valueData, configName, lines, tab
|
|
|
98
98
|
}
|
|
99
99
|
function getValueSerializedWithImport(configValueSource, importStatements, filesEnv, configName) {
|
|
100
100
|
assert(!configValueSource.valueIsFilePath);
|
|
101
|
-
const { valueIsDefinedByPlusValueFile,
|
|
102
|
-
|
|
101
|
+
const { valueIsDefinedByPlusValueFile, definedAt, configEnv } = configValueSource;
|
|
102
|
+
assert(!definedAt.definedBy);
|
|
103
|
+
const { filePathAbsoluteVite, fileExportName } = definedAt;
|
|
103
104
|
if (valueIsDefinedByPlusValueFile)
|
|
104
105
|
assert(fileExportName === undefined);
|
|
105
106
|
const { importName } = addImportStatement(importStatements, filePathAbsoluteVite, fileExportName || '*', filesEnv, configEnv, configName);
|
|
@@ -226,9 +227,12 @@ function getConfigValuesBase(pageConfig, isEnvMatch, isEager) {
|
|
|
226
227
|
return [...fromComputed, ...fromSources].filter((r) => r !== 'SKIP');
|
|
227
228
|
}
|
|
228
229
|
function getDefinedAtFileSource(source) {
|
|
230
|
+
const { definedAt } = source;
|
|
231
|
+
if (definedAt.definedBy)
|
|
232
|
+
return definedAt;
|
|
229
233
|
const definedAtFile = {
|
|
230
|
-
filePathToShowToUser:
|
|
231
|
-
fileExportPathToShowToUser:
|
|
234
|
+
filePathToShowToUser: definedAt.filePathToShowToUser,
|
|
235
|
+
fileExportPathToShowToUser: definedAt.fileExportPathToShowToUser
|
|
232
236
|
};
|
|
233
237
|
return definedAtFile;
|
|
234
238
|
}
|
|
@@ -60,11 +60,11 @@ function getPageRoutes(filesystemRoots, pageFilesAll, pageConfigs, allPageIds) {
|
|
|
60
60
|
if (!pageRoute) {
|
|
61
61
|
const { routeFilesystem } = pageConfig;
|
|
62
62
|
assert(routeFilesystem);
|
|
63
|
-
const { routeString,
|
|
63
|
+
const { routeString, definedAtLocation } = routeFilesystem;
|
|
64
64
|
assert(routeFilesystem.routeString.startsWith('/'));
|
|
65
65
|
pageRoute = {
|
|
66
66
|
pageId,
|
|
67
|
-
routeFilesystemDefinedBy:
|
|
67
|
+
routeFilesystemDefinedBy: definedAtLocation,
|
|
68
68
|
comesFromV1PageConfig,
|
|
69
69
|
routeString,
|
|
70
70
|
routeDefinedAtString: null,
|
|
@@ -138,7 +138,11 @@ type PageContextBuiltInCommon<Data> = {
|
|
|
138
138
|
*/
|
|
139
139
|
isBaseMissing?: true;
|
|
140
140
|
};
|
|
141
|
-
type PageContextBuiltInServer<Data> = PageContextBuiltInCommon<Data> & PageContextUrlServer
|
|
141
|
+
type PageContextBuiltInServer<Data> = PageContextBuiltInCommon<Data> & PageContextUrlServer & {
|
|
142
|
+
isHydration?: undefined;
|
|
143
|
+
isBackwardNavigation?: undefined;
|
|
144
|
+
previousPageContext?: undefined;
|
|
145
|
+
};
|
|
142
146
|
type PageContextBuiltInClientWithClientRouting<Data> = Partial<PageContextBuiltInCommon<Data>> & Pick<PageContextBuiltInCommon<Data>, 'Page' | 'routeParams' | 'pageExports' | 'config' | 'configEntries' | 'exports' | 'exportsAll' | 'abortReason' | 'data' | 'pageId' | 'source' | 'sources' | 'from'> & {
|
|
143
147
|
/** Whether the current page is already rendered to HTML */
|
|
144
148
|
isHydration: boolean;
|
|
@@ -8,9 +8,11 @@ export type { PageContextBuiltInServer } from '../shared/types.js';
|
|
|
8
8
|
export type { PageContextBuiltInClientWithClientRouting } from '../shared/types.js';
|
|
9
9
|
export type { PageContextBuiltInClientWithServerRouting } from '../shared/types.js';
|
|
10
10
|
export type { Config, ConfigMeta as Meta, ImportString, DataAsync, DataSync, GuardAsync, GuardSync, OnBeforePrerenderStartAsync, OnBeforePrerenderStartSync, OnBeforeRenderAsync, OnBeforeRenderSync, OnBeforeRouteAsync, OnBeforeRouteSync, OnHydrationEndAsync, OnHydrationEndSync, OnPageTransitionEndAsync, OnPageTransitionEndSync, OnPageTransitionStartAsync, OnPageTransitionStartSync, OnPrerenderStartAsync, OnPrerenderStartSync, OnRenderClientAsync, OnRenderClientSync, OnRenderHtmlAsync, OnRenderHtmlSync, RouteAsync, RouteSync, KeepScrollPosition } from '../shared/page-configs/Config.js';
|
|
11
|
+
export type { ConfigResolved } from '../shared/page-configs/Config/PageContextConfig.js';
|
|
11
12
|
export type { ConfigEnv } from '../shared/page-configs/PageConfig.js';
|
|
12
13
|
export type { ConfigDefinition, ConfigEffect } from '../node/plugin/plugins/importUserCode/v1-design/getVikeConfig/configDefinitionsBuiltIn.js';
|
|
13
14
|
export type { ConfigEntries } from '../shared/page-configs/getPageConfigUserFriendly.js';
|
|
15
|
+
export type { VikeConfigPublic as VikeConfig } from '../node/plugin/plugins/commonConfig.js';
|
|
14
16
|
export type { UrlPublic as Url } from '../utils/parseUrl.js';
|
|
15
17
|
export type { InjectFilterEntry } from '../node/runtime/html/injectAssets/getHtmlTags.js';
|
|
16
18
|
export { defineConfig } from './defineConfig.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PROJECT_VERSION: "0.4.
|
|
1
|
+
export declare const PROJECT_VERSION: "0.4.225-commit-37a36a5";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Automatically updated by @brillout/release-me
|
|
2
|
-
export const PROJECT_VERSION = '0.4.
|
|
2
|
+
export const PROJECT_VERSION = '0.4.225-commit-37a36a5';
|
|
@@ -10,8 +10,9 @@ export { isBug };
|
|
|
10
10
|
export { setAlwaysShowStackTrace };
|
|
11
11
|
type Logger = (msg: string | Error, logType: 'warn' | 'info') => void;
|
|
12
12
|
declare function assert(condition: unknown, debugInfo?: unknown): asserts condition;
|
|
13
|
-
declare function assertUsage(condition: unknown, errMsg: string, { showStackTrace }?: {
|
|
13
|
+
declare function assertUsage(condition: unknown, errMsg: string, { showStackTrace, exitOnError }?: {
|
|
14
14
|
showStackTrace?: true;
|
|
15
|
+
exitOnError?: boolean;
|
|
15
16
|
}): asserts condition;
|
|
16
17
|
declare function getProjectError(errMsg: string): Error;
|
|
17
18
|
declare function assertWarning(condition: unknown, msg: string, { onlyOnce, showStackTrace }: {
|
package/dist/esm/utils/assert.js
CHANGED
|
@@ -12,7 +12,7 @@ import { assertSingleInstance_onAssertModuleLoad } from './assertSingleInstance.
|
|
|
12
12
|
import { createErrorWithCleanStackTrace } from './createErrorWithCleanStackTrace.js';
|
|
13
13
|
import { getGlobalObject } from './getGlobalObject.js';
|
|
14
14
|
import { isObject } from './isObject.js';
|
|
15
|
-
import {
|
|
15
|
+
import { PROJECT_VERSION } from './PROJECT_VERSION.js';
|
|
16
16
|
import pc from '@brillout/picocolors';
|
|
17
17
|
const globalObject = getGlobalObject('utils/assert.ts', {
|
|
18
18
|
alreadyLogged: new Set(),
|
|
@@ -29,7 +29,7 @@ const globalObject = getGlobalObject('utils/assert.ts', {
|
|
|
29
29
|
});
|
|
30
30
|
assertSingleInstance_onAssertModuleLoad();
|
|
31
31
|
const projectTag = `[vike]`;
|
|
32
|
-
const projectTagWithVersion = `[vike@${
|
|
32
|
+
const projectTagWithVersion = `[vike@${PROJECT_VERSION}]`;
|
|
33
33
|
const bugTag = 'Bug';
|
|
34
34
|
const numberOfStackTraceLinesToRemove = 2;
|
|
35
35
|
function assert(condition, debugInfo) {
|
|
@@ -56,7 +56,7 @@ function assert(condition, debugInfo) {
|
|
|
56
56
|
globalObject.onBeforeLog?.();
|
|
57
57
|
throw internalError;
|
|
58
58
|
}
|
|
59
|
-
function assertUsage(condition, errMsg, { showStackTrace } = {}) {
|
|
59
|
+
function assertUsage(condition, errMsg, { showStackTrace, exitOnError } = {}) {
|
|
60
60
|
if (condition)
|
|
61
61
|
return;
|
|
62
62
|
showStackTrace = showStackTrace || globalObject.alwaysShowStackTrace;
|
|
@@ -68,7 +68,13 @@ function assertUsage(condition, errMsg, { showStackTrace } = {}) {
|
|
|
68
68
|
globalObject.showStackTraceList.add(usageError);
|
|
69
69
|
}
|
|
70
70
|
globalObject.onBeforeLog?.();
|
|
71
|
-
|
|
71
|
+
if (!exitOnError) {
|
|
72
|
+
throw usageError;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
console.error(showStackTrace ? usageError : errMsg);
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
72
78
|
}
|
|
73
79
|
function getProjectError(errMsg) {
|
|
74
80
|
errMsg = addWhitespace(errMsg);
|
|
@@ -182,6 +188,7 @@ function overwriteAssertProductionLogger(logger) {
|
|
|
182
188
|
function isBug(err) {
|
|
183
189
|
return String(err).includes(`[${bugTag}]`);
|
|
184
190
|
}
|
|
191
|
+
// Called upon `DEBUG=vike:error`
|
|
185
192
|
function setAlwaysShowStackTrace() {
|
|
186
193
|
globalObject.alwaysShowStackTrace = true;
|
|
187
194
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export { assertSingleInstance_onClientEntryServerRouting };
|
|
2
2
|
export { assertSingleInstance_onClientEntryClientRouting };
|
|
3
3
|
export { assertSingleInstance_onAssertModuleLoad };
|
|
4
|
-
// -
|
|
4
|
+
// - Show warning if there are two different Vike versions loaded
|
|
5
5
|
// - Show warning if entry of Client Routing and entry of Server Routing are both loaded
|
|
6
|
-
// - Show warning if
|
|
6
|
+
// - Show warning if Vike is loaded twice
|
|
7
7
|
import { unique } from './unique.js';
|
|
8
8
|
import { getGlobalObject } from './getGlobalObject.js';
|
|
9
|
-
import { projectInfo } from './projectInfo.js';
|
|
10
9
|
import pc from '@brillout/picocolors';
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import { PROJECT_VERSION } from './PROJECT_VERSION.js';
|
|
11
|
+
/* Use original assertWarning() after all CJS is removed from node_modules/vike/dist/
|
|
12
|
+
import { assertWarning } from './assert.js'
|
|
13
13
|
*/
|
|
14
14
|
const globalObject = getGlobalObject('utils/assertSingleInstance.ts', {
|
|
15
15
|
instances: [],
|
|
@@ -20,9 +20,10 @@ const clientNotSingleInstance = 'Client runtime loaded twice https://vike.dev/cl
|
|
|
20
20
|
function assertSingleInstance() {
|
|
21
21
|
{
|
|
22
22
|
const versions = unique(globalObject.instances);
|
|
23
|
-
|
|
24
|
-
//
|
|
25
|
-
|
|
23
|
+
assertWarning(versions.length <= 1,
|
|
24
|
+
// Do *NOT* patch Vike to remove this warning: you *will* eventually encounter the issues listed at https://vike.dev/warning/version-mismatch
|
|
25
|
+
// - This happened before: https://github.com/vikejs/vike/issues/1108#issuecomment-1719061509
|
|
26
|
+
`vike@${pc.bold(versions[0])} and vike@${pc.bold(versions[1])} loaded which is highly discouraged, see ${pc.underline('https://vike.dev/warning/version-mismatch')}`, { onlyOnce: true, showStackTrace: false });
|
|
26
27
|
}
|
|
27
28
|
if (globalObject.checkSingleInstance && globalObject.instances.length > 1) {
|
|
28
29
|
/*/ Not sure whether circular dependency can cause problems? In principle not since client-side code is ESM.
|
|
@@ -62,21 +63,14 @@ function assertSingleInstance_onClientEntryClientRouting(isProduction) {
|
|
|
62
63
|
}
|
|
63
64
|
// Called by utils/assert.ts which is (most certainly) loaded by all entries. That way we don't have to call a callback for every entry. (There are a lot of entries: `client/router/`, `client/`, `node/runtime/`, `node/plugin/`, `node/cli`.)
|
|
64
65
|
function assertSingleInstance_onAssertModuleLoad() {
|
|
65
|
-
globalObject.instances.push(
|
|
66
|
+
globalObject.instances.push(PROJECT_VERSION);
|
|
66
67
|
assertSingleInstance();
|
|
67
68
|
}
|
|
68
|
-
function assertUsage(condition, errorMessage) {
|
|
69
|
-
if (condition) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
const errMsg = `[vike][Wrong Usage] ${errorMessage}`;
|
|
73
|
-
throw new Error(errMsg);
|
|
74
|
-
}
|
|
75
69
|
function assertWarning(condition, errorMessage, { onlyOnce, showStackTrace }) {
|
|
76
70
|
if (condition) {
|
|
77
71
|
return;
|
|
78
72
|
}
|
|
79
|
-
const msg = `[
|
|
73
|
+
const msg = `[Vike][Warning] ${errorMessage}`;
|
|
80
74
|
if (onlyOnce) {
|
|
81
75
|
const { alreadyLogged } = globalObject;
|
|
82
76
|
const key = onlyOnce === true ? msg : onlyOnce;
|
package/dist/esm/utils/debug.js
CHANGED
|
@@ -11,6 +11,8 @@ import { isArray } from './isArray.js';
|
|
|
11
11
|
// Avoid this to be loaded in the browser. For isomorphic code: instead of `import { createDebugger } from './utils.js'`, use `globalThis.createDebugger()`.
|
|
12
12
|
assert(!isBrowser());
|
|
13
13
|
globalThis.__brillout_debug_createDebugger = createDebugger;
|
|
14
|
+
// We purposely read process.env.DEBUG early, in order to avoid users from the temptation to set process.env.DEBUG with JavaScript, since reading & writing process.env.DEBUG dynamically leads to inconsistencies: for example https://github.com/vikejs/vike/issues/2239
|
|
15
|
+
const DEBUG = getDEBUG() ?? '';
|
|
14
16
|
const flags = [
|
|
15
17
|
'vike:crawl',
|
|
16
18
|
'vike:error',
|
|
@@ -145,7 +147,6 @@ function assertFlagsActivated() {
|
|
|
145
147
|
});
|
|
146
148
|
}
|
|
147
149
|
function getFlagsActivated() {
|
|
148
|
-
const DEBUG = getDEBUG() ?? '';
|
|
149
150
|
const flagsActivated = DEBUG.match(flagRegex) ?? [];
|
|
150
151
|
const all = DEBUG.includes('vike:*');
|
|
151
152
|
return { flagsActivated, all };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { getRandomId };
|
|
2
|
-
declare function getRandomId(length
|
|
2
|
+
declare function getRandomId(length?: number): string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { getRandomId };
|
|
2
2
|
import { assert } from './assert.js';
|
|
3
3
|
// https://stackoverflow.com/questions/1349404/generate-random-string-characters-in-javascript
|
|
4
|
-
function getRandomId(length) {
|
|
4
|
+
function getRandomId(length = 12) {
|
|
5
5
|
let randomId = '';
|
|
6
6
|
while (randomId.length < length) {
|
|
7
7
|
randomId += Math.random().toString(36).slice(2);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { normalizeHeaders };
|
|
2
2
|
import { isObject } from './isObject.js';
|
|
3
3
|
function normalizeHeaders(
|
|
4
|
-
/* This type is
|
|
4
|
+
/* This type is too strict which is annoying: cannot pass `string[][]` because it doesn't match the more precise type `[string,string][]`.
|
|
5
5
|
headersOriginal ConstructorParameters<typeof Headers>[0]
|
|
6
6
|
*/
|
|
7
7
|
headersOriginal) {
|
|
@@ -92,6 +92,7 @@ function modifyUrlPathname(url, modifier) {
|
|
|
92
92
|
function removeUrlOrigin(url) {
|
|
93
93
|
const { origin, pathnameOriginal, searchOriginal, hashOriginal } = parseUrl(url, '/');
|
|
94
94
|
const urlModified = createUrlFromComponents(null, pathnameOriginal, searchOriginal, hashOriginal);
|
|
95
|
+
assert(urlModified.startsWith('/'));
|
|
95
96
|
return { urlModified, origin };
|
|
96
97
|
}
|
|
97
98
|
function setUrlOrigin(url, origin) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vike",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.225-commit-37a36a5",
|
|
4
4
|
"repository": "https://github.com/vikejs/vike",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./server": {
|
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
"json5": "^2.0.0",
|
|
132
132
|
"picomatch": "^4.0.2",
|
|
133
133
|
"semver": "^7.0.0",
|
|
134
|
+
"sirv": "^3.0.1",
|
|
134
135
|
"source-map-support": "^0.5.0",
|
|
135
136
|
"tinyglobby": "^0.2.10",
|
|
136
137
|
"vite": ">=5.1.0"
|
|
@@ -253,8 +254,8 @@
|
|
|
253
254
|
"@types/source-map-support": "^0.5.10",
|
|
254
255
|
"react-streaming": "^0.3.47",
|
|
255
256
|
"rimraf": "^5.0.5",
|
|
256
|
-
"typescript": "^5.
|
|
257
|
-
"vite": "^6.2.
|
|
257
|
+
"typescript": "^5.8.2",
|
|
258
|
+
"vite": "^6.2.1"
|
|
258
259
|
},
|
|
259
260
|
"scripts": {
|
|
260
261
|
"dev": "tsc --watch",
|
|
@@ -263,8 +264,10 @@
|
|
|
263
264
|
"build:cjs": "pnpm run build:cjs:ts && pnpm run build:cjs:fixup",
|
|
264
265
|
"build:cjs:ts": "tsc --project ./tsconfig.cjs.json",
|
|
265
266
|
"build:cjs:fixup": "node ./dist-cjs-fixup.mjs",
|
|
267
|
+
"========= Release": "",
|
|
266
268
|
"release": "release-me patch",
|
|
267
269
|
"release:minor": "release-me minor",
|
|
270
|
+
"release:major": "release-me major",
|
|
268
271
|
"release:commit": "release-me commit"
|
|
269
272
|
}
|
|
270
273
|
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.projectInfo = void 0;
|
|
4
|
-
const PROJECT_VERSION_js_1 = require("./PROJECT_VERSION.js");
|
|
5
|
-
exports.projectInfo = {
|
|
6
|
-
projectName: 'Vike',
|
|
7
|
-
projectVersion: PROJECT_VERSION_js_1.PROJECT_VERSION
|
|
8
|
-
};
|