mirror of https://github.com/certd/certd
Merge remote-tracking branch 'origin/v2-dev' into v2-dev
commit
0b78030c59
12
CHANGELOG.md
12
CHANGELOG.md
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复Farcdn证书有效期错误的问题 ([1fe4c36](https://github.com/certd/certd/commit/1fe4c367f7128de9ba5e3395ae06bc81e63a7d5a))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 不止证书自动化,插件解锁无限可能 ([a9b302e](https://github.com/certd/certd/commit/a9b302e38d3328d75df8b2da3d8b914851e55e9c))
|
||||||
|
* 邮箱支持保存和选择 ([f7b0b44](https://github.com/certd/certd/commit/f7b0b44ef6044bec36510a6f0b06d8dca5bfce49))
|
||||||
|
* 支持github 新版本检查并发布通知 ([356703c](https://github.com/certd/certd/commit/356703c83ea18c6efb8931402e181280d7b7e696))
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
23:14
|
00:57
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复Farcdn证书有效期错误的问题 ([1fe4c36](https://github.com/certd/certd/commit/1fe4c367f7128de9ba5e3395ae06bc81e63a7d5a))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 不止证书自动化,插件解锁无限可能 ([a9b302e](https://github.com/certd/certd/commit/a9b302e38d3328d75df8b2da3d8b914851e55e9c))
|
||||||
|
* 邮箱支持保存和选择 ([f7b0b44](https://github.com/certd/certd/commit/f7b0b44ef6044bec36510a6f0b06d8dca5bfce49))
|
||||||
|
* 支持github 新版本检查并发布通知 ([356703c](https://github.com/certd/certd/commit/356703c83ea18c6efb8931402e181280d7b7e696))
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -9,5 +9,5 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmClient": "pnpm",
|
"npmClient": "pnpm",
|
||||||
"version": "1.34.8"
|
"version": "1.34.9"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.9](https://github.com/publishlab/node-acme-client/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
## [1.34.8](https://github.com/publishlab/node-acme-client/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/publishlab/node-acme-client/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/acme-client
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
|
@ -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.8",
|
"version": "1.34.9",
|
||||||
"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.8",
|
"@certd/basic": "^1.34.9",
|
||||||
"@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": "d876ea671137e7a4d99a23bb8a5baed06f119dfb"
|
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/basic
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
23:11
|
00:54
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/basic",
|
"name": "@certd/basic",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"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": "d876ea671137e7a4d99a23bb8a5baed06f119dfb"
|
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
### Performance Improvements
|
### Performance Improvements
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/pipeline",
|
"name": "@certd/pipeline",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"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.8",
|
"@certd/basic": "^1.34.9",
|
||||||
"@certd/plus-core": "^1.34.8",
|
"@certd/plus-core": "^1.34.9",
|
||||||
"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": "d876ea671137e7a4d99a23bb8a5baed06f119dfb"
|
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,6 +203,7 @@ export class RunnableCollection {
|
||||||
if (runnable?.status) {
|
if (runnable?.status) {
|
||||||
runnable.status.status = ResultType.none;
|
runnable.status.status = ResultType.none;
|
||||||
runnable.status.result = ResultType.none;
|
runnable.status.result = ResultType.none;
|
||||||
|
runnable.status.output = {};
|
||||||
runnable.status.inputHash = "";
|
runnable.status.inputHash = "";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
runnable.input = {};
|
runnable.input = {};
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-huawei
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/lib-huawei",
|
"name": "@certd/lib-huawei",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"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": "d876ea671137e7a4d99a23bb8a5baed06f119dfb"
|
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-iframe
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/lib-iframe",
|
"name": "@certd/lib-iframe",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"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": "d876ea671137e7a4d99a23bb8a5baed06f119dfb"
|
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/jdcloud
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/jdcloud",
|
"name": "@certd/jdcloud",
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"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": "d876ea671137e7a4d99a23bb8a5baed06f119dfb"
|
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-k8s
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/lib-k8s",
|
"name": "@certd/lib-k8s",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"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.8",
|
"@certd/basic": "^1.34.9",
|
||||||
"@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": "d876ea671137e7a4d99a23bb8a5baed06f119dfb"
|
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 邮箱支持保存和选择 ([f7b0b44](https://github.com/certd/certd/commit/f7b0b44ef6044bec36510a6f0b06d8dca5bfce49))
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-server
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/lib-server",
|
"name": "@certd/lib-server",
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"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.8",
|
"@certd/acme-client": "^1.34.9",
|
||||||
"@certd/basic": "^1.34.8",
|
"@certd/basic": "^1.34.9",
|
||||||
"@certd/pipeline": "^1.34.8",
|
"@certd/pipeline": "^1.34.9",
|
||||||
"@certd/plus-core": "^1.34.8",
|
"@certd/plus-core": "^1.34.9",
|
||||||
"@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": "d876ea671137e7a4d99a23bb8a5baed06f119dfb"
|
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,11 +3,12 @@ import { InjectEntityModel } from '@midwayjs/typeorm';
|
||||||
import { Repository } from 'typeorm';
|
import { Repository } from 'typeorm';
|
||||||
import { SysSettingsEntity } from '../entity/sys-settings.js';
|
import { SysSettingsEntity } from '../entity/sys-settings.js';
|
||||||
import { BaseSettings, SysInstallInfo, SysPrivateSettings, SysPublicSettings, SysSecret, SysSecretBackup } from './models.js';
|
import { BaseSettings, SysInstallInfo, SysPrivateSettings, SysPublicSettings, SysSecret, SysSecretBackup } from './models.js';
|
||||||
import * as _ from 'lodash-es';
|
|
||||||
import { BaseService } from '../../../basic/index.js';
|
import { BaseService } from '../../../basic/index.js';
|
||||||
import { cache, logger, setGlobalProxy } from '@certd/basic';
|
import { cache, logger, setGlobalProxy } from '@certd/basic';
|
||||||
import * as dns from 'node:dns';
|
import * as dns from 'node:dns';
|
||||||
|
import {mergeUtils} from "@certd/basic";
|
||||||
|
const {merge} = mergeUtils;
|
||||||
/**
|
/**
|
||||||
* 设置
|
* 设置
|
||||||
*/
|
*/
|
||||||
|
@ -75,7 +76,7 @@ export class SysSettingsService extends BaseService<SysSettingsEntity> {
|
||||||
}
|
}
|
||||||
let newSetting: T = new type();
|
let newSetting: T = new type();
|
||||||
const savedSettings = await this.getSettingByKey(key);
|
const savedSettings = await this.getSettingByKey(key);
|
||||||
newSetting = _.merge(newSetting, savedSettings);
|
newSetting = merge(newSetting, savedSettings);
|
||||||
await this.saveSetting(newSetting);
|
await this.saveSetting(newSetting);
|
||||||
cache.set(cacheKey, newSetting);
|
cache.set(cacheKey, newSetting);
|
||||||
return newSetting;
|
return newSetting;
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/midway-flyway-js",
|
"name": "@certd/midway-flyway-js",
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"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": "d876ea671137e7a4d99a23bb8a5baed06f119dfb"
|
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 邮箱支持保存和选择 ([f7b0b44](https://github.com/certd/certd/commit/f7b0b44ef6044bec36510a6f0b06d8dca5bfce49))
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/plugin-cert",
|
"name": "@certd/plugin-cert",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"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.8",
|
"@certd/acme-client": "^1.34.9",
|
||||||
"@certd/basic": "^1.34.8",
|
"@certd/basic": "^1.34.9",
|
||||||
"@certd/pipeline": "^1.34.8",
|
"@certd/pipeline": "^1.34.9",
|
||||||
"@certd/plugin-lib": "^1.34.8",
|
"@certd/plugin-lib": "^1.34.9",
|
||||||
"@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": "d876ea671137e7a4d99a23bb8a5baed06f119dfb"
|
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ export abstract class CertApplyBasePlugin extends CertApplyBaseConvertPlugin {
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: "邮箱",
|
title: "邮箱",
|
||||||
component: {
|
component: {
|
||||||
name: "a-input",
|
name: "email-selector",
|
||||||
vModel: "value",
|
vModel: "value",
|
||||||
},
|
},
|
||||||
rules: [{ type: "email", message: "请输入正确的邮箱" }],
|
rules: [{ type: "email", message: "请输入正确的邮箱" }],
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/plugin-lib",
|
"name": "@certd/plugin-lib",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
|
@ -20,8 +20,8 @@
|
||||||
"@alicloud/pop-core": "^1.7.10",
|
"@alicloud/pop-core": "^1.7.10",
|
||||||
"@alicloud/tea-util": "^1.4.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.8",
|
"@certd/basic": "^1.34.9",
|
||||||
"@certd/pipeline": "^1.34.8",
|
"@certd/pipeline": "^1.34.9",
|
||||||
"@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",
|
||||||
|
@ -52,5 +52,5 @@
|
||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "d876ea671137e7a4d99a23bb8a5baed06f119dfb"
|
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,13 @@
|
||||||
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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 邮箱支持保存和选择 ([f7b0b44](https://github.com/certd/certd/commit/f7b0b44ef6044bec36510a6f0b06d8dca5bfce49))
|
||||||
|
* 支持github 新版本检查并发布通知 ([356703c](https://github.com/certd/certd/commit/356703c83ea18c6efb8931402e181280d7b7e696))
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/ui-client",
|
"name": "@certd/ui-client",
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"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.8",
|
"@certd/lib-iframe": "^1.34.9",
|
||||||
"@certd/pipeline": "^1.34.8",
|
"@certd/pipeline": "^1.34.9",
|
||||||
"@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",
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
import { request } from "/src/api/service";
|
||||||
|
|
||||||
|
export async function EmailList() {
|
||||||
|
return await request({
|
||||||
|
url: "/mine/email/list",
|
||||||
|
method: "post",
|
||||||
|
data: {},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function EmailDelete(email: string) {
|
||||||
|
return await request({
|
||||||
|
url: "/mine/email/delete",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
email: email,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function EmailAdd(email: string) {
|
||||||
|
return await request({
|
||||||
|
url: "/mine/email/add",
|
||||||
|
method: "post",
|
||||||
|
data: {
|
||||||
|
email: email,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
|
@ -0,0 +1,89 @@
|
||||||
|
<template>
|
||||||
|
<a-select :options="emails">
|
||||||
|
<template #option="{ value: val }">
|
||||||
|
<div class="flex flex-row w-full">
|
||||||
|
<span class="flex-1">{{ val }}</span>
|
||||||
|
<fs-icon class="ml-5" icon="ion:close" @click="deleteItem(val)"></fs-icon>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<template #dropdownRender="{ menuNode: menu }">
|
||||||
|
<v-nodes :vnodes="menu" />
|
||||||
|
<a-divider style="margin: 4px 0" />
|
||||||
|
<div class="w-full flex flex-row p-5">
|
||||||
|
<a-input ref="inputRef" v-model:value="newEmail" class="flex-1" placeholder="添加新邮箱" @keydown.enter="addItem" />
|
||||||
|
<a-button class="ml-5" type="primary" @click="addItem">
|
||||||
|
<template #icon>
|
||||||
|
<plus-outlined />
|
||||||
|
</template>
|
||||||
|
添加邮箱
|
||||||
|
</a-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</a-select>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { defineComponent, onMounted, ref } from "vue";
|
||||||
|
import * as api from "./api";
|
||||||
|
import { Modal, notification } from "ant-design-vue";
|
||||||
|
|
||||||
|
const props = defineProps<{}>();
|
||||||
|
const VNodes = defineComponent({
|
||||||
|
props: {
|
||||||
|
vnodes: {
|
||||||
|
type: Object,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
render() {
|
||||||
|
return this.vnodes;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const newEmail = ref("");
|
||||||
|
const emails = ref([]);
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
const list = await api.EmailList();
|
||||||
|
emails.value = list.map((item: string) => {
|
||||||
|
return {
|
||||||
|
value: item,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
});
|
||||||
|
async function addItem() {
|
||||||
|
const email = newEmail.value;
|
||||||
|
//验证邮箱格式
|
||||||
|
if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(newEmail.value)) {
|
||||||
|
notification.error({
|
||||||
|
message: "请填写正确的邮箱地址",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
debugger;
|
||||||
|
if (emails.value.find(item => item.value === email)) {
|
||||||
|
notification.warning({
|
||||||
|
message: "此邮箱已存在",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
await api.EmailAdd(email);
|
||||||
|
emails.value.unshift({
|
||||||
|
value: email,
|
||||||
|
label: email,
|
||||||
|
});
|
||||||
|
newEmail.value = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
async function deleteItem(value: string) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: "删除邮箱",
|
||||||
|
content: "确定要删除此邮箱吗?",
|
||||||
|
onOk: async () => {
|
||||||
|
await api.EmailDelete(value);
|
||||||
|
emails.value = emails.value.filter(item => item.value !== value);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
|
@ -14,12 +14,14 @@ import FileInput from "./file-input.vue";
|
||||||
import PemInput from "./pem-input.vue";
|
import PemInput from "./pem-input.vue";
|
||||||
import { defineAsyncComponent } from "vue";
|
import { defineAsyncComponent } from "vue";
|
||||||
import NotificationSelector from "../views/certd/notification/notification-selector/index.vue";
|
import NotificationSelector from "../views/certd/notification/notification-selector/index.vue";
|
||||||
|
import EmailSelector from "./email-selector/index.vue";
|
||||||
export default {
|
export default {
|
||||||
install(app: any) {
|
install(app: any) {
|
||||||
app.component(
|
app.component(
|
||||||
"CodeEditor",
|
"CodeEditor",
|
||||||
defineAsyncComponent(() => import("./code-editor/index.vue"))
|
defineAsyncComponent(() => import("./code-editor/index.vue"))
|
||||||
);
|
);
|
||||||
|
app.component("EmailSelector", EmailSelector);
|
||||||
app.component("NotificationSelector", NotificationSelector);
|
app.component("NotificationSelector", NotificationSelector);
|
||||||
app.component("PiContainer", PiContainer);
|
app.component("PiContainer", PiContainer);
|
||||||
app.component("TextEditable", TextEditable);
|
app.component("TextEditable", TextEditable);
|
||||||
|
|
|
@ -4,7 +4,7 @@ export async function doActive(form: any) {
|
||||||
return await request({
|
return await request({
|
||||||
url: "/sys/plus/active",
|
url: "/sys/plus/active",
|
||||||
method: "post",
|
method: "post",
|
||||||
data: form
|
data: form,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,6 @@ export async function getVipTrial() {
|
||||||
return await request({
|
return await request({
|
||||||
url: "/sys/plus/getVipTrial",
|
url: "/sys/plus/getVipTrial",
|
||||||
method: "post",
|
method: "post",
|
||||||
data: {}
|
data: {},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复Farcdn证书有效期错误的问题 ([1fe4c36](https://github.com/certd/certd/commit/1fe4c367f7128de9ba5e3395ae06bc81e63a7d5a))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 不止证书自动化,插件解锁无限可能 ([a9b302e](https://github.com/certd/certd/commit/a9b302e38d3328d75df8b2da3d8b914851e55e9c))
|
||||||
|
* 邮箱支持保存和选择 ([f7b0b44](https://github.com/certd/certd/commit/f7b0b44ef6044bec36510a6f0b06d8dca5bfce49))
|
||||||
|
* 支持github 新版本检查并发布通知 ([356703c](https://github.com/certd/certd/commit/356703c83ea18c6efb8931402e181280d7b7e696))
|
||||||
|
|
||||||
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
## [1.34.8](https://github.com/certd/certd/compare/v1.34.7...v1.34.8) (2025-05-28)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@certd/ui-server",
|
"name": "@certd/ui-server",
|
||||||
"version": "1.34.8",
|
"version": "1.34.9",
|
||||||
"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.8",
|
"@certd/acme-client": "^1.34.9",
|
||||||
"@certd/basic": "^1.34.8",
|
"@certd/basic": "^1.34.9",
|
||||||
"@certd/commercial-core": "^1.34.8",
|
"@certd/commercial-core": "^1.34.9",
|
||||||
"@certd/jdcloud": "^1.34.8",
|
"@certd/jdcloud": "^1.34.9",
|
||||||
"@certd/lib-huawei": "^1.34.8",
|
"@certd/lib-huawei": "^1.34.9",
|
||||||
"@certd/lib-k8s": "^1.34.8",
|
"@certd/lib-k8s": "^1.34.9",
|
||||||
"@certd/lib-server": "^1.34.8",
|
"@certd/lib-server": "^1.34.9",
|
||||||
"@certd/midway-flyway-js": "^1.34.8",
|
"@certd/midway-flyway-js": "^1.34.9",
|
||||||
"@certd/pipeline": "^1.34.8",
|
"@certd/pipeline": "^1.34.9",
|
||||||
"@certd/plugin-cert": "^1.34.8",
|
"@certd/plugin-cert": "^1.34.9",
|
||||||
"@certd/plugin-lib": "^1.34.8",
|
"@certd/plugin-lib": "^1.34.9",
|
||||||
"@certd/plugin-plus": "^1.34.8",
|
"@certd/plugin-plus": "^1.34.9",
|
||||||
"@certd/plus-core": "^1.34.8",
|
"@certd/plus-core": "^1.34.9",
|
||||||
"@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",
|
||||||
|
|
|
@ -17,4 +17,25 @@ export class EmailController extends BaseController {
|
||||||
await this.emailService.test(userId, receiver);
|
await this.emailService.test(userId, receiver);
|
||||||
return this.ok({});
|
return this.ok({});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Post('/list', { summary: Constants.per.authOnly })
|
||||||
|
public async list() {
|
||||||
|
const userId = super.getUserId();
|
||||||
|
const res = await this.emailService.list(userId);
|
||||||
|
return this.ok(res);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post('/add', { summary: Constants.per.authOnly })
|
||||||
|
public async add(@Body('email') email) {
|
||||||
|
const userId = super.getUserId();
|
||||||
|
await this.emailService.add(userId, email);
|
||||||
|
return this.ok({});
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post('/delete', { summary: Constants.per.authOnly })
|
||||||
|
public async delete(@Body('email') email) {
|
||||||
|
const userId = super.getUserId();
|
||||||
|
await this.emailService.delete(userId, email);
|
||||||
|
return this.ok({});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,7 @@ import { SendMailOptions } from 'nodemailer';
|
||||||
import { UserSettingsService } from '../../mine/service/user-settings-service.js';
|
import { UserSettingsService } from '../../mine/service/user-settings-service.js';
|
||||||
import { PlusService, SysSettingsService, SysSiteInfo } from '@certd/lib-server';
|
import { PlusService, SysSettingsService, SysSiteInfo } from '@certd/lib-server';
|
||||||
import { getEmailSettings } from '../../sys/settings/fix.js';
|
import { getEmailSettings } from '../../sys/settings/fix.js';
|
||||||
|
import { UserEmailSetting } from "../../mine/service/models.js";
|
||||||
|
|
||||||
export type EmailConfig = {
|
export type EmailConfig = {
|
||||||
host: string;
|
host: string;
|
||||||
|
@ -108,4 +109,24 @@ export class EmailService implements IEmailService {
|
||||||
content: '测试邮件,from certd',
|
content: '测试邮件,from certd',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async list(userId: any) {
|
||||||
|
const userEmailSetting = await this.settingsService.getSetting<UserEmailSetting>(userId,UserEmailSetting)
|
||||||
|
return userEmailSetting.list;
|
||||||
|
}
|
||||||
|
|
||||||
|
async delete(userId: any, email: string) {
|
||||||
|
const userEmailSetting = await this.settingsService.getSetting<UserEmailSetting>(userId,UserEmailSetting)
|
||||||
|
userEmailSetting.list = userEmailSetting.list.filter(item=>item !== email);
|
||||||
|
await this.settingsService.saveSetting(userId,userEmailSetting)
|
||||||
|
}
|
||||||
|
async add(userId: any, email: string) {
|
||||||
|
const userEmailSetting = await this.settingsService.getSetting<UserEmailSetting>(userId,UserEmailSetting)
|
||||||
|
//如果已存在
|
||||||
|
if(userEmailSetting.list.includes(email)){
|
||||||
|
return
|
||||||
|
}
|
||||||
|
userEmailSetting.list.unshift(email)
|
||||||
|
await this.settingsService.saveSetting(userId,userEmailSetting)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,3 +26,10 @@ export class UserSiteMonitorSetting extends BaseSettings {
|
||||||
|
|
||||||
notificationId?:number= 0;
|
notificationId?:number= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class UserEmailSetting extends BaseSettings {
|
||||||
|
static __title__ = "用户邮箱设置";
|
||||||
|
static __key__ = "user.email";
|
||||||
|
|
||||||
|
list:string[] = [];
|
||||||
|
}
|
||||||
|
|
|
@ -3,8 +3,8 @@ import { InjectEntityModel } from "@midwayjs/typeorm";
|
||||||
import { Repository } from "typeorm";
|
import { Repository } from "typeorm";
|
||||||
import { BaseService, BaseSettings } from "@certd/lib-server";
|
import { BaseService, BaseSettings } from "@certd/lib-server";
|
||||||
import { UserSettingsEntity } from "../entity/user-settings.js";
|
import { UserSettingsEntity } from "../entity/user-settings.js";
|
||||||
import { merge } from "lodash-es";
|
import { mergeUtils } from "@certd/basic";
|
||||||
|
const {merge} = mergeUtils
|
||||||
/**
|
/**
|
||||||
* 授权
|
* 授权
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -153,8 +153,8 @@ export class FarcdnAccess extends BaseAccess {
|
||||||
serverName: oldCert.serverName || certReader.getMainDomain(),
|
serverName: oldCert.serverName || certReader.getMainDomain(),
|
||||||
commonNames: [certReader.getMainDomain()],
|
commonNames: [certReader.getMainDomain()],
|
||||||
dnsNames: certReader.getAltNames(),
|
dnsNames: certReader.getAltNames(),
|
||||||
timeBeginAt: detail.notBefore,
|
timeBeginAt: detail.notBefore.getTime(),
|
||||||
timeEndAt: detail.notAfter,
|
timeEndAt: detail.notAfter.getTime(),
|
||||||
name: oldCert.name|| certReader.buildCertName(),
|
name: oldCert.name|| certReader.buildCertName(),
|
||||||
description:oldCert.description||""
|
description:oldCert.description||""
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
import { IsTaskPlugin, PageReq, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
import { AbstractTaskPlugin, IsTaskPlugin, PageReq, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||||
import { CertApplyPluginNames, CertInfo } from "@certd/plugin-cert";
|
import { CertApplyPluginNames, CertInfo } from "@certd/plugin-cert";
|
||||||
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||||
import { FarcdnAccess } from "../access.js";
|
import { FarcdnAccess } from "../access.js";
|
||||||
import { AbstractPlusTaskPlugin } from "@certd/plugin-plus";
|
|
||||||
|
|
||||||
@IsTaskPlugin({
|
@IsTaskPlugin({
|
||||||
//命名规范,插件类型+功能(就是目录plugin-demo中的demo),大写字母开头,驼峰命名
|
//命名规范,插件类型+功能(就是目录plugin-demo中的demo),大写字母开头,驼峰命名
|
||||||
|
@ -12,7 +11,7 @@ import { AbstractPlusTaskPlugin } from "@certd/plugin-plus";
|
||||||
icon: "svg:icon-lucky",
|
icon: "svg:icon-lucky",
|
||||||
//插件分组
|
//插件分组
|
||||||
group: pluginGroups.cdn.key,
|
group: pluginGroups.cdn.key,
|
||||||
needPlus: true,
|
needPlus: false,
|
||||||
default: {
|
default: {
|
||||||
//默认值配置照抄即可
|
//默认值配置照抄即可
|
||||||
strategy: {
|
strategy: {
|
||||||
|
@ -21,7 +20,7 @@ import { AbstractPlusTaskPlugin } from "@certd/plugin-plus";
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
//类名规范,跟上面插件名称(name)一致
|
//类名规范,跟上面插件名称(name)一致
|
||||||
export class FarcdnRefreshCert extends AbstractPlusTaskPlugin {
|
export class FarcdnRefreshCert extends AbstractTaskPlugin {
|
||||||
//证书选择,此项必须要有
|
//证书选择,此项必须要有
|
||||||
@TaskInput({
|
@TaskInput({
|
||||||
title: "域名证书",
|
title: "域名证书",
|
||||||
|
|
|
@ -61,21 +61,23 @@ export class GithubCheckRelease extends AbstractTaskPlugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
//插件执行方法
|
//插件执行方法
|
||||||
async execute(): Promise<void> {
|
async execute(): Promise<string> {
|
||||||
const access = await this.getAccess<GithubAccess>(this.accessId);
|
const access = await this.getAccess<GithubAccess>(this.accessId);
|
||||||
|
|
||||||
const res = await access.getRelease({repoName:this.repoName})
|
const res = await access.getRelease({repoName:this.repoName})
|
||||||
|
if(res == null){
|
||||||
|
throw new Error(`获取${this.repoName}最新版本失败`)
|
||||||
|
}
|
||||||
const lastVersion = this.ctx.lastStatus?.status?.output?.lastVersion;
|
const lastVersion = this.ctx.lastStatus?.status?.output?.lastVersion;
|
||||||
|
|
||||||
if(res.tag_name == null || res.tag_name ==lastVersion){
|
if(res.tag_name == null || res.tag_name ==lastVersion){
|
||||||
this.logger.info(`暂无更新,${res.tag_name}`);
|
this.logger.info(`暂无更新,${res.tag_name}`);
|
||||||
return
|
return "skip"
|
||||||
}
|
}
|
||||||
//有更新
|
//有更新
|
||||||
this.logger.info(`有更新,${lastVersion}->${res.tag_name}`)
|
this.logger.info(`有更新,${lastVersion??"0"}->${res.tag_name}`)
|
||||||
this.lastVersion = res.tag_name;
|
this.lastVersion = res.tag_name;
|
||||||
|
|
||||||
|
const body = res.body.replaceAll("* ","- ")
|
||||||
//发送通知
|
//发送通知
|
||||||
for (const notificationId of this.notificationIds) {
|
for (const notificationId of this.notificationIds) {
|
||||||
await this.ctx.notificationService.send({
|
await this.ctx.notificationService.send({
|
||||||
|
@ -85,7 +87,7 @@ export class GithubCheckRelease extends AbstractTaskPlugin {
|
||||||
logger: this.logger,
|
logger: this.logger,
|
||||||
body: {
|
body: {
|
||||||
title: `${this.repoName} 新版本 ${this.lastVersion} 发布`,
|
title: `${this.repoName} 新版本 ${this.lastVersion} 发布`,
|
||||||
content: `${res.body}`,
|
content: `${body}\n\n > [Certd](https://certd.docmirror.cn),不止证书自动化,插件解锁无限可能!\n\n`,
|
||||||
url: `https://github.com/${this.repoName}/releases/tag/${this.lastVersion}`,
|
url: `https://github.com/${this.repoName}/releases/tag/${this.lastVersion}`,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -9,10 +9,10 @@ export class EmailNotification extends BaseNotification {
|
||||||
@NotificationInput({
|
@NotificationInput({
|
||||||
title: '收件人邮箱',
|
title: '收件人邮箱',
|
||||||
component: {
|
component: {
|
||||||
name: 'a-select',
|
name: 'email-selector',
|
||||||
vModel: 'value',
|
vModel: 'value',
|
||||||
mode: 'tags',
|
mode: 'tags',
|
||||||
open: false,
|
// open: false,
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
helper: '可以填写多个,填写一个按回车键再填写下一个\n需要先[配置邮件服务器](#/sys/settings/email)',
|
helper: '可以填写多个,填写一个按回车键再填写下一个\n需要先[配置邮件服务器](#/sys/settings/email)',
|
||||||
|
|
|
@ -55,14 +55,14 @@ export class QywxNotification extends BaseNotification {
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
|
const color = body.errorMessage?'red':'green';
|
||||||
await this.http.request({
|
await this.http.request({
|
||||||
url: this.webhook,
|
url: this.webhook,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
msgtype: 'text',
|
msgtype: 'markdown',
|
||||||
text: {
|
markdown: {
|
||||||
content: `${body.title}\n${body.content}\n查看详情: ${body.url}`,
|
content: `<font color='${color}'>${body.title}</font>\n\n\n${body.content}\n\n[查看详情](${body.url})`,
|
||||||
mentioned_list: this.mentionedList,
|
mentioned_list: this.mentionedList,
|
||||||
mentioned_mobile_list: this.mentionedMobileList,
|
mentioned_mobile_list: this.mentionedMobileList,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue