@kimesh/kit 0.2.11 → 0.2.12
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.d.mts +48 -48
- package/dist/index.mjs +63 -8
- package/package.json +15 -15
- package/types.d.ts +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -118,65 +118,65 @@ interface KimeshRouteMiddleware {
|
|
|
118
118
|
type HookResult = void | Promise<void>;
|
|
119
119
|
interface KimeshHooks {
|
|
120
120
|
/** Called after config is loaded, before layers */
|
|
121
|
-
|
|
121
|
+
'config:loaded': (config: KimeshConfig) => HookResult;
|
|
122
122
|
/** Called after layers are resolved */
|
|
123
|
-
|
|
123
|
+
'layers:resolved': (layers: ResolvedLayer$1[]) => HookResult;
|
|
124
124
|
/** Called to extend layer configuration */
|
|
125
|
-
|
|
125
|
+
'layers:extend': (layers: ResolvedLayer$1[]) => HookResult;
|
|
126
126
|
/** Called when Kimesh is fully initialized and ready */
|
|
127
127
|
ready: (kimesh: Kimesh) => HookResult;
|
|
128
128
|
/** Called before modules are processed */
|
|
129
|
-
|
|
129
|
+
'modules:before': (kimesh: Kimesh) => HookResult;
|
|
130
130
|
/** Called after all modules are processed */
|
|
131
|
-
|
|
131
|
+
'modules:done': (kimesh: Kimesh) => HookResult;
|
|
132
132
|
/** Called before build starts */
|
|
133
|
-
|
|
133
|
+
'build:before': (kimesh: Kimesh) => HookResult;
|
|
134
134
|
/** Called after build completes */
|
|
135
|
-
|
|
135
|
+
'build:done': (kimesh: Kimesh) => HookResult;
|
|
136
136
|
/** Called on build error */
|
|
137
|
-
|
|
137
|
+
'build:error': (error: Error, kimesh: Kimesh) => HookResult;
|
|
138
138
|
/** Called to extend Vite config before it's resolved */
|
|
139
|
-
|
|
139
|
+
'vite:extend': (ctx: {
|
|
140
140
|
kimesh: Kimesh;
|
|
141
141
|
config: vite3.UserConfig;
|
|
142
142
|
}) => HookResult;
|
|
143
143
|
/** Called after Vite config is resolved */
|
|
144
|
-
|
|
144
|
+
'vite:configResolved': (config: ResolvedConfig, kimesh: Kimesh) => HookResult;
|
|
145
145
|
/** Called when Vite dev server is created */
|
|
146
|
-
|
|
146
|
+
'vite:serverCreated': (server: ViteDevServer, kimesh: Kimesh) => HookResult;
|
|
147
147
|
/** Called to add import sources/presets */
|
|
148
|
-
|
|
148
|
+
'imports:sources': (sources: Array<{
|
|
149
149
|
from: string;
|
|
150
150
|
imports: string[];
|
|
151
151
|
}>, kimesh: Kimesh) => HookResult;
|
|
152
152
|
/** Called to extend imports */
|
|
153
|
-
|
|
153
|
+
'imports:extend': (imports: KimeshImport[], kimesh: Kimesh) => HookResult;
|
|
154
154
|
/** Called to add import directories */
|
|
155
|
-
|
|
155
|
+
'imports:dirs': (dirs: KimeshImportsDir[], kimesh: Kimesh) => HookResult;
|
|
156
156
|
/** Called to add component directories */
|
|
157
|
-
|
|
157
|
+
'components:dirs': (dirs: KimeshComponentsDir[], kimesh: Kimesh) => HookResult;
|
|
158
158
|
/** Called to extend components */
|
|
159
|
-
|
|
159
|
+
'components:extend': (components: KimeshComponent[], kimesh: Kimesh) => HookResult;
|
|
160
160
|
/** Called to add component resolvers */
|
|
161
|
-
|
|
161
|
+
'components:resolvers': (resolvers: ComponentResolver[], kimesh: Kimesh) => HookResult;
|
|
162
162
|
/** Called after routes are generated */
|
|
163
|
-
|
|
163
|
+
'routes:extend': (routes: KimeshRoute[], kimesh: Kimesh) => HookResult;
|
|
164
164
|
/** Called to add route middleware */
|
|
165
|
-
|
|
165
|
+
'routes:middleware': (middleware: KimeshRouteMiddleware[], kimesh: Kimesh) => HookResult;
|
|
166
166
|
/** Called when templates need generation */
|
|
167
|
-
|
|
167
|
+
'templates:extend': (templates: KimeshTemplate[], kimesh: Kimesh) => HookResult;
|
|
168
168
|
/** Called after templates are written */
|
|
169
|
-
|
|
169
|
+
'templates:done': (templates: KimeshTemplate[], kimesh: Kimesh) => HookResult;
|
|
170
170
|
/** Called to extend type templates */
|
|
171
|
-
|
|
171
|
+
'types:extend': (typeTemplates: KimeshTypeTemplate[], kimesh: Kimesh) => HookResult;
|
|
172
172
|
/** Called after types are generated */
|
|
173
|
-
|
|
173
|
+
'types:done': (files: string[], kimesh: Kimesh) => HookResult;
|
|
174
174
|
/** Called on file change in watch mode */
|
|
175
|
-
|
|
175
|
+
'watch:change': (file: string, event: 'add' | 'change' | 'unlink', kimesh: Kimesh) => HookResult;
|
|
176
176
|
/** Called before HMR update */
|
|
177
|
-
|
|
177
|
+
'hmr:before': (file: string, kimesh: Kimesh) => HookResult;
|
|
178
178
|
/** Called after HMR update */
|
|
179
|
-
|
|
179
|
+
'hmr:after': (file: string, kimesh: Kimesh) => HookResult;
|
|
180
180
|
/** Called when Kimesh is closing */
|
|
181
181
|
close: (kimesh: Kimesh) => HookResult;
|
|
182
182
|
}
|
|
@@ -187,7 +187,7 @@ interface KimeshHooks {
|
|
|
187
187
|
*/
|
|
188
188
|
interface KimeshRuntimePluginMeta {
|
|
189
189
|
name?: string;
|
|
190
|
-
enforce?:
|
|
190
|
+
enforce?: 'pre' | 'default' | 'post';
|
|
191
191
|
order?: number;
|
|
192
192
|
dependsOn?: string[];
|
|
193
193
|
parallel?: boolean;
|
|
@@ -196,22 +196,22 @@ interface KimeshRuntimePluginMeta {
|
|
|
196
196
|
* Runtime hooks available in Kimesh app lifecycle
|
|
197
197
|
*/
|
|
198
198
|
interface KimeshRuntimeHooks {
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
199
|
+
'app:created': (app: App) => void | Promise<void>;
|
|
200
|
+
'app:beforeMount': (app: App) => void | Promise<void>;
|
|
201
|
+
'app:mounted': (app: App) => void | Promise<void>;
|
|
202
|
+
'app:error': (err: unknown) => void | Promise<void>;
|
|
203
|
+
'page:start': () => void | Promise<void>;
|
|
204
|
+
'page:finish': () => void | Promise<void>;
|
|
205
|
+
'navigate:before': (context: {
|
|
206
206
|
to: unknown;
|
|
207
207
|
from: unknown;
|
|
208
208
|
}) => void | false | Promise<void | false>;
|
|
209
|
-
|
|
209
|
+
'navigate:after': (context: {
|
|
210
210
|
to: unknown;
|
|
211
211
|
from: unknown;
|
|
212
212
|
failure?: unknown;
|
|
213
213
|
}) => void | Promise<void>;
|
|
214
|
-
|
|
214
|
+
'navigate:error': (context: {
|
|
215
215
|
error: Error;
|
|
216
216
|
to: unknown;
|
|
217
217
|
from: unknown;
|
|
@@ -309,7 +309,7 @@ interface KimeshVitePluginEntry {
|
|
|
309
309
|
/** The Vite plugin */
|
|
310
310
|
plugin: Plugin;
|
|
311
311
|
/** Plugin enforce order */
|
|
312
|
-
enforce?:
|
|
312
|
+
enforce?: 'pre' | 'post';
|
|
313
313
|
/** Numeric order (lower = earlier) */
|
|
314
314
|
order?: number;
|
|
315
315
|
/** Metadata for debugging */
|
|
@@ -488,7 +488,7 @@ interface LayersConfig {
|
|
|
488
488
|
/** Directories to scan for layers (default: ['layers']) */
|
|
489
489
|
dirs?: string[];
|
|
490
490
|
/** Layers to enable - 'all' | 'none' | string[] */
|
|
491
|
-
enabled?:
|
|
491
|
+
enabled?: 'all' | 'none' | string[];
|
|
492
492
|
/** Layers to exclude */
|
|
493
493
|
excluded?: string[];
|
|
494
494
|
}
|
|
@@ -527,7 +527,7 @@ interface ComponentsConfig {
|
|
|
527
527
|
/**
|
|
528
528
|
* Vite configuration options for Kimesh.
|
|
529
529
|
*/
|
|
530
|
-
interface KimeshViteConfig extends Omit<UserConfig,
|
|
530
|
+
interface KimeshViteConfig extends Omit<UserConfig, 'root' | 'configFile'> {
|
|
531
531
|
/**
|
|
532
532
|
* Additional Vite plugins.
|
|
533
533
|
* These are merged AFTER Kimesh's internal plugins.
|
|
@@ -739,7 +739,7 @@ interface BuildConfig {
|
|
|
739
739
|
*
|
|
740
740
|
* @default false
|
|
741
741
|
*/
|
|
742
|
-
sourcemap?: boolean |
|
|
742
|
+
sourcemap?: boolean | 'hidden' | 'inline';
|
|
743
743
|
/**
|
|
744
744
|
* Build target for esbuild/terser.
|
|
745
745
|
* Specifies the JS language version to target.
|
|
@@ -756,7 +756,7 @@ interface BuildConfig {
|
|
|
756
756
|
*
|
|
757
757
|
* @default 'esbuild'
|
|
758
758
|
*/
|
|
759
|
-
minify?: boolean |
|
|
759
|
+
minify?: boolean | 'esbuild' | 'terser';
|
|
760
760
|
}
|
|
761
761
|
/**
|
|
762
762
|
* HTTPS configuration options for dev server.
|
|
@@ -925,7 +925,7 @@ interface TypeScriptConfig {
|
|
|
925
925
|
*
|
|
926
926
|
* @default false
|
|
927
927
|
*/
|
|
928
|
-
typeCheck?: boolean |
|
|
928
|
+
typeCheck?: boolean | 'build';
|
|
929
929
|
/**
|
|
930
930
|
* Additional tsconfig compiler options to merge with generated config.
|
|
931
931
|
* These options will extend the auto-generated `.kimesh/tsconfig.json`.
|
|
@@ -1343,7 +1343,7 @@ interface KimeshConfig extends KimeshModuleOptions {
|
|
|
1343
1343
|
/** Router configuration */
|
|
1344
1344
|
router?: {
|
|
1345
1345
|
/** Routes directory relative to srcDir (default: 'routes') */routesDir?: string; /** Import mode for route components */
|
|
1346
|
-
importMode?:
|
|
1346
|
+
importMode?: 'async' | 'sync';
|
|
1347
1347
|
};
|
|
1348
1348
|
/** Extend from other layers (paths or package names) */
|
|
1349
1349
|
extends?: Array<string | {
|
|
@@ -1503,7 +1503,7 @@ declare function defineKimeshPlugin(definition: KimeshPluginDefinition): KimeshP
|
|
|
1503
1503
|
//#region src/kit/vite.d.ts
|
|
1504
1504
|
interface AddVitePluginOptions {
|
|
1505
1505
|
/** Plugin enforce order */
|
|
1506
|
-
enforce?:
|
|
1506
|
+
enforce?: 'pre' | 'post';
|
|
1507
1507
|
/** Numeric order (lower = earlier) */
|
|
1508
1508
|
order?: number;
|
|
1509
1509
|
/** Add to beginning of plugins array */
|
|
@@ -2228,11 +2228,11 @@ interface HMRContext {
|
|
|
2228
2228
|
/** File that changed */
|
|
2229
2229
|
file: string;
|
|
2230
2230
|
/** Type of change */
|
|
2231
|
-
type:
|
|
2231
|
+
type: 'add' | 'change' | 'unlink';
|
|
2232
2232
|
/** Layer this file belongs to (if any) */
|
|
2233
2233
|
layer?: ResolvedLayer$1;
|
|
2234
2234
|
/** Category of the file */
|
|
2235
|
-
category:
|
|
2235
|
+
category: 'route' | 'component' | 'composable' | 'config' | 'other';
|
|
2236
2236
|
}
|
|
2237
2237
|
/**
|
|
2238
2238
|
* Create HMR watcher for Kimesh layers
|
|
@@ -2279,7 +2279,7 @@ declare function formatWarning(message: string, context?: ErrorContext): string;
|
|
|
2279
2279
|
/**
|
|
2280
2280
|
* Format a conflict warning
|
|
2281
2281
|
*/
|
|
2282
|
-
declare function formatConflictWarning(type:
|
|
2282
|
+
declare function formatConflictWarning(type: 'route' | 'import' | 'component', name: string, sources: Array<{
|
|
2283
2283
|
layer: string;
|
|
2284
2284
|
path: string;
|
|
2285
2285
|
}>, winner: string): string;
|
|
@@ -2300,7 +2300,7 @@ interface KimeshPluginOptions {
|
|
|
2300
2300
|
config?: KimeshConfig;
|
|
2301
2301
|
/** Layer configuration (from CLI) */
|
|
2302
2302
|
layers?: {
|
|
2303
|
-
/** Enabled layers */enabled?:
|
|
2303
|
+
/** Enabled layers */enabled?: 'all' | 'none' | string[]; /** Excluded layers */
|
|
2304
2304
|
excluded?: string[];
|
|
2305
2305
|
};
|
|
2306
2306
|
/** Enable debug logging */
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { createHooks } from "hookable";
|
|
|
3
3
|
import { snakeCase } from "scule";
|
|
4
4
|
import { klona } from "klona/json";
|
|
5
5
|
import destr from "destr";
|
|
6
|
-
import { pathToFileURL } from "node:url";
|
|
6
|
+
import { fileURLToPath, pathToFileURL } from "node:url";
|
|
7
7
|
import consola from "consola";
|
|
8
8
|
import { existsSync, mkdirSync, readFileSync, realpathSync, writeFileSync } from "node:fs";
|
|
9
9
|
import { dirname, isAbsolute, join, resolve } from "node:path";
|
|
@@ -1246,6 +1246,7 @@ function defineKmConfig(config) {
|
|
|
1246
1246
|
*
|
|
1247
1247
|
* Utilities for resolving and processing path aliases.
|
|
1248
1248
|
*/
|
|
1249
|
+
const __kitDir = dirname(dirname(fileURLToPath(import.meta.url)));
|
|
1249
1250
|
/**
|
|
1250
1251
|
* Resolve an alias path template to an actual path
|
|
1251
1252
|
*
|
|
@@ -1330,6 +1331,38 @@ function isDebugEnabled(debug, option) {
|
|
|
1330
1331
|
if (debug === true) return true;
|
|
1331
1332
|
return !!debug[option];
|
|
1332
1333
|
}
|
|
1334
|
+
/**
|
|
1335
|
+
* Resolve the actual directory path of an npm package.
|
|
1336
|
+
* Handles different package manager setups (npm hoists, pnpm isolates, workspace links).
|
|
1337
|
+
*
|
|
1338
|
+
* @param packageName - The npm package name (e.g., "@kimesh/router-runtime")
|
|
1339
|
+
* @param _fromDir - Deprecated, no longer used. Resolution is done from @kimesh/kit's location.
|
|
1340
|
+
* @returns The absolute path to the package directory, or null if not found
|
|
1341
|
+
*
|
|
1342
|
+
* @example
|
|
1343
|
+
* ```ts
|
|
1344
|
+
* const pkgDir = resolvePackageDir("@kimesh/router-runtime", "/path/to/project");
|
|
1345
|
+
* // Returns: "/path/to/project/node_modules/.pnpm/@kimesh+router-runtime@0.2.11/node_modules/@kimesh/router-runtime"
|
|
1346
|
+
* // or: "/path/to/monorepo/packages/router-runtime" (for workspace links)
|
|
1347
|
+
* ```
|
|
1348
|
+
*/
|
|
1349
|
+
function resolvePackageDir(packageName, _fromDir) {
|
|
1350
|
+
try {
|
|
1351
|
+
const resolvedPath = resolveModulePath(packageName, { from: __kitDir });
|
|
1352
|
+
const pkgNameParts = packageName.split("/");
|
|
1353
|
+
const pkgPattern = pkgNameParts.length === 2 ? `node_modules/${pkgNameParts[0]}/${pkgNameParts[1]}` : `node_modules/${packageName}`;
|
|
1354
|
+
const patternIndex = resolvedPath.indexOf(pkgPattern);
|
|
1355
|
+
if (patternIndex !== -1) return resolvedPath.slice(0, patternIndex + pkgPattern.length);
|
|
1356
|
+
let currentDir = dirname(resolvedPath);
|
|
1357
|
+
for (let i = 0; i < 5; i++) {
|
|
1358
|
+
if ((currentDir.split("/").pop() || "") === pkgNameParts[pkgNameParts.length - 1]) return currentDir;
|
|
1359
|
+
currentDir = dirname(currentDir);
|
|
1360
|
+
}
|
|
1361
|
+
return dirname(dirname(resolvedPath));
|
|
1362
|
+
} catch {
|
|
1363
|
+
return null;
|
|
1364
|
+
}
|
|
1365
|
+
}
|
|
1333
1366
|
|
|
1334
1367
|
//#endregion
|
|
1335
1368
|
//#region src/kit/ignore-utils.ts
|
|
@@ -1662,7 +1695,7 @@ function debugTable(title, data) {
|
|
|
1662
1695
|
* @returns TSConfig JSON object
|
|
1663
1696
|
*/
|
|
1664
1697
|
function generateTsConfig(options) {
|
|
1665
|
-
const { rootDir,
|
|
1698
|
+
const { rootDir, buildDir, aliases, layerAliases = {}, moduleAliases = {}, internalAliases = {}, include = ["../src/**/*", "./**/*"] } = options;
|
|
1666
1699
|
const allAliases = {
|
|
1667
1700
|
...aliases,
|
|
1668
1701
|
...layerAliases,
|
|
@@ -1683,8 +1716,16 @@ function generateTsConfig(options) {
|
|
|
1683
1716
|
"@kimesh/head",
|
|
1684
1717
|
"@kimesh/query"
|
|
1685
1718
|
]) {
|
|
1686
|
-
|
|
1687
|
-
|
|
1719
|
+
const pkgDir = resolvePackageDir(pkg, rootDir);
|
|
1720
|
+
if (pkgDir) {
|
|
1721
|
+
const relativePkgPath = relative(buildDir, pkgDir);
|
|
1722
|
+
const normalizedPath = relativePkgPath.startsWith("..") ? relativePkgPath : "./" + relativePkgPath;
|
|
1723
|
+
paths[pkg] = [normalizedPath];
|
|
1724
|
+
paths[`${pkg}/*`] = [`${normalizedPath}/*`];
|
|
1725
|
+
} else {
|
|
1726
|
+
paths[pkg] = [`../node_modules/${pkg}`];
|
|
1727
|
+
paths[`${pkg}/*`] = [`../node_modules/${pkg}/*`];
|
|
1728
|
+
}
|
|
1688
1729
|
}
|
|
1689
1730
|
return {
|
|
1690
1731
|
compilerOptions: {
|
|
@@ -2644,7 +2685,7 @@ function extractModuleNames$1(modules) {
|
|
|
2644
2685
|
* Generate modules.ts that imports all configured modules
|
|
2645
2686
|
* AND references their augment.d.ts files for type declarations
|
|
2646
2687
|
*/
|
|
2647
|
-
function generateModulesTypeDeclaration(modules, buildDir) {
|
|
2688
|
+
function generateModulesTypeDeclaration(modules, buildDir, rootDir) {
|
|
2648
2689
|
const moduleNames = extractModuleNames$1(modules);
|
|
2649
2690
|
if (moduleNames.length === 0) return;
|
|
2650
2691
|
const imports = moduleNames.map((name) => `import "${name}";`).join("\n");
|
|
@@ -2655,7 +2696,14 @@ function generateModulesTypeDeclaration(modules, buildDir) {
|
|
|
2655
2696
|
* DO NOT EDIT - This file is regenerated when modules change.
|
|
2656
2697
|
*/
|
|
2657
2698
|
|
|
2658
|
-
${moduleNames.map((name) =>
|
|
2699
|
+
${moduleNames.map((name) => {
|
|
2700
|
+
const pkgDir = resolvePackageDir(name, rootDir);
|
|
2701
|
+
if (pkgDir) {
|
|
2702
|
+
const relativePath = relative(buildDir, pkgDir);
|
|
2703
|
+
return `/// <reference path="${relativePath.startsWith("..") ? relativePath : "./" + relativePath}/augment.d.ts" />`;
|
|
2704
|
+
}
|
|
2705
|
+
return `/// <reference path="../node_modules/${name}/augment.d.ts" />`;
|
|
2706
|
+
}).join("\n")}
|
|
2659
2707
|
|
|
2660
2708
|
${imports}
|
|
2661
2709
|
`;
|
|
@@ -2823,7 +2871,7 @@ export default createMiddlewarePlugin({
|
|
|
2823
2871
|
} catch (error) {
|
|
2824
2872
|
if (debug) consola.warn(`[Kimesh] Middleware scanning failed:`, error);
|
|
2825
2873
|
}
|
|
2826
|
-
generateModulesTypeDeclaration(config.modules, state.generatedDir);
|
|
2874
|
+
generateModulesTypeDeclaration(config.modules, state.generatedDir, configRoot);
|
|
2827
2875
|
await writeTemplates(state.kimesh);
|
|
2828
2876
|
const userAliases = buildAliases(config, resolvedDirs.srcDir, configRoot);
|
|
2829
2877
|
const kimeshPackageAliases = buildKimeshPackageAliases(configRoot, debug);
|
|
@@ -3316,7 +3364,14 @@ export default []
|
|
|
3316
3364
|
* DO NOT EDIT - This file is regenerated when modules change.
|
|
3317
3365
|
*/
|
|
3318
3366
|
|
|
3319
|
-
${moduleNames.map((name) =>
|
|
3367
|
+
${moduleNames.map((name) => {
|
|
3368
|
+
const pkgDir = resolvePackageDir(name, root);
|
|
3369
|
+
if (pkgDir) {
|
|
3370
|
+
const relativePath = relative(buildDir, pkgDir);
|
|
3371
|
+
return `/// <reference path="${relativePath.startsWith("..") ? relativePath : "./" + relativePath}/augment.d.ts" />`;
|
|
3372
|
+
}
|
|
3373
|
+
return `/// <reference path="../node_modules/${name}/augment.d.ts" />`;
|
|
3374
|
+
}).join("\n")}
|
|
3320
3375
|
|
|
3321
3376
|
${imports}
|
|
3322
3377
|
`, "utf-8");
|
package/package.json
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kimesh/kit",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "Build-time engine for Kimesh framework",
|
|
5
|
-
"type": "module",
|
|
6
5
|
"repository": {
|
|
7
6
|
"type": "git",
|
|
8
7
|
"url": "https://github.com/kimeshjs/kimesh.git"
|
|
9
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"types.d.ts"
|
|
12
|
+
],
|
|
13
|
+
"type": "module",
|
|
14
|
+
"main": "./dist/index.mjs",
|
|
15
|
+
"types": "./types.d.ts",
|
|
10
16
|
"exports": {
|
|
11
17
|
".": {
|
|
12
18
|
"types": "./types.d.ts",
|
|
13
19
|
"import": "./dist/index.mjs"
|
|
14
20
|
}
|
|
15
21
|
},
|
|
16
|
-
"main": "./dist/index.mjs",
|
|
17
|
-
"types": "./types.d.ts",
|
|
18
|
-
"files": [
|
|
19
|
-
"dist",
|
|
20
|
-
"types.d.ts"
|
|
21
|
-
],
|
|
22
22
|
"scripts": {
|
|
23
23
|
"build": "tsdown",
|
|
24
24
|
"dev": "tsdown --watch",
|
|
@@ -26,14 +26,10 @@
|
|
|
26
26
|
"test": "vitest run",
|
|
27
27
|
"test:watch": "vitest"
|
|
28
28
|
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"vite": "^8.0.0-beta.8",
|
|
31
|
-
"vue": "^3.5.0"
|
|
32
|
-
},
|
|
33
29
|
"dependencies": {
|
|
34
|
-
"@kimesh/auto-import": "0.2.
|
|
35
|
-
"@kimesh/layers": "0.2.
|
|
36
|
-
"@kimesh/router-generator": "0.2.
|
|
30
|
+
"@kimesh/auto-import": "0.2.12",
|
|
31
|
+
"@kimesh/layers": "0.2.12",
|
|
32
|
+
"@kimesh/router-generator": "0.2.12",
|
|
37
33
|
"@vitejs/plugin-vue": "^6.0.3",
|
|
38
34
|
"c12": "^3.3.3",
|
|
39
35
|
"consola": "^3.4.2",
|
|
@@ -55,5 +51,9 @@
|
|
|
55
51
|
"unplugin-vue-components": "^31.0.0",
|
|
56
52
|
"vite": "^8.0.0-beta.8",
|
|
57
53
|
"vue": "^3.5.26"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"vite": "^8.0.0-beta.8",
|
|
57
|
+
"vue": "^3.5.0"
|
|
58
58
|
}
|
|
59
59
|
}
|
package/types.d.ts
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* Similar to Nuxt's types.d.ts, this allows using defineKmConfig without imports.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
import type { KimeshConfig } from
|
|
8
|
+
import type { KimeshConfig } from './dist/index.mjs'
|
|
9
9
|
|
|
10
|
-
export * from
|
|
10
|
+
export * from './dist/index.mjs'
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Function type for defineKmConfig
|
|
14
14
|
*/
|
|
15
|
-
type DefineKmConfig = (config: KimeshConfig) => KimeshConfig
|
|
15
|
+
type DefineKmConfig = (config: KimeshConfig) => KimeshConfig
|
|
16
16
|
|
|
17
17
|
declare global {
|
|
18
18
|
/**
|
|
@@ -29,5 +29,5 @@ declare global {
|
|
|
29
29
|
* })
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
const defineKmConfig: DefineKmConfig
|
|
32
|
+
const defineKmConfig: DefineKmConfig
|
|
33
33
|
}
|