befly-tpl 3.9.12 → 3.9.13
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/bunfig.toml +3 -0
- package/env.ts +44 -0
- package/menu.json +19 -0
- package/package.json +9 -9
package/bunfig.toml
ADDED
package/env.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 项目环境变量配置
|
|
3
|
+
* 这里的配置会覆盖 core/env.ts 中的默认配置
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import type { EnvConfig } from 'befly/types/env.js';
|
|
7
|
+
|
|
8
|
+
const isProd = process.env.NODE_ENV === 'production';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 项目自定义配置
|
|
12
|
+
* 只需要配置需要覆盖的字段
|
|
13
|
+
*/
|
|
14
|
+
export const Env: Partial<EnvConfig> = {
|
|
15
|
+
// ========== 项目配置 ==========
|
|
16
|
+
APP_NAME: isProd ? '野蜂飞舞正式环境' : '野蜂飞舞开发环境',
|
|
17
|
+
APP_PORT: 3000,
|
|
18
|
+
APP_HOST: '127.0.0.1',
|
|
19
|
+
DEV_EMAIL: 'dev@qq.com',
|
|
20
|
+
DEV_PASSWORD: '111111',
|
|
21
|
+
|
|
22
|
+
// ========== 日志配置 ==========
|
|
23
|
+
LOG_DEBUG: isProd ? 0 : 1,
|
|
24
|
+
LOG_EXCLUDE_FIELDS: 'password,token',
|
|
25
|
+
LOG_TO_CONSOLE: isProd ? 0 : 1,
|
|
26
|
+
|
|
27
|
+
// ========== 数据库配置 ==========
|
|
28
|
+
DB_TYPE: 'mysql',
|
|
29
|
+
DB_HOST: '127.0.0.1',
|
|
30
|
+
DB_USER: 'root2',
|
|
31
|
+
DB_PASS: 'root2',
|
|
32
|
+
DB_NAME: 'test4',
|
|
33
|
+
|
|
34
|
+
// ========== Redis 配置 ==========
|
|
35
|
+
REDIS_HOST: '127.0.0.1',
|
|
36
|
+
REDIS_PORT: 6379,
|
|
37
|
+
REDIS_PASSWORD: '',
|
|
38
|
+
REDIS_DB: 0,
|
|
39
|
+
REDIS_KEY_PREFIX: 'befly_demo',
|
|
40
|
+
|
|
41
|
+
// ========== JWT 配置 ==========
|
|
42
|
+
JWT_SECRET: isProd ? 'befly-jwt-prod' : 'befly-jwt-dev',
|
|
43
|
+
JWT_EXPIRES_IN: '7d'
|
|
44
|
+
};
|
package/menu.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "用户管理",
|
|
4
|
+
"path": "/internal/user",
|
|
5
|
+
"sort": 10,
|
|
6
|
+
"children": [
|
|
7
|
+
{
|
|
8
|
+
"name": "用户列表",
|
|
9
|
+
"path": "/internal/user/list",
|
|
10
|
+
"sort": 1
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "用户详情",
|
|
14
|
+
"path": "/internal/user/detail",
|
|
15
|
+
"sort": 2
|
|
16
|
+
}
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "befly-tpl",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.13",
|
|
4
4
|
"description": "Befly 3.0 TypeScript Template",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -18,25 +18,25 @@
|
|
|
18
18
|
"apis",
|
|
19
19
|
"tables",
|
|
20
20
|
"main.ts",
|
|
21
|
-
"ecosystem.config.js",
|
|
22
|
-
".env.development",
|
|
23
21
|
".npmrc",
|
|
24
|
-
"
|
|
22
|
+
"bunfig.toml",
|
|
23
|
+
"env.ts",
|
|
25
24
|
"LICENSE",
|
|
25
|
+
"main.ts",
|
|
26
|
+
"menu.json",
|
|
26
27
|
"package.json",
|
|
27
28
|
"pm2.config.cjs",
|
|
28
29
|
"README.md",
|
|
29
|
-
"SYSTEMD_DEPLOY.md",
|
|
30
30
|
"tsconfig.json"
|
|
31
31
|
],
|
|
32
32
|
"type": "module",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@befly-addon/admin": "1.0.
|
|
35
|
-
"befly": "3.8.
|
|
36
|
-
"befly-cli": "3.9.
|
|
34
|
+
"@befly-addon/admin": "1.0.19",
|
|
35
|
+
"befly": "3.8.10",
|
|
36
|
+
"befly-cli": "3.9.14"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"bun": ">=1.3.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "492e46d692787e6d141659fba27c26e030cd1181"
|
|
42
42
|
}
|