@kimesh/kit 0.2.8 → 0.2.9-nightly.20260126092617
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 +214 -32
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -15,7 +15,7 @@ import pc from "picocolors";
|
|
|
15
15
|
import { defu } from "defu";
|
|
16
16
|
import { loadEnv, mergeConfig } from "vite";
|
|
17
17
|
import vue from "@vitejs/plugin-vue";
|
|
18
|
-
import { kimeshRouterGenerator } from "@kimesh/router-generator";
|
|
18
|
+
import { collectLayerRoutes, createScanner, createTreeBuilder, generateMiddlewareRegistry, generateMiddlewareTypes, generateRouteTypes, generateRoutes, kimeshRouterGenerator, mergeRoutes, scanLayerMiddleware } from "@kimesh/router-generator";
|
|
19
19
|
import { generateLayerAliases, generateLayerAliases as generateLayerAliases$1, mergeLayerConfigs, prepareLayers, prepareLayers as prepareLayers$1, resolveLayers } from "@kimesh/layers";
|
|
20
20
|
import { buildImportRegistry, generateDts, kimeshAutoImport, kimeshAutoImport as kimeshAutoImport$1, scanExports } from "@kimesh/auto-import";
|
|
21
21
|
import { loadConfig as loadConfig$1 } from "c12";
|
|
@@ -1103,15 +1103,23 @@ function addPluginsTemplate(kimesh, discoveredPlugins) {
|
|
|
1103
1103
|
* Each entry maps an internal alias (#kimesh/...) to the actual internal
|
|
1104
1104
|
* package subpath export (@kimesh/...) that should be resolved and re-exported.
|
|
1105
1105
|
*/
|
|
1106
|
-
const INTERNAL_ALIASES = [
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1106
|
+
const INTERNAL_ALIASES = [
|
|
1107
|
+
{
|
|
1108
|
+
alias: "#kimesh/head/plugin",
|
|
1109
|
+
packageSpecifier: "@kimesh/head/plugin",
|
|
1110
|
+
filename: "head-plugin.mjs"
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
alias: "#kimesh/router-runtime/default-app",
|
|
1114
|
+
packageSpecifier: "@kimesh/router-runtime/default-app",
|
|
1115
|
+
filename: "router-runtime-default-app.mjs"
|
|
1116
|
+
},
|
|
1117
|
+
{
|
|
1118
|
+
alias: "#kimesh/middleware/plugin",
|
|
1119
|
+
packageSpecifier: "@kimesh/router-runtime/middleware/plugin",
|
|
1120
|
+
filename: "middleware-plugin.mjs"
|
|
1121
|
+
}
|
|
1122
|
+
];
|
|
1115
1123
|
/**
|
|
1116
1124
|
* Resolve a package specifier to an absolute file path.
|
|
1117
1125
|
* This uses exsolve/createRequire to find the package from @kimesh/kit's location.
|
|
@@ -1651,7 +1659,7 @@ function debugTable(title, data) {
|
|
|
1651
1659
|
* @returns TSConfig JSON object
|
|
1652
1660
|
*/
|
|
1653
1661
|
function generateTsConfig(options) {
|
|
1654
|
-
const { rootDir, srcDir, buildDir, aliases, layerAliases = {}, moduleAliases = {}, internalAliases = {}, include = ["../src/**/*", "./**/*"]
|
|
1662
|
+
const { rootDir, srcDir, buildDir, aliases, layerAliases = {}, moduleAliases = {}, internalAliases = {}, include = ["../src/**/*", "./**/*"] } = options;
|
|
1655
1663
|
const allAliases = {
|
|
1656
1664
|
...aliases,
|
|
1657
1665
|
...layerAliases,
|
|
@@ -1665,6 +1673,16 @@ function generateTsConfig(options) {
|
|
|
1665
1673
|
paths[alias] = [normalizedPath];
|
|
1666
1674
|
paths[`${alias}/*`] = [`${normalizedPath}/*`];
|
|
1667
1675
|
}
|
|
1676
|
+
for (const pkg of [
|
|
1677
|
+
"@kimesh/router-runtime",
|
|
1678
|
+
"@kimesh/kit",
|
|
1679
|
+
"@kimesh/cli",
|
|
1680
|
+
"@kimesh/head",
|
|
1681
|
+
"@kimesh/query"
|
|
1682
|
+
]) {
|
|
1683
|
+
paths[pkg] = [`../node_modules/${pkg}`];
|
|
1684
|
+
paths[`${pkg}/*`] = [`../node_modules/${pkg}/*`];
|
|
1685
|
+
}
|
|
1668
1686
|
return {
|
|
1669
1687
|
compilerOptions: {
|
|
1670
1688
|
target: "ESNext",
|
|
@@ -1681,8 +1699,7 @@ function generateTsConfig(options) {
|
|
|
1681
1699
|
baseUrl: ".",
|
|
1682
1700
|
paths
|
|
1683
1701
|
},
|
|
1684
|
-
include
|
|
1685
|
-
exclude
|
|
1702
|
+
include
|
|
1686
1703
|
};
|
|
1687
1704
|
}
|
|
1688
1705
|
/**
|
|
@@ -1696,6 +1713,8 @@ function writeTsConfig(options) {
|
|
|
1696
1713
|
const tsconfig = generateTsConfig(options);
|
|
1697
1714
|
writeFileSync(join$1(buildDir, "tsconfig.json"), JSON.stringify(tsconfig, null, 2), "utf-8");
|
|
1698
1715
|
writeFileSync(join$1(buildDir, "kimesh.d.ts"), generateKimeshDts(), "utf-8");
|
|
1716
|
+
writeFileSync(join$1(buildDir, "plugins.d.ts"), generatePluginsDts(), "utf-8");
|
|
1717
|
+
writeFileSync(join$1(buildDir, "route-query.d.ts"), generateRouteQueryDts(), "utf-8");
|
|
1699
1718
|
}
|
|
1700
1719
|
/**
|
|
1701
1720
|
* Generate kimesh.d.ts content with global type declarations
|
|
@@ -1715,24 +1734,70 @@ function generateKimeshDts() {
|
|
|
1715
1734
|
* DO NOT EDIT - This file is auto-generated by Kimesh.
|
|
1716
1735
|
*/
|
|
1717
1736
|
|
|
1737
|
+
import type { KimeshConfig } from '@kimesh/kit'
|
|
1738
|
+
|
|
1718
1739
|
export {}
|
|
1719
1740
|
|
|
1720
1741
|
declare global {
|
|
1721
1742
|
/**
|
|
1722
|
-
* Define Kimesh configuration with type inference.
|
|
1743
|
+
* Define Kimesh configuration with full type inference.
|
|
1723
1744
|
* This function is available globally in kimesh.config.ts files.
|
|
1724
1745
|
*
|
|
1725
1746
|
* @example
|
|
1726
1747
|
* \`\`\`ts
|
|
1727
1748
|
* export default defineKmConfig({
|
|
1728
1749
|
* name: 'my-app',
|
|
1750
|
+
* extends: ['@my-org/shared-layer'],
|
|
1751
|
+
* modules: ['@kimesh/tailwindcss'],
|
|
1729
1752
|
* dev: {
|
|
1730
1753
|
* port: 3000,
|
|
1731
1754
|
* },
|
|
1755
|
+
* runtimeConfig: {
|
|
1756
|
+
* apiBase: '/api',
|
|
1757
|
+
* },
|
|
1732
1758
|
* })
|
|
1733
1759
|
* \`\`\`
|
|
1734
1760
|
*/
|
|
1735
|
-
const defineKmConfig:
|
|
1761
|
+
const defineKmConfig: (config: KimeshConfig) => KimeshConfig
|
|
1762
|
+
}
|
|
1763
|
+
`;
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* Generate plugins.d.ts for #kimesh/plugins module
|
|
1767
|
+
*/
|
|
1768
|
+
function generatePluginsDts() {
|
|
1769
|
+
return `/* eslint-disable */
|
|
1770
|
+
/* prettier-ignore */
|
|
1771
|
+
|
|
1772
|
+
/**
|
|
1773
|
+
* Type declarations for #kimesh/plugins virtual module
|
|
1774
|
+
* DO NOT EDIT - This file is auto-generated by Kimesh.
|
|
1775
|
+
*/
|
|
1776
|
+
|
|
1777
|
+
/// <reference types="@kimesh/router-runtime" />
|
|
1778
|
+
|
|
1779
|
+
declare module '#kimesh/plugins' {
|
|
1780
|
+
import type { KimeshRuntimePlugin } from '@kimesh/router-runtime'
|
|
1781
|
+
export const plugins: KimeshRuntimePlugin[]
|
|
1782
|
+
}
|
|
1783
|
+
`;
|
|
1784
|
+
}
|
|
1785
|
+
/**
|
|
1786
|
+
* Generate route-query.d.ts for ?route query imports
|
|
1787
|
+
*/
|
|
1788
|
+
function generateRouteQueryDts() {
|
|
1789
|
+
return `/* eslint-disable */
|
|
1790
|
+
/* prettier-ignore */
|
|
1791
|
+
|
|
1792
|
+
/**
|
|
1793
|
+
* Type declarations for ?route query imports (Vite virtual modules)
|
|
1794
|
+
* DO NOT EDIT - This file is auto-generated by Kimesh.
|
|
1795
|
+
*/
|
|
1796
|
+
|
|
1797
|
+
declare module '*?route' {
|
|
1798
|
+
import type { RouteDefinition } from '@kimesh/router-runtime'
|
|
1799
|
+
const routeDef: RouteDefinition | undefined
|
|
1800
|
+
export default routeDef
|
|
1736
1801
|
}
|
|
1737
1802
|
`;
|
|
1738
1803
|
}
|
|
@@ -2460,6 +2525,10 @@ const SUBPATH_EXPORT_MAP = {
|
|
|
2460
2525
|
pkg: "router-runtime",
|
|
2461
2526
|
file: "dist/default-app.mjs"
|
|
2462
2527
|
},
|
|
2528
|
+
"@kimesh/router-runtime/middleware/plugin": {
|
|
2529
|
+
pkg: "router-runtime",
|
|
2530
|
+
file: "dist/middleware/plugin.mjs"
|
|
2531
|
+
},
|
|
2463
2532
|
"kimesh/head/plugin": {
|
|
2464
2533
|
pkg: "head",
|
|
2465
2534
|
file: "dist/plugin.mjs"
|
|
@@ -2467,6 +2536,10 @@ const SUBPATH_EXPORT_MAP = {
|
|
|
2467
2536
|
"kimesh/router-runtime/default-app": {
|
|
2468
2537
|
pkg: "router-runtime",
|
|
2469
2538
|
file: "dist/default-app.mjs"
|
|
2539
|
+
},
|
|
2540
|
+
"kimesh/router-runtime/middleware/plugin": {
|
|
2541
|
+
pkg: "router-runtime",
|
|
2542
|
+
file: "dist/middleware/plugin.mjs"
|
|
2470
2543
|
}
|
|
2471
2544
|
};
|
|
2472
2545
|
/**
|
|
@@ -2699,6 +2772,41 @@ function kimeshPlugin(options = {}) {
|
|
|
2699
2772
|
consola.info(`[Kimesh] Found ${state.kimesh._registries.runtimePlugins.length} module-registered plugins`);
|
|
2700
2773
|
}
|
|
2701
2774
|
}
|
|
2775
|
+
const middlewareDir = join$1(resolvedDirs.srcDir, "middleware");
|
|
2776
|
+
let hasMiddleware = false;
|
|
2777
|
+
try {
|
|
2778
|
+
const middlewareResult = await scanLayerMiddleware([{
|
|
2779
|
+
layerName: "app",
|
|
2780
|
+
layerPath: configRoot,
|
|
2781
|
+
middlewareDir,
|
|
2782
|
+
priority: 0
|
|
2783
|
+
}, ...state.resolvedLayers.filter((l) => !l.isApp).map((layer) => ({
|
|
2784
|
+
layerName: layer.name,
|
|
2785
|
+
layerPath: layer.path,
|
|
2786
|
+
middlewareDir: join$1(layer.path, "src", "middleware"),
|
|
2787
|
+
priority: layer.priority
|
|
2788
|
+
}))], { orderStrategy: "alphabetical" });
|
|
2789
|
+
hasMiddleware = middlewareResult.middleware.length > 0;
|
|
2790
|
+
if (hasMiddleware) {
|
|
2791
|
+
const registryCode = generateMiddlewareRegistry(middlewareResult);
|
|
2792
|
+
const registryPath = join$1(resolvedDirs.buildDir, "middleware.gen.ts");
|
|
2793
|
+
if (!existsSync(resolvedDirs.buildDir)) mkdirSync(resolvedDirs.buildDir, { recursive: true });
|
|
2794
|
+
writeFileSync(registryPath, registryCode, "utf-8");
|
|
2795
|
+
const typesCode = generateMiddlewareTypes(middlewareResult);
|
|
2796
|
+
writeFileSync(join$1(resolvedDirs.buildDir, "middleware.d.ts"), typesCode, "utf-8");
|
|
2797
|
+
if (debug) consola.info(`[Kimesh] Middleware: ${middlewareResult.globalMiddleware.length} global, ${middlewareResult.namedMiddleware.length} named`);
|
|
2798
|
+
const middlewarePluginSrc = "#kimesh/middleware/plugin";
|
|
2799
|
+
if (!state.kimesh._registries.runtimePlugins.some((p) => p.src === middlewarePluginSrc)) {
|
|
2800
|
+
state.kimesh._registries.runtimePlugins.push({
|
|
2801
|
+
src: middlewarePluginSrc,
|
|
2802
|
+
name: "middleware"
|
|
2803
|
+
});
|
|
2804
|
+
if (debug) consola.info(`[Kimesh] Auto-registered middleware plugin`);
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2807
|
+
} catch (error) {
|
|
2808
|
+
if (debug) consola.warn(`[Kimesh] Middleware scanning failed:`, error);
|
|
2809
|
+
}
|
|
2702
2810
|
generateModulesTypeDeclaration(config.modules, state.generatedDir);
|
|
2703
2811
|
await writeTemplates(state.kimesh);
|
|
2704
2812
|
const userAliases = buildAliases(config, resolvedDirs.srcDir, configRoot);
|
|
@@ -2711,7 +2819,8 @@ function kimeshPlugin(options = {}) {
|
|
|
2711
2819
|
"#kimesh/routes": join$1(resolvedDirs.buildDir, "routes.gen.ts"),
|
|
2712
2820
|
"#kimesh/app": existsSync(appVuePath) ? appVuePath : "@kimesh/router-runtime/default-app",
|
|
2713
2821
|
"#kimesh/context": join$1(resolvedDirs.srcDir, "app.context.ts"),
|
|
2714
|
-
"#kimesh/plugins": join$1(resolvedDirs.buildDir, "plugins.mjs")
|
|
2822
|
+
"#kimesh/plugins": join$1(resolvedDirs.buildDir, "plugins.mjs"),
|
|
2823
|
+
"#kimesh/middleware": join$1(resolvedDirs.buildDir, "middleware.gen.ts")
|
|
2715
2824
|
};
|
|
2716
2825
|
writeTsConfig({
|
|
2717
2826
|
rootDir: configRoot,
|
|
@@ -2762,6 +2871,7 @@ function kimeshPlugin(options = {}) {
|
|
|
2762
2871
|
"#kimesh/app": existsSync(appVuePath) ? appVuePath : "@kimesh/router-runtime/default-app",
|
|
2763
2872
|
"#kimesh/context": join$1(resolvedDirs.srcDir, "app.context.ts"),
|
|
2764
2873
|
"#kimesh/plugins": join$1(resolvedDirs.buildDir, "plugins.mjs"),
|
|
2874
|
+
"#kimesh/middleware": join$1(resolvedDirs.buildDir, "middleware.gen.ts"),
|
|
2765
2875
|
...userAliases,
|
|
2766
2876
|
...layerAliases,
|
|
2767
2877
|
...moduleAliases
|
|
@@ -3105,24 +3215,58 @@ async function prepare(options = {}) {
|
|
|
3105
3215
|
});
|
|
3106
3216
|
generatedFiles.push("tsconfig.json");
|
|
3107
3217
|
if (verbose) consola.success(`[Kimesh] Generated .kimesh/tsconfig.json`);
|
|
3108
|
-
const
|
|
3109
|
-
if (
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3218
|
+
const routesDir = join$1(srcDir, "routes");
|
|
3219
|
+
if (existsSync(routesDir)) try {
|
|
3220
|
+
const layerRouteConfigs = resolvedLayers.filter((layer) => !layer.isApp).map((layer) => {
|
|
3221
|
+
const routesFolder = layer.config.routes?.folder || "routes";
|
|
3222
|
+
return {
|
|
3223
|
+
layerName: layer.name,
|
|
3224
|
+
routesDir: join$1(layer.path, "src", routesFolder),
|
|
3225
|
+
layerPath: layer.path,
|
|
3226
|
+
basePath: layer.config.routes?.basePath,
|
|
3227
|
+
priority: layer.priority
|
|
3228
|
+
};
|
|
3229
|
+
}).filter((cfg) => existsSync(cfg.routesDir));
|
|
3230
|
+
const scannerConfig = {
|
|
3231
|
+
srcDir: "src",
|
|
3232
|
+
routesDir: "routes",
|
|
3233
|
+
generatedDir: ".kimesh",
|
|
3234
|
+
extensions: [".vue"],
|
|
3235
|
+
importMode: "async",
|
|
3236
|
+
routesDirPath: routesDir,
|
|
3237
|
+
generatedDirPath: buildDir,
|
|
3238
|
+
root
|
|
3239
|
+
};
|
|
3240
|
+
const parsedRoutes = await createScanner(scannerConfig).scan();
|
|
3241
|
+
let routes = createTreeBuilder(scannerConfig).build(parsedRoutes);
|
|
3242
|
+
if (layerRouteConfigs.length > 0) {
|
|
3243
|
+
const layerResult = await collectLayerRoutes(layerRouteConfigs.map((l) => ({
|
|
3244
|
+
layer: l.layerName,
|
|
3245
|
+
routesDir: l.routesDir,
|
|
3246
|
+
basePath: l.basePath,
|
|
3247
|
+
priority: l.priority
|
|
3248
|
+
})), scannerConfig);
|
|
3249
|
+
if (verbose) consola.info(`[Kimesh] Collected ${layerResult.routes.length} routes from ${layerRouteConfigs.length} layers`);
|
|
3250
|
+
routes = mergeRoutes(routes, layerResult.routes, scannerConfig);
|
|
3251
|
+
}
|
|
3252
|
+
const routesCode = generateRoutes(routes, scannerConfig);
|
|
3253
|
+
writeFileSync(join$1(buildDir, "routes.gen.ts"), routesCode, "utf-8");
|
|
3123
3254
|
generatedFiles.push("routes.gen.ts");
|
|
3124
|
-
|
|
3255
|
+
const typesCode = generateRouteTypes(routes);
|
|
3256
|
+
writeFileSync(join$1(buildDir, "typed-routes.d.ts"), typesCode, "utf-8");
|
|
3257
|
+
generatedFiles.push("typed-routes.d.ts");
|
|
3258
|
+
for (const layer of layerRouteConfigs) {
|
|
3259
|
+
const layerKimeshDir = join$1(layer.layerPath, ".kimesh");
|
|
3260
|
+
if (!existsSync(layerKimeshDir)) mkdirSync(layerKimeshDir, { recursive: true });
|
|
3261
|
+
writeFileSync(join$1(layerKimeshDir, "typed-routes.d.ts"), typesCode, "utf-8");
|
|
3262
|
+
if (verbose) consola.success(`[Kimesh] Generated ${layer.layerName}/.kimesh/typed-routes.d.ts`);
|
|
3263
|
+
}
|
|
3264
|
+
if (verbose) consola.success(`[Kimesh] Generated .kimesh/routes.gen.ts and typed-routes.d.ts (${routes.length} routes)`);
|
|
3265
|
+
} catch (error) {
|
|
3266
|
+
if (verbose) consola.warn(`[Kimesh] Route scanning failed: ${error}`);
|
|
3267
|
+
generateRoutesStub(buildDir, generatedFiles, verbose);
|
|
3125
3268
|
}
|
|
3269
|
+
else generateRoutesStub(buildDir, generatedFiles, verbose);
|
|
3126
3270
|
const pluginsStubPath = join$1(buildDir, "plugins.mjs");
|
|
3127
3271
|
if (!existsSync(pluginsStubPath)) {
|
|
3128
3272
|
writeFileSync(pluginsStubPath, `/**
|
|
@@ -3201,6 +3345,21 @@ declare global {
|
|
|
3201
3345
|
// Vue Router imports
|
|
3202
3346
|
const useRoute: typeof import('vue-router')['useRoute']
|
|
3203
3347
|
const useRouter: typeof import('vue-router')['useRouter']
|
|
3348
|
+
|
|
3349
|
+
// Kimesh Router Runtime imports
|
|
3350
|
+
const createFileRoute: typeof import('@kimesh/router-runtime')['createFileRoute']
|
|
3351
|
+
const defineRoute: typeof import('@kimesh/router-runtime')['defineRoute']
|
|
3352
|
+
const defineContext: typeof import('@kimesh/router-runtime')['defineContext']
|
|
3353
|
+
const useKimeshContext: typeof import('@kimesh/router-runtime')['useKimeshContext']
|
|
3354
|
+
const useNavigate: typeof import('@kimesh/router-runtime')['useNavigate']
|
|
3355
|
+
const useParams: typeof import('@kimesh/router-runtime')['useParams']
|
|
3356
|
+
const useReactiveParams: typeof import('@kimesh/router-runtime')['useReactiveParams']
|
|
3357
|
+
const useSearch: typeof import('@kimesh/router-runtime')['useSearch']
|
|
3358
|
+
const useRuntimeConfig: typeof import('@kimesh/router-runtime')['useRuntimeConfig']
|
|
3359
|
+
const navigateTo: typeof import('@kimesh/router-runtime')['navigateTo']
|
|
3360
|
+
const abortNavigation: typeof import('@kimesh/router-runtime')['abortNavigation']
|
|
3361
|
+
function defineKimeshMiddleware(middleware: import('@kimesh/router-runtime').RouteMiddleware): import('@kimesh/router-runtime').RouteMiddleware
|
|
3362
|
+
function defineKimeshMiddleware(definition: import('@kimesh/router-runtime').MiddlewareDefinition): import('@kimesh/router-runtime').RouteMiddleware
|
|
3204
3363
|
}
|
|
3205
3364
|
`, "utf-8");
|
|
3206
3365
|
generatedFiles.push("auto-imports.d.ts");
|
|
@@ -3246,6 +3405,29 @@ function extractModuleNames(modules) {
|
|
|
3246
3405
|
else if (Array.isArray(mod) && typeof mod[0] === "string") names.push(mod[0]);
|
|
3247
3406
|
return names;
|
|
3248
3407
|
}
|
|
3408
|
+
/**
|
|
3409
|
+
* Generate stub routes.gen.ts when route scanning is not available
|
|
3410
|
+
*/
|
|
3411
|
+
function generateRoutesStub(buildDir, generatedFiles, verbose) {
|
|
3412
|
+
const routesStubPath = join$1(buildDir, "routes.gen.ts");
|
|
3413
|
+
if (!existsSync(routesStubPath)) {
|
|
3414
|
+
writeFileSync(routesStubPath, `/**
|
|
3415
|
+
* Kimesh Routes - Auto-generated
|
|
3416
|
+
*
|
|
3417
|
+
* This file is a stub generated by 'km prepare'.
|
|
3418
|
+
* It will be populated with actual routes when running 'km dev' or 'km build'.
|
|
3419
|
+
*
|
|
3420
|
+
* DO NOT EDIT - This file is regenerated automatically.
|
|
3421
|
+
*/
|
|
3422
|
+
|
|
3423
|
+
import type { RouteRecordRaw } from 'vue-router'
|
|
3424
|
+
|
|
3425
|
+
export const routes: RouteRecordRaw[] = []
|
|
3426
|
+
`, "utf-8");
|
|
3427
|
+
generatedFiles.push("routes.gen.ts");
|
|
3428
|
+
if (verbose) consola.success(`[Kimesh] Generated .kimesh/routes.gen.ts (stub)`);
|
|
3429
|
+
}
|
|
3430
|
+
}
|
|
3249
3431
|
|
|
3250
3432
|
//#endregion
|
|
3251
3433
|
export { DEFAULT_ALIASES, DEFAULT_IGNORE_PATTERNS, INTERNAL_ALIASES, addAlias, addBuildPlugin, addComponent, addComponentResolver, addComponentsDir, addImports, addImportsDir, addImportsPreset, addInternalAliasTemplates, addPluginsTemplate, addRuntimePlugin, addTemplate, addTypeTemplate, addVitePlugin, applyEnv, buildAliases, buildImportRegistry, buildInternalAliasMap, createDebugLogger, createDefaultRuntimeConfig, createHMRWatcher, createIgnoreFilter, createIgnoreMatcher, createKimesh, createResolver, createTimer, debug, debugTable, defineKimeshModule, defineKimeshPlugin, defineKmConfig, envToKey, executeModule, executeModules, filterIgnored, findMatchingRules, formatConflictWarning, formatError, formatTiming, formatWarning, generateDts, generateInternalAliasTemplate, generateLayerAliases, generatePluginsTemplate, generateRouteRulesManifest, getIgnorePatterns, getRedirectInfo, getRouteRule, getRuntimePlugins, hasPlugins, hasRuntimePlugin, isDebug, isDebugEnabled, keyToEnv, kimeshAutoImport, kimeshPlugin, loadConfig, matchRoutePattern, mergeLayerConfigs, mergeRouteRules, normalizeDebugConfig, normalizeModuleInput, prepare, prepareLayers, removeRuntimePlugin, resolveAlias, resolveAliasPath, resolveLayers, resolvePathFromBuild, resolvePathFromRoot, scanExports, scanPluginsDir, setDebugConfig, shouldIgnore, toTsConfigPaths, toViteAliases, tryUseKimesh, updateTemplates, useKimesh, writeTemplates };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kimesh/kit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.9-nightly.20260126092617",
|
|
4
4
|
"description": "Build-time engine for Kimesh framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"vue": "^3.5.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@kimesh/auto-import": "
|
|
35
|
-
"@kimesh/layers": "
|
|
36
|
-
"@kimesh/router-generator": "
|
|
34
|
+
"@kimesh/auto-import": "workspace:*",
|
|
35
|
+
"@kimesh/layers": "workspace:*",
|
|
36
|
+
"@kimesh/router-generator": "workspace:*",
|
|
37
37
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
38
38
|
"c12": "^3.3.3",
|
|
39
39
|
"consola": "^3.4.2",
|