@kimesh/kit 0.2.44 → 0.2.45
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/index.mjs +7 -7
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -7,8 +7,8 @@ import { fileURLToPath, pathToFileURL } from "node:url";
|
|
|
7
7
|
import consola from "consola";
|
|
8
8
|
import { existsSync, mkdirSync, readFileSync, realpathSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
10
|
-
import fg from "fast-glob";
|
|
11
10
|
import { basename, dirname as dirname$1, extname, isAbsolute as isAbsolute$1, join as join$1, normalize, relative, resolve as resolve$1 } from "pathe";
|
|
11
|
+
import fg from "fast-glob";
|
|
12
12
|
import { resolveModulePath } from "exsolve";
|
|
13
13
|
import ignore from "ignore";
|
|
14
14
|
import pc from "picocolors";
|
|
@@ -901,13 +901,13 @@ function _addImportsPreset(kimesh, preset) {
|
|
|
901
901
|
* ```
|
|
902
902
|
*/
|
|
903
903
|
function createResolver(base) {
|
|
904
|
-
const baseDir = base.startsWith("file://") ? dirname(
|
|
904
|
+
const baseDir = base.startsWith("file://") ? dirname$1(fileURLToPath(base)) : dirname$1(base);
|
|
905
905
|
return {
|
|
906
906
|
resolve(...paths) {
|
|
907
|
-
return resolve(baseDir, ...paths);
|
|
907
|
+
return resolve$1(baseDir, ...paths);
|
|
908
908
|
},
|
|
909
909
|
async resolvePath(path) {
|
|
910
|
-
const resolved = resolve(baseDir, path);
|
|
910
|
+
const resolved = resolve$1(baseDir, path);
|
|
911
911
|
if (!existsSync(resolved)) throw new Error(`Path not found: ${resolved}`);
|
|
912
912
|
return resolved;
|
|
913
913
|
},
|
|
@@ -922,13 +922,13 @@ function createResolver(base) {
|
|
|
922
922
|
* Resolve a path relative to project root
|
|
923
923
|
*/
|
|
924
924
|
function resolvePathFromRoot(...paths) {
|
|
925
|
-
return resolve(useKimesh().root, ...paths);
|
|
925
|
+
return resolve$1(useKimesh().root, ...paths);
|
|
926
926
|
}
|
|
927
927
|
/**
|
|
928
928
|
* Resolve a path relative to build directory
|
|
929
929
|
*/
|
|
930
930
|
function resolvePathFromBuild(...paths) {
|
|
931
|
-
return resolve(useKimesh().buildDir, ...paths);
|
|
931
|
+
return resolve$1(useKimesh().buildDir, ...paths);
|
|
932
932
|
}
|
|
933
933
|
|
|
934
934
|
//#endregion
|
|
@@ -1139,7 +1139,7 @@ function generatePluginsTemplate(options) {
|
|
|
1139
1139
|
let importPath;
|
|
1140
1140
|
if (isPackageOrAliasPath) importPath = plugin.src;
|
|
1141
1141
|
else {
|
|
1142
|
-
let relativePath = relative(buildDir, plugin.src).replace(/\.ts$/, "");
|
|
1142
|
+
let relativePath = relative(buildDir, plugin.src.replace(/\\/g, "/")).replace(/\.ts$/, "");
|
|
1143
1143
|
if (!relativePath.startsWith(".") && !relativePath.startsWith("/")) relativePath = "./" + relativePath;
|
|
1144
1144
|
importPath = relativePath;
|
|
1145
1145
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kimesh/kit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.45",
|
|
4
4
|
"description": "Build-time engine for Kimesh framework",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
"test:watch": "vitest"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@kimesh/auto-import": "0.2.
|
|
31
|
-
"@kimesh/layers": "0.2.
|
|
32
|
-
"@kimesh/router-generator": "0.2.
|
|
30
|
+
"@kimesh/auto-import": "0.2.45",
|
|
31
|
+
"@kimesh/layers": "0.2.45",
|
|
32
|
+
"@kimesh/router-generator": "0.2.45",
|
|
33
33
|
"@vitejs/plugin-vue": "^6.0.4",
|
|
34
34
|
"c12": "^3.3.3",
|
|
35
35
|
"consola": "^3.4.2",
|