vike 0.4.237-commit-8749e81 → 0.4.237-commit-92dc549
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/runtime/html/injectAssets/getHtmlTags.js +1 -1
- package/dist/cjs/node/runtime/renderPage.js +12 -7
- package/dist/cjs/node/runtime/utils.js +1 -1
- package/dist/cjs/node/vite/plugins/pluginBuild/handleAssetsManifest.js +12 -11
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginAutoFullBuild.js +8 -7
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginBuildConfig.js +5 -5
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginBuildEntry.js +1 -1
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginDistPackageJsonFile.js +2 -10
- package/dist/cjs/node/vite/plugins/pluginBuild/pluginModuleBanner.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginDev/determineFsAllowList.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginEnvVars.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginExtractAssets.js +3 -3
- package/dist/cjs/node/vite/plugins/pluginExtractExportNames.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginNonRunnableDev.js +1 -1
- package/dist/cjs/node/vite/plugins/pluginReplaceConstants.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginVirtualFiles/generateVirtualFileGlobalEntryWithOldDesign.js +2 -2
- package/dist/cjs/node/vite/plugins/pluginVirtualFiles/getConfigValueSourcesRelevant.js +51 -21
- package/dist/cjs/node/vite/shared/getClientEntrySrcDev.js +1 -1
- package/dist/cjs/node/vite/shared/getHttpRequestAsyncStore.js +8 -6
- package/dist/cjs/node/vite/shared/getOutDirs.js +9 -6
- package/dist/cjs/node/vite/shared/{isViteServerBuild.js → isViteServerSide.js} +15 -15
- package/dist/cjs/node/vite/shared/loggerVite/removeSuperfluousViteLog.js +6 -4
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/configDefinitionsBuiltIn.js +20 -36
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal/crawlPlusFiles.js +5 -4
- package/dist/cjs/node/vite/shared/resolveVikeConfigInternal.js +42 -44
- package/dist/cjs/types/VikeGlobalInternal.js +2 -0
- package/dist/cjs/utils/PROJECT_VERSION.js +1 -1
- package/dist/cjs/utils/assertVersion.js +2 -0
- package/dist/cjs/utils/debug.js +4 -4
- package/dist/cjs/utils/getGlobalObject.js +8 -15
- package/dist/cjs/utils/isScriptFile.js +1 -1
- package/dist/cjs/utils/path.js +5 -5
- package/dist/cjs/utils/requireResolve.js +13 -12
- package/dist/esm/client/runtime-client-routing/renderPageClientSide.d.ts +2 -3
- package/dist/esm/node/runtime/html/injectAssets/getHtmlTags.js +1 -1
- package/dist/esm/node/runtime/renderPage.d.ts +7 -4
- package/dist/esm/node/runtime/renderPage.js +12 -7
- package/dist/esm/node/runtime/utils.d.ts +1 -1
- package/dist/esm/node/runtime/utils.js +1 -1
- package/dist/esm/node/vite/plugins/pluginBuild/handleAssetsManifest.js +13 -12
- package/dist/esm/node/vite/plugins/pluginBuild/pluginAutoFullBuild.js +9 -8
- package/dist/esm/node/vite/plugins/pluginBuild/pluginBuildConfig.js +6 -6
- package/dist/esm/node/vite/plugins/pluginBuild/pluginBuildEntry.js +2 -2
- package/dist/esm/node/vite/plugins/pluginBuild/pluginDistPackageJsonFile.js +2 -10
- package/dist/esm/node/vite/plugins/pluginBuild/pluginModuleBanner.js +2 -2
- package/dist/esm/node/vite/plugins/pluginDev/determineFsAllowList.js +3 -3
- package/dist/esm/node/vite/plugins/pluginEnvVars.js +2 -2
- package/dist/esm/node/vite/plugins/pluginExtractAssets.js +3 -3
- package/dist/esm/node/vite/plugins/pluginExtractExportNames.js +2 -2
- package/dist/esm/node/vite/plugins/pluginNonRunnableDev.js +2 -2
- package/dist/esm/node/vite/plugins/pluginReplaceConstants.js +2 -2
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/generateVirtualFileGlobalEntryWithOldDesign.js +2 -2
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/getConfigValueSourcesRelevant.d.ts +5 -1
- package/dist/esm/node/vite/plugins/pluginVirtualFiles/getConfigValueSourcesRelevant.js +52 -22
- package/dist/esm/node/vite/shared/getClientEntrySrcDev.js +2 -2
- package/dist/esm/node/vite/shared/getHttpRequestAsyncStore.js +9 -7
- package/dist/esm/node/vite/shared/getOutDirs.d.ts +1 -1
- package/dist/esm/node/vite/shared/getOutDirs.js +9 -6
- package/dist/esm/node/vite/shared/isViteServerSide.d.ts +18 -0
- package/dist/esm/node/vite/shared/{isViteServerBuild.js → isViteServerSide.js} +15 -17
- package/dist/esm/node/vite/shared/loggerVite/removeSuperfluousViteLog.js +7 -5
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/configDefinitionsBuiltIn.d.ts +3 -2
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/configDefinitionsBuiltIn.js +21 -37
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal/crawlPlusFiles.js +6 -5
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal.d.ts +2 -0
- package/dist/esm/node/vite/shared/resolveVikeConfigInternal.js +43 -45
- package/dist/esm/types/VikeGlobalInternal.d.ts +4 -0
- package/dist/esm/types/VikeGlobalInternal.js +1 -0
- package/dist/esm/utils/PROJECT_VERSION.d.ts +1 -1
- package/dist/esm/utils/PROJECT_VERSION.js +1 -1
- package/dist/esm/utils/assertVersion.js +2 -0
- package/dist/esm/utils/debug.js +3 -3
- package/dist/esm/utils/getGlobalObject.d.ts +6 -5
- package/dist/esm/utils/getGlobalObject.js +8 -15
- package/dist/esm/utils/isScriptFile.d.ts +1 -1
- package/dist/esm/utils/isScriptFile.js +1 -1
- package/dist/esm/utils/path.d.ts +2 -0
- package/dist/esm/utils/path.js +5 -5
- package/dist/esm/utils/requireResolve.d.ts +4 -4
- package/dist/esm/utils/requireResolve.js +13 -12
- package/package.json +2 -2
- package/dist/esm/node/vite/shared/isViteServerBuild.d.ts +0 -18
- /package/dist/cjs/utils/{getTerminWidth.js → getTerminalWidth.js} +0 -0
- /package/dist/esm/utils/{getTerminWidth.d.ts → getTerminalWidth.d.ts} +0 -0
- /package/dist/esm/utils/{getTerminWidth.js → getTerminalWidth.js} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { isScriptFile };
|
|
2
2
|
export { isPlainScriptFile };
|
|
3
3
|
export { isTemplateFile };
|
|
4
|
-
export { scriptFileExtensionPattern };
|
|
5
4
|
export { scriptFileExtensionList };
|
|
5
|
+
export { scriptFileExtensionPattern };
|
|
6
6
|
// We can't use a RegExp:
|
|
7
7
|
// - Needs to work with Micromatch: https://github.com/micromatch/micromatch because:
|
|
8
8
|
// - Vite's `import.meta.glob()` uses Micromatch
|
package/dist/esm/utils/path.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export { pathJoin };
|
|
2
2
|
export { pathIsRelative };
|
|
3
|
+
export { pathIsAbsolute };
|
|
3
4
|
export { toPosixPath };
|
|
4
5
|
export { assertPosixPath };
|
|
5
6
|
/**********************/
|
|
6
7
|
/****** SHIMS *********/
|
|
7
8
|
/**********************/
|
|
8
9
|
declare function pathJoin(path1: string, path2: string): string;
|
|
10
|
+
declare function pathIsAbsolute(filePath: string): boolean;
|
|
9
11
|
/**********************/
|
|
10
12
|
/****** UTILS *********/
|
|
11
13
|
/**********************/
|
package/dist/esm/utils/path.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { pathJoin };
|
|
2
2
|
export { pathIsRelative };
|
|
3
|
+
export { pathIsAbsolute };
|
|
3
4
|
export { toPosixPath };
|
|
4
5
|
export { assertPosixPath };
|
|
5
6
|
// Utilities for handling file paths.
|
|
@@ -20,12 +21,11 @@ function pathJoin(path1, path2) {
|
|
|
20
21
|
joined = '/' + joined;
|
|
21
22
|
return joined;
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
-
const IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]
|
|
25
|
-
function pathIsAbsolute(filePath
|
|
26
|
-
|
|
24
|
+
// https://github.com/brillout/telefunc/blob/0fd44322acbd07857ae29361ba7c998607f17dd5/telefunc/utils/path-shim.ts#L17-L21
|
|
25
|
+
const IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
|
|
26
|
+
function pathIsAbsolute(filePath) {
|
|
27
|
+
return IS_ABSOLUTE_RE.test(filePath);
|
|
27
28
|
}
|
|
28
|
-
//*/
|
|
29
29
|
/**********************/
|
|
30
30
|
/****** UTILS *********/
|
|
31
31
|
/**********************/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { requireResolveOptional };
|
|
2
2
|
export { requireResolveOptionalDir };
|
|
3
3
|
export { requireResolveNpmPackage };
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
4
|
+
export { requireResolveDistFile };
|
|
5
|
+
export { getPackageNodeModulesDirectory };
|
|
6
6
|
declare function requireResolveOptional({ importPath, importerFilePath, userRootDir, }: {
|
|
7
7
|
importPath: string;
|
|
8
8
|
importerFilePath: string;
|
|
@@ -17,5 +17,5 @@ declare function requireResolveNpmPackage({ importPathNpmPackage, userRootDir, }
|
|
|
17
17
|
importPathNpmPackage: string;
|
|
18
18
|
userRootDir: string;
|
|
19
19
|
}): string;
|
|
20
|
-
declare function
|
|
21
|
-
declare function
|
|
20
|
+
declare function requireResolveDistFile(distFile: `dist/esm/${string}.js`): string;
|
|
21
|
+
declare function getPackageNodeModulesDirectory(): string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { requireResolveOptional };
|
|
2
2
|
export { requireResolveOptionalDir };
|
|
3
3
|
export { requireResolveNpmPackage };
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
4
|
+
export { requireResolveDistFile };
|
|
5
|
+
export { getPackageNodeModulesDirectory };
|
|
6
6
|
import { assert } from './assert.js';
|
|
7
7
|
import { assertIsNotBrowser } from './assertIsNotBrowser.js';
|
|
8
8
|
import { assertIsNotProductionRuntime } from './assertSetup.js';
|
|
@@ -104,11 +104,11 @@ function requireResolveNpmPackage({ importPathNpmPackage, userRootDir, }) {
|
|
|
104
104
|
throw res.err;
|
|
105
105
|
return res.importPathResolvedFilePath;
|
|
106
106
|
}
|
|
107
|
-
function
|
|
108
|
-
const
|
|
109
|
-
assertPosixPath(
|
|
110
|
-
assertPosixPath(
|
|
111
|
-
const importPathResolvedFilePath = makeNodeFriendly(path.posix.join(
|
|
107
|
+
function requireResolveDistFile(distFile) {
|
|
108
|
+
const packageNodeModulesDirectory = getPackageNodeModulesDirectory();
|
|
109
|
+
assertPosixPath(packageNodeModulesDirectory);
|
|
110
|
+
assertPosixPath(distFile);
|
|
111
|
+
const importPathResolvedFilePath = makeNodeFriendly(path.posix.join(packageNodeModulesDirectory, distFile));
|
|
112
112
|
// Double check
|
|
113
113
|
{
|
|
114
114
|
const res = requireResolve_(importPathResolvedFilePath,
|
|
@@ -166,11 +166,12 @@ function addFileExtensionsToRequireResolve(require_) {
|
|
|
166
166
|
}
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
// [RELATIVE_PATH_FROM_DIST] Current file:
|
|
171
|
-
assert(importMetaUrl.includes('/dist/esm/') || importMetaUrl.includes('/dist/cjs/'));
|
|
172
|
-
const
|
|
173
|
-
|
|
169
|
+
function getPackageNodeModulesDirectory() {
|
|
170
|
+
// [RELATIVE_PATH_FROM_DIST] Current file: node_modules/${packageName}/dist/esm/utils/requireResolve.js
|
|
171
|
+
assert(importMetaUrl.includes('/dist/esm/utils/') || importMetaUrl.includes('/dist/cjs/utils/'));
|
|
172
|
+
const packageNodeModulesDirectory = path.posix.join(removeFilePrefix(path.dirname(importMetaUrl)), '../../../');
|
|
173
|
+
// Return `node_modules/${packageName}/`
|
|
174
|
+
return packageNodeModulesDirectory;
|
|
174
175
|
}
|
|
175
176
|
function getFakeImporterFile(dirPath) {
|
|
176
177
|
assertPosixPath(dirPath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vike",
|
|
3
|
-
"version": "0.4.237-commit-
|
|
3
|
+
"version": "0.4.237-commit-92dc549",
|
|
4
4
|
"repository": "https://github.com/vikejs/vike",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./server": {
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
},
|
|
130
130
|
"dependencies": {
|
|
131
131
|
"@brillout/import": "^0.2.6",
|
|
132
|
-
"@brillout/json-serializer": "^0.5.
|
|
132
|
+
"@brillout/json-serializer": "^0.5.20",
|
|
133
133
|
"@brillout/picocolors": "^1.0.26",
|
|
134
134
|
"@brillout/require-shim": "^0.1.2",
|
|
135
135
|
"@brillout/vite-plugin-server-entry": "^0.7.12",
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export { isViteServerBuild };
|
|
2
|
-
export { isViteClientBuild };
|
|
3
|
-
export { isViteServerBuild_withoutEnv };
|
|
4
|
-
export { isViteServerBuild_onlySsrEnv };
|
|
5
|
-
export { isViteServerBuild_extraSafe };
|
|
6
|
-
export type { ViteEnv };
|
|
7
|
-
import type { Environment, EnvironmentOptions, ResolvedConfig, UserConfig } from 'vite';
|
|
8
|
-
type ViteEnv = {
|
|
9
|
-
name?: string;
|
|
10
|
-
config: EnvironmentOptions | Environment['config'];
|
|
11
|
-
};
|
|
12
|
-
declare function isViteServerBuild_withoutEnv(configGlobal: ResolvedConfig | UserConfig, viteEnv?: ViteEnv): boolean;
|
|
13
|
-
declare function isViteServerBuild(configGlobal: ResolvedConfig | UserConfig, viteEnv: ViteEnv): boolean;
|
|
14
|
-
declare function isViteClientBuild(configGlobal: ResolvedConfig, viteEnv: ViteEnv): boolean;
|
|
15
|
-
declare function isViteServerBuild_onlySsrEnv(configGlobal: ResolvedConfig, viteEnv: ViteEnv): boolean;
|
|
16
|
-
declare function isViteServerBuild_extraSafe(config: ResolvedConfig, options: {
|
|
17
|
-
ssr?: boolean;
|
|
18
|
-
} | undefined, viteEnv: ViteEnv): boolean;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|