diff --git a/.trae/skills/fast-crud-page-dev/SKILL.md b/.trae/skills/fast-crud-page-dev/SKILL.md new file mode 100644 index 000000000..a5b48bf2f --- /dev/null +++ b/.trae/skills/fast-crud-page-dev/SKILL.md @@ -0,0 +1,55 @@ +--- +name: fast-crud-page-dev +description: 用于开发或重构 Certd 前端列表管理、后台管理、记录查询、CRUD 表格页面,优先使用 Fast Crud(@fast-crud/fast-crud、fs-crud、useFs、createCrudOptions)实现。当用户要求列表页、管理页、审核页、记录页或表格 CRUD 页面时触发。 +version: 1.0.0 +--- + +# Fast Crud 页面开发技能 + +## 角色定义 + +你是一名 Certd 前端列表管理页面开发专家,熟悉 Vue 3、Ant Design Vue、Fast Crud 和本仓库现有页面拆分方式。你的目标是让管理页面保持统一的表格、搜索、分页、操作列和弹窗体验。 + +## 核心规则 + +- 列表管理、后台管理、记录查询、审核记录、CRUD 表格类页面,默认优先使用 Fast Crud 实现。 +- 只有轻量只读展示、强交互自定义界面、复杂可视化或已有页面模式明确不适合 Fast Crud 时,才手写 `a-table` / 自定义列表,并在回复中说明原因。 +- 设置表单、概览卡片、向导流程等非列表主体可以保留自定义 Vue;如果同一功能同时包含设置和列表,优先拆成独立页面,或把设置放入对话框。 + +## 推荐文件拆分 + +- `api.ts`:封装接口请求,保持页面和 CRUD 配置里不直接散落 URL。 +- `crud.tsx` / `crud-*.tsx`:导出 `createCrudOptions`,集中定义请求映射、搜索项、列、表单、操作列、工具栏和字典。 +- `index.vue`:承载 `fs-page`、`fs-crud`、页面头部、弹窗和生命周期,使用 `useFs({ createCrudOptions, context })` 创建绑定。 + +## 实现流程 + +1. 先在 `packages/ui/certd-client/src/views` 下找 1-2 个相近 Fast Crud 页面,沿用它们的导入、布局、命名和权限写法。 +2. 在 `index.vue` 中使用 `fs-crud ref="crudRef" v-bind="crudBinding"`,并在 `onMounted` / `onActivated` 时调用 `crudExpose.doRefresh()`。 +3. 在 `crud.tsx` 中配置 `request.pageRequest`、`columns`、`search`、`form`、`rowHandle`、`actionbar`、`toolbar` 等,接口分页参数和返回值按现有页面适配。 +4. 操作按钮优先放在 Fast Crud 的 `rowHandle.buttons` 或 `actionbar.buttons` 中;审核、保存设置、批量操作等复杂交互可通过 `context` 调用 `index.vue` 中的方法。 +5. 金额、状态、时间、枚举等字段优先复用项目已有组件、字典和格式化工具;避免在模板里重复堆格式化逻辑。 +6. 表格查询条件使用 Fast Crud 的 `search` 配置;新增/编辑表单使用 Fast Crud 的 `form` 配置,复杂设置项可以用 Ant Design Vue 对话框承载。 +7. 删除、审核通过、拒绝等危险操作必须保留确认弹窗和错误提示,成功后刷新当前 CRUD 列表。 +8. 对话框里只做纯确认时可以使用 `Modal.confirm`;只要需要字段输入、表单校验或提交字段,统一使用 `useFormDialog` / `openFormDialog`,不要在 `Modal.confirm` 的 `content` 里手写输入框。 + +## 布局高度 + +- Fast Crud 表格依赖外部容器高度计算。虽然表格本身有默认约 200px 高度,但页面内嵌 `fs-crud` 时,为了获得稳定可用的列表区域,必须让外层容器提供明确高度或剩余高度。 +- 独立列表页通常可直接让 `fs-page` / 页面内容区撑满;如果表格嵌在 tabs、详情页、上下分区或弹窗里,要从页面根容器到 `fs-crud` 建立完整的 flex 高度链路:父容器 `display: flex; flex-direction: column; min-height: 0`,中间内容区和 tab pane 使用 `flex: 1; min-height: 0`,`fs-crud` 本身也使用 `flex: 1; min-height: 0`。 +- 有固定操作栏、统计区、说明区时,这些区域应 `flex: none`,把剩余空间交给表格区域。 +- 修改嵌入式 Fast Crud 页面后,要检查空数据、少量数据和多页数据时表格高度、分页器和空状态是否仍在预期区域内。 + +## 代码习惯 + +- 页面命名、API 命名、权限标识和路由结构要贴近同目录已有页面。 +- CRUD 配置中不要写大段业务流程;复杂逻辑放回 `index.vue` 方法或 `api.ts`。 +- 能用 `dict`、`compute`、`valueBuilder`、`valueResolve`、`component` 配置表达的表格/表单行为,不要改成手写模板。 +- 保持列表页密度和操作入口克制,不要做营销式布局、嵌套卡片或大块说明文字。 +- 如果页面有“设置 + 列表”,管理端优先拆成两个路由页面;用户端提现设置这类低频配置优先使用对话框保存。 + +## 验证方式 + +- 前端改动后,只对本次改动的 Vue / TS / TSX / locale 文件运行项目现有 Prettier / ESLint。 +- 不运行 `vue-tsc` / `pnpm tsc`,因为当前依赖组合下 `vue-tsc` 已知会抛内部错误。 +- 若只是新增或修改本 skill / 文档,不需要运行前端格式化和测试。 diff --git a/AGENTS.md b/AGENTS.md index e878d1064..3a008f4ec 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -105,7 +105,7 @@ Certd 是一个支持私有化部署的 SSL/TLS 证书自动化管理平台。 - 前端 `pnpm dev`:启动 Vite 开发服务 - 前端 `pnpm build`:生产构建 -- 前端 `pnpm tsc`:类型检查 +- 不要运行前端 `pnpm tsc` / `vue-tsc`:当前依赖组合中 `vue-tsc@1.8.27` 会直接抛内部错误 `Search string not found: "/supportedTSExtensions = .*(?=;)/"`,不是有效的项目类型检查结果。 - 前端暂不跑单元测试;当前 `test:unit` 只是占位脚本 ## 流水线与插件模型 @@ -216,5 +216,5 @@ Get-ChildItem packages\ui\certd-client\src\views\certd - 后端纯单元测试用例放在 `src` 目录内,并尽量与被测文件相邻,例如 `src/utils/random.test.ts`;对应 `test:unit` 只跑 `src/**/*.test.ts`,构建/打包配置应排除这些 `*.test.ts` 文件。 - 单元测试需要 mock ESM 静态 import 时,优先使用 `esmock`,不要为了测试把业务代码改成构造函数注入或把逻辑挪到调用方;各包 `test:unit` 脚本应显式设置 `NODE_ENV=unittest`。 - 单个 monorepo 包运行单元测试时,优先使用 `corepack pnpm --dir <包目录> test:unit`,例如 `corepack pnpm --dir packages\ui\certd-server test:unit`、`corepack pnpm --dir packages\core\basic test:unit`、`corepack pnpm --dir packages\plugins\plugin-lib test:unit`;也可以用包名过滤,例如 `corepack pnpm --filter @certd/ui-server test:unit`。前端 `packages\ui\certd-client` 暂时不跑单元测试。 -- 前端 TS/Vue/locale 等文件改动后,优先只对本次改动文件运行项目现有自动格式化/修复;Windows/PowerShell 下 Prettier 已验证可用命令为 `packages\ui\certd-client\node_modules\.bin\prettier.cmd --write `,ESLint 可用命令为 `packages\ui\certd-client\node_modules\.bin\eslint.cmd --fix `;不要为了格式化无关文件而扩大 diff。项目保留了 `tslint` 依赖,但当前主要使用 ESLint + Prettier。 -- 优先对改动包运行聚焦的测试或类型检查;只有跨包影响明显时再考虑全 monorepo 构建。 +- 前端 TS/Vue/locale 等文件改动后,优先只对本次改动文件运行项目现有自动格式化/修复;Windows/PowerShell 下 Prettier 已验证可用命令为 `packages\ui\certd-client\node_modules\.bin\prettier.cmd --write `,ESLint 可用命令为 `packages\ui\certd-client\node_modules\.bin\eslint.cmd --fix `;不要运行 `vue-tsc` / `pnpm tsc`;不要为了格式化无关文件而扩大 diff。项目保留了 `tslint` 依赖,但当前主要使用 ESLint + Prettier。 +- 优先对改动包运行聚焦的测试;后端可按包运行单元测试,前端优先使用 Prettier/ESLint 做改动文件验证。只有跨包影响明显时再考虑全 monorepo 构建。 diff --git a/CHANGELOG.md b/CHANGELOG.md index f3fe3de4c..1a843cdbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,47 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +### Bug Fixes + +* **certd-server:** 调整首页缓存控制头的判断逻辑 ([0499347](https://github.com/certd/certd/commit/0499347588ee544862420ab9a5afd2546d61bc6c)) + +### Performance Improvements + +* **controller:** 更换版本获取源并添加版本标准化处理 ([cb08e06](https://github.com/certd/certd/commit/cb08e061d257ba23a0fefdbfb046a8c759def828)) + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +### Bug Fixes + +* 固化华为云sdk版本,避免华为云调用报错 ([59b9ffa](https://github.com/certd/certd/commit/59b9ffadd05faf3982151c48f8d83cbd97419865)) +* **email-service:** 优化商业版测试邮件内容中带的url链接 ([667e7b1](https://github.com/certd/certd/commit/667e7b185bf26558972be01720872f48352b5876)) + +### Performance Improvements + +* 商业版支持限制泛域名数量 ([c63745d](https://github.com/certd/certd/commit/c63745d1ba30904428ba6b13ab0785298baa5cae)) +* **suite:** 商业版用户已购套餐支持修改 ([bdb3d09](https://github.com/certd/certd/commit/bdb3d09c09fc73e7e5e3401f6ef5588bf8ad5088)) + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +### Bug Fixes + +* 修复第三方登录丢失state时无法在用户信息页面绑定第三方账号的bug ([45dedf5](https://github.com/certd/certd/commit/45dedf5bc779fea852e1f33dda4f31db2765633c)) +* 修复群晖授权没有显示设备id输入框的bug ([2f172b5](https://github.com/certd/certd/commit/2f172b56e9411303ca15138d827bdb9bafdae4d1)) +* 修复自动注册后没有跳转到控制台的bug ([4681ec9](https://github.com/certd/certd/commit/4681ec90088a3eb665427b2ac4047ec5ccefd7b3)) +* 修复clogin登录丢失state问题 ([22f5cfc](https://github.com/certd/certd/commit/22f5cfcfd8462ca74128329eefb3f48b3ee0b7ea)) +* 修复clogin多选类型登录失败的bug ([9f878a3](https://github.com/certd/certd/commit/9f878a353cd49b7b10bb0a95610ad236bc920dd2)) + +### Features + +* 彩虹登录支持选择多种登录方式 ([7aa0c7e](https://github.com/certd/certd/commit/7aa0c7e491fe660abb62e68792ff5474f19bd5b8)) + +### Performance Improvements + +* 第三方登录自动注册的用户支持设置初始化密码 ([a815d02](https://github.com/certd/certd/commit/a815d0245b97efbb948b33d6fc9d49862ce06889)) +* 头像增加缓存时间 ([7015b1b](https://github.com/certd/certd/commit/7015b1b232602e5168a3eb8bee6d7f1776ae1e74)) + ## [1.39.16](https://github.com/certd/certd/compare/v1.39.15...v1.39.16) (2026-05-13) **Note:** Version bump only for package root diff --git a/README.md b/README.md index 79987d561..d132d8a6b 100644 --- a/README.md +++ b/README.md @@ -34,10 +34,11 @@ Certd® 是一个免费的全自动证书管理系统,让你的网站证书永 * **多种通知方式**: 邮件通知、webhook通知、企微、钉钉、飞书、anpush等多种通知方式 * **私有化部署**: 数据保存本地,安装简单快捷,镜像由Github Actions构建,过程公开透明 * **多重安全保障**: 授权加密,站点隐藏,2FA,密码防爆破等多重安全保障 -* **多数据库支持**:支持SQLite、PostgreSQL、MySQL +* **多数据库支持**:支持SQLite、PostgreSQL、MySQL、MariaDB * **开放接口支持**: 提供RESTful API接口,方便集成到其他系统 * **站点证书监控**: 定时监控网站证书的过期时间 * **多用户管理**: 用户可以管理自己的证书流水线 +* **项目管理**: 企业级项目管理模式 * **多语言支持**: 中英双语切换 * **无忧升级**: 版本向下兼容 diff --git a/README_en.md b/README_en.md index 5fb2f9870..521e41980 100644 --- a/README_en.md +++ b/README_en.md @@ -31,7 +31,7 @@ This project not only supports automated certificate application but also automa * Multiple notification methods, including email, webhook, WeChat Work, DingTalk, Lark, and anpush. * On-premises deployment, local data storage, simple and quick installation. Images are built by Github Actions, with a transparent process. * Multiple security measures, including authorization encryption, site hiding, 2FA, and password brute-force protection. -* Supports multiple databases such as SQLite, PostgreSQL, and MySQL. +* Supports multiple databases such as SQLite, PostgreSQL, MySQL, and MariaDB. * Open API support. * Site certificate monitoring. * Multi-user management. diff --git a/docker/auto/docker-compose.yaml b/docker/auto/docker-compose.yaml new file mode 100644 index 000000000..7a5e93ddd --- /dev/null +++ b/docker/auto/docker-compose.yaml @@ -0,0 +1,95 @@ +version: '3.3' # 兼容旧版docker-compose +services: + certd: + # 镜像 # ↓↓↓↓↓ ---- 镜像版本号,建议改成固定版本号,例如:certd:1.29.0 + image: registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest + # image: ghcr.io/certd/certd:latest # --------- 如果 报镜像not found,可以尝试其他镜像源 + # image: greper/certd:latest + container_name: certd # 容器名 + restart: unless-stopped # 自动重启 + volumes: + # ↓↓↓↓↓ -------------------------------------------------------- 数据库以及证书存储路径,默认存在宿主机的/data/certd/目录下,【您需要定时备份此目录,以保障数据容灾】 + - /data/certd:/app/data # 只要修改冒号前面的,冒号后面的/app/data切记切记不要动 + #- /volume1/docker/certd:/app/data:delegated #群晖使用这个配置 + # ↓↓↓↓↓ -------------------------------------------------------- 如果走时不准,考虑挂载localtime文件 + #- /etc/localtime:/etc/localtime + #- /etc/timezone:/etc/timezone + ports: # 端口映射 + # ↓↓↓↓ ---------------------------------------------------------- 如果端口有冲突,可以修改第一个7001为其他不冲突的端口号,第二个7001不要动 + - "7001:7001" + # ↓↓↓↓ ---------------------------------------------------------- https端口,可以根据实际情况,是否暴露该端口 + - "7002:7002" + #↓↓↓↓ -------------------------------------------------------------- 如果出现getaddrinfo EAI_AGAIN 或 getaddrinfo ENOTFOUND 错误,可以尝试设置dns +# dns: +# - 223.5.5.5 # 阿里云公共dns +# - 223.6.6.6 +# # ↓↓↓↓ --------------------------------------------------------- 如果你服务器在腾讯云,可以用这个替换上面阿里云的公共dns +# - 119.29.29.29 # 腾讯云公共dns +# - 182.254.116.116 +# # ↓↓↓↓ --------------------------------------------------------- 如果你服务器部署在国外,可以用这个替换上面阿里云的公共dns +# - 8.8.8.8 # 谷歌公共dns +# - 8.8.4.4 +# extra_hosts: +# # ↓↓↓↓ -------------------------------------------------------- 这里可以配置自定义hosts,外网域名可以指向本地局域网ip地址 +# - "localdomain.com:192.168.1.3" +# # ↓↓↓↓ ------------------------------------------------ 直接使用主机的网络,如果网络问题实在找不到原因,可以尝试打开此参数 +# network_mode: host + labels: + com.centurylinklabs.watchtower.enable: "true" +# ↓↓↓↓ -------------------------------------------------------------- 启用ipv6网络,还需要把下面networks的注释放开 +# networks: +# - ip6net + environment: +# ↓↓↓↓ ----------------------------------------------------- 使用上海东八时区 + - TZ=Asia/Shanghai +# 设置环境变量即可自定义certd配置 +# 配置项见: packages/ui/certd-server/src/config/config.default.ts +# 配置规则: certd_ + 配置项, 点号用_代替 +# #↓↓↓↓ ----------------------------- 如果忘记管理员密码,可以设置为true,docker compose up -d 重建容器之后,管理员密码将改成123456,然后请及时修改回false + - certd_system_resetAdminPasswd=false + # ↓↓↓ 要使用ipv6,将此配置修改为:: + - certd_koa_hostname=0.0.0.0 + +# 默认使用sqlite文件数据库,如果需要使用其他数据库,请设置以下环境变量 +# 注意: 选定使用一种数据库之后,不支持更换数据库。 +# 数据库迁移方法:1、使用新数据库重新部署一套,然后将旧数据同步过去,注意flyway_history表的数据不要同步 +# #↓↓↓↓ ----------------------------- 使用postgresql数据库,需要提前创建数据库 +# - certd_flyway_scriptDir=./db/migration-pg # 升级脚本目录 +# - certd_typeorm_dataSource_default_type=postgres # 数据库类型 +# - certd_typeorm_dataSource_default_host=localhost # 数据库地址 +# - certd_typeorm_dataSource_default_port=5433 # 数据库端口 +# - certd_typeorm_dataSource_default_username=postgres # 用户名 +# - certd_typeorm_dataSource_default_password=yourpasswd # 密码 +# - certd_typeorm_dataSource_default_database=certd # 数据库名 + +# #↓↓↓↓ ----------------------------- 使用mysql8数据库,需要提前创建数据库 charset=utf8mb4, collation=utf8mb4_bin +# - certd_flyway_scriptDir=./db/migration-mysql # 升级脚本目录 +# - certd_typeorm_dataSource_default_type=mysql # 数据库类型, 或者 mariadb +# - certd_typeorm_dataSource_default_host=localhost # 数据库地址 +# - certd_typeorm_dataSource_default_port=3306 # 数据库端口 +# - certd_typeorm_dataSource_default_username=root # 用户名 +# - certd_typeorm_dataSource_default_password=yourpasswd # 密码 +# - certd_typeorm_dataSource_default_database=certd # 数据库名 + +# ↓↓↓↓ --------------------------------------------------------- 自动升级,上面certd的版本号要保持为latest + certd-updater: # 添加 Watchtower 服务 + image: containrrr/watchtower:latest + container_name: certd-updater + restart: unless-stopped + volumes: + - /var/run/docker.sock:/var/run/docker.sock + # 配置 自动更新 + environment: + - WATCHTOWER_CLEANUP=true # 自动清理旧版本容器 + - WATCHTOWER_INCLUDE_STOPPED=false # 不更新已停止的容器 + - WATCHTOWER_LABEL_ENABLE=true # 根据容器标签进行更新 + - WATCHTOWER_POLL_INTERVAL=600 # 每 10 分钟检查一次更新 + + +# ↓↓↓↓ -------------------------------------------------------------- 启用ipv6网络,还需要把上面networks的注释放开 +#networks: +# ip6net: +# enable_ipv6: true +# ipam: +# config: +# - subnet: 2001:db8::/64 diff --git a/docs/guide/changelogs/CHANGELOG.md b/docs/guide/changelogs/CHANGELOG.md index f3fe3de4c..1a843cdbe 100644 --- a/docs/guide/changelogs/CHANGELOG.md +++ b/docs/guide/changelogs/CHANGELOG.md @@ -3,6 +3,47 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +### Bug Fixes + +* **certd-server:** 调整首页缓存控制头的判断逻辑 ([0499347](https://github.com/certd/certd/commit/0499347588ee544862420ab9a5afd2546d61bc6c)) + +### Performance Improvements + +* **controller:** 更换版本获取源并添加版本标准化处理 ([cb08e06](https://github.com/certd/certd/commit/cb08e061d257ba23a0fefdbfb046a8c759def828)) + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +### Bug Fixes + +* 固化华为云sdk版本,避免华为云调用报错 ([59b9ffa](https://github.com/certd/certd/commit/59b9ffadd05faf3982151c48f8d83cbd97419865)) +* **email-service:** 优化商业版测试邮件内容中带的url链接 ([667e7b1](https://github.com/certd/certd/commit/667e7b185bf26558972be01720872f48352b5876)) + +### Performance Improvements + +* 商业版支持限制泛域名数量 ([c63745d](https://github.com/certd/certd/commit/c63745d1ba30904428ba6b13ab0785298baa5cae)) +* **suite:** 商业版用户已购套餐支持修改 ([bdb3d09](https://github.com/certd/certd/commit/bdb3d09c09fc73e7e5e3401f6ef5588bf8ad5088)) + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +### Bug Fixes + +* 修复第三方登录丢失state时无法在用户信息页面绑定第三方账号的bug ([45dedf5](https://github.com/certd/certd/commit/45dedf5bc779fea852e1f33dda4f31db2765633c)) +* 修复群晖授权没有显示设备id输入框的bug ([2f172b5](https://github.com/certd/certd/commit/2f172b56e9411303ca15138d827bdb9bafdae4d1)) +* 修复自动注册后没有跳转到控制台的bug ([4681ec9](https://github.com/certd/certd/commit/4681ec90088a3eb665427b2ac4047ec5ccefd7b3)) +* 修复clogin登录丢失state问题 ([22f5cfc](https://github.com/certd/certd/commit/22f5cfcfd8462ca74128329eefb3f48b3ee0b7ea)) +* 修复clogin多选类型登录失败的bug ([9f878a3](https://github.com/certd/certd/commit/9f878a353cd49b7b10bb0a95610ad236bc920dd2)) + +### Features + +* 彩虹登录支持选择多种登录方式 ([7aa0c7e](https://github.com/certd/certd/commit/7aa0c7e491fe660abb62e68792ff5474f19bd5b8)) + +### Performance Improvements + +* 第三方登录自动注册的用户支持设置初始化密码 ([a815d02](https://github.com/certd/certd/commit/a815d0245b97efbb948b33d6fc9d49862ce06889)) +* 头像增加缓存时间 ([7015b1b](https://github.com/certd/certd/commit/7015b1b232602e5168a3eb8bee6d7f1776ae1e74)) + ## [1.39.16](https://github.com/certd/certd/compare/v1.39.15...v1.39.16) (2026-05-13) **Note:** Version bump only for package root diff --git a/docs/guide/install/auto.md b/docs/guide/install/auto.md new file mode 100644 index 000000000..393d5b34e --- /dev/null +++ b/docs/guide/install/auto.md @@ -0,0 +1,60 @@ + +## 自动升级配置 + +### 1. 方法一:使用watchtower监控自动升级【推荐】 + +1. 修改docker-compose.yaml文件增加如下配置 +或 [下载完整的自动升级docker-compose.yaml配置](https://gitee.com/certd/certd/raw/v2/docker/auto/docker-compose.yaml) +```yaml +services: + certd: + # 镜像 # ↓↓↓↓↓ ---- 镜像版本号 这里要保持为latest + image: registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest + ... # 这里是你原来的docker-compose.yaml配置 + + # ↓↓↓↓ --------------------------------------------------------- 增加一个标签,表示certd需要自动升级 + labels: + com.centurylinklabs.watchtower.enable: "true" + +# ↓↓↓↓ --------------------------------------------------------- 自动升级watchtower配置,注意:上面certd的版本号要保持为latest + certd-updater: # 添加 Watchtower 服务 + image: containrrr/watchtower:latest + container_name: certd-updater + restart: unless-stopped + volumes: + - /var/run/docker.sock:/var/run/docker.sock + # 配置 自动更新 + environment: + - WATCHTOWER_CLEANUP=true # 自动清理旧版本容器 + - WATCHTOWER_INCLUDE_STOPPED=false # 不更新已停止的容器 + - WATCHTOWER_LABEL_ENABLE=true # 根据容器标签进行更新 + - WATCHTOWER_POLL_INTERVAL=600 # 每 10 分钟检查一次更新 + +``` + +2. 重启certd容器 +```shell +cd certd +docker compose down +docker compose up -d +``` + + +### 2. 方法二:使用Certd版本监控功能【不太稳定】 + +1. 选择Github-检查Release版本插件 +![](./images/github-release.png) +按如下图填写配置 +![](./images/github-release-2.png) + + +2. 检测到新版本后执行宿主机升级命令: + +```shell +# 拉取最新镜像 +docker pull registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest +# 升级容器命令, 替换成你自己的certd更新命令 +export RESTART_CERT='sleep 10; cd ~/deploy/certd/ ; docker compose down; docker compose up -d' +# 构造一个脚本10s后在后台执行,避免容器销毁时执行太快,导致流水线任务无法结束 +nohup sh -c '$RESTART_CERT' >/dev/null 2>&1 & echo '10秒后重启' && exit +``` \ No newline at end of file diff --git a/docs/guide/install/upgrade.md b/docs/guide/install/upgrade.md index cfa38b245..ef930fd17 100644 --- a/docs/guide/install/upgrade.md +++ b/docs/guide/install/upgrade.md @@ -22,51 +22,3 @@ 可以查看最新版本号,以及所有版本的更新日志 [CHANGELOG](../changelogs/CHANGELOG.md) - -## 自动升级配置 - -### 1. 方法一:使用watchtower监控 - -修改docker-compose.yaml文件增加如下配置, 使用watchtower监控自动升级 -```yaml -services: - certd: - ... - labels: - com.centurylinklabs.watchtower.enable: "true" - -# ↓↓↓↓ --------------------------------------------------------- 自动升级,上面certd的版本号要保持为latest - certd-updater: # 添加 Watchtower 服务 - image: containrrr/watchtower:latest - container_name: certd-updater - restart: unless-stopped - volumes: - - /var/run/docker.sock:/var/run/docker.sock - # 配置 自动更新 - environment: - - WATCHTOWER_CLEANUP=true # 自动清理旧版本容器 - - WATCHTOWER_INCLUDE_STOPPED=false # 不更新已停止的容器 - - WATCHTOWER_LABEL_ENABLE=true # 根据容器标签进行更新 - - WATCHTOWER_POLL_INTERVAL=600 # 每 10 分钟检查一次更新 - -``` - - -### 2. 方法二:使用Certd版本监控功能 - -选择Github-检查Release版本插件 -![](./images/github-release.png) -按如下图填写配置 -![](./images/github-release-2.png) - - -检测到新版本后执行宿主机升级命令: - -```shell -# 拉取最新镜像 -docker pull registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest -# 升级容器命令, 替换成你自己的certd更新命令 -export RESTART_CERT='sleep 10; cd ~/deploy/certd/ ; docker compose down; docker compose up -d' -# 构造一个脚本10s后在后台执行,避免容器销毁时执行太快,导致流水线任务无法结束 -nohup sh -c '$RESTART_CERT' >/dev/null 2>&1 & echo '10秒后重启' && exit -``` \ No newline at end of file diff --git a/lerna.json b/lerna.json index 2a104497f..c60e9b7a6 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ } }, "npmClient": "pnpm", - "version": "1.39.16" + "version": "1.40.2" } diff --git a/packages/core/acme-client/CHANGELOG.md b/packages/core/acme-client/CHANGELOG.md index ecbfab08c..8c173ed81 100644 --- a/packages/core/acme-client/CHANGELOG.md +++ b/packages/core/acme-client/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/publishlab/node-acme-client/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/acme-client + +## [1.40.1](https://github.com/publishlab/node-acme-client/compare/v1.40.0...v1.40.1) (2026-05-18) + +**Note:** Version bump only for package @certd/acme-client + +# [1.40.0](https://github.com/publishlab/node-acme-client/compare/v1.39.16...v1.40.0) (2026-05-14) + +**Note:** Version bump only for package @certd/acme-client + ## [1.39.16](https://github.com/publishlab/node-acme-client/compare/v1.39.15...v1.39.16) (2026-05-13) **Note:** Version bump only for package @certd/acme-client diff --git a/packages/core/acme-client/package.json b/packages/core/acme-client/package.json index 07f67bb86..7d6a77ffc 100644 --- a/packages/core/acme-client/package.json +++ b/packages/core/acme-client/package.json @@ -3,7 +3,7 @@ "description": "Simple and unopinionated ACME client", "private": false, "author": "nmorsman", - "version": "1.39.16", + "version": "1.40.2", "type": "module", "module": "./dist/index.js", "main": "./dist/index.js", @@ -18,7 +18,7 @@ "types" ], "dependencies": { - "@certd/basic": "^1.39.16", + "@certd/basic": "^1.40.2", "@peculiar/x509": "^1.11.0", "asn1js": "^3.0.5", "axios": "^1.9.0", @@ -50,7 +50,7 @@ }, "scripts": { "before-build": "node -e \"const fs=require('fs');fs.rmSync('dist',{recursive:true,force:true});fs.rmSync('tsconfig.tsbuildinfo',{force:true});\"", - "build": "npm run before-build && tsc --skipLibCheck", + "build": "npm run before-build && tsc -p tsconfig.build.json --skipLibCheck", "build-docs": "jsdoc2md dist/client.js > docs/client.md && jsdoc2md dist/crypto/index.js > docs/crypto.md && jsdoc2md dist/crypto/forge.js > docs/forge.md", "lint": "eslint \"src/**/*.ts\" \"types/**/*.ts\"", "lint-types": "tsd --files \"types/index.test-d.ts\"", @@ -76,5 +76,5 @@ "bugs": { "url": "https://github.com/publishlab/node-acme-client/issues" }, - "gitHead": "1c6dc169ac04fd09ef94404a912a15cbb17e1452" + "gitHead": "678b70cee8510a2b5217788c5db9469f49cbd439" } diff --git a/packages/core/acme-client/tsconfig.build.json b/packages/core/acme-client/tsconfig.build.json new file mode 100644 index 000000000..bcca8fcc1 --- /dev/null +++ b/packages/core/acme-client/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + } +} diff --git a/packages/core/acme-client/tsconfig.json b/packages/core/acme-client/tsconfig.json index 6326967ce..017154eec 100644 --- a/packages/core/acme-client/tsconfig.json +++ b/packages/core/acme-client/tsconfig.json @@ -6,7 +6,7 @@ "moduleResolution": "node", "esModuleInterop": true, "inlineSourceMap": false, - "sourceMap": false, + "sourceMap": true, "noImplicitThis": false, "noUnusedLocals": false, "stripInternal": true, diff --git a/packages/core/basic/CHANGELOG.md b/packages/core/basic/CHANGELOG.md index f856f1839..ea95a5f08 100644 --- a/packages/core/basic/CHANGELOG.md +++ b/packages/core/basic/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/basic + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +**Note:** Version bump only for package @certd/basic + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +**Note:** Version bump only for package @certd/basic + ## [1.39.16](https://github.com/certd/certd/compare/v1.39.15...v1.39.16) (2026-05-13) **Note:** Version bump only for package @certd/basic diff --git a/packages/core/basic/build.md b/packages/core/basic/build.md index 629b97a7d..299942935 100644 --- a/packages/core/basic/build.md +++ b/packages/core/basic/build.md @@ -1 +1 @@ -14:13 +00:35 diff --git a/packages/core/basic/package.json b/packages/core/basic/package.json index 585ee1cf8..d5afe9821 100644 --- a/packages/core/basic/package.json +++ b/packages/core/basic/package.json @@ -1,7 +1,7 @@ { "name": "@certd/basic", "private": false, - "version": "1.39.16", + "version": "1.40.2", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -9,7 +9,7 @@ "scripts": { "dev": "vite", "before-build": "rimraf dist && rimraf tsconfig.tsbuildinfo && rimraf .rollup.cache", - "build": "npm run before-build && tsc --skipLibCheck", + "build": "npm run before-build && tsc -p tsconfig.build.json --skipLibCheck", "dev-build": "npm run build", "preview": "vite preview", "test": "mocha --loader=ts-node/esm", @@ -52,5 +52,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "1c6dc169ac04fd09ef94404a912a15cbb17e1452" + "gitHead": "678b70cee8510a2b5217788c5db9469f49cbd439" } diff --git a/packages/core/basic/src/utils/util.cache.ts b/packages/core/basic/src/utils/util.cache.ts index 460e16732..b10a2c128 100644 --- a/packages/core/basic/src/utils/util.cache.ts +++ b/packages/core/basic/src/utils/util.cache.ts @@ -11,9 +11,10 @@ export class LocalCache { cache: Map; constructor(opts: { clearInterval?: number } = {}) { this.cache = new Map(); - setInterval(() => { + const intervalId = setInterval(() => { this.clearExpires(); }, opts.clearInterval ?? 5 * 60 * 1000); + intervalId.unref?.(); } get(key: string): V | undefined { diff --git a/packages/core/basic/tsconfig.build.json b/packages/core/basic/tsconfig.build.json new file mode 100644 index 000000000..bcca8fcc1 --- /dev/null +++ b/packages/core/basic/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + } +} diff --git a/packages/core/basic/tsconfig.json b/packages/core/basic/tsconfig.json index 4a0b70f77..8bf8cd59a 100644 --- a/packages/core/basic/tsconfig.json +++ b/packages/core/basic/tsconfig.json @@ -8,7 +8,7 @@ "experimentalDecorators": true, "emitDecoratorMetadata": true, "inlineSourceMap": false, - "sourceMap": false, + "sourceMap": true, "noImplicitThis": true, "noUnusedLocals": true, "stripInternal": true, diff --git a/packages/core/pipeline/CHANGELOG.md b/packages/core/pipeline/CHANGELOG.md index d2fbe0a4d..0d7f62dfb 100644 --- a/packages/core/pipeline/CHANGELOG.md +++ b/packages/core/pipeline/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/pipeline + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +**Note:** Version bump only for package @certd/pipeline + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +**Note:** Version bump only for package @certd/pipeline + ## [1.39.16](https://github.com/certd/certd/compare/v1.39.15...v1.39.16) (2026-05-13) **Note:** Version bump only for package @certd/pipeline diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json index 910fff5eb..81b17c05e 100644 --- a/packages/core/pipeline/package.json +++ b/packages/core/pipeline/package.json @@ -1,7 +1,7 @@ { "name": "@certd/pipeline", "private": false, - "version": "1.39.16", + "version": "1.40.2", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -9,7 +9,7 @@ "scripts": { "dev": "vite", "before-build": "rimraf dist && rimraf tsconfig.tsbuildinfo && rimraf .rollup.cache", - "build": "npm run before-build && tsc --skipLibCheck", + "build": "npm run before-build && tsc -p tsconfig.build.json --skipLibCheck", "dev-build": "npm run build", "build3": "rollup -c", "preview": "vite preview", @@ -19,8 +19,8 @@ "compile": "tsc --skipLibCheck --watch" }, "dependencies": { - "@certd/basic": "^1.39.16", - "@certd/plus-core": "^1.39.16", + "@certd/basic": "^1.40.2", + "@certd/plus-core": "^1.40.2", "dayjs": "^1.11.7", "lodash-es": "^4.17.21", "reflect-metadata": "^0.1.13" @@ -49,5 +49,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "1c6dc169ac04fd09ef94404a912a15cbb17e1452" + "gitHead": "678b70cee8510a2b5217788c5db9469f49cbd439" } diff --git a/packages/core/pipeline/tsconfig.build.json b/packages/core/pipeline/tsconfig.build.json new file mode 100644 index 000000000..bcca8fcc1 --- /dev/null +++ b/packages/core/pipeline/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + } +} diff --git a/packages/core/pipeline/tsconfig.json b/packages/core/pipeline/tsconfig.json index a373edbd8..712b58f0d 100644 --- a/packages/core/pipeline/tsconfig.json +++ b/packages/core/pipeline/tsconfig.json @@ -8,7 +8,7 @@ "experimentalDecorators": true, "emitDecoratorMetadata": true, "inlineSourceMap": false, - "sourceMap": false, + "sourceMap": true, "noImplicitThis": true, "noUnusedLocals": true, "importHelpers": true, diff --git a/packages/libs/lib-huawei/CHANGELOG.md b/packages/libs/lib-huawei/CHANGELOG.md index 2787e400a..84c7f7854 100644 --- a/packages/libs/lib-huawei/CHANGELOG.md +++ b/packages/libs/lib-huawei/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/lib-huawei + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +**Note:** Version bump only for package @certd/lib-huawei + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +**Note:** Version bump only for package @certd/lib-huawei + ## [1.39.15](https://github.com/certd/certd/compare/v1.39.14...v1.39.15) (2026-05-13) **Note:** Version bump only for package @certd/lib-huawei diff --git a/packages/libs/lib-huawei/package.json b/packages/libs/lib-huawei/package.json index 3a17e48f5..63f906d00 100644 --- a/packages/libs/lib-huawei/package.json +++ b/packages/libs/lib-huawei/package.json @@ -1,7 +1,7 @@ { "name": "@certd/lib-huawei", "private": false, - "version": "1.39.16", + "version": "1.40.2", "main": "./dist/bundle.js", "module": "./dist/bundle.js", "types": "./dist/d/index.d.ts", @@ -27,5 +27,5 @@ "prettier": "^2.8.8", "tslib": "^2.8.1" }, - "gitHead": "bae5a04dcc0a679c290a9805c3ac4a6020eb6ec0" + "gitHead": "678b70cee8510a2b5217788c5db9469f49cbd439" } diff --git a/packages/libs/lib-huawei/rollup.config.js b/packages/libs/lib-huawei/rollup.config.js index d452ab890..f0bfac5cd 100644 --- a/packages/libs/lib-huawei/rollup.config.js +++ b/packages/libs/lib-huawei/rollup.config.js @@ -9,6 +9,7 @@ module.exports = { output: { file: "dist/bundle.js", format: "cjs", + sourcemap: false, }, plugins: [ // 解析第三方依赖 @@ -22,10 +23,13 @@ module.exports = { // ], }), Typescript({ + tsconfig: "./tsconfig.build.json", target: "esnext", rootDir: "src", declaration: true, declarationDir: "dist/d", + sourceMap: false, + inlineSourceMap: false, exclude: ["./node_modules/**", "./src/**/*.vue", "./src/**/*.spec.ts"], allowSyntheticDefaultImports: true, }), diff --git a/packages/libs/lib-huawei/tsconfig.build.json b/packages/libs/lib-huawei/tsconfig.build.json new file mode 100644 index 000000000..bcca8fcc1 --- /dev/null +++ b/packages/libs/lib-huawei/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + } +} diff --git a/packages/libs/lib-huawei/tsconfig.json b/packages/libs/lib-huawei/tsconfig.json index 30ce7bdc3..0e44e9aa1 100644 --- a/packages/libs/lib-huawei/tsconfig.json +++ b/packages/libs/lib-huawei/tsconfig.json @@ -21,7 +21,7 @@ "composite": false, "useDefineForClassFields": true, "strict": false, - "sourceMap": false, + "sourceMap": true, "inlineSourceMap": false, "resolveJsonModule": true, "isolatedModules": false, diff --git a/packages/libs/lib-iframe/CHANGELOG.md b/packages/libs/lib-iframe/CHANGELOG.md index 4ae4cb0a0..4a1335d05 100644 --- a/packages/libs/lib-iframe/CHANGELOG.md +++ b/packages/libs/lib-iframe/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/lib-iframe + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +**Note:** Version bump only for package @certd/lib-iframe + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +**Note:** Version bump only for package @certd/lib-iframe + ## [1.39.15](https://github.com/certd/certd/compare/v1.39.14...v1.39.15) (2026-05-13) **Note:** Version bump only for package @certd/lib-iframe diff --git a/packages/libs/lib-iframe/package.json b/packages/libs/lib-iframe/package.json index 808b94725..1c981ff05 100644 --- a/packages/libs/lib-iframe/package.json +++ b/packages/libs/lib-iframe/package.json @@ -1,7 +1,7 @@ { "name": "@certd/lib-iframe", "private": false, - "version": "1.39.16", + "version": "1.40.2", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -9,7 +9,7 @@ "scripts": { "dev": "vite", "before-build": "rimraf dist && rimraf tsconfig.tsbuildinfo && rimraf .rollup.cache", - "build": "npm run before-build && tsc --skipLibCheck", + "build": "npm run before-build && tsc -p tsconfig.build.json --skipLibCheck", "dev-build": "npm run build", "build3": "rollup -c", "build2": "vue-tsc --noEmit && vite build", @@ -34,5 +34,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "bae5a04dcc0a679c290a9805c3ac4a6020eb6ec0" + "gitHead": "678b70cee8510a2b5217788c5db9469f49cbd439" } diff --git a/packages/libs/lib-iframe/tsconfig.build.json b/packages/libs/lib-iframe/tsconfig.build.json new file mode 100644 index 000000000..bcca8fcc1 --- /dev/null +++ b/packages/libs/lib-iframe/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + } +} diff --git a/packages/libs/lib-iframe/tsconfig.json b/packages/libs/lib-iframe/tsconfig.json index 08eacac0a..941a89e90 100644 --- a/packages/libs/lib-iframe/tsconfig.json +++ b/packages/libs/lib-iframe/tsconfig.json @@ -8,6 +8,7 @@ "experimentalDecorators": true, "emitDecoratorMetadata": true, "inlineSourceMap":false, + "sourceMap": true, "noImplicitThis": true, "noUnusedLocals": true, "stripInternal": true, @@ -22,7 +23,6 @@ "composite": false, "useDefineForClassFields": true, "strict": false, -// "sourceMap": true, "resolveJsonModule": true, "isolatedModules": true, "lib": ["ESNext", "DOM"], diff --git a/packages/libs/lib-jdcloud/CHANGELOG.md b/packages/libs/lib-jdcloud/CHANGELOG.md index 131bd36c8..0fe96e5ba 100644 --- a/packages/libs/lib-jdcloud/CHANGELOG.md +++ b/packages/libs/lib-jdcloud/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/jdcloud + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +**Note:** Version bump only for package @certd/jdcloud + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +**Note:** Version bump only for package @certd/jdcloud + ## [1.39.15](https://github.com/certd/certd/compare/v1.39.14...v1.39.15) (2026-05-13) **Note:** Version bump only for package @certd/jdcloud diff --git a/packages/libs/lib-jdcloud/package.json b/packages/libs/lib-jdcloud/package.json index d047f0979..571a8a2bb 100644 --- a/packages/libs/lib-jdcloud/package.json +++ b/packages/libs/lib-jdcloud/package.json @@ -1,12 +1,13 @@ { "name": "@certd/jdcloud", - "version": "1.39.16", + "version": "1.40.2", "description": "jdcloud openApi sdk", "main": "./dist/bundle.js", "module": "./dist/bundle.js", "types": "./dist/d/index.d.ts", "scripts": { - "build": "rollup -c ", + "before-build": "node -e \"const fs=require('fs');fs.rmSync('dist',{recursive:true,force:true});fs.rmSync('tsconfig.tsbuildinfo',{force:true});fs.rmSync('.rollup.cache',{recursive:true,force:true});\"", + "build": "npm run before-build && rollup -c ", "dev-build": "npm run build", "test:unit": "cross-env NODE_ENV=unittest echo no unit tests", "pub": "npm publish" @@ -58,5 +59,5 @@ "fetch" ] }, - "gitHead": "bae5a04dcc0a679c290a9805c3ac4a6020eb6ec0" + "gitHead": "678b70cee8510a2b5217788c5db9469f49cbd439" } diff --git a/packages/libs/lib-jdcloud/rollup.config.js b/packages/libs/lib-jdcloud/rollup.config.js index d452ab890..f0bfac5cd 100644 --- a/packages/libs/lib-jdcloud/rollup.config.js +++ b/packages/libs/lib-jdcloud/rollup.config.js @@ -9,6 +9,7 @@ module.exports = { output: { file: "dist/bundle.js", format: "cjs", + sourcemap: false, }, plugins: [ // 解析第三方依赖 @@ -22,10 +23,13 @@ module.exports = { // ], }), Typescript({ + tsconfig: "./tsconfig.build.json", target: "esnext", rootDir: "src", declaration: true, declarationDir: "dist/d", + sourceMap: false, + inlineSourceMap: false, exclude: ["./node_modules/**", "./src/**/*.vue", "./src/**/*.spec.ts"], allowSyntheticDefaultImports: true, }), diff --git a/packages/libs/lib-jdcloud/tsconfig.build.json b/packages/libs/lib-jdcloud/tsconfig.build.json new file mode 100644 index 000000000..bcca8fcc1 --- /dev/null +++ b/packages/libs/lib-jdcloud/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + } +} diff --git a/packages/libs/lib-jdcloud/tsconfig.json b/packages/libs/lib-jdcloud/tsconfig.json index 30ce7bdc3..0e44e9aa1 100644 --- a/packages/libs/lib-jdcloud/tsconfig.json +++ b/packages/libs/lib-jdcloud/tsconfig.json @@ -21,7 +21,7 @@ "composite": false, "useDefineForClassFields": true, "strict": false, - "sourceMap": false, + "sourceMap": true, "inlineSourceMap": false, "resolveJsonModule": true, "isolatedModules": false, diff --git a/packages/libs/lib-k8s/CHANGELOG.md b/packages/libs/lib-k8s/CHANGELOG.md index 096831196..0255cb3e7 100644 --- a/packages/libs/lib-k8s/CHANGELOG.md +++ b/packages/libs/lib-k8s/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/lib-k8s + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +**Note:** Version bump only for package @certd/lib-k8s + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +**Note:** Version bump only for package @certd/lib-k8s + ## [1.39.16](https://github.com/certd/certd/compare/v1.39.15...v1.39.16) (2026-05-13) **Note:** Version bump only for package @certd/lib-k8s diff --git a/packages/libs/lib-k8s/package.json b/packages/libs/lib-k8s/package.json index 2b0f5f2d1..d6b23fa00 100644 --- a/packages/libs/lib-k8s/package.json +++ b/packages/libs/lib-k8s/package.json @@ -1,7 +1,7 @@ { "name": "@certd/lib-k8s", "private": false, - "version": "1.39.16", + "version": "1.40.2", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -9,7 +9,7 @@ "scripts": { "dev": "vite", "before-build": "rimraf dist && rimraf tsconfig.tsbuildinfo && rimraf .rollup.cache", - "build": "npm run before-build && tsc --skipLibCheck", + "build": "npm run before-build && tsc -p tsconfig.build.json --skipLibCheck", "dev-build": "npm run build", "build3": "rollup -c", "build2": "vue-tsc --noEmit && vite build", @@ -19,7 +19,7 @@ "compile": "tsc --skipLibCheck --watch" }, "dependencies": { - "@certd/basic": "^1.39.16", + "@certd/basic": "^1.40.2", "@kubernetes/client-node": "0.21.0" }, "devDependencies": { @@ -36,5 +36,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "1c6dc169ac04fd09ef94404a912a15cbb17e1452" + "gitHead": "678b70cee8510a2b5217788c5db9469f49cbd439" } diff --git a/packages/libs/lib-k8s/tsconfig.build.json b/packages/libs/lib-k8s/tsconfig.build.json new file mode 100644 index 000000000..bcca8fcc1 --- /dev/null +++ b/packages/libs/lib-k8s/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + } +} diff --git a/packages/libs/lib-k8s/tsconfig.json b/packages/libs/lib-k8s/tsconfig.json index 08eacac0a..941a89e90 100644 --- a/packages/libs/lib-k8s/tsconfig.json +++ b/packages/libs/lib-k8s/tsconfig.json @@ -8,6 +8,7 @@ "experimentalDecorators": true, "emitDecoratorMetadata": true, "inlineSourceMap":false, + "sourceMap": true, "noImplicitThis": true, "noUnusedLocals": true, "stripInternal": true, @@ -22,7 +23,6 @@ "composite": false, "useDefineForClassFields": true, "strict": false, -// "sourceMap": true, "resolveJsonModule": true, "isolatedModules": true, "lib": ["ESNext", "DOM"], diff --git a/packages/libs/lib-server/CHANGELOG.md b/packages/libs/lib-server/CHANGELOG.md index 9971d6c17..aef51d69a 100644 --- a/packages/libs/lib-server/CHANGELOG.md +++ b/packages/libs/lib-server/CHANGELOG.md @@ -3,6 +3,20 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/lib-server + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +**Note:** Version bump only for package @certd/lib-server + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +### Features + +* 彩虹登录支持选择多种登录方式 ([7aa0c7e](https://github.com/certd/certd/commit/7aa0c7e491fe660abb62e68792ff5474f19bd5b8)) + ## [1.39.16](https://github.com/certd/certd/compare/v1.39.15...v1.39.16) (2026-05-13) **Note:** Version bump only for package @certd/lib-server diff --git a/packages/libs/lib-server/package.json b/packages/libs/lib-server/package.json index 04fd5d532..70b27afae 100644 --- a/packages/libs/lib-server/package.json +++ b/packages/libs/lib-server/package.json @@ -1,6 +1,6 @@ { "name": "@certd/lib-server", - "version": "1.39.16", + "version": "1.40.2", "description": "midway with flyway, sql upgrade way ", "private": false, "type": "module", @@ -9,7 +9,7 @@ "types": "./dist/index.d.ts", "scripts": { "before-build": "rimraf dist && rimraf tsconfig.tsbuildinfo && rimraf .rollup.cache", - "build": "npm run before-build && tsc --skipLibCheck", + "build": "npm run before-build && tsc -p tsconfig.build.json --skipLibCheck", "dev-build": "npm run build", "test": "midway-bin test --ts -V", "test:unit": "cross-env NODE_ENV=unittest mocha --no-config --node-option no-warnings --node-option loader=ts-node/esm \"src/**/*.test.ts\"", @@ -29,11 +29,11 @@ ], "license": "AGPL", "dependencies": { - "@certd/acme-client": "^1.39.16", - "@certd/basic": "^1.39.16", - "@certd/pipeline": "^1.39.16", - "@certd/plugin-lib": "^1.39.16", - "@certd/plus-core": "^1.39.16", + "@certd/acme-client": "^1.40.2", + "@certd/basic": "^1.40.2", + "@certd/pipeline": "^1.40.2", + "@certd/plugin-lib": "^1.40.2", + "@certd/plus-core": "^1.40.2", "@midwayjs/cache": "3.14.0", "@midwayjs/core": "3.20.11", "@midwayjs/i18n": "3.20.13", @@ -69,5 +69,5 @@ "typeorm": "^0.3.11", "typescript": "^5.4.2" }, - "gitHead": "1c6dc169ac04fd09ef94404a912a15cbb17e1452" + "gitHead": "678b70cee8510a2b5217788c5db9469f49cbd439" } diff --git a/packages/libs/lib-server/src/system/settings/service/models.ts b/packages/libs/lib-server/src/system/settings/service/models.ts index c8daffbaf..d81e897ff 100644 --- a/packages/libs/lib-server/src/system/settings/service/models.ts +++ b/packages/libs/lib-server/src/system/settings/service/models.ts @@ -253,6 +253,14 @@ export class SysSuiteSetting extends BaseSettings { intro?: string; } +export class SysAutoFixSetting extends BaseSettings { + static __title__ = '自动修复记录'; + static __key__ = 'sys.auto.fix'; + static __access__ = 'private'; + + fixed: Record = {}; +} + export type SiteHidden = { enabled: boolean; diff --git a/packages/libs/lib-server/tsconfig.build.json b/packages/libs/lib-server/tsconfig.build.json new file mode 100644 index 000000000..bcca8fcc1 --- /dev/null +++ b/packages/libs/lib-server/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + } +} diff --git a/packages/libs/lib-server/tsconfig.json b/packages/libs/lib-server/tsconfig.json index eb9e15f0a..d3e3b5798 100644 --- a/packages/libs/lib-server/tsconfig.json +++ b/packages/libs/lib-server/tsconfig.json @@ -9,7 +9,7 @@ "experimentalDecorators": true, "emitDecoratorMetadata": true, "inlineSourceMap": false, - "sourceMap": false, + "sourceMap": true, "noImplicitThis": true, "noUnusedLocals": true, "stripInternal": true, diff --git a/packages/libs/midway-flyway-js/CHANGELOG.md b/packages/libs/midway-flyway-js/CHANGELOG.md index d88d7d2ac..70e28700c 100644 --- a/packages/libs/midway-flyway-js/CHANGELOG.md +++ b/packages/libs/midway-flyway-js/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/midway-flyway-js + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +**Note:** Version bump only for package @certd/midway-flyway-js + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +**Note:** Version bump only for package @certd/midway-flyway-js + ## [1.39.15](https://github.com/certd/certd/compare/v1.39.14...v1.39.15) (2026-05-13) **Note:** Version bump only for package @certd/midway-flyway-js diff --git a/packages/libs/midway-flyway-js/package.json b/packages/libs/midway-flyway-js/package.json index 3a49d67ad..b75df64f0 100644 --- a/packages/libs/midway-flyway-js/package.json +++ b/packages/libs/midway-flyway-js/package.json @@ -1,6 +1,6 @@ { "name": "@certd/midway-flyway-js", - "version": "1.39.16", + "version": "1.40.2", "description": "midway with flyway, sql upgrade way ", "private": false, "type": "module", @@ -9,7 +9,7 @@ "types": "./dist/index.d.ts", "scripts": { "before-build": "rimraf dist && rimraf tsconfig.tsbuildinfo && rimraf .rollup.cache", - "build": "npm run before-build && tsc --skipLibCheck", + "build": "npm run before-build && tsc -p tsconfig.build.json --skipLibCheck", "dev-build": "npm run build", "test": "midway-bin test --ts -V", "test1": "midway-bin test --ts -V -f test/blank.test.ts -t 'hash-check'", @@ -49,5 +49,5 @@ "typeorm": "^0.3.11", "typescript": "^5.4.2" }, - "gitHead": "bae5a04dcc0a679c290a9805c3ac4a6020eb6ec0" + "gitHead": "678b70cee8510a2b5217788c5db9469f49cbd439" } diff --git a/packages/libs/midway-flyway-js/tsconfig.build.json b/packages/libs/midway-flyway-js/tsconfig.build.json new file mode 100644 index 000000000..bcca8fcc1 --- /dev/null +++ b/packages/libs/midway-flyway-js/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + } +} diff --git a/packages/libs/midway-flyway-js/tsconfig.json b/packages/libs/midway-flyway-js/tsconfig.json index b58913cf7..ef1f93865 100644 --- a/packages/libs/midway-flyway-js/tsconfig.json +++ b/packages/libs/midway-flyway-js/tsconfig.json @@ -8,6 +8,7 @@ "experimentalDecorators": true, "emitDecoratorMetadata": true, "inlineSourceMap":false, + "sourceMap": true, "noImplicitThis": true, "noUnusedLocals": true, "stripInternal": true, @@ -21,7 +22,6 @@ "composite": false, "useDefineForClassFields": true, "strict": false, -// "sourceMap": true, "resolveJsonModule": true, "isolatedModules": true, "lib": ["ESNext", "DOM"], diff --git a/packages/plugins/plugin-cert/CHANGELOG.md b/packages/plugins/plugin-cert/CHANGELOG.md index 3854a8d88..9b8ba5351 100644 --- a/packages/plugins/plugin-cert/CHANGELOG.md +++ b/packages/plugins/plugin-cert/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/plugin-cert + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +**Note:** Version bump only for package @certd/plugin-cert + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +**Note:** Version bump only for package @certd/plugin-cert + ## [1.39.16](https://github.com/certd/certd/compare/v1.39.15...v1.39.16) (2026-05-13) **Note:** Version bump only for package @certd/plugin-cert diff --git a/packages/plugins/plugin-cert/package.json b/packages/plugins/plugin-cert/package.json index b36e0ba7d..31f02fea9 100644 --- a/packages/plugins/plugin-cert/package.json +++ b/packages/plugins/plugin-cert/package.json @@ -1,14 +1,14 @@ { "name": "@certd/plugin-cert", "private": false, - "version": "1.39.16", + "version": "1.40.2", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", "scripts": { "dev": "vite", "before-build": "rimraf dist && rimraf tsconfig.tsbuildinfo && rimraf .rollup.cache", - "build": "tsc --skipLibCheck", + "build": "tsc -p tsconfig.build.json --skipLibCheck", "dev-build": "npm run build", "build3": "rollup -c", "build2": "vue-tsc --noEmit && vite build", @@ -18,10 +18,10 @@ "compile": "tsc --skipLibCheck --watch" }, "dependencies": { - "@certd/acme-client": "^1.39.16", - "@certd/basic": "^1.39.16", - "@certd/pipeline": "^1.39.16", - "@certd/plugin-lib": "^1.39.16", + "@certd/acme-client": "^1.40.2", + "@certd/basic": "^1.40.2", + "@certd/pipeline": "^1.40.2", + "@certd/plugin-lib": "^1.40.2", "psl": "^1.9.0", "punycode.js": "^2.3.1" }, @@ -41,5 +41,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "1c6dc169ac04fd09ef94404a912a15cbb17e1452" + "gitHead": "678b70cee8510a2b5217788c5db9469f49cbd439" } diff --git a/packages/plugins/plugin-cert/tsconfig.build.json b/packages/plugins/plugin-cert/tsconfig.build.json new file mode 100644 index 000000000..bcca8fcc1 --- /dev/null +++ b/packages/plugins/plugin-cert/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + } +} diff --git a/packages/plugins/plugin-cert/tsconfig.json b/packages/plugins/plugin-cert/tsconfig.json index 1bbe778b5..412cf45b7 100644 --- a/packages/plugins/plugin-cert/tsconfig.json +++ b/packages/plugins/plugin-cert/tsconfig.json @@ -8,7 +8,7 @@ "experimentalDecorators": true, "emitDecoratorMetadata": true, "inlineSourceMap":false, - "sourceMap": false, + "sourceMap": true, "noImplicitThis": true, "noUnusedLocals": true, "stripInternal": true, diff --git a/packages/plugins/plugin-lib/CHANGELOG.md b/packages/plugins/plugin-lib/CHANGELOG.md index 84dc54f42..0ef88d7d1 100644 --- a/packages/plugins/plugin-lib/CHANGELOG.md +++ b/packages/plugins/plugin-lib/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/plugin-lib + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +**Note:** Version bump only for package @certd/plugin-lib + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +**Note:** Version bump only for package @certd/plugin-lib + ## [1.39.16](https://github.com/certd/certd/compare/v1.39.15...v1.39.16) (2026-05-13) **Note:** Version bump only for package @certd/plugin-lib diff --git a/packages/plugins/plugin-lib/package.json b/packages/plugins/plugin-lib/package.json index 867cf2467..027c65207 100644 --- a/packages/plugins/plugin-lib/package.json +++ b/packages/plugins/plugin-lib/package.json @@ -1,14 +1,14 @@ { "name": "@certd/plugin-lib", "private": false, - "version": "1.39.16", + "version": "1.40.2", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", "scripts": { "dev": "vite", "before-build": "rimraf dist && rimraf tsconfig.tsbuildinfo && rimraf .rollup.cache", - "build": "npm run before-build &&tsc --skipLibCheck", + "build": "npm run before-build && tsc -p tsconfig.build.json --skipLibCheck", "dev-build": "npm run build", "build3": "rollup -c", "build2": "vue-tsc --noEmit && vite build", @@ -23,10 +23,10 @@ "@alicloud/pop-core": "^1.7.10", "@alicloud/tea-util": "^1.4.11", "@aws-sdk/client-s3": "^3.964.0", - "@certd/acme-client": "^1.39.16", - "@certd/basic": "^1.39.16", - "@certd/pipeline": "^1.39.16", - "@certd/plus-core": "^1.39.16", + "@certd/acme-client": "^1.40.2", + "@certd/basic": "^1.40.2", + "@certd/pipeline": "^1.40.2", + "@certd/plus-core": "^1.40.2", "@kubernetes/client-node": "0.21.0", "ali-oss": "^6.22.0", "basic-ftp": "^5.0.5", @@ -61,5 +61,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "1c6dc169ac04fd09ef94404a912a15cbb17e1452" + "gitHead": "678b70cee8510a2b5217788c5db9469f49cbd439" } diff --git a/packages/plugins/plugin-lib/tsconfig.build.json b/packages/plugins/plugin-lib/tsconfig.build.json new file mode 100644 index 000000000..bcca8fcc1 --- /dev/null +++ b/packages/plugins/plugin-lib/tsconfig.build.json @@ -0,0 +1,7 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "sourceMap": false, + "inlineSourceMap": false + } +} diff --git a/packages/plugins/plugin-lib/tsconfig.json b/packages/plugins/plugin-lib/tsconfig.json index 5c89236a6..47b6febd0 100644 --- a/packages/plugins/plugin-lib/tsconfig.json +++ b/packages/plugins/plugin-lib/tsconfig.json @@ -8,7 +8,7 @@ "experimentalDecorators": true, "emitDecoratorMetadata": true, "inlineSourceMap": false, - "sourceMap": false, + "sourceMap": true, "noImplicitThis": true, "noUnusedLocals": true, "stripInternal": true, diff --git a/packages/ui/certd-client/CHANGELOG.md b/packages/ui/certd-client/CHANGELOG.md index 1df7467f1..bdaa197da 100644 --- a/packages/ui/certd-client/CHANGELOG.md +++ b/packages/ui/certd-client/CHANGELOG.md @@ -3,6 +3,33 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.40.2](https://github.com/certd/certd/compare/v1.40.1...v1.40.2) (2026-05-19) + +**Note:** Version bump only for package @certd/ui-client + +## [1.40.1](https://github.com/certd/certd/compare/v1.40.0...v1.40.1) (2026-05-18) + +### Performance Improvements + +* 商业版支持限制泛域名数量 ([c63745d](https://github.com/certd/certd/commit/c63745d1ba30904428ba6b13ab0785298baa5cae)) +* **suite:** 商业版用户已购套餐支持修改 ([bdb3d09](https://github.com/certd/certd/commit/bdb3d09c09fc73e7e5e3401f6ef5588bf8ad5088)) + +# [1.40.0](https://github.com/certd/certd/compare/v1.39.16...v1.40.0) (2026-05-14) + +### Bug Fixes + +* 修复第三方登录丢失state时无法在用户信息页面绑定第三方账号的bug ([45dedf5](https://github.com/certd/certd/commit/45dedf5bc779fea852e1f33dda4f31db2765633c)) +* 修复群晖授权没有显示设备id输入框的bug ([2f172b5](https://github.com/certd/certd/commit/2f172b56e9411303ca15138d827bdb9bafdae4d1)) +* 修复自动注册后没有跳转到控制台的bug ([4681ec9](https://github.com/certd/certd/commit/4681ec90088a3eb665427b2ac4047ec5ccefd7b3)) + +### Features + +* 彩虹登录支持选择多种登录方式 ([7aa0c7e](https://github.com/certd/certd/commit/7aa0c7e491fe660abb62e68792ff5474f19bd5b8)) + +### Performance Improvements + +* 头像增加缓存时间 ([7015b1b](https://github.com/certd/certd/commit/7015b1b232602e5168a3eb8bee6d7f1776ae1e74)) + ## [1.39.16](https://github.com/certd/certd/compare/v1.39.15...v1.39.16) (2026-05-13) **Note:** Version bump only for package @certd/ui-client diff --git a/packages/ui/certd-client/package.json b/packages/ui/certd-client/package.json index 8876e98be..ace0670d5 100644 --- a/packages/ui/certd-client/package.json +++ b/packages/ui/certd-client/package.json @@ -1,6 +1,6 @@ { "name": "@certd/ui-client", - "version": "1.39.16", + "version": "1.40.2", "private": true, "scripts": { "dev": "vite --open", @@ -106,8 +106,8 @@ "zod-defaults": "^0.1.3" }, "devDependencies": { - "@certd/lib-iframe": "^1.39.16", - "@certd/pipeline": "^1.39.16", + "@certd/lib-iframe": "^1.40.2", + "@certd/pipeline": "^1.40.2", "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-node-resolve": "^15.2.3", "@types/chai": "^4.3.12", diff --git a/packages/ui/certd-client/src/locales/langs/en-US/authentication.ts b/packages/ui/certd-client/src/locales/langs/en-US/authentication.ts index aba15f531..77a08fb85 100644 --- a/packages/ui/certd-client/src/locales/langs/en-US/authentication.ts +++ b/packages/ui/certd-client/src/locales/langs/en-US/authentication.ts @@ -78,8 +78,13 @@ export default { passkeyRegisterFailed: "Passkey registration failed", title: "Change Password", weakPasswordWarning: "For your account security, please change your password immediately", + initPasswordWarning: "This account does not have a login password yet. Please set one first", + initPasswordTitle: "Set Password", changeNow: "Change Now", + setNow: "Set Now", + notNow: "Not Now", successMessage: "Changed successfully", + initPasswordSuccessMessage: "Set successfully", oldPassword: "Old Password", oldPasswordRequired: "Please enter the old password", newPassword: "New Password", diff --git a/packages/ui/certd-client/src/locales/langs/en-US/certd/common.ts b/packages/ui/certd-client/src/locales/langs/en-US/certd/common.ts index a9401229a..39c78dac4 100644 --- a/packages/ui/certd-client/src/locales/langs/en-US/certd/common.ts +++ b/packages/ui/certd-client/src/locales/langs/en-US/certd/common.ts @@ -40,6 +40,9 @@ export default { basicInfo: "Basic Information", disabled: "Disabled", enabled: "Enabled", + enabledLabel: "Enabled", + normal: "Normal", + used_up: "Used up", default: "Default", success: "Success", test: "Test", diff --git a/packages/ui/certd-client/src/locales/langs/en-US/certd/suite.ts b/packages/ui/certd-client/src/locales/langs/en-US/certd/suite.ts index 5fa3e3692..984315eac 100644 --- a/packages/ui/certd-client/src/locales/langs/en-US/certd/suite.ts +++ b/packages/ui/certd-client/src/locales/langs/en-US/certd/suite.ts @@ -6,6 +6,9 @@ export default { specifications: "Specifications", pipeline: "Pipeline", domain: "Domain", + totalDomain: "Total Domain Count", + wildcardDomain: "Wildcard Domain", + includedWildcardDomain: "Included Wildcard Domain Count", deployTimes: "Deployments", monitorCount: "DomainMonitors", duration: "Duration", @@ -24,11 +27,13 @@ export default { please_select_package: "Please select a package", package: "Package", addon_package: "Addon Package", - domain_count: "Domain Count", + domain_count: "Total Domain Count", + wildcard_domain_count: "Wildcard Domain Count", unit_count: "pcs", pipeline_count: "Pipeline Count", unit_item: "items", deploy_count: "Deploy Count", + deploy_count_used: "Used Deploy Count", unit_times: "times", monitor_count: "Certificate Monitor Count", duration: "Duration", @@ -42,6 +47,7 @@ export default { intro: "Introduction", packageContent: "Package Content", maxDomainCount: "Max Domain Count", + maxWildcardDomainCount: "Max Wildcard Domain Count", maxPipelineCount: "Max Pipeline Count", maxDeployCount: "Max Deploy Count", maxMonitorCount: "Max Monitor Count", @@ -51,6 +57,10 @@ export default { addon: "Addon", typeHelper: "Suite: Only the most recently purchased one is active at a time\nAddon: Multiple can be purchased, effective immediately without affecting the suite\nThe quantities of suite and addon can be accumulated", pipelineCount: "Pipeline Count", + wildcardDomainCount: "Wildcard Domain Count", + wildcardDomainCountPart: "Included Wildcard Domain Count", + wildcardDomainCountSub: "- Wildcard Domain Count", + wildcardDomainCountHelper: "Wildcard domains are also limited by the total domain count: each wildcard domain consumes both domain count and wildcard domain count quota.", unitPipeline: "pipelines", deployCount: "Deployment Count", unitDeploy: "times", diff --git a/packages/ui/certd-client/src/locales/langs/zh-CN/authentication.ts b/packages/ui/certd-client/src/locales/langs/zh-CN/authentication.ts index 4ec2f109f..f4e23f5ef 100644 --- a/packages/ui/certd-client/src/locales/langs/zh-CN/authentication.ts +++ b/packages/ui/certd-client/src/locales/langs/zh-CN/authentication.ts @@ -79,8 +79,13 @@ export default { title: "修改密码", weakPasswordWarning: "为了您的账户安全,请立即修改密码", + initPasswordWarning: "当前账号还未设置登录密码,请先设置密码", + initPasswordTitle: "设置密码", changeNow: "立即修改", + setNow: "立即设置", + notNow: "暂不设置", successMessage: "修改成功", + initPasswordSuccessMessage: "设置成功", oldPassword: "旧密码", oldPasswordRequired: "请输入旧密码", newPassword: "新密码", diff --git a/packages/ui/certd-client/src/locales/langs/zh-CN/certd/common.ts b/packages/ui/certd-client/src/locales/langs/zh-CN/certd/common.ts index 76874ac62..c68b5d3fb 100644 --- a/packages/ui/certd-client/src/locales/langs/zh-CN/certd/common.ts +++ b/packages/ui/certd-client/src/locales/langs/zh-CN/certd/common.ts @@ -44,6 +44,9 @@ export default { basicInfo: "基础信息", disabled: "禁用", enabled: "启用", + enabledLabel: "启用", + normal: "正常", + used_up: "已用完", default: "默认", success: "成功", test: "测试", diff --git a/packages/ui/certd-client/src/locales/langs/zh-CN/certd/suite.ts b/packages/ui/certd-client/src/locales/langs/zh-CN/certd/suite.ts index 76f0795bc..12186ea6e 100644 --- a/packages/ui/certd-client/src/locales/langs/zh-CN/certd/suite.ts +++ b/packages/ui/certd-client/src/locales/langs/zh-CN/certd/suite.ts @@ -6,6 +6,9 @@ export default { specifications: "规格", pipeline: "流水线", domain: "域名", + totalDomain: "域名总数量", + wildcardDomain: "泛域名", + includedWildcardDomain: "其中泛域名数量", deployTimes: "部署次数", monitorCount: "域名监控数", duration: "时长", @@ -24,11 +27,13 @@ export default { please_select_package: "请选择套餐", package: "套餐", addon_package: "加量包", - domain_count: "域名数量", + domain_count: "域名总数量", + wildcard_domain_count: "泛域名数量", unit_count: "个", pipeline_count: "流水线数量", unit_item: "条", deploy_count: "部署次数", + deploy_count_used: "已用部署次数", unit_times: "次", monitor_count: "证书监控数量", duration: "时长", @@ -42,6 +47,7 @@ export default { intro: "介绍", packageContent: "套餐内容", maxDomainCount: "最大域名数", + maxWildcardDomainCount: "最大泛域名数", maxPipelineCount: "最大流水线数", maxDeployCount: "最大部署数", maxMonitorCount: "最大监控数", @@ -51,6 +57,10 @@ export default { addon: "加量包", typeHelper: "套餐:同一时间只有最新购买的一个生效\n加量包:可购买多个,购买后立即生效,不影响套餐\n套餐和加量包数量可叠加", pipelineCount: "流水线数量", + wildcardDomainCount: "泛域名数量", + wildcardDomainCountPart: "其中泛域名数量", + wildcardDomainCountSub: "- 泛域名数量", + wildcardDomainCountHelper: "泛域名数量受域名总数量限制:泛域名会同时占用域名总数量和泛域名数量额度;注意:如果域名总数有限制,泛域名数量不要设置为无限制。", unitPipeline: "条", deployCount: "部署次数", unitDeploy: "次", diff --git a/packages/ui/certd-client/src/store/user/api.user.ts b/packages/ui/certd-client/src/store/user/api.user.ts index e358c760c..498c08abe 100644 --- a/packages/ui/certd-client/src/store/user/api.user.ts +++ b/packages/ui/certd-client/src/store/user/api.user.ts @@ -38,6 +38,7 @@ export interface UserInfoRes { avatar?: string; roleIds: number[]; isWeak?: boolean; + needInitPassword?: boolean; validTime?: number; status?: number; } diff --git a/packages/ui/certd-client/src/use/use-refrence.tsx b/packages/ui/certd-client/src/use/use-refrence.tsx index 709318236..e756b7a55 100644 --- a/packages/ui/certd-client/src/use/use-refrence.tsx +++ b/packages/ui/certd-client/src/use/use-refrence.tsx @@ -13,7 +13,6 @@ export function useReference(formItem: any) { const ctx = { compute: (opts: any) => { const func = (context: any) => { - debugger; let form = context.form || {}; form = form.input || form.body || form; // form.access去掉,历史原因,access的mergeScript会处理form.access return opts({ diff --git a/packages/ui/certd-client/src/views/certd/mine/api.ts b/packages/ui/certd-client/src/views/certd/mine/api.ts index 5cabbd16c..04bcd69fd 100644 --- a/packages/ui/certd-client/src/views/certd/mine/api.ts +++ b/packages/ui/certd-client/src/views/certd/mine/api.ts @@ -15,6 +15,14 @@ export async function changePassword(form: any) { }); } +export async function initPassword(form: any) { + return await request({ + url: "/mine/initPassword", + method: "POST", + data: form, + }); +} + export async function UpdateProfile(form: any) { return await request({ url: "/mine/updateProfile", diff --git a/packages/ui/certd-client/src/views/certd/mine/change-password-button.vue b/packages/ui/certd-client/src/views/certd/mine/change-password-button.vue index a1b530de6..ed2f2ec3c 100644 --- a/packages/ui/certd-client/src/views/certd/mine/change-password-button.vue +++ b/packages/ui/certd-client/src/views/certd/mine/change-password-button.vue @@ -9,7 +9,7 @@ import { ref } from "vue"; import { useI18n } from "/src/locales"; const { t } = useI18n(); -import { CrudOptions, useColumns, useFormWrapper } from "@fast-crud/fast-crud"; +import { compute, CrudOptions, useColumns, useFormWrapper } from "@fast-crud/fast-crud"; import * as api from "/@/views/certd/mine/api"; import { notification } from "ant-design-vue"; import { useUserStore } from "/@/store/user"; @@ -20,6 +20,11 @@ defineProps<{ let passwordFormRef = ref(); +type OpenOptions = { + password?: string; + init?: boolean; +}; + const validatePass1 = async (rule: any, value: any) => { if (value === "") { throw new Error(t("authentication.enterPassword")); @@ -53,19 +58,33 @@ const passwordFormOptions: CrudOptions = { width: "500px", }, async doSubmit({ form }) { - await api.changePassword(form); + if (form.init) { + await api.initPassword(form); + } else { + await api.changePassword(form); + } //重新加载用户信息 await userStore.loadUserInfo(); }, async afterSubmit() { - notification.success({ message: t("authentication.successMessage") }); + const formData = passwordFormRef.value?.getFormData?.(); + const message = formData?.init ? t("authentication.initPasswordSuccessMessage") : t("authentication.successMessage"); + notification.success({ message }); }, }, columns: { + init: { + title: "init", + type: "text", + form: { + show: false, + }, + }, password: { title: t("authentication.oldPassword"), type: "password", form: { + show: compute(({ form }) => form.init !== true), rules: [{ required: true, message: t("authentication.oldPasswordRequired") }], }, }, @@ -97,12 +116,16 @@ const passwordFormOptions: CrudOptions = { }, }; -async function open(opts: { password: "" }) { +async function open(opts: OpenOptions = {}) { const formOptions = buildFormOptions(passwordFormOptions); formOptions.newInstance = true; //新实例打开 + if (opts.init) { + formOptions.wrapper.title = t("authentication.initPasswordTitle"); + } passwordFormRef.value = await openDialog(formOptions); passwordFormRef.value.setFormData({ - password: opts.password, + init: opts.init === true, + password: opts.password || "", }); console.log(passwordFormRef.value); } diff --git a/packages/ui/certd-client/src/views/certd/mine/user-profile.vue b/packages/ui/certd-client/src/views/certd/mine/user-profile.vue index 8fb3e8145..08f624945 100644 --- a/packages/ui/certd-client/src/views/certd/mine/user-profile.vue +++ b/packages/ui/certd-client/src/views/certd/mine/user-profile.vue @@ -48,7 +48,7 @@
- + {{ t("authentication.securitySettingTip") }} @@ -387,6 +387,7 @@ const checkPasskeySupport = () => { } }; const userStore = useUserStore(); +const changePasswordButtonRef = ref(); const userAvatar = computed(() => { if (isEmpty(userInfo.value.avatar)) { return ""; @@ -395,11 +396,26 @@ const userAvatar = computed(() => { return userInfo.value.avatar; } - return `api/basic/file/download?token=${userStore.getToken}&key=${userInfo.value.avatar}`; + return `api/basic/file/download?key=${userInfo.value.avatar}`; }); onMounted(async () => { await getUserInfo(); + userStore.setUserInfo(userInfo.value); + if (userInfo.value.needInitPassword === true) { + Modal.confirm({ + title: t("authentication.initPasswordTitle"), + content: t("authentication.initPasswordWarning"), + okText: t("authentication.setNow"), + cancelText: t("authentication.notNow"), + closable: true, + onOk: () => { + changePasswordButtonRef.value.open({ + init: true, + }); + }, + }); + } await loadContactCapability(); await loadOauthBounds(); await loadOauthProviders(); diff --git a/packages/ui/certd-client/src/views/certd/pipeline/utils.ts b/packages/ui/certd-client/src/views/certd/pipeline/utils.ts index 7e5ad599f..52878d57c 100644 --- a/packages/ui/certd-client/src/views/certd/pipeline/utils.ts +++ b/packages/ui/certd-client/src/views/certd/pipeline/utils.ts @@ -56,6 +56,10 @@ export function findStep(pipeline: any, id: string) { export async function checkPipelineLimit() { const settingsStore = useSettingStore(); + if (settingsStore.isEnterprise) { + //企业模式不限制 + return; + } if (settingsStore.isComm && settingsStore.suiteSetting.enabled) { //检查数量是否超限 diff --git a/packages/ui/certd-client/src/views/certd/suite/mine/api.ts b/packages/ui/certd-client/src/views/certd/suite/mine/api.ts index 1e1faa42b..64a09f5c7 100644 --- a/packages/ui/certd-client/src/views/certd/suite/mine/api.ts +++ b/packages/ui/certd-client/src/views/certd/suite/mine/api.ts @@ -14,6 +14,7 @@ export type SuiteDetail = { expiresTime?: number; pipelineCount?: SuiteValue; domainCount?: SuiteValue; + wildcardDomainCount?: SuiteValue; deployCount?: SuiteValue; monitorCount?: SuiteValue; }; diff --git a/packages/ui/certd-client/src/views/certd/suite/mine/crud.tsx b/packages/ui/certd-client/src/views/certd/suite/mine/crud.tsx index 1076630a7..f8ed1d21f 100644 --- a/packages/ui/certd-client/src/views/certd/suite/mine/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/suite/mine/crud.tsx @@ -147,7 +147,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat }, }, "content.maxDomainCount": { - title: "域名数量", + title: "域名总数量", type: "text", form: { key: ["content", "maxDomainCount"], @@ -168,6 +168,28 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat align: "center", }, }, + "content.maxWildcardDomainCount": { + title: "其中泛域名数量", + type: "text", + form: { + key: ["content", "maxWildcardDomainCount"], + component: { + name: SuiteValueEdit, + vModel: "modelValue", + unit: "个", + }, + rules: [{ required: true, message: "此项必填" }], + }, + column: { + width: 120, + component: { + name: SuiteValue, + vModel: "modelValue", + unit: "个", + }, + align: "center", + }, + }, "content.maxPipelineCount": { title: "流水线数量", type: "text", diff --git a/packages/ui/certd-client/src/views/certd/suite/order-modal.vue b/packages/ui/certd-client/src/views/certd/suite/order-modal.vue index ad0ab1adf..ac195f127 100644 --- a/packages/ui/certd-client/src/views/certd/suite/order-modal.vue +++ b/packages/ui/certd-client/src/views/certd/suite/order-modal.vue @@ -11,7 +11,10 @@ {{ $t("certd.order.specifications") }}: {{ $t("certd.order.pipeline") }} - {{ $t("certd.order.domain") }} + {{ $t("certd.order.totalDomain") }} + + - {{ $t("certd.order.includedWildcardDomain") }}; + {{ $t("certd.order.deployTimes") }} {{ $t("certd.order.monitorCount") }} diff --git a/packages/ui/certd-client/src/views/certd/suite/product-info.vue b/packages/ui/certd-client/src/views/certd/suite/product-info.vue index 96699c9bd..917330a61 100644 --- a/packages/ui/certd-client/src/views/certd/suite/product-info.vue +++ b/packages/ui/certd-client/src/views/certd/suite/product-info.vue @@ -1,7 +1,7 @@