mirror of
https://github.com/certd/certd.git
synced 2026-04-14 04:20:52 +08:00
Compare commits
100 Commits
v1.36.3
...
v2-dev-ord
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
69e6f2362e | ||
|
|
ab84835362 | ||
|
|
41ce8489dc | ||
|
|
edf089ec9e | ||
|
|
0ae9a3605c | ||
|
|
7f9c4e52ac | ||
|
|
35947f96a8 | ||
|
|
b0f91f1eea | ||
|
|
13dfca1749 | ||
|
|
9d9cd8a362 | ||
|
|
5e5c41fda5 | ||
|
|
3ebdc52b3e | ||
|
|
8656059151 | ||
|
|
a6d38f2458 | ||
|
|
085bdf5cfa | ||
|
|
6883bcacee | ||
|
|
2ecc6e0368 | ||
|
|
8fb5ca2fe1 | ||
|
|
e40345095f | ||
|
|
ffc0c7bb7b | ||
|
|
58fadc8928 | ||
|
|
d96a607c04 | ||
|
|
2ea2c8c05f | ||
|
|
b15f514018 | ||
|
|
05a33a0ec9 | ||
|
|
747d266742 | ||
|
|
6135a44a8d | ||
|
|
7c7d646792 | ||
|
|
4a36fd2ec3 | ||
|
|
b1bcc287cb | ||
|
|
6f5868a9d7 | ||
|
|
75863441f4 | ||
|
|
9763cb00e5 | ||
|
|
1921a64f4b | ||
|
|
6b73f5d555 | ||
|
|
e0408f30ba | ||
|
|
dca44fa093 | ||
|
|
bbacb76581 | ||
|
|
1da8617a53 | ||
|
|
e5967f7e9d | ||
|
|
65d84f9e9d | ||
|
|
93e9498b41 | ||
|
|
95332d5db9 | ||
|
|
9864792bbf | ||
|
|
ca9d1eed7a | ||
|
|
38e867c917 | ||
|
|
3ee1dbb8a5 | ||
|
|
b4571d5c98 | ||
|
|
29d49d72f9 | ||
|
|
81de0fc7e4 | ||
|
|
9d5d266d2a | ||
|
|
b97935299f | ||
|
|
32a7ea1c16 | ||
|
|
9fd95e6a1e | ||
|
|
61ba83c775 | ||
|
|
6369fed5fc | ||
|
|
42f4d1477d | ||
|
|
609ac9c9a2 | ||
|
|
79f2367472 | ||
|
|
dfc9362084 | ||
|
|
487b469603 | ||
|
|
19e1df1e5d | ||
|
|
fc55010888 | ||
|
|
56a36aa595 | ||
|
|
0b3158fdd5 | ||
|
|
896cd950e9 | ||
|
|
af5e1b805f | ||
|
|
3f9943270c | ||
|
|
902d246d1a | ||
|
|
785bee2b39 | ||
|
|
4b335db31c | ||
|
|
4bef527ebb | ||
|
|
8273031d7e | ||
|
|
24d3096752 | ||
|
|
9a3754fbf8 | ||
|
|
c2a95a13fe | ||
|
|
b46466ac96 | ||
|
|
06991ddb17 | ||
|
|
4b3f4a868a | ||
|
|
014eff3534 | ||
|
|
c01b7ddb59 | ||
|
|
0ff700849f | ||
|
|
5c695dea20 | ||
|
|
c7ee4ca4db | ||
|
|
c3da026b33 | ||
|
|
98da4e1791 | ||
|
|
8626b6d9f2 | ||
|
|
80c5331a5d | ||
|
|
39dc5c8160 | ||
|
|
f3002e4fb6 | ||
|
|
c451823c2b | ||
|
|
b37cffd704 | ||
|
|
2af91dbf2a | ||
|
|
f2551318fc | ||
|
|
22eb84f944 | ||
|
|
1ece0915f1 | ||
|
|
87853a2015 | ||
|
|
46a1b74799 | ||
|
|
0f6e7e5eab | ||
|
|
5dfa9615d2 |
77
CHANGELOG.md
77
CHANGELOG.md
@@ -3,6 +3,83 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 安全更新,备份数据库插件仅限管理员运行 ([13dfca1](https://github.com/certd/certd/commit/13dfca1749275526c82465a17c482b607c820fdd))
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 企业微信通知改成text类型,因为markdown类型不支持@用户 ([747d266](https://github.com/certd/certd/commit/747d26674248082e678a3fd5ecc94712641a2716))
|
||||||
|
* api接口获取不到证书的bug ([05a33a0](https://github.com/certd/certd/commit/05a33a0ec9999e2802f6c7b23cc1c61a2b9e963d))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到阿里云oss插件支持选择上传到阿里云cas中的证书 ([2ea2c8c](https://github.com/certd/certd/commit/2ea2c8c05fc40f79595f1bbde67c1413558bf684))
|
||||||
|
* 优化子域名托管的说明 ([b15f514](https://github.com/certd/certd/commit/b15f514018b728acb0922ee3f93c1f302eb5d471))
|
||||||
|
* 账号即将过期通知 ([e403450](https://github.com/certd/certd/commit/e40345095f31e2fb8e2333a6647466659133fa0c))
|
||||||
|
* 子域名托管重复域名不允许添加 ([ffc0c7b](https://github.com/certd/certd/commit/ffc0c7bb7b16d9904fd2d905d1c4e1d4854e92a9))
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复ssh无法执行命令的bug ([9763cb0](https://github.com/certd/certd/commit/9763cb00e5d95b2fa5d1c2d3d4a8eecac71600e6))
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复流水线列表页报length错误的bug ([9864792](https://github.com/certd/certd/commit/9864792bbfd149e770d6e1ffa809573694f99dd3))
|
||||||
|
* 修复流水线页面状态没有刷新的bug ([93e9498](https://github.com/certd/certd/commit/93e9498b410353f504e11e264db62468895d7290))
|
||||||
|
* 修复自定义证书检查时间重启之后不生效的bug ([38e867c](https://github.com/certd/certd/commit/38e867c917bbc68bd228bdd8064f3e7358d6413d))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持上传证书到各种对象存储,oss、cos、七牛、s3、minio等 ([1da8617](https://github.com/certd/certd/commit/1da8617a53a675776635bbc3bcb3c6d7dff83e27))
|
||||||
|
* 支持邮箱发送证书 ([95332d5](https://github.com/certd/certd/commit/95332d5db96cd54ddab6ab737332417a09169b39))
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复某些页面翻译不全显示错误的bug ([0b3158f](https://github.com/certd/certd/commit/0b3158fdd5fe5bb0a98c4e65715dbc3de2c38047))
|
||||||
|
* 修复运行流水线后会闪烁一下的bug ([dfc9362](https://github.com/certd/certd/commit/dfc9362084082ee535b898f23b2609c1d946a6fd))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署plesk证书,支持删除未使用的证书 ([902d246](https://github.com/certd/certd/commit/902d246d1a7473ad90f604028c4eb09c8c67d99c))
|
||||||
|
* 通知和定时器的删除按钮显示为红色更显眼 ([61ba83c](https://github.com/certd/certd/commit/61ba83c77546c3d505d081e19a3d68c127662bf1))
|
||||||
|
* 优化流水线列表页面、详情页面性能,精简返回数据 ([609ac9c](https://github.com/certd/certd/commit/609ac9c9a2dde605eb09834ae59693c1cb238765))
|
||||||
|
* 支持自动选择校验方式申请证书 ([3f99432](https://github.com/certd/certd/commit/3f9943270cfb12946e38e6272bc5e8d95ad6ab9e))
|
||||||
|
* OpenAPI支持autoApply参数 ([42f4d14](https://github.com/certd/certd/commit/42f4d1477dc791520a874aed56035abcbc8c433b))
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 某些插件找不到的bug ([4b3f4a8](https://github.com/certd/certd/commit/4b3f4a868a8b0800c5c59de9d0f47bddc079e7b3))
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复查看证书对话框翻译错误的bug ([8626b6d](https://github.com/certd/certd/commit/8626b6d9f235c511766f2ae98e0a37f6cebb621c))
|
||||||
|
* 修复translation后分组编辑打不开的bug ([46a1b74](https://github.com/certd/certd/commit/46a1b7479923d2feb2dece202a5932b99981b2cd))
|
||||||
|
* 执行windows nginx命令时,改为return code判断是否执行成功 ([b37cffd](https://github.com/certd/certd/commit/b37cffd704cd08b8bdd68a6e284706eabe59e78d))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化证书进度条颜色 ([2af91db](https://github.com/certd/certd/commit/2af91dbf2ae36a4ed17c6788bc2a2a79a3bb29f8))
|
||||||
|
* 站点证书即将过期通知标题颜色优化为红色 ([80c5331](https://github.com/certd/certd/commit/80c5331a5d4c320323d9b9b800e4ea3b72577b33))
|
||||||
|
* 支持部署到阿里云vod ([98da4e1](https://github.com/certd/certd/commit/98da4e1791ed8bb21daf2a9914fda875d14633c9))
|
||||||
|
* 支持部署证书到网宿CDN ([c3da026](https://github.com/certd/certd/commit/c3da026b33106f5195959825a68cadbe49efef00))
|
||||||
|
* 重置管理员密码同时可以清除管理员的2FA设置 ([1ece091](https://github.com/certd/certd/commit/1ece0915f172d5f8b8adb866434e7efcc5c8c46d))
|
||||||
|
* output-selector from参数支持更丰富的过滤规则 ([87853a2](https://github.com/certd/certd/commit/87853a201535f3bfe8505c40f8f5229d82ffcc73))
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
00:47
|
12:27
|
||||||
|
|||||||
@@ -3,6 +3,93 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 安全更新,备份数据库插件仅限管理员运行 ([13dfca1](https://github.com/certd/certd/commit/13dfca1749275526c82465a17c482b607c820fdd))
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 企业微信通知改成text类型,因为markdown类型不支持@用户 ([747d266](https://github.com/certd/certd/commit/747d26674248082e678a3fd5ecc94712641a2716))
|
||||||
|
* api接口获取不到证书的bug ([05a33a0](https://github.com/certd/certd/commit/05a33a0ec9999e2802f6c7b23cc1c61a2b9e963d))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到阿里云oss插件支持选择上传到阿里云cas中的证书 ([2ea2c8c](https://github.com/certd/certd/commit/2ea2c8c05fc40f79595f1bbde67c1413558bf684))
|
||||||
|
* 优化子域名托管的说明 ([b15f514](https://github.com/certd/certd/commit/b15f514018b728acb0922ee3f93c1f302eb5d471))
|
||||||
|
* 账号即将过期通知 ([e403450](https://github.com/certd/certd/commit/e40345095f31e2fb8e2333a6647466659133fa0c))
|
||||||
|
* 子域名托管重复域名不允许添加 ([ffc0c7b](https://github.com/certd/certd/commit/ffc0c7bb7b16d9904fd2d905d1c4e1d4854e92a9))
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复ssh无法执行命令的bug ([9763cb0](https://github.com/certd/certd/commit/9763cb00e5d95b2fa5d1c2d3d4a8eecac71600e6))
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复流水线列表页报length错误的bug ([9864792](https://github.com/certd/certd/commit/9864792bbfd149e770d6e1ffa809573694f99dd3))
|
||||||
|
* 修复流水线页面状态没有刷新的bug ([93e9498](https://github.com/certd/certd/commit/93e9498b410353f504e11e264db62468895d7290))
|
||||||
|
* 修复自定义证书检查时间重启之后不生效的bug ([38e867c](https://github.com/certd/certd/commit/38e867c917bbc68bd228bdd8064f3e7358d6413d))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持上传证书到各种对象存储,oss、cos、七牛、s3、minio等 ([1da8617](https://github.com/certd/certd/commit/1da8617a53a675776635bbc3bcb3c6d7dff83e27))
|
||||||
|
* 支持邮箱发送证书 ([95332d5](https://github.com/certd/certd/commit/95332d5db96cd54ddab6ab737332417a09169b39))
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复某些页面翻译不全显示错误的bug ([0b3158f](https://github.com/certd/certd/commit/0b3158fdd5fe5bb0a98c4e65715dbc3de2c38047))
|
||||||
|
* 修复运行流水线后会闪烁一下的bug ([dfc9362](https://github.com/certd/certd/commit/dfc9362084082ee535b898f23b2609c1d946a6fd))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署plesk证书,支持删除未使用的证书 ([902d246](https://github.com/certd/certd/commit/902d246d1a7473ad90f604028c4eb09c8c67d99c))
|
||||||
|
* 通知和定时器的删除按钮显示为红色更显眼 ([61ba83c](https://github.com/certd/certd/commit/61ba83c77546c3d505d081e19a3d68c127662bf1))
|
||||||
|
* 优化流水线列表页面、详情页面性能,精简返回数据 ([609ac9c](https://github.com/certd/certd/commit/609ac9c9a2dde605eb09834ae59693c1cb238765))
|
||||||
|
* 支持自动选择校验方式申请证书 ([3f99432](https://github.com/certd/certd/commit/3f9943270cfb12946e38e6272bc5e8d95ad6ab9e))
|
||||||
|
* OpenAPI支持autoApply参数 ([42f4d14](https://github.com/certd/certd/commit/42f4d1477dc791520a874aed56035abcbc8c433b))
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 某些插件找不到的bug ([4b3f4a8](https://github.com/certd/certd/commit/4b3f4a868a8b0800c5c59de9d0f47bddc079e7b3))
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复查看证书对话框翻译错误的bug ([8626b6d](https://github.com/certd/certd/commit/8626b6d9f235c511766f2ae98e0a37f6cebb621c))
|
||||||
|
* 修复translation后分组编辑打不开的bug ([46a1b74](https://github.com/certd/certd/commit/46a1b7479923d2feb2dece202a5932b99981b2cd))
|
||||||
|
* 执行windows nginx命令时,改为return code判断是否执行成功 ([b37cffd](https://github.com/certd/certd/commit/b37cffd704cd08b8bdd68a6e284706eabe59e78d))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化证书进度条颜色 ([2af91db](https://github.com/certd/certd/commit/2af91dbf2ae36a4ed17c6788bc2a2a79a3bb29f8))
|
||||||
|
* 站点证书即将过期通知标题颜色优化为红色 ([80c5331](https://github.com/certd/certd/commit/80c5331a5d4c320323d9b9b800e4ea3b72577b33))
|
||||||
|
* 支持部署到阿里云vod ([98da4e1](https://github.com/certd/certd/commit/98da4e1791ed8bb21daf2a9914fda875d14633c9))
|
||||||
|
* 支持部署证书到网宿CDN ([c3da026](https://github.com/certd/certd/commit/c3da026b33106f5195959825a68cadbe49efef00))
|
||||||
|
* 重置管理员密码同时可以清除管理员的2FA设置 ([1ece091](https://github.com/certd/certd/commit/1ece0915f172d5f8b8adb866434e7efcc5c8c46d))
|
||||||
|
* output-selector from参数支持更丰富的过滤规则 ([87853a2](https://github.com/certd/certd/commit/87853a201535f3bfe8505c40f8f5229d82ffcc73))
|
||||||
|
|
||||||
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复开放接口添加按钮文本显示问题 ([f93ba99](https://github.com/certd/certd/commit/f93ba9970c12680f38eba2a7abd4b72cf3f5b6a6))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化部署到腾讯TKE插件,支持Opaque类型选择,优化填写说明 ([1445325](https://github.com/certd/certd/commit/144532530a865b634e68539e4888e26f52f73492))
|
||||||
|
|
||||||
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
## [1.36.2](https://github.com/certd/certd/compare/v1.36.1...v1.36.2) (2025-07-06)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
BIN
docs/guide/install/images/github-release-2.png
Normal file
BIN
docs/guide/install/images/github-release-2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
BIN
docs/guide/install/images/github-release.png
Normal file
BIN
docs/guide/install/images/github-release.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -13,4 +13,54 @@
|
|||||||
:::
|
:::
|
||||||
|
|
||||||
## 升级日志
|
## 升级日志
|
||||||
|
可以查看最新版本号,以及所有版本的更新日志
|
||||||
[CHANGELOG](../changelogs/CHANGELOG.md)
|
[CHANGELOG](../changelogs/CHANGELOG.md)
|
||||||
|
|
||||||
|
|
||||||
|
## 自动升级配置
|
||||||
|
|
||||||
|
### 1. 方法一:使用watchtower监控
|
||||||
|
|
||||||
|
修改docker-compose.yaml文件增加如下配置, 使用watchtower监控自动升级
|
||||||
|
```yaml
|
||||||
|
services:
|
||||||
|
certd:
|
||||||
|
...
|
||||||
|
labels:
|
||||||
|
com.centurylinklabs.watchtower.enable: "true"
|
||||||
|
|
||||||
|
# ↓↓↓↓ --------------------------------------------------------- 自动升级,上面certd的版本号要保持为latest
|
||||||
|
certd-updater: # 添加 Watchtower 服务
|
||||||
|
image: containrrr/watchtower:latest
|
||||||
|
container_name: certd-updater
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
# 配置 自动更新
|
||||||
|
environment:
|
||||||
|
- WATCHTOWER_CLEANUP=true # 自动清理旧版本容器
|
||||||
|
- WATCHTOWER_INCLUDE_STOPPED=false # 不更新已停止的容器
|
||||||
|
- WATCHTOWER_LABEL_ENABLE=true # 根据容器标签进行更新
|
||||||
|
- WATCHTOWER_POLL_INTERVAL=600 # 每 10 分钟检查一次更新
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### 2. 方法二:使用Certd版本监控功能
|
||||||
|
|
||||||
|
选择Github-检查Release版本插件
|
||||||
|

|
||||||
|
按如下图填写配置
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
检测到新版本后执行宿主机升级命令:
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# 拉取最新镜像
|
||||||
|
docker pull registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest
|
||||||
|
# 升级容器命令, 替换成你自己的certd更新命令
|
||||||
|
export RESTART_CERT='sleep 10; cd ~/deploy/certd/ ; docker compose down; docker compose up -d'
|
||||||
|
# 构造一个脚本10s后在后台执行,避免容器销毁时执行太快,导致流水线任务无法结束
|
||||||
|
nohup sh -c '$RESTART_CERT' >/dev/null 2>&1 & echo '10秒后重启' && exit
|
||||||
|
```
|
||||||
@@ -9,5 +9,5 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmClient": "pnpm",
|
"npmClient": "pnpm",
|
||||||
"version": "1.36.3"
|
"version": "1.36.11"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
},
|
},
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@certd/ui-server": "link:packages/ui/certd-server",
|
||||||
"axios": "^1.7.7",
|
"axios": "^1.7.7",
|
||||||
"copyfiles": "^2.4.1",
|
"copyfiles": "^2.4.1",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
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.36.11](https://github.com/publishlab/node-acme-client/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/publishlab/node-acme-client/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/publishlab/node-acme-client/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/publishlab/node-acme-client/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/publishlab/node-acme-client/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/publishlab/node-acme-client/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/publishlab/node-acme-client/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
## [1.36.3](https://github.com/publishlab/node-acme-client/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/publishlab/node-acme-client/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
**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.36.3",
|
"version": "1.36.11",
|
||||||
"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.36.3",
|
"@certd/basic": "^1.36.11",
|
||||||
"@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": "ce4dc9e3fa1af0702398c6f3809d33ced8cec284"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/basic
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
22:18
|
12:23
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/basic",
|
"name": "@certd/basic",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.3",
|
"version": "1.36.11",
|
||||||
"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": "ce4dc9e3fa1af0702398c6f3809d33ced8cec284"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,38 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 安全更新,备份数据库插件仅限管理员运行 ([13dfca1](https://github.com/certd/certd/commit/13dfca1749275526c82465a17c482b607c820fdd))
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持邮箱发送证书 ([95332d5](https://github.com/certd/certd/commit/95332d5db96cd54ddab6ab737332417a09169b39))
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/pipeline
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/pipeline",
|
"name": "@certd/pipeline",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.3",
|
"version": "1.36.11",
|
||||||
"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.36.3",
|
"@certd/basic": "^1.36.11",
|
||||||
"@certd/plus-core": "^1.36.3",
|
"@certd/plus-core": "^1.36.11",
|
||||||
"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": "ce4dc9e3fa1af0702398c6f3809d33ced8cec284"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -352,6 +352,7 @@ export class Executor {
|
|||||||
pipeline: this.pipeline,
|
pipeline: this.pipeline,
|
||||||
runtime: this.runtime,
|
runtime: this.runtime,
|
||||||
step,
|
step,
|
||||||
|
define: cloneDeep(define),
|
||||||
lastStatus,
|
lastStatus,
|
||||||
http,
|
http,
|
||||||
download,
|
download,
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ export type PluginDefine = Registrable & {
|
|||||||
form: any;
|
form: any;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
onlyAdmin?: boolean;
|
||||||
needPlus?: boolean;
|
needPlus?: boolean;
|
||||||
showRunStrategy?: boolean;
|
showRunStrategy?: boolean;
|
||||||
pluginType?: string; //类型
|
pluginType?: string; //类型
|
||||||
@@ -85,6 +86,7 @@ export type TaskInstanceContext = {
|
|||||||
runtime: RunHistory;
|
runtime: RunHistory;
|
||||||
//步骤定义
|
//步骤定义
|
||||||
step: Step;
|
step: Step;
|
||||||
|
define: PluginDefine;
|
||||||
//日志
|
//日志
|
||||||
logger: ILogger;
|
logger: ILogger;
|
||||||
//当前步骤输入参数跟上一次执行比较是否有变化
|
//当前步骤输入参数跟上一次执行比较是否有变化
|
||||||
@@ -162,6 +164,12 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|||||||
this.registerSecret(cert.key);
|
this.registerSecret(cert.key);
|
||||||
this.registerSecret(cert.one);
|
this.registerSecret(cert.one);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.ctx.define.onlyAdmin) {
|
||||||
|
if (!this.isAdmin()) {
|
||||||
|
throw new Error("只有管理员才能运行此任务");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAccess<T = any>(accessId: string | number, isCommon = false) {
|
async getAccess<T = any>(accessId: string | number, isCommon = false) {
|
||||||
|
|||||||
@@ -30,4 +30,5 @@ export const pluginGroups = {
|
|||||||
qiniu: new PluginGroup("qiniu", "七牛云", 5, "svg:icon-qiniuyun"),
|
qiniu: new PluginGroup("qiniu", "七牛云", 5, "svg:icon-qiniuyun"),
|
||||||
aws: new PluginGroup("aws", "亚马逊云", 6, "svg:icon-aws"),
|
aws: new PluginGroup("aws", "亚马逊云", 6, "svg:icon-aws"),
|
||||||
other: new PluginGroup("other", "其他", 10, "clarity:plugin-line"),
|
other: new PluginGroup("other", "其他", 10, "clarity:plugin-line"),
|
||||||
|
admin: new PluginGroup("admin", "管理", 11, "ion:settings-outline"),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
export type EmailSend = {
|
export type EmailSend = {
|
||||||
subject: string;
|
subject: string;
|
||||||
content: string;
|
|
||||||
receivers: string[];
|
receivers: string[];
|
||||||
|
content?: string;
|
||||||
|
attachments?: any[];
|
||||||
|
html?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface IEmailService {
|
export interface IEmailService {
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
**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.36.3",
|
"version": "1.36.11",
|
||||||
"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": "ce4dc9e3fa1af0702398c6f3809d33ced8cec284"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
**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.36.3",
|
"version": "1.36.11",
|
||||||
"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": "ce4dc9e3fa1af0702398c6f3809d33ced8cec284"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
**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.36.3",
|
"version": "1.36.11",
|
||||||
"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": "ce4dc9e3fa1af0702398c6f3809d33ced8cec284"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
**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.36.3",
|
"version": "1.36.11",
|
||||||
"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.36.3",
|
"@certd/basic": "^1.36.11",
|
||||||
"@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": "ce4dc9e3fa1af0702398c6f3809d33ced8cec284"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export * from './lib/k8s.client.js';
|
export * from "./lib/k8s.client.js";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { CoreV1Api, KubeConfig, NetworkingV1Api, V1Ingress, V1Secret } from '@kubernetes/client-node';
|
import { CoreV1Api, KubeConfig, NetworkingV1Api, V1Ingress, V1Secret } from "@kubernetes/client-node";
|
||||||
import dns from 'dns';
|
import dns from "dns";
|
||||||
import { ILogger } from '@certd/basic';
|
import { ILogger } from "@certd/basic";
|
||||||
import _ from 'lodash-es';
|
import _ from "lodash-es";
|
||||||
|
|
||||||
export type K8sClientOpts = {
|
export type K8sClientOpts = {
|
||||||
kubeConfigStr: string;
|
kubeConfigStr: string;
|
||||||
@@ -9,6 +9,7 @@ export type K8sClientOpts = {
|
|||||||
//{ [domain]:{ip:'xxx.xx.xxx'} }
|
//{ [domain]:{ip:'xxx.xx.xxx'} }
|
||||||
//暂时没用
|
//暂时没用
|
||||||
lookup?: any;
|
lookup?: any;
|
||||||
|
skipTLSVerify?: boolean;
|
||||||
};
|
};
|
||||||
export class K8sClient {
|
export class K8sClient {
|
||||||
kubeconfig!: KubeConfig;
|
kubeconfig!: KubeConfig;
|
||||||
@@ -16,10 +17,12 @@ export class K8sClient {
|
|||||||
lookup!: (hostnameReq: any, options: any, callback: any) => void;
|
lookup!: (hostnameReq: any, options: any, callback: any) => void;
|
||||||
client!: CoreV1Api;
|
client!: CoreV1Api;
|
||||||
logger: ILogger;
|
logger: ILogger;
|
||||||
|
skipTLSVerify?: boolean;
|
||||||
constructor(opts: K8sClientOpts) {
|
constructor(opts: K8sClientOpts) {
|
||||||
this.kubeConfigStr = opts.kubeConfigStr;
|
this.kubeConfigStr = opts.kubeConfigStr;
|
||||||
this.logger = opts.logger;
|
this.logger = opts.logger;
|
||||||
this.setLookup(opts.lookup);
|
this.setLookup(opts.lookup);
|
||||||
|
this.skipTLSVerify = opts.skipTLSVerify;
|
||||||
this.init();
|
this.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -27,6 +30,18 @@ export class K8sClient {
|
|||||||
const kubeconfig = new KubeConfig();
|
const kubeconfig = new KubeConfig();
|
||||||
kubeconfig.loadFromString(this.kubeConfigStr);
|
kubeconfig.loadFromString(this.kubeConfigStr);
|
||||||
this.kubeconfig = kubeconfig;
|
this.kubeconfig = kubeconfig;
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (this.skipTLSVerify == true) {
|
||||||
|
for (const cluster of kubeconfig.getClusters()) {
|
||||||
|
// @ts-ignore
|
||||||
|
cluster["skipTLSVerify"] = this.skipTLSVerify;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.logger.warn("skipTLSVerify error", e);
|
||||||
|
}
|
||||||
|
|
||||||
this.client = kubeconfig.makeApiClient(CoreV1Api);
|
this.client = kubeconfig.makeApiClient(CoreV1Api);
|
||||||
|
|
||||||
// const reqOpts = { kubeconfig, request: {} } as any;
|
// const reqOpts = { kubeconfig, request: {} } as any;
|
||||||
@@ -47,9 +62,9 @@ export class K8sClient {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.lookup = (hostnameReq: any, options: any, callback: any) => {
|
this.lookup = (hostnameReq: any, options: any, callback: any) => {
|
||||||
this.logger.info('custom lookup', hostnameReq, localRecords);
|
this.logger.info("custom lookup", hostnameReq, localRecords);
|
||||||
if (localRecords[hostnameReq]) {
|
if (localRecords[hostnameReq]) {
|
||||||
this.logger.info('local record', hostnameReq, localRecords[hostnameReq]);
|
this.logger.info("local record", hostnameReq, localRecords[hostnameReq]);
|
||||||
callback(null, localRecords[hostnameReq].ip, 4);
|
callback(null, localRecords[hostnameReq].ip, 4);
|
||||||
} else {
|
} else {
|
||||||
dns.lookup(hostnameReq, options, callback);
|
dns.lookup(hostnameReq, options, callback);
|
||||||
@@ -63,7 +78,7 @@ export class K8sClient {
|
|||||||
* @returns secretsList
|
* @returns secretsList
|
||||||
*/
|
*/
|
||||||
async getSecrets(opts: { namespace: string }) {
|
async getSecrets(opts: { namespace: string }) {
|
||||||
const namespace = opts.namespace || 'default';
|
const namespace = opts.namespace || "default";
|
||||||
return await this.client.listNamespacedSecret(namespace);
|
return await this.client.listNamespacedSecret(namespace);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,9 +88,9 @@ export class K8sClient {
|
|||||||
* @returns {Promise<*>}
|
* @returns {Promise<*>}
|
||||||
*/
|
*/
|
||||||
async createSecret(opts: { namespace: string; body: V1Secret }) {
|
async createSecret(opts: { namespace: string; body: V1Secret }) {
|
||||||
const namespace = opts.namespace || 'default';
|
const namespace = opts.namespace || "default";
|
||||||
const created = await this.client.createNamespacedSecret(namespace, opts.body);
|
const created = await this.client.createNamespacedSecret(namespace, opts.body);
|
||||||
this.logger.info('new secrets:', opts.body);
|
this.logger.info("new secrets:", opts.body);
|
||||||
return created.body;
|
return created.body;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -89,24 +104,24 @@ export class K8sClient {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
async patchSecret(opts: { namespace: string; secretName: string; body: V1Secret }) {
|
async patchSecret(opts: { namespace: string; secretName: string; body: V1Secret }) {
|
||||||
const namespace = opts.namespace || 'default';
|
const namespace = opts.namespace || "default";
|
||||||
const secretName = opts.secretName;
|
const secretName = opts.secretName;
|
||||||
if (secretName == null) {
|
if (secretName == null) {
|
||||||
throw new Error('secretName 不能为空');
|
throw new Error("secretName 不能为空");
|
||||||
}
|
}
|
||||||
this.logger.info('patch secret:', secretName, namespace);
|
this.logger.info("patch secret:", secretName, namespace);
|
||||||
const oldSecret = await this.client.readNamespacedSecret(secretName, namespace);
|
const oldSecret = await this.client.readNamespacedSecret(secretName, namespace);
|
||||||
const newSecret = _.merge(oldSecret.body, opts.body);
|
const newSecret = _.merge(oldSecret.body, opts.body);
|
||||||
const res = await this.client.replaceNamespacedSecret(secretName, namespace, newSecret);
|
const res = await this.client.replaceNamespacedSecret(secretName, namespace, newSecret);
|
||||||
this.logger.info('secret updated');
|
this.logger.info("secret updated");
|
||||||
return res.body;
|
return res.body;
|
||||||
}
|
}
|
||||||
|
|
||||||
async getIngressList(opts: { namespace: string }) {
|
async getIngressList(opts: { namespace: string }) {
|
||||||
const namespace = opts.namespace || 'default';
|
const namespace = opts.namespace || "default";
|
||||||
const client = this.kubeconfig.makeApiClient(NetworkingV1Api);
|
const client = this.kubeconfig.makeApiClient(NetworkingV1Api);
|
||||||
const res = await client.listNamespacedIngress(namespace);
|
const res = await client.listNamespacedIngress(namespace);
|
||||||
this.logger.info('ingress list get:', res.body);
|
this.logger.info("ingress list get:", res.body);
|
||||||
return res.body;
|
return res.body;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -122,17 +137,17 @@ export class K8sClient {
|
|||||||
// }
|
// }
|
||||||
|
|
||||||
async patchIngress(opts: { namespace: string; ingressName: string; body: V1Ingress }) {
|
async patchIngress(opts: { namespace: string; ingressName: string; body: V1Ingress }) {
|
||||||
const namespace = opts.namespace || 'default';
|
const namespace = opts.namespace || "default";
|
||||||
const ingressName = opts.ingressName;
|
const ingressName = opts.ingressName;
|
||||||
if (!ingressName) {
|
if (!ingressName) {
|
||||||
throw new Error('ingressName 不能为空');
|
throw new Error("ingressName 不能为空");
|
||||||
}
|
}
|
||||||
this.logger.info('patch ingress:', ingressName, namespace);
|
this.logger.info("patch ingress:", ingressName, namespace);
|
||||||
const client = this.kubeconfig.makeApiClient(NetworkingV1Api);
|
const client = this.kubeconfig.makeApiClient(NetworkingV1Api);
|
||||||
const oldIngress = await client.readNamespacedIngress(ingressName, namespace);
|
const oldIngress = await client.readNamespacedIngress(ingressName, namespace);
|
||||||
const newIngress = _.merge(oldIngress.body, opts.body);
|
const newIngress = _.merge(oldIngress.body, opts.body);
|
||||||
const res = await client.replaceNamespacedIngress(ingressName, namespace, newIngress);
|
const res = await client.replaceNamespacedIngress(ingressName, namespace, newIngress);
|
||||||
this.logger.info('ingress patched', opts.body);
|
this.logger.info("ingress patched", opts.body);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,37 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化流水线列表页面、详情页面性能,精简返回数据 ([609ac9c](https://github.com/certd/certd/commit/609ac9c9a2dde605eb09834ae59693c1cb238765))
|
||||||
|
* OpenAPI支持autoApply参数 ([42f4d14](https://github.com/certd/certd/commit/42f4d1477dc791520a874aed56035abcbc8c433b))
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
**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.36.3",
|
"version": "1.36.11",
|
||||||
"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.36.3",
|
"@certd/acme-client": "^1.36.11",
|
||||||
"@certd/basic": "^1.36.3",
|
"@certd/basic": "^1.36.11",
|
||||||
"@certd/pipeline": "^1.36.3",
|
"@certd/pipeline": "^1.36.11",
|
||||||
"@certd/plus-core": "^1.36.3",
|
"@certd/plus-core": "^1.36.11",
|
||||||
"@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": "ce4dc9e3fa1af0702398c6f3809d33ced8cec284"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -164,8 +164,11 @@ export abstract class BaseService<T> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private buildListQuery(listReq: ListReq<T>) {
|
private buildListQuery(listReq: ListReq<T>) {
|
||||||
const { query, sort, buildQuery } = listReq;
|
const { query, sort, buildQuery,select } = listReq;
|
||||||
const qb = this.getRepository().createQueryBuilder('main');
|
const qb = this.getRepository().createQueryBuilder('main');
|
||||||
|
if (select) {
|
||||||
|
qb.setFindOptions({select});
|
||||||
|
}
|
||||||
if (query) {
|
if (query) {
|
||||||
const keys = Object.keys(query);
|
const keys = Object.keys(query);
|
||||||
for (const key of keys) {
|
for (const key of keys) {
|
||||||
@@ -191,6 +194,7 @@ export abstract class BaseService<T> {
|
|||||||
if (buildQuery) {
|
if (buildQuery) {
|
||||||
buildQuery(qb);
|
buildQuery(qb);
|
||||||
}
|
}
|
||||||
|
|
||||||
return qb;
|
return qb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -107,5 +107,17 @@ export const Constants = {
|
|||||||
code: 20012,
|
code: 20012,
|
||||||
message: '证书还未生成',
|
message: '证书还未生成',
|
||||||
},
|
},
|
||||||
|
openCertApplying: {
|
||||||
|
code: 20013,
|
||||||
|
message: '证书正在申请中,请稍后重新获取',
|
||||||
|
},
|
||||||
|
openDomainNoVerifier:{
|
||||||
|
code: 20014,
|
||||||
|
message: '域名校验方式未配置',
|
||||||
|
},
|
||||||
|
openEmailNotFound: {
|
||||||
|
code: 20021,
|
||||||
|
message: '用户邮箱还未配置',
|
||||||
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,13 +11,13 @@ export class CommonException extends BaseException {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class CodeException extends BaseException {
|
export class CodeException extends BaseException {
|
||||||
constructor(res: { code: number; message: string }) {
|
constructor(res: { code: number; message: string; data?: any }) {
|
||||||
super("CodeException", res.code, res.message);
|
super("CodeException", res.code, res.message, res.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class TextException extends BaseException {
|
export class TextException extends BaseException {
|
||||||
constructor(name, code,message, data?) {
|
constructor(name, code, message, data?) {
|
||||||
super(name, code, message, data);
|
super(name, code, message, data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import {Inject, Provide, Scope, ScopeEnum} from '@midwayjs/core';
|
import {Inject, Provide, Scope, ScopeEnum} from '@midwayjs/core';
|
||||||
import {InjectEntityModel} from '@midwayjs/typeorm';
|
import {InjectEntityModel} from '@midwayjs/typeorm';
|
||||||
import {Repository} from 'typeorm';
|
import { In, Repository } from "typeorm";
|
||||||
import {AccessGetter, BaseService, PageReq, PermissionException, ValidateException} from '../../../index.js';
|
import {AccessGetter, BaseService, PageReq, PermissionException, ValidateException} from '../../../index.js';
|
||||||
import {AccessEntity} from '../entity/access.js';
|
import {AccessEntity} from '../entity/access.js';
|
||||||
import {AccessDefine, accessRegistry, newAccess} from '@certd/pipeline';
|
import {AccessDefine, accessRegistry, newAccess} from '@certd/pipeline';
|
||||||
@@ -175,4 +175,27 @@ export class AccessService extends BaseService<AccessEntity> {
|
|||||||
getDefineByType(type: string) {
|
getDefineByType(type: string) {
|
||||||
return accessRegistry.getDefine(type);
|
return accessRegistry.getDefine(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
async getSimpleByIds(ids: number[], userId: any) {
|
||||||
|
if (ids.length === 0) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
if (!userId) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
return await this.repository.find({
|
||||||
|
where: {
|
||||||
|
id: In(ids),
|
||||||
|
userId,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
name: true,
|
||||||
|
type: true,
|
||||||
|
userId:true
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
**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.36.3",
|
"version": "1.36.11",
|
||||||
"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": "ce4dc9e3fa1af0702398c6f3809d33ced8cec284"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,43 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持邮箱发送证书 ([95332d5](https://github.com/certd/certd/commit/95332d5db96cd54ddab6ab737332417a09169b39))
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持自动选择校验方式申请证书 ([3f99432](https://github.com/certd/certd/commit/3f9943270cfb12946e38e6272bc5e8d95ad6ab9e))
|
||||||
|
* OpenAPI支持autoApply参数 ([42f4d14](https://github.com/certd/certd/commit/42f4d1477dc791520a874aed56035abcbc8c433b))
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化证书进度条颜色 ([2af91db](https://github.com/certd/certd/commit/2af91dbf2ae36a4ed17c6788bc2a2a79a3bb29f8))
|
||||||
|
* 支持部署到阿里云vod ([98da4e1](https://github.com/certd/certd/commit/98da4e1791ed8bb21daf2a9914fda875d14633c9))
|
||||||
|
* output-selector from参数支持更丰富的过滤规则 ([87853a2](https://github.com/certd/certd/commit/87853a201535f3bfe8505c40f8f5229d82ffcc73))
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/plugin-cert
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-cert",
|
"name": "@certd/plugin-cert",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.3",
|
"version": "1.36.11",
|
||||||
"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.36.3",
|
"@certd/acme-client": "^1.36.11",
|
||||||
"@certd/basic": "^1.36.3",
|
"@certd/basic": "^1.36.11",
|
||||||
"@certd/pipeline": "^1.36.3",
|
"@certd/pipeline": "^1.36.11",
|
||||||
"@certd/plugin-lib": "^1.36.3",
|
"@certd/plugin-lib": "^1.36.11",
|
||||||
"@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": "ce4dc9e3fa1af0702398c6f3809d33ced8cec284"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,3 +59,38 @@ export interface ISubDomainsGetter {
|
|||||||
export interface IDomainParser {
|
export interface IDomainParser {
|
||||||
parse(fullDomain: string): Promise<string>;
|
parse(fullDomain: string): Promise<string>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type DnsVerifier = {
|
||||||
|
// dns直接校验
|
||||||
|
dnsProviderType?: string;
|
||||||
|
dnsProviderAccessId?: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type CnameVerifier = {
|
||||||
|
hostRecord: string;
|
||||||
|
domain: string;
|
||||||
|
recordValue: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type HttpVerifier = {
|
||||||
|
// http校验
|
||||||
|
httpUploaderType: string;
|
||||||
|
httpUploaderAccess: number;
|
||||||
|
httpUploadRootDir: string;
|
||||||
|
};
|
||||||
|
export type DomainVerifier = {
|
||||||
|
domain: string;
|
||||||
|
mainDomain: string;
|
||||||
|
type: string;
|
||||||
|
dns?: DnsVerifier;
|
||||||
|
cname?: CnameVerifier;
|
||||||
|
http?: HttpVerifier;
|
||||||
|
};
|
||||||
|
|
||||||
|
export type DomainVerifiers = {
|
||||||
|
[key: string]: DomainVerifier;
|
||||||
|
};
|
||||||
|
|
||||||
|
export interface IDomainVerifierGetter {
|
||||||
|
getVerifiers(domains: string[]): Promise<DomainVerifiers>;
|
||||||
|
}
|
||||||
|
|||||||
@@ -23,10 +23,11 @@ export type HttpVerifyPlan = {
|
|||||||
|
|
||||||
export type DomainVerifyPlan = {
|
export type DomainVerifyPlan = {
|
||||||
domain: string;
|
domain: string;
|
||||||
|
mainDomain: string;
|
||||||
type: "cname" | "dns" | "http";
|
type: "cname" | "dns" | "http";
|
||||||
dnsProvider?: IDnsProvider;
|
dnsProvider?: IDnsProvider;
|
||||||
cnameVerifyPlan?: Record<string, CnameVerifyPlan>;
|
cnameVerifyPlan?: CnameVerifyPlan;
|
||||||
httpVerifyPlan?: Record<string, HttpVerifyPlan>;
|
httpVerifyPlan?: HttpVerifyPlan;
|
||||||
};
|
};
|
||||||
export type DomainsVerifyPlan = {
|
export type DomainsVerifyPlan = {
|
||||||
[key: string]: DomainVerifyPlan;
|
[key: string]: DomainVerifyPlan;
|
||||||
@@ -233,23 +234,20 @@ export class AcmeService {
|
|||||||
let dnsProvider = providers.dnsProvider;
|
let dnsProvider = providers.dnsProvider;
|
||||||
let fullRecord = `_acme-challenge.${fullDomain}`;
|
let fullRecord = `_acme-challenge.${fullDomain}`;
|
||||||
|
|
||||||
const origDomain = punycode.toUnicode(domain);
|
// const origDomain = punycode.toUnicode(domain);
|
||||||
const origFullDomain = punycode.toUnicode(fullDomain);
|
const origFullDomain = punycode.toUnicode(fullDomain);
|
||||||
if (providers.domainsVerifyPlan) {
|
if (providers.domainsVerifyPlan) {
|
||||||
//按照计划执行
|
//按照计划执行
|
||||||
const domainVerifyPlan = providers.domainsVerifyPlan[origDomain];
|
const domainVerifyPlan = providers.domainsVerifyPlan[origFullDomain];
|
||||||
if (domainVerifyPlan) {
|
if (domainVerifyPlan) {
|
||||||
if (domainVerifyPlan.type === "dns") {
|
if (domainVerifyPlan.type === "dns") {
|
||||||
dnsProvider = domainVerifyPlan.dnsProvider;
|
dnsProvider = domainVerifyPlan.dnsProvider;
|
||||||
} else if (domainVerifyPlan.type === "cname") {
|
} else if (domainVerifyPlan.type === "cname") {
|
||||||
const cnameVerifyPlan = domainVerifyPlan.cnameVerifyPlan;
|
const cname: CnameVerifyPlan = domainVerifyPlan.cnameVerifyPlan;
|
||||||
if (cnameVerifyPlan) {
|
if (cname) {
|
||||||
const cname = cnameVerifyPlan[origFullDomain];
|
dnsProvider = cname.dnsProvider;
|
||||||
if (cname) {
|
domain = await this.options.domainParser.parse(cname.domain);
|
||||||
dnsProvider = cname.dnsProvider;
|
fullRecord = cname.fullRecord;
|
||||||
domain = await this.options.domainParser.parse(cname.domain);
|
|
||||||
fullRecord = cname.fullRecord;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
this.logger.error(`未找到域名${fullDomain}的CNAME校验计划,请修改证书申请配置`);
|
this.logger.error(`未找到域名${fullDomain}的CNAME校验计划,请修改证书申请配置`);
|
||||||
}
|
}
|
||||||
@@ -257,13 +255,12 @@ export class AcmeService {
|
|||||||
throw new Error(`未找到域名${fullDomain}CNAME校验计划的DnsProvider,请修改证书申请配置`);
|
throw new Error(`未找到域名${fullDomain}CNAME校验计划的DnsProvider,请修改证书申请配置`);
|
||||||
}
|
}
|
||||||
} else if (domainVerifyPlan.type === "http") {
|
} else if (domainVerifyPlan.type === "http") {
|
||||||
const httpVerifyPlan = domainVerifyPlan.httpVerifyPlan;
|
const plan: HttpVerifyPlan = domainVerifyPlan.httpVerifyPlan;
|
||||||
if (httpVerifyPlan) {
|
if (plan) {
|
||||||
const httpChallenge = getChallenge("http-01");
|
const httpChallenge = getChallenge("http-01");
|
||||||
if (httpChallenge == null) {
|
if (httpChallenge == null) {
|
||||||
throw new Error("该域名不支持http-01方式校验");
|
throw new Error("该域名不支持http-01方式校验");
|
||||||
}
|
}
|
||||||
const plan = httpVerifyPlan[fullDomain];
|
|
||||||
return await doHttpVerify(httpChallenge, plan.httpUploader);
|
return await doHttpVerify(httpChallenge, plan.httpUploader);
|
||||||
} else {
|
} else {
|
||||||
throw new Error("未找到域名【" + fullDomain + "】的http校验配置");
|
throw new Error("未找到域名【" + fullDomain + "】的http校验配置");
|
||||||
@@ -272,9 +269,12 @@ export class AcmeService {
|
|||||||
throw new Error("不支持的校验类型", domainVerifyPlan.type);
|
throw new Error("不支持的校验类型", domainVerifyPlan.type);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.logger.info("未找到域名校验计划,使用默认的dnsProvider");
|
this.logger.warn(`未找到域名${fullDomain}的校验计划,使用默认的dnsProvider`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!dnsProvider) {
|
||||||
|
throw new Error(`域名${fullDomain}没有匹配到任何校验方式,证书申请失败`);
|
||||||
|
}
|
||||||
|
|
||||||
const dnsChallenge = getChallenge("dns-01");
|
const dnsChallenge = getChallenge("dns-01");
|
||||||
return await doDnsVerify(dnsChallenge, fullRecord, dnsProvider);
|
return await doDnsVerify(dnsChallenge, fullRecord, dnsProvider);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { AbstractTaskPlugin, IContext, Step, TaskInput, TaskOutput } from "@certd/pipeline";
|
import { AbstractTaskPlugin, FileItem, IContext, Step, TaskInput, TaskOutput } from "@certd/pipeline";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import type { CertInfo } from "./acme.js";
|
import type { CertInfo } from "./acme.js";
|
||||||
import { CertReader } from "./cert-reader.js";
|
import { CertReader } from "./cert-reader.js";
|
||||||
@@ -67,9 +67,16 @@ export abstract class CertApplyBaseConvertPlugin extends AbstractTaskPlugin {
|
|||||||
|
|
||||||
@TaskOutput({
|
@TaskOutput({
|
||||||
title: "域名证书",
|
title: "域名证书",
|
||||||
|
type: "cert",
|
||||||
})
|
})
|
||||||
cert?: CertInfo;
|
cert?: CertInfo;
|
||||||
|
|
||||||
|
@TaskOutput({
|
||||||
|
title: "域名证书压缩文件",
|
||||||
|
type: "certZip",
|
||||||
|
})
|
||||||
|
certZip?: FileItem;
|
||||||
|
|
||||||
async onInstance() {
|
async onInstance() {
|
||||||
this.userContext = this.ctx.userContext;
|
this.userContext = this.ctx.userContext;
|
||||||
this.lastStatus = this.ctx.lastStatus as Step;
|
this.lastStatus = this.ctx.lastStatus as Step;
|
||||||
@@ -130,6 +137,7 @@ export abstract class CertApplyBaseConvertPlugin extends AbstractTaskPlugin {
|
|||||||
} else {
|
} else {
|
||||||
this.extendsFiles();
|
this.extendsFiles();
|
||||||
}
|
}
|
||||||
|
this.certZip = this._result.files[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
async zipCert(cert: CertInfo, filename: string) {
|
async zipCert(cert: CertInfo, filename: string) {
|
||||||
|
|||||||
@@ -204,4 +204,11 @@ export class CertReader {
|
|||||||
domain = domain.replaceAll(".", "_").replaceAll("*", "_");
|
domain = domain.replaceAll(".", "_").replaceAll("*", "_");
|
||||||
return `${domain}_${dayjs().format("YYYYMMDDHHmmssSSS")}`;
|
return `${domain}_${dayjs().format("YYYYMMDDHHmmssSSS")}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static appendTimeSuffix(name?: string) {
|
||||||
|
if (name == null) {
|
||||||
|
name = "certd";
|
||||||
|
}
|
||||||
|
return name + "_" + dayjs().format("YYYYMMDDHHmmssSSS");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,6 +87,7 @@ export class CertApplyUploadPlugin extends CertApplyBaseConvertPlugin {
|
|||||||
|
|
||||||
@TaskOutput({
|
@TaskOutput({
|
||||||
title: "证书MD5",
|
title: "证书MD5",
|
||||||
|
type: "certMd5",
|
||||||
})
|
})
|
||||||
certMd5?: string;
|
certMd5?: string;
|
||||||
|
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import { CancelError, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
import { CancelError, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||||
import { utils } from "@certd/basic";
|
import { utils } from "@certd/basic";
|
||||||
|
|
||||||
import type { CertInfo, CnameVerifyPlan, DomainsVerifyPlan, HttpVerifyPlan, PrivateKeyType, SSLProvider } from "./acme.js";
|
import { AcmeService, CertInfo, DomainsVerifyPlan, DomainVerifyPlan, PrivateKeyType, SSLProvider } from "./acme.js";
|
||||||
import { AcmeService } from "./acme.js";
|
|
||||||
import * as _ from "lodash-es";
|
import * as _ from "lodash-es";
|
||||||
import { createDnsProvider, DnsProviderContext, IDnsProvider, ISubDomainsGetter } from "../../dns-provider/index.js";
|
import { createDnsProvider, DnsProviderContext, DnsVerifier, DomainVerifiers, HttpVerifier, IDnsProvider, IDomainVerifierGetter, ISubDomainsGetter } from "../../dns-provider/index.js";
|
||||||
import { CertReader } from "./cert-reader.js";
|
import { CertReader } from "./cert-reader.js";
|
||||||
import { CertApplyBasePlugin } from "./base.js";
|
import { CertApplyBasePlugin } from "./base.js";
|
||||||
import { GoogleClient } from "../../libs/google.js";
|
import { GoogleClient } from "../../libs/google.js";
|
||||||
import { EabAccess } from "../../access";
|
import { EabAccess } from "../../access";
|
||||||
import { DomainParser } from "../../dns-provider/domain-parser.js";
|
import { DomainParser } from "../../dns-provider/domain-parser.js";
|
||||||
import { ossClientFactory } from "@certd/plugin-lib";
|
import { ossClientFactory } from "@certd/plugin-lib";
|
||||||
|
|
||||||
export * from "./base.js";
|
export * from "./base.js";
|
||||||
export type { CertInfo };
|
export type { CertInfo };
|
||||||
export * from "./cert-reader.js";
|
export * from "./cert-reader.js";
|
||||||
@@ -65,12 +65,17 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||||||
{ value: "dns", label: "DNS直接验证" },
|
{ value: "dns", label: "DNS直接验证" },
|
||||||
{ value: "cname", label: "CNAME代理验证" },
|
{ value: "cname", label: "CNAME代理验证" },
|
||||||
{ value: "http", label: "HTTP文件验证" },
|
{ value: "http", label: "HTTP文件验证" },
|
||||||
|
{ value: "dnses", label: "多DNS提供商" },
|
||||||
|
{ value: "auto", label: "自动匹配" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
required: true,
|
required: true,
|
||||||
helper: `1. <b>DNS直接验证</b>:域名dns解析是在阿里云/腾讯云/华为云/CF/NameSilo/西数/火山/dns.la/京东云/51dns的,选它
|
helper: `1. <b>DNS直接验证</b>:域名dns解析是在阿里云/腾讯云/华为云/CF/NameSilo/西数/火山/dns.la/京东云/51dns的,选它
|
||||||
2. <b>CNAME代理验证</b>:支持任何注册商的域名,第一次需要手动添加CNAME记录(建议将DNS服务器修改为阿里云/腾讯云的,然后使用DNS直接验证)
|
2. <b>CNAME代理验证</b>:支持任何注册商的域名,第一次需要手动添加[CNAME记录](#/certd/cname/record)(建议将DNS服务器修改为阿里云/腾讯云的,然后使用DNS直接验证)
|
||||||
3. <b>HTTP文件验证</b>:不支持泛域名,需要配置网站文件上传`,
|
3. <b>HTTP文件验证</b>:不支持泛域名,需要配置网站文件上传
|
||||||
|
4. <b>多DNS提供商</b>:每个域名可以选择独立的DNS提供商
|
||||||
|
5. <b>自动匹配</b>:需要在[域名管理](#/certd/cert/domain)中事先配置好校验方式
|
||||||
|
`,
|
||||||
})
|
})
|
||||||
challengeType!: string;
|
challengeType!: string;
|
||||||
|
|
||||||
@@ -159,13 +164,15 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
show: ctx.compute(({form})=>{
|
show: ctx.compute(({form})=>{
|
||||||
return form.challengeType === 'cname' || form.challengeType === 'http'
|
return form.challengeType === 'cname' || form.challengeType === 'http' || form.challengeType === 'dnses'
|
||||||
}),
|
}),
|
||||||
helper: ctx.compute(({form})=>{
|
helper: ctx.compute(({form})=>{
|
||||||
if(form.challengeType === 'cname' ){
|
if(form.challengeType === 'cname' ){
|
||||||
return '请按照上面的提示,给要申请证书的域名添加CNAME记录,添加后,点击验证,验证成功后不要删除记录,申请和续期证书会一直用它'
|
return '请按照上面的提示,给要申请证书的域名添加CNAME记录,添加后,点击验证,验证成功后不要删除记录,申请和续期证书会一直用它'
|
||||||
}else if (form.challengeType === 'http'){
|
}else if (form.challengeType === 'http'){
|
||||||
return '请按照上面的提示,给每个域名设置文件上传配置,证书申请过程中会上传校验文件到网站根目录下'
|
return '请按照上面的提示,给每个域名设置文件上传配置,证书申请过程中会上传校验文件到网站根目录下'
|
||||||
|
}else if (form.challengeType === 'http'){
|
||||||
|
return '给每个域名单独配置dns提供商'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -328,6 +335,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||||||
acme!: AcmeService;
|
acme!: AcmeService;
|
||||||
|
|
||||||
eab!: EabAccess;
|
eab!: EabAccess;
|
||||||
|
|
||||||
async onInit() {
|
async onInit() {
|
||||||
let eab: EabAccess = null;
|
let eab: EabAccess = null;
|
||||||
|
|
||||||
@@ -402,8 +410,10 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||||||
|
|
||||||
let dnsProvider: IDnsProvider = null;
|
let dnsProvider: IDnsProvider = null;
|
||||||
let domainsVerifyPlan: DomainsVerifyPlan = null;
|
let domainsVerifyPlan: DomainsVerifyPlan = null;
|
||||||
if (this.challengeType === "cname" || this.challengeType === "http") {
|
if (this.challengeType === "cname" || this.challengeType === "http" || this.challengeType === "dnses") {
|
||||||
domainsVerifyPlan = await this.createDomainsVerifyPlan();
|
domainsVerifyPlan = await this.createDomainsVerifyPlan(domains, this.domainsVerifyPlan);
|
||||||
|
} else if (this.challengeType === "auto") {
|
||||||
|
domainsVerifyPlan = await this.createDomainsVerifyPlanByAuto(domains);
|
||||||
} else {
|
} else {
|
||||||
const dnsProviderType = this.dnsProviderType;
|
const dnsProviderType = this.dnsProviderType;
|
||||||
const access = await this.getAccess(this.dnsProviderAccess);
|
const access = await this.getAccess(this.dnsProviderAccess);
|
||||||
@@ -439,73 +449,132 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
|||||||
|
|
||||||
async createDnsProvider(dnsProviderType: string, dnsProviderAccess: any): Promise<IDnsProvider> {
|
async createDnsProvider(dnsProviderType: string, dnsProviderAccess: any): Promise<IDnsProvider> {
|
||||||
const domainParser = this.acme.options.domainParser;
|
const domainParser = this.acme.options.domainParser;
|
||||||
const context: DnsProviderContext = { access: dnsProviderAccess, logger: this.logger, http: this.ctx.http, utils, domainParser };
|
const context: DnsProviderContext = {
|
||||||
|
access: dnsProviderAccess,
|
||||||
|
logger: this.logger,
|
||||||
|
http: this.ctx.http,
|
||||||
|
utils,
|
||||||
|
domainParser,
|
||||||
|
};
|
||||||
return await createDnsProvider({
|
return await createDnsProvider({
|
||||||
dnsProviderType,
|
dnsProviderType,
|
||||||
context,
|
context,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async createDomainsVerifyPlan(): Promise<DomainsVerifyPlan> {
|
async createDomainsVerifyPlan(domains: string[], verifyPlanSetting: DomainsVerifyPlanInput): Promise<DomainsVerifyPlan> {
|
||||||
const plan: DomainsVerifyPlan = {};
|
const plan: DomainsVerifyPlan = {};
|
||||||
for (const domain in this.domainsVerifyPlan) {
|
|
||||||
const domainVerifyPlan = this.domainsVerifyPlan[domain];
|
const domainParser = this.acme.options.domainParser;
|
||||||
let dnsProvider = null;
|
for (const fullDomain of domains) {
|
||||||
const cnameVerifyPlan: Record<string, CnameVerifyPlan> = {};
|
const domain = fullDomain.replaceAll("*.", "");
|
||||||
const httpVerifyPlan: Record<string, HttpVerifyPlan> = {};
|
const mainDomain = await domainParser.parse(domain);
|
||||||
if (domainVerifyPlan.type === "dns") {
|
const planSetting: DomainVerifyPlanInput = verifyPlanSetting[mainDomain];
|
||||||
const access = await this.getAccess(domainVerifyPlan.dnsProviderAccessId);
|
if (planSetting == null) {
|
||||||
dnsProvider = await this.createDnsProvider(domainVerifyPlan.dnsProviderType, access);
|
throw new Error(`没有找到域名(${domain})的校验计划`);
|
||||||
} else if (domainVerifyPlan.type === "cname") {
|
}
|
||||||
for (const key in domainVerifyPlan.cnameVerifyPlan) {
|
if (planSetting.type === "dns") {
|
||||||
const cnameRecord = await this.ctx.cnameProxyService.getByDomain(key);
|
plan[domain] = await this.createDnsDomainVerifyPlan(planSetting, domain, mainDomain);
|
||||||
let dnsProvider = cnameRecord.commonDnsProvider;
|
} else if (planSetting.type === "cname") {
|
||||||
if (cnameRecord.cnameProvider.id > 0) {
|
plan[domain] = await this.createCnameDomainVerifyPlan(domain, mainDomain);
|
||||||
dnsProvider = await this.createDnsProvider(cnameRecord.cnameProvider.dnsProviderType, cnameRecord.cnameProvider.access);
|
} else if (planSetting.type === "http") {
|
||||||
}
|
plan[domain] = await this.createHttpDomainVerifyPlan(planSetting.httpVerifyPlan[domain], domain, mainDomain);
|
||||||
cnameVerifyPlan[key] = {
|
|
||||||
type: "cname",
|
|
||||||
domain: cnameRecord.cnameProvider.domain,
|
|
||||||
fullRecord: cnameRecord.recordValue,
|
|
||||||
dnsProvider,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
} else if (domainVerifyPlan.type === "http") {
|
|
||||||
const httpUploaderContext = {
|
|
||||||
accessService: this.ctx.accessService,
|
|
||||||
logger: this.logger,
|
|
||||||
utils,
|
|
||||||
};
|
|
||||||
for (const key in domainVerifyPlan.httpVerifyPlan) {
|
|
||||||
const httpRecord = domainVerifyPlan.httpVerifyPlan[key];
|
|
||||||
const access = await this.getAccess(httpRecord.httpUploaderAccess);
|
|
||||||
let rootDir = httpRecord.httpUploadRootDir;
|
|
||||||
if (!rootDir.endsWith("/") && !rootDir.endsWith("\\")) {
|
|
||||||
rootDir = rootDir + "/";
|
|
||||||
}
|
|
||||||
this.logger.info("上传方式", httpRecord.httpUploaderType);
|
|
||||||
const httpUploader = await ossClientFactory.createOssClientByType(httpRecord.httpUploaderType, {
|
|
||||||
access,
|
|
||||||
rootDir: rootDir,
|
|
||||||
ctx: httpUploaderContext,
|
|
||||||
});
|
|
||||||
httpVerifyPlan[key] = {
|
|
||||||
type: "http",
|
|
||||||
domain: key,
|
|
||||||
httpUploader,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
plan[domain] = {
|
|
||||||
domain,
|
|
||||||
type: domainVerifyPlan.type,
|
|
||||||
dnsProvider,
|
|
||||||
cnameVerifyPlan,
|
|
||||||
httpVerifyPlan,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
return plan;
|
return plan;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async createDomainsVerifyPlanByAuto(domains: string[]) {
|
||||||
|
//从数据库里面自动选择校验方式
|
||||||
|
// domain list
|
||||||
|
const domainList = new Set<string>();
|
||||||
|
//整理域名
|
||||||
|
for (let domain of domains) {
|
||||||
|
domain = domain.replaceAll("*.", "");
|
||||||
|
domainList.add(domain);
|
||||||
|
}
|
||||||
|
const domainVerifierGetter: IDomainVerifierGetter = await this.ctx.serviceGetter.get("domainVerifierGetter");
|
||||||
|
|
||||||
|
const verifiers: DomainVerifiers = await domainVerifierGetter.getVerifiers([...domainList]);
|
||||||
|
|
||||||
|
const plan: DomainsVerifyPlan = {};
|
||||||
|
|
||||||
|
for (const domain in verifiers) {
|
||||||
|
const verifier = verifiers[domain];
|
||||||
|
if (verifier == null) {
|
||||||
|
throw new Error(`没有找到与该域名(${domain})匹配的校验方式,请先到‘域名管理’页面添加校验方式`);
|
||||||
|
}
|
||||||
|
if (verifier.type === "dns") {
|
||||||
|
plan[domain] = await this.createDnsDomainVerifyPlan(verifier.dns, domain, verifier.mainDomain);
|
||||||
|
} else if (verifier.type === "cname") {
|
||||||
|
plan[domain] = await this.createCnameDomainVerifyPlan(domain, verifier.mainDomain);
|
||||||
|
} else if (verifier.type === "http") {
|
||||||
|
plan[domain] = await this.createHttpDomainVerifyPlan(verifier.http, domain, verifier.mainDomain);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return plan;
|
||||||
|
}
|
||||||
|
|
||||||
|
private async createDnsDomainVerifyPlan(planSetting: DnsVerifier, domain: string, mainDomain: string): Promise<DomainVerifyPlan> {
|
||||||
|
const access = await this.getAccess(planSetting.dnsProviderAccessId);
|
||||||
|
return {
|
||||||
|
type: "dns",
|
||||||
|
mainDomain,
|
||||||
|
domain,
|
||||||
|
dnsProvider: await this.createDnsProvider(planSetting.dnsProviderType, access),
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private async createHttpDomainVerifyPlan(httpSetting: HttpVerifier, domain: string, mainDomain: string): Promise<DomainVerifyPlan> {
|
||||||
|
const httpUploaderContext = {
|
||||||
|
accessService: this.ctx.accessService,
|
||||||
|
logger: this.logger,
|
||||||
|
utils,
|
||||||
|
};
|
||||||
|
|
||||||
|
const access = await this.getAccess(httpSetting.httpUploaderAccess);
|
||||||
|
let rootDir = httpSetting.httpUploadRootDir;
|
||||||
|
if (!rootDir.endsWith("/") && !rootDir.endsWith("\\")) {
|
||||||
|
rootDir = rootDir + "/";
|
||||||
|
}
|
||||||
|
this.logger.info("上传方式", httpSetting.httpUploaderType);
|
||||||
|
const httpUploader = await ossClientFactory.createOssClientByType(httpSetting.httpUploaderType, {
|
||||||
|
access,
|
||||||
|
rootDir: rootDir,
|
||||||
|
ctx: httpUploaderContext,
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
type: "http",
|
||||||
|
domain,
|
||||||
|
mainDomain,
|
||||||
|
httpVerifyPlan: {
|
||||||
|
type: "http",
|
||||||
|
domain,
|
||||||
|
httpUploader,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private async createCnameDomainVerifyPlan(domain: string, mainDomain: string): Promise<DomainVerifyPlan> {
|
||||||
|
const cnameRecord = await this.ctx.cnameProxyService.getByDomain(domain);
|
||||||
|
if (cnameRecord == null) {
|
||||||
|
throw new Error(`请先配置${domain}的CNAME记录,并通过校验`);
|
||||||
|
}
|
||||||
|
let dnsProvider = cnameRecord.commonDnsProvider;
|
||||||
|
if (cnameRecord.cnameProvider.id > 0) {
|
||||||
|
dnsProvider = await this.createDnsProvider(cnameRecord.cnameProvider.dnsProviderType, cnameRecord.cnameProvider.access);
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
type: "cname",
|
||||||
|
domain,
|
||||||
|
mainDomain,
|
||||||
|
cnameVerifyPlan: {
|
||||||
|
domain: cnameRecord.cnameProvider.domain,
|
||||||
|
fullRecord: cnameRecord.recordValue,
|
||||||
|
dnsProvider,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
new CertApplyPlugin();
|
new CertApplyPlugin();
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ export { EVENT_CERT_APPLY_SUCCESS } from "./cert-plugin/base-convert.js";
|
|||||||
export * from "./cert-plugin/index.js";
|
export * from "./cert-plugin/index.js";
|
||||||
export * from "./cert-plugin/lego/index.js";
|
export * from "./cert-plugin/lego/index.js";
|
||||||
export * from "./cert-plugin/custom/index.js";
|
export * from "./cert-plugin/custom/index.js";
|
||||||
export const CertApplyPluginNames = ["CertApply", "CertApplyLego", "CertApplyUpload"];
|
export const CertApplyPluginNames = [":cert:"];
|
||||||
|
|||||||
@@ -3,6 +3,44 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复ssh无法执行命令的bug ([9763cb0](https://github.com/certd/certd/commit/9763cb00e5d95b2fa5d1c2d3d4a8eecac71600e6))
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复流水线页面状态没有刷新的bug ([93e9498](https://github.com/certd/certd/commit/93e9498b410353f504e11e264db62468895d7290))
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 执行windows nginx命令时,改为return code判断是否执行成功 ([b37cffd](https://github.com/certd/certd/commit/b37cffd704cd08b8bdd68a6e284706eabe59e78d))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持部署到阿里云vod ([98da4e1](https://github.com/certd/certd/commit/98da4e1791ed8bb21daf2a9914fda875d14633c9))
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/plugin-lib
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-lib",
|
"name": "@certd/plugin-lib",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.3",
|
"version": "1.36.11",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -21,8 +21,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.36.3",
|
"@certd/basic": "^1.36.11",
|
||||||
"@certd/pipeline": "^1.36.3",
|
"@certd/pipeline": "^1.36.11",
|
||||||
"@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",
|
||||||
@@ -53,5 +53,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "ce4dc9e3fa1af0702398c6f3809d33ced8cec284"
|
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { IsAccess, AccessInput, BaseAccess } from "@certd/pipeline";
|
import { AccessInput, BaseAccess, IsAccess } from "@certd/pipeline";
|
||||||
import { ILogger } from "@certd/basic";
|
import { ILogger } from "@certd/basic";
|
||||||
|
|
||||||
export type AliyunClientV2Req = {
|
export type AliyunClientV2Req = {
|
||||||
action: string;
|
action: string;
|
||||||
version: string;
|
version: string;
|
||||||
|
|||||||
@@ -33,8 +33,10 @@ export type CasCertInfo = { certId: number; certName: string; certIdentifier: st
|
|||||||
|
|
||||||
export class AliyunSslClient {
|
export class AliyunSslClient {
|
||||||
opts: AliyunSslClientOpts;
|
opts: AliyunSslClientOpts;
|
||||||
|
logger: ILogger;
|
||||||
constructor(opts: AliyunSslClientOpts) {
|
constructor(opts: AliyunSslClientOpts) {
|
||||||
this.opts = opts;
|
this.opts = opts;
|
||||||
|
this.logger = opts.logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkRet(ret: any) {
|
checkRet(ret: any) {
|
||||||
|
|||||||
@@ -16,6 +16,10 @@ export default class SshOssClientImpl extends BaseOssClient<SshAccess> {
|
|||||||
throw new Error("Method not implemented.");
|
throw new Error("Method not implemented.");
|
||||||
}
|
}
|
||||||
async upload(filePath: string, fileContent: Buffer) {
|
async upload(filePath: string, fileContent: Buffer) {
|
||||||
|
if (!filePath) {
|
||||||
|
filePath = "";
|
||||||
|
}
|
||||||
|
filePath = filePath.trim();
|
||||||
const tmpFilePath = path.join(os.tmpdir(), "cert", "http", filePath);
|
const tmpFilePath = path.join(os.tmpdir(), "cert", "http", filePath);
|
||||||
|
|
||||||
// Write file to temp path
|
// Write file to temp path
|
||||||
|
|||||||
@@ -204,9 +204,18 @@ export class AsyncSsh2Client {
|
|||||||
stream
|
stream
|
||||||
.on("close", (code: any, signal: any) => {
|
.on("close", (code: any, signal: any) => {
|
||||||
this.logger.info(`[${this.connConf.host}][close]:code:${code}`);
|
this.logger.info(`[${this.connConf.host}][close]:code:${code}`);
|
||||||
if (opts.throwOnStdErr == null && this.windows) {
|
/**
|
||||||
opts.throwOnStdErr = true;
|
* ]pipeline 执行命令:[10.123.0.2][exec]:cd /d D:\nginx-1.27.5 && D:\nginx-1.27.5\nginx.exe -t && D:\nginx-1.27.5\nginx.exe -s reload
|
||||||
}
|
* [2025-07-09T10:24:11.219] [ERROR]pipeline - [10. 123.0. 2][error]: nginx: the configuration file D: \nginx-1.27. 5/conf/nginx. conf syntax is ok
|
||||||
|
* [2025-07-09T10:24:11.231] [ERROR][10. 123. 0. 2] [error]: nginx: configuration file D: \nginx-1.27.5/conf/nginx.conf test is successful
|
||||||
|
* pipeline-
|
||||||
|
* [2025-07-09T10:24:11.473] [INFO]pipeline -[10.123.0.2][close]:code:0
|
||||||
|
* [2025-07-09T10:24:11.473][ERRoR] pipeline- [step][主机一执行远程主机脚本命令]<id:53hyarN3yvmbijNuMiNAt>: [Eror: nginx: the configuration fileD:\nginx-1.27.5/conf/nginx.conf syntax is ok
|
||||||
|
//需要忽略windows的错误
|
||||||
|
*/
|
||||||
|
// if (opts.throwOnStdErr == null && this.windows) {
|
||||||
|
// opts.throwOnStdErr = true;
|
||||||
|
// }
|
||||||
if (opts.throwOnStdErr && hasErrorLog) {
|
if (opts.throwOnStdErr && hasErrorLog) {
|
||||||
reject(new Error(data));
|
reject(new Error(data));
|
||||||
}
|
}
|
||||||
@@ -482,9 +491,9 @@ export class SshClient {
|
|||||||
* Set-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\cmd.exe"
|
* Set-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\cmd.exe"
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
async exec(options: { connectConf: SshAccess; script: string | Array<string>; env?: any }): Promise<string> {
|
async exec(options: { connectConf: SshAccess; script: string | Array<string>; env?: any; throwOnStdErr?: boolean; stopOnError?: boolean }): Promise<string> {
|
||||||
let { script } = options;
|
let { script } = options;
|
||||||
const { connectConf } = options;
|
const { connectConf, throwOnStdErr } = options;
|
||||||
|
|
||||||
// this.logger.info('命令:', script);
|
// this.logger.info('命令:', script);
|
||||||
return await this._call({
|
return await this._call({
|
||||||
@@ -512,10 +521,10 @@ export class SshClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isWinCmd) {
|
if (isWinCmd) {
|
||||||
//组合成&&的形式
|
|
||||||
if (typeof script === "string") {
|
if (typeof script === "string") {
|
||||||
script = script.split("\n");
|
script = script.split("\n");
|
||||||
}
|
}
|
||||||
|
//组合成&&的形式
|
||||||
script = envScripts.concat(script);
|
script = envScripts.concat(script);
|
||||||
script = script as Array<string>;
|
script = script as Array<string>;
|
||||||
script = script.join(" && ");
|
script = script.join(" && ");
|
||||||
@@ -529,7 +538,12 @@ export class SshClient {
|
|||||||
script = envScripts.join(newLine) + newLine + script;
|
script = envScripts.join(newLine) + newLine + script;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return await conn.exec(script as string, {});
|
|
||||||
|
if (isLinux && options.stopOnError !== false) {
|
||||||
|
script = "set -e\n" + script;
|
||||||
|
}
|
||||||
|
|
||||||
|
return await conn.exec(script as string, { throwOnStdErr });
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
1
packages/ui/certd-client/.gitignore
vendored
1
packages/ui/certd-client/.gitignore
vendored
@@ -9,3 +9,4 @@ yarn.lock
|
|||||||
/.idea/
|
/.idea/
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
vite-profile.cpuprofile
|
vite-profile.cpuprofile
|
||||||
|
!build
|
||||||
@@ -3,6 +3,57 @@
|
|||||||
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.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/ui-client
|
||||||
|
|
||||||
|
## [1.36.10](https://github.com/certd/certd/compare/v1.36.9...v1.36.10) (2025-07-18)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化子域名托管的说明 ([b15f514](https://github.com/certd/certd/commit/b15f514018b728acb0922ee3f93c1f302eb5d471))
|
||||||
|
* 账号即将过期通知 ([e403450](https://github.com/certd/certd/commit/e40345095f31e2fb8e2333a6647466659133fa0c))
|
||||||
|
* 子域名托管重复域名不允许添加 ([ffc0c7b](https://github.com/certd/certd/commit/ffc0c7bb7b16d9904fd2d905d1c4e1d4854e92a9))
|
||||||
|
|
||||||
|
## [1.36.9](https://github.com/certd/certd/compare/v1.36.7...v1.36.9) (2025-07-15)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/ui-client
|
||||||
|
|
||||||
|
## [1.36.7](https://github.com/certd/certd/compare/v1.36.6...v1.36.7) (2025-07-15)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复流水线页面状态没有刷新的bug ([93e9498](https://github.com/certd/certd/commit/93e9498b410353f504e11e264db62468895d7290))
|
||||||
|
|
||||||
|
## [1.36.6](https://github.com/certd/certd/compare/v1.36.5...v1.36.6) (2025-07-14)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复某些页面翻译不全显示错误的bug ([0b3158f](https://github.com/certd/certd/commit/0b3158fdd5fe5bb0a98c4e65715dbc3de2c38047))
|
||||||
|
* 修复运行流水线后会闪烁一下的bug ([dfc9362](https://github.com/certd/certd/commit/dfc9362084082ee535b898f23b2609c1d946a6fd))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 通知和定时器的删除按钮显示为红色更显眼 ([61ba83c](https://github.com/certd/certd/commit/61ba83c77546c3d505d081e19a3d68c127662bf1))
|
||||||
|
* 优化流水线列表页面、详情页面性能,精简返回数据 ([609ac9c](https://github.com/certd/certd/commit/609ac9c9a2dde605eb09834ae59693c1cb238765))
|
||||||
|
* OpenAPI支持autoApply参数 ([42f4d14](https://github.com/certd/certd/commit/42f4d1477dc791520a874aed56035abcbc8c433b))
|
||||||
|
|
||||||
|
## [1.36.5](https://github.com/certd/certd/compare/v1.36.4...v1.36.5) (2025-07-11)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/ui-client
|
||||||
|
|
||||||
|
## [1.36.4](https://github.com/certd/certd/compare/v1.36.3...v1.36.4) (2025-07-10)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复查看证书对话框翻译错误的bug ([8626b6d](https://github.com/certd/certd/commit/8626b6d9f235c511766f2ae98e0a37f6cebb621c))
|
||||||
|
* 修复translation后分组编辑打不开的bug ([46a1b74](https://github.com/certd/certd/commit/46a1b7479923d2feb2dece202a5932b99981b2cd))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 优化证书进度条颜色 ([2af91db](https://github.com/certd/certd/commit/2af91dbf2ae36a4ed17c6788bc2a2a79a3bb29f8))
|
||||||
|
* output-selector from参数支持更丰富的过滤规则 ([87853a2](https://github.com/certd/certd/commit/87853a201535f3bfe8505c40f8f5229d82ffcc73))
|
||||||
|
|
||||||
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
## [1.36.3](https://github.com/certd/certd/compare/v1.36.2...v1.36.3) (2025-07-07)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/ui-client",
|
"name": "@certd/ui-client",
|
||||||
"version": "1.36.3",
|
"version": "1.36.11",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --open",
|
"dev": "vite --open",
|
||||||
@@ -103,8 +103,8 @@
|
|||||||
"zod-defaults": "^0.1.3"
|
"zod-defaults": "^0.1.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@certd/lib-iframe": "^1.36.3",
|
"@certd/lib-iframe": "^1.36.11",
|
||||||
"@certd/pipeline": "^1.36.3",
|
"@certd/pipeline": "^1.36.11",
|
||||||
"@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",
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
import { Ref, ref, watch, nextTick } from "vue";
|
import { Ref, ref, watch, nextTick } from "vue";
|
||||||
import { HttpRecord } from "/@/components/plugins/cert/domains-verify-plan-editor/type";
|
import { HttpRecord } from "/@/components/plugins/cert/domains-verify-plan-editor/type";
|
||||||
import { dict } from "@fast-crud/fast-crud";
|
import { dict } from "@fast-crud/fast-crud";
|
||||||
|
import { Dicts } from "/@/components/plugins/lib/dicts";
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "HttpVerifyPlan",
|
name: "HttpVerifyPlan",
|
||||||
@@ -68,17 +69,7 @@ async function onRecordChange() {
|
|||||||
emit("change", records.value);
|
emit("change", records.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
const uploaderTypeDict = dict({
|
const uploaderTypeDict = Dicts.uploaderTypeDict;
|
||||||
data: [
|
|
||||||
{ label: "SFTP", value: "sftp" },
|
|
||||||
{ label: "FTP", value: "ftp" },
|
|
||||||
{ label: "阿里云OSS", value: "alioss" },
|
|
||||||
{ label: "腾讯云COS", value: "tencentcos" },
|
|
||||||
{ label: "七牛OSS", value: "qiniuoss" },
|
|
||||||
{ label: "S3/Minio", value: "s3" },
|
|
||||||
{ label: "SSH(已废弃,请选择SFTP方式)", value: "ssh", disabled: true },
|
|
||||||
],
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
|
|||||||
@@ -167,10 +167,14 @@ async function onDomainsChanged(domains: string[]) {
|
|||||||
let planItem = planRef.value[domain];
|
let planItem = planRef.value[domain];
|
||||||
const domainGroupItem = domainGroups[domain];
|
const domainGroupItem = domainGroups[domain];
|
||||||
if (!planItem) {
|
if (!planItem) {
|
||||||
|
let type = props.defaultType || "cname";
|
||||||
|
if (type === "dnses") {
|
||||||
|
type = "dns";
|
||||||
|
}
|
||||||
planItem = {
|
planItem = {
|
||||||
domain,
|
domain,
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
type: props.defaultType || "cname",
|
type: type,
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
cnameVerifyPlan: {},
|
cnameVerifyPlan: {},
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { inject, ref, watch } from "vue";
|
import { inject, ref, watch } from "vue";
|
||||||
import { CertApplyPluginNames } from "/@/constants";
|
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "CertDomainsGetter",
|
name: "CertDomainsGetter",
|
||||||
@@ -54,8 +53,9 @@ function getDomainFromPipeline(inputKey: string) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!CertApplyPluginNames.includes(certStep.type)) {
|
const firstLevelValue = certStep.input.cert;
|
||||||
targetStepId = getStepIdFromInputKey(certStep.input?.cert);
|
if (firstLevelValue && typeof firstLevelValue === "string" && firstLevelValue.indexOf(".") > 0) {
|
||||||
|
targetStepId = getStepIdFromInputKey(firstLevelValue);
|
||||||
certStep = findStepFromPipeline(targetStepId);
|
certStep = findStepFromPipeline(targetStepId);
|
||||||
if (!certStep) {
|
if (!certStep) {
|
||||||
errorRef.value = "找不到目标步骤,请先选择域名证书";
|
errorRef.value = "找不到目标步骤,请先选择域名证书";
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { inject, onMounted, Ref, ref, watch } from "vue";
|
import { inject, onMounted, Ref, ref, watch } from "vue";
|
||||||
|
import { usePluginStore } from "/@/store/plugin";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "OutputSelector",
|
name: "OutputSelector",
|
||||||
@@ -27,10 +28,11 @@ export default {
|
|||||||
const currentStepIndex = inject("currentStepIndex") as Ref<number>;
|
const currentStepIndex = inject("currentStepIndex") as Ref<number>;
|
||||||
const currentTask = inject("currentTask") as Ref<any>;
|
const currentTask = inject("currentTask") as Ref<any>;
|
||||||
|
|
||||||
const getPluginGroups = inject("getPluginGroups") as any;
|
const pluginStore = usePluginStore();
|
||||||
const pluginGroups = getPluginGroups();
|
|
||||||
function onCreate() {
|
async function onCreate() {
|
||||||
options.value = pluginGroups.getPreStepOutputOptions({
|
await pluginStore.init();
|
||||||
|
options.value = pluginStore.group.getPreStepOutputOptions({
|
||||||
pipeline: pipeline.value,
|
pipeline: pipeline.value,
|
||||||
currentStageIndex: currentStageIndex.value,
|
currentStageIndex: currentStageIndex.value,
|
||||||
currentTaskIndex: currentTaskIndex.value,
|
currentTaskIndex: currentTaskIndex.value,
|
||||||
@@ -38,11 +40,38 @@ export default {
|
|||||||
currentTask: currentTask.value,
|
currentTask: currentTask.value,
|
||||||
});
|
});
|
||||||
if (props.from) {
|
if (props.from) {
|
||||||
|
let froms = [];
|
||||||
if (typeof props.from === "string") {
|
if (typeof props.from === "string") {
|
||||||
options.value = options.value.filter((item: any) => item.type === props.from);
|
froms = [props.from];
|
||||||
} else {
|
} else {
|
||||||
options.value = options.value.filter((item: any) => props.from.includes(item.type));
|
froms = props.from;
|
||||||
}
|
}
|
||||||
|
function match(from: string, item: any) {
|
||||||
|
// pluginType:valueType:keyName
|
||||||
|
if (from.includes(":")) {
|
||||||
|
const [pluginType, valueType, keyName] = from.split(":");
|
||||||
|
if (pluginType && item.type !== pluginType) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (valueType && item.valueType !== valueType) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (keyName && item.key !== keyName) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
return item.type === from;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
options.value = options.value.filter((item: any) => {
|
||||||
|
for (const from of froms) {
|
||||||
|
if (match(from, item)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.modelValue != null) {
|
if (props.modelValue != null) {
|
||||||
@@ -55,19 +84,10 @@ export default {
|
|||||||
ctx.emit("update:modelValue", value);
|
ctx.emit("update:modelValue", value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
onCreate();
|
await onCreate();
|
||||||
});
|
});
|
||||||
|
|
||||||
watch(
|
|
||||||
() => {
|
|
||||||
return pluginGroups.value?.map;
|
|
||||||
},
|
|
||||||
() => {
|
|
||||||
onCreate();
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
function onChanged(value: any) {
|
function onChanged(value: any) {
|
||||||
ctx.emit("update:modelValue", value);
|
ctx.emit("update:modelValue", value);
|
||||||
}
|
}
|
||||||
|
|||||||
31
packages/ui/certd-client/src/components/plugins/lib/dicts.ts
Normal file
31
packages/ui/certd-client/src/components/plugins/lib/dicts.ts
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import { dict } from "@fast-crud/fast-crud";
|
||||||
|
|
||||||
|
export const Dicts = {
|
||||||
|
sslProviderDict: dict({
|
||||||
|
data: [
|
||||||
|
{ value: "letsencrypt", label: "Let‘s Encrypt" },
|
||||||
|
{ value: "zerossl", label: "ZeroSSL" },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
challengeTypeDict: dict({
|
||||||
|
data: [
|
||||||
|
{ value: "dns", label: "DNS校验", color: "green" },
|
||||||
|
{ value: "cname", label: "CNAME代理校验", color: "blue" },
|
||||||
|
{ value: "http", label: "HTTP校验", color: "yellow" },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
dnsProviderTypeDict: dict({
|
||||||
|
url: "pi/dnsProvider/dnsProviderTypeDict",
|
||||||
|
}),
|
||||||
|
uploaderTypeDict: dict({
|
||||||
|
data: [
|
||||||
|
{ label: "SFTP", value: "sftp" },
|
||||||
|
{ label: "FTP", value: "ftp" },
|
||||||
|
{ label: "阿里云OSS", value: "alioss" },
|
||||||
|
{ label: "腾讯云COS", value: "tencentcos" },
|
||||||
|
{ label: "七牛OSS", value: "qiniuoss" },
|
||||||
|
{ label: "S3/Minio", value: "s3" },
|
||||||
|
{ label: "SSH(已废弃,请选择SFTP方式)", value: "ssh", disabled: true },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
};
|
||||||
@@ -280,6 +280,10 @@ function openUpgrade() {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const productListUrl = computed(() => {
|
||||||
|
return `http://localhost:1017/subject/#/product/list?appKey=${settingStore.installInfo.appKey}&subjectId=${settingStore.installInfo.siteId}`;
|
||||||
|
});
|
||||||
|
|
||||||
const modalRef = modal.confirm({
|
const modalRef = modal.confirm({
|
||||||
title,
|
title,
|
||||||
async onOk() {
|
async onOk() {
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export const CertApplyPluginNames = ["CertApply", "CertApplyLego", "CertApplyUpload"];
|
export const CertApplyPluginNames = [":cert:"];
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ export default {
|
|||||||
runCount: "Run Count",
|
runCount: "Run Count",
|
||||||
expiringCerts: "Soon-to-Expire Certificates",
|
expiringCerts: "Soon-to-Expire Certificates",
|
||||||
supportedTasks: "Overview of Supported Deployment Tasks",
|
supportedTasks: "Overview of Supported Deployment Tasks",
|
||||||
|
changeLog: "Change Log",
|
||||||
},
|
},
|
||||||
steps: {
|
steps: {
|
||||||
createPipeline: "Create Certificate Pipeline",
|
createPipeline: "Create Certificate Pipeline",
|
||||||
@@ -449,7 +450,7 @@ export default {
|
|||||||
batchDeleteConfirm: "Are you sure to batch delete these {count} records?",
|
batchDeleteConfirm: "Are you sure to batch delete these {count} records?",
|
||||||
selectRecordFirst: "Please select records first",
|
selectRecordFirst: "Please select records first",
|
||||||
subdomainHosted: "Hosted Subdomain",
|
subdomainHosted: "Hosted Subdomain",
|
||||||
subdomainHelpText: "If you don't understand what subdomain hosting is, please refer to the documentation ",
|
subdomainHelpText: "If you don't understand what subdomain hosting is,Do not set it randomly, as it may result in the inability to apply for the certificate. please refer to the documentation ",
|
||||||
subdomainManagement: "Subdomain Management",
|
subdomainManagement: "Subdomain Management",
|
||||||
isDisabled: "Is Disabled",
|
isDisabled: "Is Disabled",
|
||||||
enabled: "Enabled",
|
enabled: "Enabled",
|
||||||
@@ -708,4 +709,22 @@ export default {
|
|||||||
showRunStrategyHelper: "Allow modify the run strategy of the task",
|
showRunStrategyHelper: "Allow modify the run strategy of the task",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
modal: {
|
||||||
|
close: "Close",
|
||||||
|
viewCertificateTitle: "View Certificate",
|
||||||
|
},
|
||||||
|
domain: {
|
||||||
|
domainManager: "Domain Manager",
|
||||||
|
domainDescription: "used to auto apply for certificate", //管理域名的校验方式,用于申请证书时自动选择验证方式
|
||||||
|
domain: "Domain",
|
||||||
|
challengeType: "Challenge Type",
|
||||||
|
dnsProviderType: "DNS Provider Type",
|
||||||
|
dnsProviderAccess: "DNS Provider Access",
|
||||||
|
httpUploaderType: "HTTP Uploader Type",
|
||||||
|
httpUploaderAccess: "HTTP Uploader Access",
|
||||||
|
httpUploadRootDir: "HTTP Upload Root Dir",
|
||||||
|
disabled: "Disabled",
|
||||||
|
challengeSetting: "Challenge Setting",
|
||||||
|
gotoCnameTip: "Please go to CNAME Record Page",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ export default {
|
|||||||
search: "Search",
|
search: "Search",
|
||||||
enabled: "Enabled",
|
enabled: "Enabled",
|
||||||
disabled: "Disabled",
|
disabled: "Disabled",
|
||||||
|
enable: "Enable",
|
||||||
|
disable: "Disable",
|
||||||
edit: "Edit",
|
edit: "Edit",
|
||||||
delete: "Delete",
|
delete: "Delete",
|
||||||
create: "Create",
|
create: "Create",
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ export default {
|
|||||||
runCount: "运行次数",
|
runCount: "运行次数",
|
||||||
expiringCerts: "最快到期证书",
|
expiringCerts: "最快到期证书",
|
||||||
supportedTasks: "已支持的部署任务总览",
|
supportedTasks: "已支持的部署任务总览",
|
||||||
|
changeLog: "更新日志",
|
||||||
},
|
},
|
||||||
steps: {
|
steps: {
|
||||||
createPipeline: "创建证书流水线",
|
createPipeline: "创建证书流水线",
|
||||||
@@ -415,7 +416,7 @@ export default {
|
|||||||
is_present_no: "否",
|
is_present_no: "否",
|
||||||
basicInfo: "基础信息",
|
basicInfo: "基础信息",
|
||||||
titlea: "名称",
|
titlea: "名称",
|
||||||
disabled: "是否禁用",
|
disabled: "禁用",
|
||||||
ordera: "排序",
|
ordera: "排序",
|
||||||
supportBuy: "支持购买",
|
supportBuy: "支持购买",
|
||||||
intro: "介绍",
|
intro: "介绍",
|
||||||
@@ -455,7 +456,7 @@ export default {
|
|||||||
batchDeleteConfirm: "确定要批量删除这{count}条记录吗",
|
batchDeleteConfirm: "确定要批量删除这{count}条记录吗",
|
||||||
selectRecordFirst: "请先勾选记录",
|
selectRecordFirst: "请先勾选记录",
|
||||||
subdomainHosted: "托管的子域名",
|
subdomainHosted: "托管的子域名",
|
||||||
subdomainHelpText: "如果您不理解什么是子域托管,可以参考文档",
|
subdomainHelpText: "如果您不理解什么是子域托管,请不要随意设置,可能导致证书无法申请,可以参考文档",
|
||||||
subdomainManagement: "子域管理",
|
subdomainManagement: "子域管理",
|
||||||
isDisabled: "是否禁用",
|
isDisabled: "是否禁用",
|
||||||
enabled: "启用",
|
enabled: "启用",
|
||||||
@@ -711,4 +712,22 @@ export default {
|
|||||||
showRunStrategyHelper: "任务设置中是否允许选择运行策略",
|
showRunStrategyHelper: "任务设置中是否允许选择运行策略",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
modal: {
|
||||||
|
close: "关闭",
|
||||||
|
viewCertificateTitle: "查看证书",
|
||||||
|
},
|
||||||
|
domain: {
|
||||||
|
domainManager: "域名管理",
|
||||||
|
domainDescription: "管理域名的校验方式,用于申请证书时自动选择验证方式",
|
||||||
|
domain: "域名",
|
||||||
|
challengeType: "校验类型",
|
||||||
|
dnsProviderType: "DNS提供商类型",
|
||||||
|
dnsProviderAccess: "DNS提供商授权",
|
||||||
|
httpUploaderType: "上传方式",
|
||||||
|
httpUploaderAccess: "上传授权信息",
|
||||||
|
httpUploadRootDir: "网站根路径",
|
||||||
|
disabled: "禁用/启用",
|
||||||
|
challengeSetting: "校验配置",
|
||||||
|
gotoCnameTip: "CNAME域名配置请前往CNAME记录页面添加",
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ export default {
|
|||||||
search: "搜索",
|
search: "搜索",
|
||||||
enabled: "已启用",
|
enabled: "已启用",
|
||||||
disabled: "已禁用",
|
disabled: "已禁用",
|
||||||
|
enable: "启用",
|
||||||
|
disable: "禁用",
|
||||||
edit: "修改",
|
edit: "修改",
|
||||||
delete: "删除",
|
delete: "删除",
|
||||||
create: "新增",
|
create: "新增",
|
||||||
|
|||||||
@@ -116,6 +116,17 @@ export const certdResources = [
|
|||||||
keepAlive: true,
|
keepAlive: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: "certd.domain.domainManager",
|
||||||
|
name: "DomainManager",
|
||||||
|
path: "/certd/cert/domain",
|
||||||
|
component: "/certd/cert/domain/index.vue",
|
||||||
|
meta: {
|
||||||
|
icon: "ion:globe-outline",
|
||||||
|
auth: true,
|
||||||
|
keepAlive: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: "certd.cnameRecord",
|
title: "certd.cnameRecord",
|
||||||
name: "CnameRecord",
|
name: "CnameRecord",
|
||||||
|
|||||||
@@ -87,10 +87,13 @@ export class PluginGroups {
|
|||||||
for (const step of steps) {
|
for (const step of steps) {
|
||||||
const stepDefine = this.get(step.type);
|
const stepDefine = this.get(step.type);
|
||||||
for (const key in stepDefine?.output) {
|
for (const key in stepDefine?.output) {
|
||||||
|
const inputDefine = stepDefine.output[key];
|
||||||
options.push({
|
options.push({
|
||||||
value: `step.${step.id}.${key}`,
|
value: `step.${step.id}.${key}`,
|
||||||
label: `${stepDefine.output[key].title}【from:${step.title}】`,
|
label: `${inputDefine.title}【from:${step.title}】`,
|
||||||
type: step.type,
|
type: step.type,
|
||||||
|
valueType: inputDefine.type,
|
||||||
|
key: key,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,8 @@ function menuIcon(menu: MenuRecordRaw) {
|
|||||||
|
|
||||||
.vben-normal-menu__name,
|
.vben-normal-menu__name,
|
||||||
.vben-normal-menu__icon {
|
.vben-normal-menu__icon {
|
||||||
@apply text-primary-foreground font-semibold;
|
//@apply text-primary-foreground font-semibold;
|
||||||
|
@apply font-semibold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { getCommonColumnDefine } from "/@/views/certd/access/common";
|
import { getCommonColumnDefine } from "/@/views/certd/access/common";
|
||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|||||||
@@ -55,6 +55,14 @@ export function createAccessApi(from = "user") {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async GetDictByIds(ids: number[]) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/getDictByIds",
|
||||||
|
method: "post",
|
||||||
|
data: { ids },
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
async GetSecretPlain(id: number, key: string) {
|
async GetSecretPlain(id: number, key: string) {
|
||||||
return await request({
|
return await request({
|
||||||
url: apiPrefix + "/getSecretPlain",
|
url: apiPrefix + "/getSecretPlain",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { getCommonColumnDefine } from "/@/views/certd/access/common";
|
import { getCommonColumnDefine } from "/@/views/certd/access/common";
|
||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { defineComponent, onActivated, onMounted } from "vue";
|
|||||||
import { useFs } from "@fast-crud/fast-crud";
|
import { useFs } from "@fast-crud/fast-crud";
|
||||||
import createCrudOptions from "./crud";
|
import createCrudOptions from "./crud";
|
||||||
import { createAccessApi } from "/@/views/certd/access/api";
|
import { createAccessApi } from "/@/views/certd/access/api";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: "AccessManager",
|
name: "AccessManager",
|
||||||
|
|||||||
60
packages/ui/certd-client/src/views/certd/cert/domain/api.ts
Normal file
60
packages/ui/certd-client/src/views/certd/cert/domain/api.ts
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
import { request } from "/src/api/service";
|
||||||
|
|
||||||
|
const apiPrefix = "/cert/domain";
|
||||||
|
|
||||||
|
export async function GetList(query: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/page",
|
||||||
|
method: "post",
|
||||||
|
data: query,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function AddObj(obj: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/add",
|
||||||
|
method: "post",
|
||||||
|
data: obj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function UpdateObj(obj: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/update",
|
||||||
|
method: "post",
|
||||||
|
data: obj,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function DelObj(id: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/delete",
|
||||||
|
method: "post",
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function GetObj(id: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/info",
|
||||||
|
method: "post",
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function GetDetail(id: any) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/detail",
|
||||||
|
method: "post",
|
||||||
|
params: { id },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function DeleteBatch(ids: any[]) {
|
||||||
|
return await request({
|
||||||
|
url: apiPrefix + "/deleteByIds",
|
||||||
|
method: "post",
|
||||||
|
data: { ids },
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
330
packages/ui/certd-client/src/views/certd/cert/domain/crud.tsx
Normal file
330
packages/ui/certd-client/src/views/certd/cert/domain/crud.tsx
Normal file
@@ -0,0 +1,330 @@
|
|||||||
|
import * as api from "./api";
|
||||||
|
import { useI18n } from "/src/locales";
|
||||||
|
import { Ref, ref } from "vue";
|
||||||
|
import { useRouter } from "vue-router";
|
||||||
|
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
|
import { useUserStore } from "/@/store/user";
|
||||||
|
import { useSettingStore } from "/@/store/settings";
|
||||||
|
import { Dicts } from "/@/components/plugins/lib/dicts";
|
||||||
|
import { createAccessApi } from "/@/views/certd/access/api";
|
||||||
|
import { Modal } from "ant-design-vue";
|
||||||
|
|
||||||
|
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
|
const router = useRouter();
|
||||||
|
const { t } = useI18n();
|
||||||
|
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
|
||||||
|
return await api.GetList(query);
|
||||||
|
};
|
||||||
|
const editRequest = async ({ form, row }: EditReq) => {
|
||||||
|
form.id = row.id;
|
||||||
|
const res = await api.UpdateObj(form);
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
const delRequest = async ({ row }: DelReq) => {
|
||||||
|
return await api.DelObj(row.id);
|
||||||
|
};
|
||||||
|
|
||||||
|
const addRequest = async ({ form }: AddReq) => {
|
||||||
|
const res = await api.AddObj(form);
|
||||||
|
return res;
|
||||||
|
};
|
||||||
|
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const settingStore = useSettingStore();
|
||||||
|
const selectedRowKeys: Ref<any[]> = ref([]);
|
||||||
|
context.selectedRowKeys = selectedRowKeys;
|
||||||
|
|
||||||
|
const accessApi = createAccessApi();
|
||||||
|
const accessDict = dict({
|
||||||
|
value: "id",
|
||||||
|
label: "name",
|
||||||
|
url: "accessDict",
|
||||||
|
async getNodesByValues(ids: number[]) {
|
||||||
|
return await accessApi.GetDictByIds(ids);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const httpUploaderTypeDict = Dicts.uploaderTypeDict;
|
||||||
|
|
||||||
|
const dnsProviderTypeDict = dict({
|
||||||
|
url: "pi/dnsProvider/dnsProviderTypeDict",
|
||||||
|
});
|
||||||
|
return {
|
||||||
|
crudOptions: {
|
||||||
|
settings: {
|
||||||
|
plugins: {
|
||||||
|
//这里使用行选择插件,生成行选择crudOptions配置,最终会与crudOptions合并
|
||||||
|
rowSelection: {
|
||||||
|
enabled: true,
|
||||||
|
order: -2,
|
||||||
|
before: true,
|
||||||
|
// handle: (pluginProps,useCrudProps)=>CrudOptions,
|
||||||
|
props: {
|
||||||
|
multiple: true,
|
||||||
|
crossPage: true,
|
||||||
|
selectedRowKeys,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
request: {
|
||||||
|
pageRequest,
|
||||||
|
addRequest,
|
||||||
|
editRequest,
|
||||||
|
delRequest,
|
||||||
|
},
|
||||||
|
tabs: {
|
||||||
|
name: "challengeType",
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
rowHandle: {
|
||||||
|
minWidth: 200,
|
||||||
|
fixed: "right",
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
beforeSubmit({ form }) {
|
||||||
|
if (form.challengeType === "cname") {
|
||||||
|
throw new Error("CNAME方式请前往CNAME记录页面进行管理");
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
columns: {
|
||||||
|
id: {
|
||||||
|
title: "ID",
|
||||||
|
key: "id",
|
||||||
|
type: "number",
|
||||||
|
column: {
|
||||||
|
width: 80,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
domain: {
|
||||||
|
title: t("certd.domain.domain"),
|
||||||
|
type: "text",
|
||||||
|
search: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
editForm: {
|
||||||
|
component: {
|
||||||
|
disabled: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
sorter: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
challengeType: {
|
||||||
|
title: t("certd.domain.challengeType"),
|
||||||
|
type: "dict-select",
|
||||||
|
dict: Dicts.challengeTypeDict,
|
||||||
|
search: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
required: true,
|
||||||
|
valueChange({ value }) {
|
||||||
|
if (value === "cname") {
|
||||||
|
Modal.confirm({
|
||||||
|
title: t("certd.domain.gotoCnameTip"),
|
||||||
|
async onOk() {
|
||||||
|
router.push({
|
||||||
|
path: "/certd/cname/record",
|
||||||
|
});
|
||||||
|
crudExpose.getFormWrapperRef().close();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
sorter: true,
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* challengeType varchar(50),
|
||||||
|
* dnsProviderType varchar(50),
|
||||||
|
* dnsProviderAccess bigint,
|
||||||
|
* httpUploaderType varchar(50),
|
||||||
|
* httpUploaderAccess bigint,
|
||||||
|
* httpUploadRootDir varchar(512),
|
||||||
|
*/
|
||||||
|
dnsProviderType: {
|
||||||
|
title: t("certd.domain.dnsProviderType"),
|
||||||
|
type: "dict-select",
|
||||||
|
dict: dnsProviderTypeDict,
|
||||||
|
form: {
|
||||||
|
component: {
|
||||||
|
name: "DnsProviderSelector",
|
||||||
|
},
|
||||||
|
show: compute(({ form }) => {
|
||||||
|
return form.challengeType === "dns";
|
||||||
|
}),
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
show: false,
|
||||||
|
component: {
|
||||||
|
color: "auto",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
dnsProviderAccess: {
|
||||||
|
title: t("certd.domain.dnsProviderAccess"),
|
||||||
|
type: "dict-select",
|
||||||
|
dict: accessDict,
|
||||||
|
form: {
|
||||||
|
component: {
|
||||||
|
name: "AccessSelector",
|
||||||
|
vModel: "modelValue",
|
||||||
|
type: compute(({ form }) => {
|
||||||
|
return form.dnsProviderType;
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
show: compute(({ form }) => {
|
||||||
|
return form.challengeType === "dns";
|
||||||
|
}),
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
show: false,
|
||||||
|
component: {
|
||||||
|
color: "auto",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
httpUploaderType: {
|
||||||
|
title: t("certd.domain.httpUploaderType"),
|
||||||
|
type: "dict-select",
|
||||||
|
dict: Dicts.uploaderTypeDict,
|
||||||
|
form: {
|
||||||
|
show: compute(({ form }) => {
|
||||||
|
return form.challengeType === "http";
|
||||||
|
}),
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
show: false,
|
||||||
|
component: {
|
||||||
|
color: "auto",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
httpUploaderAccess: {
|
||||||
|
title: t("certd.domain.httpUploaderAccess"),
|
||||||
|
type: "text",
|
||||||
|
form: {
|
||||||
|
component: {
|
||||||
|
name: "AccessSelector",
|
||||||
|
vModel: "modelValue",
|
||||||
|
type: compute(({ form }) => {
|
||||||
|
return form.httpUploaderType;
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
show: compute(({ form }) => {
|
||||||
|
return form.challengeType === "http";
|
||||||
|
}),
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
show: false,
|
||||||
|
component: {
|
||||||
|
color: "auto",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
httpUploadRootDir: {
|
||||||
|
title: t("certd.domain.httpUploadRootDir"),
|
||||||
|
type: "text",
|
||||||
|
form: {
|
||||||
|
show: compute(({ form }) => {
|
||||||
|
return form.challengeType === "http";
|
||||||
|
}),
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
show: false,
|
||||||
|
component: {
|
||||||
|
color: "auto",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
challengeSetting: {
|
||||||
|
title: t("certd.domain.challengeSetting"),
|
||||||
|
type: "text",
|
||||||
|
form: { show: false },
|
||||||
|
column: {
|
||||||
|
width: 600,
|
||||||
|
conditionalRender: false,
|
||||||
|
cellRender({ row }) {
|
||||||
|
if (row.challengeType === "dns") {
|
||||||
|
return (
|
||||||
|
<div class={"flex"}>
|
||||||
|
<fs-values-format modelValue={row.challengeType} dict={Dicts.challengeTypeDict} color={"auto"}></fs-values-format>
|
||||||
|
<fs-values-format modelValue={row.dnsProviderType} dict={dnsProviderTypeDict} color={"auto"}></fs-values-format>
|
||||||
|
<fs-values-format class={"ml-5"} modelValue={row.dnsProviderAccess} dict={accessDict} color={"auto"}></fs-values-format>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
} else if (row.challengeType === "http") {
|
||||||
|
return (
|
||||||
|
<div class={"flex"}>
|
||||||
|
<fs-values-format modelValue={row.challengeType} dict={Dicts.challengeTypeDict} color={"auto"}></fs-values-format>
|
||||||
|
<fs-values-format modelValue={row.httpUploaderType} dict={httpUploaderTypeDict} color={"auto"}></fs-values-format>
|
||||||
|
<fs-values-format class={"ml-5"} modelValue={row.httpUploaderAccess} dict={accessDict} color={"auto"}></fs-values-format>
|
||||||
|
<a-tag class={"ml-5 flex items-center"}>路径:{row.httpUploadRootDir}</a-tag>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
disabled: {
|
||||||
|
title: t("certd.domain.disabled"),
|
||||||
|
type: "dict-switch",
|
||||||
|
search: { show: true },
|
||||||
|
dict: dict({
|
||||||
|
data: [
|
||||||
|
{ label: t("common.enabled"), value: false, color: "green" },
|
||||||
|
{ label: t("common.disabled"), value: true, color: "red" },
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
form: {
|
||||||
|
value: false,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
width: 100,
|
||||||
|
sorter: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
createTime: {
|
||||||
|
title: t("certd.createTime"),
|
||||||
|
type: "datetime",
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
sorter: true,
|
||||||
|
width: 160,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
updateTime: {
|
||||||
|
title: t("certd.updateTime"),
|
||||||
|
type: "datetime",
|
||||||
|
form: {
|
||||||
|
show: false,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
show: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<template>
|
||||||
|
<fs-page class="page-cert">
|
||||||
|
<template #header>
|
||||||
|
<div class="title">
|
||||||
|
{{ t("certd.domain.domainManager") }}
|
||||||
|
<span class="sub">
|
||||||
|
{{ t("certd.domain.domainDescription") }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<fs-crud ref="crudRef" v-bind="crudBinding">
|
||||||
|
<template #pagination-left>
|
||||||
|
<a-tooltip :title="t('certd.batch_delete')">
|
||||||
|
<fs-button icon="DeleteOutlined" @click="handleBatchDelete"></fs-button>
|
||||||
|
</a-tooltip>
|
||||||
|
</template>
|
||||||
|
</fs-crud>
|
||||||
|
</fs-page>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { onActivated, onMounted } from "vue";
|
||||||
|
import { useFs } from "@fast-crud/fast-crud";
|
||||||
|
import createCrudOptions from "./crud";
|
||||||
|
import { message, Modal } from "ant-design-vue";
|
||||||
|
import { DeleteBatch } from "./api";
|
||||||
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "DomainManager",
|
||||||
|
});
|
||||||
|
const { crudBinding, crudRef, crudExpose, context } = useFs({ createCrudOptions });
|
||||||
|
|
||||||
|
const selectedRowKeys = context.selectedRowKeys;
|
||||||
|
const handleBatchDelete = () => {
|
||||||
|
if (selectedRowKeys.value?.length > 0) {
|
||||||
|
Modal.confirm({
|
||||||
|
title: t("certd.confirm"),
|
||||||
|
content: t("certd.confirm_delete_count", { count: selectedRowKeys.value.length }),
|
||||||
|
async onOk() {
|
||||||
|
await DeleteBatch(selectedRowKeys.value);
|
||||||
|
message.info(t("certd.delete_successful"));
|
||||||
|
crudExpose.doRefresh();
|
||||||
|
selectedRowKeys.value = [];
|
||||||
|
},
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
message.error(t("certd.please_select_records"));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 页面打开后获取列表数据
|
||||||
|
onMounted(() => {
|
||||||
|
crudExpose.doRefresh();
|
||||||
|
});
|
||||||
|
onActivated(async () => {
|
||||||
|
await crudExpose.doRefresh();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style lang="less"></style>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as api from "./api";
|
import * as api from "./api";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
import { Ref, ref } from "vue";
|
import { Ref, ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ import { useFs } from "@fast-crud/fast-crud";
|
|||||||
import createCrudOptions from "./crud";
|
import createCrudOptions from "./crud";
|
||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import { DeleteBatch } from "./api";
|
import { DeleteBatch } from "./api";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as api from "./api";
|
import * as api from "./api";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
import { computed, Ref, ref } from "vue";
|
import { computed, Ref, ref } from "vue";
|
||||||
import { useRouter } from "vue-router";
|
import { useRouter } from "vue-router";
|
||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, utils } from "@fast-crud/fast-crud";
|
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, utils } from "@fast-crud/fast-crud";
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { useFs } from "@fast-crud/fast-crud";
|
|||||||
import createCrudOptions from "./crud";
|
import createCrudOptions from "./crud";
|
||||||
import { message, Modal } from "ant-design-vue";
|
import { message, Modal } from "ant-design-vue";
|
||||||
import { DeleteBatch } from "./api";
|
import { DeleteBatch } from "./api";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from "vue";
|
import { ref } from "vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
import { CrudOptions, useColumns, useFormWrapper } from "@fast-crud/fast-crud";
|
import { CrudOptions, useColumns, useFormWrapper } from "@fast-crud/fast-crud";
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ import { UserTwoFactorSetting } from "./api";
|
|||||||
import { Modal, notification } from "ant-design-vue";
|
import { Modal, notification } from "ant-design-vue";
|
||||||
import { merge } from "lodash-es";
|
import { merge } from "lodash-es";
|
||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const settingsStore = useSettingStore();
|
const settingsStore = useSettingStore();
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
import * as api from "./api";
|
import * as api from "./api";
|
||||||
import { Ref, ref } from "vue";
|
import { Ref, ref } from "vue";
|
||||||
import ChangePasswordButton from "/@/views/certd/mine/change-password-button.vue";
|
import ChangePasswordButton from "/@/views/certd/mine/change-password-button.vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
import { useUserProfile } from "./use";
|
import { useUserProfile } from "./use";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
//
|
//
|
||||||
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, useFormWrapper, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import { AddReq, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, useFormWrapper, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
import { certInfoApi } from "./api";
|
import { certInfoApi } from "./api";
|
||||||
@@ -228,7 +228,11 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
const leftDays = dayjs(value).diff(dayjs(), "day");
|
const leftDays = dayjs(value).diff(dayjs(), "day");
|
||||||
const color = leftDays < 20 ? "red" : "#389e0d";
|
const color = leftDays < 20 ? "red" : "#389e0d";
|
||||||
const percent = (leftDays / 90) * 100;
|
const percent = (leftDays / 90) * 100;
|
||||||
return <a-progress title={expireDate + t("certd.expires")} percent={percent} strokeColor={color} format={(percent: number) => `${leftDays}${t("certd.days")}`} />;
|
const textColor = leftDays < 20 ? "red" : leftDays > 60 ? "#389e0d" : "";
|
||||||
|
const format = () => {
|
||||||
|
return <span style={{ color: textColor }}>{`${leftDays}${t("certd.days")}`}</span>;
|
||||||
|
};
|
||||||
|
return <a-progress title={expireDate + t("certd.expires")} percent={percent} strokeColor={color} format={format} />;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
import { onActivated, onMounted } from "vue";
|
import { onActivated, onMounted } from "vue";
|
||||||
import { useFs } from "@fast-crud/fast-crud";
|
import { useFs } from "@fast-crud/fast-crud";
|
||||||
import createCrudOptions from "./crud";
|
import createCrudOptions from "./crud";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
import { AddReq, ColumnCompositionProps, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import { AddReq, ColumnCompositionProps, compute, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
import { siteInfoApi } from "./api";
|
import { siteInfoApi } from "./api";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
@@ -46,6 +46,20 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
|
|
||||||
const { openSiteIpMonitorDialog } = useSiteIpMonitor();
|
const { openSiteIpMonitorDialog } = useSiteIpMonitor();
|
||||||
const { openSiteImportDialog } = useSiteImport();
|
const { openSiteImportDialog } = useSiteImport();
|
||||||
|
|
||||||
|
function checkAll() {
|
||||||
|
Modal.confirm({
|
||||||
|
title: t("certd.monitor.confirmTitle"), // "确认"
|
||||||
|
content: t("certd.monitor.confirmContent"), // "确认触发检查全部站点证书吗?"
|
||||||
|
onOk: async () => {
|
||||||
|
await siteInfoApi.CheckAll();
|
||||||
|
notification.success({
|
||||||
|
message: t("certd.monitor.checkSubmitted"), // "检查任务已提交"
|
||||||
|
description: t("certd.monitor.pleaseRefresh"), // "请稍后刷新页面查看结果"
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
id: "siteMonitorCrud",
|
id: "siteMonitorCrud",
|
||||||
crudOptions: {
|
crudOptions: {
|
||||||
@@ -114,6 +128,14 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
checkAll: {
|
||||||
|
show: true,
|
||||||
|
text: t("certd.monitor.checkAll"),
|
||||||
|
type: "primary",
|
||||||
|
click() {
|
||||||
|
checkAll();
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
rowHandle: {
|
rowHandle: {
|
||||||
|
|||||||
@@ -14,9 +14,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="more">
|
|
||||||
<a-button type="primary" @click="checkAll">{{ t("certd.monitor.checkAll") }}</a-button>
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
<fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud>
|
<fs-crud ref="crudRef" v-bind="crudBinding"> </fs-crud>
|
||||||
</fs-page>
|
</fs-page>
|
||||||
@@ -28,26 +25,13 @@ import { useFs } from "@fast-crud/fast-crud";
|
|||||||
import createCrudOptions from "./crud";
|
import createCrudOptions from "./crud";
|
||||||
import { siteInfoApi } from "./api";
|
import { siteInfoApi } from "./api";
|
||||||
import { Modal, notification } from "ant-design-vue";
|
import { Modal, notification } from "ant-design-vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "SiteCertMonitor",
|
name: "SiteCertMonitor",
|
||||||
});
|
});
|
||||||
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: {} });
|
||||||
function checkAll() {
|
|
||||||
Modal.confirm({
|
|
||||||
title: t("certd.monitor.confirmTitle"), // "确认"
|
|
||||||
content: t("certd.monitor.confirmContent"), // "确认触发检查全部站点证书吗?"
|
|
||||||
onOk: async () => {
|
|
||||||
await siteInfoApi.CheckAll();
|
|
||||||
notification.success({
|
|
||||||
message: t("certd.monitor.checkSubmitted"), // "检查任务已提交"
|
|
||||||
description: t("certd.monitor.pleaseRefresh"), // "请稍后刷新页面查看结果"
|
|
||||||
});
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// 页面打开后获取列表数据
|
// 页面打开后获取列表数据
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
import { siteIpApi } from "./api";
|
import { siteIpApi } from "./api";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ import { merge } from "lodash-es";
|
|||||||
import { useSettingStore } from "/src/store/settings";
|
import { useSettingStore } from "/src/store/settings";
|
||||||
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useFormWrapper } from "@fast-crud/fast-crud";
|
import { useFormWrapper } from "@fast-crud/fast-crud";
|
||||||
import { siteInfoApi } from "./api";
|
import { siteInfoApi } from "./api";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
export function useSiteImport() {
|
export function useSiteImport() {
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import { dict } from "@fast-crud/fast-crud";
|
|||||||
import createCrudOptions from "../crud";
|
import createCrudOptions from "../crud";
|
||||||
import { notificationProvide } from "/@/views/certd/notification/common";
|
import { notificationProvide } from "/@/views/certd/notification/common";
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
import { OPEN_API_DOC, openkeyApi } from "./api";
|
import { OPEN_API_DOC, openkeyApi } from "./api";
|
||||||
import { useModal } from "/@/use/use-modal";
|
import { useModal } from "/@/use/use-modal";
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
import { dict } from "@fast-crud/fast-crud";
|
|
||||||
|
|
||||||
export const Dicts = {
|
|
||||||
sslProviderDict: dict({
|
|
||||||
data: [
|
|
||||||
{ value: "letsencrypt", label: "Let‘s Encrypt" },
|
|
||||||
{ value: "zerossl", label: "ZeroSSL" },
|
|
||||||
],
|
|
||||||
}),
|
|
||||||
challengeTypeDict: dict({ data: [{ value: "dns", label: "DNS校验" }] }),
|
|
||||||
dnsProviderTypeDict: dict({
|
|
||||||
url: "pi/dnsProvider/dnsProviderTypeDict",
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
@@ -125,6 +125,7 @@ export function useCertPipelineCreator() {
|
|||||||
const pluginStore = usePluginStore();
|
const pluginStore = usePluginStore();
|
||||||
const randomHour = Math.floor(Math.random() * 6);
|
const randomHour = Math.floor(Math.random() * 6);
|
||||||
const randomMin = Math.floor(Math.random() * 60);
|
const randomMin = Math.floor(Math.random() * 60);
|
||||||
|
const randomCron = `0 ${randomMin} ${randomHour} * * *`;
|
||||||
|
|
||||||
const groupDictRef = dict({
|
const groupDictRef = dict({
|
||||||
url: "/pi/pipeline/group/all",
|
url: "/pi/pipeline/group/all",
|
||||||
@@ -193,7 +194,7 @@ export function useCertPipelineCreator() {
|
|||||||
title: t("certd.pipelineForm.triggerCronTitle"),
|
title: t("certd.pipelineForm.triggerCronTitle"),
|
||||||
type: "text",
|
type: "text",
|
||||||
form: {
|
form: {
|
||||||
value: `0 ${randomMin} ${randomHour} * * *`,
|
value: randomCron,
|
||||||
component: {
|
component: {
|
||||||
name: "cron-editor",
|
name: "cron-editor",
|
||||||
vModel: "modelValue",
|
vModel: "modelValue",
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import * as api from "../api";
|
import * as api from "../api";
|
||||||
import { useFormWrapper } from "@fast-crud/fast-crud";
|
import { useFormWrapper } from "@fast-crud/fast-crud";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
|
|||||||
@@ -335,7 +335,7 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
_triggerCount: {
|
triggerCount: {
|
||||||
title: t("certd.fields.scheduledTaskCount"),
|
title: t("certd.fields.scheduledTaskCount"),
|
||||||
type: "number",
|
type: "number",
|
||||||
column: {
|
column: {
|
||||||
@@ -346,7 +346,7 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
|||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
_stepCount: {
|
stepCount: {
|
||||||
title: t("certd.fields.deployTaskCount"),
|
title: t("certd.fields.deployTaskCount"),
|
||||||
type: "number",
|
type: "number",
|
||||||
form: { show: false },
|
form: { show: false },
|
||||||
@@ -363,13 +363,19 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
|||||||
},
|
},
|
||||||
column: {
|
column: {
|
||||||
cellRender({ row }) {
|
cellRender({ row }) {
|
||||||
if (!row.lastVars?.certExpiresTime) {
|
const value = row.lastVars?.certExpiresTime;
|
||||||
|
if (!value) {
|
||||||
return "-";
|
return "-";
|
||||||
}
|
}
|
||||||
const leftDays = dayjs(row.lastVars.certExpiresTime).diff(dayjs(), "day");
|
const expireDate = dayjs(value).format("YYYY-MM-DD");
|
||||||
|
const leftDays = dayjs(value).diff(dayjs(), "day");
|
||||||
const color = leftDays < 20 ? "red" : "#389e0d";
|
const color = leftDays < 20 ? "red" : "#389e0d";
|
||||||
const percent = (leftDays / 90) * 100;
|
const percent = (leftDays / 90) * 100;
|
||||||
return <a-progress percent={percent} strokeColor={color} format={percent => `${leftDays} 天`} />;
|
const textColor = leftDays < 20 ? "red" : leftDays > 60 ? "#389e0d" : "";
|
||||||
|
const format = () => {
|
||||||
|
return <span style={{ color: textColor }}>{`${leftDays}${t("certd.days")}`}</span>;
|
||||||
|
};
|
||||||
|
return <a-progress title={expireDate + t("certd.expires")} percent={percent} strokeColor={color} format={format} />;
|
||||||
},
|
},
|
||||||
width: 150,
|
width: 150,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
// @ts-ignore
|
import { useI18n } from "/src/locales";
|
||||||
import { useI18n } from "vue-i18n";
|
|
||||||
import { ref } from "vue";
|
|
||||||
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
|
||||||
import { pipelineGroupApi } from "./api";
|
import { pipelineGroupApi } from "./api";
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import ChangeGroup from "./components/change-group.vue";
|
|||||||
import ChangeTrigger from "./components/change-trigger.vue";
|
import ChangeTrigger from "./components/change-trigger.vue";
|
||||||
import { Modal, notification } from "ant-design-vue";
|
import { Modal, notification } from "ant-design-vue";
|
||||||
import * as api from "./api";
|
import * as api from "./api";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
import ChangeNotification from "/@/views/certd/pipeline/components/change-notification.vue";
|
import ChangeNotification from "/@/views/certd/pipeline/components/change-notification.vue";
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<fs-icon v-bind="status" :color="status.iconColor || status.color" />
|
<fs-icon v-bind="status" :color="status.iconColor || status.color" />
|
||||||
</template>
|
</template>
|
||||||
<p>
|
<p>
|
||||||
<fs-date-format :model-value="runnable.status?.startTime"></fs-date-format>
|
<fs-date-format :model-value="runnable.createTime"></fs-date-format>
|
||||||
<a-tag class="ml-5" :color="status.color" :closable="status.value === 'start'" @close="cancelTask">
|
<a-tag class="ml-5" :color="status.color" :closable="status.value === 'start'" @close="cancelTask">
|
||||||
{{ status.label }}
|
{{ status.label }}
|
||||||
</a-tag>
|
</a-tag>
|
||||||
@@ -46,7 +46,7 @@ export default defineComponent({
|
|||||||
emits: ["view", "cancel"],
|
emits: ["view", "cancel"],
|
||||||
setup(props: any, ctx: any) {
|
setup(props: any, ctx: any) {
|
||||||
const status = computed(() => {
|
const status = computed(() => {
|
||||||
return statusUtil.get(props.runnable?.status?.result);
|
return statusUtil.get(props.runnable?.status);
|
||||||
});
|
});
|
||||||
|
|
||||||
function view() {
|
function view() {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<template #title>
|
<template #title>
|
||||||
<div>
|
<div>
|
||||||
{{ t("certd.edit_notification") }}
|
{{ t("certd.edit_notification") }}
|
||||||
<a-button v-if="mode === 'edit'" @click="notificationDelete()">
|
<a-button v-if="mode === 'edit'" danger @click="notificationDelete()">
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<DeleteOutlined />
|
<DeleteOutlined />
|
||||||
</template>
|
</template>
|
||||||
@@ -90,7 +90,7 @@ import * as _ from "lodash-es";
|
|||||||
import { nanoid } from "nanoid";
|
import { nanoid } from "nanoid";
|
||||||
import PiNotificationFormEmail from "./pi-notification-form-email.vue";
|
import PiNotificationFormEmail from "./pi-notification-form-email.vue";
|
||||||
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
|
||||||
import { useI18n } from "vue-i18n";
|
import { useI18n } from "/src/locales";
|
||||||
import { cloneDeep } from "lodash-es";
|
import { cloneDeep } from "lodash-es";
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user