befly 3.4.0 → 3.4.2
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/commands/syncMenu.ts +2 -2
- package/menu.json +67 -0
- package/package.json +3 -2
package/commands/syncMenu.ts
CHANGED
|
@@ -18,7 +18,7 @@ import { Logger } from '../lib/logger.js';
|
|
|
18
18
|
import { Database } from '../lib/database.js';
|
|
19
19
|
import { join } from 'pathe';
|
|
20
20
|
import { existsSync } from 'node:fs';
|
|
21
|
-
import {
|
|
21
|
+
import { coreDir, projectDir } from '../paths.js';
|
|
22
22
|
|
|
23
23
|
interface SyncMenuOptions {
|
|
24
24
|
plan?: boolean;
|
|
@@ -296,7 +296,7 @@ export async function syncMenuCommand(options: SyncMenuOptions = {}) {
|
|
|
296
296
|
// 1. 读取两个配置文件
|
|
297
297
|
Logger.info('=== 步骤 1: 读取菜单配置文件 ===');
|
|
298
298
|
const projectMenuPath = join(projectDir, 'menu.json');
|
|
299
|
-
const coreMenuPath = join(
|
|
299
|
+
const coreMenuPath = join(coreDir, 'menu.json');
|
|
300
300
|
|
|
301
301
|
Logger.info(` 项目路径: ${projectMenuPath}`);
|
|
302
302
|
Logger.info(` core 路径: ${coreMenuPath}`);
|
package/menu.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "首页",
|
|
4
|
+
"path": "/",
|
|
5
|
+
"icon": "Home",
|
|
6
|
+
"sort": 1,
|
|
7
|
+
"type": 1
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "管理员管理",
|
|
11
|
+
"path": "/admin",
|
|
12
|
+
"icon": "Users",
|
|
13
|
+
"sort": 2,
|
|
14
|
+
"type": 1
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"name": "新闻管理",
|
|
18
|
+
"path": "/news",
|
|
19
|
+
"icon": "Newspaper",
|
|
20
|
+
"sort": 3,
|
|
21
|
+
"type": 1
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "菜单管理",
|
|
25
|
+
"path": "/menu",
|
|
26
|
+
"icon": "Menu",
|
|
27
|
+
"sort": 4,
|
|
28
|
+
"type": 1
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"name": "角色管理",
|
|
32
|
+
"path": "/role",
|
|
33
|
+
"icon": "Users",
|
|
34
|
+
"sort": 5,
|
|
35
|
+
"type": 1
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "字典管理",
|
|
39
|
+
"path": "/dict",
|
|
40
|
+
"icon": "BookOpen",
|
|
41
|
+
"sort": 6,
|
|
42
|
+
"type": 1
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"name": "用户管理",
|
|
46
|
+
"path": "/user",
|
|
47
|
+
"icon": "UserCog",
|
|
48
|
+
"sort": 7,
|
|
49
|
+
"type": 1,
|
|
50
|
+
"children": [
|
|
51
|
+
{
|
|
52
|
+
"name": "用户列表",
|
|
53
|
+
"path": "/list",
|
|
54
|
+
"icon": "Minus",
|
|
55
|
+
"sort": 1,
|
|
56
|
+
"type": 1
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "用户权限",
|
|
60
|
+
"path": "/permission",
|
|
61
|
+
"icon": "Minus",
|
|
62
|
+
"sort": 2,
|
|
63
|
+
"type": 1
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.2",
|
|
4
4
|
"description": "Befly - 为 Bun 专属打造的 TypeScript API 接口框架核心引擎",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": false,
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"tsconfig.json",
|
|
65
65
|
"LICENSE",
|
|
66
66
|
"main.ts",
|
|
67
|
+
"menu.json",
|
|
67
68
|
"paths.ts",
|
|
68
69
|
"util.ts",
|
|
69
70
|
"package.json",
|
|
@@ -80,5 +81,5 @@
|
|
|
80
81
|
"ora": "^9.0.0",
|
|
81
82
|
"pathe": "^2.0.3"
|
|
82
83
|
},
|
|
83
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "62974502c25562f83b840c5fe1d831dbf6476255"
|
|
84
85
|
}
|