已开启
fix: 修复依赖版本冲突和配置问题 #1
fix: 修复依赖版本冲突和配置问题 #1
已开启
智鹏_Patrick创建于 3月30日
6 个文件变更+35-42
@@ -1,44 +1,48 @@
1-# 数据库IP1+# 数据库IP
2-DATABASE_HOST = 'localhost'2+DATABASE_HOST=localhost
3# 数据库端口3# 数据库端口
4-DATABASE_PORT = 33064+DATABASE_PORT=3306
5# 数据库用户5# 数据库用户
6-DATABASE_USERNAME = 'root'6+DATABASE_USERNAME=root
7# 数据库密码7# 数据库密码
8-DATABASE_PASSWORD = 'root'8+DATABASE_PASSWORD=root
9# 数据库名称 (确保数据库存在)9# 数据库名称 (确保数据库存在)
10-DATABASE_NAME = 'demo_tiny_pro'10+DATABASE_NAME=demo_tiny_pro
11# 是否强制同步数据库 (线上建议关闭)11# 是否强制同步数据库 (线上建议关闭)
12-DATABASE_SYNCHRONIZE = true12+DATABASE_SYNCHRONIZE=true
13# 是否自动加载Entry (建议设置为true)13# 是否自动加载Entry (建议设置为true)
14-DATABASE_AUTOLOADENTITIES = true14+DATABASE_AUTOLOADENTITIES=true
15# jwt盐15# jwt盐
16-AUTH_SECRET = 'secret'16+AUTH_SECRET=secret
17# AccessToken默认过期时间17# AccessToken默认过期时间
18-REDIS_SECONDS = 720018+REDIS_SECONDS=7200
19# Redis IP19# Redis IP
20-REDIS_HOST = 'localhost'20+REDIS_HOST=localhost
21# Redis 端口21# Redis 端口
22-REDIS_PORT = 637922+REDIS_PORT=6379
23# JwT过期时间 (已废弃)23# JwT过期时间 (已废弃)
24-EXPIRES_IN = '2h'24+EXPIRES_IN=2h
25# 分页默认起始页码数25# 分页默认起始页码数
26-PAGINATION_PAGE = 126+PAGINATION_PAGE=1
27# 分页默认起始大小27# 分页默认起始大小
28-PAGINATION_LIMIT = 1028+PAGINATION_LIMIT=10
29# api接口全局前缀29# api接口全局前缀
30-GLOBAL_PREFIX = '/'30+GLOBAL_PREFIX=/
31# mock接口glob表达式31# mock接口glob表达式
32-MOCK_REGEX = '/mock'32+MOCK_REGEX=/mock
33# refreshToken过期时间33# refreshToken过期时间
34-REFRESH_TOKEN_TTL = 60480000034+REFRESH_TOKEN_TTL=604800000
35# 最大会话数, -1表示不限制35# 最大会话数, -1表示不限制
36DEVICE_LIMIT=136DEVICE_LIMIT=1
37# 是否启用演示模式, 如果设置为true, 则会拒绝所有的增加、修改、删除操作37# 是否启用演示模式, 如果设置为true, 则会拒绝所有的增加、修改、删除操作
38PREVIEW_MODE=true38PREVIEW_MODE=true
39# Swagger文档标题39# Swagger文档标题
40-SWAGGER_TITLE="Tiny Pro"40+SWAGGER_TITLE=Tiny Pro
41# Swagger文档简介41# Swagger文档简介
42-SWAGGER_DESC="开箱即用的中后台模板"42+SWAGGER_DESC=开箱即用的中后台模板
43# Swagger文档版本43# Swagger文档版本
44-SWAGGER_VERSION="1.0.0"44+SWAGGER_VERSION=1.0.0
45+# AccessToken过期时间
46+ACCESS_TOKEN_VALIDITY_SEC=7200
47+# CORS允许的源
48+CORS_ORIGIN=*
@@ -69,7 +69,7 @@
69 "@typescript-eslint/eslint-plugin": "7.18.0",69 "@typescript-eslint/eslint-plugin": "7.18.0",
70 "@typescript-eslint/parser": "7.18.0",70 "@typescript-eslint/parser": "7.18.0",
71 "cross-env": "^7.0.3",71 "cross-env": "^7.0.3",
72- "eslint": "8.42.0",72+ "eslint": "8.57.0",
73 "eslint-config-prettier": "8.8.0",73 "eslint-config-prettier": "8.8.0",
74 "eslint-plugin-import": "2.27.5",74 "eslint-plugin-import": "2.27.5",
75 "express": "^4.21.2",75 "express": "^4.21.2",
@@ -64,7 +64,7 @@ export const generateMigration = async (
64 64 
65 const config = await prettier.resolveConfig(process.cwd());65 const config = await prettier.resolveConfig(process.cwd());
66 66 
67- const formatted = prettier.format(code, {67+ const formatted = await prettier.format(code, {
68 ...config,68 ...config,
69 parser: 'babel-ts',69 parser: 'babel-ts',
70 });70 });
@@ -1,9 +1,9 @@
1VITE_CONTEXT=/vue-pro/1VITE_CONTEXT=/vue-pro/
2VITE_BASE_API=/api2VITE_BASE_API=/api
3-VITE_SERVER_HOST= http://127.0.0.1:30003+VITE_SERVER_HOST=http://127.0.0.1:3000
4-VITE_MOCK_HOST= http://127.0.0.1:88484+VITE_MOCK_HOST=http://127.0.0.1:8848
5-VITE_USE_MOCK= false5+VITE_USE_MOCK=false
6-VITE_MOCK_IGNORE= /api/user/userInfo,/api/user/login,/api/user/register,/api/employee/getEmployee6+VITE_MOCK_IGNORE=/api/user/userInfo,/api/user/login,/api/user/register,/api/employee/getEmployee
7 7 
8VITE_MOCK_SERVER_HOST=/mock8VITE_MOCK_SERVER_HOST=/mock
9VITE_BASE=/9VITE_BASE=/
@@ -1,4 +1,4 @@
1-import { resolve } from 'node:path'1+import { resolve } from 'node:path'
2import process from 'node:process'2import process from 'node:process'
3import { configDotenv } from 'dotenv'3import { configDotenv } from 'dotenv'
4import { loadEnv, mergeConfig } from 'vite'4import { loadEnv, mergeConfig } from 'vite'
@@ -17,20 +17,9 @@ const proxyConfig = {
17 target: env.VITE_SERVER_HOST,17 target: env.VITE_SERVER_HOST,
18 changeOrigin: true,18 changeOrigin: true,
19 logLevel: 'debug',19 logLevel: 'debug',
20- rewrite: (path: string) =>
21- path.replace(
22- new RegExp(`${env.VITE_BASE_API}`),
23- '',
24- ),
25- },
26- [env.VITE_MOCK_SERVER_HOST]: {
27- target: env.VITE_SERVER_HOST,
28- changeOrigin: true,
29- rewrite: (path: string) => {
30- return path.replace(new RegExp(`${env.VITE_MOCK_SERVER_HOST}`), '/mock')
31- },
32 },20 },
33}21}
22+ 
34export default mergeConfig(23export default mergeConfig(
35 {24 {
36 mode: 'development',25 mode: 'development',
@@ -56,4 +45,4 @@ export default mergeConfig(
56 plugins: [],45 plugins: [],
57 },46 },
58 baseConfig,47 baseConfig,
59-)48+)
@@ -36,7 +36,7 @@
36 "@opentiny/vue-icon": "~3.28.0",36 "@opentiny/vue-icon": "~3.28.0",
37 "@opentiny/vue-locale": "~3.28.0",37 "@opentiny/vue-locale": "~3.28.0",
38 "@opentiny/vue-search-box": "^0.1.3",38 "@opentiny/vue-search-box": "^0.1.3",
39- "@opentiny/vue-theme": "~3.28.0",39+ "@opentiny/vue-theme": "~3.29.0",
40 "@vueuse/core": "^10.11.1",40 "@vueuse/core": "^10.11.1",
41 "@vueuse/head": "^2.0.0",41 "@vueuse/head": "^2.0.0",
42 "axios": "^1.8.0",42 "axios": "^1.8.0",