diff --git a/CHANGELOG.md b/CHANGELOG.md index bfa077bdd..cc7098063 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +### Bug Fixes + +* 修复某些页面翻译不全显示错误的bug ([0b3158f](https://github.com/certd/certd/commit/0b3158fdd5fe5bb0a98c4e65715dbc3de2c38047)) +* 修复运行流水线后会闪烁一下的bug ([dfc9362](https://github.com/certd/certd/commit/dfc9362084082ee535b898f23b2609c1d946a6fd)) + +### Performance Improvements + +* 部署plesk证书,支持删除未使用的证书 ([902d246](https://github.com/certd/certd/commit/902d246d1a7473ad90f604028c4eb09c8c67d99c)) +* 通知和定时器的删除按钮显示为红色更显眼 ([61ba83c](https://github.com/certd/certd/commit/61ba83c77546c3d505d081e19a3d68c127662bf1)) +* 优化流水线列表页面、详情页面性能,精简返回数据 ([609ac9c](https://github.com/certd/certd/commit/609ac9c9a2dde605eb09834ae59693c1cb238765)) +* 支持自动选择校验方式申请证书 ([3f99432](https://github.com/certd/certd/commit/3f9943270cfb12946e38e6272bc5e8d95ad6ab9e)) +* OpenAPI支持autoApply参数 ([42f4d14](https://github.com/certd/certd/commit/42f4d1477dc791520a874aed56035abcbc8c433b)) + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +### Bug Fixes + +* 某些插件找不到的bug ([4b3f4a8](https://github.com/certd/certd/commit/4b3f4a868a8b0800c5c59de9d0f47bddc079e7b3)) + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) ### Bug Fixes diff --git a/build.trigger b/build.trigger index 9da314544..7a6a87811 100644 --- a/build.trigger +++ b/build.trigger @@ -1 +1 @@ -23:42 +23:53 diff --git a/docs/guide/changelogs/CHANGELOG.md b/docs/guide/changelogs/CHANGELOG.md index bfa077bdd..cc7098063 100644 --- a/docs/guide/changelogs/CHANGELOG.md +++ b/docs/guide/changelogs/CHANGELOG.md @@ -3,6 +3,27 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +### Bug Fixes + +* 修复某些页面翻译不全显示错误的bug ([0b3158f](https://github.com/certd/certd/commit/0b3158fdd5fe5bb0a98c4e65715dbc3de2c38047)) +* 修复运行流水线后会闪烁一下的bug ([dfc9362](https://github.com/certd/certd/commit/dfc9362084082ee535b898f23b2609c1d946a6fd)) + +### Performance Improvements + +* 部署plesk证书,支持删除未使用的证书 ([902d246](https://github.com/certd/certd/commit/902d246d1a7473ad90f604028c4eb09c8c67d99c)) +* 通知和定时器的删除按钮显示为红色更显眼 ([61ba83c](https://github.com/certd/certd/commit/61ba83c77546c3d505d081e19a3d68c127662bf1)) +* 优化流水线列表页面、详情页面性能,精简返回数据 ([609ac9c](https://github.com/certd/certd/commit/609ac9c9a2dde605eb09834ae59693c1cb238765)) +* 支持自动选择校验方式申请证书 ([3f99432](https://github.com/certd/certd/commit/3f9943270cfb12946e38e6272bc5e8d95ad6ab9e)) +* OpenAPI支持autoApply参数 ([42f4d14](https://github.com/certd/certd/commit/42f4d1477dc791520a874aed56035abcbc8c433b)) + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +### Bug Fixes + +* 某些插件找不到的bug ([4b3f4a8](https://github.com/certd/certd/commit/4b3f4a868a8b0800c5c59de9d0f47bddc079e7b3)) + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) ### Bug Fixes diff --git a/docs/guide/install/images/github-release-2.png b/docs/guide/install/images/github-release-2.png new file mode 100644 index 000000000..4e9bb7795 Binary files /dev/null and b/docs/guide/install/images/github-release-2.png differ diff --git a/docs/guide/install/images/github-release.png b/docs/guide/install/images/github-release.png new file mode 100644 index 000000000..fc06603ec Binary files /dev/null and b/docs/guide/install/images/github-release.png differ diff --git a/docs/guide/install/upgrade.md b/docs/guide/install/upgrade.md index 11c6dc42d..0f562ec57 100644 --- a/docs/guide/install/upgrade.md +++ b/docs/guide/install/upgrade.md @@ -13,4 +13,54 @@ ::: ## 升级日志 +可以查看最新版本号,以及所有版本的更新日志 [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 55c783352..1713ce173 100644 --- a/lerna.json +++ b/lerna.json @@ -9,5 +9,5 @@ } }, "npmClient": "pnpm", - "version": "1.36.4" + "version": "1.36.6" } diff --git a/package.json b/package.json index 47358de24..e104b7ae9 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ }, "license": "AGPL-3.0", "dependencies": { + "@certd/ui-server": "link:packages/ui/certd-server", "axios": "^1.7.7", "copyfiles": "^2.4.1", "lodash-es": "^4.17.21", diff --git a/packages/core/acme-client/CHANGELOG.md b/packages/core/acme-client/CHANGELOG.md index 06a57f6f9..06362d38e 100644 --- a/packages/core/acme-client/CHANGELOG.md +++ b/packages/core/acme-client/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/publishlab/node-acme-client/compare/v1.36.5...v1.36.6) (2025-07-14) + +**Note:** Version bump only for package @certd/acme-client + +## [1.36.5](https://github.com/publishlab/node-acme-client/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/acme-client + ## [1.36.4](https://github.com/publishlab/node-acme-client/compare/v1.36.3...v1.36.4) (2025-07-10) **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 9451a3148..31ca21ae3 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.36.4", + "version": "1.36.6", "type": "module", "module": "scr/index.js", "main": "src/index.js", @@ -18,7 +18,7 @@ "types" ], "dependencies": { - "@certd/basic": "^1.36.4", + "@certd/basic": "^1.36.6", "@peculiar/x509": "^1.11.0", "asn1js": "^3.0.5", "axios": "^1.7.2", @@ -69,5 +69,5 @@ "bugs": { "url": "https://github.com/publishlab/node-acme-client/issues" }, - "gitHead": "0ff700849ff6427f79cce241f92257eca35af65d" + "gitHead": "29d49d72f95aa101729965710375104240a2c038" } diff --git a/packages/core/basic/CHANGELOG.md b/packages/core/basic/CHANGELOG.md index 77f6240eb..a909a6ede 100644 --- a/packages/core/basic/CHANGELOG.md +++ b/packages/core/basic/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +**Note:** Version bump only for package @certd/basic + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/basic + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) **Note:** Version bump only for package @certd/basic diff --git a/packages/core/basic/build.md b/packages/core/basic/build.md index cc04063b6..78c144b10 100644 --- a/packages/core/basic/build.md +++ b/packages/core/basic/build.md @@ -1 +1 @@ -23:36 +23:48 diff --git a/packages/core/basic/package.json b/packages/core/basic/package.json index e405fd2ab..36c5f8bc7 100644 --- a/packages/core/basic/package.json +++ b/packages/core/basic/package.json @@ -1,7 +1,7 @@ { "name": "@certd/basic", "private": false, - "version": "1.36.4", + "version": "1.36.6", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -45,5 +45,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "0ff700849ff6427f79cce241f92257eca35af65d" + "gitHead": "29d49d72f95aa101729965710375104240a2c038" } diff --git a/packages/core/pipeline/CHANGELOG.md b/packages/core/pipeline/CHANGELOG.md index 1536a6bf9..9bacec7fd 100644 --- a/packages/core/pipeline/CHANGELOG.md +++ b/packages/core/pipeline/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +**Note:** Version bump only for package @certd/pipeline + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/pipeline + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) **Note:** Version bump only for package @certd/pipeline diff --git a/packages/core/pipeline/package.json b/packages/core/pipeline/package.json index 113ba72aa..bf8f42249 100644 --- a/packages/core/pipeline/package.json +++ b/packages/core/pipeline/package.json @@ -1,7 +1,7 @@ { "name": "@certd/pipeline", "private": false, - "version": "1.36.4", + "version": "1.36.6", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -17,8 +17,8 @@ "pub": "npm publish" }, "dependencies": { - "@certd/basic": "^1.36.4", - "@certd/plus-core": "^1.36.4", + "@certd/basic": "^1.36.6", + "@certd/plus-core": "^1.36.6", "dayjs": "^1.11.7", "lodash-es": "^4.17.21", "reflect-metadata": "^0.1.13" @@ -44,5 +44,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "0ff700849ff6427f79cce241f92257eca35af65d" + "gitHead": "29d49d72f95aa101729965710375104240a2c038" } diff --git a/packages/libs/lib-huawei/CHANGELOG.md b/packages/libs/lib-huawei/CHANGELOG.md index 18cf3812a..1c6038b5d 100644 --- a/packages/libs/lib-huawei/CHANGELOG.md +++ b/packages/libs/lib-huawei/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +**Note:** Version bump only for package @certd/lib-huawei + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/lib-huawei + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) **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 e452577dd..7afb28c8e 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.36.4", + "version": "1.36.6", "main": "./dist/bundle.js", "module": "./dist/bundle.js", "types": "./dist/d/index.d.ts", @@ -24,5 +24,5 @@ "prettier": "^2.8.8", "tslib": "^2.8.1" }, - "gitHead": "0ff700849ff6427f79cce241f92257eca35af65d" + "gitHead": "29d49d72f95aa101729965710375104240a2c038" } diff --git a/packages/libs/lib-iframe/CHANGELOG.md b/packages/libs/lib-iframe/CHANGELOG.md index 6cade79af..741e837b2 100644 --- a/packages/libs/lib-iframe/CHANGELOG.md +++ b/packages/libs/lib-iframe/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +**Note:** Version bump only for package @certd/lib-iframe + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/lib-iframe + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) **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 461b29186..3af672e1c 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.36.4", + "version": "1.36.6", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -31,5 +31,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "0ff700849ff6427f79cce241f92257eca35af65d" + "gitHead": "29d49d72f95aa101729965710375104240a2c038" } diff --git a/packages/libs/lib-jdcloud/CHANGELOG.md b/packages/libs/lib-jdcloud/CHANGELOG.md index 8303b8176..1028cce79 100644 --- a/packages/libs/lib-jdcloud/CHANGELOG.md +++ b/packages/libs/lib-jdcloud/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +**Note:** Version bump only for package @certd/jdcloud + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/jdcloud + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) **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 723eef601..d1b60d4fb 100644 --- a/packages/libs/lib-jdcloud/package.json +++ b/packages/libs/lib-jdcloud/package.json @@ -1,6 +1,6 @@ { "name": "@certd/jdcloud", - "version": "1.36.4", + "version": "1.36.6", "description": "jdcloud openApi sdk", "main": "./dist/bundle.js", "module": "./dist/bundle.js", @@ -61,5 +61,5 @@ "fetch" ] }, - "gitHead": "0ff700849ff6427f79cce241f92257eca35af65d" + "gitHead": "29d49d72f95aa101729965710375104240a2c038" } diff --git a/packages/libs/lib-k8s/CHANGELOG.md b/packages/libs/lib-k8s/CHANGELOG.md index 04a3201a6..cbdb18742 100644 --- a/packages/libs/lib-k8s/CHANGELOG.md +++ b/packages/libs/lib-k8s/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +**Note:** Version bump only for package @certd/lib-k8s + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/lib-k8s + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) **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 10227c264..d5bd60164 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.36.4", + "version": "1.36.6", "type": "module", "main": "./dist/index.js", "module": "./dist/index.js", @@ -17,7 +17,7 @@ "pub": "npm publish" }, "dependencies": { - "@certd/basic": "^1.36.4", + "@certd/basic": "^1.36.6", "@kubernetes/client-node": "0.21.0" }, "devDependencies": { @@ -32,5 +32,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "0ff700849ff6427f79cce241f92257eca35af65d" + "gitHead": "29d49d72f95aa101729965710375104240a2c038" } diff --git a/packages/libs/lib-server/CHANGELOG.md b/packages/libs/lib-server/CHANGELOG.md index 624b96599..8532999e8 100644 --- a/packages/libs/lib-server/CHANGELOG.md +++ b/packages/libs/lib-server/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +### Performance Improvements + +* 优化流水线列表页面、详情页面性能,精简返回数据 ([609ac9c](https://github.com/certd/certd/commit/609ac9c9a2dde605eb09834ae59693c1cb238765)) +* OpenAPI支持autoApply参数 ([42f4d14](https://github.com/certd/certd/commit/42f4d1477dc791520a874aed56035abcbc8c433b)) + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/lib-server + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) **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 cb7d5bade..93be6a33f 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.36.4", + "version": "1.36.6", "description": "midway with flyway, sql upgrade way ", "private": false, "type": "module", @@ -27,10 +27,10 @@ ], "license": "AGPL", "dependencies": { - "@certd/acme-client": "^1.36.4", - "@certd/basic": "^1.36.4", - "@certd/pipeline": "^1.36.4", - "@certd/plus-core": "^1.36.4", + "@certd/acme-client": "^1.36.6", + "@certd/basic": "^1.36.6", + "@certd/pipeline": "^1.36.6", + "@certd/plus-core": "^1.36.6", "@midwayjs/cache": "~3.14.0", "@midwayjs/core": "~3.20.3", "@midwayjs/i18n": "~3.20.3", @@ -61,5 +61,5 @@ "typeorm": "^0.3.11", "typescript": "^5.4.2" }, - "gitHead": "0ff700849ff6427f79cce241f92257eca35af65d" + "gitHead": "29d49d72f95aa101729965710375104240a2c038" } diff --git a/packages/libs/lib-server/src/basic/base-service.ts b/packages/libs/lib-server/src/basic/base-service.ts index 973ed5c25..c968796c5 100644 --- a/packages/libs/lib-server/src/basic/base-service.ts +++ b/packages/libs/lib-server/src/basic/base-service.ts @@ -164,8 +164,11 @@ export abstract class BaseService { } private buildListQuery(listReq: ListReq) { - const { query, sort, buildQuery } = listReq; + const { query, sort, buildQuery,select } = listReq; const qb = this.getRepository().createQueryBuilder('main'); + if (select) { + qb.setFindOptions({select}); + } if (query) { const keys = Object.keys(query); for (const key of keys) { @@ -191,6 +194,7 @@ export abstract class BaseService { if (buildQuery) { buildQuery(qb); } + return qb; } diff --git a/packages/libs/lib-server/src/basic/constants.ts b/packages/libs/lib-server/src/basic/constants.ts index 8fdc44246..c3850990a 100644 --- a/packages/libs/lib-server/src/basic/constants.ts +++ b/packages/libs/lib-server/src/basic/constants.ts @@ -107,5 +107,17 @@ export const Constants = { code: 20012, message: '证书还未生成', }, + openCertApplying: { + code: 20013, + message: '证书正在申请中,请稍后重新获取', + }, + openDomainNoVerifier:{ + code: 20014, + message: '域名校验方式未配置', + }, + openEmailNotFound: { + code: 20021, + message: '用户邮箱还未配置', + }, }, }; diff --git a/packages/libs/lib-server/src/basic/exception/common-exception.ts b/packages/libs/lib-server/src/basic/exception/common-exception.ts index 5e97743a1..97f6e15f6 100644 --- a/packages/libs/lib-server/src/basic/exception/common-exception.ts +++ b/packages/libs/lib-server/src/basic/exception/common-exception.ts @@ -11,13 +11,13 @@ export class CommonException extends BaseException { } export class CodeException extends BaseException { - constructor(res: { code: number; message: string }) { - super("CodeException", res.code, res.message); + constructor(res: { code: number; message: string; data?: any }) { + super("CodeException", res.code, res.message, res.data); } } export class TextException extends BaseException { - constructor(name, code,message, data?) { + constructor(name, code, message, data?) { super(name, code, message, data); } } diff --git a/packages/libs/lib-server/src/user/access/service/access-service.ts b/packages/libs/lib-server/src/user/access/service/access-service.ts index bc19f9644..f99f6330d 100644 --- a/packages/libs/lib-server/src/user/access/service/access-service.ts +++ b/packages/libs/lib-server/src/user/access/service/access-service.ts @@ -1,6 +1,6 @@ import {Inject, Provide, Scope, ScopeEnum} from '@midwayjs/core'; import {InjectEntityModel} from '@midwayjs/typeorm'; -import {Repository} from 'typeorm'; +import { In, Repository } from "typeorm"; import {AccessGetter, BaseService, PageReq, PermissionException, ValidateException} from '../../../index.js'; import {AccessEntity} from '../entity/access.js'; import {AccessDefine, accessRegistry, newAccess} from '@certd/pipeline'; @@ -175,4 +175,27 @@ export class AccessService extends BaseService { getDefineByType(type: string) { return accessRegistry.getDefine(type); } + + + async getSimpleByIds(ids: number[], userId: any) { + if (ids.length === 0) { + return []; + } + if (!userId) { + return []; + } + return await this.repository.find({ + where: { + id: In(ids), + userId, + }, + select: { + id: true, + name: true, + type: true, + userId:true + }, + }); + + } } diff --git a/packages/libs/midway-flyway-js/CHANGELOG.md b/packages/libs/midway-flyway-js/CHANGELOG.md index 210cc93ea..6f61e08ca 100644 --- a/packages/libs/midway-flyway-js/CHANGELOG.md +++ b/packages/libs/midway-flyway-js/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +**Note:** Version bump only for package @certd/midway-flyway-js + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/midway-flyway-js + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) **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 504d05e5e..8cc3efc80 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.36.4", + "version": "1.36.6", "description": "midway with flyway, sql upgrade way ", "private": false, "type": "module", @@ -46,5 +46,5 @@ "typeorm": "^0.3.11", "typescript": "^5.4.2" }, - "gitHead": "0ff700849ff6427f79cce241f92257eca35af65d" + "gitHead": "29d49d72f95aa101729965710375104240a2c038" } diff --git a/packages/plugins/plugin-cert/CHANGELOG.md b/packages/plugins/plugin-cert/CHANGELOG.md index 7a28b75b8..dcd069737 100644 --- a/packages/plugins/plugin-cert/CHANGELOG.md +++ b/packages/plugins/plugin-cert/CHANGELOG.md @@ -3,6 +3,17 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +### Performance Improvements + +* 支持自动选择校验方式申请证书 ([3f99432](https://github.com/certd/certd/commit/3f9943270cfb12946e38e6272bc5e8d95ad6ab9e)) +* OpenAPI支持autoApply参数 ([42f4d14](https://github.com/certd/certd/commit/42f4d1477dc791520a874aed56035abcbc8c433b)) + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/plugin-cert + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) ### Performance Improvements diff --git a/packages/plugins/plugin-cert/package.json b/packages/plugins/plugin-cert/package.json index cfe251ac4..61db0472f 100644 --- a/packages/plugins/plugin-cert/package.json +++ b/packages/plugins/plugin-cert/package.json @@ -1,7 +1,7 @@ { "name": "@certd/plugin-cert", "private": false, - "version": "1.36.4", + "version": "1.36.6", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -16,10 +16,10 @@ "pub": "npm publish" }, "dependencies": { - "@certd/acme-client": "^1.36.4", - "@certd/basic": "^1.36.4", - "@certd/pipeline": "^1.36.4", - "@certd/plugin-lib": "^1.36.4", + "@certd/acme-client": "^1.36.6", + "@certd/basic": "^1.36.6", + "@certd/pipeline": "^1.36.6", + "@certd/plugin-lib": "^1.36.6", "@google-cloud/publicca": "^1.3.0", "dayjs": "^1.11.7", "jszip": "^3.10.1", @@ -43,5 +43,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "0ff700849ff6427f79cce241f92257eca35af65d" + "gitHead": "29d49d72f95aa101729965710375104240a2c038" } diff --git a/packages/plugins/plugin-cert/src/dns-provider/api.ts b/packages/plugins/plugin-cert/src/dns-provider/api.ts index 523159fe5..0fd36b771 100644 --- a/packages/plugins/plugin-cert/src/dns-provider/api.ts +++ b/packages/plugins/plugin-cert/src/dns-provider/api.ts @@ -59,3 +59,38 @@ export interface ISubDomainsGetter { export interface IDomainParser { parse(fullDomain: string): Promise; } + +export type DnsVerifier = { + // dns直接校验 + dnsProviderType?: string; + dnsProviderAccessId?: number; +}; + +export type CnameVerifier = { + hostRecord: string; + domain: string; + recordValue: string; +}; + +export type HttpVerifier = { + // http校验 + httpUploaderType: string; + httpUploaderAccess: number; + httpUploadRootDir: string; +}; +export type DomainVerifier = { + domain: string; + mainDomain: string; + type: string; + dns?: DnsVerifier; + cname?: CnameVerifier; + http?: HttpVerifier; +}; + +export type DomainVerifiers = { + [key: string]: DomainVerifier; +}; + +export interface IDomainVerifierGetter { + getVerifiers(domains: string[]): Promise; +} diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts index c12a8d084..2d1e4362d 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/acme.ts @@ -23,10 +23,11 @@ export type HttpVerifyPlan = { export type DomainVerifyPlan = { domain: string; + mainDomain: string; type: "cname" | "dns" | "http"; dnsProvider?: IDnsProvider; - cnameVerifyPlan?: Record; - httpVerifyPlan?: Record; + cnameVerifyPlan?: CnameVerifyPlan; + httpVerifyPlan?: HttpVerifyPlan; }; export type DomainsVerifyPlan = { [key: string]: DomainVerifyPlan; @@ -233,23 +234,20 @@ export class AcmeService { let dnsProvider = providers.dnsProvider; let fullRecord = `_acme-challenge.${fullDomain}`; - const origDomain = punycode.toUnicode(domain); + // const origDomain = punycode.toUnicode(domain); const origFullDomain = punycode.toUnicode(fullDomain); if (providers.domainsVerifyPlan) { //按照计划执行 - const domainVerifyPlan = providers.domainsVerifyPlan[origDomain]; + const domainVerifyPlan = providers.domainsVerifyPlan[origFullDomain]; if (domainVerifyPlan) { if (domainVerifyPlan.type === "dns") { dnsProvider = domainVerifyPlan.dnsProvider; } else if (domainVerifyPlan.type === "cname") { - const cnameVerifyPlan = domainVerifyPlan.cnameVerifyPlan; - if (cnameVerifyPlan) { - const cname = cnameVerifyPlan[origFullDomain]; - if (cname) { - dnsProvider = cname.dnsProvider; - domain = await this.options.domainParser.parse(cname.domain); - fullRecord = cname.fullRecord; - } + const cname: CnameVerifyPlan = domainVerifyPlan.cnameVerifyPlan; + if (cname) { + dnsProvider = cname.dnsProvider; + domain = await this.options.domainParser.parse(cname.domain); + fullRecord = cname.fullRecord; } else { this.logger.error(`未找到域名${fullDomain}的CNAME校验计划,请修改证书申请配置`); } @@ -257,13 +255,12 @@ export class AcmeService { throw new Error(`未找到域名${fullDomain}CNAME校验计划的DnsProvider,请修改证书申请配置`); } } else if (domainVerifyPlan.type === "http") { - const httpVerifyPlan = domainVerifyPlan.httpVerifyPlan; - if (httpVerifyPlan) { + const plan: HttpVerifyPlan = domainVerifyPlan.httpVerifyPlan; + if (plan) { const httpChallenge = getChallenge("http-01"); if (httpChallenge == null) { throw new Error("该域名不支持http-01方式校验"); } - const plan = httpVerifyPlan[fullDomain]; return await doHttpVerify(httpChallenge, plan.httpUploader); } else { throw new Error("未找到域名【" + fullDomain + "】的http校验配置"); @@ -272,9 +269,12 @@ export class AcmeService { throw new Error("不支持的校验类型", domainVerifyPlan.type); } } else { - this.logger.info("未找到域名校验计划,使用默认的dnsProvider"); + this.logger.warn(`未找到域名${fullDomain}的校验计划,使用默认的dnsProvider`); } } + if (!dnsProvider) { + throw new Error(`域名${fullDomain}没有匹配到任何校验方式,证书申请失败`); + } const dnsChallenge = getChallenge("dns-01"); return await doDnsVerify(dnsChallenge, fullRecord, dnsProvider); diff --git a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts index 6b6d864a1..6c654cf17 100644 --- a/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts +++ b/packages/plugins/plugin-cert/src/plugin/cert-plugin/index.ts @@ -1,16 +1,16 @@ import { CancelError, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline"; import { utils } from "@certd/basic"; -import type { CertInfo, CnameVerifyPlan, DomainsVerifyPlan, HttpVerifyPlan, PrivateKeyType, SSLProvider } from "./acme.js"; -import { AcmeService } from "./acme.js"; +import { AcmeService, CertInfo, DomainsVerifyPlan, DomainVerifyPlan, PrivateKeyType, SSLProvider } from "./acme.js"; import * as _ from "lodash-es"; -import { createDnsProvider, DnsProviderContext, IDnsProvider, ISubDomainsGetter } from "../../dns-provider/index.js"; +import { createDnsProvider, DnsProviderContext, DnsVerifier, DomainVerifiers, HttpVerifier, IDnsProvider, IDomainVerifierGetter, ISubDomainsGetter } from "../../dns-provider/index.js"; import { CertReader } from "./cert-reader.js"; import { CertApplyBasePlugin } from "./base.js"; import { GoogleClient } from "../../libs/google.js"; import { EabAccess } from "../../access"; import { DomainParser } from "../../dns-provider/domain-parser.js"; import { ossClientFactory } from "@certd/plugin-lib"; + export * from "./base.js"; export type { CertInfo }; export * from "./cert-reader.js"; @@ -66,13 +66,15 @@ export class CertApplyPlugin extends CertApplyBasePlugin { { value: "cname", label: "CNAME代理验证" }, { value: "http", label: "HTTP文件验证" }, { value: "dnses", label: "多DNS提供商" }, + { value: "auto", label: "自动匹配" }, ], }, required: true, helper: `1. DNS直接验证:域名dns解析是在阿里云/腾讯云/华为云/CF/NameSilo/西数/火山/dns.la/京东云/51dns的,选它 -2. CNAME代理验证:支持任何注册商的域名,第一次需要手动添加CNAME记录(建议将DNS服务器修改为阿里云/腾讯云的,然后使用DNS直接验证) +2. CNAME代理验证:支持任何注册商的域名,第一次需要手动添加[CNAME记录](#/certd/cname/record)(建议将DNS服务器修改为阿里云/腾讯云的,然后使用DNS直接验证) 3. HTTP文件验证:不支持泛域名,需要配置网站文件上传 4. 多DNS提供商:每个域名可以选择独立的DNS提供商 +5. 自动匹配:需要在[域名管理](#/certd/cert/domain)中事先配置好校验方式 `, }) challengeType!: string; @@ -333,6 +335,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin { acme!: AcmeService; eab!: EabAccess; + async onInit() { let eab: EabAccess = null; @@ -408,7 +411,9 @@ export class CertApplyPlugin extends CertApplyBasePlugin { let dnsProvider: IDnsProvider = null; let domainsVerifyPlan: DomainsVerifyPlan = null; if (this.challengeType === "cname" || this.challengeType === "http" || this.challengeType === "dnses") { - domainsVerifyPlan = await this.createDomainsVerifyPlan(); + domainsVerifyPlan = await this.createDomainsVerifyPlan(domains, this.domainsVerifyPlan); + } else if (this.challengeType === "auto") { + domainsVerifyPlan = await this.createDomainsVerifyPlanByAuto(domains); } else { const dnsProviderType = this.dnsProviderType; const access = await this.getAccess(this.dnsProviderAccess); @@ -444,73 +449,132 @@ export class CertApplyPlugin extends CertApplyBasePlugin { async createDnsProvider(dnsProviderType: string, dnsProviderAccess: any): Promise { const domainParser = this.acme.options.domainParser; - const context: DnsProviderContext = { access: dnsProviderAccess, logger: this.logger, http: this.ctx.http, utils, domainParser }; + const context: DnsProviderContext = { + access: dnsProviderAccess, + logger: this.logger, + http: this.ctx.http, + utils, + domainParser, + }; return await createDnsProvider({ dnsProviderType, context, }); } - async createDomainsVerifyPlan(): Promise { + async createDomainsVerifyPlan(domains: string[], verifyPlanSetting: DomainsVerifyPlanInput): Promise { const plan: DomainsVerifyPlan = {}; - for (const domain in this.domainsVerifyPlan) { - const domainVerifyPlan = this.domainsVerifyPlan[domain]; - let dnsProvider = null; - const cnameVerifyPlan: Record = {}; - const httpVerifyPlan: Record = {}; - if (domainVerifyPlan.type === "dns") { - const access = await this.getAccess(domainVerifyPlan.dnsProviderAccessId); - dnsProvider = await this.createDnsProvider(domainVerifyPlan.dnsProviderType, access); - } else if (domainVerifyPlan.type === "cname") { - for (const key in domainVerifyPlan.cnameVerifyPlan) { - const cnameRecord = await this.ctx.cnameProxyService.getByDomain(key); - let dnsProvider = cnameRecord.commonDnsProvider; - if (cnameRecord.cnameProvider.id > 0) { - dnsProvider = await this.createDnsProvider(cnameRecord.cnameProvider.dnsProviderType, cnameRecord.cnameProvider.access); - } - cnameVerifyPlan[key] = { - type: "cname", - domain: cnameRecord.cnameProvider.domain, - fullRecord: cnameRecord.recordValue, - dnsProvider, - }; - } - } else if (domainVerifyPlan.type === "http") { - const httpUploaderContext = { - accessService: this.ctx.accessService, - logger: this.logger, - utils, - }; - for (const key in domainVerifyPlan.httpVerifyPlan) { - const httpRecord = domainVerifyPlan.httpVerifyPlan[key]; - const access = await this.getAccess(httpRecord.httpUploaderAccess); - let rootDir = httpRecord.httpUploadRootDir; - if (!rootDir.endsWith("/") && !rootDir.endsWith("\\")) { - rootDir = rootDir + "/"; - } - this.logger.info("上传方式", httpRecord.httpUploaderType); - const httpUploader = await ossClientFactory.createOssClientByType(httpRecord.httpUploaderType, { - access, - rootDir: rootDir, - ctx: httpUploaderContext, - }); - httpVerifyPlan[key] = { - type: "http", - domain: key, - httpUploader, - }; - } + + const domainParser = this.acme.options.domainParser; + for (const fullDomain of domains) { + const domain = fullDomain.replaceAll("*.", ""); + const mainDomain = await domainParser.parse(domain); + const planSetting: DomainVerifyPlanInput = verifyPlanSetting[mainDomain]; + if (planSetting == null) { + throw new Error(`没有找到域名(${domain})的校验计划`); + } + if (planSetting.type === "dns") { + plan[domain] = await this.createDnsDomainVerifyPlan(planSetting, domain, mainDomain); + } else if (planSetting.type === "cname") { + plan[domain] = await this.createCnameDomainVerifyPlan(domain, mainDomain); + } else if (planSetting.type === "http") { + plan[domain] = await this.createHttpDomainVerifyPlan(planSetting.httpVerifyPlan[domain], domain, mainDomain); } - plan[domain] = { - domain, - type: domainVerifyPlan.type, - dnsProvider, - cnameVerifyPlan, - httpVerifyPlan, - }; } return plan; } + + private async createDomainsVerifyPlanByAuto(domains: string[]) { + //从数据库里面自动选择校验方式 + // domain list + const domainList = new Set(); + //整理域名 + for (let domain of domains) { + domain = domain.replaceAll("*.", ""); + domainList.add(domain); + } + const domainVerifierGetter: IDomainVerifierGetter = await this.ctx.serviceGetter.get("domainVerifierGetter"); + + const verifiers: DomainVerifiers = await domainVerifierGetter.getVerifiers([...domainList]); + + const plan: DomainsVerifyPlan = {}; + + for (const domain in verifiers) { + const verifier = verifiers[domain]; + if (verifier == null) { + throw new Error(`没有找到与该域名(${domain})匹配的校验方式,请先到‘域名管理’页面添加校验方式`); + } + if (verifier.type === "dns") { + plan[domain] = await this.createDnsDomainVerifyPlan(verifier.dns, domain, verifier.mainDomain); + } else if (verifier.type === "cname") { + plan[domain] = await this.createCnameDomainVerifyPlan(domain, verifier.mainDomain); + } else if (verifier.type === "http") { + plan[domain] = await this.createHttpDomainVerifyPlan(verifier.http, domain, verifier.mainDomain); + } + } + return plan; + } + + private async createDnsDomainVerifyPlan(planSetting: DnsVerifier, domain: string, mainDomain: string): Promise { + const access = await this.getAccess(planSetting.dnsProviderAccessId); + return { + type: "dns", + mainDomain, + domain, + dnsProvider: await this.createDnsProvider(planSetting.dnsProviderType, access), + }; + } + + private async createHttpDomainVerifyPlan(httpSetting: HttpVerifier, domain: string, mainDomain: string): Promise { + const httpUploaderContext = { + accessService: this.ctx.accessService, + logger: this.logger, + utils, + }; + + const access = await this.getAccess(httpSetting.httpUploaderAccess); + let rootDir = httpSetting.httpUploadRootDir; + if (!rootDir.endsWith("/") && !rootDir.endsWith("\\")) { + rootDir = rootDir + "/"; + } + this.logger.info("上传方式", httpSetting.httpUploaderType); + const httpUploader = await ossClientFactory.createOssClientByType(httpSetting.httpUploaderType, { + access, + rootDir: rootDir, + ctx: httpUploaderContext, + }); + return { + type: "http", + domain, + mainDomain, + httpVerifyPlan: { + type: "http", + domain, + httpUploader, + }, + }; + } + + private async createCnameDomainVerifyPlan(domain: string, mainDomain: string): Promise { + const cnameRecord = await this.ctx.cnameProxyService.getByDomain(domain); + if (cnameRecord == null) { + throw new Error(`请先配置${domain}的CNAME记录,并通过校验`); + } + let dnsProvider = cnameRecord.commonDnsProvider; + if (cnameRecord.cnameProvider.id > 0) { + dnsProvider = await this.createDnsProvider(cnameRecord.cnameProvider.dnsProviderType, cnameRecord.cnameProvider.access); + } + return { + type: "cname", + domain, + mainDomain, + cnameVerifyPlan: { + domain: cnameRecord.cnameProvider.domain, + fullRecord: cnameRecord.recordValue, + dnsProvider, + }, + }; + } } new CertApplyPlugin(); diff --git a/packages/plugins/plugin-lib/CHANGELOG.md b/packages/plugins/plugin-lib/CHANGELOG.md index 5b3a75685..41b04a223 100644 --- a/packages/plugins/plugin-lib/CHANGELOG.md +++ b/packages/plugins/plugin-lib/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +**Note:** Version bump only for package @certd/plugin-lib + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/plugin-lib + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) ### Bug Fixes diff --git a/packages/plugins/plugin-lib/package.json b/packages/plugins/plugin-lib/package.json index ac8027aca..17d2bbc2c 100644 --- a/packages/plugins/plugin-lib/package.json +++ b/packages/plugins/plugin-lib/package.json @@ -1,7 +1,7 @@ { "name": "@certd/plugin-lib", "private": false, - "version": "1.36.4", + "version": "1.36.6", "type": "module", "main": "./dist/index.js", "types": "./dist/index.d.ts", @@ -21,8 +21,8 @@ "@alicloud/pop-core": "^1.7.10", "@alicloud/tea-util": "^1.4.10", "@aws-sdk/client-s3": "^3.787.0", - "@certd/basic": "^1.36.4", - "@certd/pipeline": "^1.36.4", + "@certd/basic": "^1.36.6", + "@certd/pipeline": "^1.36.6", "@kubernetes/client-node": "0.21.0", "ali-oss": "^6.22.0", "basic-ftp": "^5.0.5", @@ -53,5 +53,5 @@ "tslib": "^2.8.1", "typescript": "^5.4.2" }, - "gitHead": "0ff700849ff6427f79cce241f92257eca35af65d" + "gitHead": "29d49d72f95aa101729965710375104240a2c038" } diff --git a/packages/plugins/plugin-lib/src/ssh/ssh.ts b/packages/plugins/plugin-lib/src/ssh/ssh.ts index ccd12cafd..b7d203a6f 100644 --- a/packages/plugins/plugin-lib/src/ssh/ssh.ts +++ b/packages/plugins/plugin-lib/src/ssh/ssh.ts @@ -491,7 +491,7 @@ export class SshClient { * Set-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\cmd.exe" * @param options */ - async exec(options: { connectConf: SshAccess; script: string | Array; env?: any; throwOnStdErr?: boolean }): Promise { + async exec(options: { connectConf: SshAccess; script: string | Array; env?: any; throwOnStdErr?: boolean; stopOnError?: boolean }): Promise { let { script } = options; const { connectConf, throwOnStdErr } = options; @@ -506,6 +506,10 @@ export class SshClient { isWinCmd = await this.isCmd(conn); } + if (isLinux && options.stopOnError !== false) { + script = "set -e\n" + script; + } + if (options.env) { for (const key in options.env) { if (isLinux) { @@ -538,6 +542,7 @@ export class SshClient { script = envScripts.join(newLine) + newLine + script; } } + return await conn.exec(script as string, { throwOnStdErr }); }, }); diff --git a/packages/ui/certd-client/CHANGELOG.md b/packages/ui/certd-client/CHANGELOG.md index 366f1e2d8..279e38122 100644 --- a/packages/ui/certd-client/CHANGELOG.md +++ b/packages/ui/certd-client/CHANGELOG.md @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14) + +### Bug Fixes + +* 修复某些页面翻译不全显示错误的bug ([0b3158f](https://github.com/certd/certd/commit/0b3158fdd5fe5bb0a98c4e65715dbc3de2c38047)) +* 修复运行流水线后会闪烁一下的bug ([dfc9362](https://github.com/certd/certd/commit/dfc9362084082ee535b898f23b2609c1d946a6fd)) + +### Performance Improvements + +* 通知和定时器的删除按钮显示为红色更显眼 ([61ba83c](https://github.com/certd/certd/commit/61ba83c77546c3d505d081e19a3d68c127662bf1)) +* 优化流水线列表页面、详情页面性能,精简返回数据 ([609ac9c](https://github.com/certd/certd/commit/609ac9c9a2dde605eb09834ae59693c1cb238765)) +* OpenAPI支持autoApply参数 ([42f4d14](https://github.com/certd/certd/commit/42f4d1477dc791520a874aed56035abcbc8c433b)) + +## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11) + +**Note:** Version bump only for package @certd/ui-client + ## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10) ### Bug Fixes diff --git a/packages/ui/certd-client/package.json b/packages/ui/certd-client/package.json index 9bc4569d2..71ea49d6e 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.36.4", + "version": "1.36.6", "private": true, "scripts": { "dev": "vite --open", @@ -103,8 +103,8 @@ "zod-defaults": "^0.1.3" }, "devDependencies": { - "@certd/lib-iframe": "^1.36.4", - "@certd/pipeline": "^1.36.4", + "@certd/lib-iframe": "^1.36.6", + "@certd/pipeline": "^1.36.6", "@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/components/plugins/cert/domains-verify-plan-editor/http-verify-plan.vue b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/http-verify-plan.vue index f0c0bebd9..16c664973 100644 --- a/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/http-verify-plan.vue +++ b/packages/ui/certd-client/src/components/plugins/cert/domains-verify-plan-editor/http-verify-plan.vue @@ -33,6 +33,7 @@ import { Ref, ref, watch, nextTick } from "vue"; import { HttpRecord } from "/@/components/plugins/cert/domains-verify-plan-editor/type"; import { dict } from "@fast-crud/fast-crud"; +import { Dicts } from "/@/components/plugins/lib/dicts"; defineOptions({ name: "HttpVerifyPlan", @@ -68,17 +69,7 @@ async function onRecordChange() { emit("change", records.value); } -const uploaderTypeDict = dict({ - data: [ - { label: "SFTP", value: "sftp" }, - { label: "FTP", value: "ftp" }, - { label: "阿里云OSS", value: "alioss" }, - { label: "腾讯云COS", value: "tencentcos" }, - { label: "七牛OSS", value: "qiniuoss" }, - { label: "S3/Minio", value: "s3" }, - { label: "SSH(已废弃,请选择SFTP方式)", value: "ssh", disabled: true }, - ], -}); +const uploaderTypeDict = Dicts.uploaderTypeDict; diff --git a/packages/ui/certd-client/src/views/certd/cname/record/crud.tsx b/packages/ui/certd-client/src/views/certd/cname/record/crud.tsx index 769da2de5..ddad615df 100644 --- a/packages/ui/certd-client/src/views/certd/cname/record/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/cname/record/crud.tsx @@ -1,5 +1,5 @@ import * as api from "./api"; -import { useI18n } from "vue-i18n"; +import { useI18n } from "/src/locales"; import { Ref, ref } from "vue"; import { useRouter } from "vue-router"; import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud"; diff --git a/packages/ui/certd-client/src/views/certd/cname/record/index.vue b/packages/ui/certd-client/src/views/certd/cname/record/index.vue index 52eadb50b..4ed382d3f 100644 --- a/packages/ui/certd-client/src/views/certd/cname/record/index.vue +++ b/packages/ui/certd-client/src/views/certd/cname/record/index.vue @@ -26,7 +26,7 @@ import { useFs } from "@fast-crud/fast-crud"; import createCrudOptions from "./crud"; import { message, Modal } from "ant-design-vue"; import { DeleteBatch } from "./api"; -import { useI18n } from "vue-i18n"; +import { useI18n } from "/src/locales"; const { t } = useI18n(); diff --git a/packages/ui/certd-client/src/views/certd/history/crud.tsx b/packages/ui/certd-client/src/views/certd/history/crud.tsx index c745721c4..2c2b2a669 100644 --- a/packages/ui/certd-client/src/views/certd/history/crud.tsx +++ b/packages/ui/certd-client/src/views/certd/history/crud.tsx @@ -1,5 +1,5 @@ import * as api from "./api"; -import { useI18n } from "vue-i18n"; +import { useI18n } from "/src/locales"; import { computed, Ref, ref } from "vue"; import { useRouter } from "vue-router"; import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, utils } from "@fast-crud/fast-crud"; diff --git a/packages/ui/certd-client/src/views/certd/history/index.vue b/packages/ui/certd-client/src/views/certd/history/index.vue index 17bfb9bcc..dea2c720d 100644 --- a/packages/ui/certd-client/src/views/certd/history/index.vue +++ b/packages/ui/certd-client/src/views/certd/history/index.vue @@ -19,7 +19,7 @@ import { useFs } from "@fast-crud/fast-crud"; import createCrudOptions from "./crud"; import { message, Modal } from "ant-design-vue"; import { DeleteBatch } from "./api"; -import { useI18n } from "vue-i18n"; +import { useI18n } from "/src/locales"; const { t } = useI18n(); 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 1fc265e2a..b6615fbef 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 @@ -6,7 +6,7 @@