@kimesh/auto-import 0.2.45 → 0.2.46
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.
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
2
|
-
import { t as OxcExportScanner } from "./oxc-scanner-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-wcPFST8Q.mjs";
|
|
2
|
+
import { t as OxcExportScanner } from "./oxc-scanner-BXI5z8Xh.mjs";
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import * as path from "pathe";
|
|
5
5
|
import { consola } from "consola";
|
|
6
6
|
import { MIDDLEWARE_HELPER_NAMES, ROUTER_RUNTIME_SOURCE } from "@kimesh/shared";
|
|
7
|
-
|
|
8
7
|
//#region src/registry/utils.ts
|
|
9
8
|
/**
|
|
10
9
|
* @kimesh/auto-import - Registry Utilities
|
|
@@ -63,7 +62,6 @@ function collectExistingDirectories(layerPath, dirs) {
|
|
|
63
62
|
}
|
|
64
63
|
return result;
|
|
65
64
|
}
|
|
66
|
-
|
|
67
65
|
//#endregion
|
|
68
66
|
//#region src/registry/conflict-resolver.ts
|
|
69
67
|
var ConflictResolver = class {
|
|
@@ -143,7 +141,6 @@ var ConflictResolver = class {
|
|
|
143
141
|
this.conflicts = [];
|
|
144
142
|
}
|
|
145
143
|
};
|
|
146
|
-
|
|
147
144
|
//#endregion
|
|
148
145
|
//#region src/presets/index.ts
|
|
149
146
|
/**
|
|
@@ -459,7 +456,6 @@ function resolvePresets(presets) {
|
|
|
459
456
|
}
|
|
460
457
|
return resolved;
|
|
461
458
|
}
|
|
462
|
-
|
|
463
459
|
//#endregion
|
|
464
460
|
//#region src/registry/builder.ts
|
|
465
461
|
/**
|
|
@@ -650,6 +646,5 @@ var RegistryBuilder = class {
|
|
|
650
646
|
this.resolver.clear();
|
|
651
647
|
}
|
|
652
648
|
};
|
|
653
|
-
|
|
654
649
|
//#endregion
|
|
655
|
-
export { normalizePreset as a, tanstackQueryPreset as c, ConflictResolver as d, collectExistingDirectories as f, kimeshPreset as i, vuePreset as l, builder_exports as n, piniaPreset as o, builtinPresets as r, resolvePresets as s, RegistryBuilder as t, vueRouterPreset as u };
|
|
650
|
+
export { normalizePreset as a, tanstackQueryPreset as c, ConflictResolver as d, collectExistingDirectories as f, kimeshPreset as i, vuePreset as l, builder_exports as n, piniaPreset as o, builtinPresets as r, resolvePresets as s, RegistryBuilder as t, vueRouterPreset as u };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as OxcExportScanner } from "./oxc-scanner-
|
|
2
|
-
import { a as normalizePreset, c as tanstackQueryPreset, d as ConflictResolver, f as collectExistingDirectories, i as kimeshPreset, l as vuePreset, o as piniaPreset, r as builtinPresets, s as resolvePresets, t as RegistryBuilder, u as vueRouterPreset } from "./builder-
|
|
1
|
+
import { t as OxcExportScanner } from "./oxc-scanner-BXI5z8Xh.mjs";
|
|
2
|
+
import { a as normalizePreset, c as tanstackQueryPreset, d as ConflictResolver, f as collectExistingDirectories, i as kimeshPreset, l as vuePreset, o as piniaPreset, r as builtinPresets, s as resolvePresets, t as RegistryBuilder, u as vueRouterPreset } from "./builder-DzyXmjfD.mjs";
|
|
3
3
|
import { parseSync } from "oxc-parser";
|
|
4
4
|
import { parse } from "@vue/compiler-sfc";
|
|
5
5
|
import * as fs from "node:fs";
|
|
@@ -8,7 +8,6 @@ import { consola } from "consola";
|
|
|
8
8
|
import { MIDDLEWARE_HELPER_NAMES } from "@kimesh/shared";
|
|
9
9
|
import MagicString from "magic-string";
|
|
10
10
|
import Components from "unplugin-vue-components/vite";
|
|
11
|
-
|
|
12
11
|
//#region src/scanner/reference-detector.ts
|
|
13
12
|
/**
|
|
14
13
|
* @kimesh/auto-import - Unresolved Reference Detector
|
|
@@ -372,7 +371,6 @@ var ReferenceDetector = class {
|
|
|
372
371
|
return key === "type" || key === "start" || key === "end" || key === "_parent" || key === "loc" || key === "range";
|
|
373
372
|
}
|
|
374
373
|
};
|
|
375
|
-
|
|
376
374
|
//#endregion
|
|
377
375
|
//#region src/script/injector.ts
|
|
378
376
|
/**
|
|
@@ -481,7 +479,6 @@ var ImportInjector = class {
|
|
|
481
479
|
}).join("\n");
|
|
482
480
|
}
|
|
483
481
|
};
|
|
484
|
-
|
|
485
482
|
//#endregion
|
|
486
483
|
//#region src/types/generator.ts
|
|
487
484
|
/**
|
|
@@ -640,7 +637,6 @@ function generateSourceDts(source, entries) {
|
|
|
640
637
|
}
|
|
641
638
|
return lines.join("\n");
|
|
642
639
|
}
|
|
643
|
-
|
|
644
640
|
//#endregion
|
|
645
641
|
//#region src/script/plugin.ts
|
|
646
642
|
const logger$1 = consola.withTag("kimesh:auto-import:script");
|
|
@@ -855,7 +851,6 @@ function shouldTransform(id, include, exclude) {
|
|
|
855
851
|
if (exclude.some((pattern) => matchesPattern(id, pattern))) return false;
|
|
856
852
|
return include.some((pattern) => matchesPattern(id, pattern));
|
|
857
853
|
}
|
|
858
|
-
|
|
859
854
|
//#endregion
|
|
860
855
|
//#region src/template/resolver.ts
|
|
861
856
|
const logger = consola.withTag("kimesh:auto-import:template:resolver");
|
|
@@ -906,7 +901,6 @@ function createKimeshResolver(options) {
|
|
|
906
901
|
}
|
|
907
902
|
};
|
|
908
903
|
}
|
|
909
|
-
|
|
910
904
|
//#endregion
|
|
911
905
|
//#region src/template/plugin.ts
|
|
912
906
|
function resolveDtsPath(dts) {
|
|
@@ -950,8 +944,7 @@ function createTemplatePlugin(options) {
|
|
|
950
944
|
exclude: [/[\\/]node_modules[\\/]/],
|
|
951
945
|
deep: true,
|
|
952
946
|
directoryAsNamespace: false,
|
|
953
|
-
collapseSamePrefixes: true
|
|
954
|
-
version: 3
|
|
947
|
+
collapseSamePrefixes: true
|
|
955
948
|
});
|
|
956
949
|
const plugin = basePlugin;
|
|
957
950
|
plugin.name = "kimesh:auto-import:template";
|
|
@@ -1012,7 +1005,6 @@ function replaceAllOccurrences(s, code, search, replacement) {
|
|
|
1012
1005
|
searchIndex = idx + search.length;
|
|
1013
1006
|
}
|
|
1014
1007
|
}
|
|
1015
|
-
|
|
1016
1008
|
//#endregion
|
|
1017
1009
|
//#region src/vite/plugin.ts
|
|
1018
1010
|
function resolveDtsDirectory(dts) {
|
|
@@ -1036,23 +1028,21 @@ function autoImportPlugin(options) {
|
|
|
1036
1028
|
})];
|
|
1037
1029
|
}
|
|
1038
1030
|
const kimeshAutoImport = autoImportPlugin;
|
|
1039
|
-
|
|
1040
1031
|
//#endregion
|
|
1041
1032
|
//#region src/index.ts
|
|
1042
1033
|
/**
|
|
1043
1034
|
* Build import registry from sources (convenience function)
|
|
1044
1035
|
*/
|
|
1045
1036
|
async function buildImportRegistry(sources) {
|
|
1046
|
-
const { RegistryBuilder } = await import("./builder-
|
|
1037
|
+
const { RegistryBuilder } = await import("./builder-DzyXmjfD.mjs").then((n) => n.n);
|
|
1047
1038
|
return new RegistryBuilder().build(sources);
|
|
1048
1039
|
}
|
|
1049
1040
|
/**
|
|
1050
1041
|
* Scan exports from a file (convenience function)
|
|
1051
1042
|
*/
|
|
1052
1043
|
async function scanExports(filePath) {
|
|
1053
|
-
const { OxcExportScanner } = await import("./oxc-scanner-
|
|
1044
|
+
const { OxcExportScanner } = await import("./oxc-scanner-BXI5z8Xh.mjs").then((n) => n.n);
|
|
1054
1045
|
return new OxcExportScanner().scanFile(filePath);
|
|
1055
1046
|
}
|
|
1056
|
-
|
|
1057
1047
|
//#endregion
|
|
1058
|
-
export { ConflictResolver, ImportInjector, OxcExportScanner, ReferenceDetector, RegistryBuilder, autoImportPlugin, autoImportPlugin as default, buildImportRegistry, builtinPresets, createTemplatePlugin as createComponentsPlugin, createTemplatePlugin, createKimeshResolver, createScriptPlugin, generateDtsFiles as generateDts, generateDtsFiles, generateSourceDts, kimeshAutoImport, kimeshPreset, normalizePreset, piniaPreset, resolvePresets, scanExports, tanstackQueryPreset, vuePreset, vueRouterPreset };
|
|
1048
|
+
export { ConflictResolver, ImportInjector, OxcExportScanner, ReferenceDetector, RegistryBuilder, autoImportPlugin, autoImportPlugin as default, buildImportRegistry, builtinPresets, createTemplatePlugin as createComponentsPlugin, createTemplatePlugin, createKimeshResolver, createScriptPlugin, generateDtsFiles as generateDts, generateDtsFiles, generateSourceDts, kimeshAutoImport, kimeshPreset, normalizePreset, piniaPreset, resolvePresets, scanExports, tanstackQueryPreset, vuePreset, vueRouterPreset };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
import { t as __exportAll } from "./rolldown-runtime-wcPFST8Q.mjs";
|
|
2
2
|
import { parseSync } from "oxc-parser";
|
|
3
3
|
import { parse } from "@vue/compiler-sfc";
|
|
4
4
|
import * as fs from "node:fs";
|
|
5
5
|
import * as path from "pathe";
|
|
6
6
|
import { createHash } from "node:crypto";
|
|
7
7
|
import { consola } from "consola";
|
|
8
|
-
|
|
9
8
|
//#region src/scanner/oxc-scanner.ts
|
|
10
9
|
/**
|
|
11
10
|
* @kimesh/auto-import - OXC Export Scanner
|
|
@@ -191,6 +190,5 @@ var OxcExportScanner = class {
|
|
|
191
190
|
};
|
|
192
191
|
}
|
|
193
192
|
};
|
|
194
|
-
|
|
195
193
|
//#endregion
|
|
196
|
-
export { oxc_scanner_exports as n, OxcExportScanner as t };
|
|
194
|
+
export { oxc_scanner_exports as n, OxcExportScanner as t };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
|
+
let target = {};
|
|
5
|
+
for (var name in all) __defProp(target, name, {
|
|
6
|
+
get: all[name],
|
|
7
|
+
enumerable: true
|
|
8
|
+
});
|
|
9
|
+
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
10
|
+
return target;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { __exportAll as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kimesh/auto-import",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.46",
|
|
4
4
|
"description": "OXC-powered auto-import system for Kimesh framework with layer support",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
"test": "vitest"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@kimesh/shared": "0.2.
|
|
28
|
+
"@kimesh/shared": "0.2.46",
|
|
29
29
|
"@vue/compiler-sfc": "^3.5.29",
|
|
30
30
|
"consola": "^3.4.2",
|
|
31
31
|
"magic-string": "^0.30.21",
|
|
32
32
|
"oxc-parser": "^0.115.0",
|
|
33
33
|
"pathe": "^2.0.3",
|
|
34
|
-
"unplugin-vue-components": "^
|
|
34
|
+
"unplugin-vue-components": "^31.0.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^25.0.8",
|
|
38
|
-
"tsdown": "^0.
|
|
38
|
+
"tsdown": "^0.21.2",
|
|
39
39
|
"typescript": "^5.9.3",
|
|
40
|
-
"vite": "^8.0.0
|
|
40
|
+
"vite": "^8.0.0",
|
|
41
41
|
"vitest": "^4.0.17"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
|
-
"vite": "^8.0.0
|
|
44
|
+
"vite": "^8.0.0"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//#region \0rolldown/runtime.js
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __exportAll = (all, no_symbols) => {
|
|
4
|
-
let target = {};
|
|
5
|
-
for (var name in all) {
|
|
6
|
-
__defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: true
|
|
9
|
-
});
|
|
10
|
-
}
|
|
11
|
-
if (!no_symbols) {
|
|
12
|
-
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
|
-
}
|
|
14
|
-
return target;
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
//#endregion
|
|
18
|
-
export { __exportAll as t };
|