@kimesh/layers 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 +6 -6
- package/dist/index.mjs +2 -2
- package/package.json +10 -10
package/dist/index.d.mts
CHANGED
|
@@ -112,7 +112,7 @@ interface ResolvedLayer {
|
|
|
112
112
|
/** Whether this is the app layer (priority 0) */
|
|
113
113
|
isApp: boolean;
|
|
114
114
|
/** Source type: 'local', 'npm', or 'workspace' */
|
|
115
|
-
source:
|
|
115
|
+
source: 'local' | 'npm' | 'workspace';
|
|
116
116
|
/** Alias mappings for this layer */
|
|
117
117
|
aliases: Record<string, string>;
|
|
118
118
|
/** Runtime config from this layer's kimesh.config.ts */
|
|
@@ -186,7 +186,7 @@ interface MergedLayerConfig {
|
|
|
186
186
|
*/
|
|
187
187
|
interface LayerConflict {
|
|
188
188
|
/** Type of conflict */
|
|
189
|
-
type:
|
|
189
|
+
type: 'route' | 'component' | 'composable';
|
|
190
190
|
/** Name of the conflicting item */
|
|
191
191
|
name: string;
|
|
192
192
|
/** Winning layer */
|
|
@@ -244,7 +244,7 @@ declare function mergeConfigs<T extends object>(highPriority: T, lowPriority: T)
|
|
|
244
244
|
/**
|
|
245
245
|
* Detect conflicts between layers
|
|
246
246
|
*/
|
|
247
|
-
declare function detectConflicts(
|
|
247
|
+
declare function detectConflicts(): LayerConflict[];
|
|
248
248
|
//#endregion
|
|
249
249
|
//#region src/aliases.d.ts
|
|
250
250
|
/**
|
|
@@ -301,7 +301,7 @@ declare function generateLayerInfoModule(stack: LayerStack): string;
|
|
|
301
301
|
* Options for prepareLayers when using (root, options) signature
|
|
302
302
|
*/
|
|
303
303
|
interface PrepareLayersOptions {
|
|
304
|
-
enabled?: string[] |
|
|
304
|
+
enabled?: string[] | 'all' | 'none';
|
|
305
305
|
excluded?: string[];
|
|
306
306
|
}
|
|
307
307
|
/**
|
|
@@ -338,7 +338,7 @@ declare function prepareLayersFromRoot(root: string, options?: PrepareLayersOpti
|
|
|
338
338
|
* ```
|
|
339
339
|
*/
|
|
340
340
|
declare function prepareLayersWithConfig(options: LayerResolveOptions & {
|
|
341
|
-
enabled?: string[] |
|
|
341
|
+
enabled?: string[] | 'all' | 'none';
|
|
342
342
|
}): Promise<PrepareLayersResult>;
|
|
343
343
|
/**
|
|
344
344
|
* High-level utility to resolve and filter layers.
|
|
@@ -350,7 +350,7 @@ declare function prepareLayersWithConfig(options: LayerResolveOptions & {
|
|
|
350
350
|
* @deprecated Use prepareLayersFromRoot or prepareLayersWithConfig for clearer intent
|
|
351
351
|
*/
|
|
352
352
|
declare function prepareLayers(rootOrOptions: string | (LayerResolveOptions & {
|
|
353
|
-
enabled?: string[] |
|
|
353
|
+
enabled?: string[] | 'all' | 'none';
|
|
354
354
|
}), options?: PrepareLayersOptions): Promise<ResolvedLayer[] | PrepareLayersResult>;
|
|
355
355
|
//#endregion
|
|
356
356
|
export { ALIAS_PATTERNS, type ExtendedLayerConfig, type KimeshLayerConfig, type LayerAutoImportConfig, type LayerComponentConfig, type LayerComposableConfig, type LayerConflict, type LayerResolveOptions, type LayerRouteConfig, type LayerStack, type LayerStoresConfig, type LayerUtilsConfig, type MergedLayerConfig, PrepareLayersOptions, PrepareLayersResult, type ResolvedLayer, buildFsAllow, buildViteAliases, createLayerAliases, detectConflicts, filterLayersByEnabled, generateLayerAliasesFromLayers as generateLayerAliases, generateLayerInfoModule, generateTsConfigPaths, generateViteAliasConfig, getLayer, hasLayer, mergeConfigs, mergeLayerConfigs, prepareLayers, prepareLayersFromRoot, prepareLayersWithConfig, resolveLayers };
|
package/dist/index.mjs
CHANGED
|
@@ -263,7 +263,7 @@ async function resolveExtendedLayer(config, root, priority, visited, resolving)
|
|
|
263
263
|
const loaded = await loadLayerConfig(layerConfig.path);
|
|
264
264
|
const mergedConfig = {
|
|
265
265
|
...layerConfig,
|
|
266
|
-
...loaded?.config
|
|
266
|
+
...loaded?.config,
|
|
267
267
|
path: layerConfig.path,
|
|
268
268
|
name: loaded?.config?.name || layerConfig.name
|
|
269
269
|
};
|
|
@@ -678,7 +678,7 @@ function mergeConfigs(highPriority, lowPriority) {
|
|
|
678
678
|
/**
|
|
679
679
|
* Detect conflicts between layers
|
|
680
680
|
*/
|
|
681
|
-
function detectConflicts(
|
|
681
|
+
function detectConflicts() {
|
|
682
682
|
return [];
|
|
683
683
|
}
|
|
684
684
|
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kimesh/layers",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.12",
|
|
4
4
|
"description": "Layer system for Kimesh framework - layer discovery, resolution, and configuration merging",
|
|
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
|
+
],
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "./dist/index.mjs",
|
|
14
|
+
"types": "./dist/index.d.mts",
|
|
10
15
|
"exports": {
|
|
11
16
|
".": {
|
|
12
17
|
"types": "./dist/index.d.mts",
|
|
13
18
|
"import": "./dist/index.mjs"
|
|
14
19
|
}
|
|
15
20
|
},
|
|
16
|
-
"main": "./dist/index.mjs",
|
|
17
|
-
"types": "./dist/index.d.mts",
|
|
18
|
-
"files": [
|
|
19
|
-
"dist"
|
|
20
|
-
],
|
|
21
21
|
"scripts": {
|
|
22
22
|
"build": "tsdown",
|
|
23
23
|
"dev": "tsdown --watch",
|
|
@@ -26,14 +26,14 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"c12": "^3.3.3",
|
|
29
|
+
"consola": "^3.4.2",
|
|
29
30
|
"defu": "^6.1.4",
|
|
30
|
-
"pathe": "^2.0.3"
|
|
31
|
-
"consola": "^3.4.2"
|
|
31
|
+
"pathe": "^2.0.3"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/node": "^25.0.8",
|
|
35
|
-
"typescript": "^5.9.3",
|
|
36
35
|
"tsdown": "^0.20.0-beta.3",
|
|
36
|
+
"typescript": "^5.9.3",
|
|
37
37
|
"vitest": "^4.0.17"
|
|
38
38
|
}
|
|
39
39
|
}
|