Compare commits

...

96 Commits

Author SHA1 Message Date
xiaojunnuo
93017c044d v1.35.4 2025-06-13 12:22:12 +08:00
xiaojunnuo
c223ddbb9a build: prepare to build 2025-06-13 12:19:21 +08:00
xiaojunnuo
f00aeacb8b perf: 支持s3 access做测试 2025-06-13 12:18:26 +08:00
xiaojunnuo
5b49071d6b Merge remote-tracking branch 'origin/v2-dev' into v2-dev 2025-06-13 09:53:30 +08:00
xiaojunnuo
17053a882b chore: 2025-06-13 09:53:07 +08:00
xiaojunnuo
5e723d31a4 chore: 2025-06-13 00:40:54 +08:00
xiaojunnuo
3283bd8b75 build: publish 2025-06-13 00:40:05 +08:00
xiaojunnuo
770d3c0015 build: trigger build image 2025-06-13 00:39:33 +08:00
xiaojunnuo
d15dfafd5d v1.35.3 2025-06-13 00:29:59 +08:00
xiaojunnuo
545c13d55c build: prepare to build 2025-06-13 00:27:18 +08:00
xiaojunnuo
e2099ac9ca fix: 修复重试次数设置无效的bug 2025-06-13 00:25:08 +08:00
xiaojunnuo
c937583a50 fix: 修复消息内容存在()<>等括号情况下无法发送tg通知的bug 2025-06-13 00:24:55 +08:00
xiaojunnuo
43c7a19849 perf: 支持雨云dns解析以及雨云证书更新 2025-06-12 23:51:21 +08:00
xiaojunnuo
83543487e7 perf: 支持雨云dns解析 2025-06-12 22:41:08 +08:00
xiaojunnuo
434b259525 chore: 2025-06-11 22:40:21 +08:00
xiaojunnuo
add8efaba8 chore: 2025-06-10 18:44:32 +08:00
xiaojunnuo
12ed79ca60 chore: 雨云支持 2025-06-10 18:41:25 +08:00
xiaojunnuo
1e863382d3 perf: 授权列表类型颜色优化 2025-06-10 18:40:23 +08:00
xiaojunnuo
bad3504d4a perf: github 版本检查支持执行脚本 2025-06-10 12:13:04 +08:00
xiaojunnuo
d94f207162 chore: 首创流水线模式自动申请和部署证书,已被多个项目“借鉴”,被抄也是一种成功。 2025-06-10 10:59:40 +08:00
xiaojunnuo
2c4b7781a4 chore: 2025-06-10 10:52:58 +08:00
xiaojunnuo
4574c6ff07 chore: 2025-06-10 10:52:30 +08:00
xiaojunnuo
7b5043e87b chore: 增加专业版过期通知 2025-06-10 10:21:09 +08:00
xiaojunnuo
a06f3ac5da build: publish 2025-06-09 23:58:39 +08:00
xiaojunnuo
721346a40a build: trigger build image 2025-06-09 23:58:23 +08:00
xiaojunnuo
f252871fb8 v1.35.2 2025-06-09 23:57:04 +08:00
xiaojunnuo
107196122c build: prepare to build 2025-06-09 23:54:50 +08:00
xiaojunnuo
563c02d8da build: prepare to build 2025-06-09 23:50:44 +08:00
xiaojunnuo
765934970a chore: 数据库 2025-06-09 23:50:19 +08:00
xiaojunnuo
9cbdfda829 perf: 优化阿里云nlb支持部署扩展证书 2025-06-09 23:41:44 +08:00
xiaojunnuo
c1fbc8cd68 fix: 修复阿里云新加坡clb无法部署证书的bug 2025-06-09 23:41:21 +08:00
xiaojunnuo
a92107cc47 fix: 修复检查github release 插件无法保存最后版本的bug 2025-06-09 23:35:17 +08:00
xiaojunnuo
3e84e116e8 fix: 修复阿里云新加坡clb无法部署证书的bug 2025-06-09 22:46:59 +08:00
xiaojunnuo
7c0cdd169e perf: 子域名托管帮助链接优化为打开新窗口
Closes https://github.com/certd/certd/issues/419
2025-06-09 22:28:56 +08:00
xiaojunnuo
424fd96615 perf: 阿里云dns操作增加重试机制 2025-06-09 11:42:25 +08:00
xiaojunnuo
ebfcea88da chore: 2025-06-09 11:38:07 +08:00
xiaojunnuo
3c7eb2f5e2 chore: 小优化 2025-06-09 11:32:06 +08:00
xiaojunnuo
936167972f fix: 修复站点监控定时器多次添加的bug 2025-06-09 11:14:45 +08:00
xiaojunnuo
7f6070c960 perf: history增加触发类型显示 2025-06-09 11:13:51 +08:00
xiaojunnuo
0aea9c129c build: publish 2025-06-07 09:12:22 +08:00
xiaojunnuo
d20fb7daa8 build: trigger build image 2025-06-07 09:12:06 +08:00
xiaojunnuo
a619f8a2fe v1.35.1 2025-06-07 09:10:46 +08:00
xiaojunnuo
0acb858d7b build: prepare to build 2025-06-07 09:08:51 +08:00
xiaojunnuo
e459be76fe build: prepare to build 2025-06-07 09:05:35 +08:00
xiaojunnuo
c4c59ccc75 revert: 2025-06-07 01:19:47 +08:00
xiaojunnuo
c820315409 perf: 优化流水线页面,增加下次执行时间、查看证书显示 2025-06-07 01:19:37 +08:00
xiaojunnuo
2a19b61b7a perf: aliyun alb支持部署扩展证书 2025-06-07 00:15:16 +08:00
xiaojunnuo
e1cf64ae16 perf: 修改 HTTPS 服务器监听地址
- 将 HTTPS服务器的监听地址从 '0.0.0.0' 修改为 '::',以支持 IPv6

https://github.com/certd/certd/issues/416
2025-06-06 22:27:41 +08:00
xiaojunnuo
d3c2f8eb43 perf: 站点证书监控支持定时设置,重试次数设置 2025-06-06 18:20:30 +08:00
xiaojunnuo
a00453c83a fix: 修复站点监控通知渠道设置无效的bug 2025-06-06 16:12:30 +08:00
xiaojunnuo
2eb0e54909 perf: 证书申请支持letencrypt profile选项 2025-06-06 15:12:24 +08:00
xiaojunnuo
ac87bc57e9 fix: 某些证书提供商的证书确实commonName导致无法转换证书的问题 2025-06-06 13:53:05 +08:00
xiaojunnuo
2b8ea857f0 build: publish 2025-06-06 00:12:42 +08:00
xiaojunnuo
11c52114b2 build: trigger build image 2025-06-06 00:12:26 +08:00
xiaojunnuo
f55f9b4dd3 v1.35.0 2025-06-06 00:11:09 +08:00
xiaojunnuo
cdd369ea98 build: prepare to build 2025-06-06 00:09:15 +08:00
xiaojunnuo
f2aab9f476 build: prepare to build 2025-06-06 00:02:00 +08:00
xiaojunnuo
2619dc3556 chore: 2025-06-06 00:01:39 +08:00
xiaojunnuo
1bbed351ba Merge branch 'v2-dev' into v2 2025-06-05 23:56:47 +08:00
xiaojunnuo
4cfb2644c6 build: publish 2025-06-05 23:52:05 +08:00
xiaojunnuo
5b85c7ad39 build: trigger build image 2025-06-05 23:51:48 +08:00
xiaojunnuo
ab3a3156f2 v1.34.11 2025-06-05 23:50:29 +08:00
xiaojunnuo
28a582025e build: prepare to build 2025-06-05 23:48:30 +08:00
xiaojunnuo
8451a83a3a chore: 2025-06-05 23:48:14 +08:00
xiaojunnuo
92c8dcc666 build: prepare to build 2025-06-05 23:43:24 +08:00
xiaojunnuo
da68b02e1e chore: 2025-06-05 23:43:14 +08:00
xiaojunnuo
2d7729dbe9 perf: 站点监控支持批量导入域名和ip 2025-06-05 23:31:36 +08:00
xiaojunnuo
6467edb843 fix: 修复flexcdn部署证书的顶级CA名称显示 2025-06-05 20:31:18 +08:00
xiaojunnuo
1f01b3a9ff chore: 2025-06-05 16:57:49 +08:00
xiaojunnuo
8aa1f8926d chore: 2025-06-05 16:54:35 +08:00
xiaojunnuo
ace363fa35 fix: 修复flexcdn证书commonNames错误的问题 2025-06-05 16:53:39 +08:00
xiaojunnuo
919f70a5fd fix: 修复用户最大流水线数量校验的问题 2025-06-05 16:29:13 +08:00
greper
9d6ad771a3 perf: AWS 中国区 CloudFront 证书部署(IAM 证书)@wifi9984
feat: AWS 中国区 CloudFront 证书部署(IAM 证书) @wifi9984
2025-06-05 15:50:31 +08:00
greper
bafccb20c6 perf: 为proxmox登录添加领域字段(@yajiedesign)
为proxmox登录添加领域字段
2025-06-05 15:48:32 +08:00
xiaojunnuo
cef30c2af0 chore: 2025-06-05 14:59:29 +08:00
yajiedesign
ca58056a75 根据要求修改 2025-06-05 14:25:36 +08:00
xiaojunnuo
03e2e99498 perf: 分组选择支持清空选项 2025-06-05 13:49:27 +08:00
yajiedesign
fba7afc4e9 为proxmox登录添加领域字段 2025-06-05 13:39:10 +08:00
xiaojunnuo
d7dda336ec chore: 2025-06-05 13:25:17 +08:00
xiaojunnuo
55d4395160 chore: 2025-06-05 11:26:27 +08:00
xiaojunnuo
f7d5baa6d0 fix: 修复中文域名使用cname方式校验无法通过的问题 2025-06-05 11:25:16 +08:00
xiaojunnuo
6ff509d263 perf: 增加下载日志按钮 2025-06-04 23:18:40 +08:00
xiaojunnuo
57778981a7 chore: 2025-06-04 23:06:07 +08:00
xiaojunnuo
6ac3bc564f perf: 支持设置用户有效期 2025-06-04 23:00:37 +08:00
xiaojunnuo
82d08e2153 chore: 2025-06-04 18:43:35 +08:00
xiaojunnuo
6212cd77e8 chore: 2025-06-04 17:31:40 +08:00
xiaojunnuo
170034f943 chore: 2025-06-04 17:28:56 +08:00
xiaojunnuo
e639a8f9f1 perf: 优化cname检查,当有冲突的cname记录时,给出提示 2025-06-04 17:26:56 +08:00
greper
9d10c45dac Merge pull request #411 from 5aaee9/v2
支持为 Lego 添加额外的命令参数
2025-06-04 16:41:17 +08:00
Indexyz
b84159f2f1 feat(lego): support for command options 2025-06-04 16:31:25 +08:00
xiaojunnuo
49f26b4049 fix: 修复cv4pve sdk (proxmox插件连接失败时无法正常结束任务的bug) 2025-06-04 13:36:31 +08:00
xiaojunnuo
0e7e44cee2 build: publish 2025-06-03 23:57:43 +08:00
xiaojunnuo
36e769502c build: trigger build image 2025-06-03 23:57:27 +08:00
wifi9984
6702ca10a1 feat: 完善注释 2025-05-31 22:19:34 +08:00
wifi9984
4b44bd5e61 reset pnpm-lock 2025-05-31 22:00:32 +08:00
wifi9984
8a55beda92 feat: AWS 中国区 CloudFront 证书部署(IAM 证书) 2025-05-31 21:46:21 +08:00
137 changed files with 4052 additions and 632 deletions

View File

@@ -3,6 +3,83 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
### Performance Improvements
* 支持s3 access做测试 ([f00aeac](https://github.com/certd/certd/commit/f00aeacb8b5c81f0bafa4c1b76723dec2b6b7784))
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
### Bug Fixes
* 修复消息内容存在()<>等括号情况下无法发送tg通知的bug ([c937583](https://github.com/certd/certd/commit/c937583a50d8513d76adead3648f83eee2fcc6f9))
* 修复重试次数设置无效的bug ([e2099ac](https://github.com/certd/certd/commit/e2099ac9ca344bc70bfa4219002e9138708973ae))
### Performance Improvements
* 授权列表类型颜色优化 ([1e86338](https://github.com/certd/certd/commit/1e863382d3d1a8cc95a1abf51e75bf6eaea3244f))
* 支持雨云dns解析 ([8354348](https://github.com/certd/certd/commit/83543487e7418683bd79cfe3b9e0d792bdb977f7))
* 支持雨云dns解析以及雨云证书更新 ([43c7a19](https://github.com/certd/certd/commit/43c7a1984926f5d4647760cc134bb0aede3a7b7a))
* github 版本检查支持执行脚本 ([bad3504](https://github.com/certd/certd/commit/bad3504d4a15e6989b967b66aa9da8c6981f25bf))
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
### Bug Fixes
* 修复阿里云新加坡clb无法部署证书的bug ([c1fbc8c](https://github.com/certd/certd/commit/c1fbc8cd68ae020ef342e4e92f4d9b4869ca1ead))
* 修复阿里云新加坡clb无法部署证书的bug ([3e84e11](https://github.com/certd/certd/commit/3e84e116e863b54c6b4d7db160af372dacc5857f))
* 修复检查github release 插件无法保存最后版本的bug ([a92107c](https://github.com/certd/certd/commit/a92107cc47133883b099d5228b06373e84c8bb50))
* 修复站点监控定时器多次添加的bug ([9361679](https://github.com/certd/certd/commit/936167972fe83e519bc01a0dd961d9c0635d24ab))
### Performance Improvements
* 阿里云dns操作增加重试机制 ([424fd96](https://github.com/certd/certd/commit/424fd96615c05e949af8c837c261c1400bdffba2))
* 优化阿里云nlb支持部署扩展证书 ([9cbdfda](https://github.com/certd/certd/commit/9cbdfda829b231733d54c66c5024d46e6fc11af3))
* 子域名托管帮助链接优化为打开新窗口 ([7c0cdd1](https://github.com/certd/certd/commit/7c0cdd169e2f943e703e433677f2f437d4aa02ee))
* history增加触发类型显示 ([7f6070c](https://github.com/certd/certd/commit/7f6070c960ed7bf02add5ab36436de6573f2f1fa))
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
### Bug Fixes
* 某些证书提供商的证书确实commonName导致无法转换证书的问题 ([ac87bc5](https://github.com/certd/certd/commit/ac87bc57e957ea4679707bfd38d6840e26319bed))
* 修复站点监控通知渠道设置无效的bug ([a00453c](https://github.com/certd/certd/commit/a00453c83a58114ce2873dd6e6aaf313f1ce0f87))
### Performance Improvements
* 修改 HTTPS 服务器监听地址 ([e1cf64a](https://github.com/certd/certd/commit/e1cf64ae16d4abfe4299ff16d5088c30cf3c6365))
* 优化流水线页面,增加下次执行时间、查看证书显示 ([c820315](https://github.com/certd/certd/commit/c8203154094fae3d17198747f49f5f41ddf29a4e))
* 站点证书监控支持定时设置,重试次数设置 ([d3c2f8e](https://github.com/certd/certd/commit/d3c2f8eb436e670772d14a54acd6b541c5aa3978))
* 证书申请支持letencrypt profile选项 ([2eb0e54](https://github.com/certd/certd/commit/2eb0e54909d8ad36708e07c12fd598998159bc43))
* aliyun alb支持部署扩展证书 ([2a19b61](https://github.com/certd/certd/commit/2a19b61b7a78620c06396c2cc37cc77d738b6d12))
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
### Features
* 完善注释 ([6702ca1](https://github.com/certd/certd/commit/6702ca10a17f5d7dbff789b039f7269496f66b97))
* AWS 中国区 CloudFront 证书部署IAM 证书) ([8a55bed](https://github.com/certd/certd/commit/8a55beda924b3be2a53b9ba80d9487cefa8bf887))
* **lego:** support for command options ([b84159f](https://github.com/certd/certd/commit/b84159f2f11531f058837c2e82d66499f3740f20))
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
### Bug Fixes
* 修复用户最大流水线数量校验的问题 ([919f70a](https://github.com/certd/certd/commit/919f70a5fd2842ca69f96f1659bb5a7ba3f73776))
* 修复中文域名使用cname方式校验无法通过的问题 ([f7d5baa](https://github.com/certd/certd/commit/f7d5baa6d04cb83c572b06e62f885890cfa0143a))
* 修复cv4pve sdk (proxmox插件连接失败时无法正常结束任务的bug) ([49f26b4](https://github.com/certd/certd/commit/49f26b4049a0549b0270395157e96e8f04a68bc4))
* 修复flexcdn部署证书的顶级CA名称显示 ([6467edb](https://github.com/certd/certd/commit/6467edb84324d7c80a85212675dbacedc459df83))
* 修复flexcdn证书commonNames错误的问题 ([ace363f](https://github.com/certd/certd/commit/ace363fa355436e769b27f71cc487d30d6441780))
### Performance Improvements
* 分组选择支持清空选项 ([03e2e99](https://github.com/certd/certd/commit/03e2e9949837b34eb3ea56d14a9e8a5dabc96063))
* 优化cname检查当有冲突的cname记录时给出提示 ([e639a8f](https://github.com/certd/certd/commit/e639a8f9f12640ffcca69f1a6a0324459924afbd))
* 增加下载日志按钮 ([6ff509d](https://github.com/certd/certd/commit/6ff509d263c0182645b4692c10b5fedb192db964))
* 站点监控支持批量导入域名和ip ([2d7729d](https://github.com/certd/certd/commit/2d7729dbe98f29088f5f317db2b52cc1ede223a6))
* 支持设置用户有效期 ([6ac3bc5](https://github.com/certd/certd/commit/6ac3bc564f407dad2cd0b0b0744e887387aa5da3))
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
### Bug Fixes

View File

@@ -1,9 +1,9 @@
# Certd
Certd 是一个免费全自动申请和自动部署更新SSL证书管理系统。
后缀d取自linux守护进程的命名风格意为证书守护进程。
Certd® 是一个免费全自动证书管理系统,让你的网站证书永不过期
首创流水线申请部署证书模式,已被多个项目“借鉴”,被抄也是一种成功。
关键字:证书自动申请、证书自动更新、证书自动续期、证书自动续签、证书管理工具
>后缀d取自linux守护进程的命名风格意为证书守护进程。
> 关于证书续期:
>* 实际上没有办法不改变证书文件本身情况下直接续期或者续签。
@@ -13,6 +13,7 @@ Certd 是一个免费全自动申请和自动部署更新SSL证书的管理系
> 流水线数量现已调整为无限制,欢迎大家使用
## 一、特性
本项目不仅支持证书申请过程自动化,还可以自动化部署更新证书,让你的证书永不过期。
@@ -32,9 +33,6 @@ Certd 是一个免费全自动申请和自动部署更新SSL证书的管理系
![](./docs/images/intro/intro.svg)
## 二、在线体验
官方Demo地址自助注册后体验
@@ -168,7 +166,11 @@ https://afdian.com/a/greper
1. 可以调整开源协议以使其更严格或更宽松。
2. 可以用于商业用途。
感谢以下贡献者做出的贡献。
<a href="https://github.com/certd/certd/graphs/contributors">
<img src="https://contrib.rocks/image?repo=certd/certd" />
</a>
## 九、 开源许可
* 本项目遵循 GNU Affero General Public LicenseAGPL开源协议。

View File

@@ -1 +1 @@
00:57
00:39

View File

@@ -3,6 +3,90 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
### Bug Fixes
* 修复消息内容存在()<>等括号情况下无法发送tg通知的bug ([c937583](https://github.com/certd/certd/commit/c937583a50d8513d76adead3648f83eee2fcc6f9))
* 修复重试次数设置无效的bug ([e2099ac](https://github.com/certd/certd/commit/e2099ac9ca344bc70bfa4219002e9138708973ae))
### Performance Improvements
* 授权列表类型颜色优化 ([1e86338](https://github.com/certd/certd/commit/1e863382d3d1a8cc95a1abf51e75bf6eaea3244f))
* 支持雨云dns解析 ([8354348](https://github.com/certd/certd/commit/83543487e7418683bd79cfe3b9e0d792bdb977f7))
* 支持雨云dns解析以及雨云证书更新 ([43c7a19](https://github.com/certd/certd/commit/43c7a1984926f5d4647760cc134bb0aede3a7b7a))
* github 版本检查支持执行脚本 ([bad3504](https://github.com/certd/certd/commit/bad3504d4a15e6989b967b66aa9da8c6981f25bf))
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
### Bug Fixes
* 修复阿里云新加坡clb无法部署证书的bug ([c1fbc8c](https://github.com/certd/certd/commit/c1fbc8cd68ae020ef342e4e92f4d9b4869ca1ead))
* 修复阿里云新加坡clb无法部署证书的bug ([3e84e11](https://github.com/certd/certd/commit/3e84e116e863b54c6b4d7db160af372dacc5857f))
* 修复检查github release 插件无法保存最后版本的bug ([a92107c](https://github.com/certd/certd/commit/a92107cc47133883b099d5228b06373e84c8bb50))
* 修复站点监控定时器多次添加的bug ([9361679](https://github.com/certd/certd/commit/936167972fe83e519bc01a0dd961d9c0635d24ab))
### Performance Improvements
* 阿里云dns操作增加重试机制 ([424fd96](https://github.com/certd/certd/commit/424fd96615c05e949af8c837c261c1400bdffba2))
* 优化阿里云nlb支持部署扩展证书 ([9cbdfda](https://github.com/certd/certd/commit/9cbdfda829b231733d54c66c5024d46e6fc11af3))
* 子域名托管帮助链接优化为打开新窗口 ([7c0cdd1](https://github.com/certd/certd/commit/7c0cdd169e2f943e703e433677f2f437d4aa02ee))
* history增加触发类型显示 ([7f6070c](https://github.com/certd/certd/commit/7f6070c960ed7bf02add5ab36436de6573f2f1fa))
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
### Bug Fixes
* 某些证书提供商的证书确实commonName导致无法转换证书的问题 ([ac87bc5](https://github.com/certd/certd/commit/ac87bc57e957ea4679707bfd38d6840e26319bed))
* 修复站点监控通知渠道设置无效的bug ([a00453c](https://github.com/certd/certd/commit/a00453c83a58114ce2873dd6e6aaf313f1ce0f87))
### Performance Improvements
* 修改 HTTPS 服务器监听地址 ([e1cf64a](https://github.com/certd/certd/commit/e1cf64ae16d4abfe4299ff16d5088c30cf3c6365))
* 优化流水线页面,增加下次执行时间、查看证书显示 ([c820315](https://github.com/certd/certd/commit/c8203154094fae3d17198747f49f5f41ddf29a4e))
* 站点证书监控支持定时设置,重试次数设置 ([d3c2f8e](https://github.com/certd/certd/commit/d3c2f8eb436e670772d14a54acd6b541c5aa3978))
* 证书申请支持letencrypt profile选项 ([2eb0e54](https://github.com/certd/certd/commit/2eb0e54909d8ad36708e07c12fd598998159bc43))
* aliyun alb支持部署扩展证书 ([2a19b61](https://github.com/certd/certd/commit/2a19b61b7a78620c06396c2cc37cc77d738b6d12))
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
### Features
* 完善注释 ([6702ca1](https://github.com/certd/certd/commit/6702ca10a17f5d7dbff789b039f7269496f66b97))
* AWS 中国区 CloudFront 证书部署IAM 证书) ([8a55bed](https://github.com/certd/certd/commit/8a55beda924b3be2a53b9ba80d9487cefa8bf887))
* **lego:** support for command options ([b84159f](https://github.com/certd/certd/commit/b84159f2f11531f058837c2e82d66499f3740f20))
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
### Bug Fixes
* 修复用户最大流水线数量校验的问题 ([919f70a](https://github.com/certd/certd/commit/919f70a5fd2842ca69f96f1659bb5a7ba3f73776))
* 修复中文域名使用cname方式校验无法通过的问题 ([f7d5baa](https://github.com/certd/certd/commit/f7d5baa6d04cb83c572b06e62f885890cfa0143a))
* 修复cv4pve sdk (proxmox插件连接失败时无法正常结束任务的bug) ([49f26b4](https://github.com/certd/certd/commit/49f26b4049a0549b0270395157e96e8f04a68bc4))
* 修复flexcdn部署证书的顶级CA名称显示 ([6467edb](https://github.com/certd/certd/commit/6467edb84324d7c80a85212675dbacedc459df83))
* 修复flexcdn证书commonNames错误的问题 ([ace363f](https://github.com/certd/certd/commit/ace363fa355436e769b27f71cc487d30d6441780))
### Performance Improvements
* 分组选择支持清空选项 ([03e2e99](https://github.com/certd/certd/commit/03e2e9949837b34eb3ea56d14a9e8a5dabc96063))
* 优化cname检查当有冲突的cname记录时给出提示 ([e639a8f](https://github.com/certd/certd/commit/e639a8f9f12640ffcca69f1a6a0324459924afbd))
* 增加下载日志按钮 ([6ff509d](https://github.com/certd/certd/commit/6ff509d263c0182645b4692c10b5fedb192db964))
* 站点监控支持批量导入域名和ip ([2d7729d](https://github.com/certd/certd/commit/2d7729dbe98f29088f5f317db2b52cc1ede223a6))
* 支持设置用户有效期 ([6ac3bc5](https://github.com/certd/certd/commit/6ac3bc564f407dad2cd0b0b0744e887387aa5da3))
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
### Bug Fixes
* **flexcdn:** fix cert upload and skipSslVerify required ([c48da5d](https://github.com/certd/certd/commit/c48da5dea7f0f0cdeae643b106b4a678acc3b14b))
### Performance Improvements
* 阿里云CLB支持部署到扩展域名 ([0e8339c](https://github.com/certd/certd/commit/0e8339c70190890d449099e1d26e5ed06ff135fb))
* 优化流水线名称过长时的显示 ([6a0cc1b](https://github.com/certd/certd/commit/6a0cc1b1f3ad508f9e4093b3b682b163f12389eb))
* 支持部署到飞牛OS ([ddfd0fb](https://github.com/certd/certd/commit/ddfd0fb81d6638352920261065f1ab8e27bdd564))
* 支持日志写入文件 ([37edbf5](https://github.com/certd/certd/commit/37edbf5824d6aaae68ea1ef7259c6f739d418d2c))
## [1.34.9](https://github.com/certd/certd/compare/v1.34.8...v1.34.9) (2025-05-30)
### Bug Fixes

View File

@@ -9,5 +9,5 @@
}
},
"npmClient": "pnpm",
"version": "1.34.10"
"version": "1.35.4"
}

View File

@@ -20,7 +20,7 @@
"afterpublishOnly": "npm run copylogs && time /t >build.trigger && git add ./build.trigger && git commit -m \"build: trigger build image\" && TIMEOUT /T 10 && git push",
"transform-sql": "cd ./packages/ui/certd-server/db/ && node --experimental-json-modules transform.js",
"commitAll": "git add . && git commit -m \"build: publish\" && git push && npm run commitPro",
"commitPro": "cd ./packages/core/ && git add . && git commit -m \"build: publish\" && git push",
"commitPro": "cd ./packages/pro/ && git add . && git commit -m \"build: publish\" && git push",
"copylogs": "copyfiles \"CHANGELOG.md\" ./docs/guide/changelogs/",
"prepublishOnly1": "npm run check && lerna run build ",
"prepublishOnly2": "npm run check && npm run before-build && lerna run build ",

View File

@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/publishlab/node-acme-client/compare/v1.35.3...v1.35.4) (2025-06-13)
**Note:** Version bump only for package @certd/acme-client
## [1.35.3](https://github.com/publishlab/node-acme-client/compare/v1.35.2...v1.35.3) (2025-06-12)
**Note:** Version bump only for package @certd/acme-client
## [1.35.2](https://github.com/publishlab/node-acme-client/compare/v1.35.1...v1.35.2) (2025-06-09)
**Note:** Version bump only for package @certd/acme-client
## [1.35.1](https://github.com/publishlab/node-acme-client/compare/v1.35.0...v1.35.1) (2025-06-07)
### Performance Improvements
* 证书申请支持letencrypt profile选项 ([2eb0e54](https://github.com/publishlab/node-acme-client/commit/2eb0e54909d8ad36708e07c12fd598998159bc43))
# [1.35.0](https://github.com/publishlab/node-acme-client/compare/v1.34.11...v1.35.0) (2025-06-05)
**Note:** Version bump only for package @certd/acme-client
## [1.34.11](https://github.com/publishlab/node-acme-client/compare/v1.34.10...v1.34.11) (2025-06-05)
### Bug Fixes
* 修复中文域名使用cname方式校验无法通过的问题 ([f7d5baa](https://github.com/publishlab/node-acme-client/commit/f7d5baa6d04cb83c572b06e62f885890cfa0143a))
### Performance Improvements
* 优化cname检查当有冲突的cname记录时给出提示 ([e639a8f](https://github.com/publishlab/node-acme-client/commit/e639a8f9f12640ffcca69f1a6a0324459924afbd))
## [1.34.10](https://github.com/publishlab/node-acme-client/compare/v1.34.9...v1.34.10) (2025-06-03)
**Note:** Version bump only for package @certd/acme-client

View File

@@ -3,7 +3,7 @@
"description": "Simple and unopinionated ACME client",
"private": false,
"author": "nmorsman",
"version": "1.34.10",
"version": "1.35.4",
"type": "module",
"module": "scr/index.js",
"main": "src/index.js",
@@ -18,7 +18,7 @@
"types"
],
"dependencies": {
"@certd/basic": "^1.34.10",
"@certd/basic": "^1.35.4",
"@peculiar/x509": "^1.11.0",
"asn1js": "^3.0.5",
"axios": "^1.7.2",
@@ -27,7 +27,7 @@
"https-proxy-agent": "^7.0.5",
"lodash-es": "^4.17.21",
"node-forge": "^1.3.1",
"punycode": "^2.3.1"
"punycode.js": "^2.3.1"
},
"devDependencies": {
"@types/node": "^20.14.10",
@@ -69,5 +69,5 @@
"bugs": {
"url": "https://github.com/publishlab/node-acme-client/issues"
},
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
}

View File

@@ -75,6 +75,9 @@ export default async (client, userOpts) => {
log("[auto] Placing new certificate order with ACME provider");
const orderPayload = { identifiers: uniqueDomains.map((d) => ({ type: "dns", value: d })) };
if (opts.profile && client.sslProvider === 'letsencrypt' ){
orderPayload.profile = opts.profile;
}
const order = await client.createOrder(orderPayload);
const authorizations = await client.getAuthorizations(order);
@@ -213,12 +216,16 @@ export default async (client, userOpts) => {
return promise;
}
async function runPromisePa(tasks, waitTime = 5000) {
async function runPromisePa(tasks, waitTime = 8000) {
const results = [];
let j = 0
// eslint-disable-next-line no-await-in-loop,no-restricted-syntax
for (const task of tasks) {
j++
log(`开始第${j}个任务`);
results.push(task());
// eslint-disable-next-line no-await-in-loop
log(`wait ${waitTime}s`)
await wait(waitTime);
}
return Promise.all(results);
@@ -242,6 +249,7 @@ export default async (client, userOpts) => {
log(`跳过本地验证skipChallengeVerification=true等待 60s`);
await wait(60 * 1000);
} else {
log("开始本地校验")
await runPromisePa(localVerifyTasks, 1000);
log(`本地校验完成,等待${waitDnsDiffuseTime}s`)
await wait(waitDnsDiffuseTime * 1000)

View File

@@ -90,10 +90,12 @@ const defaultOpts = {
*/
class AcmeClient {
sslProvider
constructor(opts) {
if (!Buffer.isBuffer(opts.accountKey)) {
opts.accountKey = Buffer.from(opts.accountKey);
}
this.sslProvider = opts.sslProvider;
this.opts = { ...defaultOpts, ...opts };
this.backoffOpts = {

View File

@@ -66,6 +66,7 @@ export interface ClientAutoOptions {
challengePriority?: string[];
preferredChain?: string;
signal?: AbortSignal;
profile?:string;
}
export class Client {
@@ -203,6 +204,7 @@ export const agents: any;
export function setLogger(fn: (message: any, ...args: any[]) => void): void;
export function walkTxtRecord(record: any): Promise<string[]>;
export function getAuthoritativeDnsResolver(record:string): Promise<any>;
export const CancelError: typeof CancelError;

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
**Note:** Version bump only for package @certd/basic
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
**Note:** Version bump only for package @certd/basic
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
**Note:** Version bump only for package @certd/basic
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
**Note:** Version bump only for package @certd/basic
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
**Note:** Version bump only for package @certd/basic
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
**Note:** Version bump only for package @certd/basic
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
### Performance Improvements

View File

@@ -1 +1 @@
23:54
12:19

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/basic",
"private": false,
"version": "1.34.10",
"version": "1.35.4",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -45,5 +45,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
}

View File

@@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
### Performance Improvements
* 支持s3 access做测试 ([f00aeac](https://github.com/certd/certd/commit/f00aeacb8b5c81f0bafa4c1b76723dec2b6b7784))
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
### Bug Fixes
* 修复消息内容存在()<>等括号情况下无法发送tg通知的bug ([c937583](https://github.com/certd/certd/commit/c937583a50d8513d76adead3648f83eee2fcc6f9))
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
**Note:** Version bump only for package @certd/pipeline
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
**Note:** Version bump only for package @certd/pipeline
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
**Note:** Version bump only for package @certd/pipeline
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
**Note:** Version bump only for package @certd/pipeline
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
### Performance Improvements

View File

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

View File

@@ -37,6 +37,7 @@ export type AccessContext = {
http: HttpClient;
logger: ILogger;
utils: typeof utils;
accessService: IAccessService;
};
export abstract class BaseAccess implements IAccess {

View File

@@ -1,5 +1,5 @@
// src/decorator/memoryCache.decorator.ts
import { AccessContext, AccessDefine, AccessInputDefine } from "./api.js";
import { AccessContext, AccessDefine, AccessInputDefine, IAccessService } from "./api.js";
import { Decorator } from "../decorator/index.js";
import * as _ from "lodash-es";
import { accessRegistry } from "./registry.js";
@@ -41,7 +41,7 @@ export function AccessInput(input?: AccessInputDefine): PropertyDecorator {
};
}
export async function newAccess(type: string, input: any, ctx?: AccessContext) {
export async function newAccess(type: string, input: any, accessService: IAccessService, ctx?: AccessContext) {
const register = accessRegistry.get(type);
if (register == null) {
throw new Error(`access ${type} not found`);
@@ -58,6 +58,7 @@ export async function newAccess(type: string, input: any, ctx?: AccessContext) {
http,
logger,
utils,
accessService,
};
}
access.setCtx(ctx);

View File

@@ -121,9 +121,13 @@ export abstract class BaseNotification implements INotification {
async onTestRequest() {
return await this.doSend({
userId: 0,
title: "【Certd】测试通知【*.foo.com】标题长度测试、测试、测试",
content: `测试通知,*.foo.com
title: "【标题】测试通知【*.foo.com】标题长度测试、测试、测试",
content: `测试通知
域名测试: *.foo.com
换行测试
(括号测试)
<尖括号测试>
[中括号测试]
`,
pipeline: {
id: 1,

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
**Note:** Version bump only for package @certd/lib-huawei
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
**Note:** Version bump only for package @certd/lib-huawei
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
**Note:** Version bump only for package @certd/lib-huawei
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
**Note:** Version bump only for package @certd/lib-huawei
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
**Note:** Version bump only for package @certd/lib-huawei
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
**Note:** Version bump only for package @certd/lib-huawei
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
**Note:** Version bump only for package @certd/lib-huawei

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/lib-huawei",
"private": false,
"version": "1.34.10",
"version": "1.35.4",
"main": "./dist/bundle.js",
"module": "./dist/bundle.js",
"types": "./dist/d/index.d.ts",
@@ -24,5 +24,5 @@
"prettier": "^2.8.8",
"tslib": "^2.8.1"
},
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
}

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
**Note:** Version bump only for package @certd/lib-iframe
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
**Note:** Version bump only for package @certd/lib-iframe
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
**Note:** Version bump only for package @certd/lib-iframe
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
**Note:** Version bump only for package @certd/lib-iframe
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
**Note:** Version bump only for package @certd/lib-iframe
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
**Note:** Version bump only for package @certd/lib-iframe
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
**Note:** Version bump only for package @certd/lib-iframe

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/lib-iframe",
"private": false,
"version": "1.34.10",
"version": "1.35.4",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -31,5 +31,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
}

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
**Note:** Version bump only for package @certd/jdcloud
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
**Note:** Version bump only for package @certd/jdcloud
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
**Note:** Version bump only for package @certd/jdcloud
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
**Note:** Version bump only for package @certd/jdcloud
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
**Note:** Version bump only for package @certd/jdcloud
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
**Note:** Version bump only for package @certd/jdcloud
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
**Note:** Version bump only for package @certd/jdcloud

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/jdcloud",
"version": "1.34.10",
"version": "1.35.4",
"description": "jdcloud openApi sdk",
"main": "./dist/bundle.js",
"module": "./dist/bundle.js",
@@ -61,5 +61,5 @@
"fetch"
]
},
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
}

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
**Note:** Version bump only for package @certd/lib-k8s
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
**Note:** Version bump only for package @certd/lib-k8s
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
**Note:** Version bump only for package @certd/lib-k8s
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
**Note:** Version bump only for package @certd/lib-k8s
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
**Note:** Version bump only for package @certd/lib-k8s
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
**Note:** Version bump only for package @certd/lib-k8s
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
**Note:** Version bump only for package @certd/lib-k8s

View File

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

View File

@@ -3,6 +3,34 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
### Performance Improvements
* 支持s3 access做测试 ([f00aeac](https://github.com/certd/certd/commit/f00aeacb8b5c81f0bafa4c1b76723dec2b6b7784))
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
**Note:** Version bump only for package @certd/lib-server
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
**Note:** Version bump only for package @certd/lib-server
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
**Note:** Version bump only for package @certd/lib-server
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
**Note:** Version bump only for package @certd/lib-server
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
### Performance Improvements
* 支持设置用户有效期 ([6ac3bc5](https://github.com/certd/certd/commit/6ac3bc564f407dad2cd0b0b0744e887387aa5da3))
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
**Note:** Version bump only for package @certd/lib-server

View File

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

View File

@@ -16,6 +16,7 @@ export class SysPublicSettings extends BaseSettings {
static __access__ = 'public';
registerEnabled = false;
userValidTimeEnabled?:boolean = false;
passwordLoginEnabled = true;
usernameRegisterEnabled = true;
mobileRegisterEnabled = false;

View File

@@ -1,16 +1,16 @@
import { Inject, Provide, Scope, ScopeEnum } from '@midwayjs/core';
import { InjectEntityModel } from '@midwayjs/typeorm';
import { Repository } from 'typeorm';
import { BaseService, PageReq, PermissionException, ValidateException } from '../../../index.js';
import { AccessEntity } from '../entity/access.js';
import { AccessDefine, accessRegistry, newAccess } from '@certd/pipeline';
import { EncryptService } from './encrypt-service.js';
import {Inject, Provide, Scope, ScopeEnum} from '@midwayjs/core';
import {InjectEntityModel} from '@midwayjs/typeorm';
import {Repository} from 'typeorm';
import {AccessGetter, BaseService, PageReq, PermissionException, ValidateException} from '../../../index.js';
import {AccessEntity} from '../entity/access.js';
import {AccessDefine, accessRegistry, newAccess} from '@certd/pipeline';
import {EncryptService} from './encrypt-service.js';
/**
* 授权
*/
@Provide()
@Scope(ScopeEnum.Request, { allowDowngrade: true })
@Scope(ScopeEnum.Request, {allowDowngrade: true})
export class AccessService extends BaseService<AccessEntity> {
@InjectEntityModel(AccessEntity)
repository: Repository<AccessEntity>;
@@ -95,6 +95,7 @@ export class AccessService extends BaseService<AccessEntity> {
param.encryptSetting = JSON.stringify(encryptSetting);
param.setting = JSON.stringify(json);
}
/**
* 修改
* @param param 数据
@@ -140,7 +141,8 @@ export class AccessService extends BaseService<AccessEntity> {
id: entity.id,
...setting,
};
return await newAccess(entity.type, input);
const accessGetter = new AccessGetter(userId, this.getById.bind(this));
return await newAccess(entity.type, input,accessGetter);
}
async getById(id: any, userId: number): Promise<any> {

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
**Note:** Version bump only for package @certd/midway-flyway-js
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
**Note:** Version bump only for package @certd/midway-flyway-js

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/midway-flyway-js",
"version": "1.34.10",
"version": "1.35.4",
"description": "midway with flyway, sql upgrade way ",
"private": false,
"type": "module",
@@ -46,5 +46,5 @@
"typeorm": "^0.3.11",
"typescript": "^5.4.2"
},
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
}

View File

@@ -3,6 +3,40 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
**Note:** Version bump only for package @certd/plugin-cert
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
**Note:** Version bump only for package @certd/plugin-cert
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
**Note:** Version bump only for package @certd/plugin-cert
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
### Bug Fixes
* 某些证书提供商的证书确实commonName导致无法转换证书的问题 ([ac87bc5](https://github.com/certd/certd/commit/ac87bc57e957ea4679707bfd38d6840e26319bed))
### Performance Improvements
* 证书申请支持letencrypt profile选项 ([2eb0e54](https://github.com/certd/certd/commit/2eb0e54909d8ad36708e07c12fd598998159bc43))
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
### Features
* **lego:** support for command options ([b84159f](https://github.com/certd/certd/commit/b84159f2f11531f058837c2e82d66499f3740f20))
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
### Bug Fixes
* 修复中文域名使用cname方式校验无法通过的问题 ([f7d5baa](https://github.com/certd/certd/commit/f7d5baa6d04cb83c572b06e62f885890cfa0143a))
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
**Note:** Version bump only for package @certd/plugin-cert

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-cert",
"private": false,
"version": "1.34.10",
"version": "1.35.4",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -16,16 +16,16 @@
"pub": "npm publish"
},
"dependencies": {
"@certd/acme-client": "^1.34.10",
"@certd/basic": "^1.34.10",
"@certd/pipeline": "^1.34.10",
"@certd/plugin-lib": "^1.34.10",
"@certd/acme-client": "^1.35.4",
"@certd/basic": "^1.35.4",
"@certd/pipeline": "^1.35.4",
"@certd/plugin-lib": "^1.35.4",
"@google-cloud/publicca": "^1.3.0",
"dayjs": "^1.11.7",
"jszip": "^3.10.1",
"lodash-es": "^4.17.21",
"psl": "^1.9.0",
"punycode": "^2.3.1",
"punycode.js": "^2.3.1",
"rimraf": "^5.0.5"
},
"devDependencies": {
@@ -43,5 +43,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
}

View File

@@ -29,9 +29,25 @@ export type DnsProviderContext = {
export interface IDnsProvider<T = any> {
onInstance(): Promise<void>;
/**
* 中文转英文
* @param domain
*/
punyCodeEncode(domain: string): string;
/**
* 转中文域名
* @param domain
*/
punyCodeDecode(domain: string): string;
createRecord(options: CreateRecordOptions): Promise<T>;
removeRecord(options: RemoveRecordOptions<T>): Promise<void>;
setCtx(ctx: DnsProviderContext): void;
//中文域名是否需要punycode转码如果返回True则使用punycode来添加解析记录否则使用中文域名添加解析记录
usePunyCode(): boolean;
}

View File

@@ -1,7 +1,7 @@
import { CreateRecordOptions, DnsProviderContext, DnsProviderDefine, IDnsProvider, RemoveRecordOptions } from "./api.js";
import { dnsProviderRegistry } from "./registry.js";
import { HttpClient, ILogger } from "@certd/basic";
import punycode from "punycode.js";
export abstract class AbstractDnsProvider<T = any> implements IDnsProvider<T> {
ctx!: DnsProviderContext;
http!: HttpClient;
@@ -13,6 +13,22 @@ export abstract class AbstractDnsProvider<T = any> implements IDnsProvider<T> {
return false;
}
/**
* 中文转英文
* @param domain
*/
punyCodeEncode(domain: string) {
return punycode.toASCII(domain);
}
/**
* 转中文域名
* @param domain
*/
punyCodeDecode(domain: string) {
return punycode.toUnicode(domain);
}
setCtx(ctx: DnsProviderContext) {
this.ctx = ctx;
this.logger = ctx.logger;

View File

@@ -6,7 +6,7 @@ import { Challenge } from "@certd/acme-client/types/rfc8555";
import { IContext } from "@certd/pipeline";
import { ILogger, utils } from "@certd/basic";
import { IDnsProvider, IDomainParser } from "../../dns-provider/index.js";
import punycode from "node:punycode";
import punycode from "punycode.js";
import { IOssClient } from "@certd/plugin-lib";
export type CnameVerifyPlan = {
type?: string;
@@ -233,16 +233,18 @@ export class AcmeService {
let dnsProvider = providers.dnsProvider;
let fullRecord = `_acme-challenge.${fullDomain}`;
const origDomain = punycode.toUnicode(domain);
const origFullDomain = punycode.toUnicode(fullDomain);
if (providers.domainsVerifyPlan) {
//按照计划执行
const domainVerifyPlan = providers.domainsVerifyPlan[domain];
const domainVerifyPlan = providers.domainsVerifyPlan[origDomain];
if (domainVerifyPlan) {
if (domainVerifyPlan.type === "dns") {
dnsProvider = domainVerifyPlan.dnsProvider;
} else if (domainVerifyPlan.type === "cname") {
const cnameVerifyPlan = domainVerifyPlan.cnameVerifyPlan;
if (cnameVerifyPlan) {
const cname = cnameVerifyPlan[fullDomain];
const cname = cnameVerifyPlan[origFullDomain];
if (cname) {
dnsProvider = cname.dnsProvider;
domain = await this.options.domainParser.parse(cname.domain);
@@ -325,8 +327,9 @@ export class AcmeService {
csrInfo: any;
isTest?: boolean;
privateKeyType?: string;
profile?: string;
}): Promise<CertInfo> {
const { email, isTest, csrInfo, dnsProvider, domainsVerifyPlan } = options;
const { email, isTest, csrInfo, dnsProvider, domainsVerifyPlan, profile } = options;
const client: acme.Client = await this.getAcmeClient(email, isTest);
let domains = options.domains;
@@ -398,6 +401,7 @@ export class AcmeService {
return await this.challengeRemoveFn(authz, challenge, keyAuthorization, recordReq, recordRes, dnsProvider, httpUploader);
},
signal: this.options.signal,
profile,
});
const crtString = crt.toString();

View File

@@ -5,6 +5,7 @@ import path from "path";
import { CertificateInfo, crypto } from "@certd/acme-client";
import { ILogger } from "@certd/basic";
import dayjs from "dayjs";
import { uniq } from "lodash-es";
export type CertReaderHandleContext = {
reader: CertReader;
@@ -88,9 +89,13 @@ export class CertReader {
getAllDomains() {
const { detail } = this.getCrtDetail();
const domains = [detail.domains.commonName];
const domains = [];
if (detail.domains?.commonName) {
domains.push(detail.domains.commonName);
}
domains.push(...detail.domains.altNames);
return domains;
//去重
return uniq(domains);
}
getAltNames() {
@@ -100,12 +105,23 @@ export class CertReader {
static getMainDomain(crt: string) {
const { detail } = CertReader.readCertDetail(crt);
return detail.domains.commonName;
return CertReader.getMainDomainFromDetail(detail);
}
getMainDomain() {
const { detail } = this.getCrtDetail();
return detail.domains.commonName;
return CertReader.getMainDomainFromDetail(detail);
}
static getMainDomainFromDetail(detail: CertificateInfo) {
let domain = detail?.domains?.commonName;
if (domain == null) {
domain = detail?.domains?.altNames?.[0];
}
if (domain == null) {
domain = "unknown";
}
return domain;
}
saveToFile(type: "crt" | "key" | "pfx" | "der" | "oc" | "one" | "ic" | "jks", filepath?: string) {
@@ -177,8 +193,7 @@ export class CertReader {
}
buildCertFileName(suffix: string, applyTime: any, prefix = "cert") {
const detail = this.getCrtDetail();
let domain = detail.detail.domains.commonName;
let domain = this.getMainDomain();
domain = domain.replaceAll(".", "_").replaceAll("*", "_");
const timeStr = dayjs(applyTime).format("YYYYMMDDHHmmss");
return `${prefix}_${domain}_${timeStr}.${suffix}`;
@@ -186,7 +201,7 @@ export class CertReader {
buildCertName() {
let domain = this.getMainDomain();
domain = domain.replaceAll("*", "_").replaceAll("*", "_");
domain = domain.replaceAll(".", "_").replaceAll("*", "_");
return `${domain}_${dayjs().format("YYYYMMDDHHmmssSSS")}`;
}
}

View File

@@ -248,6 +248,30 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
})
privateKeyType!: PrivateKeyType;
@TaskInput({
title: "证书配置",
value: "classic",
component: {
name: "a-select",
vModel: "value",
options: [
{ value: "classic", label: "经典classic" },
{ value: "tlsserver", label: "TLS服务器tlsserver" },
{ value: "shortlived", label: "短暂的shortlived" },
],
},
helper: "如无特殊需求,默认即可",
required: false,
mergeScript: `
return {
show: ctx.compute(({form})=>{
return form.sslProvider === 'letsencrypt'
})
}
`,
})
certProfile!: string;
@TaskInput({
title: "使用代理",
value: false,
@@ -395,6 +419,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
csrInfo,
isTest: false,
privateKeyType: this.privateKeyType,
profile: this.certProfile,
});
const certInfo = this.formatCerts(cert);

View File

@@ -80,17 +80,29 @@ export class CertApplyLegoPlugin extends CertApplyBasePlugin {
legoEabAccessId!: number;
@TaskInput({
title: "自定义LEGO参数",
title: "自定义LEGO全局参数",
component: {
name: "a-input",
vModel: "value",
placeholder: "--dns-timeout 30",
},
helper: "额外的lego命令行参数参考文档https://go-acme.github.io/lego/usage/cli/options/",
helper: "额外的lego全局命令行参数参考文档https://go-acme.github.io/lego/usage/cli/options/",
maybeNeed: true,
})
customArgs = "";
@TaskInput({
title: "自定义LEGO签名参数",
component: {
name: "a-input",
vModel: "value",
placeholder: "--no-bundle",
},
helper: "额外的lego签名命令行参数参考文档https://go-acme.github.io/lego/usage/cli/options/",
maybeNeed: true,
})
customCommandOptions = "";
@TaskInput({
title: "加密算法",
value: "ec256",
@@ -205,7 +217,7 @@ export class CertApplyLegoPlugin extends CertApplyBasePlugin {
if (this.acmeServer) {
serverArgs = ` --server ${this.acmeServer}`;
}
const cmds = [`${legoPath} -a --email "${this.email}" --dns ${this.dnsType} ${keyType} ${domainArgs} ${serverArgs} ${eabArgs} ${savePathArgs} ${this.customArgs || ""} run`];
const cmds = [`${legoPath} -a --email "${this.email}" --dns ${this.dnsType} ${keyType} ${domainArgs} ${serverArgs} ${eabArgs} ${savePathArgs} ${this.customArgs || ""} run ${this.customCommandOptions || ""}`];
await this.ctx.utils.sp.spawn({
cmd: cmds,

View File

@@ -3,6 +3,40 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
### Performance Improvements
* 支持s3 access做测试 ([f00aeac](https://github.com/certd/certd/commit/f00aeacb8b5c81f0bafa4c1b76723dec2b6b7784))
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
**Note:** Version bump only for package @certd/plugin-lib
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
### Bug Fixes
* 修复阿里云新加坡clb无法部署证书的bug ([3e84e11](https://github.com/certd/certd/commit/3e84e116e863b54c6b4d7db160af372dacc5857f))
### Performance Improvements
* 优化阿里云nlb支持部署扩展证书 ([9cbdfda](https://github.com/certd/certd/commit/9cbdfda829b231733d54c66c5024d46e6fc11af3))
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
### Performance Improvements
* aliyun alb支持部署扩展证书 ([2a19b61](https://github.com/certd/certd/commit/2a19b61b7a78620c06396c2cc37cc77d738b6d12))
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
**Note:** Version bump only for package @certd/plugin-lib
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
**Note:** Version bump only for package @certd/plugin-lib
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
### Performance Improvements

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-lib",
"private": false,
"version": "1.34.10",
"version": "1.35.4",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -17,11 +17,12 @@
},
"dependencies": {
"@alicloud/openapi-client": "^0.4.14",
"@alicloud/openapi-util": "^0.3.2",
"@alicloud/pop-core": "^1.7.10",
"@alicloud/tea-util": "^1.4.10",
"@aws-sdk/client-s3": "^3.787.0",
"@certd/basic": "^1.34.10",
"@certd/pipeline": "^1.34.10",
"@certd/basic": "^1.35.4",
"@certd/pipeline": "^1.35.4",
"@kubernetes/client-node": "0.21.0",
"ali-oss": "^6.22.0",
"basic-ftp": "^5.0.5",
@@ -52,5 +53,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "85f9ef35f650d6ed1125f9d5eecee08cabc7fe8a"
"gitHead": "d15dfafd5d8c74c1a51c859b2586c26ca01e3bf8"
}

View File

@@ -54,7 +54,7 @@ export class AliyunClientV2 {
const $OpenApi = await import("@alicloud/openapi-client");
const $Util = await import("@alicloud/tea-util");
const OpenApiUtil = await import("@alicloud/openapi-util");
const params = new $OpenApi.Params({
// 接口名称
action: req.action,
@@ -74,6 +74,10 @@ export class AliyunClientV2 {
bodyType: "json",
});
if (req.data?.query) {
//@ts-ignore
req.data.query = OpenApiUtil.default.default.query(req.data.query);
}
const runtime = new $Util.RuntimeOptions({});
const request = new $OpenApi.OpenApiRequest(req.data);
// 复制代码运行请自行打印 API 的返回值

View File

@@ -29,7 +29,7 @@ export type AliyunSslUploadCertReq = {
cert: AliyunCertInfo;
};
export type CasCertInfo = { certId: number; certName: string; certIdentifier: string };
export type CasCertInfo = { certId: number; certName: string; certIdentifier: string; notAfter: number; casRegion: string };
export class AliyunSslClient {
opts: AliyunSslClientOpts;
@@ -68,6 +68,8 @@ export class AliyunSslClient {
certId: certId,
certName: res.Name,
certIdentifier: res.CertIdentifier,
notAfter: res.NotAfter,
casRegion: this.getCasRegionFromEndpoint(this.opts.endpoint),
};
}
@@ -148,4 +150,24 @@ export class AliyunSslClient {
this.checkRet(res);
return res;
}
async deleteCert(certId: any) {
await this.doRequest("DeleteUserCertificate", { CertId: certId }, { method: "POST" });
}
getCasRegionFromEndpoint(endpoint: string) {
if (!endpoint) {
return "cn-hangzhou";
}
/**
* {value: 'cas.aliyuncs.com', label: '中国大陆'},
* {value: 'cas.ap-southeast-1.aliyuncs.com', label: '新加坡'},
* {value: 'cas.eu-central-1.aliyuncs.com', label: '德国(法兰克福)'},
*/
const region = endpoint.replace(".aliyuncs.com", "").replace("cas.", "");
if (region === "cas") {
return "cn-hangzhou";
}
return region;
}
}

View File

@@ -54,6 +54,9 @@ export default class S3OssClientImpl extends BaseOssClient<S3Access> {
Prefix: dirKey, // The name of the object. For example, 'sample_upload.txt'.
};
const res = await this.client.send(new ListObjectsCommand({ ...params }));
if (!res.Contents) {
return [];
}
return res.Contents.map(item => {
return {
path: item.Key,

View File

@@ -1,4 +1,6 @@
import { AccessInput, BaseAccess, IsAccess } from "@certd/pipeline";
import { ossClientFactory } from "../oss/index.js";
import S3OssClientImpl from "../oss/impls/s3.js";
/**
* 这个注解将注册一个授权配置
@@ -82,6 +84,32 @@ export class S3Access extends BaseAccess {
required: true,
})
bucket!: string;
@AccessInput({
title: "测试",
component: {
name: "api-test",
action: "TestRequest",
},
helper: "点击测试接口是否正常",
})
testRequest = true;
async onTestRequest() {
const client: S3OssClientImpl = await ossClientFactory.createOssClientByType("s3", {
access: this,
rootDir: "",
ctx: {
accessService: this.ctx.accessService,
logger: this.ctx.logger,
utils: this.ctx.utils,
},
});
await client.listDir("/");
return "ok";
}
}
new S3Access();

View File

@@ -3,6 +3,54 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
**Note:** Version bump only for package @certd/ui-client
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
### Bug Fixes
* 修复重试次数设置无效的bug ([e2099ac](https://github.com/certd/certd/commit/e2099ac9ca344bc70bfa4219002e9138708973ae))
### Performance Improvements
* 授权列表类型颜色优化 ([1e86338](https://github.com/certd/certd/commit/1e863382d3d1a8cc95a1abf51e75bf6eaea3244f))
* 支持雨云dns解析以及雨云证书更新 ([43c7a19](https://github.com/certd/certd/commit/43c7a1984926f5d4647760cc134bb0aede3a7b7a))
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
### Performance Improvements
* 子域名托管帮助链接优化为打开新窗口 ([7c0cdd1](https://github.com/certd/certd/commit/7c0cdd169e2f943e703e433677f2f437d4aa02ee))
* history增加触发类型显示 ([7f6070c](https://github.com/certd/certd/commit/7f6070c960ed7bf02add5ab36436de6573f2f1fa))
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
### Performance Improvements
* 优化流水线页面,增加下次执行时间、查看证书显示 ([c820315](https://github.com/certd/certd/commit/c8203154094fae3d17198747f49f5f41ddf29a4e))
* 站点证书监控支持定时设置,重试次数设置 ([d3c2f8e](https://github.com/certd/certd/commit/d3c2f8eb436e670772d14a54acd6b541c5aa3978))
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
**Note:** Version bump only for package @certd/ui-client
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
### Bug Fixes
* 修复中文域名使用cname方式校验无法通过的问题 ([f7d5baa](https://github.com/certd/certd/commit/f7d5baa6d04cb83c572b06e62f885890cfa0143a))
* 修复flexcdn部署证书的顶级CA名称显示 ([6467edb](https://github.com/certd/certd/commit/6467edb84324d7c80a85212675dbacedc459df83))
### Performance Improvements
* 分组选择支持清空选项 ([03e2e99](https://github.com/certd/certd/commit/03e2e9949837b34eb3ea56d14a9e8a5dabc96063))
* 优化cname检查当有冲突的cname记录时给出提示 ([e639a8f](https://github.com/certd/certd/commit/e639a8f9f12640ffcca69f1a6a0324459924afbd))
* 增加下载日志按钮 ([6ff509d](https://github.com/certd/certd/commit/6ff509d263c0182645b4692c10b5fedb192db964))
* 站点监控支持批量导入域名和ip ([2d7729d](https://github.com/certd/certd/commit/2d7729dbe98f29088f5f317db2b52cc1ede223a6))
* 支持设置用户有效期 ([6ac3bc5](https://github.com/certd/certd/commit/6ac3bc564f407dad2cd0b0b0744e887387aa5da3))
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
### Performance Improvements

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/ui-client",
"version": "1.34.10",
"version": "1.35.4",
"private": true,
"scripts": {
"dev": "vite --open",
@@ -9,7 +9,7 @@
"debug": "vite --mode debug --open",
"debug:pm": "vite --mode debugpm",
"debug:force": "vite --force --mode debug",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=32768 vite build ",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=40960 vite build ",
"dev-build": "echo 1",
"test:unit": "vitest",
"serve": "vite preview",
@@ -30,10 +30,10 @@
"@aws-sdk/client-s3": "^3.535.0",
"@aws-sdk/s3-request-presigner": "^3.535.0",
"@ctrl/tinycolor": "^4.1.0",
"@fast-crud/fast-crud": "^1.25.8",
"@fast-crud/fast-extends": "^1.25.8",
"@fast-crud/ui-antdv4": "^1.25.8",
"@fast-crud/ui-interface": "^1.25.8",
"@fast-crud/fast-crud": "^1.25.13",
"@fast-crud/fast-extends": "^1.25.13",
"@fast-crud/ui-antdv4": "^1.25.13",
"@fast-crud/ui-interface": "^1.25.13",
"@iconify/tailwind": "^1.2.0",
"@iconify/vue": "^4.1.1",
"@manypkg/get-packages": "^2.2.2",
@@ -102,8 +102,8 @@
"zod-defaults": "^0.1.3"
},
"devDependencies": {
"@certd/lib-iframe": "^1.34.10",
"@certd/pipeline": "^1.34.10",
"@certd/lib-iframe": "^1.35.4",
"@certd/pipeline": "^1.35.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/chai": "^4.3.12",

View File

@@ -1,17 +1,7 @@
<template>
<div class="cron-editor">
<div class="flex-o">
<cron-light
:disabled="disabled"
:readonly="readonly"
:period="period"
class="flex-o cron-ant"
locale="zh-CN"
format="quartz"
:model-value="modelValue"
@update:model-value="onUpdate"
@error="onError"
/>
<cron-light :disabled="disabled" :readonly="readonly" :period="period" class="flex-o cron-ant" locale="zh-CN" format="quartz" :model-value="modelValue" @update:model-value="onUpdate" @error="onError" />
</div>
<div class="mt-5 flex">
<a-input :disabled="true" :readonly="readonly" :value="modelValue" @change="onChange"></a-input>
@@ -26,13 +16,15 @@
import parser from "cron-parser";
import { computed, ref } from "vue";
import dayjs from "dayjs";
import { getCronNextTimes } from "/@/components/cron-editor/utils";
defineOptions({
name: "CronEditor"
name: "CronEditor",
});
const props = defineProps<{
modelValue?: string;
disabled?: boolean;
readonly?: boolean;
allowEveryMin?: boolean;
}>();
const period = ref<string>("");
@@ -58,9 +50,12 @@ const onUpdate = (value: string) => {
if (arr[0] === "*") {
arr[0] = "0";
}
if (arr[1] === "*") {
arr[1] = "0";
if (!props.allowEveryMin) {
if (arr[1] === "*") {
arr[1] = "0";
}
}
value = arr.join(" ");
emit("update:modelValue", value);
@@ -90,10 +85,10 @@ const nextTime = computed(() => {
if (props.modelValue == null) {
return "请先设置正确的cron表达式";
}
try {
const interval = parser.parseExpression(props.modelValue);
const next = interval.next().getTime();
return dayjs(next).format("YYYY-MM-DD HH:mm:ss");
const nextTimes = getCronNextTimes(props.modelValue, 2);
return nextTimes.join("");
} catch (e) {
console.log(e);
return "请先设置正确的cron表达式";

View File

@@ -0,0 +1,15 @@
import parser from "cron-parser";
import dayjs from "dayjs";
export function getCronNextTimes(cron: string, count: number = 1) {
if (cron == null) {
return [];
}
const nextTimes = [];
const interval = parser.parseExpression(cron);
for (let i = 0; i < count; i++) {
const next = interval.next().getTime();
nextTimes.push(dayjs(next).format("YYYY-MM-DD HH:mm:ss"));
}
return nextTimes;
}

View File

@@ -76,7 +76,7 @@ export default {
.text-editable {
flex: 1;
line-height: 34px;
overflow: hidden;
span.fs-iconify {
display: inline-flex;
justify-content: center;

View File

@@ -15,6 +15,7 @@ import PemInput from "./pem-input.vue";
import { defineAsyncComponent } from "vue";
import NotificationSelector from "../views/certd/notification/notification-selector/index.vue";
import EmailSelector from "./email-selector/index.vue";
import ValidTimeFormat from "./valid-time-format.vue";
export default {
install(app: any) {
app.component(
@@ -27,6 +28,7 @@ export default {
app.component("TextEditable", TextEditable);
app.component("FileInput", FileInput);
app.component("PemInput", PemInput);
app.component("ValidTimeFormat", ValidTimeFormat);
// app.component("CodeEditor", CodeEditor);
app.component("CronLight", CronLight);

View File

@@ -8,6 +8,7 @@ export type CnameRecord = {
status?: string;
hostRecord?: string;
recordValue?: string;
error?: string;
};
export type DomainGroupItem = {

View File

@@ -13,6 +13,9 @@
</td>
<td class="status center flex-center">
<fs-values-format v-model="cnameRecord.status" :dict="statusDict" />
<a-tooltip v-if="cnameRecord.error" :title="cnameRecord.error">
<fs-icon class="ml-5 color-red" icon="ion:warning-outline"></fs-icon>
</a-tooltip>
</td>
<td class="center">
<template v-if="cnameRecord.status !== 'valid'">

View File

@@ -21,7 +21,7 @@ import CnameRecordInfo from "/@/components/plugins/cert/domains-verify-plan-edit
import { computed } from "vue";
defineOptions({
name: "CnameVerifyPlan"
name: "CnameVerifyPlan",
});
const emit = defineEmits(["update:modelValue", "change"]);

View File

@@ -55,6 +55,7 @@
</div>
<div v-if="item.type === 'http'" class="plan-http">
<http-verify-plan v-model="item.httpVerifyPlan" @change="onPlanChanged" />
<div class="helper">证书颁发机构将请求 https://yourdomain/.well-known/acme-challenge/xxxxxx 来验证域名所有权。</div>
</div>
</div>
</td>

View File

@@ -0,0 +1,32 @@
<template>
<div class="valid-time-format">
<a-tag v-if="isExpired" color="red">{{ prefix || "" }}已过期</a-tag>
<a-tag v-if="isValid" color="green" :title="date">
<fs-time-humanize v-if="humanize" :model-value="modelValue" :options="{ largest: 1, units: ['y', 'd', 'h'] }" :use-format-greater="30000000000" />
<template v-else> {{ prefix || "" }}{{ date }} </template>
</a-tag>
</div>
</template>
<script setup lang="ts">
import { computed } from "vue";
import dayjs from "dayjs";
const props = defineProps<{
modelValue: number;
humanize?: boolean;
prefix?: string;
}>();
const date = computed(() => {
return dayjs(props.modelValue || 0).format("YYYY-MM-DD");
});
const isValid = computed(() => {
return props.modelValue > 0 && props.modelValue > new Date().getTime();
});
const isExpired = computed(() => {
return props.modelValue > 0 && props.modelValue < new Date().getTime();
});
</script>

View File

@@ -233,13 +233,13 @@ function openUpgrade() {
desc: "社区免费版",
type: "free",
icon: "lucide:package-open",
privilege: ["证书申请无限制", "域名数量无限制", "证书流水线数量无限制", "常用的主机、云平台、cdn等部署插件", "邮件、webhook通知方式"],
privilege: ["证书申请无限制", "域名数量无限制", "证书流水线数量无限制", "常用的主机、云平台、cdn、宝塔、1Panel等部署插件", "邮件、webhook通知方式"],
},
plus: {
title: "专业版",
desc: "开源需要您的赞助支持",
type: "plus",
privilege: ["可加VIP群您的需求将优先实现", "站点证书监控无限制", "更多通知方式", "插件全开放,更多强大的部署插件宝塔、群晖、1Panel等"],
privilege: ["可加VIP群您的需求将优先实现", "站点证书监控无限制", "更多通知方式", "插件全开放,群辉等更多插件"],
trial: {
title: "点击获取7天试用",
click: () => {

View File

@@ -120,10 +120,10 @@ function install(app: App, options: any = {}) {
rowHandle: {
fixed: "right",
buttons: {
view: { type: "link", text: null, icon: "ion:eye-outline" },
copy: { show: true, type: "link", text: null, icon: "ion:copy-outline" },
edit: { type: "link", text: null, icon: "ion:create-outline" },
remove: { type: "link", style: { color: "red" }, text: null, icon: "ion:trash-outline" },
view: { type: "link", text: null, icon: "ion:eye-outline", tooltip: { title: "查看" } },
copy: { show: true, type: "link", text: null, icon: "ion:copy-outline", tooltip: { title: "复制" } },
edit: { type: "link", text: null, icon: "ion:create-outline", tooltip: { title: "编辑" } },
remove: { type: "link", style: { color: "red" }, text: null, icon: "ion:trash-outline", tooltip: { title: "删除" } },
},
dropdown: {
more: {
@@ -334,6 +334,22 @@ function install(app: App, options: any = {}) {
return columnProps;
},
});
registerMergeColumnPlugin({
name: "reset-values-format-colors",
order: 10,
handle: (columnProps: ColumnCompositionProps) => {
// 你可以在此处做你自己的处理
// 比如你可以定义一个readonly的公共属性处理该字段只读不能编辑
if (columnProps.column?.component?.name === "fs-values-format") {
// 合并column配置
if (!columnProps.column.component.autoColors) {
columnProps.column.component.autoColors = ["green", "cyan", "blue", "purple", "geekblue"];
}
}
return columnProps;
},
});
}
export default {

View File

@@ -122,7 +122,7 @@ export const certdResources = [
},
{
title: "OpenKey",
title: "开放接口密钥",
name: "OpenKey",
path: "/certd/open/openkey",
component: "/certd/open/openkey/index.vue",

View File

@@ -30,6 +30,7 @@ export type PlusInfo = {
};
export type SysPublicSetting = {
registerEnabled?: boolean;
userValidTimeEnabled?: boolean;
usernameRegisterEnabled?: boolean;
mobileRegisterEnabled?: boolean;
emailRegisterEnabled?: boolean;

View File

@@ -27,6 +27,8 @@ export interface UserInfoRes {
avatar?: string;
roleIds: number[];
isWeak?: boolean;
validTime?: number;
status?: number;
}
export interface LoginRes {

View File

@@ -49,38 +49,38 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
pageRequest,
addRequest,
editRequest,
delRequest
delRequest,
},
toolbar: {
show: false
show: false,
},
search: {
show: false
show: false,
},
form: {
wrapper: {
width: "1050px"
}
width: "1050px",
},
},
rowHandle: {
width: 200
width: 200,
},
table: {
scroll: {
x: 800
x: 800,
},
rowSelection: {
type: "radio",
selectedRowKeys: selectedRowKey,
onChange: onSelectChange
onChange: onSelectChange,
},
customRow: (record: any) => {
return {
onClick: () => {
onSelectChange([record.id]);
} // 点击行
}, // 点击行
};
}
},
},
columns: {
id: {
@@ -88,25 +88,25 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
key: "id",
type: "number",
column: {
width: 50
width: 50,
},
form: {
show: false
}
show: false,
},
},
name: {
title: "名称",
search: {
show: true
show: true,
},
type: ["text"],
form: {
rules: [{ required: true, message: "请填写名称" }],
helper: "随便填,当多个相同类型的授权时,便于区分"
helper: "随便填,当多个相同类型的授权时,便于区分",
},
column: {
width: 200
}
width: 200,
},
},
from: {
title: "级别",
@@ -114,29 +114,29 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
dict: dict({
data: [
{ label: "系统", value: "sys" },
{ label: "用户", value: "user" }
]
{ label: "用户", value: "user" },
],
}),
search: {
show: false
show: false,
},
form: {
show: false
show: false,
},
column: {
width: 100,
align: "center",
component: {
color: "auto"
color: "auto",
},
order: 10
order: 10,
},
valueBuilder: ({ row, key, value }) => {
row[key] = row.userId > 0 ? "user" : "sys";
}
},
},
...commonColumnsDefine
}
}
...commonColumnsDefine,
},
},
};
}

View File

@@ -2,7 +2,7 @@ import * as api from "./api";
import { useI18n } from "vue-i18n";
import { Ref, ref } from "vue";
import { useRouter } from "vue-router";
import { AddReq, 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";
import { useUserStore } from "/@/store/user";
import { useSettingStore } from "/@/store/settings";
import { message } from "ant-design-vue";
@@ -31,7 +31,15 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
const settingStore = useSettingStore();
const selectedRowKeys: Ref<any[]> = ref([]);
context.selectedRowKeys = selectedRowKeys;
const dictRef = dict({
data: [
{ label: "待设置CNAME", value: "cname", color: "warning" },
{ label: "验证中", value: "validating", color: "blue" },
{ label: "验证成功", value: "valid", color: "green" },
{ label: "验证失败", value: "failed", color: "red" },
{ label: "验证超时", value: "timeout", color: "red" },
],
});
return {
crudOptions: {
settings: {
@@ -174,21 +182,25 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
status: {
title: "状态",
type: "dict-select",
dict: dict({
data: [
{ label: "待设置CNAME", value: "cname", color: "warning" },
{ label: "验证中", value: "validating", color: "blue" },
{ label: "验证成功", value: "valid", color: "green" },
{ label: "验证失败", value: "failed", color: "red" },
{ label: "验证超时", value: "timeout", color: "red" },
],
}),
dict: dictRef,
addForm: {
show: false,
},
column: {
width: 120,
align: "center",
cellRender({ value, row }) {
return (
<div class={"flex flex-center"}>
<fs-values-format modelValue={value} dict={dictRef}></fs-values-format>
{row.error && (
<a-tooltip title={row.error}>
<fs-icon class={"ml-5 color-red"} icon="ion:warning-outline"></fs-icon>
</a-tooltip>
)}
</div>
);
},
},
},
triggerValidate: {

View File

@@ -6,7 +6,7 @@ export async function GetList(query: any) {
return await request({
url: apiPrefix + "/page",
method: "post",
data: query
data: query,
});
}
@@ -14,7 +14,7 @@ export async function AddObj(obj: any) {
return await request({
url: apiPrefix + "/add",
method: "post",
data: obj
data: obj,
});
}
@@ -22,7 +22,7 @@ export async function UpdateObj(obj: any) {
return await request({
url: apiPrefix + "/update",
method: "post",
data: obj
data: obj,
});
}
@@ -30,7 +30,7 @@ export async function DelObj(id: any) {
return await request({
url: apiPrefix + "/delete",
method: "post",
params: { id }
params: { id },
});
}
@@ -38,7 +38,7 @@ export async function GetObj(id: any) {
return await request({
url: apiPrefix + "/info",
method: "post",
params: { id }
params: { id },
});
}
@@ -46,7 +46,7 @@ export async function GetDetail(id: any) {
return await request({
url: apiPrefix + "/detail",
method: "post",
params: { id }
params: { id },
});
}
@@ -54,6 +54,6 @@ export async function DeleteBatch(ids: any[]) {
return await request({
url: apiPrefix + "/deleteByIds",
method: "post",
data: { ids }
data: { ids },
});
}

View File

@@ -2,9 +2,10 @@ import * as api from "./api";
import { useI18n } from "vue-i18n";
import { computed, Ref, ref } from "vue";
import { useRouter } from "vue-router";
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, EditReq, UserPageQuery, UserPageRes, utils } from "@fast-crud/fast-crud";
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, utils } from "@fast-crud/fast-crud";
import { useUserStore } from "/@/store/user";
import { useSettingStore } from "/@/store/settings";
import { statusUtil } from "/@/views/certd/pipeline/pipeline/utils/util.status";
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const router = useRouter();
@@ -143,6 +144,50 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
},
},
},
triggerType: {
title: "触发类型",
type: "dict-select",
search: {
show: true,
},
dict: dict({
data: [
{ value: "user", label: "手动执行" },
{ value: "timer", label: "定时执行" },
],
}),
form: {
show: false,
value: "custom",
},
column: {
sorter: true,
width: 90,
align: "center",
show: true,
component: {
color: "auto",
},
},
},
status: {
title: "状态",
type: "dict-select",
search: {
show: true,
},
dict: dict({
data: statusUtil.getOptions(),
}),
form: {
show: false,
},
column: {
sorter: true,
width: 120,
align: "center",
},
},
createTime: {
title: "创建时间",
type: "datetime",

View File

@@ -56,6 +56,14 @@ export const siteInfoApi = {
});
},
async Import(form: any) {
return await request({
url: apiPrefix + "/import",
method: "post",
data: form,
});
},
async DisabledChange(id: number, disabled: boolean) {
return await request({
url: apiPrefix + "/disabledChange",

View File

@@ -8,6 +8,7 @@ import { useSettingStore } from "/@/store/settings";
import { mySuiteApi } from "/@/views/certd/suite/mine/api";
import { mitter } from "/@/utils/util.mitt";
import { useSiteIpMonitor } from "./ip/use";
import { useSiteImport } from "/@/views/certd/monitor/site/use";
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const { t } = useI18n();
@@ -44,6 +45,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
});
const { openSiteIpMonitorDialog } = useSiteIpMonitor();
const { openSiteImportDialog } = useSiteImport();
return {
crudOptions: {
request: {
@@ -97,6 +99,19 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
await crudExpose.openAdd({});
},
},
//导入按钮
import: {
show: true,
text: "批量导入",
type: "primary",
async click() {
openSiteImportDialog({
afterSubmit() {
crudExpose.doRefresh();
},
});
},
},
},
},
rowHandle: {
@@ -115,7 +130,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
await api.DoCheck(row.id);
await crudExpose.doRefresh();
notification.success({
message: "检查完成",
message: "检查任务已提交,请稍后刷新查看结果",
});
},
},
@@ -235,7 +250,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
},
};
return (
<a-popover placement="left" v-slots={slots} overlayStyle={{ maxWidth: "30%" }}>
<a-popover placement={"left"} v-slots={slots} overlayStyle={{ maxWidth: "30%" }}>
{row.certDomains}
</a-popover>
);

View File

@@ -68,4 +68,11 @@ export const siteIpApi = {
},
});
},
async Import(form: any) {
return await request({
url: apiPrefix + "/import",
method: "post",
data: form,
});
},
};

View File

@@ -4,13 +4,11 @@ import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, Edi
import { siteIpApi } from "./api";
import dayjs from "dayjs";
import { Modal, notification } from "ant-design-vue";
import { useSettingStore } from "/@/store/settings";
import { useSiteIpMonitor } from "/@/views/certd/monitor/site/ip/use";
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const { t } = useI18n();
const api = siteIpApi;
const { crudBinding } = crudExpose;
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
if (!query.query) {
query.query = {};
@@ -36,8 +34,6 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
return res;
};
const settingsStore = useSettingStore();
const checkStatusDict = dict({
data: [
{ label: "成功", value: "ok", color: "green" },
@@ -45,6 +41,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
{ label: "异常", value: "error", color: "red" },
],
});
const { openSiteIpImportDialog } = useSiteIpMonitor();
return {
crudOptions: {
request: {
@@ -75,6 +72,19 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
await crudExpose.openAdd({});
},
},
import: {
show: true,
text: "批量导入",
type: "primary",
async click() {
openSiteIpImportDialog({
siteId: context.props.siteId,
afterSubmit() {
crudExpose.doRefresh();
},
});
},
},
load: {
text: "同步IP",
type: "primary",
@@ -127,7 +137,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
await api.DoCheck(row.id);
await crudExpose.doRefresh();
notification.success({
message: "检查任务已提交",
message: "检查任务已提交,请稍后刷新查看结果",
});
},
},
@@ -295,6 +305,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
data: [
{ label: "同步", value: "sync", color: "green" },
{ label: "手动", value: "manual", color: "blue" },
{ label: "导入", value: "import", color: "blue" },
],
}),
form: {

View File

@@ -1,11 +1,10 @@
import { useFormWrapper } from "@fast-crud/fast-crud";
import { useRouter } from "vue-router";
import SiteIpCertMonitor from "./index.vue";
import { siteIpApi } from "/@/views/certd/monitor/site/ip/api";
export function useSiteIpMonitor() {
const { openDialog } = useFormWrapper();
const router = useRouter();
const { openDialog, openCrudFormDialog } = useFormWrapper();
async function openSiteIpMonitorDialog(opts: { siteId: number }) {
await openDialog({
@@ -34,7 +33,42 @@ export function useSiteIpMonitor() {
});
}
async function openSiteIpImportDialog(opts: { afterSubmit: any; siteId: any }) {
const { afterSubmit } = opts;
await openCrudFormDialog<any>({
crudOptions: {
columns: {
text: {
type: "textarea",
title: "IP列表",
form: {
helper: "IP或者CNAME域名一行一个",
rules: [{ required: true, message: "请输入要导入的IP或域名" }],
component: {
placeholder: "192.168.1.2\ncname.foo.com",
rows: 8,
},
col: {
span: 24,
},
},
},
},
form: {
async doSubmit({ form }) {
return siteIpApi.Import({
...form,
siteId: opts.siteId,
});
},
afterSubmit,
},
},
});
}
return {
openSiteIpMonitorDialog,
openSiteIpImportDialog,
};
}

View File

@@ -3,6 +3,8 @@ import { request } from "/src/api/service";
const apiPrefix = "/monitor/site/setting";
export type UserSiteMonitorSetting = {
notificationId?: number;
retryTimes?: number;
cron?: string;
};
export async function SiteMonitorSettingsGet() {

View File

@@ -11,6 +11,19 @@
</div>
<div class="helper">设置通知渠道</div>
</a-form-item>
<a-form-item label="重试次数" :name="['retryTimes']">
<div class="flex">
<a-input-number v-model:value="formState.retryTimes" />
</div>
<div class="helper">监控请求重试次数</div>
</a-form-item>
<a-form-item label="监控定时设置" :name="['cron']">
<div class="flex flex-baseline">
<cron-editor v-model="formState.cron" :disabled="!settingsStore.isPlus" :allow-every-min="userStore.isAdmin" />
<vip-button class="ml-5" mode="button"></vip-button>
</div>
<div class="helper">定时触发监控</div>
</a-form-item>
<a-form-item label=" " :colon="false" :wrapper-col="{ span: 16 }">
<loading-button type="primary" html-type="button" :click="doSave">保存</loading-button>
</a-form-item>
@@ -27,8 +40,10 @@ import { notification } from "ant-design-vue";
import { merge } from "lodash-es";
import { useSettingStore } from "/src/store/settings";
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
import { useUserStore } from "/@/store/user";
const settingsStore = useSettingStore();
const userStore = useUserStore();
defineOptions({
name: "UserSecurity",
});
@@ -56,7 +71,7 @@ const doSave = async (form: any) => {
<style lang="less">
.page-user-settings {
.user-settings-form {
width: 600px;
width: 700px;
margin: 20px;
}
}

View File

@@ -0,0 +1,41 @@
import { useFormWrapper } from "@fast-crud/fast-crud";
import { siteInfoApi } from "./api";
export function useSiteImport() {
const { openCrudFormDialog } = useFormWrapper();
async function openSiteImportDialog(opts: { afterSubmit: any }) {
const { afterSubmit } = opts;
await openCrudFormDialog<any>({
crudOptions: {
columns: {
text: {
type: "textarea",
title: "域名列表",
form: {
helper: "格式【域名:端口:名称】,一行一个,其中端口、名称可以省略\n比如\nwww.baidu.com:443:百度\nwww.taobao.com::淘宝\nwww.google.com",
rules: [{ required: true, message: "请输入要导入的域名" }],
component: {
placeholder: "www.baidu.com:443:百度\nwww.taobao.com::淘宝\nwww.google.com\n",
rows: 8,
},
col: {
span: 24,
},
},
},
},
form: {
async doSubmit({ form }) {
return siteInfoApi.Import(form);
},
afterSubmit,
},
},
});
}
return {
openSiteImportDialog,
};
}

View File

@@ -5,17 +5,15 @@ import { useRouter } from "vue-router";
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes, useUi } from "@fast-crud/fast-crud";
import { statusUtil } from "/@/views/certd/pipeline/pipeline/utils/util.status";
import { Modal, notification } from "ant-design-vue";
import { env } from "/@/utils/util.env";
import { useUserStore } from "/@/store/user";
import dayjs from "dayjs";
import { useSettingStore } from "/@/store/settings";
import { cloneDeep } from "lodash-es";
import { useModal } from "/@/use/use-modal";
import CertView from "./cert-view.vue";
import { eachStages } from "./utils";
import { setRunnableIds, useCertPipelineCreator } from "/@/views/certd/pipeline/certd-form/use";
import { useCertUpload } from "/@/views/certd/pipeline/cert-upload/use";
import GroupSelector from "/@/views/certd/pipeline/group/group-selector.vue";
import { useCertViewer } from "/@/views/certd/pipeline/use";
export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const router = useRouter();
@@ -61,59 +59,7 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
return res;
};
const model = useModal();
const viewCert = async (row: any) => {
const cert = await api.GetCert(row.id);
if (!cert) {
notification.error({ message: "请先运行一次流水线" });
return;
}
model.success({
title: "查看证书",
maskClosable: true,
okText: "关闭",
width: 800,
content: () => {
return <CertView cert={cert}></CertView>;
},
});
};
const downloadCert = async (row: any) => {
const files = await api.GetFiles(row.id);
model.success({
title: "点击链接下载",
maskClosable: true,
okText: "关闭",
content: () => {
const children = [];
for (const file of files) {
const downloadUrl = `${env.API}/pi/history/download?pipelineId=${row.id}&fileId=${file.id}`;
children.push(
<div>
<div class={"flex-o m-5"}>
<fs-icon icon={"ant-design:cloud-download-outlined"} class={"mr-5 fs-16"}></fs-icon>
<a href={downloadUrl} target={"_blank"}>
{file.filename}
</a>
</div>
</div>
);
}
if (children.length === 0) {
return <div></div>;
}
return (
<div class={"mt-3"}>
<div> {children}</div>
</div>
);
},
});
};
const { viewCert, downloadCert } = useCertViewer();
const userStore = useUserStore();
const settingStore = useSettingStore();
@@ -208,6 +154,10 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
},
table: {
scroll: { x: 1500 },
remove: {
confirmTitle: "确定要删除吗?",
confirmMessage: "将删除该流水线相关的所有数据,包括执行历史、证书文件、证书仓库记录等",
},
},
tabs: {
name: "groupId",
@@ -223,6 +173,7 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
play: {
order: -999,
title: "运行流水线",
tooltip: { title: "运行流水线" },
type: "link",
icon: "ant-design:play-circle-outlined",
click({ row }) {
@@ -276,19 +227,21 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
viewCert: {
order: 3,
title: "查看证书",
tooltip: { title: "查看证书" },
type: "link",
icon: "ph:certificate",
async click({ row }) {
await viewCert(row);
await viewCert(row.id);
},
},
download: {
order: 4,
type: "link",
title: "下载证书",
tooltip: { title: "下载证书" },
icon: "ant-design:download-outlined",
async click({ row }) {
await downloadCert(row);
await downloadCert(row.id);
},
},
remove: {

View File

@@ -34,6 +34,8 @@ const pipelineOptions: PipelineOptions = {
stages: [],
triggers: [],
...JSON.parse(detail.pipeline.content || "{}"),
type: detail.pipeline.type,
from: detail.pipeline.from,
},
} as PipelineDetail;
},

View File

@@ -1,7 +1,7 @@
<template>
<div class="pi-group-selector flex full-w">
<div class="flex-1">
<fs-dict-select :value="modelValue" :dict="groupDictRef" @update:value="doUpdate"></fs-dict-select>
<fs-dict-select :value="modelValue" :dict="groupDictRef" :allow-clear="true" @update:value="doUpdate"></fs-dict-select>
</div>
<fs-table-select

View File

@@ -23,14 +23,11 @@
</a-tab-pane>
</a-tabs>
<template #footer>
<a-tooltip title="AI分析异常">
<fs-button v-if="settingsStore.sysPublic.aiChatEnabled !== false" key="aiChat" type="primary" icon="ion:color-wand-outline" @click="taskModal.onAiChat">AI分析</fs-button>
</a-tooltip>
<a-tooltip title="强制重新执行此步骤">
<fs-button key="rerun" type="primary" text="重新运行" icon="icon-park-outline:replay-music" @click="triggerRun(activeKey)"></fs-button>
</a-tooltip>
<fs-button key="cancel" icon="ion:close-circle-outline" @click="taskModal.onOk">关闭</fs-button>
<fs-button key="submit" icon="ion:checkmark-circle-outline" type="primary" @click="taskModal.onOk">确定</fs-button>
<fs-button v-if="settingsStore.sysPublic.aiChatEnabled !== false" key="aiChat" :tooltip="{ title: 'AI分析异常' }" type="primary" icon="ion:color-wand-outline" @click="taskModal.onAiChat">AI分析</fs-button>
<fs-button key="rerun" type="primary" :tooltip="{ title: '强制重新执行此步骤' }" text="重新运行" icon="icon-park-outline:replay-music" @click="triggerRun(activeKey)"></fs-button>
<fs-button key="downloadLogs" type="primary" :tooltip="{ title: '当前任务日志下载' }" icon="ion:arrow-down-circle-outline" @click="taskModal.onDownloadLogs">下载日志</fs-button>
<fs-button key="cancel" :tooltip="{ title: '关闭窗口' }" icon="ion:close-circle-outline" @click="taskModal.onOk">关闭</fs-button>
<!-- <fs-button key="submit" :tooltip="{ title: '关闭窗口' }" icon="ion:checkmark-circle-outline" type="primary" @click="taskModal.onOk">确定</fs-button>-->
</template>
</a-modal>
</template>
@@ -41,6 +38,7 @@ import { RunHistory } from "../../type";
import PiStatusShow from "/@/views/certd/pipeline/pipeline/component/status-show.vue";
import { usePreferences } from "/@/vben/preferences";
import { useSettingStore } from "/@/store/settings/index";
import { notification } from "ant-design-vue";
export default {
name: "PiTaskView",
components: { PiStatusShow },
@@ -56,6 +54,22 @@ export default {
onAiChat() {
onAiChat();
},
onDownloadLogs() {
const logs = currentHistory.value?.logs[activeKey.value];
if (!logs || logs.length === 0) {
notification.warning({
message: "没有日志",
});
return;
}
const logText = logs.join("");
const blob = new Blob([logText], { type: "text/plain;charset=utf-8" });
const a = document.createElement("a");
a.href = URL.createObjectURL(blob);
a.download = "certd-task-log.txt";
a.click();
URL.revokeObjectURL(a.href);
},
cancelText: "关闭",
});
const { isMobile } = usePreferences();

View File

@@ -1,18 +1,43 @@
<template>
<fs-page v-if="pipeline" class="page-pipeline-edit">
<template #header>
<div class="title">
<div class="title flex-1">
<fs-button class="back" icon="ion:chevron-back-outline" @click="goBack"></fs-button>
<text-editable v-model="pipeline.title" :hover-show="false" :disabled="!editMode"></text-editable>
</div>
<div class="more">
<template v-if="editMode">
<a-button type="primary" :loading="saveLoading" @click="save">保存</a-button>
<a-button class="ml-5" @click="cancel">取消</a-button>
</template>
<template v-else>
<a-button type="primary" @click="edit">编辑</a-button>
</template>
<div class="more flex items-center flex-1 justify-end">
<div v-if="isCert" class="flex items-center hidden md:block">
<a-tag class="mr-5 pointer" color="green" type="primary" text="查看证书" @click="viewCert(pipeline.id)">
<span class="flex"><fs-icon icon="ant-design:eye-outlined"></fs-icon> 查看证书</span>
</a-tag>
<a-tag class="mr-5 pointer" color="green" type="primary" text="下载证书" @click="downloadCert(pipeline.id)">
<span class="flex"> <fs-icon icon="ant-design:download-outlined"></fs-icon> 下载证书 </span>
</a-tag>
</div>
<div class="flex items-center hidden md:block">
<a-tag v-if="nextTriggerTimes" color="blue">
<span class="flex">
<fs-icon icon="ion:time-outline"></fs-icon>
下次执行时间{{ nextTriggerTimes }}
</span>
</a-tag>
<a-tag v-else-if="nextTriggerTimes === false" color="red">
<span class="flex">
<fs-icon icon="ion:caret-forward-circle-outline"></fs-icon>
未设置触发源不会自动执行
</span>
</a-tag>
</div>
<div class="basis-40 flex justify-end mr-10">
<template v-if="editMode">
<fs-button type="primary" :loading="saveLoading" @click="save">保存</fs-button>
<fs-button class="ml-5" @click="cancel">取消</fs-button>
</template>
<template v-else>
<fs-button icon="ant-design:edit-outlined" type="primary" @click="edit">编辑</fs-button>
</template>
</div>
</div>
</template>
@@ -241,7 +266,7 @@
@cancel="historyCancel()"
></pi-history-timeline-item>
</template>
<a-empty v-if="histories.length === 0"> </a-empty>
<a-empty v-if="histories.length === 0"></a-empty>
</a-timeline>
</a-page-header>
</div>
@@ -255,7 +280,7 @@
</template>
<script lang="ts">
import { defineComponent, onMounted, onUnmounted, provide, Ref, ref, watch } from "vue";
import { defineComponent, onMounted, onUnmounted, provide, Ref, ref, watch, computed } from "vue";
import { useRouter } from "vue-router";
import PiTaskForm from "./component/task-form/index.vue";
import PiTriggerForm from "./component/trigger-form/index.vue";
@@ -275,11 +300,23 @@ import { useUserStore } from "/@/store/user";
import TaskShortcuts from "./component/shortcut/task-shortcuts.vue";
import { eachSteps, findStep } from "../utils";
import { PluginGroups } from "/@/store/plugin";
import { getCronNextTimes } from "/@/components/cron-editor/utils";
import { useCertViewer } from "/@/views/certd/pipeline/use";
export default defineComponent({
name: "PipelineEdit",
// eslint-disable-next-line vue/no-unused-components
components: { FsIcon, PiHistoryTimelineItem, PiTaskForm, PiTriggerForm, PiTaskView, PiStatusShow, PiNotificationForm, VDraggable, TaskShortcuts },
components: {
FsIcon,
PiHistoryTimelineItem,
PiTaskForm,
PiTriggerForm,
PiTaskView,
PiStatusShow,
PiNotificationForm,
VDraggable,
TaskShortcuts,
},
props: {
pipelineId: {
type: [Number, String],
@@ -309,7 +346,24 @@ export default defineComponent({
const currentHistory: Ref<any> = ref({});
const nextTriggerTimes = computed(() => {
const triggers = pipeline.value.triggers;
if (!triggers || triggers.length === 0) {
return false;
}
let nextTimes: any = [];
for (const item of triggers) {
if (!item.props?.cron) {
continue;
}
const ret = getCronNextTimes(item.props?.cron, 1);
nextTimes.push(...ret);
}
return nextTimes.join("");
});
const router = useRouter();
function goBack() {
router.back();
}
@@ -365,8 +419,10 @@ export default defineComponent({
}
return true;
}
const intervalLoadHistoryRef = ref();
const isLoadingHistory = ref(false);
function watchNewHistoryList() {
intervalLoadHistoryRef.value = setInterval(async () => {
if (isLoadingHistory.value) {
@@ -390,6 +446,7 @@ export default defineComponent({
}
}, 3000);
}
onMounted(() => {
watchNewHistoryList();
});
@@ -420,7 +477,15 @@ export default defineComponent({
return;
}
const detail: PipelineDetail = await props.options.getPipelineDetail({ pipelineId: value });
currentPipeline.value = _.merge({ title: "新管道流程", stages: [], triggers: [], notifications: [] }, detail.pipeline);
currentPipeline.value = _.merge(
{
title: "新管道流程",
stages: [],
triggers: [],
notifications: [],
},
detail.pipeline
);
pipeline.value = currentPipeline.value;
await loadHistoryList(true);
},
@@ -535,6 +600,7 @@ export default defineComponent({
function isLastStage(index: number) {
return false;
}
return {
stageAdd,
isLastStage,
@@ -654,6 +720,7 @@ export default defineComponent({
}
const validateErrors: Ref = ref({});
function addValidateError(taskId: string, error: any) {
const errors = validateErrors.value[taskId] || [];
validateErrors.value[taskId] = errors;
@@ -708,6 +775,7 @@ export default defineComponent({
function hasValidateError(taskId: string) {
return validateErrors.value[taskId] != null;
}
const save = async (offEdit = true) => {
doValidate();
@@ -771,9 +839,11 @@ export default defineComponent({
};
const logsCollapse = ref(false);
function toggleLogsCollapse() {
logsCollapse.value = !logsCollapse.value;
}
return {
historyView,
historyCancel,
@@ -838,7 +908,12 @@ export default defineComponent({
};
});
const { viewCert, downloadCert } = useCertViewer();
const isCert = computed(() => {
return currentPipeline.value?.type?.startsWith("cert");
});
return {
isCert,
pipeline,
currentHistory,
histories,
@@ -852,6 +927,9 @@ export default defineComponent({
...useHistory(),
...useNotification(),
...useScroll(),
nextTriggerTimes,
viewCert,
downloadCert,
};
},
});
@@ -864,9 +942,11 @@ export default defineComponent({
text-overflow: ellipsis;
text-wrap: nowrap;
display: flex;
.back {
margin-right: 10px;
}
.text-editable {
width: 300px;
}
@@ -876,47 +956,57 @@ export default defineComponent({
.pi-status-show {
display: inline-flex;
}
.fs-page-content {
overflow-x: auto;
}
.layout {
width: 100%;
height: 100%;
position: relative;
display: flex;
overflow-x: hidden;
.layout-left {
flex: 1;
height: 100%;
}
.layout-right {
width: 350px;
height: 100%;
}
}
.pipeline-container {
width: 100%;
height: 100%;
position: relative;
overflow: auto;
}
.pipeline {
position: absolute;
left: 0;
top: 0;
height: 100%;
.stages {
display: flex;
overflow: auto;
min-width: 100%;
height: 100%;
.stage {
width: 300px;
border-right: 1px solid #c7c7c7;
.is-add {
visibility: hidden;
color: gray;
}
&:hover .is-add {
visibility: visible;
}
@@ -925,11 +1015,13 @@ export default defineComponent({
padding: 20px;
color: gray;
display: flex;
.stage-move-handle {
cursor: move;
margin-left: 4px;
}
}
//.sortable-ghost {
// .line {
// visibility: hidden;
@@ -943,6 +1035,7 @@ export default defineComponent({
&.line-left {
left: 25px;
.flow-line {
border-right: 0;
}
@@ -950,6 +1043,7 @@ export default defineComponent({
&.line-right {
right: 25px;
.flow-line {
border-left: 0;
}
@@ -960,6 +1054,7 @@ export default defineComponent({
border: 1px solid #c7c7c7;
border-top: 0;
}
.add-stage-btn {
display: inline-flex;
visibility: hidden;
@@ -969,6 +1064,7 @@ export default defineComponent({
bottom: -12px;
left: -12px;
z-index: 100;
&:hover {
color: #1890ff;
}
@@ -981,6 +1077,7 @@ export default defineComponent({
&.line-left {
left: 0;
.flow-line {
border-right: 0;
border-left: 0;
@@ -989,6 +1086,7 @@ export default defineComponent({
&.line-right {
right: 0;
.flow-line {
border-left: 0;
border-right: 0;
@@ -1008,13 +1106,16 @@ export default defineComponent({
}
}
}
&.last-stage {
.line {
width: 50% !important;
right: auto;
.flow-line {
border-right: 0;
}
.add-stage-btn {
visibility: hidden;
}
@@ -1038,6 +1139,7 @@ export default defineComponent({
}
}
}
.task {
display: flex;
flex-direction: column;
@@ -1050,6 +1152,7 @@ export default defineComponent({
&.in-edit {
margin-right: 28px;
}
&.disabled {
}
}
@@ -1061,12 +1164,15 @@ export default defineComponent({
//font-size: 18px;
cursor: pointer;
z-index: 10;
&:hover {
color: #1890ff;
}
&.copy {
right: 30px;
}
&.drag {
right: 10px;
cursor: move;
@@ -1078,6 +1184,7 @@ export default defineComponent({
}
position: relative;
.shortcut {
position: absolute;
bottom: -10px;
@@ -1092,6 +1199,7 @@ export default defineComponent({
.layout-right {
position: relative;
&.collapsed {
margin-right: -350px;
}

View File

@@ -79,7 +79,9 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
return (
<div>
<a href={"https://help.aliyun.com/zh/dns/subdomain-management"}></a>
<a href={"https://help.aliyun.com/zh/dns/subdomain-management"} target={"_blank"}>
</a>
</div>
);
},

View File

@@ -0,0 +1,65 @@
import * as api from "/@/views/certd/pipeline/api";
import { notification } from "ant-design-vue";
import CertView from "/@/views/certd/pipeline/cert-view.vue";
import { env } from "/@/utils/util.env";
import { useModal } from "/@/use/use-modal";
export function useCertViewer() {
const model = useModal();
const viewCert = async (id: number) => {
const cert = await api.GetCert(id);
if (!cert) {
notification.error({ message: "请先运行一次流水线" });
return;
}
model.success({
title: "查看证书",
maskClosable: true,
okText: "关闭",
width: 800,
content: () => {
return <CertView cert={cert}></CertView>;
},
});
};
const downloadCert = async (id: any) => {
const files = await api.GetFiles(id);
model.success({
title: "点击链接下载",
maskClosable: true,
okText: "关闭",
content: () => {
const children = [];
for (const file of files) {
const downloadUrl = `${env.API}/pi/history/download?pipelineId=${id}&fileId=${file.id}`;
children.push(
<div>
<div class={"flex-o m-5"}>
<fs-icon icon={"ant-design:cloud-download-outlined"} class={"mr-5 fs-16"}></fs-icon>
<a href={downloadUrl} target={"_blank"}>
{file.filename}
</a>
</div>
</div>
);
}
if (children.length === 0) {
return <div></div>;
}
return (
<div class={"mt-3"}>
<div> {children}</div>
</div>
);
},
});
};
return {
viewCert,
downloadCert,
};
}

View File

@@ -35,6 +35,10 @@
<a-divider type="vertical" />
<suite-card class="m-0"></suite-card>
</template>
<template v-if="settingsStore.isPlus && settingsStore.sysPublic.userValidTimeEnabled === true && userInfo.validTime">
<a-divider type="vertical" />
<valid-time-format class="flex-o" prefix="账户有效期:" :model-value="userInfo.validTime" />
</template>
</div>
</div>
</div>

View File

@@ -1,7 +1,9 @@
import * as api from "./api";
import { AddReq, 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";
import { useUserStore } from "/@/store/user";
import { Modal, notification } from "ant-design-vue";
import dayjs from "dayjs";
import { useSettingStore } from "/@/store/settings";
export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
@@ -21,6 +23,10 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
const userStore = useUserStore();
const settingStore = useSettingStore();
const userValidTimeEnabled = compute(() => {
return settingStore.sysPublic.userValidTimeEnabled === true;
});
return {
crudOptions: {
request: {
@@ -210,6 +216,43 @@ export default function ({ crudExpose }: CreateCrudOptionsProps): CreateCrudOpti
width: 100,
},
},
validTime: {
title: "有效期",
type: "date",
form: {
show: userValidTimeEnabled,
},
column: {
align: "center",
sorter: true,
width: 100,
show: userValidTimeEnabled,
cellRender({ value }) {
if (value == null || value === 0) {
return "";
}
if (value < dayjs().valueOf()) {
return <a-tag color={"red"}></a-tag>;
}
const date = dayjs(value).format("YYYY-MM-DD");
return (
<a-tag color={"green"} title={date}>
<fs-time-humanize modelValue={value} options={{ largest: 1, units: ["y", "d", "h"] }} useFormatGreater={30000000000} />
</a-tag>
);
},
},
valueBuilder({ value, row, key }) {
if (value != null) {
row[key] = dayjs(value);
}
},
valueResolve({ value, row, key }) {
if (value != null) {
row[key] = value.valueOf();
}
},
},
remark: {
title: "备注",
type: "text",

View File

@@ -11,6 +11,13 @@
<a-form-item label="开启自助注册" :name="['public', 'registerEnabled']">
<a-switch v-model:checked="formState.public.registerEnabled" />
</a-form-item>
<a-form-item label="开启用户有效期" :name="['public', 'userValidTimeEnabled']">
<div class="flex-o">
<a-switch v-model:checked="formState.public.userValidTimeEnabled" :disabled="!settingsStore.isPlus" />
<vip-button class="ml-5" mode="button"></vip-button>
</div>
<div class="helper">有效期内用户可正常使用失效后流水线将被停用</div>
</a-form-item>
<template v-if="formState.public.registerEnabled">
<a-form-item label="开启用户名注册" :name="['public', 'usernameRegisterEnabled']">
<a-switch v-model:checked="formState.public.usernameRegisterEnabled" />
@@ -154,6 +161,14 @@ async function loadSysSettings() {
if (data?.private.sms?.type) {
await loadTypeDefine(data.private.sms.type);
}
if (!settingsStore.isPlus) {
formState.public.userValidTimeEnabled = false;
formState.public.emailRegisterEnabled = false;
}
if (!settingsStore.isComm) {
formState.public.smsLoginEnabled = false;
}
}
const saveLoading = ref(false);

View File

@@ -9,6 +9,6 @@ typeorm:
port: 3309
username: root
password: root
database: certd2
database: certd

View File

@@ -3,6 +3,76 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.35.4](https://github.com/certd/certd/compare/v1.35.3...v1.35.4) (2025-06-13)
### Performance Improvements
* 支持s3 access做测试 ([f00aeac](https://github.com/certd/certd/commit/f00aeacb8b5c81f0bafa4c1b76723dec2b6b7784))
## [1.35.3](https://github.com/certd/certd/compare/v1.35.2...v1.35.3) (2025-06-12)
### Bug Fixes
* 修复重试次数设置无效的bug ([e2099ac](https://github.com/certd/certd/commit/e2099ac9ca344bc70bfa4219002e9138708973ae))
### Performance Improvements
* 支持雨云dns解析 ([8354348](https://github.com/certd/certd/commit/83543487e7418683bd79cfe3b9e0d792bdb977f7))
* 支持雨云dns解析以及雨云证书更新 ([43c7a19](https://github.com/certd/certd/commit/43c7a1984926f5d4647760cc134bb0aede3a7b7a))
* github 版本检查支持执行脚本 ([bad3504](https://github.com/certd/certd/commit/bad3504d4a15e6989b967b66aa9da8c6981f25bf))
## [1.35.2](https://github.com/certd/certd/compare/v1.35.1...v1.35.2) (2025-06-09)
### Bug Fixes
* 修复阿里云新加坡clb无法部署证书的bug ([c1fbc8c](https://github.com/certd/certd/commit/c1fbc8cd68ae020ef342e4e92f4d9b4869ca1ead))
* 修复阿里云新加坡clb无法部署证书的bug ([3e84e11](https://github.com/certd/certd/commit/3e84e116e863b54c6b4d7db160af372dacc5857f))
* 修复检查github release 插件无法保存最后版本的bug ([a92107c](https://github.com/certd/certd/commit/a92107cc47133883b099d5228b06373e84c8bb50))
* 修复站点监控定时器多次添加的bug ([9361679](https://github.com/certd/certd/commit/936167972fe83e519bc01a0dd961d9c0635d24ab))
### Performance Improvements
* 阿里云dns操作增加重试机制 ([424fd96](https://github.com/certd/certd/commit/424fd96615c05e949af8c837c261c1400bdffba2))
* 优化阿里云nlb支持部署扩展证书 ([9cbdfda](https://github.com/certd/certd/commit/9cbdfda829b231733d54c66c5024d46e6fc11af3))
* history增加触发类型显示 ([7f6070c](https://github.com/certd/certd/commit/7f6070c960ed7bf02add5ab36436de6573f2f1fa))
## [1.35.1](https://github.com/certd/certd/compare/v1.35.0...v1.35.1) (2025-06-07)
### Bug Fixes
* 修复站点监控通知渠道设置无效的bug ([a00453c](https://github.com/certd/certd/commit/a00453c83a58114ce2873dd6e6aaf313f1ce0f87))
### Performance Improvements
* 修改 HTTPS 服务器监听地址 ([e1cf64a](https://github.com/certd/certd/commit/e1cf64ae16d4abfe4299ff16d5088c30cf3c6365))
* 优化流水线页面,增加下次执行时间、查看证书显示 ([c820315](https://github.com/certd/certd/commit/c8203154094fae3d17198747f49f5f41ddf29a4e))
* 站点证书监控支持定时设置,重试次数设置 ([d3c2f8e](https://github.com/certd/certd/commit/d3c2f8eb436e670772d14a54acd6b541c5aa3978))
* aliyun alb支持部署扩展证书 ([2a19b61](https://github.com/certd/certd/commit/2a19b61b7a78620c06396c2cc37cc77d738b6d12))
# [1.35.0](https://github.com/certd/certd/compare/v1.34.11...v1.35.0) (2025-06-05)
### Features
* 完善注释 ([6702ca1](https://github.com/certd/certd/commit/6702ca10a17f5d7dbff789b039f7269496f66b97))
* AWS 中国区 CloudFront 证书部署IAM 证书) ([8a55bed](https://github.com/certd/certd/commit/8a55beda924b3be2a53b9ba80d9487cefa8bf887))
## [1.34.11](https://github.com/certd/certd/compare/v1.34.10...v1.34.11) (2025-06-05)
### Bug Fixes
* 修复用户最大流水线数量校验的问题 ([919f70a](https://github.com/certd/certd/commit/919f70a5fd2842ca69f96f1659bb5a7ba3f73776))
* 修复中文域名使用cname方式校验无法通过的问题 ([f7d5baa](https://github.com/certd/certd/commit/f7d5baa6d04cb83c572b06e62f885890cfa0143a))
* 修复cv4pve sdk (proxmox插件连接失败时无法正常结束任务的bug) ([49f26b4](https://github.com/certd/certd/commit/49f26b4049a0549b0270395157e96e8f04a68bc4))
* 修复flexcdn部署证书的顶级CA名称显示 ([6467edb](https://github.com/certd/certd/commit/6467edb84324d7c80a85212675dbacedc459df83))
* 修复flexcdn证书commonNames错误的问题 ([ace363f](https://github.com/certd/certd/commit/ace363fa355436e769b27f71cc487d30d6441780))
### Performance Improvements
* 分组选择支持清空选项 ([03e2e99](https://github.com/certd/certd/commit/03e2e9949837b34eb3ea56d14a9e8a5dabc96063))
* 优化cname检查当有冲突的cname记录时给出提示 ([e639a8f](https://github.com/certd/certd/commit/e639a8f9f12640ffcca69f1a6a0324459924afbd))
* 站点监控支持批量导入域名和ip ([2d7729d](https://github.com/certd/certd/commit/2d7729dbe98f29088f5f317db2b52cc1ede223a6))
* 支持设置用户有效期 ([6ac3bc5](https://github.com/certd/certd/commit/6ac3bc564f407dad2cd0b0b0744e887387aa5da3))
## [1.34.10](https://github.com/certd/certd/compare/v1.34.9...v1.34.10) (2025-06-03)
### Bug Fixes

View File

@@ -0,0 +1,3 @@
ALTER TABLE cd_cname_record ADD COLUMN `error` varchar(4096);
ALTER TABLE sys_user ADD COLUMN `valid_time` bigint;

View File

@@ -0,0 +1,2 @@
ALTER TABLE pi_history ADD COLUMN `trigger_type` varchar(100);

View File

@@ -0,0 +1,3 @@
ALTER TABLE cd_cname_record ADD COLUMN "error" varchar(4096);
ALTER TABLE sys_user ADD COLUMN "valid_time" bigint;

View File

@@ -0,0 +1,2 @@
ALTER TABLE pi_history ADD COLUMN "trigger_type" varchar(100);

View File

@@ -0,0 +1,3 @@
ALTER TABLE cd_cname_record ADD COLUMN "error" varchar(4096);
ALTER TABLE sys_user ADD COLUMN "valid_time" integer;

View File

@@ -0,0 +1,2 @@
ALTER TABLE pi_history ADD COLUMN "trigger_type" varchar(100);

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/ui-server",
"version": "1.34.10",
"version": "1.35.4",
"description": "fast-server base midway",
"private": true,
"type": "module",
@@ -40,21 +40,22 @@
"@alicloud/tea-util": "^1.4.10",
"@aws-sdk/client-acm": "^3.699.0",
"@aws-sdk/client-cloudfront": "^3.699.0",
"@aws-sdk/client-iam": "^3.699.0",
"@aws-sdk/client-s3": "^3.705.0",
"@certd/acme-client": "^1.34.10",
"@certd/basic": "^1.34.10",
"@certd/commercial-core": "^1.34.10",
"@certd/jdcloud": "^1.34.10",
"@certd/lib-huawei": "^1.34.10",
"@certd/lib-k8s": "^1.34.10",
"@certd/lib-server": "^1.34.10",
"@certd/midway-flyway-js": "^1.34.10",
"@certd/pipeline": "^1.34.10",
"@certd/plugin-cert": "^1.34.10",
"@certd/plugin-lib": "^1.34.10",
"@certd/plugin-plus": "^1.34.10",
"@certd/plus-core": "^1.34.10",
"@corsinvest/cv4pve-api-javascript": "^8.3.0",
"@certd/acme-client": "^1.35.4",
"@certd/basic": "^1.35.4",
"@certd/commercial-core": "^1.35.4",
"@certd/cv4pve-api-javascript": "^8.4.1",
"@certd/jdcloud": "^1.35.4",
"@certd/lib-huawei": "^1.35.4",
"@certd/lib-k8s": "^1.35.4",
"@certd/lib-server": "^1.35.4",
"@certd/midway-flyway-js": "^1.35.4",
"@certd/pipeline": "^1.35.4",
"@certd/plugin-cert": "^1.35.4",
"@certd/plugin-lib": "^1.35.4",
"@certd/plugin-plus": "^1.35.4",
"@certd/plus-core": "^1.35.4",
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
"@koa/cors": "^5.0.0",
@@ -104,6 +105,7 @@
"otplib": "^12.0.1",
"pg": "^8.12.0",
"psl": "^1.9.0",
"punycode.js": "^2.3.1",
"qiniu": "^7.12.0",
"qrcode": "^1.5.4",
"qs": "^6.13.1",

View File

@@ -105,6 +105,17 @@ export class SiteInfoController extends CrudController<SiteInfoService> {
await this.service.checkAllByUsers(userId);
return this.ok();
}
@Post('/import', { summary: Constants.per.authOnly })
async doImport(@Body(ALL) body: any) {
const userId = this.getUserId();
await this.service.doImport({
text:body.text,
userId
})
return this.ok();
}
@Post('/ipCheckChange', { summary: Constants.per.authOnly })
async ipCheckChange(@Body(ALL) bean: any) {
const userId = this.getUserId();
@@ -143,4 +154,5 @@ export class SiteInfoController extends CrudController<SiteInfoService> {
await this.service.saveSetting(userId, setting);
return this.ok({});
}
}

View File

@@ -111,5 +111,16 @@ export class SiteInfoController extends CrudController<SiteIpService> {
return this.ok();
}
@Post('/import', { summary: Constants.per.authOnly })
async doImport(@Body(ALL) body: any) {
const userId = this.getUserId();
await this.service.doImport({
text:body.text,
userId,
siteId:body.siteId
})
return this.ok();
}
}

View File

@@ -1,5 +1,5 @@
import {ALL, Body, Controller, Inject, Post, Provide} from '@midwayjs/core';
import {AccessService, BaseController, Constants} from '@certd/lib-server';
import {AccessGetter, AccessService, BaseController, Constants} from '@certd/lib-server';
import {
AccessRequestHandleReq,
IAccessService,
@@ -33,6 +33,7 @@ export class HandleController extends BaseController {
@Post('/access', { summary: Constants.per.authOnly })
async accessRequest(@Body(ALL) body: AccessRequestHandleReq) {
const userId = this.getUserId();
let inputAccess = body.input.access;
if (body.input.id > 0) {
const oldEntity = await this.accessService.info(body.input.id);
@@ -48,8 +49,8 @@ export class HandleController extends BaseController {
inputAccess = this.accessService.decryptAccessEntity(param);
}
}
const access = await newAccess(body.typeName, inputAccess);
const accessGetter = new AccessGetter(userId, this.accessService.getById.bind(this.accessService));
const access = await newAccess(body.typeName, inputAccess,accessGetter);
const res = await access.onRequest(body);

View File

@@ -1,9 +1,15 @@
import { Autoload, Config, Init, Inject, Scope, ScopeEnum } from '@midwayjs/core';
import { PipelineService } from '../pipeline/service/pipeline-service.js';
import { logger } from '@certd/basic';
import { SysSettingsService } from '@certd/lib-server';
import {SysSettingsService, SysSiteInfo} from '@certd/lib-server';
import { SiteInfoService } from '../monitor/index.js';
import { Cron } from '../cron/cron.js';
import {UserSettingsService} from "../mine/service/user-settings-service.js";
import {UserSiteMonitorSetting} from "../mine/service/models.js";
import {getPlusInfo} from "@certd/plus-core";
import dayjs from "dayjs";
import {NotificationService} from "../pipeline/service/notification-service.js";
import {UserService} from "../sys/authority/service/user-service.js";
@Autoload()
@Scope(ScopeEnum.Request, { allowDowngrade: true })
@@ -22,6 +28,8 @@ export class AutoCRegisterCron {
@Inject()
sysSettingsService: SysSettingsService;
@Inject()
userSettingsService: UserSettingsService;
@Inject()
siteInfoService: SiteInfoService;
@@ -29,6 +37,13 @@ export class AutoCRegisterCron {
@Inject()
cron: Cron;
@Inject()
notificationService: NotificationService;
@Inject()
userService: UserService;
@Init()
async init() {
logger.info('加载定时trigger开始');
@@ -39,39 +54,87 @@ export class AutoCRegisterCron {
// console.log('meta', meta);
// const metas = listPropertyDataFromClass(CLASS_KEY, this.echoPlugin);
// console.log('metas', metas);
this.registerSiteMonitorCron();
await this.registerSiteMonitorCron();
await this.registerPlusExpireCheckCron();
}
registerSiteMonitorCron() {
const job = async () => {
logger.info('站点证书检查开始执行');
async registerSiteMonitorCron() {
//先注册公共job
await this.siteInfoService.registerSiteMonitorJob()
let offset = 0;
const limit = 50;
while (true) {
const res = await this.siteInfoService.page({
query: { disabled: false },
page: { offset, limit },
});
const { records } = res;
if (records.length === 0) {
break;
}
offset += records.length;
await this.siteInfoService.checkList(records);
//注册用户独立的检查时间
const monitorSettingList = await this.userSettingsService.list({
query:{
key: UserSiteMonitorSetting.__key__,
}
})
for (const item of monitorSettingList) {
const setting = item.setting ?? JSON.parse(item.setting)
if(!setting?.cron){
continue
}
await this.siteInfoService.registerSiteMonitorJob(item.userId)
}
logger.info('站点证书检查完成');
};
this.cron.register({
name: 'siteMonitor',
cron: '0 0 0 * * *',
job,
});
if (this.immediateTriggerSiteMonitor) {
job();
logger.info(`立即触发一次站点证书检查任务`)
await this.siteInfoService.triggerJobOnce()
}
}
registerPlusExpireCheckCron(){
// 添加plus即将到期检查任务
this.cron.register({
name: 'plus-expire-check',
cron: `0 10 9 * * *`, // 一天只能检查一次,否则会重复发送通知
job: async () => {
const plusInfo = getPlusInfo()
if (!plusInfo.originVipType || plusInfo.originVipType==="free" ) {
return
}
let label ="专业版"
if( plusInfo.originVipType === 'comm'){
label = "商业版"
}
const siteInfo = await this.sysSettingsService.getSetting<SysSiteInfo>(SysSiteInfo)
const appTitle = siteInfo.title || "certd"
const expiresDate = dayjs(plusInfo.expireTime).format("YYYY-MM-DD")
// plusInfo.expireTime= dayjs("2025-06-10").valueOf()
let expiresDays =Math.floor((plusInfo.expireTime - new Date().getTime())/ 1000 / 60 / 60 / 24)
let title = ""
let content =""
if(expiresDays === 20 ||expiresDays === 10 || expiresDays === 3 || expiresDays === 1 || expiresDays === 0){
title = `vip(${label})即将到期`
content = `您的${appTitle} vip (${label})剩余${expiresDays}天(${expiresDate})到期,请及时续期,以免影响业务`
}else if (expiresDays === -1 || expiresDays === -3 || expiresDays === -7) {
title = `vip(${label})已过期`
content = `您的${appTitle} vip (${label})已过期${Math.abs(expiresDays)}天(${expiresDate}),请尽快续期,以免影响业务`
}
if(title){
logger.warn(title)
logger.warn(content)
const url = await this.notificationService.getBindUrl("");
const adminUsers = await this.userService.getAdmins()
for (const adminUser of adminUsers) {
logger.info(`发送vip到期通知给管理员${adminUser.username}`)
await this.notificationService.send({
useDefault: true,
logger: logger,
body:{
title,
content,
errorMessage:title,
url
}
},adminUser.id)
}
}
}
})
}
}

View File

@@ -58,7 +58,7 @@ export class HttpsServer {
opts.app.callback()
);
this.server = httpServer;
const hostname = '0.0.0.0';
const hostname = '::';
// A function that runs in the context of the http server
// and reports what type of server listens on which port
function listeningReporter() {

Some files were not shown because too many files have changed in this diff Show More