mirror of https://github.com/certd/certd
Merge remote-tracking branch 'origin/v2-dev' into v2-dev
commit
5b49071d6b
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -3,6 +3,20 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复消息内容存在()<>等括号情况下无法发送tg通知的bug ([c937583](https://github.com/certd/certd/commit/c937583a50d8513d76adead3648f83eee2fcc6f9))
|
||||
* 修复重试次数设置无效的bug ([e2099ac](https://github.com/certd/certd/commit/e2099ac9ca344bc70bfa4219002e9138708973ae))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 授权列表类型颜色优化 ([1e86338](https://github.com/certd/certd/commit/1e863382d3d1a8cc95a1abf51e75bf6eaea3244f))
|
||||
* 支持雨云dns解析 ([8354348](https://github.com/certd/certd/commit/83543487e7418683bd79cfe3b9e0d792bdb977f7))
|
||||
* 支持雨云dns解析以及雨云证书更新 ([43c7a19](https://github.com/certd/certd/commit/43c7a1984926f5d4647760cc134bb0aede3a7b7a))
|
||||
* github 版本检查支持执行脚本 ([bad3504](https://github.com/certd/certd/commit/bad3504d4a15e6989b967b66aa9da8c6981f25bf))
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
|
|
@ -1 +1 @@
|
|||
23:58
|
||||
00:39
|
||||
|
|
|
@ -3,6 +3,20 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复消息内容存在()<>等括号情况下无法发送tg通知的bug ([c937583](https://github.com/certd/certd/commit/c937583a50d8513d76adead3648f83eee2fcc6f9))
|
||||
* 修复重试次数设置无效的bug ([e2099ac](https://github.com/certd/certd/commit/e2099ac9ca344bc70bfa4219002e9138708973ae))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 授权列表类型颜色优化 ([1e86338](https://github.com/certd/certd/commit/1e863382d3d1a8cc95a1abf51e75bf6eaea3244f))
|
||||
* 支持雨云dns解析 ([8354348](https://github.com/certd/certd/commit/83543487e7418683bd79cfe3b9e0d792bdb977f7))
|
||||
* 支持雨云dns解析以及雨云证书更新 ([43c7a19](https://github.com/certd/certd/commit/43c7a1984926f5d4647760cc134bb0aede3a7b7a))
|
||||
* github 版本检查支持执行脚本 ([bad3504](https://github.com/certd/certd/commit/bad3504d4a15e6989b967b66aa9da8c6981f25bf))
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
|
|
@ -9,5 +9,5 @@
|
|||
}
|
||||
},
|
||||
"npmClient": "pnpm",
|
||||
"version": "1.35.2"
|
||||
"version": "1.35.3"
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
"afterpublishOnly": "npm run copylogs && time /t >build.trigger && git add ./build.trigger && git commit -m \"build: trigger build image\" && TIMEOUT /T 10 && git push",
|
||||
"transform-sql": "cd ./packages/ui/certd-server/db/ && node --experimental-json-modules transform.js",
|
||||
"commitAll": "git add . && git commit -m \"build: publish\" && git push && npm run commitPro",
|
||||
"commitPro": "cd ./packages/core/ && git add . && git commit -m \"build: publish\" && git push",
|
||||
"commitPro": "cd ./packages/pro/ && git add . && git commit -m \"build: publish\" && git push",
|
||||
"copylogs": "copyfiles \"CHANGELOG.md\" ./docs/guide/changelogs/",
|
||||
"prepublishOnly1": "npm run check && lerna run build ",
|
||||
"prepublishOnly2": "npm run check && npm run before-build && lerna run build ",
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/publishlab/node-acme-client/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
## [1.35.2](https://github.com/publishlab/node-acme-client/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"description": "Simple and unopinionated ACME client",
|
||||
"private": false,
|
||||
"author": "nmorsman",
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"type": "module",
|
||||
"module": "scr/index.js",
|
||||
"main": "src/index.js",
|
||||
|
@ -18,7 +18,7 @@
|
|||
"types"
|
||||
],
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.35.2",
|
||||
"@certd/basic": "^1.35.3",
|
||||
"@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": "f252871fb892af015c99052e3728fb0a0535b012"
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
|
|
@ -1 +1 @@
|
|||
23:54
|
||||
00:27
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/basic",
|
||||
"private": false,
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
@ -45,5 +45,5 @@
|
|||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "f252871fb892af015c99052e3728fb0a0535b012"
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复消息内容存在()<>等括号情况下无法发送tg通知的bug ([c937583](https://github.com/certd/certd/commit/c937583a50d8513d76adead3648f83eee2fcc6f9))
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/pipeline",
|
||||
"private": false,
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
@ -17,8 +17,8 @@
|
|||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.35.2",
|
||||
"@certd/plus-core": "^1.35.2",
|
||||
"@certd/basic": "^1.35.3",
|
||||
"@certd/plus-core": "^1.35.3",
|
||||
"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": "f252871fb892af015c99052e3728fb0a0535b012"
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
}
|
||||
|
|
|
@ -121,9 +121,13 @@ export abstract class BaseNotification implements INotification {
|
|||
async onTestRequest() {
|
||||
return await this.doSend({
|
||||
userId: 0,
|
||||
title: "【Certd】测试通知【*.foo.com】,标题长度测试、测试、测试",
|
||||
content: `测试通知,*.foo.com
|
||||
title: "【标题】测试通知【*.foo.com】,标题长度测试、测试、测试",
|
||||
content: `测试通知
|
||||
域名测试: *.foo.com
|
||||
换行测试
|
||||
(括号测试)
|
||||
<尖括号测试>
|
||||
[中括号测试]
|
||||
`,
|
||||
pipeline: {
|
||||
id: 1,
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/lib-huawei",
|
||||
"private": false,
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"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": "f252871fb892af015c99052e3728fb0a0535b012"
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/lib-iframe",
|
||||
"private": false,
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
@ -31,5 +31,5 @@
|
|||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "f252871fb892af015c99052e3728fb0a0535b012"
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/jdcloud
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/jdcloud",
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"description": "jdcloud openApi sdk",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/bundle.js",
|
||||
|
@ -61,5 +61,5 @@
|
|||
"fetch"
|
||||
]
|
||||
},
|
||||
"gitHead": "f252871fb892af015c99052e3728fb0a0535b012"
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/lib-k8s",
|
||||
"private": false,
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
|
@ -17,7 +17,7 @@
|
|||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.35.2",
|
||||
"@certd/basic": "^1.35.3",
|
||||
"@kubernetes/client-node": "0.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -32,5 +32,5 @@
|
|||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "f252871fb892af015c99052e3728fb0a0535b012"
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/lib-server",
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
|
@ -27,10 +27,10 @@
|
|||
],
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.35.2",
|
||||
"@certd/basic": "^1.35.2",
|
||||
"@certd/pipeline": "^1.35.2",
|
||||
"@certd/plus-core": "^1.35.2",
|
||||
"@certd/acme-client": "^1.35.3",
|
||||
"@certd/basic": "^1.35.3",
|
||||
"@certd/pipeline": "^1.35.3",
|
||||
"@certd/plus-core": "^1.35.3",
|
||||
"@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": "f252871fb892af015c99052e3728fb0a0535b012"
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/midway-flyway-js",
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
|
@ -46,5 +46,5 @@
|
|||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "f252871fb892af015c99052e3728fb0a0535b012"
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/plugin-cert",
|
||||
"private": false,
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
|
@ -16,10 +16,10 @@
|
|||
"pub": "npm publish"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.35.2",
|
||||
"@certd/basic": "^1.35.2",
|
||||
"@certd/pipeline": "^1.35.2",
|
||||
"@certd/plugin-lib": "^1.35.2",
|
||||
"@certd/acme-client": "^1.35.3",
|
||||
"@certd/basic": "^1.35.3",
|
||||
"@certd/pipeline": "^1.35.3",
|
||||
"@certd/plugin-lib": "^1.35.3",
|
||||
"@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": "f252871fb892af015c99052e3728fb0a0535b012"
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@certd/plugin-lib",
|
||||
"private": false,
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"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.35.2",
|
||||
"@certd/pipeline": "^1.35.2",
|
||||
"@certd/basic": "^1.35.3",
|
||||
"@certd/pipeline": "^1.35.3",
|
||||
"@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": "f252871fb892af015c99052e3728fb0a0535b012"
|
||||
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
|
||||
}
|
||||
|
|
|
@ -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.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复重试次数设置无效的bug ([e2099ac](https://github.com/certd/certd/commit/e2099ac9ca344bc70bfa4219002e9138708973ae))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 授权列表类型颜色优化 ([1e86338](https://github.com/certd/certd/commit/1e863382d3d1a8cc95a1abf51e75bf6eaea3244f))
|
||||
* 支持雨云dns解析以及雨云证书更新 ([43c7a19](https://github.com/certd/certd/commit/43c7a1984926f5d4647760cc134bb0aede3a7b7a))
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
### Performance Improvements
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/ui-client",
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --open",
|
||||
|
@ -102,8 +102,8 @@
|
|||
"zod-defaults": "^0.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/lib-iframe": "^1.35.2",
|
||||
"@certd/pipeline": "^1.35.2",
|
||||
"@certd/lib-iframe": "^1.35.3",
|
||||
"@certd/pipeline": "^1.35.3",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/chai": "^4.3.12",
|
||||
|
|
|
@ -49,38 +49,38 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
pageRequest,
|
||||
addRequest,
|
||||
editRequest,
|
||||
delRequest
|
||||
delRequest,
|
||||
},
|
||||
toolbar: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
search: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
form: {
|
||||
wrapper: {
|
||||
width: "1050px"
|
||||
}
|
||||
width: "1050px",
|
||||
},
|
||||
},
|
||||
rowHandle: {
|
||||
width: 200
|
||||
width: 200,
|
||||
},
|
||||
table: {
|
||||
scroll: {
|
||||
x: 800
|
||||
x: 800,
|
||||
},
|
||||
rowSelection: {
|
||||
type: "radio",
|
||||
selectedRowKeys: selectedRowKey,
|
||||
onChange: onSelectChange
|
||||
onChange: onSelectChange,
|
||||
},
|
||||
customRow: (record: any) => {
|
||||
return {
|
||||
onClick: () => {
|
||||
onSelectChange([record.id]);
|
||||
} // 点击行
|
||||
}, // 点击行
|
||||
};
|
||||
}
|
||||
},
|
||||
},
|
||||
columns: {
|
||||
id: {
|
||||
|
@ -88,25 +88,25 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
key: "id",
|
||||
type: "number",
|
||||
column: {
|
||||
width: 50
|
||||
width: 50,
|
||||
},
|
||||
form: {
|
||||
show: false
|
||||
}
|
||||
show: false,
|
||||
},
|
||||
},
|
||||
name: {
|
||||
title: "名称",
|
||||
search: {
|
||||
show: true
|
||||
show: true,
|
||||
},
|
||||
type: ["text"],
|
||||
form: {
|
||||
rules: [{ required: true, message: "请填写名称" }],
|
||||
helper: "随便填,当多个相同类型的授权时,便于区分"
|
||||
helper: "随便填,当多个相同类型的授权时,便于区分",
|
||||
},
|
||||
column: {
|
||||
width: 200
|
||||
}
|
||||
width: 200,
|
||||
},
|
||||
},
|
||||
from: {
|
||||
title: "级别",
|
||||
|
@ -114,29 +114,29 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
dict: dict({
|
||||
data: [
|
||||
{ label: "系统", value: "sys" },
|
||||
{ label: "用户", value: "user" }
|
||||
]
|
||||
{ label: "用户", value: "user" },
|
||||
],
|
||||
}),
|
||||
search: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
form: {
|
||||
show: false
|
||||
show: false,
|
||||
},
|
||||
column: {
|
||||
width: 100,
|
||||
align: "center",
|
||||
component: {
|
||||
color: "auto"
|
||||
color: "auto",
|
||||
},
|
||||
order: 10
|
||||
order: 10,
|
||||
},
|
||||
valueBuilder: ({ row, key, value }) => {
|
||||
row[key] = row.userId > 0 ? "user" : "sys";
|
||||
}
|
||||
},
|
||||
},
|
||||
...commonColumnsDefine
|
||||
}
|
||||
}
|
||||
...commonColumnsDefine,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
|
|
@ -130,7 +130,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
await api.DoCheck(row.id);
|
||||
await crudExpose.doRefresh();
|
||||
notification.success({
|
||||
message: "检查完成",
|
||||
message: "检查任务已提交,请稍后刷新查看结果",
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
@ -137,7 +137,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||
await api.DoCheck(row.id);
|
||||
await crudExpose.doRefresh();
|
||||
notification.success({
|
||||
message: "检查任务已提交",
|
||||
message: "检查任务已提交,请稍后刷新查看结果",
|
||||
});
|
||||
},
|
||||
},
|
||||
|
|
|
@ -3,6 +3,18 @@
|
|||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复重试次数设置无效的bug ([e2099ac](https://github.com/certd/certd/commit/e2099ac9ca344bc70bfa4219002e9138708973ae))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持雨云dns解析 ([8354348](https://github.com/certd/certd/commit/83543487e7418683bd79cfe3b9e0d792bdb977f7))
|
||||
* 支持雨云dns解析以及雨云证书更新 ([43c7a19](https://github.com/certd/certd/commit/43c7a1984926f5d4647760cc134bb0aede3a7b7a))
|
||||
* github 版本检查支持执行脚本 ([bad3504](https://github.com/certd/certd/commit/bad3504d4a15e6989b967b66aa9da8c6981f25bf))
|
||||
|
||||
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@certd/ui-server",
|
||||
"version": "1.35.2",
|
||||
"version": "1.35.3",
|
||||
"description": "fast-server base midway",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
|
@ -42,20 +42,20 @@
|
|||
"@aws-sdk/client-cloudfront": "^3.699.0",
|
||||
"@aws-sdk/client-iam": "^3.699.0",
|
||||
"@aws-sdk/client-s3": "^3.705.0",
|
||||
"@certd/acme-client": "^1.35.2",
|
||||
"@certd/basic": "^1.35.2",
|
||||
"@certd/commercial-core": "^1.35.2",
|
||||
"@certd/acme-client": "^1.35.3",
|
||||
"@certd/basic": "^1.35.3",
|
||||
"@certd/commercial-core": "^1.35.3",
|
||||
"@certd/cv4pve-api-javascript": "^8.4.1",
|
||||
"@certd/jdcloud": "^1.35.2",
|
||||
"@certd/lib-huawei": "^1.35.2",
|
||||
"@certd/lib-k8s": "^1.35.2",
|
||||
"@certd/lib-server": "^1.35.2",
|
||||
"@certd/midway-flyway-js": "^1.35.2",
|
||||
"@certd/pipeline": "^1.35.2",
|
||||
"@certd/plugin-cert": "^1.35.2",
|
||||
"@certd/plugin-lib": "^1.35.2",
|
||||
"@certd/plugin-plus": "^1.35.2",
|
||||
"@certd/plus-core": "^1.35.2",
|
||||
"@certd/jdcloud": "^1.35.3",
|
||||
"@certd/lib-huawei": "^1.35.3",
|
||||
"@certd/lib-k8s": "^1.35.3",
|
||||
"@certd/lib-server": "^1.35.3",
|
||||
"@certd/midway-flyway-js": "^1.35.3",
|
||||
"@certd/pipeline": "^1.35.3",
|
||||
"@certd/plugin-cert": "^1.35.3",
|
||||
"@certd/plugin-lib": "^1.35.3",
|
||||
"@certd/plugin-plus": "^1.35.3",
|
||||
"@certd/plus-core": "^1.35.3",
|
||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
|
||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
|
||||
"@koa/cors": "^5.0.0",
|
||||
|
|
|
@ -104,7 +104,7 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
|||
* @param notify
|
||||
* @param retryTimes
|
||||
*/
|
||||
async doCheck(site: SiteInfoEntity, notify = true, retryTimes = 3) {
|
||||
async doCheck(site: SiteInfoEntity, notify = true, retryTimes = null) {
|
||||
if (!site?.domain) {
|
||||
throw new Error("站点域名不能为空");
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
|||
|
||||
|
||||
//检查ip
|
||||
await this.checkAllIp(site);
|
||||
await this.checkAllIp(site,retryTimes);
|
||||
|
||||
if (!notify) {
|
||||
return;
|
||||
|
@ -181,7 +181,7 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
|||
}
|
||||
}
|
||||
|
||||
async checkAllIp(site: SiteInfoEntity) {
|
||||
async checkAllIp(site: SiteInfoEntity,retryTimes = null) {
|
||||
if (!site.ipCheck) {
|
||||
return;
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
|||
logger.error("send notify error", e);
|
||||
}
|
||||
};
|
||||
await this.siteIpService.checkAll(site, onFinished);
|
||||
await this.siteIpService.checkAll(site, retryTimes,onFinished);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -234,7 +234,7 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
|||
* @param notify
|
||||
* @param retryTimes
|
||||
*/
|
||||
async check(id: number, notify = false, retryTimes = 3) {
|
||||
async check(id: number, notify = false, retryTimes = null) {
|
||||
const site = await this.info(id);
|
||||
if (!site) {
|
||||
throw new Error("站点不存在");
|
||||
|
@ -326,7 +326,6 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
|||
return setting;
|
||||
}
|
||||
for (const site of sites) {
|
||||
let retryTimes = 3;
|
||||
const setting = await getFromCache(site.userId)
|
||||
if (isCommon) {
|
||||
//公共的检查,排除有设置cron的用户
|
||||
|
@ -334,8 +333,8 @@ export class SiteInfoService extends BaseService<SiteInfoEntity> {
|
|||
//设置了cron,跳过公共检查
|
||||
continue;
|
||||
}
|
||||
retryTimes = setting.retryTimes??retryTimes
|
||||
}
|
||||
let retryTimes = setting?.retryTimes
|
||||
this.doCheck(site,true,retryTimes).catch(e => {
|
||||
logger.error(`检查站点证书失败,${site.domain}`, e.message);
|
||||
});
|
||||
|
|
|
@ -88,7 +88,7 @@ export class SiteIpService extends BaseService<SiteIpEntity> {
|
|||
await this.updateIpCount(entity.id)
|
||||
}
|
||||
|
||||
async check(ipId: number, domain: string, port: number) {
|
||||
async check(ipId: number, domain: string, port: number,retryTimes = null) {
|
||||
if(!ipId){
|
||||
return
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ export class SiteIpService extends BaseService<SiteIpEntity> {
|
|||
const res = await siteTester.test({
|
||||
host: domain,
|
||||
port: port,
|
||||
retryTimes: 3,
|
||||
retryTimes : retryTimes??3,
|
||||
ipAddress: entity.ipAddress
|
||||
});
|
||||
|
||||
|
@ -154,7 +154,7 @@ export class SiteIpService extends BaseService<SiteIpEntity> {
|
|||
}
|
||||
}
|
||||
|
||||
async checkAll(siteInfo: SiteInfoEntity,onFinish?: (e: any) => void) {
|
||||
async checkAll(siteInfo: SiteInfoEntity,retryTimes = null,onFinish?: (e: any) => void) {
|
||||
const siteId = siteInfo.id;
|
||||
const ips = await this.repository.find({
|
||||
where: {
|
||||
|
@ -167,7 +167,7 @@ export class SiteIpService extends BaseService<SiteIpEntity> {
|
|||
for (const item of ips) {
|
||||
const func = async () => {
|
||||
try {
|
||||
return await this.check(item.id, domain, port);
|
||||
return await this.check(item.id, domain, port,retryTimes);
|
||||
} catch (e) {
|
||||
logger.error("check site item error", e);
|
||||
return {
|
||||
|
|
|
@ -18,7 +18,7 @@ export type SiteTestRes = {
|
|||
export class SiteTester {
|
||||
async test(req: SiteTestReq): Promise<SiteTestRes> {
|
||||
logger.info("测试站点:", JSON.stringify(req));
|
||||
const maxRetryTimes = req.retryTimes ?? 3;
|
||||
const maxRetryTimes = req.retryTimes==null ? 3 : req.retryTimes;
|
||||
let tryCount = 0;
|
||||
let result: SiteTestRes = {};
|
||||
while (true) {
|
||||
|
@ -28,12 +28,12 @@ export class SiteTester {
|
|||
} catch (e) {
|
||||
tryCount++;
|
||||
if (tryCount > maxRetryTimes) {
|
||||
logger.error(`测试站点出错,重试${maxRetryTimes}次。`, e.message);
|
||||
logger.error(`测试站点出错,已超过最大重试次数(${maxRetryTimes})`, e.message);
|
||||
throw e;
|
||||
}
|
||||
//指数退避
|
||||
const time = 2 ** tryCount;
|
||||
logger.error(`测试站点出错,${time}s后重试`, e);
|
||||
logger.error(`测试站点出错,${time}s后重试(${tryCount}/${maxRetryTimes})`, e);
|
||||
await utils.sleep(time * 1000);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,3 +24,4 @@ export * from './plugin-notification/index.js'
|
|||
export * from './plugin-flex/index.js'
|
||||
export * from './plugin-farcdn/index.js'
|
||||
export * from './plugin-fnos/index.js'
|
||||
export * from './plugin-rainyun/index.js'
|
||||
|
|
|
@ -59,7 +59,8 @@ export class TelegramNotification extends BaseNotification {
|
|||
skipSslVerify: boolean;
|
||||
|
||||
replaceText(text: string) {
|
||||
return text.replaceAll('.', '\\.').replaceAll('*', '\\*');
|
||||
// .*()<> 等都需要用\\进行替换
|
||||
return text.replace(/[\\.*()<>]/g, '\\$&');
|
||||
}
|
||||
async send(body: NotificationBody) {
|
||||
if (!this.botToken || !this.chatId) {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import {AccessInput, BaseAccess, IsAccess} from "@certd/pipeline";
|
||||
import {HttpRequestConfig} from "@certd/basic";
|
||||
import { CertInfo } from "@certd/plugin-cert";
|
||||
|
||||
|
||||
/**
|
||||
|
@ -41,13 +42,13 @@ export class RainyunAccess extends BaseAccess {
|
|||
testRequest = true;
|
||||
|
||||
async onTestRequest() {
|
||||
await this.getDomainList({});
|
||||
await this.getDomainList({limit:1});
|
||||
return "ok"
|
||||
}
|
||||
|
||||
// {"columnFilters":{"domains.Domain":"domain"},"sort":[],"page":1,"perPage":20}
|
||||
async getDomainList(req:{offset?:number,size?:number,query?:string}){
|
||||
const size = req.size ?? 20;
|
||||
async getDomainList(req:{offset?:number,limit?:number,query?:string}){
|
||||
const size = req.limit ?? 20;
|
||||
const offset = req.offset ?? 0;
|
||||
let page = Math.floor(offset / size);
|
||||
if(offset % size === 0 ){
|
||||
|
@ -60,10 +61,70 @@ export class RainyunAccess extends BaseAccess {
|
|||
"domains.Domain": req.query??""
|
||||
},
|
||||
}
|
||||
return await this.doRequest({
|
||||
const res = await this.doRequest({
|
||||
url: `/product/domain/?options=${encodeURIComponent(JSON.stringify(options))}`,
|
||||
method: "GET",
|
||||
});
|
||||
|
||||
return {
|
||||
total: res.TotalRecords,
|
||||
list: res.Records || [],
|
||||
limit: size,
|
||||
offset: offset
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async getCertList(req:{offset?:number,limit?:number,query?:string}){
|
||||
const size = req.limit ?? 20;
|
||||
const offset = req.offset ?? 0;
|
||||
let page = Math.floor(offset / size);
|
||||
if(offset % size === 0 ){
|
||||
page++
|
||||
}
|
||||
const options ={
|
||||
columnFilters: {
|
||||
Domain: req.query??""
|
||||
},
|
||||
sort:[],
|
||||
page: page,
|
||||
perPage: size,
|
||||
|
||||
}
|
||||
const res = await this.doRequest({
|
||||
url: `product/sslcenter/?options=${encodeURIComponent(JSON.stringify(options))}`,
|
||||
method: "GET",
|
||||
});
|
||||
|
||||
return {
|
||||
total: res.TotalRecords,
|
||||
list: res.Records || [],
|
||||
limit: size,
|
||||
offset: offset
|
||||
}
|
||||
}
|
||||
|
||||
async doCertReplace(req:{certId:number,cert:CertInfo}){
|
||||
|
||||
// /product/sslcenter/{id}
|
||||
return await this.doRequest({
|
||||
url: `product/sslcenter/${req.certId}`,
|
||||
method: "PUT",
|
||||
data: {
|
||||
cert: req.cert.crt,
|
||||
key: req.cert.key,
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
async getDomainId(domain:string){
|
||||
const res = await this.getDomainList({query: domain,limit:1});
|
||||
if (res.list.length === 0) {
|
||||
throw new Error(`域名${domain}不存在` );
|
||||
}
|
||||
return res.list[0].id;
|
||||
}
|
||||
|
||||
async doRequest(req:HttpRequestConfig){
|
||||
|
|
|
@ -1,87 +1,65 @@
|
|||
import {AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions} from '@certd/plugin-cert';
|
||||
import {RainyunAccess} from "./access.js";
|
||||
import { AbstractDnsProvider, CreateRecordOptions, IsDnsProvider, RemoveRecordOptions } from "@certd/plugin-cert";
|
||||
import { RainyunAccess } from "./access.js";
|
||||
|
||||
@IsDnsProvider({
|
||||
name: 'rainyun',
|
||||
title: '雨云',
|
||||
desc: '雨云DNS解析提供商',
|
||||
accessType: 'rainyun',
|
||||
icon: 'svg:icon-lucky',
|
||||
order:0,
|
||||
name: "rainyun",
|
||||
title: "雨云",
|
||||
desc: "雨云DNS解析提供商",
|
||||
accessType: "rainyun",
|
||||
icon: "svg:icon-lucky",
|
||||
order: 0
|
||||
})
|
||||
export class RainyunDnsProvider extends AbstractDnsProvider {
|
||||
|
||||
client: any;
|
||||
|
||||
async onInstance() {
|
||||
|
||||
}
|
||||
|
||||
async createRecord(options: CreateRecordOptions): Promise<any> {
|
||||
|
||||
const access: RainyunAccess = this.ctx.access as RainyunAccess
|
||||
console.log(access)
|
||||
const { fullRecord,hostRecord, value, type, domain } = options;
|
||||
this.logger.info('添加域名解析:', fullRecord, value, domain);
|
||||
// const domain = await this.matchDomain(fullRecord);
|
||||
const params = {
|
||||
RegionId: 'cn-hangzhou',
|
||||
DomainName: domain,
|
||||
RR: hostRecord,
|
||||
Type: type,
|
||||
Value: value,
|
||||
// Line: 'oversea' // 海外
|
||||
const access: RainyunAccess = this.ctx.access as RainyunAccess;
|
||||
|
||||
const domainId = await access.getDomainId(options.domain);
|
||||
if (!domainId) {
|
||||
throw new Error(`域名${options.domain}未找到`);
|
||||
}
|
||||
|
||||
const { fullRecord, hostRecord, value, type, domain } = options;
|
||||
this.logger.info("添加域名解析:", fullRecord, value, domain);
|
||||
|
||||
const ret = await access.doRequest({
|
||||
url: `/product/domain/${domainId}/dns`,
|
||||
method: "POST",
|
||||
data: {
|
||||
host: hostRecord,
|
||||
value: value,
|
||||
level: 1,
|
||||
type: type,
|
||||
line: "DEFAULT",
|
||||
ttl: 60
|
||||
}
|
||||
});
|
||||
this.logger.info("添加域名解析成功:", JSON.stringify(options), ret);
|
||||
return {
|
||||
recordId: ret,
|
||||
domainId: domainId
|
||||
};
|
||||
|
||||
const requestOption = {
|
||||
method: 'POST',
|
||||
};
|
||||
try {
|
||||
const ret = await this.client.request('AddDomainRecord', params, requestOption);
|
||||
this.logger.info('添加域名解析成功:', JSON.stringify(options), ret.RecordId);
|
||||
return ret.RecordId;
|
||||
} catch (e: any) {
|
||||
if (e.code === 'DomainRecordDuplicate') {
|
||||
return;
|
||||
}
|
||||
if(e.code === "LastOperationNotFinished"){
|
||||
this.logger.info('上一个操作还未完成,5s后重试')
|
||||
await this.ctx.utils.sleep(5000)
|
||||
return this.createRecord(options)
|
||||
}
|
||||
this.logger.info('添加域名解析出错', e);
|
||||
this.resolveError(e, options);
|
||||
}
|
||||
}
|
||||
|
||||
resolveError(e: any, req: CreateRecordOptions) {
|
||||
if (e.message?.indexOf('The specified domain name does not exist') > -1) {
|
||||
throw new Error(`阿里云账号中不存在此域名:${req.domain}`);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
||||
async removeRecord(options: RemoveRecordOptions<any>): Promise<any> {
|
||||
const { fullRecord, value } = options.recordReq;
|
||||
const access: RainyunAccess = this.ctx.access as RainyunAccess;
|
||||
const record = options.recordRes;
|
||||
const params = {
|
||||
RegionId: 'cn-hangzhou',
|
||||
RecordId: record,
|
||||
};
|
||||
|
||||
const requestOption = {
|
||||
method: 'POST',
|
||||
};
|
||||
try{
|
||||
const ret = await this.client.request('DeleteDomainRecord', params, requestOption);
|
||||
this.logger.info('删除域名解析成功:', fullRecord, value, ret.RecordId);
|
||||
return ret.RecordId;
|
||||
}catch (e) {
|
||||
if(e.code === "LastOperationNotFinished"){
|
||||
this.logger.info('上一个操作还未完成,5s后重试')
|
||||
await this.ctx.utils.sleep(5000)
|
||||
return this.removeRecord(options)
|
||||
}
|
||||
throw e
|
||||
}
|
||||
const ret = await access.doRequest({
|
||||
url: `/product/domain/${record.domainId}/dns?record_id=${record.recordId}`,
|
||||
method: "DELETE",
|
||||
});
|
||||
this.logger.info("删除域名解析成功:", fullRecord, value, ret);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
import { AbstractTaskPlugin, IsTaskPlugin, PageReq, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { CertApplyPluginNames, CertInfo } from "@certd/plugin-cert";
|
||||
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||
import { RainyunAccess } from "../access.js";
|
||||
|
||||
@IsTaskPlugin({
|
||||
//命名规范,插件类型+功能(就是目录plugin-demo中的demo),大写字母开头,驼峰命名
|
||||
name: "RainyunRefreshCert",
|
||||
title: "雨云-更新证书",
|
||||
desc: "app.rainyun.com",
|
||||
icon: "svg:icon-lucky",
|
||||
//插件分组
|
||||
group: pluginGroups.cdn.key,
|
||||
needPlus: false,
|
||||
default: {
|
||||
//默认值配置照抄即可
|
||||
strategy: {
|
||||
runStrategy: RunStrategy.SkipWhenSucceed
|
||||
}
|
||||
}
|
||||
})
|
||||
//类名规范,跟上面插件名称(name)一致
|
||||
export class RainyunRefreshCert extends AbstractTaskPlugin {
|
||||
//证书选择,此项必须要有
|
||||
@TaskInput({
|
||||
title: "域名证书",
|
||||
helper: "请选择前置任务输出的域名证书",
|
||||
component: {
|
||||
name: "output-selector",
|
||||
from: [...CertApplyPluginNames]
|
||||
}
|
||||
// required: true, // 必填
|
||||
})
|
||||
cert!: CertInfo;
|
||||
|
||||
@TaskInput(createCertDomainGetterInputDefine({ props: { required: false } }))
|
||||
certDomains!: string[];
|
||||
|
||||
//授权选择框
|
||||
@TaskInput({
|
||||
title: "雨云授权",
|
||||
component: {
|
||||
name: "access-selector",
|
||||
type: "rainyun" //固定授权类型
|
||||
},
|
||||
required: true //必填
|
||||
})
|
||||
accessId!: string;
|
||||
//
|
||||
|
||||
@TaskInput(
|
||||
createRemoteSelectInputDefine({
|
||||
title: "证书Id",
|
||||
helper: "要更新的rainyun证书id",
|
||||
|
||||
action: RainyunRefreshCert.prototype.onGetCertList.name
|
||||
})
|
||||
)
|
||||
certList!: number[];
|
||||
|
||||
//插件实例化时执行的方法
|
||||
async onInstance() {
|
||||
}
|
||||
|
||||
//插件执行方法
|
||||
async execute(): Promise<void> {
|
||||
const access = await this.getAccess<RainyunAccess>(this.accessId);
|
||||
|
||||
for (const item of this.certList) {
|
||||
this.logger.info(`----------- 开始更新证书:${item}`);
|
||||
await access.doCertReplace({
|
||||
certId: item,
|
||||
cert: this.cert
|
||||
});
|
||||
this.logger.info(`----------- 更新证书${item}成功`);
|
||||
}
|
||||
|
||||
this.logger.info("部署完成");
|
||||
}
|
||||
|
||||
async onGetCertList(req: PageReq = {}) {
|
||||
const access = await this.getAccess<RainyunAccess>(this.accessId);
|
||||
|
||||
const offset = req.offset ?? 0;
|
||||
const limit = req.limit ?? 100;
|
||||
const res = await access.getCertList({
|
||||
offset,
|
||||
limit
|
||||
});
|
||||
const total = res.total;
|
||||
const list = res.list;
|
||||
if (!list || list.length === 0) {
|
||||
throw new Error("没有找到证书,请先在控制台上传一次证书且关联站点");
|
||||
}
|
||||
|
||||
const options = list.map((item: any) => {
|
||||
return {
|
||||
label: `${item.Domain}<${item.ID}>`,
|
||||
value: item.ID,
|
||||
domain: item.Domain.split(",").map(item => item.trim())
|
||||
};
|
||||
});
|
||||
return {
|
||||
list: this.ctx.utils.options.buildGroupOptions(options, this.certDomains),
|
||||
total: total,
|
||||
offset: offset,
|
||||
limit: limit
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
//实例化一下,注册插件
|
||||
new RainyunRefreshCert();
|
Loading…
Reference in New Issue