Merge branch 'v2-dev' into v2

pull/409/head
xiaojunnuo 2025-05-26 00:00:32 +08:00
commit c65e8622b8
64 changed files with 869 additions and 185 deletions

View File

@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
### Bug Fixes
* 修复公共插件配置修改不生效的bug优化系统设置参数注入时机 ([e1e510c](https://github.com/certd/certd/commit/e1e510ce1e37a5ae82478226b6987a83f22d1ecb))
* 修复又拍云 CDN 设置证书参数和强制 HTTPS 配置报错的bug ([7984b62](https://github.com/certd/certd/commit/7984b625ba6727132f205db8e25f790bce27b2f7))
* 修复lego模式下每次都重新申请证书的bug ([f807b8c](https://github.com/certd/certd/commit/f807b8cb465cc329fa034ecbef94e18ef394f870))
* 优化 RunnableError错误信息展示 ([36bc3ff](https://github.com/certd/certd/commit/36bc3ff22da93ba342c3c1103d7ee2bbcecf44f2))
* **cert:** 修正证书过期时间计算逻辑 ([a3086e6](https://github.com/certd/certd/commit/a3086e6a5bec8b07f5e1d21a2ca8bd969c75bd5c))
### Performance Improvements
* 二次认证页面中,添加动态验证码输入框的焦点控制,提升用户体验 ([bb22f06](https://github.com/certd/certd/commit/bb22f062ed4ab4b5b71938270fe4cc666af6b8e7))
* 添加阿里云 ESA证书部署插件 ([1db1ffd](https://github.com/certd/certd/commit/1db1ffde99ac7e4684fa606ebc4c327f829b3a26))
* 站点证书监控增加通知设置 ([3422a1a](https://github.com/certd/certd/commit/3422a1a59fd0d2c0f17fa9c7e8988ac527ecfdd9))
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements ### Performance Improvements

View File

@ -1 +1 @@
01:40 23:45

View File

@ -16,7 +16,7 @@ services:
- "7001:7001" - "7001:7001"
# ↓↓↓↓ ---------------------------------------------------------- https端口可以根据实际情况是否暴露该端口 # ↓↓↓↓ ---------------------------------------------------------- https端口可以根据实际情况是否暴露该端口
- "7002:7002" - "7002:7002"
#↓↓↓↓ -------------------------------------------------------------- 如果出现getaddrinfo ENOTFOUND错误可以尝试设置dns #↓↓↓↓ -------------------------------------------------------------- 如果出现getaddrinfo EAI_AGAIN 或 getaddrinfo ENOTFOUND 错误可以尝试设置dns
# dns: # dns:
# - 223.5.5.5 # 阿里云公共dns # - 223.5.5.5 # 阿里云公共dns
# - 223.6.6.6 # - 223.6.6.6

View File

@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
### Bug Fixes
* 修复公共插件配置修改不生效的bug优化系统设置参数注入时机 ([e1e510c](https://github.com/certd/certd/commit/e1e510ce1e37a5ae82478226b6987a83f22d1ecb))
* 修复又拍云 CDN 设置证书参数和强制 HTTPS 配置报错的bug ([7984b62](https://github.com/certd/certd/commit/7984b625ba6727132f205db8e25f790bce27b2f7))
* 修复lego模式下每次都重新申请证书的bug ([f807b8c](https://github.com/certd/certd/commit/f807b8cb465cc329fa034ecbef94e18ef394f870))
* 优化 RunnableError错误信息展示 ([36bc3ff](https://github.com/certd/certd/commit/36bc3ff22da93ba342c3c1103d7ee2bbcecf44f2))
* **cert:** 修正证书过期时间计算逻辑 ([a3086e6](https://github.com/certd/certd/commit/a3086e6a5bec8b07f5e1d21a2ca8bd969c75bd5c))
### Performance Improvements
* 二次认证页面中,添加动态验证码输入框的焦点控制,提升用户体验 ([bb22f06](https://github.com/certd/certd/commit/bb22f062ed4ab4b5b71938270fe4cc666af6b8e7))
* 添加阿里云 ESA证书部署插件 ([1db1ffd](https://github.com/certd/certd/commit/1db1ffde99ac7e4684fa606ebc4c327f829b3a26))
* 站点证书监控增加通知设置 ([3422a1a](https://github.com/certd/certd/commit/3422a1a59fd0d2c0f17fa9c7e8988ac527ecfdd9))
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements ### Performance Improvements

View File

@ -1,12 +1,12 @@
# 常见报错解决 # 常见报错解决
## 1. getaddrinfo ENOTFOUND错误 ## 1. getaddrinfo ENOTFOUND错误
如果出现`getaddrinfo ENOTFOUND`错误,可以尝试在`docker-compose.yaml`中设置dns 如果出现`getaddrinfo ENOTFOUND`/`getaddrinfo EAI_AGAIN`错误,可以尝试在`docker-compose.yaml`中设置dns
```yaml ```yaml
version: '3.3' # 兼容旧版docker-compose version: '3.3' # 兼容旧版docker-compose
services: services:
certd: certd:
#↓↓↓↓ ------------ # 如果出现getaddrinfo ENOTFOUND错误可以尝试设置dns #↓↓↓↓ ------------ # 如果出现getaddrinfo ENOTFOUND 或 EAI_AGAIN错误可以尝试设置dns
dns: dns:
- 223.5.5.5 # 阿里云公共dns - 223.5.5.5 # 阿里云公共dns
- 223.6.6.6 - 223.6.6.6

View File

@ -9,5 +9,5 @@
} }
}, },
"npmClient": "pnpm", "npmClient": "pnpm",
"version": "1.34.5" "version": "1.34.6"
} }

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/publishlab/node-acme-client/compare/v1.34.5...v1.34.6) (2025-05-25)
**Note:** Version bump only for package @certd/acme-client
## [1.34.5](https://github.com/publishlab/node-acme-client/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/publishlab/node-acme-client/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/acme-client **Note:** Version bump only for package @certd/acme-client

View File

@ -3,7 +3,7 @@
"description": "Simple and unopinionated ACME client", "description": "Simple and unopinionated ACME client",
"private": false, "private": false,
"author": "nmorsman", "author": "nmorsman",
"version": "1.34.5", "version": "1.34.6",
"type": "module", "type": "module",
"module": "scr/index.js", "module": "scr/index.js",
"main": "src/index.js", "main": "src/index.js",
@ -18,7 +18,7 @@
"types" "types"
], ],
"dependencies": { "dependencies": {
"@certd/basic": "^1.34.5", "@certd/basic": "^1.34.6",
"@peculiar/x509": "^1.11.0", "@peculiar/x509": "^1.11.0",
"asn1js": "^3.0.5", "asn1js": "^3.0.5",
"axios": "^1.7.2", "axios": "^1.7.2",
@ -69,5 +69,5 @@
"bugs": { "bugs": {
"url": "https://github.com/publishlab/node-acme-client/issues" "url": "https://github.com/publishlab/node-acme-client/issues"
}, },
"gitHead": "d23792fda2a185e8ba038434460792f738878a42" "gitHead": "8478ce25f11f8e13b9be508cf44d7090f5c8a663"
} }

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
**Note:** Version bump only for package @certd/basic
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements ### Performance Improvements

View File

@ -1 +1 @@
01:35 23:42

View File

@ -1,7 +1,7 @@
{ {
"name": "@certd/basic", "name": "@certd/basic",
"private": false, "private": false,
"version": "1.34.5", "version": "1.34.6",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",
"module": "./dist/index.js", "module": "./dist/index.js",
@ -45,5 +45,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "d23792fda2a185e8ba038434460792f738878a42" "gitHead": "8478ce25f11f8e13b9be508cf44d7090f5c8a663"
} }

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
### Bug Fixes
* 修复公共插件配置修改不生效的bug优化系统设置参数注入时机 ([e1e510c](https://github.com/certd/certd/commit/e1e510ce1e37a5ae82478226b6987a83f22d1ecb))
* 优化 RunnableError错误信息展示 ([36bc3ff](https://github.com/certd/certd/commit/36bc3ff22da93ba342c3c1103d7ee2bbcecf44f2))
### Performance Improvements
* 添加阿里云 ESA证书部署插件 ([1db1ffd](https://github.com/certd/certd/commit/1db1ffde99ac7e4684fa606ebc4c327f829b3a26))
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements ### Performance Improvements

View File

@ -1,7 +1,7 @@
{ {
"name": "@certd/pipeline", "name": "@certd/pipeline",
"private": false, "private": false,
"version": "1.34.5", "version": "1.34.6",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",
"module": "./dist/index.js", "module": "./dist/index.js",
@ -17,8 +17,8 @@
"pub": "npm publish" "pub": "npm publish"
}, },
"dependencies": { "dependencies": {
"@certd/basic": "^1.34.5", "@certd/basic": "^1.34.6",
"@certd/plus-core": "^1.34.5", "@certd/plus-core": "^1.34.6",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"reflect-metadata": "^0.1.13" "reflect-metadata": "^0.1.13"
@ -44,5 +44,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "d23792fda2a185e8ba038434460792f738878a42" "gitHead": "8478ce25f11f8e13b9be508cf44d7090f5c8a663"
} }

View File

@ -295,6 +295,12 @@ export class Executor {
const pluginConfig = await this.options.pluginConfigService.getPluginConfig(pluginName); const pluginConfig = await this.options.pluginConfigService.getPluginConfig(pluginName);
//从outputContext读取输入参数 //从outputContext读取输入参数
const input = cloneDeep(step.input); const input = cloneDeep(step.input);
const sysInput = pluginConfig.sysSetting?.input || {};
//注入系统设置参数
for (const sysInputKey in sysInput) {
input[sysInputKey] = sysInput[sysInputKey];
}
Decorator.inject(define.input, instance, input, (item, key) => { Decorator.inject(define.input, instance, input, (item, key) => {
if (item.component?.name === "output-selector") { if (item.component?.name === "output-selector") {
const contextKey = input[key]; const contextKey = input[key];
@ -314,12 +320,6 @@ export class Executor {
} }
}); });
const sysInput = pluginConfig.sysSetting?.input || {};
//注入系统设置参数
for (const sysInputKey in sysInput) {
input[sysInputKey] = sysInput[sysInputKey];
}
const newInputHash = hashUtils.md5(JSON.stringify(input)); const newInputHash = hashUtils.md5(JSON.stringify(input));
step.status!.inputHash = newInputHash; step.status!.inputHash = newInputHash;
//判断是否需要跳过 //判断是否需要跳过
@ -438,7 +438,7 @@ export class Executor {
const runnableError = error as RunnableError; const runnableError = error as RunnableError;
content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}\n\n`; content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}\n\n`;
for (const re of runnableError.errors) { for (const re of runnableError.errors) {
content += ` - ${re.runnable.title} 执行失败,错误详情:${re.e?.error?.message}\n\n`; content += ` - ${re.runnable.title} 执行失败,错误详情:${re.e?.message || re.e?.error?.message}\n\n`;
} }
} else { } else {
content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}\n\n${this.currentStatusMap?.currentStep?.title} 执行失败\n\n错误详情:${error.message}`; content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}\n\n${this.currentStatusMap?.currentStep?.title} 执行失败\n\n错误详情:${error.message}`;

View File

@ -227,6 +227,14 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
return name + "_" + dayjs().format("YYYYMMDDHHmmssSSS"); return name + "_" + dayjs().format("YYYYMMDDHHmmssSSS");
} }
buildCertName(domain: string) {
if (domain.includes("*")) {
domain = domain.replaceAll("*", "_");
}
return `${domain}_${dayjs().format("YYYYMMDDHHmmssSSS")}`;
}
async onRequest(req: PluginRequestHandleReq<any>) { async onRequest(req: PluginRequestHandleReq<any>) {
if (!req.action) { if (!req.action) {
throw new Error("action is required"); throw new Error("action is required");

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
**Note:** Version bump only for package @certd/lib-huawei
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/lib-huawei **Note:** Version bump only for package @certd/lib-huawei

View File

@ -1,7 +1,7 @@
{ {
"name": "@certd/lib-huawei", "name": "@certd/lib-huawei",
"private": false, "private": false,
"version": "1.34.5", "version": "1.34.6",
"main": "./dist/bundle.js", "main": "./dist/bundle.js",
"module": "./dist/bundle.js", "module": "./dist/bundle.js",
"types": "./dist/d/index.d.ts", "types": "./dist/d/index.d.ts",
@ -24,5 +24,5 @@
"prettier": "^2.8.8", "prettier": "^2.8.8",
"tslib": "^2.8.1" "tslib": "^2.8.1"
}, },
"gitHead": "d23792fda2a185e8ba038434460792f738878a42" "gitHead": "8478ce25f11f8e13b9be508cf44d7090f5c8a663"
} }

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
**Note:** Version bump only for package @certd/lib-iframe
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/lib-iframe **Note:** Version bump only for package @certd/lib-iframe

View File

@ -1,7 +1,7 @@
{ {
"name": "@certd/lib-iframe", "name": "@certd/lib-iframe",
"private": false, "private": false,
"version": "1.34.5", "version": "1.34.6",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",
"module": "./dist/index.js", "module": "./dist/index.js",
@ -31,5 +31,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "d23792fda2a185e8ba038434460792f738878a42" "gitHead": "8478ce25f11f8e13b9be508cf44d7090f5c8a663"
} }

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
**Note:** Version bump only for package @certd/jdcloud
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/jdcloud **Note:** Version bump only for package @certd/jdcloud

View File

@ -1,6 +1,6 @@
{ {
"name": "@certd/jdcloud", "name": "@certd/jdcloud",
"version": "1.34.5", "version": "1.34.6",
"description": "jdcloud openApi sdk", "description": "jdcloud openApi sdk",
"main": "./dist/bundle.js", "main": "./dist/bundle.js",
"module": "./dist/bundle.js", "module": "./dist/bundle.js",
@ -61,5 +61,5 @@
"fetch" "fetch"
] ]
}, },
"gitHead": "d23792fda2a185e8ba038434460792f738878a42" "gitHead": "8478ce25f11f8e13b9be508cf44d7090f5c8a663"
} }

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
**Note:** Version bump only for package @certd/lib-k8s
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/lib-k8s **Note:** Version bump only for package @certd/lib-k8s

View File

@ -1,7 +1,7 @@
{ {
"name": "@certd/lib-k8s", "name": "@certd/lib-k8s",
"private": false, "private": false,
"version": "1.34.5", "version": "1.34.6",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",
"module": "./dist/index.js", "module": "./dist/index.js",
@ -17,7 +17,7 @@
"pub": "npm publish" "pub": "npm publish"
}, },
"dependencies": { "dependencies": {
"@certd/basic": "^1.34.5", "@certd/basic": "^1.34.6",
"@kubernetes/client-node": "0.21.0" "@kubernetes/client-node": "0.21.0"
}, },
"devDependencies": { "devDependencies": {
@ -32,5 +32,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "d23792fda2a185e8ba038434460792f738878a42" "gitHead": "8478ce25f11f8e13b9be508cf44d7090f5c8a663"
} }

View File

@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
### Performance Improvements
* 站点证书监控增加通知设置 ([3422a1a](https://github.com/certd/certd/commit/3422a1a59fd0d2c0f17fa9c7e8988ac527ecfdd9))
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/lib-server **Note:** Version bump only for package @certd/lib-server

View File

@ -1,6 +1,6 @@
{ {
"name": "@certd/lib-server", "name": "@certd/lib-server",
"version": "1.34.5", "version": "1.34.6",
"description": "midway with flyway, sql upgrade way ", "description": "midway with flyway, sql upgrade way ",
"private": false, "private": false,
"type": "module", "type": "module",
@ -27,10 +27,10 @@
], ],
"license": "AGPL", "license": "AGPL",
"dependencies": { "dependencies": {
"@certd/acme-client": "^1.34.5", "@certd/acme-client": "^1.34.6",
"@certd/basic": "^1.34.5", "@certd/basic": "^1.34.6",
"@certd/pipeline": "^1.34.5", "@certd/pipeline": "^1.34.6",
"@certd/plus-core": "^1.34.5", "@certd/plus-core": "^1.34.6",
"@midwayjs/cache": "~3.14.0", "@midwayjs/cache": "~3.14.0",
"@midwayjs/core": "~3.20.3", "@midwayjs/core": "~3.20.3",
"@midwayjs/i18n": "~3.20.3", "@midwayjs/i18n": "~3.20.3",
@ -61,5 +61,5 @@
"typeorm": "^0.3.11", "typeorm": "^0.3.11",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "d23792fda2a185e8ba038434460792f738878a42" "gitHead": "8478ce25f11f8e13b9be508cf44d7090f5c8a663"
} }

View File

@ -204,3 +204,5 @@ export class SysSafeSetting extends BaseSettings {
autoHiddenTimes: 5, autoHiddenTimes: 5,
}; };
} }

View File

@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/midway-flyway-js **Note:** Version bump only for package @certd/midway-flyway-js

View File

@ -1,6 +1,6 @@
{ {
"name": "@certd/midway-flyway-js", "name": "@certd/midway-flyway-js",
"version": "1.34.5", "version": "1.34.6",
"description": "midway with flyway, sql upgrade way ", "description": "midway with flyway, sql upgrade way ",
"private": false, "private": false,
"type": "module", "type": "module",
@ -46,5 +46,5 @@
"typeorm": "^0.3.11", "typeorm": "^0.3.11",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "d23792fda2a185e8ba038434460792f738878a42" "gitHead": "8478ce25f11f8e13b9be508cf44d7090f5c8a663"
} }

View File

@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
### Bug Fixes
* 修复公共插件配置修改不生效的bug优化系统设置参数注入时机 ([e1e510c](https://github.com/certd/certd/commit/e1e510ce1e37a5ae82478226b6987a83f22d1ecb))
* 修复lego模式下每次都重新申请证书的bug ([f807b8c](https://github.com/certd/certd/commit/f807b8cb465cc329fa034ecbef94e18ef394f870))
* **cert:** 修正证书过期时间计算逻辑 ([a3086e6](https://github.com/certd/certd/commit/a3086e6a5bec8b07f5e1d21a2ca8bd969c75bd5c))
### Performance Improvements
* 添加阿里云 ESA证书部署插件 ([1db1ffd](https://github.com/certd/certd/commit/1db1ffde99ac7e4684fa606ebc4c327f829b3a26))
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
**Note:** Version bump only for package @certd/plugin-cert **Note:** Version bump only for package @certd/plugin-cert

View File

@ -1,7 +1,7 @@
{ {
"name": "@certd/plugin-cert", "name": "@certd/plugin-cert",
"private": false, "private": false,
"version": "1.34.5", "version": "1.34.6",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
@ -16,10 +16,10 @@
"pub": "npm publish" "pub": "npm publish"
}, },
"dependencies": { "dependencies": {
"@certd/acme-client": "^1.34.5", "@certd/acme-client": "^1.34.6",
"@certd/basic": "^1.34.5", "@certd/basic": "^1.34.6",
"@certd/pipeline": "^1.34.5", "@certd/pipeline": "^1.34.6",
"@certd/plugin-lib": "^1.34.5", "@certd/plugin-lib": "^1.34.6",
"@google-cloud/publicca": "^1.3.0", "@google-cloud/publicca": "^1.3.0",
"dayjs": "^1.11.7", "dayjs": "^1.11.7",
"jszip": "^3.10.1", "jszip": "^3.10.1",
@ -43,5 +43,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "d23792fda2a185e8ba038434460792f738878a42" "gitHead": "8478ce25f11f8e13b9be508cf44d7090f5c8a663"
} }

View File

@ -81,6 +81,10 @@ export abstract class CertApplyBasePlugin extends CertApplyBaseConvertPlugin {
} }
} }
getCheckChangeInputKeys() {
//插件哪些字段参与校验是否需要更新
return ["domains", "sslProvider", "privateKeyType", "dnsProviderType", "pfxPassword"];
}
/** /**
* *
*/ */
@ -91,7 +95,7 @@ export abstract class CertApplyBasePlugin extends CertApplyBaseConvertPlugin {
// return null; // return null;
// } // }
const checkInputChanges = ["domains", "sslProvider", "privateKeyType", "dnsProviderType", "pfxPassword"]; const checkInputChanges = this.getCheckChangeInputKeys();
const oldInput = JSON.stringify(pick(this.lastStatus?.input, checkInputChanges)); const oldInput = JSON.stringify(pick(this.lastStatus?.input, checkInputChanges));
const thisInput = JSON.stringify(pick(this, checkInputChanges)); const thisInput = JSON.stringify(pick(this, checkInputChanges));
const inputChanged = oldInput !== thisInput; const inputChanged = oldInput !== thisInput;
@ -145,7 +149,8 @@ export abstract class CertApplyBasePlugin extends CertApplyBaseConvertPlugin {
throw new Error("过期时间不能为空"); throw new Error("过期时间不能为空");
} }
// 检查有效期 // 检查有效期
const leftDays = dayjs(expires).diff(dayjs(), "day"); const leftDays = Math.floor((expires - dayjs().valueOf()) / (1000 * 60 * 60 * 24));
this.logger.info(`证书剩余天数:${leftDays}`);
return { return {
isWillExpire: leftDays <= maxDays, isWillExpire: leftDays <= maxDays,
leftDays, leftDays,

View File

@ -93,6 +93,16 @@ export class CertReader {
return domains; return domains;
} }
static getMainDomain(crt: string) {
const { detail } = CertReader.readCertDetail(crt);
return detail.domains.commonName;
}
getMainDomain() {
const { detail } = this.getCrtDetail();
return detail.domains.commonName;
}
saveToFile(type: "crt" | "key" | "pfx" | "der" | "oc" | "one" | "ic" | "jks", filepath?: string) { saveToFile(type: "crt" | "key" | "pfx" | "der" | "oc" | "one" | "ic" | "jks", filepath?: string) {
if (!this.cert[type]) { if (!this.cert[type]) {
return; return;

View File

@ -320,7 +320,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
this.logger.info("当前正在使用 google EAB授权"); this.logger.info("当前正在使用 google EAB授权");
eab = await this.getAccess(this.eabAccessId); eab = await this.getAccess(this.eabAccessId);
} else if (this.googleCommonEabAccessId) { } else if (this.googleCommonEabAccessId) {
this.logger.info("当前正在使用 google公共EAB授权"); this.logger.info("当前正在使用 google 公共EAB授权");
eab = await this.getAccess(this.googleCommonEabAccessId, true); eab = await this.getAccess(this.googleCommonEabAccessId, true);
} else { } else {
throw new Error("google需要配置EAB授权或服务账号授权"); throw new Error("google需要配置EAB授权或服务账号授权");

View File

@ -112,9 +112,12 @@ export class CertApplyLegoPlugin extends CertApplyBasePlugin {
}) })
privateKeyType!: PrivateKeyType; privateKeyType!: PrivateKeyType;
eab?: EabAccess; eab?: EabAccess;
getCheckChangeInputKeys() {
return ["domains", "privateKeyType", "dnsType"];
}
async onInstance() { async onInstance() {
this.accessService = this.ctx.accessService; this.accessService = this.ctx.accessService;
this.logger = this.ctx.logger; this.logger = this.ctx.logger;

View File

@ -0,0 +1,27 @@
import { expect } from "chai";
import { CertApplyPlugin } from "../dist/index.js";
import dayjs from "dayjs";
import { logger } from "@certd/basic";
describe("test/cert-plugin.ts", () => {
const certApplyPlugin = new CertApplyPlugin();
certApplyPlugin.logger = logger;
it("should throw error when expires is null or undefined", () => {
expect(() => {
// @ts-ignore
certApplyPlugin.isWillExpire(undefined);
}).throw("过期时间不能为空");
expect(() => {
// @ts-ignore
certApplyPlugin.isWillExpire(null);
}).throw("过期时间不能为空");
});
it("isWillExpire", () => {
const now = dayjs().add(36, "day") - 10000;
const res = certApplyPlugin.isWillExpire(now.valueOf(), 35);
console.log(res);
expect(res.isWillExpire).eq(true);
});
});

View File

@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
### Performance Improvements
* 添加阿里云 ESA证书部署插件 ([1db1ffd](https://github.com/certd/certd/commit/1db1ffde99ac7e4684fa606ebc4c327f829b3a26))
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements ### Performance Improvements

View File

@ -1,7 +1,7 @@
{ {
"name": "@certd/plugin-lib", "name": "@certd/plugin-lib",
"private": false, "private": false,
"version": "1.34.5", "version": "1.34.6",
"type": "module", "type": "module",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
@ -16,10 +16,12 @@
"pub": "npm publish" "pub": "npm publish"
}, },
"dependencies": { "dependencies": {
"@alicloud/openapi-client": "^0.4.14",
"@alicloud/pop-core": "^1.7.10", "@alicloud/pop-core": "^1.7.10",
"@alicloud/tea-util": "^1.4.10",
"@aws-sdk/client-s3": "^3.787.0", "@aws-sdk/client-s3": "^3.787.0",
"@certd/basic": "^1.34.5", "@certd/basic": "^1.34.6",
"@certd/pipeline": "^1.34.5", "@certd/pipeline": "^1.34.6",
"@kubernetes/client-node": "0.21.0", "@kubernetes/client-node": "0.21.0",
"ali-oss": "^6.22.0", "ali-oss": "^6.22.0",
"basic-ftp": "^5.0.5", "basic-ftp": "^5.0.5",
@ -50,5 +52,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "d23792fda2a185e8ba038434460792f738878a42" "gitHead": "8478ce25f11f8e13b9be508cf44d7090f5c8a663"
} }

View File

@ -1,4 +1,88 @@
import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline"; import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline";
import { ILogger } from "@certd/basic";
export type AliyunClientV2Req = {
action: string;
version: string;
protocol?: "HTTPS";
// 接口 HTTP 方法
method?: "GET" | "POST";
authType?: "AK";
style?: "RPC";
// 接口 PATH
pathname?: `/`;
data?: any;
query?: any;
};
export class AliyunClientV2 {
access: AliyunAccess;
logger: ILogger;
endpoint: string;
client: any;
constructor(opts: { access: AliyunAccess; logger: ILogger; endpoint: string }) {
this.access = opts.access;
this.logger = opts.logger;
this.endpoint = opts.endpoint;
}
async getClient() {
if (this.client) {
return this.client;
}
const $OpenApi = await import("@alicloud/openapi-client");
const config = new $OpenApi.Config({
accessKeyId: this.access.accessKeyId,
accessKeySecret: this.access.accessKeySecret,
});
// Endpoint 请参考 https://api.aliyun.com/product/FC
// config.endpoint = `esa.${this.regionId}.aliyuncs.com`;
config.endpoint = this.endpoint;
//@ts-ignore
this.client = new $OpenApi.default.default(config);
return this.client;
}
async doRequest(req: AliyunClientV2Req) {
const client = await this.getClient();
const $OpenApi = await import("@alicloud/openapi-client");
const $Util = await import("@alicloud/tea-util");
const params = new $OpenApi.Params({
// 接口名称
action: req.action,
// 接口版本
version: req.version,
// 接口协议
protocol: "HTTPS",
// 接口 HTTP 方法
method: req.method ?? "POST",
authType: "AK",
style: "RPC",
// 接口 PATH
pathname: `/`,
// 接口请求体内容格式
reqBodyType: "json",
// 接口响应体内容格式
bodyType: "json",
});
const runtime = new $Util.RuntimeOptions({});
const request = new $OpenApi.OpenApiRequest({
body: req.data,
query: req.query,
});
// 复制代码运行请自行打印 API 的返回值
// 返回值实际为 Map 类型,可从 Map 中获得三类数据:响应体 body、响应头 headers、HTTP 返回的状态码 statusCode。
const res = await client.callApi(params, request, runtime);
/**
* res?.body?.
*/
return res?.body;
}
}
@IsAccess({ @IsAccess({
name: "aliyun", name: "aliyun",
@ -27,6 +111,14 @@ export class AliyunAccess extends BaseAccess {
helper: "注意证书申请需要dns解析权限其他阿里云插件需要对应的权限比如证书上传需要证书管理权限嫌麻烦就用主账号的全量权限的accessKey", helper: "注意证书申请需要dns解析权限其他阿里云插件需要对应的权限比如证书上传需要证书管理权限嫌麻烦就用主账号的全量权限的accessKey",
}) })
accessKeySecret = ""; accessKeySecret = "";
getClient(endpoint: string) {
return new AliyunClientV2({
access: this,
logger: this.ctx.logger,
endpoint: endpoint,
});
}
} }
new AliyunAccess(); new AliyunAccess();

View File

@ -3,6 +3,18 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
### Bug Fixes
* 修复又拍云 CDN 设置证书参数和强制 HTTPS 配置报错的bug ([7984b62](https://github.com/certd/certd/commit/7984b625ba6727132f205db8e25f790bce27b2f7))
* **cert:** 修正证书过期时间计算逻辑 ([a3086e6](https://github.com/certd/certd/commit/a3086e6a5bec8b07f5e1d21a2ca8bd969c75bd5c))
### Performance Improvements
* 二次认证页面中,添加动态验证码输入框的焦点控制,提升用户体验 ([bb22f06](https://github.com/certd/certd/commit/bb22f062ed4ab4b5b71938270fe4cc666af6b8e7))
* 站点证书监控增加通知设置 ([3422a1a](https://github.com/certd/certd/commit/3422a1a59fd0d2c0f17fa9c7e8988ac527ecfdd9))
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements ### Performance Improvements

View File

@ -1,6 +1,6 @@
{ {
"name": "@certd/ui-client", "name": "@certd/ui-client",
"version": "1.34.5", "version": "1.34.6",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite --open", "dev": "vite --open",
@ -102,8 +102,8 @@
"zod-defaults": "^0.1.3" "zod-defaults": "^0.1.3"
}, },
"devDependencies": { "devDependencies": {
"@certd/lib-iframe": "^1.34.5", "@certd/lib-iframe": "^1.34.6",
"@certd/pipeline": "^1.34.5", "@certd/pipeline": "^1.34.6",
"@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3", "@rollup/plugin-node-resolve": "^15.2.3",
"@types/chai": "^4.3.12", "@types/chai": "^4.3.12",

View File

@ -21,6 +21,13 @@ const menus = computed(() => [
icon: "fa-solid:book", icon: "fa-solid:book",
text: "账号信息", text: "账号信息",
}, },
{
handler: () => {
router.push("/certd/mine/security");
},
icon: "fluent:shield-keyhole-16-regular",
text: "认证安全设置",
},
]); ]);
const avatar = computed(() => { const avatar = computed(() => {

View File

@ -143,6 +143,17 @@ export const certdResources = [
keepAlive: true, keepAlive: true,
}, },
}, },
{
title: "站点监控设置",
name: "SiteMonitorSetting",
path: "/certd/monitor/setting",
component: "/certd/monitor/site/setting/index.vue",
meta: {
icon: "ion:videocam-outline",
auth: true,
isMenu: true,
},
},
{ {
title: "认证安全设置", title: "认证安全设置",
name: "UserSecurity", name: "UserSecurity",

View File

@ -66,3 +66,9 @@ footer{
display: flex; display: flex;
align-items: center; align-items: center;
} }
.ant-progress.ant-progress-show-info .ant-progress-outer {
margin-inline-end: calc(-3em - 8px);
padding-inline-end: calc(3em + 8px);
}

View File

@ -35,10 +35,15 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
pageRequest, pageRequest,
addRequest, addRequest,
editRequest, editRequest,
delRequest delRequest,
},
table: {
remove: {
confirmMessage: "授权如果已经被使用,可能会导致流水线无法正常运行,请谨慎操作",
},
}, },
rowHandle: { rowHandle: {
width: 200 width: 200,
}, },
columns: { columns: {
id: { id: {
@ -46,24 +51,24 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
key: "id", key: "id",
type: "number", type: "number",
column: { column: {
width: 100 width: 100,
}, },
form: { form: {
show: false show: false,
} },
}, },
name: { name: {
title: "名称", title: "名称",
type: "text", type: "text",
search: { search: {
show: true show: true,
}, },
form: { form: {
rules: [{ required: true, message: "必填项" }] rules: [{ required: true, message: "必填项" }],
}, },
column: { column: {
width: 300 width: 300,
} },
}, },
from: { from: {
title: "级别", title: "级别",
@ -71,29 +76,29 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
dict: dict({ dict: dict({
data: [ data: [
{ label: "系统", value: "sys" }, { label: "系统", value: "sys" },
{ label: "用户", value: "user" } { label: "用户", value: "user" },
] ],
}), }),
search: { search: {
show: false show: false,
}, },
form: { form: {
show: false show: false,
}, },
column: { column: {
width: 100, width: 100,
align: "center", align: "center",
component: { component: {
color: "auto" color: "auto",
}, },
order: 10 order: 10,
}, },
valueBuilder: ({ row, key, value }) => { valueBuilder: ({ row, key, value }) => {
row[key] = row.userId > 0 ? "user" : "sys"; row[key] = row.userId > 0 ? "user" : "sys";
} },
}, },
...commonColumnsDefine ...commonColumnsDefine,
} },
} },
}; };
} }

View File

@ -7,7 +7,7 @@ export const siteInfoApi = {
return await request({ return await request({
url: apiPrefix + "/page", url: apiPrefix + "/page",
method: "post", method: "post",
data: query data: query,
}); });
}, },
@ -15,7 +15,7 @@ export const siteInfoApi = {
return await request({ return await request({
url: apiPrefix + "/add", url: apiPrefix + "/add",
method: "post", method: "post",
data: obj data: obj,
}); });
}, },
@ -23,7 +23,7 @@ export const siteInfoApi = {
return await request({ return await request({
url: apiPrefix + "/update", url: apiPrefix + "/update",
method: "post", method: "post",
data: obj data: obj,
}); });
}, },
@ -31,7 +31,7 @@ export const siteInfoApi = {
return await request({ return await request({
url: apiPrefix + "/delete", url: apiPrefix + "/delete",
method: "post", method: "post",
params: { id } params: { id },
}); });
}, },
@ -39,20 +39,20 @@ export const siteInfoApi = {
return await request({ return await request({
url: apiPrefix + "/info", url: apiPrefix + "/info",
method: "post", method: "post",
params: { id } params: { id },
}); });
}, },
async DoCheck(id: number) { async DoCheck(id: number) {
return await request({ return await request({
url: apiPrefix + "/check", url: apiPrefix + "/check",
method: "post", method: "post",
data: { id } data: { id },
}); });
}, },
async CheckAll() { async CheckAll() {
return await request({ return await request({
url: apiPrefix + "/checkAll", url: apiPrefix + "/checkAll",
method: "post" method: "post",
}); });
} },
}; };

View File

@ -4,7 +4,10 @@
<div class="title flex items-center"> <div class="title flex items-center">
站点证书监控 站点证书监控
<div class="sub flex-1"> <div class="sub flex-1">
<div>每天0点检查网站证书的过期时间到期前10天时将发出提醒使用默认通知渠道;</div> <div>
每天0点检查网站证书的过期时间到期前10天时将发出提醒使用默认通知渠道;
<router-link to="/certd/monitor/setting">站点监控设置</router-link>
</div>
<div class="flex items-center">基础版限制1条专业版以上无限制当前<vip-button class="ml-5" mode="nav"></vip-button></div> <div class="flex items-center">基础版限制1条专业版以上无限制当前<vip-button class="ml-5" mode="nav"></vip-button></div>
</div> </div>
</div> </div>

View File

@ -0,0 +1,24 @@
// @ts-ignore
import { request } from "/src/api/service";
const apiPrefix = "/monitor/site/setting";
export type UserSiteMonitorSetting = {
notificationId?: number;
};
export async function SiteMonitorSettingsGet() {
const res = await request({
url: apiPrefix + "/get",
method: "post",
});
if (!res) {
return {};
}
return res as UserSiteMonitorSetting;
}
export async function SiteMonitorSettingsSave(data: UserSiteMonitorSetting) {
await request({
url: apiPrefix + "/save",
method: "post",
data: data,
});
}

View File

@ -0,0 +1,63 @@
<template>
<fs-page class="page-user-settings page-site-monitor-setting">
<template #header>
<div class="title">站点监控设置</div>
</template>
<div class="user-settings-form settings-form">
<a-form :model="formState" name="basic" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" autocomplete="off">
<a-form-item label="通知渠道" :name="['notificationId']">
<div class="flex">
<NotificationSelector v-model="formState.notificationId" />
</div>
<div class="helper">设置通知渠道</div>
</a-form-item>
<a-form-item label=" " :colon="false" :wrapper-col="{ span: 16 }">
<loading-button type="primary" html-type="button" :click="doSave">保存</loading-button>
</a-form-item>
</a-form>
</div>
</fs-page>
</template>
<script setup lang="tsx">
import { reactive } from "vue";
import * as api from "./api";
import { UserSiteMonitorSetting } from "./api";
import { notification } from "ant-design-vue";
import { merge } from "lodash-es";
import { useSettingStore } from "/src/store/settings";
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
const settingsStore = useSettingStore();
defineOptions({
name: "UserSecurity",
});
const formState = reactive<Partial<UserSiteMonitorSetting>>({
notificationId: 0,
});
async function loadUserSettings() {
const data: any = await api.SiteMonitorSettingsGet();
merge(formState, data);
}
loadUserSettings();
const doSave = async (form: any) => {
await api.SiteMonitorSettingsSave({
...formState,
});
notification.success({
message: "保存成功",
});
};
</script>
<style lang="less">
.page-user-settings {
.user-settings-form {
width: 600px;
margin: 20px;
}
}
</style>

View File

@ -54,7 +54,7 @@
<a-form v-else ref="twoFactorFormRef" class="user-layout-login" :model="twoFactor" v-bind="layout"> <a-form v-else ref="twoFactorFormRef" class="user-layout-login" :model="twoFactor" v-bind="layout">
<div class="mb-10 flex flex-center">请打开您的Authenticator APP获取动态验证码</div> <div class="mb-10 flex flex-center">请打开您的Authenticator APP获取动态验证码</div>
<a-form-item name="verifyCode"> <a-form-item name="verifyCode">
<a-input v-model:value="twoFactor.verifyCode" placeholder="请输入动态验证码" allow-clear> <a-input ref="verifyCodeInputRef" v-model:value="twoFactor.verifyCode" placeholder="请输入动态验证码" allow-clear @keydown.enter="handleTwoFactorSubmit">
<template #prefix> <template #prefix>
<fs-icon icon="ion:lock-closed-outline"></fs-icon> <fs-icon icon="ion:lock-closed-outline"></fs-icon>
</template> </template>
@ -71,7 +71,7 @@
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { defineComponent, reactive, ref, toRaw } from "vue"; import { defineComponent, nextTick, reactive, ref, toRaw } from "vue";
import { useUserStore } from "/src/store/user"; import { useUserStore } from "/src/store/user";
import { useSettingStore } from "/@/store/settings"; import { useSettingStore } from "/@/store/settings";
import { utils } from "@fast-crud/fast-crud"; import { utils } from "@fast-crud/fast-crud";
@ -82,6 +82,7 @@ export default defineComponent({
name: "LoginPage", name: "LoginPage",
components: { SmsCode, ImageCode }, components: { SmsCode, ImageCode },
setup() { setup() {
const verifyCodeInputRef = ref();
const loading = ref(false); const loading = ref(false);
const userStore = useUserStore(); const userStore = useUserStore();
const settingStore = useSettingStore(); const settingStore = useSettingStore();
@ -149,8 +150,11 @@ export default defineComponent({
} catch (e: any) { } catch (e: any) {
//@ts-ignore //@ts-ignore
if (e.code === 10020) { if (e.code === 10020) {
//
//@ts-ignore //@ts-ignore
twoFactor.loginId = e.data; twoFactor.loginId = e.data;
await nextTick();
verifyCodeInputRef.value.focus();
} else { } else {
throw e; throw e;
} }
@ -188,6 +192,7 @@ export default defineComponent({
hasRegisterTypeEnabled, hasRegisterTypeEnabled,
twoFactor, twoFactor,
handleTwoFactorSubmit, handleTwoFactorSubmit,
verifyCodeInputRef,
}; };
}, },
}); });

View File

@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.34.6](https://github.com/certd/certd/compare/v1.34.5...v1.34.6) (2025-05-25)
### Bug Fixes
* 修复又拍云 CDN 设置证书参数和强制 HTTPS 配置报错的bug ([7984b62](https://github.com/certd/certd/commit/7984b625ba6727132f205db8e25f790bce27b2f7))
### Performance Improvements
* 添加阿里云 ESA证书部署插件 ([1db1ffd](https://github.com/certd/certd/commit/1db1ffde99ac7e4684fa606ebc4c327f829b3a26))
* 站点证书监控增加通知设置 ([3422a1a](https://github.com/certd/certd/commit/3422a1a59fd0d2c0f17fa9c7e8988ac527ecfdd9))
## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19) ## [1.34.5](https://github.com/certd/certd/compare/v1.34.4...v1.34.5) (2025-05-19)
### Performance Improvements ### Performance Improvements

View File

@ -1,6 +1,6 @@
{ {
"name": "@certd/ui-server", "name": "@certd/ui-server",
"version": "1.34.5", "version": "1.34.6",
"description": "fast-server base midway", "description": "fast-server base midway",
"private": true, "private": true,
"type": "module", "type": "module",
@ -41,19 +41,19 @@
"@aws-sdk/client-acm": "^3.699.0", "@aws-sdk/client-acm": "^3.699.0",
"@aws-sdk/client-cloudfront": "^3.699.0", "@aws-sdk/client-cloudfront": "^3.699.0",
"@aws-sdk/client-s3": "^3.705.0", "@aws-sdk/client-s3": "^3.705.0",
"@certd/acme-client": "^1.34.5", "@certd/acme-client": "^1.34.6",
"@certd/basic": "^1.34.5", "@certd/basic": "^1.34.6",
"@certd/commercial-core": "^1.34.5", "@certd/commercial-core": "^1.34.6",
"@certd/jdcloud": "^1.34.5", "@certd/jdcloud": "^1.34.6",
"@certd/lib-huawei": "^1.34.5", "@certd/lib-huawei": "^1.34.6",
"@certd/lib-k8s": "^1.34.5", "@certd/lib-k8s": "^1.34.6",
"@certd/lib-server": "^1.34.5", "@certd/lib-server": "^1.34.6",
"@certd/midway-flyway-js": "^1.34.5", "@certd/midway-flyway-js": "^1.34.6",
"@certd/pipeline": "^1.34.5", "@certd/pipeline": "^1.34.6",
"@certd/plugin-cert": "^1.34.5", "@certd/plugin-cert": "^1.34.6",
"@certd/plugin-lib": "^1.34.5", "@certd/plugin-lib": "^1.34.6",
"@certd/plugin-plus": "^1.34.5", "@certd/plugin-plus": "^1.34.6",
"@certd/plus-core": "^1.34.5", "@certd/plus-core": "^1.34.6",
"@corsinvest/cv4pve-api-javascript": "^8.3.0", "@corsinvest/cv4pve-api-javascript": "^8.3.0",
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120", "@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120", "@huaweicloud/huaweicloud-sdk-core": "^3.1.120",

View File

@ -1,7 +1,9 @@
import { ALL, Body, Controller, Inject, Post, Provide, Query } from '@midwayjs/core'; import { ALL, Body, Controller, Inject, Post, Provide, Query } from "@midwayjs/core";
import { Constants, CrudController } from '@certd/lib-server'; import { Constants, CrudController } from "@certd/lib-server";
import { AuthService } from '../../../modules/sys/authority/service/auth-service.js'; import { AuthService } from "../../../modules/sys/authority/service/auth-service.js";
import { SiteInfoService } from '../../../modules/monitor/service/site-info-service.js'; import { SiteInfoService } from "../../../modules/monitor/service/site-info-service.js";
import { UserSiteMonitorSetting } from "../../../modules/mine/service/models.js";
import { merge } from "lodash-es";
/** /**
*/ */
@ -94,4 +96,23 @@ export class SiteInfoController extends CrudController<SiteInfoService> {
await this.service.checkAllByUsers(userId); await this.service.checkAllByUsers(userId);
return this.ok(); return this.ok();
} }
@Post("/setting/get", { summary: Constants.per.authOnly })
async get() {
const userId = this.getUserId();
const setting = await this.service.getSetting(userId)
return this.ok(setting);
}
@Post("/setting/save", { summary: Constants.per.authOnly })
async save(@Body(ALL) bean: any) {
const userId = this.getUserId();
const setting = new UserSiteMonitorSetting();
merge(setting, bean);
await this.service.saveSetting(userId, setting);
return this.ok({});
}
} }

View File

@ -19,3 +19,10 @@ export class UserTwoFactorSetting extends BaseSettings {
} }
export class UserSiteMonitorSetting extends BaseSettings {
static __title__ = "站点监控设置";
static __key__ = "user.site.monitor";
notificationId?:number= 0;
}

View File

@ -10,6 +10,8 @@ import { PeerCertificate } from 'tls';
import { NotificationService } from '../../pipeline/service/notification-service.js'; import { NotificationService } from '../../pipeline/service/notification-service.js';
import { isComm, isPlus } from '@certd/plus-core'; import { isComm, isPlus } from '@certd/plus-core';
import { UserSuiteService } from '@certd/commercial-core'; import { UserSuiteService } from '@certd/commercial-core';
import { UserSettingsService } from "../../mine/service/user-settings-service.js";
import { UserSiteMonitorSetting } from "../../mine/service/models.js";
@Provide() @Provide()
@Scope(ScopeEnum.Request, { allowDowngrade: true }) @Scope(ScopeEnum.Request, { allowDowngrade: true })
@ -26,6 +28,10 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
@Inject() @Inject()
userSuiteService: UserSuiteService; userSuiteService: UserSuiteService;
@Inject()
userSettingsService: UserSettingsService;
//@ts-ignore //@ts-ignore
getRepository() { getRepository() {
return this.repository; return this.repository;
@ -236,4 +242,12 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
await utils.sleep(200); await utils.sleep(200);
} }
} }
async getSetting(userId: number){
return await this.userSettingsService.getSetting<UserSiteMonitorSetting>(userId, UserSiteMonitorSetting);
}
async saveSetting(userId: number, bean: UserSiteMonitorSetting) {
await this.userSettingsService.saveSetting(userId, bean);
}
} }

View File

@ -57,15 +57,12 @@ export class SafeService {
async reloadHiddenStatus(immediate = false) { async reloadHiddenStatus(immediate = false) {
const hidden = await this.getHiddenSetting() const hidden = await this.getHiddenSetting()
if (hidden.enabled) { if (hidden.enabled) {
logger.error("启动站点隐藏"); logger.info("启动站点隐藏");
hiddenStatus.isHidden = false hiddenStatus.isHidden = immediate;
if (immediate) {
hiddenStatus.isHidden = true;
}
const autoHiddenTimes = hidden.autoHiddenTimes || 5; const autoHiddenTimes = hidden.autoHiddenTimes || 5;
hiddenStatus.startCheck(autoHiddenTimes); hiddenStatus.startCheck(autoHiddenTimes);
} else { } else {
logger.error("关闭站点隐藏"); logger.info("当前站点隐藏已关闭");
hiddenStatus.isHidden = false; hiddenStatus.isHidden = false;
hiddenStatus.stopCheck() hiddenStatus.stopCheck()
} }

View File

@ -1,5 +1,5 @@
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline'; import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline';
import { CertInfo ,CertApplyPluginNames} from '@certd/plugin-cert'; import { CertInfo ,CertApplyPluginNames, CertReader} from '@certd/plugin-cert';
import { AliyunAccess, AliyunClient, AliyunSslClient, createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from '@certd/plugin-lib'; import { AliyunAccess, AliyunClient, AliyunSslClient, createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from '@certd/plugin-lib';
@IsTaskPlugin({ @IsTaskPlugin({
@ -143,8 +143,9 @@ export class AliyunDeployCertToALB extends AbstractTaskPlugin {
endpoint: this.casEndpoint, endpoint: this.casEndpoint,
}); });
const certName = this.buildCertName(CertReader.getMainDomain(this.cert.crt))
certId = await sslClient.uploadCert({ certId = await sslClient.uploadCert({
name: this.appendTimeSuffix('certd'), name: certName,
cert: this.cert, cert: this.cert,
}); });
} }

View File

@ -1,7 +1,7 @@
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline'; import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline';
import { AliyunAccess, AliyunClient, AliyunSslClient, createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from '@certd/plugin-lib'; import { AliyunAccess, AliyunClient, AliyunSslClient, createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from '@certd/plugin-lib';
import { optionsUtils } from '@certd/basic/dist/utils/util.options.js'; import { optionsUtils } from '@certd/basic/dist/utils/util.options.js';
import { CertApplyPluginNames} from '@certd/plugin-cert'; import { CertApplyPluginNames, CertReader } from "@certd/plugin-cert";
@IsTaskPlugin({ @IsTaskPlugin({
name: 'DeployCertToAliyunCDN', name: 'DeployCertToAliyunCDN',
title: '阿里云-部署证书至CDN', title: '阿里云-部署证书至CDN',
@ -107,9 +107,11 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
let certId: any = this.cert; let certId: any = this.cert;
const certName = this.appendTimeSuffix(this.certName); let certName = this.appendTimeSuffix(this.certName);
if (typeof this.cert === 'object') { if (typeof this.cert === 'object') {
// @ts-ignore
const certName = this.buildCertName(CertReader.getMainDomain(this.cert.crt))
certId = await sslClient.uploadCert({ certId = await sslClient.uploadCert({
name:certName, name:certName,
cert: this.cert, cert: this.cert,

View File

@ -0,0 +1,226 @@
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
import { CertApplyPluginNames, CertInfo, CertReader } from "@certd/plugin-cert";
import {
AliyunAccess, AliyunClientV2,
AliyunSslClient,
createCertDomainGetterInputDefine,
createRemoteSelectInputDefine
} from "@certd/plugin-lib";
@IsTaskPlugin({
name: "AliyunDeployCertToESA",
title: "阿里云-部署至ESA",
icon: "svg:icon-aliyun",
group: pluginGroups.aliyun.key,
desc: "部署证书到阿里云ESA(边缘安全加速)",
needPlus: false,
default: {
strategy: {
runStrategy: RunStrategy.SkipWhenSucceed
}
}
})
export class AliyunDeployCertToESA extends AbstractTaskPlugin {
@TaskInput({
title: "域名证书",
helper: "请选择证书申请任务输出的域名证书",
component: {
name: "output-selector",
from: [...CertApplyPluginNames]
},
required: true
})
cert!: CertInfo;
@TaskInput(createCertDomainGetterInputDefine({ props: { required: false } }))
certDomains!: string[];
@TaskInput({
title: "大区",
value: "cn-hangzhou",
component: {
name: "a-auto-complete",
vModel: "value",
options: [
{ value: "cn-hangzhou", label: "华东1杭州" },
{ value: "ap-southeast-1", label: "新加坡" }
]
},
required: true
})
regionId!: string;
@TaskInput({
title: "证书接入点",
helper: "不会选就保持默认即可",
value: "cas.aliyuncs.com",
component: {
name: "a-select",
options: [
{ value: "cas.aliyuncs.com", label: "中国大陆" },
{ value: "cas.ap-southeast-1.aliyuncs.com", label: "新加坡" },
{ value: "cas.eu-central-1.aliyuncs.com", label: "德国(法兰克福)" }
]
},
required: true
})
casEndpoint!: string;
@TaskInput({
title: "Access授权",
helper: "阿里云授权AccessKeyId、AccessKeySecret",
component: {
name: "access-selector",
type: "aliyun"
},
required: true
})
accessId!: string;
@TaskInput(
createRemoteSelectInputDefine({
title: "站点",
helper: "请选择要部署证书的站点",
action: AliyunDeployCertToESA.prototype.onGetSiteList.name,
watches: ["accessId", "regionId"]
})
)
siteIds!: string[];
async onInstance() {
}
async getAliyunCertId(access: AliyunAccess) {
let certId: any = this.cert;
let certName: any = this.appendTimeSuffix("certd");
if (typeof this.cert === "object") {
const sslClient = new AliyunSslClient({
access,
logger: this.logger,
endpoint: this.casEndpoint
});
certName = this.buildCertName(CertReader.getMainDomain(this.cert.crt));
certId = await sslClient.uploadCert({
name: certName,
cert: this.cert
});
this.logger.info("上传证书成功", certId, certName);
}
return {
certId,
certName
};
}
async execute(): Promise<void> {
this.logger.info("开始部署证书到阿里云");
const access = await this.getAccess<AliyunAccess>(this.accessId);
const client = await this.getClient(access);
const { certId, certName } = await this.getAliyunCertId(access);
for (const siteId of this.siteIds) {
try {
const res = await client.doRequest({
// 接口名称
action: "SetCertificate",
// 接口版本
version: "2024-09-10",
data: {
SiteId: siteId,
CasId: certId,
Type: "cas",
Name: certName
}
});
this.logger.info(`部署站点[${siteId}]证书成功:${JSON.stringify(res)}`);
} catch (e) {
if (e.message.includes("Certificate.Duplicated")) {
this.logger.info(`站点[${siteId}]证书已存在,无需重复部署`);
}else{
throw e;
}
}
try{
await this.clearSiteCert(client,siteId);
}catch (e) {
this.logger.error("清理站点[${siteId}]证书失败",e)
}
}
}
async getClient(access: AliyunAccess) {
const endpoint = `esa.${this.regionId}.aliyuncs.com`;
return access.getClient(endpoint);
}
async onGetSiteList(data: any) {
if (!this.accessId) {
throw new Error("请选择Access授权");
}
const access = await this.getAccess<AliyunAccess>(this.accessId);
const client = await this.getClient(access);
const res = await client.doRequest({
action: "ListSites",
version: "2024-09-10",
method: "GET",
data: {}
});
const list = res?.Sites;
if (!list || list.length === 0) {
throw new Error("没有找到站点,请先创建站点");
}
const options = list.map((item: any) => {
return {
label: item.SiteName,
value: item.SiteId,
domain: item.SiteName
};
});
return this.ctx.utils.options.buildGroupOptions(options, this.certDomains);
}
async clearSiteCert(client: AliyunClientV2, siteId: string) {
this.logger.info(`开始清理站点[${siteId}]过期证书`);
const certListRes = await client.doRequest({
action: "ListCertificates",
version: "2024-09-10",
method: "GET",
query: {
SiteId: siteId
}
});
const list = certListRes.Result;
for (const item of list) {
this.logger.info(`证书${item.Name}状态:${item.Status}`);
if (item.Status === "Expired") {
this.logger.info(`证书${item.Name}已过期,执行删除`);
await client.doRequest({
action: "DeleteCertificate",
version: "2024-09-10",
// 接口 HTTP 方法
method: "GET",
query: {
SiteId: siteId,
Id: item.id
}
});
this.logger.info(`证书${item.Name}已删除`);
}
}
}
}
new AliyunDeployCertToESA();

View File

@ -1,5 +1,5 @@
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline"; import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
import { CertApplyPluginNames, CertInfo } from "@certd/plugin-cert"; import { CertApplyPluginNames, CertInfo, CertReader } from "@certd/plugin-cert";
import { AliyunAccess, createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib"; import { AliyunAccess, createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
@IsTaskPlugin({ @IsTaskPlugin({
@ -141,9 +141,11 @@ export class AliyunDeployCertToFC extends AbstractTaskPlugin {
bodyType: 'json', bodyType: 'json',
}); });
// body params // body params
const certName = this.buildCertName(CertReader.getMainDomain(this.cert.crt))
const body: { [key: string]: any } = { const body: { [key: string]: any } = {
certConfig: { certConfig: {
certName: this.appendTimeSuffix('certd_fc'), certName: certName,
certificate: this.cert.crt, certificate: this.cert.crt,
privateKey: this.cert.key, privateKey: this.cert.key,
}, },

View File

@ -1,5 +1,5 @@
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline'; import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline';
import { CertInfo } from '@certd/plugin-cert'; import { CertInfo, CertReader } from "@certd/plugin-cert";
import { AliyunAccess, AliyunClient, AliyunSslClient, createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from '@certd/plugin-lib'; import { AliyunAccess, AliyunClient, AliyunSslClient, createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from '@certd/plugin-lib';
import { CertApplyPluginNames} from '@certd/plugin-cert'; import { CertApplyPluginNames} from '@certd/plugin-cert';
@IsTaskPlugin({ @IsTaskPlugin({
@ -139,8 +139,10 @@ export class AliyunDeployCertToNLB extends AbstractTaskPlugin {
endpoint: this.casEndpoint, endpoint: this.casEndpoint,
}); });
const certName = this.buildCertName(CertReader.getMainDomain(this.cert.crt))
certId = await sslClient.uploadCert({ certId = await sslClient.uploadCert({
name: this.appendTimeSuffix('certd'), name: certName,
cert: this.cert, cert: this.cert,
}); });
} }

View File

@ -1,5 +1,5 @@
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline"; import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
import { CertApplyPluginNames, CertInfo } from "@certd/plugin-cert"; import { CertApplyPluginNames, CertInfo, CertReader } from "@certd/plugin-cert";
import { import {
AliyunAccess, AliyunAccess,
AliyunClient, AliyunClient,
@ -124,7 +124,7 @@ export class AliyunDeployCertToWaf extends AbstractTaskPlugin {
}); });
certId = await sslClient.uploadCert({ certId = await sslClient.uploadCert({
name: this.appendTimeSuffix('certd'), name: this.buildCertName(CertReader.getMainDomain(this.cert.crt)),
cert: this.cert, cert: this.cert,
}); });
} }

View File

@ -1,7 +1,7 @@
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput, TaskOutput } from '@certd/pipeline'; import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput, TaskOutput } from '@certd/pipeline';
import { AliyunAccess } from '@certd/plugin-lib'; import { AliyunAccess } from '@certd/plugin-lib';
import { AliyunSslClient } from '@certd/plugin-lib'; import { AliyunSslClient } from '@certd/plugin-lib';
import { CertApplyPluginNames} from '@certd/plugin-cert'; import { CertApplyPluginNames, CertReader } from "@certd/plugin-cert";
/** /**
* 1 cn-hangzhou cas.aliyuncs.com cas-vpc.cn-hangzhou.aliyuncs.com * 1 cn-hangzhou cas.aliyuncs.com cas-vpc.cn-hangzhou.aliyuncs.com
* 西 ap-southeast-3 cas.ap-southeast-3.aliyuncs.com cas-vpc.ap-southeast-3.aliyuncs.com * 西 ap-southeast-3 cas.ap-southeast-3.aliyuncs.com cas-vpc.ap-southeast-3.aliyuncs.com
@ -97,8 +97,9 @@ export class UploadCertToAliyun extends AbstractTaskPlugin {
logger: this.logger, logger: this.logger,
endpoint, endpoint,
}); });
const certName = this.buildCertName(CertReader.getMainDomain(this.cert.crt))
this.aliyunCertId = await client.uploadCert({ this.aliyunCertId = await client.uploadCert({
name: this.appendTimeSuffix('certd'), name: certName,
cert: this.cert, cert: this.cert,
}); });
} }

View File

@ -110,30 +110,44 @@ export class UpyunDeployToCdn extends AbstractTaskPlugin {
this.logger.info(`登录成功`); this.logger.info(`登录成功`);
const certId = await upyunClient.uploadCert(cookie, this.cert); const certId = await upyunClient.uploadCert(cookie, this.cert);
this.logger.info(`上传证书成功:${certId}`); this.logger.info(`上传证书成功:${certId}`);
await this.ctx.utils.sleep(5000);
for (const item of this.cdnList) { for (const item of this.cdnList) {
const data :any= { this.logger.info(`开始部署证书:${item}`);
const data1 :any= {
crt_id: certId,
domain_name: item,
}
const res1=await upyunClient.doRequest({
cookie: cookie,
url: "https://console.upyun.com/api/https/migrate/domain",
method: "POST",
data: data1
});
this.logger.info(`设置证书成功:${JSON.stringify(res1)}`);
const data2 :any= {
certificate_id: certId, certificate_id: certId,
domain: item, domain: item,
} }
if (this.forceHttps !== 'keep') { if (this.forceHttps !== 'keep') {
data.force_https = Boolean(this.forceHttps); data2.force_https = Boolean(this.forceHttps);
} }
if (this.https !=='keep') { if (this.https !=='keep') {
data.https = Boolean(this.https); data2.https = Boolean(this.https);
} }
this.logger.info(`开始部署证书:${item}`);
const res = await upyunClient.doRequest({ this.logger.info(`设置证书参数:${JSON.stringify(data2)}`);
const res2 = await upyunClient.doRequest({
cookie: cookie, cookie: cookie,
url: "https://console.upyun.com/api/https/certificate/manager", url: "https://console.upyun.com/api/https/certificate/manager",
method: "POST", method: "POST",
data: data data: data2
}); });
this.logger.info(`部署成功:${JSON.stringify(res)}`); this.logger.info(`设置证书参数成功:${JSON.stringify(res2)}`);
} }
this.logger.info("部署成功"); this.logger.info("部署成功");

View File

@ -46,7 +46,7 @@ importers:
packages/core/acme-client: packages/core/acme-client:
dependencies: dependencies:
'@certd/basic': '@certd/basic':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../basic version: link:../basic
'@peculiar/x509': '@peculiar/x509':
specifier: ^1.11.0 specifier: ^1.11.0
@ -207,10 +207,10 @@ importers:
packages/core/pipeline: packages/core/pipeline:
dependencies: dependencies:
'@certd/basic': '@certd/basic':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../basic version: link:../basic
'@certd/plus-core': '@certd/plus-core':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../pro/plus-core version: link:../../pro/plus-core
dayjs: dayjs:
specifier: ^1.11.7 specifier: ^1.11.7
@ -415,7 +415,7 @@ importers:
packages/libs/lib-k8s: packages/libs/lib-k8s:
dependencies: dependencies:
'@certd/basic': '@certd/basic':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/basic version: link:../../core/basic
'@kubernetes/client-node': '@kubernetes/client-node':
specifier: 0.21.0 specifier: 0.21.0
@ -455,16 +455,16 @@ importers:
packages/libs/lib-server: packages/libs/lib-server:
dependencies: dependencies:
'@certd/acme-client': '@certd/acme-client':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/acme-client version: link:../../core/acme-client
'@certd/basic': '@certd/basic':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/basic version: link:../../core/basic
'@certd/pipeline': '@certd/pipeline':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/pipeline version: link:../../core/pipeline
'@certd/plus-core': '@certd/plus-core':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../pro/plus-core version: link:../../pro/plus-core
'@midwayjs/cache': '@midwayjs/cache':
specifier: ~3.14.0 specifier: ~3.14.0
@ -607,16 +607,16 @@ importers:
packages/plugins/plugin-cert: packages/plugins/plugin-cert:
dependencies: dependencies:
'@certd/acme-client': '@certd/acme-client':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/acme-client version: link:../../core/acme-client
'@certd/basic': '@certd/basic':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/basic version: link:../../core/basic
'@certd/pipeline': '@certd/pipeline':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/pipeline version: link:../../core/pipeline
'@certd/plugin-lib': '@certd/plugin-lib':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../plugin-lib version: link:../plugin-lib
'@google-cloud/publicca': '@google-cloud/publicca':
specifier: ^1.3.0 specifier: ^1.3.0
@ -682,17 +682,23 @@ importers:
packages/plugins/plugin-lib: packages/plugins/plugin-lib:
dependencies: dependencies:
'@alicloud/openapi-client':
specifier: ^0.4.14
version: 0.4.14
'@alicloud/pop-core': '@alicloud/pop-core':
specifier: ^1.7.10 specifier: ^1.7.10
version: 1.8.0 version: 1.8.0
'@alicloud/tea-util':
specifier: ^1.4.10
version: 1.4.10
'@aws-sdk/client-s3': '@aws-sdk/client-s3':
specifier: ^3.787.0 specifier: ^3.787.0
version: 3.810.0(aws-crt@1.26.2) version: 3.810.0(aws-crt@1.26.2)
'@certd/basic': '@certd/basic':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/basic version: link:../../core/basic
'@certd/pipeline': '@certd/pipeline':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/pipeline version: link:../../core/pipeline
'@kubernetes/client-node': '@kubernetes/client-node':
specifier: 0.21.0 specifier: 0.21.0
@ -780,19 +786,19 @@ importers:
packages/pro/commercial-core: packages/pro/commercial-core:
dependencies: dependencies:
'@certd/basic': '@certd/basic':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/basic version: link:../../core/basic
'@certd/lib-server': '@certd/lib-server':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../libs/lib-server version: link:../../libs/lib-server
'@certd/pipeline': '@certd/pipeline':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/pipeline version: link:../../core/pipeline
'@certd/plugin-plus': '@certd/plugin-plus':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../plugin-plus version: link:../plugin-plus
'@certd/plus-core': '@certd/plus-core':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../plus-core version: link:../plus-core
'@midwayjs/core': '@midwayjs/core':
specifier: ~3.20.3 specifier: ~3.20.3
@ -877,22 +883,22 @@ importers:
specifier: ^1.0.2 specifier: ^1.0.2
version: 1.0.3 version: 1.0.3
'@certd/basic': '@certd/basic':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/basic version: link:../../core/basic
'@certd/lib-k8s': '@certd/lib-k8s':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../libs/lib-k8s version: link:../../libs/lib-k8s
'@certd/pipeline': '@certd/pipeline':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/pipeline version: link:../../core/pipeline
'@certd/plugin-cert': '@certd/plugin-cert':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../plugins/plugin-cert version: link:../../plugins/plugin-cert
'@certd/plugin-lib': '@certd/plugin-lib':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../plugins/plugin-lib version: link:../../plugins/plugin-lib
'@certd/plus-core': '@certd/plus-core':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../plus-core version: link:../plus-core
ali-oss: ali-oss:
specifier: ^6.21.0 specifier: ^6.21.0
@ -995,7 +1001,7 @@ importers:
packages/pro/plus-core: packages/pro/plus-core:
dependencies: dependencies:
'@certd/basic': '@certd/basic':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/basic version: link:../../core/basic
dayjs: dayjs:
specifier: ^1.11.7 specifier: ^1.11.7
@ -1285,10 +1291,10 @@ importers:
version: 0.1.3(zod@3.24.4) version: 0.1.3(zod@3.24.4)
devDependencies: devDependencies:
'@certd/lib-iframe': '@certd/lib-iframe':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../libs/lib-iframe version: link:../../libs/lib-iframe
'@certd/pipeline': '@certd/pipeline':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/pipeline version: link:../../core/pipeline
'@rollup/plugin-commonjs': '@rollup/plugin-commonjs':
specifier: ^25.0.7 specifier: ^25.0.7
@ -1468,43 +1474,43 @@ importers:
specifier: ^3.705.0 specifier: ^3.705.0
version: 3.810.0(aws-crt@1.26.2) version: 3.810.0(aws-crt@1.26.2)
'@certd/acme-client': '@certd/acme-client':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/acme-client version: link:../../core/acme-client
'@certd/basic': '@certd/basic':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/basic version: link:../../core/basic
'@certd/commercial-core': '@certd/commercial-core':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../pro/commercial-core version: link:../../pro/commercial-core
'@certd/jdcloud': '@certd/jdcloud':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../libs/lib-jdcloud version: link:../../libs/lib-jdcloud
'@certd/lib-huawei': '@certd/lib-huawei':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../libs/lib-huawei version: link:../../libs/lib-huawei
'@certd/lib-k8s': '@certd/lib-k8s':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../libs/lib-k8s version: link:../../libs/lib-k8s
'@certd/lib-server': '@certd/lib-server':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../libs/lib-server version: link:../../libs/lib-server
'@certd/midway-flyway-js': '@certd/midway-flyway-js':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../libs/midway-flyway-js version: link:../../libs/midway-flyway-js
'@certd/pipeline': '@certd/pipeline':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../core/pipeline version: link:../../core/pipeline
'@certd/plugin-cert': '@certd/plugin-cert':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../plugins/plugin-cert version: link:../../plugins/plugin-cert
'@certd/plugin-lib': '@certd/plugin-lib':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../plugins/plugin-lib version: link:../../plugins/plugin-lib
'@certd/plugin-plus': '@certd/plugin-plus':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../pro/plugin-plus version: link:../../pro/plugin-plus
'@certd/plus-core': '@certd/plus-core':
specifier: ^1.34.4 specifier: ^1.34.5
version: link:../../pro/plus-core version: link:../../pro/plus-core
'@corsinvest/cv4pve-api-javascript': '@corsinvest/cv4pve-api-javascript':
specifier: ^8.3.0 specifier: ^8.3.0
@ -15652,7 +15658,7 @@ snapshots:
'@jest/schemas': 29.6.3 '@jest/schemas': 29.6.3
'@types/istanbul-lib-coverage': 2.0.6 '@types/istanbul-lib-coverage': 2.0.6
'@types/istanbul-reports': 3.0.4 '@types/istanbul-reports': 3.0.4
'@types/node': 18.19.100 '@types/node': 20.17.47
'@types/yargs': 17.0.33 '@types/yargs': 17.0.33
chalk: 4.1.2 chalk: 4.1.2
@ -17108,7 +17114,7 @@ snapshots:
'@types/body-parser@1.19.5': '@types/body-parser@1.19.5':
dependencies: dependencies:
'@types/connect': 3.4.38 '@types/connect': 3.4.38
'@types/node': 18.19.100 '@types/node': 20.17.47
'@types/cache-manager@4.0.6': {} '@types/cache-manager@4.0.6': {}
@ -17122,7 +17128,7 @@ snapshots:
'@types/connect@3.4.38': '@types/connect@3.4.38':
dependencies: dependencies:
'@types/node': 18.19.100 '@types/node': 20.17.47
'@types/content-disposition@0.5.8': {} '@types/content-disposition@0.5.8': {}
@ -17146,7 +17152,7 @@ snapshots:
'@types/express-serve-static-core@5.0.6': '@types/express-serve-static-core@5.0.6':
dependencies: dependencies:
'@types/node': 18.19.100 '@types/node': 20.17.47
'@types/qs': 6.9.18 '@types/qs': 6.9.18
'@types/range-parser': 1.2.7 '@types/range-parser': 1.2.7
'@types/send': 0.17.4 '@types/send': 0.17.4
@ -17159,7 +17165,7 @@ snapshots:
'@types/got@9.6.12': '@types/got@9.6.12':
dependencies: dependencies:
'@types/node': 18.19.100 '@types/node': 20.17.47
'@types/tough-cookie': 4.0.5 '@types/tough-cookie': 4.0.5
form-data: 2.5.3 form-data: 2.5.3
@ -17198,7 +17204,7 @@ snapshots:
'@types/keyv@3.1.4': '@types/keyv@3.1.4':
dependencies: dependencies:
'@types/node': 18.19.100 '@types/node': 20.17.47
'@types/koa-compose@3.2.8': '@types/koa-compose@3.2.8':
dependencies: dependencies:
@ -17293,19 +17299,19 @@ snapshots:
'@types/responselike@1.0.3': '@types/responselike@1.0.3':
dependencies: dependencies:
'@types/node': 18.19.100 '@types/node': 20.17.47
'@types/semver@7.7.0': {} '@types/semver@7.7.0': {}
'@types/send@0.17.4': '@types/send@0.17.4':
dependencies: dependencies:
'@types/mime': 1.3.5 '@types/mime': 1.3.5
'@types/node': 18.19.100 '@types/node': 20.17.47
'@types/serve-static@1.15.7': '@types/serve-static@1.15.7':
dependencies: dependencies:
'@types/http-errors': 2.0.4 '@types/http-errors': 2.0.4
'@types/node': 18.19.100 '@types/node': 20.17.47
'@types/send': 0.17.4 '@types/send': 0.17.4
'@types/ssh2@1.15.5': '@types/ssh2@1.15.5':
@ -17337,7 +17343,7 @@ snapshots:
'@types/ws@6.0.4': '@types/ws@6.0.4':
dependencies: dependencies:
'@types/node': 18.19.100 '@types/node': 20.17.47
'@types/ws@8.18.1': '@types/ws@8.18.1':
dependencies: dependencies:
@ -17345,7 +17351,7 @@ snapshots:
'@types/xml2js@0.4.14': '@types/xml2js@0.4.14':
dependencies: dependencies:
'@types/node': 18.19.100 '@types/node': 20.17.47
'@types/yargs-parser@21.0.3': {} '@types/yargs-parser@21.0.3': {}
@ -22357,7 +22363,7 @@ snapshots:
jest-util@29.7.0: jest-util@29.7.0:
dependencies: dependencies:
'@jest/types': 29.6.3 '@jest/types': 29.6.3
'@types/node': 18.19.100 '@types/node': 20.17.47
chalk: 4.1.2 chalk: 4.1.2
ci-info: 3.9.0 ci-info: 3.9.0
graceful-fs: 4.2.11 graceful-fs: 4.2.11