From e391548a43514a046bb0db26492d95eca752e3ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E4=BB=99=E9=83=BD=E6=B2=A1=E7=94=A8?= <615206459@qq.com> Date: Fri, 26 Apr 2024 21:28:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20eps=20=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/cool/eps.d.ts | 2158 +++++++++++++++++ build/cool/eps.json | 1 + package.json | 2 +- .../dist/{types/src => }/base.d.ts | 0 packages/vite-plugin/dist/config.d.ts | 2 + .../dist/{types/src => }/ctx/index.d.ts | 2 +- .../dist/{types/src => }/demo.d.ts | 0 .../dist/{types/src => }/eps/index.d.ts | 2 +- packages/vite-plugin/dist/index.d.ts | 2 + packages/vite-plugin/dist/index.js | 152 +- .../dist/{types/src => }/menu/index.d.ts | 0 .../dist/{types/src => }/svg/index.d.ts | 0 .../dist/{types/src => }/tag/index.d.ts | 0 .../vite-plugin/dist/types/src/config.d.ts | 5 - .../dist/types/src/eps/config.d.ts | 7 - .../vite-plugin/dist/types/src/index.d.ts | 6 - .../dist/{types/src => }/utils/index.d.ts | 3 +- .../dist/{types/src => }/virtual.d.ts | 0 packages/vite-plugin/eps.d.ts | 1 - packages/vite-plugin/package.json | 9 +- packages/vite-plugin/src/config.ts | 39 +- packages/vite-plugin/src/ctx/index.ts | 2 +- packages/vite-plugin/src/dist/eps.d.ts | 1380 ----------- packages/vite-plugin/src/dist/eps.json | 1 - packages/vite-plugin/src/eps/config.ts | 37 - packages/vite-plugin/src/eps/index.ts | 43 +- packages/vite-plugin/src/index.ts | 20 +- packages/vite-plugin/src/menu/index.ts | 9 +- packages/vite-plugin/src/utils/index.ts | 29 +- packages/vite-plugin/src/virtual.ts | 2 +- packages/vite-plugin/tsconfig.json | 9 +- .../vite-plugin/{src => }/types/index.d.ts | 34 +- pnpm-lock.yaml | 187 +- src/App.vue | 3 + src/env.d.ts | 2 +- src/modules/user/components/select.vue | 4 +- vite.config.mts | 3 +- 37 files changed, 2476 insertions(+), 1680 deletions(-) create mode 100644 build/cool/eps.d.ts create mode 100644 build/cool/eps.json rename packages/vite-plugin/dist/{types/src => }/base.d.ts (100%) create mode 100644 packages/vite-plugin/dist/config.d.ts rename packages/vite-plugin/dist/{types/src => }/ctx/index.d.ts (58%) rename packages/vite-plugin/dist/{types/src => }/demo.d.ts (100%) rename packages/vite-plugin/dist/{types/src => }/eps/index.d.ts (75%) create mode 100644 packages/vite-plugin/dist/index.d.ts rename packages/vite-plugin/dist/{types/src => }/menu/index.d.ts (100%) rename packages/vite-plugin/dist/{types/src => }/svg/index.d.ts (100%) rename packages/vite-plugin/dist/{types/src => }/tag/index.d.ts (100%) delete mode 100644 packages/vite-plugin/dist/types/src/config.d.ts delete mode 100644 packages/vite-plugin/dist/types/src/eps/config.d.ts delete mode 100644 packages/vite-plugin/dist/types/src/index.d.ts rename packages/vite-plugin/dist/{types/src => }/utils/index.d.ts (81%) rename packages/vite-plugin/dist/{types/src => }/virtual.d.ts (100%) delete mode 100644 packages/vite-plugin/eps.d.ts delete mode 100644 packages/vite-plugin/src/dist/eps.d.ts delete mode 100644 packages/vite-plugin/src/dist/eps.json delete mode 100644 packages/vite-plugin/src/eps/config.ts rename packages/vite-plugin/{src => }/types/index.d.ts (60%) diff --git a/build/cool/eps.d.ts b/build/cool/eps.d.ts new file mode 100644 index 0000000..a4796ef --- /dev/null +++ b/build/cool/eps.d.ts @@ -0,0 +1,2158 @@ +declare namespace Eps { + interface BaseSysDepartmentEntity { + /** + * ID + */ + id?: number; + /** + * 部门名称 + */ + name?: string; + /** + * 上级部门ID + */ + parentId?: number; + /** + * 排序 + */ + orderNum?: number; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface BaseSysLogEntity { + /** + * ID + */ + id?: number; + /** + * 用户ID + */ + userId?: number; + /** + * 行为 + */ + action?: string; + /** + * ip + */ + ip?: string; + /** + * ip地址 + */ + ipAddr?: string; + /** + * 参数 + */ + params?: json; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface BaseSysMenuEntity { + /** + * ID + */ + id?: number; + /** + * 父菜单ID + */ + parentId?: number; + /** + * 菜单名称 + */ + name?: string; + /** + * 菜单地址 + */ + router?: string; + /** + * 权限标识 + */ + perms?: string; + /** + * 类型 0-目录 1-菜单 2-按钮 + */ + type?: number; + /** + * 图标 + */ + icon?: string; + /** + * 排序 + */ + orderNum?: number; + /** + * 视图地址 + */ + viewPath?: string; + /** + * 路由缓存 + */ + keepAlive?: boolean; + /** + * 是否显示 + */ + isShow?: boolean; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface BaseSysParamEntity { + /** + * ID + */ + id?: number; + /** + * 键 + */ + keyName?: string; + /** + * 名称 + */ + name?: string; + /** + * 数据 + */ + data?: string; + /** + * 数据类型 0-字符串 1-富文本 2-文件 + */ + dataType?: number; + /** + * 备注 + */ + remark?: string; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface BaseSysRoleEntity { + /** + * ID + */ + id?: number; + /** + * 用户ID + */ + userId?: string; + /** + * 名称 + */ + name?: string; + /** + * 角色标签 + */ + label?: string; + /** + * 备注 + */ + remark?: string; + /** + * 数据权限是否关联上下级 + */ + relevance?: boolean; + /** + * 菜单权限 + */ + menuIdList?: json; + /** + * 部门权限 + */ + departmentIdList?: json; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface BaseSysUserEntity { + /** + * ID + */ + id?: number; + /** + * 部门ID + */ + departmentId?: number; + /** + * 姓名 + */ + name?: string; + /** + * 用户名 + */ + username?: string; + /** + * 密码 + */ + password?: string; + /** + * 密码版本, 作用是改完密码,让原来的token失效 + */ + passwordV?: number; + /** + * 昵称 + */ + nickName?: string; + /** + * 头像 + */ + headImg?: string; + /** + * 手机 + */ + phone?: string; + /** + * 邮箱 + */ + email?: string; + /** + * 备注 + */ + remark?: string; + /** + * 状态 0-禁用 1-启用 + */ + status?: number; + /** + * socketId + */ + socketId?: string; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface DemoGoodsEntity { + /** + * ID + */ + id?: number; + /** + * 标题 + */ + title?: string; + /** + * 价格 + */ + price?: number; + /** + * 描述 + */ + description?: string; + /** + * 主图 + */ + mainImage?: string; + /** + * 示例图 + */ + exampleImages?: json; + /** + * 库存 + */ + stock?: number; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface DictInfoEntity { + /** + * ID + */ + id?: number; + /** + * 类型ID + */ + typeId?: number; + /** + * 名称 + */ + name?: string; + /** + * 值 + */ + value?: string; + /** + * 排序 + */ + orderNum?: number; + /** + * 备注 + */ + remark?: string; + /** + * 父ID + */ + parentId?: number; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface DictTypeEntity { + /** + * ID + */ + id?: number; + /** + * 名称 + */ + name?: string; + /** + * 标识 + */ + key?: string; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface PluginInfoEntity { + /** + * ID + */ + id?: number; + /** + * 名称 + */ + name?: string; + /** + * 简介 + */ + description?: string; + /** + * Key名 + */ + keyName?: string; + /** + * Hook + */ + hook?: string; + /** + * 描述 + */ + readme?: string; + /** + * 版本 + */ + version?: string; + /** + * Logo(base64) + */ + logo?: string; + /** + * 作者 + */ + author?: string; + /** + * 状态 0-禁用 1-启用 + */ + status?: number; + /** + * 内容 + */ + content?: json; + /** + * 插件的plugin.json + */ + pluginJson?: json; + /** + * 配置 + */ + config?: json; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface RecycleDataEntity { + /** + * ID + */ + id?: number; + /** + * 表 + */ + entityInfo?: json; + /** + * 操作人 + */ + userId?: number; + /** + * 被删除的数据 + */ + data?: json; + /** + * 请求的接口 + */ + url?: string; + /** + * 请求参数 + */ + params?: json; + /** + * 删除数据条数 + */ + count?: number; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface SpaceInfoEntity { + /** + * ID + */ + id?: number; + /** + * 地址 + */ + url?: string; + /** + * 类型 + */ + type?: string; + /** + * 分类ID + */ + classifyId?: number; + /** + * 文件id + */ + fileId?: string; + /** + * 文件名 + */ + name?: string; + /** + * 文件大小 + */ + size?: number; + /** + * 文档版本 + */ + version?: number; + /** + * 文件位置 + */ + key?: string; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface SpaceTypeEntity { + /** + * ID + */ + id?: number; + /** + * 类别名称 + */ + name?: string; + /** + * 父分类ID + */ + parentId?: number; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface TaskInfoEntity { + /** + * ID + */ + id?: number; + /** + * 任务ID + */ + jobId?: string; + /** + * 任务配置 + */ + repeatConf?: string; + /** + * 名称 + */ + name?: string; + /** + * cron + */ + cron?: string; + /** + * 最大执行次数 不传为无限次 + */ + limit?: number; + /** + * 每间隔多少毫秒执行一次 如果cron设置了 这项设置就无效 + */ + every?: number; + /** + * 备注 + */ + remark?: string; + /** + * 状态 0-停止 1-运行 + */ + status?: number; + /** + * 开始时间 + */ + startDate?: Date; + /** + * 结束时间 + */ + endDate?: Date; + /** + * 数据 + */ + data?: string; + /** + * 执行的service实例ID + */ + service?: string; + /** + * 状态 0-系统 1-用户 + */ + type?: number; + /** + * 下一次执行时间 + */ + nextRunTime?: Date; + /** + * 状态 0-cron 1-时间间隔 + */ + taskType?: number; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface UserAddressEntity { + /** + * ID + */ + id?: number; + /** + * 用户ID + */ + userId?: number; + /** + * 联系人 + */ + contact?: string; + /** + * 手机号 + */ + phone?: string; + /** + * 省 + */ + province?: string; + /** + * 市 + */ + city?: string; + /** + * 区 + */ + district?: string; + /** + * 地址 + */ + address?: string; + /** + * 是否默认 + */ + isDefault?: boolean; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface UserInfoEntity { + /** + * ID + */ + id?: number; + /** + * 登录唯一ID + */ + unionid?: string; + /** + * 头像 + */ + avatarUrl?: string; + /** + * 昵称 + */ + nickName?: string; + /** + * 手机号 + */ + phone?: string; + /** + * 性别 0-未知 1-男 2-女 + */ + gender?: number; + /** + * 状态 0-禁用 1-正常 2-已注销 + */ + status?: number; + /** + * 登录方式 0-小程序 1-公众号 2-H5 + */ + loginType?: number; + /** + * 密码 + */ + password?: string; + /** + * 密码 + */ + test11?: string; + /** + * 创建时间 + */ + createTime?: Date; + /** + * 更新时间 + */ + updateTime?: Date; + /** + * 任意键值 + */ + [key: string]: any; + } + + interface ChatMessageEntity { + /** + * 任意键值 + */ + [key: string]: any; + } + + interface ChatSessionEntity { + /** + * 任意键值 + */ + [key: string]: any; + } + + interface TestEntity { + /** + * 任意键值 + */ + [key: string]: any; + } + + interface DemoUserFollowEntity { + /** + * 任意键值 + */ + [key: string]: any; + } + + interface DemoUserInfoEntity { + /** + * 任意键值 + */ + [key: string]: any; + } + interface BaseComm { + /** + * 修改个人信息 + */ + personUpdate(data?: any): Promise; + /** + * 文件上传模式 + */ + uploadMode(data?: any): Promise; + /** + * 权限与菜单 + */ + permmenu(data?: any): Promise; + /** + * 个人信息 + */ + person(data?: any): Promise; + /** + * 文件上传 + */ + upload(data?: any): Promise; + /** + * 退出 + */ + logout(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + personUpdate: string; + uploadMode: string; + permmenu: string; + person: string; + upload: string; + logout: string; + }; + /** + * 权限状态 + */ + _permission: { + personUpdate: boolean; + uploadMode: boolean; + permmenu: boolean; + person: boolean; + upload: boolean; + logout: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface BaseOpen { + /** + * 刷新token + */ + refreshToken(data?: any): Promise; + /** + * 验证码 + */ + captcha(data?: any): Promise; + /** + * 登录 + */ + login(data?: any): Promise; + /** + * 获得网页内容的参数值 + */ + html(data?: any): Promise; + /** + * 实体信息与路径 + */ + eps(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + refreshToken: string; + captcha: string; + login: string; + html: string; + eps: string; + }; + /** + * 权限状态 + */ + _permission: { + refreshToken: boolean; + captcha: boolean; + login: boolean; + html: boolean; + eps: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface BaseSysDepartment { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 排序 + */ + order(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { delete: string; update: string; order: string; list: string; add: string }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + order: boolean; + list: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface BaseSysLog { + /** + * 日志保存时间 + */ + setKeep(data?: any): Promise; + /** + * 获得日志保存时间 + */ + getKeep(data?: any): Promise; + /** + * 清理 + */ + clear(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: BaseSysLogEntity[]; + [key: string]: any; + }>; + /** + * 权限标识 + */ + permission: { setKeep: string; getKeep: string; clear: string; page: string }; + /** + * 权限状态 + */ + _permission: { setKeep: boolean; getKeep: boolean; clear: boolean; page: boolean }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface BaseSysMenu { + /** + * 创建代码 + */ + create(data?: any): Promise; + /** + * 导出 + */ + export(data?: any): Promise; + /** + * 导入 + */ + import(data?: any): Promise; + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 解析 + */ + parse(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: BaseSysMenuEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + create: string; + export: string; + import: string; + delete: string; + update: string; + parse: string; + info: string; + list: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + create: boolean; + export: boolean; + import: boolean; + delete: boolean; + update: boolean; + parse: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface BaseSysParam { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 获得网页内容的参数值 + */ + html(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: BaseSysParamEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + html: string; + info: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + html: boolean; + info: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface BaseSysRole { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: BaseSysRoleEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface BaseSysUser { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 移动部门 + */ + move(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: BaseSysUserEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + move: string; + info: string; + list: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + move: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface DemoGoods { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: DemoGoodsEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface DemoUserFollow { + /** + * page + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: DemoUserFollowEntity[]; + [key: string]: any; + }>; + /** + * list + */ + list(data?: any): Promise; + /** + * info + */ + info(data?: any): Promise; + /** + * delete + */ + delete(data?: any): Promise; + /** + * update + */ + update(data?: any): Promise; + /** + * add + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + page: string; + list: string; + info: string; + delete: string; + update: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + page: boolean; + list: boolean; + info: boolean; + delete: boolean; + update: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface DemoUserInfo { + /** + * t1 + */ + t1(data?: any): Promise; + /** + * t2 + */ + t2(data?: any): Promise; + /** + * t3 + */ + t3(data?: any): Promise; + /** + * page + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: DemoUserInfoEntity[]; + [key: string]: any; + }>; + /** + * list + */ + list(data?: any): Promise; + /** + * info + */ + info(data?: any): Promise; + /** + * delete + */ + delete(data?: any): Promise; + /** + * update + */ + update(data?: any): Promise; + /** + * add + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + t1: string; + t2: string; + t3: string; + page: string; + list: string; + info: string; + delete: string; + update: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + t1: boolean; + t2: boolean; + t3: boolean; + page: boolean; + list: boolean; + info: boolean; + delete: boolean; + update: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface DictInfo { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 获得字典数据 + */ + data(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: DictInfoEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + data: string; + info: string; + list: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + data: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface DictType { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: DictTypeEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface PluginInfo { + /** + * 安装插件 + */ + install(data?: any): Promise; + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: PluginInfoEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + install: string; + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + install: boolean; + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface RecycleData { + /** + * 恢复数据 + */ + restore(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: RecycleDataEntity[]; + [key: string]: any; + }>; + /** + * 权限标识 + */ + permission: { restore: string; info: string; page: string }; + /** + * 权限状态 + */ + _permission: { restore: boolean; info: boolean; page: boolean }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface SpaceInfo { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: SpaceInfoEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface SpaceType { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: SpaceTypeEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface TaskInfo { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 开始 + */ + start(data?: any): Promise; + /** + * 执行一次 + */ + once(data?: any): Promise; + /** + * 停止 + */ + stop(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: TaskInfoEntity[]; + [key: string]: any; + }>; + /** + * 日志 + */ + log(data?: any): Promise; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + start: string; + once: string; + stop: string; + info: string; + page: string; + log: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + start: boolean; + once: boolean; + stop: boolean; + info: boolean; + page: boolean; + log: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface UserAddress { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: UserAddressEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + info: string; + list: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface UserInfo { + /** + * 删除 + */ + delete(data?: any): Promise; + /** + * 修改 + */ + update(data?: any): Promise; + /** + * test + */ + test(data?: any): Promise; + /** + * 单个信息 + */ + info(data?: any): Promise; + /** + * 列表查询 + */ + list(data?: any): Promise; + /** + * 分页查询 + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: UserInfoEntity[]; + [key: string]: any; + }>; + /** + * 新增 + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + delete: string; + update: string; + test: string; + info: string; + list: string; + page: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + delete: boolean; + update: boolean; + test: boolean; + info: boolean; + list: boolean; + page: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface ChatMessage { + /** + * page + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: ChatMessageEntity[]; + [key: string]: any; + }>; + /** + * list + */ + list(data?: any): Promise; + /** + * info + */ + info(data?: any): Promise; + /** + * delete + */ + delete(data?: any): Promise; + /** + * update + */ + update(data?: any): Promise; + /** + * add + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + page: string; + list: string; + info: string; + delete: string; + update: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + page: boolean; + list: boolean; + info: boolean; + delete: boolean; + update: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface ChatSession { + /** + * page + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: ChatSessionEntity[]; + [key: string]: any; + }>; + /** + * list + */ + list(data?: any): Promise; + /** + * info + */ + info(data?: any): Promise; + /** + * delete + */ + delete(data?: any): Promise; + /** + * update + */ + update(data?: any): Promise; + /** + * add + */ + add(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + page: string; + list: string; + info: string; + delete: string; + update: string; + add: string; + }; + /** + * 权限状态 + */ + _permission: { + page: boolean; + list: boolean; + info: boolean; + delete: boolean; + update: boolean; + add: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + interface Test { + /** + * page + */ + page(data?: any): Promise<{ + pagination: { size: number; page: number; total: number; [key: string]: any }; + list: TestEntity[]; + [key: string]: any; + }>; + /** + * update + */ + update(data?: any): Promise; + /** + * add + */ + add(data?: any): Promise; + /** + * info + */ + info(data?: any): Promise; + /** + * delete + */ + delete(data?: any): Promise; + /** + * list + */ + list(data?: any): Promise; + /** + * 权限标识 + */ + permission: { + page: string; + update: string; + add: string; + info: string; + delete: string; + list: string; + }; + /** + * 权限状态 + */ + _permission: { + page: boolean; + update: boolean; + add: boolean; + info: boolean; + delete: boolean; + list: boolean; + }; + /** + * 请求 + */ + request: Service["request"]; + } + + type json = any; + + type Service = { + request(options?: { + url: string; + method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS"; + data?: any; + params?: any; + headers?: { + [key: string]: any; + }; + timeout?: number; + proxy?: boolean; + [key: string]: any; + }): Promise; + base: { + comm: BaseComm; + open: BaseOpen; + sys: { + department: BaseSysDepartment; + log: BaseSysLog; + menu: BaseSysMenu; + param: BaseSysParam; + role: BaseSysRole; + user: BaseSysUser; + }; + }; + demo: { goods: DemoGoods; user: { follow: DemoUserFollow; info: DemoUserInfo } }; + dict: { info: DictInfo; type: DictType }; + plugin: { info: PluginInfo }; + recycle: { data: RecycleData }; + space: { info: SpaceInfo; type: SpaceType }; + task: { info: TaskInfo }; + user: { address: UserAddress; info: UserInfo }; + chat: { message: ChatMessage; session: ChatSession }; + test: Test; + }; +} diff --git a/build/cool/eps.json b/build/cool/eps.json new file mode 100644 index 0000000..9c42602 --- /dev/null +++ b/build/cool/eps.json @@ -0,0 +1 @@ +[{"prefix":"/admin/base/comm","name":"","api":[{"method":"post","path":"/personUpdate"},{"method":"get","path":"/uploadMode"},{"method":"get","path":"/permmenu"},{"method":"get","path":"/person"},{"method":"post","path":"/upload"},{"method":"post","path":"/logout"}]},{"prefix":"/admin/base/open","name":"","api":[{"method":"get","path":"/refreshToken"},{"method":"get","path":"/captcha"},{"method":"post","path":"/login"},{"method":"get","path":"/html"},{"method":"get","path":"/eps"}]},{"prefix":"/admin/base/sys/department","name":"BaseSysDepartmentEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/order"},{"method":"post","path":"/list"},{"method":"post","path":"/add"}]},{"prefix":"/admin/base/sys/log","name":"BaseSysLogEntity","api":[{"method":"post","path":"/setKeep"},{"method":"get","path":"/getKeep"},{"method":"post","path":"/clear"},{"method":"post","path":"/page"}]},{"prefix":"/admin/base/sys/menu","name":"BaseSysMenuEntity","api":[{"method":"post","path":"/create"},{"method":"post","path":"/export"},{"method":"post","path":"/import"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/parse"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/base/sys/param","name":"BaseSysParamEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/html"},{"method":"get","path":"/info"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/base/sys/role","name":"BaseSysRoleEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/base/sys/user","name":"BaseSysUserEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/move"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/demo/goods","name":"DemoGoodsEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/dict/info","name":"DictInfoEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/data"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/dict/type","name":"DictTypeEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/plugin/info","name":"PluginInfoEntity","api":[{"method":"post","path":"/install"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/recycle/data","name":"RecycleDataEntity","api":[{"method":"post","path":"/restore"},{"method":"get","path":"/info"},{"method":"post","path":"/page"}]},{"prefix":"/admin/space/info","name":"SpaceInfoEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/space/type","name":"SpaceTypeEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/task/info","name":"TaskInfoEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/start"},{"method":"post","path":"/once"},{"method":"post","path":"/stop"},{"method":"get","path":"/info"},{"method":"post","path":"/page"},{"method":"get","path":"/log"},{"method":"post","path":"/add"}]},{"prefix":"/admin/user/address","name":"UserAddressEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/user/info","name":"UserInfoEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/test"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/admin/chat/message","name":"ChatMessageEntity","api":[{"path":"/page"},{"path":"/list"},{"path":"/info"},{"path":"/delete"},{"path":"/update"},{"path":"/add"}]},{"prefix":"/admin/chat/session","name":"ChatSessionEntity","api":[{"path":"/page"},{"path":"/list"},{"path":"/info"},{"path":"/delete"},{"path":"/update"},{"path":"/add"}]},{"prefix":"/admin/test","name":"TestEntity","api":[{"path":"/page"},{"path":"/update"},{"path":"/add"},{"path":"/info"},{"path":"/delete"},{"path":"/list"}]},{"prefix":"/admin/demo/user/follow","name":"DemoUserFollowEntity","api":[{"path":"/page"},{"path":"/list"},{"path":"/info"},{"path":"/delete"},{"path":"/update"},{"path":"/add"}]},{"prefix":"/admin/demo/user/info","name":"DemoUserInfoEntity","api":[{"path":"/t1"},{"path":"/t2"},{"path":"/t3"},{"path":"/page"},{"path":"/list"},{"path":"/info"},{"path":"/delete"},{"path":"/update"},{"path":"/add"}]}] \ No newline at end of file diff --git a/package.json b/package.json index a1f41a1..6c6fe83 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "xlsx": "^0.18.5" }, "devDependencies": { - "@cool-vue/vite-plugin": "^7.0.1", + "@cool-vue/vite-plugin": "^7.1.0", "@types/file-saver": "^2.0.7", "@types/lodash-es": "^4.17.8", "@types/mockjs": "^1.0.7", diff --git a/packages/vite-plugin/dist/types/src/base.d.ts b/packages/vite-plugin/dist/base.d.ts similarity index 100% rename from packages/vite-plugin/dist/types/src/base.d.ts rename to packages/vite-plugin/dist/base.d.ts diff --git a/packages/vite-plugin/dist/config.d.ts b/packages/vite-plugin/dist/config.d.ts new file mode 100644 index 0000000..61dcc89 --- /dev/null +++ b/packages/vite-plugin/dist/config.d.ts @@ -0,0 +1,2 @@ +import type { Config } from "../types"; +export declare const config: Config.Data; diff --git a/packages/vite-plugin/dist/types/src/ctx/index.d.ts b/packages/vite-plugin/dist/ctx/index.d.ts similarity index 58% rename from packages/vite-plugin/dist/types/src/ctx/index.d.ts rename to packages/vite-plugin/dist/ctx/index.d.ts index 0b114d9..87eafb6 100644 --- a/packages/vite-plugin/dist/types/src/ctx/index.d.ts +++ b/packages/vite-plugin/dist/ctx/index.d.ts @@ -1,2 +1,2 @@ -import type { Ctx } from "../types"; +import type { Ctx } from "../../types"; export declare function createCtx(): Promise; diff --git a/packages/vite-plugin/dist/types/src/demo.d.ts b/packages/vite-plugin/dist/demo.d.ts similarity index 100% rename from packages/vite-plugin/dist/types/src/demo.d.ts rename to packages/vite-plugin/dist/demo.d.ts diff --git a/packages/vite-plugin/dist/types/src/eps/index.d.ts b/packages/vite-plugin/dist/eps/index.d.ts similarity index 75% rename from packages/vite-plugin/dist/types/src/eps/index.d.ts rename to packages/vite-plugin/dist/eps/index.d.ts index c096c25..2bfb5f2 100644 --- a/packages/vite-plugin/dist/types/src/eps/index.d.ts +++ b/packages/vite-plugin/dist/eps/index.d.ts @@ -1,4 +1,4 @@ -import type { Eps } from "../types"; +import type { Eps } from "../../types"; export declare function createEps(query?: { list: any[]; }): Promise<{ diff --git a/packages/vite-plugin/dist/index.d.ts b/packages/vite-plugin/dist/index.d.ts new file mode 100644 index 0000000..bddc16b --- /dev/null +++ b/packages/vite-plugin/dist/index.d.ts @@ -0,0 +1,2 @@ +import type { Config } from "../types"; +export declare function cool(options: Config.Options): (import("vite").Plugin | Promise>)[]; diff --git a/packages/vite-plugin/dist/index.js b/packages/vite-plugin/dist/index.js index 9c9f4e6..5b93daf 100644 --- a/packages/vite-plugin/dist/index.js +++ b/packages/vite-plugin/dist/index.js @@ -5,8 +5,41 @@ })(this, (function (exports, fs, path, axios, lodash, prettier, compilerSfc, magicString, glob) { 'use strict'; const config = { - type: "", + type: "admin", reqUrl: "", + demo: false, + eps: { + dist: "./build/cool", + mapping: [ + { + // 自定义匹配 + custom: ({ propertyName, type }) => { + // 如果没有,返回null或者不返回,则继续遍历其他匹配规则 + return null; + }, + }, + { + type: "string", + test: ["varchar", "text", "simple-json"], + }, + { + type: "string[]", + test: ["simple-array"], + }, + { + type: "Date", + test: ["datetime", "date"], + }, + { + type: "number", + test: ["tinyint", "int", "decimal"], + }, + { + type: "BigInt", + test: ["bigint"], + }, + ], + }, }; // 根目录 @@ -31,9 +64,12 @@ }); } // 创建目录 - function createDir(path) { - if (!fs.existsSync(path)) - fs.mkdirSync(path); + function createDir(path, recursive) { + try { + if (!fs.existsSync(path)) + fs.mkdirSync(path, { recursive }); + } + catch (err) { } } // 读取文件 function readFile(path, json) { @@ -69,73 +105,17 @@ }); }); } - // 深度创建目录 - function mkdirs(path$1) { - const arr = path$1.split("/"); - let p = ""; - arr.forEach((e) => { - const t = path.join(p, e); - try { - fs.statSync(t); - } - catch (err) { - try { - fs.mkdirSync(t); - } - catch (error) { - console.error(error); - } - } - p = t; - }); - return p; - } function error(message) { console.log("\x1B[31m%s\x1B[0m", message); } - // 打包目录 - const DistDir = path.join(__dirname, "../"); - // 实体描述 - const Entity = { - mapping: [ - // { - // // 自定义匹配 - // custom: ({ propertyName, type }) => { - // // 如果没有,返回null或者不返回,则继续遍历其他匹配规则 - // return null; - // }, - // }, - { - type: "string", - test: ["varchar", "text", "simple-json"], - }, - { - type: "string[]", - test: ["simple-array"], - }, - { - type: "Date", - test: ["datetime", "date"], - }, - { - type: "number", - test: ["tinyint", "int", "decimal"], - }, - { - type: "BigInt", - test: ["bigint"], - }, - ], - }; - - // eps 数据文件路径 - const epsJsonPath = path.join(DistDir, "eps.json"); - // eps 描述文件路径 - const epsDtsPath = path.join(DistDir, "eps.d.ts"); let service = {}; let list = []; let customList = []; + // 获取路径 + function getEpsPath(filename) { + return path.join(config.type == "admin" ? config.eps.dist : rootDir(config.eps.dist), filename || ""); + } // 获取方法名 function getNames(v) { return Object.keys(v).filter((e) => !["namespace", "permission"].includes(e)); @@ -152,11 +132,12 @@ }); } // 本地文件 + const epsPath = getEpsPath("eps.json"); try { - list = readFile(epsJsonPath, true) || []; + list = readFile(epsPath, true) || []; } catch (err) { - error(`[cool-eps] ${epsJsonPath} 文件异常, ${err.message}`); + error(`[cool-eps] ${epsPath} 文件异常, ${err.message}`); } // 请求地址 let url = config.reqUrl; @@ -224,7 +205,7 @@ }), }; }); - fs.createWriteStream(epsJsonPath, { + fs.createWriteStream(getEpsPath("eps.json"), { flags: "w", }).write(JSON.stringify(d)); } @@ -232,11 +213,12 @@ async function createDescribe({ list, service }) { // 获取类型 function getType({ propertyName, type }) { - for (const map of Entity.mapping) { - // if (map.custom) { - // const resType = map.custom({ propertyName, type }); - // if (resType) return resType; - // } + for (const map of config.eps.mapping) { + if (map.custom) { + const resType = map.custom({ propertyName, type }); + if (resType) + return resType; + } if (map.test) { if (map.test.includes(type)) return map.type; @@ -430,7 +412,7 @@ trailingComma: "none", }); // 创建 eps 描述文件 - fs.createWriteStream(epsDtsPath, { + fs.createWriteStream(getEpsPath("eps.d.ts"), { flags: "w", }).write(content); } @@ -488,8 +470,8 @@ await getData(query?.list || []); // 创建 service createService(); - // 创建临时目录 - createDir(DistDir); + // 创建目录 + createDir(getEpsPath(), true); // 创建 json 文件 createJson(); // 创建描述文件 @@ -587,10 +569,12 @@ const dir = (options.viewPath || "").split("/"); // 文件名 const fname = dir.pop(); + // 源码路径 + const srcPath = `./src/${dir.join("/")}`; // 创建目录 - const path$1 = mkdirs(rootDir(`./src/${dir.join("/")}`)); + createDir(srcPath, true); // 创建文件 - fs.createWriteStream(path.join(path$1, fname || "demo"), { + fs.createWriteStream(path.join(srcPath, fname || "demo"), { flags: "w", }).write(content); } @@ -746,7 +730,7 @@ name: "vite-cool-virtual", enforce: "pre", handleHotUpdate({ file, server }) { - if (!["pages.json", "dist"].some((e) => file.includes(e))) { + if (!["pages.json", "dist", "eps.json"].some((e) => file.includes(e))) { createCtx(); createEps().then((data) => { // 通知客户端刷新 @@ -779,8 +763,20 @@ } function cool(options) { + // 应用类型,admin | app config.type = options.type; + // 请求地址 config.reqUrl = options.proxy["/dev/"].target; + // Eps + if (options.eps) { + const { dist, mapping } = options.eps; + if (dist) { + config.eps.dist = dist; + } + if (mapping) { + config.eps.mapping.unshift(...mapping); + } + } return [base(), virtual(), demo(options.demo)]; } diff --git a/packages/vite-plugin/dist/types/src/menu/index.d.ts b/packages/vite-plugin/dist/menu/index.d.ts similarity index 100% rename from packages/vite-plugin/dist/types/src/menu/index.d.ts rename to packages/vite-plugin/dist/menu/index.d.ts diff --git a/packages/vite-plugin/dist/types/src/svg/index.d.ts b/packages/vite-plugin/dist/svg/index.d.ts similarity index 100% rename from packages/vite-plugin/dist/types/src/svg/index.d.ts rename to packages/vite-plugin/dist/svg/index.d.ts diff --git a/packages/vite-plugin/dist/types/src/tag/index.d.ts b/packages/vite-plugin/dist/tag/index.d.ts similarity index 100% rename from packages/vite-plugin/dist/types/src/tag/index.d.ts rename to packages/vite-plugin/dist/tag/index.d.ts diff --git a/packages/vite-plugin/dist/types/src/config.d.ts b/packages/vite-plugin/dist/types/src/config.d.ts deleted file mode 100644 index a64aeb2..0000000 --- a/packages/vite-plugin/dist/types/src/config.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { Type } from "./types"; -export declare const config: { - type: Type; - reqUrl: string; -}; diff --git a/packages/vite-plugin/dist/types/src/eps/config.d.ts b/packages/vite-plugin/dist/types/src/eps/config.d.ts deleted file mode 100644 index 0af99f4..0000000 --- a/packages/vite-plugin/dist/types/src/eps/config.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare const DistDir: string; -export declare const Entity: { - mapping: { - type: string; - test: string[]; - }[]; -}; diff --git a/packages/vite-plugin/dist/types/src/index.d.ts b/packages/vite-plugin/dist/types/src/index.d.ts deleted file mode 100644 index 758e7e4..0000000 --- a/packages/vite-plugin/dist/types/src/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Type } from "./types"; -export declare function cool(options: { - type: Type; - proxy: any; - demo?: boolean; -}): (import("vite").Plugin | Promise>)[]; diff --git a/packages/vite-plugin/dist/types/src/utils/index.d.ts b/packages/vite-plugin/dist/utils/index.d.ts similarity index 81% rename from packages/vite-plugin/dist/types/src/utils/index.d.ts rename to packages/vite-plugin/dist/utils/index.d.ts index 25de454..fcb94b5 100644 --- a/packages/vite-plugin/dist/types/src/utils/index.d.ts +++ b/packages/vite-plugin/dist/utils/index.d.ts @@ -1,10 +1,9 @@ export declare function rootDir(path: string): string; export declare function firstUpperCase(value: string): string; export declare function toCamel(str: string): string; -export declare function createDir(path: string): void; +export declare function createDir(path: string, recursive?: boolean): void; export declare function readFile(path: string, json?: boolean): any; export declare function writeFile(path: string, data: any): void | ""; export declare function parseJson(req: any): Promise; -export declare function mkdirs(path: string): string; export declare function error(message: string): void; export declare function success(message: string): void; diff --git a/packages/vite-plugin/dist/types/src/virtual.d.ts b/packages/vite-plugin/dist/virtual.d.ts similarity index 100% rename from packages/vite-plugin/dist/types/src/virtual.d.ts rename to packages/vite-plugin/dist/virtual.d.ts diff --git a/packages/vite-plugin/eps.d.ts b/packages/vite-plugin/eps.d.ts deleted file mode 100644 index bad54c5..0000000 --- a/packages/vite-plugin/eps.d.ts +++ /dev/null @@ -1 +0,0 @@ -/// diff --git a/packages/vite-plugin/package.json b/packages/vite-plugin/package.json index 9b95bb7..dcdeb78 100644 --- a/packages/vite-plugin/package.json +++ b/packages/vite-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@cool-vue/vite-plugin", - "version": "7.0.1", + "version": "7.1.0", "description": "cool-admin/cool-uni builder", "main": "/dist/index.js", "scripts": { @@ -9,7 +9,12 @@ "keywords": [], "author": "cool", "license": "ISC", - "types": "./dist/types/src/index.d.ts", + "files": [ + "dist/*", + "types/*", + "package.json" + ], + "types": "./dist/index.d.ts", "devDependencies": { "@rollup/plugin-typescript": "^11.1.6", "@types/lodash": "^4.17.0", diff --git a/packages/vite-plugin/src/config.ts b/packages/vite-plugin/src/config.ts index 9d30928..6b7e7ea 100644 --- a/packages/vite-plugin/src/config.ts +++ b/packages/vite-plugin/src/config.ts @@ -1,6 +1,39 @@ -import type { Type } from "./types"; +import type { Config } from "../types"; -export const config = { - type: "" as Type, +export const config: Config.Data = { + type: "admin", reqUrl: "", + demo: false, + eps: { + dist: "./build/cool", + mapping: [ + { + // 自定义匹配 + custom: ({ propertyName, type }) => { + // 如果没有,返回null或者不返回,则继续遍历其他匹配规则 + return null; + }, + }, + { + type: "string", + test: ["varchar", "text", "simple-json"], + }, + { + type: "string[]", + test: ["simple-array"], + }, + { + type: "Date", + test: ["datetime", "date"], + }, + { + type: "number", + test: ["tinyint", "int", "decimal"], + }, + { + type: "BigInt", + test: ["bigint"], + }, + ], + }, }; diff --git a/packages/vite-plugin/src/ctx/index.ts b/packages/vite-plugin/src/ctx/index.ts index 15b0f9a..1f95fbf 100644 --- a/packages/vite-plugin/src/ctx/index.ts +++ b/packages/vite-plugin/src/ctx/index.ts @@ -2,7 +2,7 @@ import { join } from "path"; import { readFile, rootDir, writeFile } from "../utils"; import { glob } from "glob"; import { assign, cloneDeep, isEqual } from "lodash"; -import type { Ctx } from "../types"; +import type { Ctx } from "../../types"; import { config } from "../config"; import fs from "fs"; diff --git a/packages/vite-plugin/src/dist/eps.d.ts b/packages/vite-plugin/src/dist/eps.d.ts deleted file mode 100644 index ab34e6a..0000000 --- a/packages/vite-plugin/src/dist/eps.d.ts +++ /dev/null @@ -1,1380 +0,0 @@ -declare namespace Eps { - interface AiAppEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface AiRecordEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface DemoGoodsEntity { - /** - * ID - */ - id?: number; - /** - * 标题 - */ - title?: string; - /** - * 价格 - */ - price?: number; - /** - * 描述 - */ - description?: string; - /** - * 主图 - */ - mainImage?: string; - /** - * 示例图 - */ - exampleImages?: json; - /** - * 库存 - */ - stock?: number; - /** - * 创建时间 - */ - createTime?: Date; - /** - * 更新时间 - */ - updateTime?: Date; - /** - * 任意键值 - */ - [key: string]: any; - } - - interface AppFeedbackEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface AppGoodsEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface AppVersionEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface DemoGoodsEntity { - /** - * ID - */ - id?: number; - /** - * 标题 - */ - title?: string; - /** - * 价格 - */ - price?: number; - /** - * 描述 - */ - description?: string; - /** - * 主图 - */ - mainImage?: string; - /** - * 示例图 - */ - exampleImages?: json; - /** - * 库存 - */ - stock?: number; - /** - * 创建时间 - */ - createTime?: Date; - /** - * 更新时间 - */ - updateTime?: Date; - /** - * 任意键值 - */ - [key: string]: any; - } - - interface CsMsgEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface UserAddressEntity { - /** - * ID - */ - id?: number; - /** - * 用户ID - */ - userId?: number; - /** - * 联系人 - */ - contact?: string; - /** - * 手机号 - */ - phone?: string; - /** - * 省 - */ - province?: string; - /** - * 市 - */ - city?: string; - /** - * 区 - */ - district?: string; - /** - * 地址 - */ - address?: string; - /** - * 是否默认 - */ - isDefault?: boolean; - /** - * 创建时间 - */ - createTime?: Date; - /** - * 更新时间 - */ - updateTime?: Date; - /** - * 任意键值 - */ - [key: string]: any; - } - - interface UserInfoEntity { - /** - * ID - */ - id?: number; - /** - * 登录唯一ID - */ - unionid?: string; - /** - * 头像 - */ - avatarUrl?: string; - /** - * 昵称 - */ - nickName?: string; - /** - * 手机号 - */ - phone?: string; - /** - * 性别 0-未知 1-男 2-女 - */ - gender?: number; - /** - * 状态 0-禁用 1-正常 2-已注销 - */ - status?: number; - /** - * 登录方式 0-小程序 1-公众号 2-H5 - */ - loginType?: number; - /** - * 密码 - */ - password?: string; - /** - * 创建时间 - */ - createTime?: Date; - /** - * 更新时间 - */ - updateTime?: Date; - /** - * 任意键值 - */ - [key: string]: any; - } - - interface DemoGoodsEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface TestEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface DemoGoodsEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface FinanceApplyDrawEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface FinanceApplyInvoiceEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface FinanceUserDrawEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface FinanceUserInvoiceEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface FinanceWalletRecordEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface FinanceWalletUserEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface MsgDeviceEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface MsgInfoEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface MsgUserEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface UserInfoEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface UserInfoEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - - interface TestEntity { - /** - * 任意键值 - */ - [key: string]: any; - } - interface BaseComm { - /** - * 文件上传模式 - */ - uploadMode(data?: any): Promise; - /** - * 文件上传 - */ - upload(data?: any): Promise; - /** - * 参数配置 - */ - param(data?: any): Promise; - /** - * 实体信息与路径 - */ - eps(data?: any): Promise; - /** - * update - */ - update(data?: any): Promise; - /** - * add - */ - add(data?: any): Promise; - /** - * 权限标识 - */ - permission: { - uploadMode: string; - upload: string; - param: string; - eps: string; - update: string; - add: string; - }; - /** - * 权限状态 - */ - _permission: { - uploadMode: boolean; - upload: boolean; - param: boolean; - eps: boolean; - update: boolean; - add: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface OpenDemoCache { - /** - * set - */ - set(data?: any): Promise; - /** - * get - */ - get(data?: any): Promise; - /** - * 权限标识 - */ - permission: { set: string; get: string }; - /** - * 权限状态 - */ - _permission: { set: boolean; get: boolean }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface OpenDemoEvent { - /** - * 全局事件,多进程都有效 - */ - global(data?: any): Promise; - /** - * 普通事件,本进程生效 - */ - comm(data?: any): Promise; - /** - * 权限标识 - */ - permission: { global: string; comm: string }; - /** - * 权限状态 - */ - _permission: { global: boolean; comm: boolean }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface OpenDemoGoods { - /** - * entity分页查询 - */ - entityPage(data?: any): Promise; - /** - * sql分页查询 - */ - sqlPage(data?: any): Promise; - /** - * 删除 - */ - delete(data?: any): Promise; - /** - * 修改 - */ - update(data?: any): Promise; - /** - * 单个信息 - */ - info(data?: any): Promise; - /** - * 列表查询 - */ - list(data?: any): Promise; - /** - * 分页查询 - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: DemoGoodsEntity[]; - [key: string]: any; - }>; - /** - * 新增 - */ - add(data?: any): Promise; - /** - * 权限标识 - */ - permission: { - entityPage: string; - sqlPage: string; - delete: string; - update: string; - info: string; - list: string; - page: string; - add: string; - }; - /** - * 权限状态 - */ - _permission: { - entityPage: boolean; - sqlPage: boolean; - delete: boolean; - update: boolean; - info: boolean; - list: boolean; - page: boolean; - add: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface OpenDemoPlugin { - /** - * 调用插件 - */ - invoke(data?: any): Promise; - /** - * page - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: AppFeedbackEntity[]; - [key: string]: any; - }>; - /** - * info - */ - info(data?: any): Promise; - /** - * 权限标识 - */ - permission: { invoke: string; page: string; info: string }; - /** - * 权限状态 - */ - _permission: { invoke: boolean; page: boolean; info: boolean }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface OpenDemoQueue { - /** - * addGetter - */ - addGetter(data?: any): Promise; - /** - * getter - */ - getter(data?: any): Promise; - /** - * 发送队列数据 - */ - add(data?: any): Promise; - /** - * 权限标识 - */ - permission: { addGetter: string; getter: string; add: string }; - /** - * 权限状态 - */ - _permission: { addGetter: boolean; getter: boolean; add: boolean }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface OpenDemoRpc { - /** - * 分布式事务 - */ - transaction(data?: any): Promise; - /** - * 集群事件 - */ - event(data?: any): Promise; - /** - * 远程调用 - */ - call(data?: any): Promise; - /** - * 权限标识 - */ - permission: { transaction: string; event: string; call: string }; - /** - * 权限状态 - */ - _permission: { transaction: boolean; event: boolean; call: boolean }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface OpenDemoTransaction { - /** - * 删除 - */ - delete(data?: any): Promise; - /** - * 修改 - */ - update(data?: any): Promise; - /** - * 单个信息 - */ - info(data?: any): Promise; - /** - * 列表查询 - */ - list(data?: any): Promise; - /** - * 分页查询 - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: DemoGoodsEntity[]; - [key: string]: any; - }>; - /** - * 新增 - */ - add(data?: any): Promise; - /** - * 权限标识 - */ - permission: { - delete: string; - update: string; - info: string; - list: string; - page: string; - add: string; - }; - /** - * 权限状态 - */ - _permission: { - delete: boolean; - update: boolean; - info: boolean; - list: boolean; - page: boolean; - add: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface DictInfo { - /** - * 获得字典数据 - */ - data(data?: any): Promise; - /** - * read - */ - read(data?: any): Promise; - /** - * page - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: CsMsgEntity[]; - [key: string]: any; - }>; - /** - * 权限标识 - */ - permission: { data: string; read: string; page: string }; - /** - * 权限状态 - */ - _permission: { data: boolean; read: boolean; page: boolean }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface UserAddress { - /** - * 默认地址 - */ - default(data?: any): Promise; - /** - * 删除 - */ - delete(data?: any): Promise; - /** - * 修改 - */ - update(data?: any): Promise; - /** - * 单个信息 - */ - info(data?: any): Promise; - /** - * 列表查询 - */ - list(data?: any): Promise; - /** - * 分页查询 - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: UserAddressEntity[]; - [key: string]: any; - }>; - /** - * 新增 - */ - add(data?: any): Promise; - /** - * 权限标识 - */ - permission: { - default: string; - delete: string; - update: string; - info: string; - list: string; - page: string; - add: string; - }; - /** - * 权限状态 - */ - _permission: { - default: boolean; - delete: boolean; - update: boolean; - info: boolean; - list: boolean; - page: boolean; - add: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface UserComm { - /** - * 获取微信公众号配置 - */ - wxMpConfig(data?: any): Promise; - /** - * get - */ - get(data?: any): Promise; - /** - * 权限标识 - */ - permission: { wxMpConfig: string; get: string }; - /** - * 权限状态 - */ - _permission: { wxMpConfig: boolean; get: boolean }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface UserInfo { - /** - * 更新用户密码 - */ - updatePassword(data?: any): Promise; - /** - * 更新用户信息 - */ - updatePerson(data?: any): Promise; - /** - * 绑定手机号 - */ - bindPhone(data?: any): Promise; - /** - * 绑定小程序手机号 - */ - miniPhone(data?: any): Promise; - /** - * 获取用户信息 - */ - person(data?: any): Promise; - /** - * 注销 - */ - logoff(data?: any): Promise; - /** - * 权限标识 - */ - permission: { - updatePassword: string; - updatePerson: string; - bindPhone: string; - miniPhone: string; - person: string; - logoff: string; - }; - /** - * 权限状态 - */ - _permission: { - updatePassword: boolean; - updatePerson: boolean; - bindPhone: boolean; - miniPhone: boolean; - person: boolean; - logoff: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface UserLogin { - /** - * 刷新token - */ - refreshToken(data?: any): Promise; - /** - * 绑定小程序手机号 - */ - miniPhone(data?: any): Promise; - /** - * 一键手机号登录 - */ - uniPhone(data?: any): Promise; - /** - * 密码登录 - */ - password(data?: any): Promise; - /** - * 图片验证码 - */ - captcha(data?: any): Promise; - /** - * 验证码 - */ - smsCode(data?: any): Promise; - /** - * 微信APP授权登录 - */ - wxApp(data?: any): Promise; - /** - * 手机号登录 - */ - phone(data?: any): Promise; - /** - * 小程序登录 - */ - mini(data?: any): Promise; - /** - * 公众号登录 - */ - mp(data?: any): Promise; - /** - * 权限标识 - */ - permission: { - refreshToken: string; - miniPhone: string; - uniPhone: string; - password: string; - captcha: string; - smsCode: string; - wxApp: string; - phone: string; - mini: string; - mp: string; - }; - /** - * 权限状态 - */ - _permission: { - refreshToken: boolean; - miniPhone: boolean; - uniPhone: boolean; - password: boolean; - captcha: boolean; - smsCode: boolean; - wxApp: boolean; - phone: boolean; - mini: boolean; - mp: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface FinanceApplyDraw { - /** - * submit - */ - submit(data?: any): Promise; - /** - * page - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: FinanceApplyDrawEntity[]; - [key: string]: any; - }>; - /** - * 权限标识 - */ - permission: { submit: string; page: string }; - /** - * 权限状态 - */ - _permission: { submit: boolean; page: boolean }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface FinanceApplyInvoice { - /** - * submit - */ - submit(data?: any): Promise; - /** - * page - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: FinanceApplyInvoiceEntity[]; - [key: string]: any; - }>; - /** - * 权限标识 - */ - permission: { submit: string; page: string }; - /** - * 权限状态 - */ - _permission: { submit: boolean; page: boolean }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface FinanceUserDraw { - /** - * delete - */ - delete(data?: any): Promise; - /** - * update - */ - update(data?: any): Promise; - /** - * info - */ - info(data?: any): Promise; - /** - * page - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: FinanceUserDrawEntity[]; - [key: string]: any; - }>; - /** - * add - */ - add(data?: any): Promise; - /** - * 权限标识 - */ - permission: { delete: string; update: string; info: string; page: string; add: string }; - /** - * 权限状态 - */ - _permission: { - delete: boolean; - update: boolean; - info: boolean; - page: boolean; - add: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface FinanceUserInvoice { - /** - * delete - */ - delete(data?: any): Promise; - /** - * update - */ - update(data?: any): Promise; - /** - * info - */ - info(data?: any): Promise; - /** - * page - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: FinanceUserInvoiceEntity[]; - [key: string]: any; - }>; - /** - * add - */ - add(data?: any): Promise; - /** - * 权限标识 - */ - permission: { delete: string; update: string; info: string; page: string; add: string }; - /** - * 权限状态 - */ - _permission: { - delete: boolean; - update: boolean; - info: boolean; - page: boolean; - add: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface FinanceWalletRecord { - /** - * page - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: FinanceWalletRecordEntity[]; - [key: string]: any; - }>; - /** - * 权限标识 - */ - permission: { page: string }; - /** - * 权限状态 - */ - _permission: { page: boolean }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface FinanceWalletUser { - /** - * detail - */ - detail(data?: any): Promise; - /** - * 权限标识 - */ - permission: { detail: string }; - /** - * 权限状态 - */ - _permission: { detail: boolean }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface MsgDevice { - /** - * bind - */ - bind(data?: any): Promise; - /** - * delete - */ - delete(data?: any): Promise; - /** - * update - */ - update(data?: any): Promise; - /** - * clear - */ - clear(data?: any): Promise; - /** - * read - */ - read(data?: any): Promise; - /** - * info - */ - info(data?: any): Promise; - /** - * list - */ - list(data?: any): Promise; - /** - * page - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: MsgDeviceEntity[]; - [key: string]: any; - }>; - /** - * add - */ - add(data?: any): Promise; - /** - * 权限标识 - */ - permission: { - bind: string; - delete: string; - update: string; - clear: string; - read: string; - info: string; - list: string; - page: string; - add: string; - }; - /** - * 权限状态 - */ - _permission: { - bind: boolean; - delete: boolean; - update: boolean; - clear: boolean; - read: boolean; - info: boolean; - list: boolean; - page: boolean; - add: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface MsgInfo { - /** - * unreadCount - */ - unreadCount(data?: any): Promise; - /** - * delete - */ - delete(data?: any): Promise; - /** - * update - */ - update(data?: any): Promise; - /** - * clear - */ - clear(data?: any): Promise; - /** - * read - */ - read(data?: any): Promise; - /** - * info - */ - info(data?: any): Promise; - /** - * list - */ - list(data?: any): Promise; - /** - * page - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: MsgInfoEntity[]; - [key: string]: any; - }>; - /** - * add - */ - add(data?: any): Promise; - /** - * 权限标识 - */ - permission: { - unreadCount: string; - delete: string; - update: string; - clear: string; - read: string; - info: string; - list: string; - page: string; - add: string; - }; - /** - * 权限状态 - */ - _permission: { - unreadCount: boolean; - delete: boolean; - update: boolean; - clear: boolean; - read: boolean; - info: boolean; - list: boolean; - page: boolean; - add: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface MsgUser { - /** - * delete - */ - delete(data?: any): Promise; - /** - * update - */ - update(data?: any): Promise; - /** - * info - */ - info(data?: any): Promise; - /** - * list - */ - list(data?: any): Promise; - /** - * page - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: MsgUserEntity[]; - [key: string]: any; - }>; - /** - * add - */ - add(data?: any): Promise; - /** - * 权限标识 - */ - permission: { - delete: string; - update: string; - info: string; - list: string; - page: string; - add: string; - }; - /** - * 权限状态 - */ - _permission: { - delete: boolean; - update: boolean; - info: boolean; - list: boolean; - page: boolean; - add: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - interface Test { - /** - * page - */ - page(data?: any): Promise<{ - pagination: { size: number; page: number; total: number; [key: string]: any }; - list: TestEntity[]; - [key: string]: any; - }>; - /** - * list - */ - list(data?: any): Promise; - /** - * info - */ - info(data?: any): Promise; - /** - * delete - */ - delete(data?: any): Promise; - /** - * update - */ - update(data?: any): Promise; - /** - * add - */ - add(data?: any): Promise; - /** - * 权限标识 - */ - permission: { - page: string; - list: string; - info: string; - delete: string; - update: string; - add: string; - }; - /** - * 权限状态 - */ - _permission: { - page: boolean; - list: boolean; - info: boolean; - delete: boolean; - update: boolean; - add: boolean; - }; - /** - * 请求 - */ - request: Service["request"]; - } - - type json = any; - - type Service = { - request(options?: { - url: string; - method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS"; - data?: any; - params?: any; - headers?: { - [key: string]: any; - }; - timeout?: number; - proxy?: boolean; - [key: string]: any; - }): Promise; - base: { comm: BaseComm }; - open: { - demo: { - cache: OpenDemoCache; - event: OpenDemoEvent; - goods: OpenDemoGoods; - plugin: OpenDemoPlugin; - queue: OpenDemoQueue; - rpc: OpenDemoRpc; - transaction: OpenDemoTransaction; - }; - }; - dict: { info: DictInfo }; - user: { address: UserAddress; comm: UserComm; info: UserInfo; login: UserLogin }; - finance: { - apply: { draw: FinanceApplyDraw; invoice: FinanceApplyInvoice }; - user: { draw: FinanceUserDraw; invoice: FinanceUserInvoice }; - wallet: { record: FinanceWalletRecord; user: FinanceWalletUser }; - }; - msg: { device: MsgDevice; info: MsgInfo; user: MsgUser }; - test: Test; - }; -} diff --git a/packages/vite-plugin/src/dist/eps.json b/packages/vite-plugin/src/dist/eps.json deleted file mode 100644 index 468245f..0000000 --- a/packages/vite-plugin/src/dist/eps.json +++ /dev/null @@ -1 +0,0 @@ -[{"prefix":"/app/base/comm","name":"AiAppEntity","api":[{"method":"get","path":"/uploadMode"},{"method":"post","path":"/upload"},{"method":"get","path":"/param"},{"method":"get","path":"/eps"},{"path":"/update"},{"path":"/add"}]},{"prefix":"/open/demo/cache","name":"","api":[{"method":"post","path":"/set"},{"method":"get","path":"/get"}]},{"prefix":"/open/demo/event","name":"AiRecordEntity","api":[{"method":"post","path":"/global"},{"method":"post","path":"/comm"}]},{"prefix":"/open/demo/goods","name":"DemoGoodsEntity","api":[{"method":"post","path":"/entityPage"},{"method":"post","path":"/sqlPage"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/open/demo/plugin","name":"AppFeedbackEntity","api":[{"method":"get","path":"/invoke"},{"method":"post","path":"/page"},{"method":"get","path":"/info"}]},{"prefix":"/open/demo/queue","name":"AppGoodsEntity","api":[{"method":"post","path":"/addGetter"},{"method":"get","path":"/getter"},{"method":"post","path":"/add"}]},{"prefix":"/open/demo/rpc","name":"AppVersionEntity","api":[{"method":"get","path":"/transaction"},{"method":"get","path":"/event"},{"method":"get","path":"/call"}]},{"prefix":"/open/demo/transaction","name":"DemoGoodsEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/dict/info","name":"CsMsgEntity","api":[{"method":"post","path":"/data"},{"method":"post","path":"/read"},{"method":"post","path":"/page"}]},{"prefix":"/app/user/address","name":"UserAddressEntity","api":[{"method":"get","path":"/default"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/user/comm","name":"","api":[{"method":"post","path":"/wxMpConfig"},{"method":"get","path":"/get"}]},{"prefix":"/app/user/info","name":"UserInfoEntity","api":[{"method":"post","path":"/updatePassword"},{"method":"post","path":"/updatePerson"},{"method":"post","path":"/bindPhone"},{"method":"post","path":"/miniPhone"},{"method":"get","path":"/person"},{"method":"post","path":"/logoff"}]},{"prefix":"/app/user/login","name":"DemoGoodsEntity","api":[{"method":"post","path":"/refreshToken"},{"method":"post","path":"/miniPhone"},{"method":"post","path":"/uniPhone"},{"method":"post","path":"/password"},{"method":"get","path":"/captcha"},{"method":"post","path":"/smsCode"},{"method":"post","path":"/wxApp"},{"method":"post","path":"/phone"},{"method":"post","path":"/mini"},{"method":"post","path":"/mp"}]},{"prefix":"/","name":"","api":[{"method":"get","path":"/"}]},{"prefix":"/open/demo/queue","name":"TestEntity","api":[{"method":"post","path":"/addGetter"},{"method":"get","path":"/getter"},{"method":"post","path":"/add"},{"path":"/delete"},{"path":"/update"},{"path":"/add"}]},{"prefix":"/open/demo/rpc","name":"","api":[{"method":"get","path":"/transaction"},{"method":"get","path":"/event"},{"method":"get","path":"/call"}]},{"prefix":"/open/demo/transaction","name":"DemoGoodsEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/dict/info","name":"","api":[{"method":"post","path":"/data"}]},{"prefix":"/app/finance/apply/draw","name":"FinanceApplyDrawEntity","api":[{"method":"post","path":"/submit"},{"method":"post","path":"/page"}]},{"prefix":"/app/finance/apply/invoice","name":"FinanceApplyInvoiceEntity","api":[{"method":"post","path":"/submit"},{"method":"post","path":"/page"}]},{"prefix":"/app/finance/user/draw","name":"FinanceUserDrawEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/finance/user/invoice","name":"FinanceUserInvoiceEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/finance/wallet/record","name":"FinanceWalletRecordEntity","api":[{"method":"post","path":"/page"}]},{"prefix":"/app/finance/wallet/user","name":"FinanceWalletUserEntity","api":[{"method":"get","path":"/detail"}]},{"prefix":"/app/msg/device","name":"MsgDeviceEntity","api":[{"method":"post","path":"/bind"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/clear"},{"method":"post","path":"/read"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/msg/info","name":"MsgInfoEntity","api":[{"method":"get","path":"/unreadCount"},{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"post","path":"/clear"},{"method":"post","path":"/read"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/msg/user","name":"MsgUserEntity","api":[{"method":"post","path":"/delete"},{"method":"post","path":"/update"},{"method":"get","path":"/info"},{"method":"post","path":"/list"},{"method":"post","path":"/page"},{"method":"post","path":"/add"}]},{"prefix":"/app/user/comm","name":"UserInfoEntity","api":[{"method":"get","path":"/wxMpConfig"},{"method":"post","path":"/updatePerson"},{"method":"get","path":"/person"},{"method":"post","path":"/logoff"}]},{"prefix":"/app/user/info","name":"UserInfoEntity","api":[{"method":"post","path":"/updatePassword"},{"method":"post","path":"/updatePerson"},{"method":"get","path":"/person"},{"method":"post","path":"/logoff"},{"method":"post","path":"/phone"},{"method":"post","path":"/mini"},{"method":"post","path":"/mp"}]},{"prefix":"/app/user/login","name":"","api":[{"method":"post","path":"/refreshToken"},{"method":"post","path":"/password"},{"method":"get","path":"/captcha"},{"method":"post","path":"/smsCode"},{"method":"post","path":"/phone"},{"method":"post","path":"/mini"},{"method":"post","path":"/mp"}]},{"prefix":"/","name":"","api":[{"method":"get","path":"/"}]},{"prefix":"/app/test","name":"TestEntity","api":[{"path":"/page"},{"path":"/list"},{"path":"/info"},{"path":"/delete"},{"path":"/update"},{"path":"/add"}]}] \ No newline at end of file diff --git a/packages/vite-plugin/src/eps/config.ts b/packages/vite-plugin/src/eps/config.ts deleted file mode 100644 index 37cfbaa..0000000 --- a/packages/vite-plugin/src/eps/config.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { join } from "path"; - -// 打包目录 -export const DistDir = join(__dirname, "../"); - -// 实体描述 -export const Entity = { - mapping: [ - // { - // // 自定义匹配 - // custom: ({ propertyName, type }) => { - // // 如果没有,返回null或者不返回,则继续遍历其他匹配规则 - // return null; - // }, - // }, - { - type: "string", - test: ["varchar", "text", "simple-json"], - }, - { - type: "string[]", - test: ["simple-array"], - }, - { - type: "Date", - test: ["datetime", "date"], - }, - { - type: "number", - test: ["tinyint", "int", "decimal"], - }, - { - type: "BigInt", - test: ["bigint"], - }, - ], -}; diff --git a/packages/vite-plugin/src/eps/index.ts b/packages/vite-plugin/src/eps/index.ts index 5aeec89..fbcfed2 100644 --- a/packages/vite-plugin/src/eps/index.ts +++ b/packages/vite-plugin/src/eps/index.ts @@ -1,23 +1,24 @@ -import { createDir, error, firstUpperCase, readFile, toCamel } from "../utils"; +import { createDir, error, firstUpperCase, readFile, rootDir, toCamel } from "../utils"; import { join } from "path"; -import { Entity, DistDir } from "./config"; import axios from "axios"; import { isArray, isEmpty, last, merge } from "lodash"; import { createWriteStream } from "fs"; import prettier from "prettier"; import { config } from "../config"; -import type { Eps } from "../types"; - -// eps 数据文件路径 -const epsJsonPath = join(DistDir, "eps.json"); - -// eps 描述文件路径 -const epsDtsPath = join(DistDir, "eps.d.ts"); +import type { Eps } from "../../types"; let service = {}; let list: Eps.Entity[] = []; let customList: Eps.Entity[] = []; +// 获取路径 +function getEpsPath(filename?: string) { + return join( + config.type == "admin" ? config.eps.dist : rootDir(config.eps.dist), + filename || "", + ); +} + // 获取方法名 function getNames(v: any) { return Object.keys(v).filter((e) => !["namespace", "permission"].includes(e)); @@ -36,10 +37,12 @@ async function getData(data?: Eps.Entity[]) { } // 本地文件 + const epsPath = getEpsPath("eps.json"); + try { - list = readFile(epsJsonPath, true) || []; + list = readFile(epsPath, true) || []; } catch (err: any) { - error(`[cool-eps] ${epsJsonPath} 文件异常, ${err.message}`); + error(`[cool-eps] ${epsPath} 文件异常, ${err.message}`); } // 请求地址 @@ -116,7 +119,7 @@ function createJson() { }; }); - createWriteStream(epsJsonPath, { + createWriteStream(getEpsPath("eps.json"), { flags: "w", }).write(JSON.stringify(d)); } @@ -125,11 +128,11 @@ function createJson() { async function createDescribe({ list, service }: { list: Eps.Entity[]; service: any }) { // 获取类型 function getType({ propertyName, type }: any) { - for (const map of Entity.mapping) { - // if (map.custom) { - // const resType = map.custom({ propertyName, type }); - // if (resType) return resType; - // } + for (const map of config.eps.mapping) { + if (map.custom) { + const resType = map.custom({ propertyName, type }); + if (resType) return resType; + } if (map.test) { if (map.test.includes(type)) return map.type; } @@ -370,7 +373,7 @@ async function createDescribe({ list, service }: { list: Eps.Entity[]; service: }); // 创建 eps 描述文件 - createWriteStream(epsDtsPath, { + createWriteStream(getEpsPath("eps.d.ts"), { flags: "w", }).write(content); } @@ -441,8 +444,8 @@ export async function createEps(query?: { list: any[] }) { // 创建 service createService(); - // 创建临时目录 - createDir(DistDir); + // 创建目录 + createDir(getEpsPath(), true); // 创建 json 文件 createJson(); diff --git a/packages/vite-plugin/src/index.ts b/packages/vite-plugin/src/index.ts index d38670d..774d2a4 100644 --- a/packages/vite-plugin/src/index.ts +++ b/packages/vite-plugin/src/index.ts @@ -1,12 +1,28 @@ import { base } from "./base"; import { config } from "./config"; import { demo } from "./demo"; -import type { Type } from "./types"; import { virtual } from "./virtual"; +import type { Config } from "../types"; -export function cool(options: { type: Type; proxy: any; demo?: boolean }) { +export function cool(options: Config.Options) { + // 应用类型,admin | app config.type = options.type; + + // 请求地址 config.reqUrl = options.proxy["/dev/"].target; + // Eps + if (options.eps) { + const { dist, mapping } = options.eps; + + if (dist) { + config.eps.dist = dist; + } + + if (mapping) { + config.eps.mapping.unshift(...mapping); + } + } + return [base(), virtual(), demo(options.demo)]; } diff --git a/packages/vite-plugin/src/menu/index.ts b/packages/vite-plugin/src/menu/index.ts index a25af9e..95e2e3d 100644 --- a/packages/vite-plugin/src/menu/index.ts +++ b/packages/vite-plugin/src/menu/index.ts @@ -1,7 +1,7 @@ import { createWriteStream } from "fs"; import prettier from "prettier"; import { join } from "path"; -import { mkdirs, rootDir } from "../utils"; +import { createDir } from "../utils"; // 创建文件 export async function createMenu(options: { viewPath: string; code: string }) { @@ -24,11 +24,14 @@ export async function createMenu(options: { viewPath: string; code: string }) { // 文件名 const fname = dir.pop(); + // 源码路径 + const srcPath = `./src/${dir.join("/")}`; + // 创建目录 - const path = mkdirs(rootDir(`./src/${dir.join("/")}`)); + createDir(srcPath, true); // 创建文件 - createWriteStream(join(path, fname || "demo"), { + createWriteStream(join(srcPath, fname || "demo"), { flags: "w", }).write(content); } diff --git a/packages/vite-plugin/src/utils/index.ts b/packages/vite-plugin/src/utils/index.ts index 7d2a511..f70ee8c 100644 --- a/packages/vite-plugin/src/utils/index.ts +++ b/packages/vite-plugin/src/utils/index.ts @@ -28,8 +28,10 @@ export function toCamel(str: string): string { } // 创建目录 -export function createDir(path: string) { - if (!fs.existsSync(path)) fs.mkdirSync(path); +export function createDir(path: string, recursive?: boolean) { + try { + if (!fs.existsSync(path)) fs.mkdirSync(path, { recursive }); + } catch (err) {} } // 读取文件 @@ -68,29 +70,6 @@ export function parseJson(req: any): Promise { }); } -// 深度创建目录 -export function mkdirs(path: string) { - const arr = path.split("/"); - let p = ""; - - arr.forEach((e) => { - const t = join(p, e); - - try { - fs.statSync(t); - } catch (err) { - try { - fs.mkdirSync(t); - } catch (error) { - console.error(error); - } - } - p = t; - }); - - return p; -} - export function error(message: string) { console.log("\x1B[31m%s\x1B[0m", message); } diff --git a/packages/vite-plugin/src/virtual.ts b/packages/vite-plugin/src/virtual.ts index f2de40b..6760fea 100644 --- a/packages/vite-plugin/src/virtual.ts +++ b/packages/vite-plugin/src/virtual.ts @@ -12,7 +12,7 @@ export async function virtual(): Promise { name: "vite-cool-virtual", enforce: "pre", handleHotUpdate({ file, server }) { - if (!["pages.json", "dist"].some((e) => file.includes(e))) { + if (!["pages.json", "dist", "eps.json"].some((e) => file.includes(e))) { createCtx(); createEps().then((data) => { diff --git a/packages/vite-plugin/tsconfig.json b/packages/vite-plugin/tsconfig.json index 64ebca7..55f975f 100644 --- a/packages/vite-plugin/tsconfig.json +++ b/packages/vite-plugin/tsconfig.json @@ -1,17 +1,16 @@ { "compilerOptions": { - "rootDir": "./", + "rootDir": "./src", "types": ["node"], "target": "ESNext", "module": "CommonJS", "declaration": true, - "outDir": "types", + "outDir": "dist", "strict": true, "esModuleInterop": true, "pretty": true, - "resolveJsonModule": true, - "typeRoots": ["./node_modules/@types/", "./src/types/"] + "resolveJsonModule": true }, - "include": ["src", "types.d.ts"], + "include": ["src"], "exclude": ["dist"] } diff --git a/packages/vite-plugin/src/types/index.d.ts b/packages/vite-plugin/types/index.d.ts similarity index 60% rename from packages/vite-plugin/src/types/index.d.ts rename to packages/vite-plugin/types/index.d.ts index 8d74f50..6cf4174 100644 --- a/packages/vite-plugin/src/types/index.d.ts +++ b/packages/vite-plugin/types/index.d.ts @@ -45,15 +45,43 @@ export namespace Ctx { type SubPackages = { root?: string; - pages?: Pages; + pages?: Ctx.Pages; [key: string]: any; }[]; interface Data { appid?: string; - pages?: Pages; - subPackages?: SubPackages; + pages?: Ctx.Pages; + subPackages?: Ctx.SubPackages; modules?: string[]; [key: string]: any; } } + +export namespace Config { + type Type = "app" | "admin"; + interface Eps { + dist: string; + mapping: { + type?: string; + test?: string[]; + custom?(data: { propertyName: string; type: string }): any; + }[]; + } + interface Options { + type: Config.Type; + proxy: any; + eps?: { + dist?: string; + mapping?: Config.Eps["mapping"]; + }; + demo?: boolean; + } + interface Data { + type: Config.Type; + reqUrl: string; + eps: Config.Eps; + demo: boolean; + [key: string]: any; + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fdaace1..e5da87c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -86,8 +86,8 @@ dependencies: devDependencies: '@cool-vue/vite-plugin': - specifier: ^7.0.1 - version: 7.0.1 + specifier: ^7.1.0 + version: 7.1.0 '@types/file-saver': specifier: ^2.0.7 version: 2.0.7 @@ -473,7 +473,7 @@ packages: dependencies: array.prototype.flat: 1.3.2 core-js: 3.32.1 - element-plus: 2.7.1(vue@3.4.15) + element-plus: 2.7.2(vue@3.4.15) lodash-es: 4.17.21 mitt: 3.0.1 vue: 3.4.15(typescript@5.2.2) @@ -482,10 +482,10 @@ packages: - typescript dev: false - /@cool-vue/vite-plugin@7.0.1: - resolution: {integrity: sha512-IXZ58qT2ERXYZzSwnw1Bl0NgrKOhhED1f7HqbgSCUUbyIZQTUR9JX1qcIPEavmhQbrUl5d9MZZvKjD2Qz+ppjQ==} + /@cool-vue/vite-plugin@7.1.0: + resolution: {integrity: sha512-2UGMumnSdAlAlID0jJLLbTv8qc3U6pdfjvTOGuFtRlBbnj3R1qW+znlmjgDk9ifLAk/ra90ghCZ6sLsNADeFrg==} dependencies: - '@vue/compiler-sfc': 3.4.24 + '@vue/compiler-sfc': 3.4.25 axios: 1.6.8 glob: 10.3.12 lodash: 4.17.21 @@ -977,136 +977,136 @@ packages: engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} dev: true - /@rollup/rollup-android-arm-eabi@4.16.3: - resolution: {integrity: sha512-1ACInKIT0pXmTYuPoJAL8sOT0lV3PEACFSVxnD03hGIojJ1CmbzZmLJyk2xew+yxqTlmx7xydkiJcBzdp0V+AQ==} + /@rollup/rollup-android-arm-eabi@4.16.4: + resolution: {integrity: sha512-GkhjAaQ8oUTOKE4g4gsZ0u8K/IHU1+2WQSgS1TwTcYvL+sjbaQjNHFXbOJ6kgqGHIO1DfUhI/Sphi9GkRT9K+Q==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.16.3: - resolution: {integrity: sha512-vGl+Bny8cawCM7ExugzqEB8ke3t7Pm9/mo+ciA9kJh6pMuNyM+31qhewMwHwseDZ/LtdW0SCocW1CsMxcq1Lsg==} + /@rollup/rollup-android-arm64@4.16.4: + resolution: {integrity: sha512-Bvm6D+NPbGMQOcxvS1zUl8H7DWlywSXsphAeOnVeiZLQ+0J6Is8T7SrjGTH29KtYkiY9vld8ZnpV3G2EPbom+w==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.16.3: - resolution: {integrity: sha512-Lj8J9WzQRvfWO4GfI+bBkIThUFV1PtI+es/YH/3cwUQ+edXu8Mre0JRJfRrAeRjPiHDPFFZaX51zfgHHEhgRAg==} + /@rollup/rollup-darwin-arm64@4.16.4: + resolution: {integrity: sha512-i5d64MlnYBO9EkCOGe5vPR/EeDwjnKOGGdd7zKFhU5y8haKhQZTN2DgVtpODDMxUr4t2K90wTUJg7ilgND6bXw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.16.3: - resolution: {integrity: sha512-NPPOXMTIWJk50lgZmRReEYJFvLG5rgMDzaVauWNB2MgFQYm9HuNXQdVVg3iEZ3A5StIzxhMlPjVyS5fsv4PJmg==} + /@rollup/rollup-darwin-x64@4.16.4: + resolution: {integrity: sha512-WZupV1+CdUYehaZqjaFTClJI72fjJEgTXdf4NbW69I9XyvdmztUExBtcI2yIIU6hJtYvtwS6pkTkHJz+k08mAQ==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.16.3: - resolution: {integrity: sha512-ij4tv1XtWcDScaTgoMnvDEYZ2Wjl2ZhDFEyftjBKu6sNNLHIkKuXBol/bVSh+md5zSJ6em9hUXyPO3cVPCsl4Q==} + /@rollup/rollup-linux-arm-gnueabihf@4.16.4: + resolution: {integrity: sha512-ADm/xt86JUnmAfA9mBqFcRp//RVRt1ohGOYF6yL+IFCYqOBNwy5lbEK05xTsEoJq+/tJzg8ICUtS82WinJRuIw==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-musleabihf@4.16.3: - resolution: {integrity: sha512-MTMAl30dzcfYB+smHe1sJuS2P1/hB8pqylkCe0/8/Lo8CADjy/eM8x43nBoR5eqcYgpOtCh7IgHpvqSMAE38xw==} + /@rollup/rollup-linux-arm-musleabihf@4.16.4: + resolution: {integrity: sha512-tJfJaXPiFAG+Jn3cutp7mCs1ePltuAgRqdDZrzb1aeE3TktWWJ+g7xK9SNlaSUFw6IU4QgOxAY4rA+wZUT5Wfg==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.16.3: - resolution: {integrity: sha512-vY3fAg6JLDoNh781HHHMPvt8K6RWG3OmEj3xI9BOFSQTD5PNaGKvCB815MyGlDnFYUw7lH+WvvQqoBwLtRDR1A==} + /@rollup/rollup-linux-arm64-gnu@4.16.4: + resolution: {integrity: sha512-7dy1BzQkgYlUTapDTvK997cgi0Orh5Iu7JlZVBy1MBURk7/HSbHkzRnXZa19ozy+wwD8/SlpJnOOckuNZtJR9w==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.16.3: - resolution: {integrity: sha512-61SpQGBSb8QkfV/hUYWezlEig4ro55t8NcE5wWmy1bqRsRVHCEDkF534d+Lln/YeLUoSWtJHvvG3bx9lH/S6uA==} + /@rollup/rollup-linux-arm64-musl@4.16.4: + resolution: {integrity: sha512-zsFwdUw5XLD1gQe0aoU2HVceI6NEW7q7m05wA46eUAyrkeNYExObfRFQcvA6zw8lfRc5BHtan3tBpo+kqEOxmg==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-powerpc64le-gnu@4.16.3: - resolution: {integrity: sha512-4XGexJthsNhEEgv/zK4/NnAOjYKoeCsIoT+GkqTY2u3rse0lbJ8ft1bpDCdlkvifsLDL2uwe4fn8PLR4IMTKQQ==} + /@rollup/rollup-linux-powerpc64le-gnu@4.16.4: + resolution: {integrity: sha512-p8C3NnxXooRdNrdv6dBmRTddEapfESEUflpICDNKXpHvTjRRq1J82CbU5G3XfebIZyI3B0s074JHMWD36qOW6w==} cpu: [ppc64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.16.3: - resolution: {integrity: sha512-/pArXjqnEdhbQ1qe4CTTlJ6/GjWGdWNRucKAp4fqKnKf7QC0BES3QEV34ACumHHQ4uEGt4GctF2ISCMRhkli0A==} + /@rollup/rollup-linux-riscv64-gnu@4.16.4: + resolution: {integrity: sha512-Lh/8ckoar4s4Id2foY7jNgitTOUQczwMWNYi+Mjt0eQ9LKhr6sK477REqQkmy8YHY3Ca3A2JJVdXnfb3Rrwkng==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-s390x-gnu@4.16.3: - resolution: {integrity: sha512-vu4f3Y8iwjtRfSZdmtP8nC1jmRx1IrRVo2cLQlQfpFZ0e2AE9YbPgfIzpuK+i3C4zFETaLLNGezbBns2NuS/uA==} + /@rollup/rollup-linux-s390x-gnu@4.16.4: + resolution: {integrity: sha512-1xwwn9ZCQYuqGmulGsTZoKrrn0z2fAur2ujE60QgyDpHmBbXbxLaQiEvzJWDrscRq43c8DnuHx3QorhMTZgisQ==} cpu: [s390x] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.16.3: - resolution: {integrity: sha512-n4HEgIJulNSmAKT3SYF/1wuzf9od14woSBseNkzur7a+KJIbh2Jb+J9KIsdGt3jJnsLW0BT1Sj6MiwL4Zzku6Q==} + /@rollup/rollup-linux-x64-gnu@4.16.4: + resolution: {integrity: sha512-LuOGGKAJ7dfRtxVnO1i3qWc6N9sh0Em/8aZ3CezixSTM+E9Oq3OvTsvC4sm6wWjzpsIlOCnZjdluINKESflJLA==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.16.3: - resolution: {integrity: sha512-guO/4N1884ig2AzTKPc6qA7OTnFMUEg/X2wiesywRO1eRD7FzHiaiTQQOLFmnUXWj2pgQXIT1g5g3e2RpezXcQ==} + /@rollup/rollup-linux-x64-musl@4.16.4: + resolution: {integrity: sha512-ch86i7KkJKkLybDP2AtySFTRi5fM3KXp0PnHocHuJMdZwu7BuyIKi35BE9guMlmTpwwBTB3ljHj9IQXnTCD0vA==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.16.3: - resolution: {integrity: sha512-+rxD3memdkhGz0NhNqbYHXBoA33MoHBK4uubZjF1IeQv1Psi6tqgsCcC6vwQjxBM1qoCqOQQBy0cgNbbZKnGUg==} + /@rollup/rollup-win32-arm64-msvc@4.16.4: + resolution: {integrity: sha512-Ma4PwyLfOWZWayfEsNQzTDBVW8PZ6TUUN1uFTBQbF2Chv/+sjenE86lpiEwj2FiviSmSZ4Ap4MaAfl1ciF4aSA==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.16.3: - resolution: {integrity: sha512-0NxVbLhBXmwANWWbgZY/RdSkeuHEgF+u8Dc0qBowUVBYsR2y2vwVGjKgUcj1wtu3jpjs057io5g9HAPr3Icqjg==} + /@rollup/rollup-win32-ia32-msvc@4.16.4: + resolution: {integrity: sha512-9m/ZDrQsdo/c06uOlP3W9G2ENRVzgzbSXmXHT4hwVaDQhYcRpi9bgBT0FTG9OhESxwK0WjQxYOSfv40cU+T69w==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.16.3: - resolution: {integrity: sha512-hutnZavtOx/G4uVdgoZz5279By9NVbgmxOmGGgnzUjZYuwp2+NzGq6KXQmHXBWz7W/vottXn38QmKYAdQLa/vQ==} + /@rollup/rollup-win32-x64-msvc@4.16.4: + resolution: {integrity: sha512-YunpoOAyGLDseanENHmbFvQSfVL5BxW3k7hhy0eN4rb3gS/ct75dVD0EXOWIqFT/nE8XYW6LP6vz6ctKRi0k9A==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /@socket.io/component-emitter@3.1.1: - resolution: {integrity: sha512-dzJtaDAAoXx4GCOJpbB2eG/Qj8VDpdwkLsWGzGm+0L7E8/434RyMbAHmk9ubXWVAb9nXmc44jUf8GKqVDiKezg==} + /@socket.io/component-emitter@3.1.2: + resolution: {integrity: sha512-9BCxFwvbGg/RsZK9tjXd8s4UcwR0MWeFQ1XEKIQVVvAGJyINdrqKMcTRyLoK8Rse1GjzLV9cwjWV1olXRWEXVA==} dev: false /@sxzz/popperjs-es@2.11.7: @@ -1478,11 +1478,11 @@ packages: estree-walker: 2.0.2 source-map-js: 1.2.0 - /@vue/compiler-core@3.4.24: - resolution: {integrity: sha512-vbW/tgbwJYj62N/Ww99x0zhFTkZDTcGh3uwJEuadZ/nF9/xuFMC4693P9r+3sxGXISABpDKvffY5ApH9pmdd1A==} + /@vue/compiler-core@3.4.25: + resolution: {integrity: sha512-Y2pLLopaElgWnMNolgG8w3C5nNUVev80L7hdQ5iIKPtMJvhVpG0zhnBG/g3UajJmZdvW0fktyZTotEHD1Srhbg==} dependencies: '@babel/parser': 7.24.4 - '@vue/shared': 3.4.24 + '@vue/shared': 3.4.25 entities: 4.5.0 estree-walker: 2.0.2 source-map-js: 1.2.0 @@ -1494,11 +1494,11 @@ packages: '@vue/compiler-core': 3.4.15 '@vue/shared': 3.4.15 - /@vue/compiler-dom@3.4.24: - resolution: {integrity: sha512-4XgABML/4cNndVsQndG6BbGN7+EoisDwi3oXNovqL/4jdNhwvP8/rfRMTb6FxkxIxUUtg6AI1/qZvwfSjxJiWA==} + /@vue/compiler-dom@3.4.25: + resolution: {integrity: sha512-Ugz5DusW57+HjllAugLci19NsDK+VyjGvmbB2TXaTcSlQxwL++2PETHx/+Qv6qFwNLzSt7HKepPe4DcTE3pBWg==} dependencies: - '@vue/compiler-core': 3.4.24 - '@vue/shared': 3.4.24 + '@vue/compiler-core': 3.4.25 + '@vue/shared': 3.4.25 dev: true /@vue/compiler-sfc@3.4.15: @@ -1514,14 +1514,14 @@ packages: postcss: 8.4.38 source-map-js: 1.2.0 - /@vue/compiler-sfc@3.4.24: - resolution: {integrity: sha512-nRAlJUK02FTWfA2nuvNBAqsDZuERGFgxZ8sGH62XgFSvMxO2URblzulExsmj4gFZ8e+VAyDooU9oAoXfEDNxTA==} + /@vue/compiler-sfc@3.4.25: + resolution: {integrity: sha512-m7rryuqzIoQpOBZ18wKyq05IwL6qEpZxFZfRxlNYuIPDqywrXQxgUwLXIvoU72gs6cRdY6wHD0WVZIFE4OEaAQ==} dependencies: '@babel/parser': 7.24.4 - '@vue/compiler-core': 3.4.24 - '@vue/compiler-dom': 3.4.24 - '@vue/compiler-ssr': 3.4.24 - '@vue/shared': 3.4.24 + '@vue/compiler-core': 3.4.25 + '@vue/compiler-dom': 3.4.25 + '@vue/compiler-ssr': 3.4.25 + '@vue/shared': 3.4.25 estree-walker: 2.0.2 magic-string: 0.30.10 postcss: 8.4.38 @@ -1534,11 +1534,11 @@ packages: '@vue/compiler-dom': 3.4.15 '@vue/shared': 3.4.15 - /@vue/compiler-ssr@3.4.24: - resolution: {integrity: sha512-ZsAtr4fhaUFnVcDqwW3bYCSDwq+9Gk69q2r/7dAHDrOMw41kylaMgOP4zRnn6GIEJkQznKgrMOGPMFnLB52RbQ==} + /@vue/compiler-ssr@3.4.25: + resolution: {integrity: sha512-H2ohvM/Pf6LelGxDBnfbbXFPyM4NE3hrw0e/EpwuSiYu8c819wx+SVGdJ65p/sFrYDd6OnSDxN1MB2mN07hRSQ==} dependencies: - '@vue/compiler-dom': 3.4.24 - '@vue/shared': 3.4.24 + '@vue/compiler-dom': 3.4.25 + '@vue/shared': 3.4.25 dev: true /@vue/devtools-api@6.6.1: @@ -1575,8 +1575,8 @@ packages: /@vue/shared@3.4.15: resolution: {integrity: sha512-KzfPTxVaWfB+eGcGdbSf4CWdaXcGDqckoeXUh7SB3fZdEtzPCK2Vq9B/lRRL3yutax/LWITz+SwvgyOxz5V75g==} - /@vue/shared@3.4.24: - resolution: {integrity: sha512-BW4tajrJBM9AGAknnyEw5tO2xTmnqgup0VTnDAMcxYmqOX0RG0b9aSUGAbEKolD91tdwpA6oCwbltoJoNzpItw==} + /@vue/shared@3.4.25: + resolution: {integrity: sha512-k0yappJ77g2+KNrIaF0FFnzwLvUBLUYr8VOwz+/6vLsmItFp51AcxLL7Ey3iPd7BIRyWPOcqUjMnm7OkahXllA==} dev: true /@vueuse/core@10.4.0(vue@3.4.15): @@ -1996,7 +1996,7 @@ packages: hasBin: true dependencies: caniuse-lite: 1.0.30001612 - electron-to-chromium: 1.4.746 + electron-to-chromium: 1.4.749 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.23.0) dev: true @@ -2285,8 +2285,8 @@ packages: zrender: 5.4.4 dev: false - /electron-to-chromium@1.4.746: - resolution: {integrity: sha512-jeWaIta2rIG2FzHaYIhSuVWqC6KJYo7oSBX4Jv7g+aVujKztfvdpf+n6MGwZdC5hQXbax4nntykLH2juIQrfPg==} + /electron-to-chromium@1.4.749: + resolution: {integrity: sha512-LRMMrM9ITOvue0PoBrvNIraVmuDbJV5QC9ierz/z5VilMdPOVMjOtpICNld3PuXuTZ3CHH/UPxX9gHhAPwi+0Q==} dev: true /element-plus@2.5.6(vue@3.4.15): @@ -2314,8 +2314,8 @@ packages: - '@vue/composition-api' dev: false - /element-plus@2.7.1(vue@3.4.15): - resolution: {integrity: sha512-yk/vXFwJp0flMrd2kfcR0XlumhwtPjB19HJvwcf0n3DvRE7UK8LeSK14LVghSzk0TzPsFFElweMnZEEv7+MYuQ==} + /element-plus@2.7.2(vue@3.4.15): + resolution: {integrity: sha512-AdEzBU/A68iUleio0MkQ46JeU5SeQvFFd915GJFScJmUEo5AmYg3OQ4pVjcu+p3b3Nupg9MC5Wa4xjAiC51kUg==} peerDependencies: vue: ^3.2.0 dependencies: @@ -2350,7 +2350,7 @@ packages: /engine.io-client@6.5.3: resolution: {integrity: sha512-9Z0qLB0NIisTRt1DZ/8U2k12RJn8yls/nXMZLn+/N8hANT3TcYjKFKcwbw5zFQiN4NTde3TSY9zb79e1ij6j9Q==} dependencies: - '@socket.io/component-emitter': 3.1.1 + '@socket.io/component-emitter': 3.1.2 debug: 4.3.4 engine.io-parser: 5.2.2 ws: 8.11.0 @@ -2904,7 +2904,7 @@ packages: dependencies: foreground-child: 3.1.1 jackspeak: 2.3.6 - minimatch: 9.0.3 + minimatch: 9.0.4 minipass: 7.0.4 path-scurry: 1.10.2 dev: true @@ -3365,8 +3365,8 @@ packages: /lodash@4.17.21: resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} - /lru-cache@10.2.0: - resolution: {integrity: sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==} + /lru-cache@10.2.1: + resolution: {integrity: sha512-tS24spDe/zXhWbNPErCHs/AGOzbKGHT+ybSBqmdLm8WZ1xXLWvH8Qn71QPAlqVhd0qUTWjy+Kl9JmISgDdEjsA==} engines: {node: 14 || >=16.14} dev: true @@ -3446,6 +3446,13 @@ packages: brace-expansion: 2.0.1 dev: true + /minimatch@9.0.4: + resolution: {integrity: sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minipass@7.0.4: resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} engines: {node: '>=16 || 14 >=14.17'} @@ -3616,7 +3623,7 @@ packages: resolution: {integrity: sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==} engines: {node: '>=16 || 14 >=14.17'} dependencies: - lru-cache: 10.2.0 + lru-cache: 10.2.1 minipass: 7.0.4 dev: true @@ -3810,29 +3817,29 @@ packages: yargs: 17.7.2 dev: true - /rollup@4.16.3: - resolution: {integrity: sha512-Ygm4fFO4usWcAG3Ud36Lmif5nudoi0X6QPLC+kRgrRjulAbmFkaTawP7fTIkRDnCNSf/4IAQzXM1T8e691kRtw==} + /rollup@4.16.4: + resolution: {integrity: sha512-kuaTJSUbz+Wsb2ATGvEknkI12XV40vIiHmLuFlejoo7HtDok/O5eDDD0UpCVY5bBX5U5RYo8wWP83H7ZsqVEnA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.16.3 - '@rollup/rollup-android-arm64': 4.16.3 - '@rollup/rollup-darwin-arm64': 4.16.3 - '@rollup/rollup-darwin-x64': 4.16.3 - '@rollup/rollup-linux-arm-gnueabihf': 4.16.3 - '@rollup/rollup-linux-arm-musleabihf': 4.16.3 - '@rollup/rollup-linux-arm64-gnu': 4.16.3 - '@rollup/rollup-linux-arm64-musl': 4.16.3 - '@rollup/rollup-linux-powerpc64le-gnu': 4.16.3 - '@rollup/rollup-linux-riscv64-gnu': 4.16.3 - '@rollup/rollup-linux-s390x-gnu': 4.16.3 - '@rollup/rollup-linux-x64-gnu': 4.16.3 - '@rollup/rollup-linux-x64-musl': 4.16.3 - '@rollup/rollup-win32-arm64-msvc': 4.16.3 - '@rollup/rollup-win32-ia32-msvc': 4.16.3 - '@rollup/rollup-win32-x64-msvc': 4.16.3 + '@rollup/rollup-android-arm-eabi': 4.16.4 + '@rollup/rollup-android-arm64': 4.16.4 + '@rollup/rollup-darwin-arm64': 4.16.4 + '@rollup/rollup-darwin-x64': 4.16.4 + '@rollup/rollup-linux-arm-gnueabihf': 4.16.4 + '@rollup/rollup-linux-arm-musleabihf': 4.16.4 + '@rollup/rollup-linux-arm64-gnu': 4.16.4 + '@rollup/rollup-linux-arm64-musl': 4.16.4 + '@rollup/rollup-linux-powerpc64le-gnu': 4.16.4 + '@rollup/rollup-linux-riscv64-gnu': 4.16.4 + '@rollup/rollup-linux-s390x-gnu': 4.16.4 + '@rollup/rollup-linux-x64-gnu': 4.16.4 + '@rollup/rollup-linux-x64-musl': 4.16.4 + '@rollup/rollup-win32-arm64-msvc': 4.16.4 + '@rollup/rollup-win32-ia32-msvc': 4.16.4 + '@rollup/rollup-win32-x64-msvc': 4.16.4 fsevents: 2.3.3 dev: true @@ -3980,7 +3987,7 @@ packages: resolution: {integrity: sha512-vtA0uD4ibrYD793SOIAwlo8cj6haOeMHrGvwPxJsxH7CeIksqJ+3Zc06RvWTIFgiSqx4A3sOnTXpfAEE2Zyz6w==} engines: {node: '>=10.0.0'} dependencies: - '@socket.io/component-emitter': 3.1.1 + '@socket.io/component-emitter': 3.1.2 debug: 4.3.4 engine.io-client: 6.5.3 socket.io-parser: 4.2.4 @@ -3994,7 +4001,7 @@ packages: resolution: {integrity: sha512-/GbIKmo8ioc+NIWIhwdecY0ge+qVBSMdgxGygevmdHj24bsfgtCmcUUcQ5ZzcylGFHsN3k4HB4Cgkl96KVnuew==} engines: {node: '>=10.0.0'} dependencies: - '@socket.io/component-emitter': 3.1.1 + '@socket.io/component-emitter': 3.1.2 debug: 4.3.4 transitivePeerDependencies: - supports-color @@ -4334,7 +4341,7 @@ packages: '@types/node': 20.5.6 esbuild: 0.19.12 postcss: 8.4.38 - rollup: 4.16.3 + rollup: 4.16.4 sass: 1.66.1 terser: 5.27.0 optionalDependencies: diff --git a/src/App.vue b/src/App.vue index 068688f..f7b7f3b 100644 --- a/src/App.vue +++ b/src/App.vue @@ -7,4 +7,7 @@ diff --git a/src/env.d.ts b/src/env.d.ts index 7f80be0..238c84b 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1,5 +1,5 @@ /// -/// +/// interface ImportMetaEnv { readonly VITE_NAME: string; diff --git a/src/modules/user/components/select.vue b/src/modules/user/components/select.vue index 3440a87..0dbaa18 100644 --- a/src/modules/user/components/select.vue +++ b/src/modules/user/components/select.vue @@ -152,12 +152,12 @@ const Table = useTable({ type: "selection", width: 60, reserveSelection: true - } + } : { label: "操作", prop: "check", width: 100 - }, + }, { prop: "avatarUrl", label: "头像", diff --git a/vite.config.mts b/vite.config.mts index ef5f486..217b7de 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -24,8 +24,7 @@ export default ({ mode }: ConfigEnv): UserConfig => { vueJsx(), cool({ type: "admin", - proxy, - demo: false // 是否测试模式 + proxy }), visualizer({ open: false,