mirror of
https://github.com/certd/certd.git
synced 2026-04-14 20:40:53 +08:00
Compare commits
86 Commits
v2-dev-ord
...
v1.36.16
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e979e9c9fb | ||
|
|
de719df6fe | ||
|
|
38d7f91ea0 | ||
|
|
a20a429e8c | ||
|
|
9b63fb4ee2 | ||
|
|
099efdbc1d | ||
|
|
af9120fc7a | ||
|
|
798a48aa96 | ||
|
|
462e22a3b0 | ||
|
|
4e432ed03f | ||
|
|
dfa74a69f7 | ||
|
|
9e1e4eeec2 | ||
|
|
221e068bac | ||
|
|
1bdceeecf4 | ||
|
|
a6824d9cd0 | ||
|
|
fe03f9942b | ||
|
|
4c196922fb | ||
|
|
2a9a513d85 | ||
|
|
2bcea27ecd | ||
|
|
fb7341f1f7 | ||
|
|
f327daa12d | ||
|
|
2872b9fbf9 | ||
|
|
cedd5c9c96 | ||
|
|
60e6aa9b54 | ||
|
|
541f482518 | ||
|
|
4019b7939a | ||
|
|
013b9c4c7c | ||
|
|
79addfda42 | ||
|
|
8546bda471 | ||
|
|
0770f174a1 | ||
|
|
5f4a89cecc | ||
|
|
cbe0b1c5a6 | ||
|
|
0af193c505 | ||
|
|
fdcfcc77a0 | ||
|
|
06d166d0d7 | ||
|
|
b1b3e39fcd | ||
|
|
5ec025a3b9 | ||
|
|
58b7fbcf75 | ||
|
|
be053d47e4 | ||
|
|
fae1981161 | ||
|
|
fd95549de9 | ||
|
|
ff10bc05ec | ||
|
|
eb8cd53de2 | ||
|
|
3fc863561a | ||
|
|
131cd94495 | ||
|
|
f3a90a63b6 | ||
|
|
2494173aec | ||
|
|
866eb6241b | ||
|
|
86b3df1941 | ||
|
|
e87f6d56f5 | ||
|
|
acc890730f | ||
|
|
b0707739fd | ||
|
|
251dd1fe45 | ||
|
|
b9f3dc65e0 | ||
|
|
238ad7ce51 | ||
|
|
99fd5fca4d | ||
|
|
8eda77b76d | ||
|
|
81ac240ac8 | ||
|
|
6109798fab | ||
|
|
95715a007d | ||
|
|
b33ec201ac | ||
|
|
b53fbaf5b3 | ||
|
|
1e03a2e553 | ||
|
|
fda7c6f67a | ||
|
|
fabb7982ff | ||
|
|
cbf206be60 | ||
|
|
aa0c282205 | ||
|
|
9759365329 | ||
|
|
e3738f6422 | ||
|
|
9746d169f9 | ||
|
|
2e6d03ff00 | ||
|
|
f7b7d3d65e | ||
|
|
4037cf11aa | ||
|
|
02aeb321ce | ||
|
|
0012619257 | ||
|
|
6f3ade0d94 | ||
|
|
cf572f328a | ||
|
|
d1ce36038c | ||
|
|
b382351c7b | ||
|
|
4e5e862f58 | ||
|
|
ef3faf5832 | ||
|
|
af54f48cec | ||
|
|
522d30545b | ||
|
|
521599ef39 | ||
|
|
1ff6daaa27 | ||
|
|
dbf69bcd98 |
11
.editorconfig
Normal file
11
.editorconfig
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
#
|
||||||
|
# http://editorconfig.org
|
||||||
|
#
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
@@ -1,21 +1,28 @@
|
|||||||
|
---
|
||||||
|
name: Bug Report
|
||||||
|
about: 报告一个错误或问题
|
||||||
|
title: "[BUG] "
|
||||||
|
labels: bug
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
> 感谢您支持certd,请按如下规范提交issue
|
> 感谢您支持certd,请按如下规范提交issue
|
||||||
> 如果有条件,请尽量在[github上提交](https://github.com/certd/certd/issues)
|
> 如果有条件,请尽量在[github上提交](https://github.com/certd/certd/issues)
|
||||||
|
|
||||||
|
# bug提交
|
||||||
## 一、问题描述
|
## 1、问题描述
|
||||||
`请在此处简要描述你所遇到的问题,必要时请贴出相关截图辅助理解和定位`
|
`请在此处简要描述你所遇到的问题,必要时请贴出相关截图辅助理解和定位`
|
||||||
|
|
||||||
### 复现步骤
|
### 2、复现步骤
|
||||||
`请描述复现问题的详细步骤`
|
`请描述复现问题的详细步骤`
|
||||||
`如果非示例页面的问题,最好能提供最小复现示例的代码、或者仓库链接`
|
`如果非示例页面的问题,最好能提供最小复现示例的代码、或者仓库链接`
|
||||||
|
|
||||||
|
|
||||||
### 报错截图
|
### 3.报错截图
|
||||||
`请贴出报错日志截图`
|
`请贴出报错日志截图`
|
||||||
|
|
||||||
### 效果截图
|
### 4、效果截图
|
||||||
`请贴出效果截图`
|
`请贴出效果截图`
|
||||||
#### 1. 期望效果
|
#### 4.1. 期望效果
|
||||||
|
|
||||||
#### 2. 实际效果
|
|
||||||
|
|
||||||
|
#### 4.2. 实际效果
|
||||||
36
.github/ISSUE_TEMPLATE/dns.md
vendored
Normal file
36
.github/ISSUE_TEMPLATE/dns.md
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
name: DNS Provider Apply
|
||||||
|
about: 请求支持新的域名提供商
|
||||||
|
title: "[DNS] "
|
||||||
|
labels: feature
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
> 感谢您支持certd,请按如下规范提交issue
|
||||||
|
> 如果有条件,请尽量在[github上提交](https://github.com/certd/certd/issues)
|
||||||
|
|
||||||
|
# 新域名提供商支持申请
|
||||||
|
|
||||||
|
## 1. 基本信息
|
||||||
|
请填写如下内容:
|
||||||
|
|
||||||
|
1. 域名提供商名称:
|
||||||
|
|
||||||
|
|
||||||
|
2. 管理页面地址:
|
||||||
|
|
||||||
|
|
||||||
|
3. 是否有API接口,接口地址:
|
||||||
|
|
||||||
|
|
||||||
|
4. 如果没有API接口,网页登录是否有验证码:
|
||||||
|
|
||||||
|
|
||||||
|
5. 是否可以提供测试账号?(如果可以请留下联系方式或者加作者好友)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 2. 截图
|
||||||
|
|
||||||
|
`域名管理页面截图`
|
||||||
|
|
||||||
23
.github/ISSUE_TEMPLATE/feature.md
vendored
Normal file
23
.github/ISSUE_TEMPLATE/feature.md
vendored
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
---
|
||||||
|
name: Feature Request
|
||||||
|
about: 新需求、新特性
|
||||||
|
title: "[Feature] "
|
||||||
|
labels: feature
|
||||||
|
---
|
||||||
|
|
||||||
|
> > 感谢您支持certd,请按如下规范提交issue
|
||||||
|
> 如果有条件,请尽量在[github上提交](https://github.com/certd/certd/issues)
|
||||||
|
|
||||||
|
|
||||||
|
# 新需求申请
|
||||||
|
|
||||||
|
## 1. 需求描述,需求背景
|
||||||
|
`请在此处简要描述你所遇到的问题,必要时请贴出相关截图辅助理解`
|
||||||
|
|
||||||
|
|
||||||
|
## 2. 期望效果
|
||||||
|
`必要时可以截图描述你的期望效果`
|
||||||
|
|
||||||
|
|
||||||
|
## 3. 你的解决方案
|
||||||
|
`如果你有解决方案,请描述你的方案`
|
||||||
36
.github/ISSUE_TEMPLATE/plugin.md
vendored
Normal file
36
.github/ISSUE_TEMPLATE/plugin.md
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
---
|
||||||
|
name: Plugin Apply
|
||||||
|
about: 请求支持新部署插件
|
||||||
|
title: "[Plugin] "
|
||||||
|
labels: feature
|
||||||
|
---
|
||||||
|
|
||||||
|
> > 感谢您支持certd,请按如下规范提交issue
|
||||||
|
> 如果有条件,请尽量在[github上提交](https://github.com/certd/certd/issues)
|
||||||
|
|
||||||
|
# 新部署插件申请支持
|
||||||
|
|
||||||
|
## 1. 需求描述
|
||||||
|
`请在此处简要描述你的需求`
|
||||||
|
|
||||||
|
|
||||||
|
## 2. 要部署证书应用的信息
|
||||||
|
|
||||||
|
1. 应用名称:
|
||||||
|
|
||||||
|
|
||||||
|
2. 应用网址/项目地址/官方网站:
|
||||||
|
|
||||||
|
|
||||||
|
3. 管理证书界面截图(或者手动部署证书方式介绍及截图):
|
||||||
|
|
||||||
|
|
||||||
|
4. 是否有API接口,接口地址:
|
||||||
|
|
||||||
|
|
||||||
|
5. 如果没有API接口,网页登录是否需要验证码:
|
||||||
|
|
||||||
|
|
||||||
|
6. 是否可以提供测试账号?(如果可以请留下联系方式或者加作者好友)
|
||||||
|
|
||||||
|
|
||||||
74
CHANGELOG.md
74
CHANGELOG.md
@@ -3,6 +3,80 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复授权配置复制功能,无法复制已加密字段的问题 ([221e068](https://github.com/certd/certd/commit/221e068bac3af6cd5d1794f8cd4c2ec5c0bc3f45))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 百度云支持上传到证书托管,支持部署到负载均衡 ([798a48a](https://github.com/certd/certd/commit/798a48aa9686fd5d11cfffb6cd93eadfc40aacb3))
|
||||||
|
* 部署到百度cdn支持自动获取域名列表选择 ([4e432ed](https://github.com/certd/certd/commit/4e432ed03f4fb564e85a2f284ee26b58400b82f5))
|
||||||
|
* 验证码可重试次数设置为3次 ([1bdceee](https://github.com/certd/certd/commit/1bdceeecf4b5daecdd621a05a2596b6eb45ce8ea))
|
||||||
|
* 增加找回密码的验证码可重试次数 [@nicheng-he](https://github.com/nicheng-he) ([#496](https://github.com/certd/certd/issues/496)) ([fe03f99](https://github.com/certd/certd/commit/fe03f9942b5662fb90cad86da10782f5dc3603f5))
|
||||||
|
* 支持阿里云API网关 ([9e1e4ee](https://github.com/certd/certd/commit/9e1e4eeec2859759ca5b07834c9d24cf88a6ad33))
|
||||||
|
* 支持部署到金山云CDN ([dfa74a6](https://github.com/certd/certd/commit/dfa74a69f7cbb9009d3e20c7eecfa1b905a00cf0))
|
||||||
|
* 支持更新金山云cdn证书 ([462e22a](https://github.com/certd/certd/commit/462e22a3b0a94887462fe6aa68e4671a365e0737))
|
||||||
|
* 支持apisix证书部署 ([9b63fb4](https://github.com/certd/certd/commit/9b63fb4ee2c6b56139160c5bf63482dab0869c2b))
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复 https://cas.undefined.aliyuncs.com 的bug ([60e6aa9](https://github.com/certd/certd/commit/60e6aa9b54a761a47e39acee4a1ff947a745be27))
|
||||||
|
* 修复阿里云clb api接口没有使用region的问题 ([0770f17](https://github.com/certd/certd/commit/0770f174a14313e28d08113e69829ef6cc02d719))
|
||||||
|
* 修复站点监控使用自定义dns解析域名报错的bug ([eb8cd53](https://github.com/certd/certd/commit/eb8cd53de27991321e36dd14e5ce95f42b51351f))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到阿里云支持选择bucket和域名 ([013b9c4](https://github.com/certd/certd/commit/013b9c4c7c2adf485d086123ccea448719577fd4))
|
||||||
|
* 清理数据库备份的临时目录 ([fd95549](https://github.com/certd/certd/commit/fd95549de9a5d8cec09772ee2630bb7521e15e1f))
|
||||||
|
* 添加免费通知,OneBot V11协议通知支持 ([#491](https://github.com/certd/certd/issues/491)) [@ayakasuki](https://github.com/ayakasuki) ([be053d4](https://github.com/certd/certd/commit/be053d47e41084f817882400882b64143d036d1a))
|
||||||
|
* 支持webhook部署证书 ([cbe0b1c](https://github.com/certd/certd/commit/cbe0b1c5a6538f232e9a63f1693d20d5acf0a306))
|
||||||
|
* 注册时支持填写用户名 ([fdcfcc7](https://github.com/certd/certd/commit/fdcfcc77a0db87954e0b026635d3ccdd9bc6cee8))
|
||||||
|
* add start:server npm script for quick server launch from root directory ([#484](https://github.com/certd/certd/issues/484)) [@orzyyyy](https://github.com/orzyyyy) ([fae1981](https://github.com/certd/certd/commit/fae1981161080f698c3f1263b712306d63baae64))
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复复制流水线为空的bug ([b070773](https://github.com/certd/certd/commit/b0707739fdfbae3d78db4efd3f180db05c4e4164))
|
||||||
|
* 修复商用证书上传第二次运行无法使用pfx格式证书的bug ([251dd1f](https://github.com/certd/certd/commit/251dd1fe457a7b152f43eb6de18f7beb9f0b194e))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 1panel支持 currenNode ([acc8907](https://github.com/certd/certd/commit/acc890730f43d492c9b1bd3668814cf10efdf7b8))
|
||||||
|
* 授权管理支持模糊查询 ([866eb62](https://github.com/certd/certd/commit/866eb6241baa7b21f6eddc649966324c188236c6))
|
||||||
|
* 新增找回密码功能 [@nicheng-he](https://github.com/nicheng-he) ([81ac240](https://github.com/certd/certd/commit/81ac240ac84db0af2f56b6352e227ecb49f38377))
|
||||||
|
* 优化start脚本 ([238ad7c](https://github.com/certd/certd/commit/238ad7ce51f17e1098c624e7f61ee2d98de1e02d))
|
||||||
|
* 运行主机脚本插件支持选择运行策略 ([86b3df1](https://github.com/certd/certd/commit/86b3df194126476e1f58e0952a77e986f62eecce))
|
||||||
|
* cdnfly 支持 账号密码登陆授权 ([e87f6d5](https://github.com/certd/certd/commit/e87f6d56f524dbbb9e3243e382b348b6e49f0d2c))
|
||||||
|
* k8s ack、tke 支持重启ingress ([95715a0](https://github.com/certd/certd/commit/95715a007d931c64fa7dd953d94957398e00a443))
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复阿里云发送短信验证码失败的bug ([2e6d03f](https://github.com/certd/certd/commit/2e6d03ff001f521f57368e7a62b97ed7b122e8d0))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 阿里云部分插件优化 [@nicheng-he](https://github.com/nicheng-he) ([e3738f6](https://github.com/certd/certd/commit/e3738f6422270d75ec414c15a343248cc4cad6e1))
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 上传到阿里云cas,证书前缀无效的bug ([b382351](https://github.com/certd/certd/commit/b382351c7b91ec10e1f61d94bec5aad075207ec8))
|
||||||
|
* 修复自定义插件onlyAdmin报错的bug ([4e5e862](https://github.com/certd/certd/commit/4e5e862f5834ad180e4428959c272d444a6f78ab))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到k8s,tke,ack忽悠证书校验 ([ab84835](https://github.com/certd/certd/commit/ab848353621869464a2c9a45fdb5e28d998b8a58))
|
||||||
|
* 首页增加更新日志按钮 ([41ce848](https://github.com/certd/certd/commit/41ce8489dc2f03a705dfa3fbb357769defb56c60))
|
||||||
|
* 增加版本过低提示 ([d1ce360](https://github.com/certd/certd/commit/d1ce36038cab72b5dc1b320d0a708c261ffbdacb))
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ Certd® 是一个免费的全自动证书管理系统,让你的网站证书永
|
|||||||
|
|
||||||
> 流水线数量现已调整为无限制,欢迎大家使用
|
> 流水线数量现已调整为无限制,欢迎大家使用
|
||||||
|
|
||||||
|
|
||||||
## 一、特性
|
## 一、特性
|
||||||
本项目不仅支持证书申请过程自动化,还可以自动化部署更新证书,让你的证书永不过期。
|
本项目不仅支持证书申请过程自动化,还可以自动化部署更新证书,让你的证书永不过期。
|
||||||
|
|
||||||
@@ -87,8 +86,8 @@ https://certd.handfree.work/
|
|||||||
1. 【推荐】[Docker方式部署 ](https://certd.docmirror.cn/guide/install/docker/)
|
1. 【推荐】[Docker方式部署 ](https://certd.docmirror.cn/guide/install/docker/)
|
||||||
2. 【推荐】[宝塔面板方式部署 ](https://certd.docmirror.cn/guide/install/docker/)
|
2. 【推荐】[宝塔面板方式部署 ](https://certd.docmirror.cn/guide/install/docker/)
|
||||||
3. 【推荐】[1Panel面板方式部署](https://certd.docmirror.cn/guide/install/1panel/)
|
3. 【推荐】[1Panel面板方式部署](https://certd.docmirror.cn/guide/install/1panel/)
|
||||||
4. 【推荐】[雨云一键部署](https://app.rainyun.com/apps/rca/store/6646/?ref=NzExMDQ2_) : 首充翻倍,每月仅需2.2元
|
4. 【推荐】[雨云一键部署](https://app.rainyun.com/apps/rca/store/6646/?ref=NzExMDQ2) : 首充翻倍,每月仅需2.2元
|
||||||
[<img src="https://rainyun-apps.cn-nb1.rains3.com/materials/deploy-on-rainyun-cn.svg">](https://app.rainyun.com/apps/rca/store/6646/?ref=NzExMDQ2_)
|
[<img src="https://rainyun-apps.cn-nb1.rains3.com/materials/deploy-on-rainyun-cn.svg">](https://app.rainyun.com/apps/rca/store/6646/?ref=NzExMDQ2)
|
||||||
5. 【不推荐】[源码方式部署 ](https://certd.docmirror.cn/guide/install/source/)
|
5. 【不推荐】[源码方式部署 ](https://certd.docmirror.cn/guide/install/source/)
|
||||||
|
|
||||||
#### Docker镜像说明:
|
#### Docker镜像说明:
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
12:27
|
23:23
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ services:
|
|||||||
# ↓↓↓↓↓ -------------------------------------------------------- 数据库以及证书存储路径,默认存在宿主机的/data/certd/目录下,【您需要定时备份此目录,以保障数据容灾】
|
# ↓↓↓↓↓ -------------------------------------------------------- 数据库以及证书存储路径,默认存在宿主机的/data/certd/目录下,【您需要定时备份此目录,以保障数据容灾】
|
||||||
# 只要修改冒号前面的,冒号后面的/app/data不要动
|
# 只要修改冒号前面的,冒号后面的/app/data不要动
|
||||||
- /data/certd:/app/data
|
- /data/certd:/app/data
|
||||||
|
# ↓↓↓↓↓ -------------------------------------------------------- 如果走时不准,考虑挂载localtime文件
|
||||||
|
#- /etc/localtime:/etc/localtime
|
||||||
|
#- /etc/timezone:/etc/timezone
|
||||||
ports: # 端口映射
|
ports: # 端口映射
|
||||||
# ↓↓↓↓ ---------------------------------------------------------- 如果端口有冲突,可以修改第一个7001为其他不冲突的端口号,第二个7001不要动
|
# ↓↓↓↓ ---------------------------------------------------------- 如果端口有冲突,可以修改第一个7001为其他不冲突的端口号,第二个7001不要动
|
||||||
- "7001:7001"
|
- "7001:7001"
|
||||||
@@ -38,7 +41,7 @@ services:
|
|||||||
# - ip6net
|
# - ip6net
|
||||||
environment:
|
environment:
|
||||||
# ↓↓↓↓ ----------------------------------------------------- 使用上海东八时区
|
# ↓↓↓↓ ----------------------------------------------------- 使用上海东八时区
|
||||||
# - TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
# 设置环境变量即可自定义certd配置
|
# 设置环境变量即可自定义certd配置
|
||||||
# 配置项见: packages/ui/certd-server/src/config/config.default.ts
|
# 配置项见: packages/ui/certd-server/src/config/config.default.ts
|
||||||
# 配置规则: certd_ + 配置项, 点号用_代替
|
# 配置规则: certd_ + 配置项, 点号用_代替
|
||||||
|
|||||||
@@ -3,6 +3,63 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复 https://cas.undefined.aliyuncs.com 的bug ([60e6aa9](https://github.com/certd/certd/commit/60e6aa9b54a761a47e39acee4a1ff947a745be27))
|
||||||
|
* 修复阿里云clb api接口没有使用region的问题 ([0770f17](https://github.com/certd/certd/commit/0770f174a14313e28d08113e69829ef6cc02d719))
|
||||||
|
* 修复站点监控使用自定义dns解析域名报错的bug ([eb8cd53](https://github.com/certd/certd/commit/eb8cd53de27991321e36dd14e5ce95f42b51351f))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到阿里云支持选择bucket和域名 ([013b9c4](https://github.com/certd/certd/commit/013b9c4c7c2adf485d086123ccea448719577fd4))
|
||||||
|
* 清理数据库备份的临时目录 ([fd95549](https://github.com/certd/certd/commit/fd95549de9a5d8cec09772ee2630bb7521e15e1f))
|
||||||
|
* 添加免费通知,OneBot V11协议通知支持 ([#491](https://github.com/certd/certd/issues/491)) [@ayakasuki](https://github.com/ayakasuki) ([be053d4](https://github.com/certd/certd/commit/be053d47e41084f817882400882b64143d036d1a))
|
||||||
|
* 支持webhook部署证书 ([cbe0b1c](https://github.com/certd/certd/commit/cbe0b1c5a6538f232e9a63f1693d20d5acf0a306))
|
||||||
|
* 注册时支持填写用户名 ([fdcfcc7](https://github.com/certd/certd/commit/fdcfcc77a0db87954e0b026635d3ccdd9bc6cee8))
|
||||||
|
* add start:server npm script for quick server launch from root directory ([#484](https://github.com/certd/certd/issues/484)) [@orzyyyy](https://github.com/orzyyyy) ([fae1981](https://github.com/certd/certd/commit/fae1981161080f698c3f1263b712306d63baae64))
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复复制流水线为空的bug ([b070773](https://github.com/certd/certd/commit/b0707739fdfbae3d78db4efd3f180db05c4e4164))
|
||||||
|
* 修复商用证书上传第二次运行无法使用pfx格式证书的bug ([251dd1f](https://github.com/certd/certd/commit/251dd1fe457a7b152f43eb6de18f7beb9f0b194e))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 1panel支持 currenNode ([acc8907](https://github.com/certd/certd/commit/acc890730f43d492c9b1bd3668814cf10efdf7b8))
|
||||||
|
* 授权管理支持模糊查询 ([866eb62](https://github.com/certd/certd/commit/866eb6241baa7b21f6eddc649966324c188236c6))
|
||||||
|
* 新增找回密码功能 [@nicheng-he](https://github.com/nicheng-he) ([81ac240](https://github.com/certd/certd/commit/81ac240ac84db0af2f56b6352e227ecb49f38377))
|
||||||
|
* 优化start脚本 ([238ad7c](https://github.com/certd/certd/commit/238ad7ce51f17e1098c624e7f61ee2d98de1e02d))
|
||||||
|
* 运行主机脚本插件支持选择运行策略 ([86b3df1](https://github.com/certd/certd/commit/86b3df194126476e1f58e0952a77e986f62eecce))
|
||||||
|
* cdnfly 支持 账号密码登陆授权 ([e87f6d5](https://github.com/certd/certd/commit/e87f6d56f524dbbb9e3243e382b348b6e49f0d2c))
|
||||||
|
* k8s ack、tke 支持重启ingress ([95715a0](https://github.com/certd/certd/commit/95715a007d931c64fa7dd953d94957398e00a443))
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复阿里云发送短信验证码失败的bug ([2e6d03f](https://github.com/certd/certd/commit/2e6d03ff001f521f57368e7a62b97ed7b122e8d0))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 阿里云部分插件优化 [@nicheng-he](https://github.com/nicheng-he) ([e3738f6](https://github.com/certd/certd/commit/e3738f6422270d75ec414c15a343248cc4cad6e1))
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 上传到阿里云cas,证书前缀无效的bug ([b382351](https://github.com/certd/certd/commit/b382351c7b91ec10e1f61d94bec5aad075207ec8))
|
||||||
|
* 修复自定义插件onlyAdmin报错的bug ([4e5e862](https://github.com/certd/certd/commit/4e5e862f5834ad180e4428959c272d444a6f78ab))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到k8s,tke,ack忽悠证书校验 ([ab84835](https://github.com/certd/certd/commit/ab848353621869464a2c9a45fdb5e28d998b8a58))
|
||||||
|
* 首页增加更新日志按钮 ([41ce848](https://github.com/certd/certd/commit/41ce8489dc2f03a705dfa3fbb357769defb56c60))
|
||||||
|
* 增加版本过低提示 ([d1ce360](https://github.com/certd/certd/commit/d1ce36038cab72b5dc1b320d0a708c261ffbdacb))
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -10,7 +10,8 @@
|
|||||||
* 登录宝塔面板,在菜单栏中点击 Docker,首次进入会提示安装Docker服务,点击立即安装,按提示完成安装
|
* 登录宝塔面板,在菜单栏中点击 Docker,首次进入会提示安装Docker服务,点击立即安装,按提示完成安装
|
||||||
|
|
||||||
### 2、部署certd
|
### 2、部署certd
|
||||||
以下两种方式人选一种:
|
以下两种方式任选一种:
|
||||||
|
|
||||||
#### 2.1 应用商店方式一键部署【推荐】
|
#### 2.1 应用商店方式一键部署【推荐】
|
||||||
|
|
||||||
* 在宝塔Docker应用商店中找到`certd`(要先点右上角更新应用)
|
* 在宝塔Docker应用商店中找到`certd`(要先点右上角更新应用)
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
## 一、源码安装
|
## 一、源码安装
|
||||||
|
|
||||||
### 环境要求
|
### 环境要求
|
||||||
- nodejs 20 及以上
|
- nodejs 22 及以上
|
||||||
### 源码启动
|
### 源码启动
|
||||||
```shell
|
```shell
|
||||||
# 克隆代码
|
# 克隆代码
|
||||||
|
|||||||
@@ -65,8 +65,16 @@ networks:
|
|||||||
docker logs -f --tail 200 certd
|
docker logs -f --tail 200 certd
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 6. 容器内走时不准,或者时区不对
|
||||||
|
走时不准确,慢慢偏差越来越大
|
||||||
|
或者整个时区都不对
|
||||||
|
可以尝试挂载localtime文件
|
||||||
|
```yaml
|
||||||
|
volumes:
|
||||||
|
# ↓↓↓↓↓ -------------------- 如果走时不准,请尝试挂载localtime文件
|
||||||
|
- /etc/localtime:/etc/localtime
|
||||||
|
- /etc/timezone:/etc/timezone
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,19 +2,24 @@
|
|||||||
|
|
||||||
## 配置步骤
|
## 配置步骤
|
||||||
|
|
||||||
1. 创建应用,获取APPID
|
|
||||||
|
1. 注册支付宝商家账号
|
||||||
|
* 开通电脑网站支付产品(需营业执照): https://b.alipay.com/page/product-workspace/all-product
|
||||||
|
|
||||||
|
|
||||||
|
2. 开放平台,创建应用,获取APPID
|
||||||
* 登录支付宝开放平台,进入开发者中心,创建网页应用,获取应用的AppId(左上角复制)
|
* 登录支付宝开放平台,进入开发者中心,创建网页应用,获取应用的AppId(左上角复制)
|
||||||
* 开发者中心:https://open.alipay.com/develop/manage
|
* 开发者中心:https://open.alipay.com/develop/manage
|
||||||
|
|
||||||
|
|
||||||
2. 进入应用详情,选择开发设置,配置接口加签方式 (选择密钥类型)
|
3. 进入应用详情,选择开发设置,配置接口加签方式 (选择密钥类型)
|
||||||
|
|
||||||
* 参考文档:https://opendocs.alipay.com/common/02kdnc?pathHash=fb0c752a
|
* 参考文档:https://opendocs.alipay.com/common/02kdnc?pathHash=fb0c752a
|
||||||
* 此步骤完成后,可以获取应用的私钥、支付宝公钥。
|
* 此步骤完成后,可以获取应用的私钥、支付宝公钥。
|
||||||
* 注意:支付宝不会保存应用的私钥,你需要自己保管好私钥。
|
* 注意:支付宝不会保存应用的私钥,你需要自己保管好私钥。
|
||||||
|
|
||||||
|
|
||||||
3. 在Certd后台配置支付宝
|
4. 在Certd后台配置支付宝
|
||||||
|
|
||||||
* 进入“系统”->"设置"->“支付设置”
|
* 进入“系统”->"设置"->“支付设置”
|
||||||
* 启用支付宝,选择“支付宝配置”,点击添加
|
* 启用支付宝,选择“支付宝配置”,点击添加
|
||||||
|
|||||||
BIN
docs/guide/use/tencent/images/opaque.png
Normal file
BIN
docs/guide/use/tencent/images/opaque.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
BIN
docs/guide/use/tencent/images/tcpssl.png
Normal file
BIN
docs/guide/use/tencent/images/tcpssl.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
@@ -8,8 +8,11 @@
|
|||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 如何避免收到腾讯云证书过期邮件
|
## 如何避免收到腾讯云证书过期邮件
|
||||||
|
|
||||||
|
> 新版本已经自动将证书设置为免提醒,certd上传的证书后续都不会再提醒了。
|
||||||
|
|
||||||
腾讯云在证书有效期还剩28天时会发送过期通知邮件
|
腾讯云在证书有效期还剩28天时会发送过期通知邮件
|
||||||
您可以通过配置“腾讯云过期证书删除”任务来避免收到此类邮件。
|
您可以通过配置“腾讯云过期证书删除”任务来避免收到此类邮件。
|
||||||
|
|
||||||
@@ -19,3 +22,16 @@
|
|||||||
> 1. 选择腾讯云授权,需授权`服务角色SSL_QCSLinkedRoleInReplaceLoadCertificate`权限
|
> 1. 选择腾讯云授权,需授权`服务角色SSL_QCSLinkedRoleInReplaceLoadCertificate`权限
|
||||||
> 2. `1.26.14`版本之前Certd创建的证书流水线默认是到期前20天才更新证书,需要将之前创建的证书申请任务的更新天数修改为35天,保证删除之前就已经替换掉即将过期证书
|
> 2. `1.26.14`版本之前Certd创建的证书流水线默认是到期前20天才更新证书,需要将之前创建的证书申请任务的更新天数修改为35天,保证删除之前就已经替换掉即将过期证书
|
||||||

|

|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## TKE service 的 TCP_SSL Opaque类型证书授权
|
||||||
|
|
||||||
|
部署证书到腾讯云TKE,如果报以下错误:
|
||||||
|
`is forbidden: User "xxxxxx-xxxxx" cannot get resource "secrets" in API group "" in the namespace "default"'`
|
||||||
|
则需要单独从授权管理侧再授权子用户的权限
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|

|
||||||
|
|||||||
@@ -9,5 +9,5 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"npmClient": "pnpm",
|
"npmClient": "pnpm",
|
||||||
"version": "1.36.11"
|
"version": "1.36.16"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "lerna bootstrap --hoist",
|
"start": "lerna bootstrap --hoist",
|
||||||
|
"start:server": "cd ./packages/ui/certd-server && npm start",
|
||||||
"devb": "lerna run dev-build",
|
"devb": "lerna run dev-build",
|
||||||
"i-all": "lerna link && lerna exec npm install ",
|
"i-all": "lerna link && lerna exec npm install ",
|
||||||
"publish": "npm run prepublishOnly2 && lerna publish --force-publish=pro/plus-core --conventional-commits --create-release github && npm run afterpublishOnly && npm run commitAll",
|
"publish": "npm run prepublishOnly2 && lerna publish --force-publish=pro/plus-core --conventional-commits --create-release github && npm run afterpublishOnly && npm run commitAll",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ root = true
|
|||||||
|
|
||||||
[*]
|
[*]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
indent_size = 4
|
indent_size = 2
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
[{*.yml,*.yaml}]
|
[{*.yml,*.yaml}]
|
||||||
|
|||||||
@@ -3,6 +3,28 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/publishlab/node-acme-client/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到百度cdn支持自动获取域名列表选择 ([4e432ed](https://github.com/publishlab/node-acme-client/commit/4e432ed03f4fb564e85a2f284ee26b58400b82f5))
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/publishlab/node-acme-client/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/publishlab/node-acme-client/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/publishlab/node-acme-client/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/publishlab/node-acme-client/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|
||||||
## [1.36.11](https://github.com/publishlab/node-acme-client/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/publishlab/node-acme-client/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/acme-client
|
**Note:** Version bump only for package @certd/acme-client
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"description": "Simple and unopinionated ACME client",
|
"description": "Simple and unopinionated ACME client",
|
||||||
"private": false,
|
"private": false,
|
||||||
"author": "nmorsman",
|
"author": "nmorsman",
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"module": "scr/index.js",
|
"module": "scr/index.js",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"types"
|
"types"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.36.11",
|
"@certd/basic": "^1.36.16",
|
||||||
"@peculiar/x509": "^1.11.0",
|
"@peculiar/x509": "^1.11.0",
|
||||||
"asn1js": "^3.0.5",
|
"asn1js": "^3.0.5",
|
||||||
"axios": "^1.7.2",
|
"axios": "^1.7.2",
|
||||||
@@ -69,5 +69,5 @@
|
|||||||
"bugs": {
|
"bugs": {
|
||||||
"url": "https://github.com/publishlab/node-acme-client/issues"
|
"url": "https://github.com/publishlab/node-acme-client/issues"
|
||||||
},
|
},
|
||||||
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
"gitHead": "fb7341f1f7d05d05c5439a36594665e3855d6a00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,26 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/basic
|
**Note:** Version bump only for package @certd/basic
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
12:23
|
12:46
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/basic",
|
"name": "@certd/basic",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -45,5 +45,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
"gitHead": "fb7341f1f7d05d05c5439a36594665e3855d6a00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,31 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 百度云支持上传到证书托管,支持部署到负载均衡 ([798a48a](https://github.com/certd/certd/commit/798a48aa9686fd5d11cfffb6cd93eadfc40aacb3))
|
||||||
|
* 支持部署到金山云CDN ([dfa74a6](https://github.com/certd/certd/commit/dfa74a69f7cbb9009d3e20c7eecfa1b905a00cf0))
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/pipeline
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复自定义插件onlyAdmin报错的bug ([4e5e862](https://github.com/certd/certd/commit/4e5e862f5834ad180e4428959c272d444a6f78ab))
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/pipeline",
|
"name": "@certd/pipeline",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -17,8 +17,8 @@
|
|||||||
"pub": "npm publish"
|
"pub": "npm publish"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.36.11",
|
"@certd/basic": "^1.36.16",
|
||||||
"@certd/plus-core": "^1.36.11",
|
"@certd/plus-core": "^1.36.16",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"reflect-metadata": "^0.1.13"
|
"reflect-metadata": "^0.1.13"
|
||||||
@@ -44,5 +44,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
"gitHead": "fb7341f1f7d05d05c5439a36594665e3855d6a00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ export type PageSearch = {
|
|||||||
// sortOrder?: "asc" | "desc";
|
// sortOrder?: "asc" | "desc";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
export type PageRes = {
|
export type PageRes = {
|
||||||
pageNo?: number;
|
pageNo?: number;
|
||||||
pageSize?: number;
|
pageSize?: number;
|
||||||
|
|||||||
@@ -165,7 +165,7 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
|||||||
this.registerSecret(cert.one);
|
this.registerSecret(cert.one);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.ctx.define.onlyAdmin) {
|
if (this.ctx?.define?.onlyAdmin) {
|
||||||
if (!this.isAdmin()) {
|
if (!this.isAdmin()) {
|
||||||
throw new Error("只有管理员才能运行此任务");
|
throw new Error("只有管理员才能运行此任务");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ export const pluginGroups = {
|
|||||||
tencent: new PluginGroup("tencent", "腾讯云", 4, "svg:icon-tencentcloud"),
|
tencent: new PluginGroup("tencent", "腾讯云", 4, "svg:icon-tencentcloud"),
|
||||||
volcengine: new PluginGroup("volcengine", "火山引擎", 4, "svg:icon-volcengine"),
|
volcengine: new PluginGroup("volcengine", "火山引擎", 4, "svg:icon-volcengine"),
|
||||||
jdcloud: new PluginGroup("jdcloud", "京东云", 4, "svg:icon-jdcloud"),
|
jdcloud: new PluginGroup("jdcloud", "京东云", 4, "svg:icon-jdcloud"),
|
||||||
|
baidu: new PluginGroup("baidu", "百度云", 4, "ant-design:baidu-outlined"),
|
||||||
qiniu: new PluginGroup("qiniu", "七牛云", 5, "svg:icon-qiniuyun"),
|
qiniu: new PluginGroup("qiniu", "七牛云", 5, "svg:icon-qiniuyun"),
|
||||||
aws: new PluginGroup("aws", "亚马逊云", 6, "svg:icon-aws"),
|
aws: new PluginGroup("aws", "亚马逊云", 6, "svg:icon-aws"),
|
||||||
other: new PluginGroup("other", "其他", 10, "clarity:plugin-line"),
|
other: new PluginGroup("other", "其他", 10, "clarity:plugin-line"),
|
||||||
|
|||||||
@@ -3,6 +3,26 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-huawei
|
**Note:** Version bump only for package @certd/lib-huawei
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-huawei",
|
"name": "@certd/lib-huawei",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"main": "./dist/bundle.js",
|
"main": "./dist/bundle.js",
|
||||||
"module": "./dist/bundle.js",
|
"module": "./dist/bundle.js",
|
||||||
"types": "./dist/d/index.d.ts",
|
"types": "./dist/d/index.d.ts",
|
||||||
@@ -24,5 +24,5 @@
|
|||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"tslib": "^2.8.1"
|
"tslib": "^2.8.1"
|
||||||
},
|
},
|
||||||
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
"gitHead": "fb7341f1f7d05d05c5439a36594665e3855d6a00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,26 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-iframe
|
**Note:** Version bump only for package @certd/lib-iframe
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-iframe",
|
"name": "@certd/lib-iframe",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -31,5 +31,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
"gitHead": "fb7341f1f7d05d05c5439a36594665e3855d6a00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,26 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/jdcloud
|
**Note:** Version bump only for package @certd/jdcloud
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/jdcloud",
|
"name": "@certd/jdcloud",
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"description": "jdcloud openApi sdk",
|
"description": "jdcloud openApi sdk",
|
||||||
"main": "./dist/bundle.js",
|
"main": "./dist/bundle.js",
|
||||||
"module": "./dist/bundle.js",
|
"module": "./dist/bundle.js",
|
||||||
@@ -61,5 +61,5 @@
|
|||||||
"fetch"
|
"fetch"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
"gitHead": "fb7341f1f7d05d05c5439a36594665e3855d6a00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* k8s ack、tke 支持重启ingress ([95715a0](https://github.com/certd/certd/commit/95715a007d931c64fa7dd953d94957398e00a443))
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到k8s,tke,ack忽悠证书校验 ([ab84835](https://github.com/certd/certd/commit/ab848353621869464a2c9a45fdb5e28d998b8a58))
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-k8s
|
**Note:** Version bump only for package @certd/lib-k8s
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-k8s",
|
"name": "@certd/lib-k8s",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.js",
|
"module": "./dist/index.js",
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
"pub": "npm publish"
|
"pub": "npm publish"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/basic": "^1.36.11",
|
"@certd/basic": "^1.36.16",
|
||||||
"@kubernetes/client-node": "0.21.0"
|
"@kubernetes/client-node": "0.21.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
@@ -32,5 +32,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
"gitHead": "fb7341f1f7d05d05c5439a36594665e3855d6a00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,4 +150,18 @@ export class K8sClient {
|
|||||||
this.logger.info("ingress patched", opts.body);
|
this.logger.info("ingress patched", opts.body);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async restartIngress(namespace: string, ingressNames: string[], labels: any) {
|
||||||
|
const body = {
|
||||||
|
metadata: {
|
||||||
|
labels: {
|
||||||
|
...labels,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
for (const ingress of ingressNames) {
|
||||||
|
await this.patchIngress({ namespace, ingressName: ingress, body });
|
||||||
|
this.logger.info(`ingress已重启:${ingress}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复授权配置复制功能,无法复制已加密字段的问题 ([221e068](https://github.com/certd/certd/commit/221e068bac3af6cd5d1794f8cd4c2ec5c0bc3f45))
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 新增找回密码功能 [@nicheng-he](https://github.com/nicheng-he) ([81ac240](https://github.com/certd/certd/commit/81ac240ac84db0af2f56b6352e227ecb49f38377))
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/lib-server
|
**Note:** Version bump only for package @certd/lib-server
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/lib-server",
|
"name": "@certd/lib-server",
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"description": "midway with flyway, sql upgrade way ",
|
"description": "midway with flyway, sql upgrade way ",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -27,10 +27,10 @@
|
|||||||
],
|
],
|
||||||
"license": "AGPL",
|
"license": "AGPL",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.36.11",
|
"@certd/acme-client": "^1.36.16",
|
||||||
"@certd/basic": "^1.36.11",
|
"@certd/basic": "^1.36.16",
|
||||||
"@certd/pipeline": "^1.36.11",
|
"@certd/pipeline": "^1.36.16",
|
||||||
"@certd/plus-core": "^1.36.11",
|
"@certd/plus-core": "^1.36.16",
|
||||||
"@midwayjs/cache": "~3.14.0",
|
"@midwayjs/cache": "~3.14.0",
|
||||||
"@midwayjs/core": "~3.20.3",
|
"@midwayjs/core": "~3.20.3",
|
||||||
"@midwayjs/i18n": "~3.20.3",
|
"@midwayjs/i18n": "~3.20.3",
|
||||||
@@ -61,5 +61,5 @@
|
|||||||
"typeorm": "^0.3.11",
|
"typeorm": "^0.3.11",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
"gitHead": "fb7341f1f7d05d05c5439a36594665e3855d6a00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export class SysPublicSettings extends BaseSettings {
|
|||||||
mobileRegisterEnabled = false;
|
mobileRegisterEnabled = false;
|
||||||
smsLoginEnabled = false;
|
smsLoginEnabled = false;
|
||||||
emailRegisterEnabled = false;
|
emailRegisterEnabled = false;
|
||||||
|
selfServicePasswordRetrievalEnabled = false;
|
||||||
|
|
||||||
limitUserPipelineCount = 0;
|
limitUserPipelineCount = 0;
|
||||||
managerOtherUserPipeline = false;
|
managerOtherUserPipeline = false;
|
||||||
|
|||||||
@@ -34,7 +34,18 @@ export class AccessService extends BaseService<AccessEntity> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async add(param) {
|
async add(param) {
|
||||||
this.encryptSetting(param, null);
|
let oldEntity = null;
|
||||||
|
if (param._copyFrom){
|
||||||
|
oldEntity = await this.info(param._copyFrom);
|
||||||
|
if (oldEntity == null) {
|
||||||
|
throw new ValidateException('该授权配置不存在,请确认是否已被删除');
|
||||||
|
}
|
||||||
|
if (oldEntity.userId !== param.userId) {
|
||||||
|
throw new ValidateException('您无权查看该授权配置');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
delete param._copyFrom
|
||||||
|
this.encryptSetting(param, oldEntity);
|
||||||
return await super.add(param);
|
return await super.add(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,26 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/midway-flyway-js",
|
"name": "@certd/midway-flyway-js",
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"description": "midway with flyway, sql upgrade way ",
|
"description": "midway with flyway, sql upgrade way ",
|
||||||
"private": false,
|
"private": false,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -46,5 +46,5 @@
|
|||||||
"typeorm": "^0.3.11",
|
"typeorm": "^0.3.11",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
"gitHead": "fb7341f1f7d05d05c5439a36594665e3855d6a00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 百度云支持上传到证书托管,支持部署到负载均衡 ([798a48a](https://github.com/certd/certd/commit/798a48aa9686fd5d11cfffb6cd93eadfc40aacb3))
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复商用证书上传第二次运行无法使用pfx格式证书的bug ([251dd1f](https://github.com/certd/certd/commit/251dd1fe457a7b152f43eb6de18f7beb9f0b194e))
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/plugin-cert
|
**Note:** Version bump only for package @certd/plugin-cert
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-cert",
|
"name": "@certd/plugin-cert",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -16,10 +16,10 @@
|
|||||||
"pub": "npm publish"
|
"pub": "npm publish"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@certd/acme-client": "^1.36.11",
|
"@certd/acme-client": "^1.36.16",
|
||||||
"@certd/basic": "^1.36.11",
|
"@certd/basic": "^1.36.16",
|
||||||
"@certd/pipeline": "^1.36.11",
|
"@certd/pipeline": "^1.36.16",
|
||||||
"@certd/plugin-lib": "^1.36.11",
|
"@certd/plugin-lib": "^1.36.16",
|
||||||
"@google-cloud/publicca": "^1.3.0",
|
"@google-cloud/publicca": "^1.3.0",
|
||||||
"dayjs": "^1.11.7",
|
"dayjs": "^1.11.7",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
@@ -43,5 +43,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
"gitHead": "fb7341f1f7d05d05c5439a36594665e3855d6a00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,4 +194,13 @@ cert.jks:jks格式证书文件,java服务器使用
|
|||||||
};
|
};
|
||||||
return newCert;
|
return newCert;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async readLastCert(): Promise<CertReader | undefined> {
|
||||||
|
const cert = this.lastStatus?.status?.output?.cert;
|
||||||
|
if (cert == null) {
|
||||||
|
this.logger.info("没有找到上次的证书");
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
return new CertReader(cert);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -130,15 +130,6 @@ export abstract class CertApplyBasePlugin extends CertApplyBaseConvertPlugin {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
async readLastCert(): Promise<CertReader | undefined> {
|
|
||||||
const cert = this.lastStatus?.status?.output?.cert;
|
|
||||||
if (cert == null) {
|
|
||||||
this.logger.info("没有找到上次的证书");
|
|
||||||
return undefined;
|
|
||||||
}
|
|
||||||
return new CertReader(cert);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 检查是否过期,默认提前35天
|
* 检查是否过期,默认提前35天
|
||||||
* @param expires
|
* @param expires
|
||||||
|
|||||||
@@ -211,4 +211,8 @@ export class CertReader {
|
|||||||
}
|
}
|
||||||
return name + "_" + dayjs().format("YYYYMMDDHHmmssSSS");
|
return name + "_" + dayjs().format("YYYYMMDDHHmmssSSS");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static buildCertName(cert: any) {
|
||||||
|
return new CertReader(cert).buildCertName();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -100,8 +100,17 @@ export class CertApplyUploadPlugin extends CertApplyBaseConvertPlugin {
|
|||||||
async onInit(): Promise<void> {}
|
async onInit(): Promise<void> {}
|
||||||
|
|
||||||
async getCertFromStore() {
|
async getCertFromStore() {
|
||||||
const certReader = new CertReader(this.uploadCert);
|
let certReader = null;
|
||||||
if (!certReader.expires && certReader.expires < new Date().getTime()) {
|
try {
|
||||||
|
this.logger.info("读取上次证书");
|
||||||
|
certReader = await this.readLastCert();
|
||||||
|
} catch (e) {
|
||||||
|
this.logger.warn("读取cert失败:", e);
|
||||||
|
}
|
||||||
|
if (certReader == null) {
|
||||||
|
certReader = new CertReader(this.uploadCert);
|
||||||
|
}
|
||||||
|
if (!certReader.expires || certReader.expires < new Date().getTime()) {
|
||||||
throw new Error("证书已过期,停止部署,请重新上传证书");
|
throw new Error("证书已过期,停止部署,请重新上传证书");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,32 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 支持webhook部署证书 ([cbe0b1c](https://github.com/certd/certd/commit/cbe0b1c5a6538f232e9a63f1693d20d5acf0a306))
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 1panel支持 currenNode ([acc8907](https://github.com/certd/certd/commit/acc890730f43d492c9b1bd3668814cf10efdf7b8))
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复阿里云发送短信验证码失败的bug ([2e6d03f](https://github.com/certd/certd/commit/2e6d03ff001f521f57368e7a62b97ed7b122e8d0))
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/plugin-lib
|
**Note:** Version bump only for package @certd/plugin-lib
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/plugin-lib",
|
"name": "@certd/plugin-lib",
|
||||||
"private": false,
|
"private": false,
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"types": "./dist/index.d.ts",
|
"types": "./dist/index.d.ts",
|
||||||
@@ -21,8 +21,8 @@
|
|||||||
"@alicloud/pop-core": "^1.7.10",
|
"@alicloud/pop-core": "^1.7.10",
|
||||||
"@alicloud/tea-util": "^1.4.10",
|
"@alicloud/tea-util": "^1.4.10",
|
||||||
"@aws-sdk/client-s3": "^3.787.0",
|
"@aws-sdk/client-s3": "^3.787.0",
|
||||||
"@certd/basic": "^1.36.11",
|
"@certd/basic": "^1.36.16",
|
||||||
"@certd/pipeline": "^1.36.11",
|
"@certd/pipeline": "^1.36.16",
|
||||||
"@kubernetes/client-node": "0.21.0",
|
"@kubernetes/client-node": "0.21.0",
|
||||||
"ali-oss": "^6.22.0",
|
"ali-oss": "^6.22.0",
|
||||||
"basic-ftp": "^5.0.5",
|
"basic-ftp": "^5.0.5",
|
||||||
@@ -53,5 +53,5 @@
|
|||||||
"tslib": "^2.8.1",
|
"tslib": "^2.8.1",
|
||||||
"typescript": "^5.4.2"
|
"typescript": "^5.4.2"
|
||||||
},
|
},
|
||||||
"gitHead": "7f9c4e52ac5c3837b251d3b2508457ce802e11cb"
|
"gitHead": "fb7341f1f7d05d05c5439a36594665e3855d6a00"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ export class AliyunClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
checkRet(ret: any) {
|
checkRet(ret: any) {
|
||||||
if (ret.Code != null) {
|
if (ret.Code != null && ret.Code !== "OK" && ret.Message !== "OK") {
|
||||||
throw new Error("执行失败:" + ret.Message);
|
throw new Error("执行失败:" + ret.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,6 +42,7 @@ export function createRemoteSelectInputDefine(opts?: {
|
|||||||
search?: boolean;
|
search?: boolean;
|
||||||
pager?: boolean;
|
pager?: boolean;
|
||||||
component?: any;
|
component?: any;
|
||||||
|
value?: any;
|
||||||
}) {
|
}) {
|
||||||
const title = opts?.title || "请选择";
|
const title = opts?.title || "请选择";
|
||||||
const certDomainsInputKey = opts?.certDomainsInputKey || "certDomains";
|
const certDomainsInputKey = opts?.certDomainsInputKey || "certDomains";
|
||||||
@@ -74,6 +75,7 @@ export function createRemoteSelectInputDefine(opts?: {
|
|||||||
watches: [certDomainsInputKey, accessIdInputKey, ...watches],
|
watches: [certDomainsInputKey, accessIdInputKey, ...watches],
|
||||||
...opts.component,
|
...opts.component,
|
||||||
},
|
},
|
||||||
|
value: opts.value,
|
||||||
rules: opts?.rules,
|
rules: opts?.rules,
|
||||||
required: opts.required ?? true,
|
required: opts.required ?? true,
|
||||||
mergeScript:
|
mergeScript:
|
||||||
|
|||||||
@@ -45,8 +45,8 @@ export class SshAccess extends BaseAccess {
|
|||||||
title: "私钥登录",
|
title: "私钥登录",
|
||||||
helper: "私钥或密码必填一项",
|
helper: "私钥或密码必填一项",
|
||||||
component: {
|
component: {
|
||||||
name: "a-textarea",
|
name: "pem-input",
|
||||||
vModel: "value",
|
vModel: "modelValue",
|
||||||
},
|
},
|
||||||
encrypt: true,
|
encrypt: true,
|
||||||
})
|
})
|
||||||
|
|||||||
183
packages/plugins/plugin-lib/src/tencent/lib/cos-client.js
Normal file
183
packages/plugins/plugin-lib/src/tencent/lib/cos-client.js
Normal file
@@ -0,0 +1,183 @@
|
|||||||
|
"use strict";
|
||||||
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||||
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||||
|
return new (P || (P = Promise))(function (resolve, reject) {
|
||||||
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||||
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||||
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||||
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||||
|
});
|
||||||
|
};
|
||||||
|
var __generator = (this && this.__generator) || function (thisArg, body) {
|
||||||
|
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
||||||
|
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||||
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||||
|
function step(op) {
|
||||||
|
if (f) throw new TypeError("Generator is already executing.");
|
||||||
|
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
||||||
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||||
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||||
|
switch (op[0]) {
|
||||||
|
case 0: case 1: t = op; break;
|
||||||
|
case 4: _.label++; return { value: op[1], done: false };
|
||||||
|
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||||
|
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||||
|
default:
|
||||||
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||||
|
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||||
|
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||||
|
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||||
|
if (t[2]) _.ops.pop();
|
||||||
|
_.trys.pop(); continue;
|
||||||
|
}
|
||||||
|
op = body.call(thisArg, _);
|
||||||
|
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||||
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||||
|
}
|
||||||
|
};
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.TencentCosClient = void 0;
|
||||||
|
var basic_1 = require("@certd/basic");
|
||||||
|
var fs_1 = require("fs");
|
||||||
|
var TencentCosClient = /** @class */ (function () {
|
||||||
|
function TencentCosClient(opts) {
|
||||||
|
this.access = opts.access;
|
||||||
|
this.logger = opts.logger;
|
||||||
|
this.bucket = opts.bucket;
|
||||||
|
this.region = opts.region;
|
||||||
|
}
|
||||||
|
TencentCosClient.prototype.getCosClient = function () {
|
||||||
|
return __awaiter(this, void 0, void 0, function () {
|
||||||
|
var sdk, clientConfig;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0: return [4 /*yield*/, Promise.resolve().then(function () { return require("cos-nodejs-sdk-v5"); })];
|
||||||
|
case 1:
|
||||||
|
sdk = _a.sent();
|
||||||
|
clientConfig = {
|
||||||
|
SecretId: this.access.secretId,
|
||||||
|
SecretKey: this.access.secretKey,
|
||||||
|
};
|
||||||
|
return [2 /*return*/, new sdk.default(clientConfig)];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
TencentCosClient.prototype.uploadFile = function (key, file) {
|
||||||
|
return __awaiter(this, void 0, void 0, function () {
|
||||||
|
var cos;
|
||||||
|
var _this = this;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0: return [4 /*yield*/, this.getCosClient()];
|
||||||
|
case 1:
|
||||||
|
cos = _a.sent();
|
||||||
|
return [2 /*return*/, (0, basic_1.safePromise)(function (resolve, reject) {
|
||||||
|
var readableStream = file;
|
||||||
|
if (typeof file === "string") {
|
||||||
|
readableStream = fs_1.default.createReadStream(file);
|
||||||
|
}
|
||||||
|
cos.putObject({
|
||||||
|
Bucket: _this.bucket /* 必须 */,
|
||||||
|
Region: _this.region /* 必须 */,
|
||||||
|
Key: key /* 必须 */,
|
||||||
|
Body: readableStream, // 上传文件对象
|
||||||
|
onProgress: function (progressData) {
|
||||||
|
console.log(JSON.stringify(progressData));
|
||||||
|
},
|
||||||
|
}, function (err, data) {
|
||||||
|
if (err) {
|
||||||
|
reject(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
resolve(data);
|
||||||
|
});
|
||||||
|
})];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
TencentCosClient.prototype.removeFile = function (key) {
|
||||||
|
return __awaiter(this, void 0, void 0, function () {
|
||||||
|
var cos;
|
||||||
|
var _this = this;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0: return [4 /*yield*/, this.getCosClient()];
|
||||||
|
case 1:
|
||||||
|
cos = _a.sent();
|
||||||
|
return [2 /*return*/, (0, basic_1.safePromise)(function (resolve, reject) {
|
||||||
|
cos.deleteObject({
|
||||||
|
Bucket: _this.bucket,
|
||||||
|
Region: _this.region,
|
||||||
|
Key: key,
|
||||||
|
}, function (err, data) {
|
||||||
|
if (err) {
|
||||||
|
reject(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
resolve(data);
|
||||||
|
});
|
||||||
|
})];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
TencentCosClient.prototype.downloadFile = function (key, savePath) {
|
||||||
|
return __awaiter(this, void 0, void 0, function () {
|
||||||
|
var cos, writeStream;
|
||||||
|
var _this = this;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0: return [4 /*yield*/, this.getCosClient()];
|
||||||
|
case 1:
|
||||||
|
cos = _a.sent();
|
||||||
|
writeStream = fs_1.default.createWriteStream(savePath);
|
||||||
|
return [2 /*return*/, (0, basic_1.safePromise)(function (resolve, reject) {
|
||||||
|
cos.getObject({
|
||||||
|
Bucket: _this.bucket,
|
||||||
|
Region: _this.region,
|
||||||
|
Key: key,
|
||||||
|
Output: writeStream,
|
||||||
|
}, function (err, data) {
|
||||||
|
if (err) {
|
||||||
|
reject(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
resolve(data);
|
||||||
|
});
|
||||||
|
})];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
TencentCosClient.prototype.listDir = function (dirKey) {
|
||||||
|
return __awaiter(this, void 0, void 0, function () {
|
||||||
|
var cos;
|
||||||
|
var _this = this;
|
||||||
|
return __generator(this, function (_a) {
|
||||||
|
switch (_a.label) {
|
||||||
|
case 0: return [4 /*yield*/, this.getCosClient()];
|
||||||
|
case 1:
|
||||||
|
cos = _a.sent();
|
||||||
|
return [2 /*return*/, (0, basic_1.safePromise)(function (resolve, reject) {
|
||||||
|
cos.getBucket({
|
||||||
|
Bucket: _this.bucket,
|
||||||
|
Region: _this.region,
|
||||||
|
Prefix: dirKey,
|
||||||
|
MaxKeys: 1000,
|
||||||
|
}, function (err, data) {
|
||||||
|
if (err) {
|
||||||
|
reject(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
resolve(data.Contents);
|
||||||
|
});
|
||||||
|
})];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
|
return TencentCosClient;
|
||||||
|
}());
|
||||||
|
exports.TencentCosClient = TencentCosClient;
|
||||||
@@ -10,3 +10,4 @@ VITE_APP_LOGO=static/images/logo/logo.svg
|
|||||||
VITE_APP_LOGIN_LOGO=static/images/logo/rect-black.svg
|
VITE_APP_LOGIN_LOGO=static/images/logo/rect-black.svg
|
||||||
VITE_APP_PROJECT_PATH=https://github.com/certd/certd
|
VITE_APP_PROJECT_PATH=https://github.com/certd/certd
|
||||||
VITE_APP_NAMESPACE=fs
|
VITE_APP_NAMESPACE=fs
|
||||||
|
VITE_APP_VIP_PRODUCT_URL=http://localhost:1017/subject#/product/list
|
||||||
@@ -3,6 +3,54 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复授权配置复制功能,无法复制已加密字段的问题 ([221e068](https://github.com/certd/certd/commit/221e068bac3af6cd5d1794f8cd4c2ec5c0bc3f45))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 增加找回密码的验证码可重试次数 [@nicheng-he](https://github.com/nicheng-he) ([#496](https://github.com/certd/certd/issues/496)) ([fe03f99](https://github.com/certd/certd/commit/fe03f9942b5662fb90cad86da10782f5dc3603f5))
|
||||||
|
* 支持阿里云API网关 ([9e1e4ee](https://github.com/certd/certd/commit/9e1e4eeec2859759ca5b07834c9d24cf88a6ad33))
|
||||||
|
* 支持部署到金山云CDN ([dfa74a6](https://github.com/certd/certd/commit/dfa74a69f7cbb9009d3e20c7eecfa1b905a00cf0))
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到阿里云支持选择bucket和域名 ([013b9c4](https://github.com/certd/certd/commit/013b9c4c7c2adf485d086123ccea448719577fd4))
|
||||||
|
* 支持webhook部署证书 ([cbe0b1c](https://github.com/certd/certd/commit/cbe0b1c5a6538f232e9a63f1693d20d5acf0a306))
|
||||||
|
* 注册时支持填写用户名 ([fdcfcc7](https://github.com/certd/certd/commit/fdcfcc77a0db87954e0b026635d3ccdd9bc6cee8))
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复复制流水线为空的bug ([b070773](https://github.com/certd/certd/commit/b0707739fdfbae3d78db4efd3f180db05c4e4164))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 授权管理支持模糊查询 ([866eb62](https://github.com/certd/certd/commit/866eb6241baa7b21f6eddc649966324c188236c6))
|
||||||
|
* 新增找回密码功能 [@nicheng-he](https://github.com/nicheng-he) ([81ac240](https://github.com/certd/certd/commit/81ac240ac84db0af2f56b6352e227ecb49f38377))
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 阿里云部分插件优化 [@nicheng-he](https://github.com/nicheng-he) ([e3738f6](https://github.com/certd/certd/commit/e3738f6422270d75ec414c15a343248cc4cad6e1))
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 上传到阿里云cas,证书前缀无效的bug ([b382351](https://github.com/certd/certd/commit/b382351c7b91ec10e1f61d94bec5aad075207ec8))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 首页增加更新日志按钮 ([41ce848](https://github.com/certd/certd/commit/41ce8489dc2f03a705dfa3fbb357769defb56c60))
|
||||||
|
* 增加版本过低提示 ([d1ce360](https://github.com/certd/certd/commit/d1ce36038cab72b5dc1b320d0a708c261ffbdacb))
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
**Note:** Version bump only for package @certd/ui-client
|
**Note:** Version bump only for package @certd/ui-client
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/ui-client",
|
"name": "@certd/ui-client",
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite --open",
|
"dev": "vite --open",
|
||||||
@@ -103,8 +103,8 @@
|
|||||||
"zod-defaults": "^0.1.3"
|
"zod-defaults": "^0.1.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@certd/lib-iframe": "^1.36.11",
|
"@certd/lib-iframe": "^1.36.16",
|
||||||
"@certd/pipeline": "^1.36.11",
|
"@certd/pipeline": "^1.36.16",
|
||||||
"@rollup/plugin-commonjs": "^25.0.7",
|
"@rollup/plugin-commonjs": "^25.0.7",
|
||||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||||
"@types/chai": "^4.3.12",
|
"@types/chai": "^4.3.12",
|
||||||
@@ -120,7 +120,7 @@
|
|||||||
"@vue/compiler-sfc": "^3.4.21",
|
"@vue/compiler-sfc": "^3.4.21",
|
||||||
"@vue/eslint-config-typescript": "^13.0.0",
|
"@vue/eslint-config-typescript": "^13.0.0",
|
||||||
"@vue/test-utils": "^2.4.6",
|
"@vue/test-utils": "^2.4.6",
|
||||||
"autoprefixer": "^10.4.20",
|
"autoprefixer": "^10.4.21",
|
||||||
"caller-path": "^4.0.0",
|
"caller-path": "^4.0.0",
|
||||||
"chai": "^5.1.0",
|
"chai": "^5.1.0",
|
||||||
"dependency-cruiser": "^16.2.3",
|
"dependency-cruiser": "^16.2.3",
|
||||||
|
|||||||
@@ -54,6 +54,36 @@
|
|||||||
<div class="content unicode" style="display: block;">
|
<div class="content unicode" style="display: block;">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">social-foursquare</div>
|
||||||
|
<div class="code-name">&#xe8fb;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">ksyun-logo</div>
|
||||||
|
<div class="code-name">&#xe65a;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">雨-copy</div>
|
||||||
|
<div class="code-name">&#xe608;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">网宿</div>
|
||||||
|
<div class="code-name">&#xe655;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont"></span>
|
||||||
|
<div class="name">ai客服</div>
|
||||||
|
<div class="code-name">&#xe727;</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont"></span>
|
<span class="icon iconfont"></span>
|
||||||
<div class="name">cdn</div>
|
<div class="name">cdn</div>
|
||||||
@@ -198,7 +228,7 @@
|
|||||||
<pre><code class="language-css"
|
<pre><code class="language-css"
|
||||||
>@font-face {
|
>@font-face {
|
||||||
font-family: 'iconfont';
|
font-family: 'iconfont';
|
||||||
src: url('iconfont.svg?t=1743267254898#iconfont') format('svg');
|
src: url('iconfont.svg?t=1754884110189#iconfont') format('svg');
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
|
||||||
@@ -224,6 +254,51 @@
|
|||||||
<div class="content font-class">
|
<div class="content font-class">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-four"></span>
|
||||||
|
<div class="name">
|
||||||
|
social-foursquare
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-four
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-ksyun"></span>
|
||||||
|
<div class="name">
|
||||||
|
ksyun-logo
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-ksyun
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-rainyun"></span>
|
||||||
|
<div class="name">
|
||||||
|
雨-copy
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-rainyun
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-wangsu"></span>
|
||||||
|
<div class="name">
|
||||||
|
网宿
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-wangsu
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<span class="icon iconfont icon-aikefu"></span>
|
||||||
|
<div class="name">
|
||||||
|
ai客服
|
||||||
|
</div>
|
||||||
|
<div class="code-name">.icon-aikefu
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<span class="icon iconfont icon-cdn"></span>
|
<span class="icon iconfont icon-cdn"></span>
|
||||||
<div class="name">
|
<div class="name">
|
||||||
@@ -440,6 +515,46 @@
|
|||||||
<div class="content symbol">
|
<div class="content symbol">
|
||||||
<ul class="icon_lists dib-box">
|
<ul class="icon_lists dib-box">
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-four"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">social-foursquare</div>
|
||||||
|
<div class="code-name">#icon-four</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-ksyun"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">ksyun-logo</div>
|
||||||
|
<div class="code-name">#icon-ksyun</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-rainyun"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">雨-copy</div>
|
||||||
|
<div class="code-name">#icon-rainyun</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-wangsu"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">网宿</div>
|
||||||
|
<div class="code-name">#icon-wangsu</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="dib">
|
||||||
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
|
<use xlink:href="#icon-aikefu"></use>
|
||||||
|
</svg>
|
||||||
|
<div class="name">ai客服</div>
|
||||||
|
<div class="code-name">#icon-aikefu</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li class="dib">
|
<li class="dib">
|
||||||
<svg class="icon svg-icon" aria-hidden="true">
|
<svg class="icon svg-icon" aria-hidden="true">
|
||||||
<use xlink:href="#icon-cdn"></use>
|
<use xlink:href="#icon-cdn"></use>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
@font-face {
|
@font-face {
|
||||||
font-family: "iconfont"; /* Project id 4688792 */
|
font-family: "iconfont"; /* Project id 4688792 */
|
||||||
src: url('iconfont.svg?t=1743267254898#iconfont') format('svg');
|
src: url('iconfont.svg?t=1754884110189#iconfont') format('svg');
|
||||||
}
|
}
|
||||||
|
|
||||||
.iconfont {
|
.iconfont {
|
||||||
@@ -11,6 +11,26 @@
|
|||||||
-moz-osx-font-smoothing: grayscale;
|
-moz-osx-font-smoothing: grayscale;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-four:before {
|
||||||
|
content: "\e8fb";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-ksyun:before {
|
||||||
|
content: "\e65a";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-rainyun:before {
|
||||||
|
content: "\e608";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-wangsu:before {
|
||||||
|
content: "\e655";
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-aikefu:before {
|
||||||
|
content: "\e727";
|
||||||
|
}
|
||||||
|
|
||||||
.icon-cdn:before {
|
.icon-cdn:before {
|
||||||
content: "\e6e4";
|
content: "\e6e4";
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -5,6 +5,41 @@
|
|||||||
"css_prefix_text": "icon-",
|
"css_prefix_text": "icon-",
|
||||||
"description": "",
|
"description": "",
|
||||||
"glyphs": [
|
"glyphs": [
|
||||||
|
{
|
||||||
|
"icon_id": "544964",
|
||||||
|
"name": "social-foursquare",
|
||||||
|
"font_class": "four",
|
||||||
|
"unicode": "e8fb",
|
||||||
|
"unicode_decimal": 59643
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "8567079",
|
||||||
|
"name": "ksyun-logo",
|
||||||
|
"font_class": "ksyun",
|
||||||
|
"unicode": "e65a",
|
||||||
|
"unicode_decimal": 58970
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "42174864",
|
||||||
|
"name": "雨-copy",
|
||||||
|
"font_class": "rainyun",
|
||||||
|
"unicode": "e608",
|
||||||
|
"unicode_decimal": 58888
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "14065547",
|
||||||
|
"name": "网宿",
|
||||||
|
"font_class": "wangsu",
|
||||||
|
"unicode": "e655",
|
||||||
|
"unicode_decimal": 58965
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"icon_id": "41324539",
|
||||||
|
"name": "ai客服",
|
||||||
|
"font_class": "aikefu",
|
||||||
|
"unicode": "e727",
|
||||||
|
"unicode_decimal": 59175
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"icon_id": "13592652",
|
"icon_id": "13592652",
|
||||||
"name": "cdn",
|
"name": "cdn",
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 77 KiB |
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="pem-input">
|
<div class="pem-input">
|
||||||
<FileInput v-bind="fileInput" class="mb-5" type="primary" text="选择文件" @change="onChange" />
|
<FileInput v-bind="fileInput" class="mb-5" type="primary" text="选择文件" @change="onChange" />
|
||||||
<a-textarea v-bind="textarea" :value="modelValue" @update:value="emitValue"></a-textarea>
|
<a-textarea placeholder="或直接粘贴" v-bind="textarea" :value="modelValue" @update:value="emitValue"></a-textarea>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ function onChange(e: any) {
|
|||||||
const size = file.size;
|
const size = file.size;
|
||||||
if (size > 100 * 1024) {
|
if (size > 100 * 1024) {
|
||||||
notification.error({
|
notification.error({
|
||||||
message: "文件超过100k,请选择正确的证书文件",
|
message: "文件超过100k,请选择正确的文件",
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,164 @@
|
|||||||
|
<template>
|
||||||
|
<div class="remote-auto-complete">
|
||||||
|
<div class="flex flex-row">
|
||||||
|
<a-auto-complete class="remote-auto-complete-input" :filter-option="filterOption" :options="optionsRef" :value="value" v-bind="attrs" @click="onClick" @update:value="emit('update:value', $event)">
|
||||||
|
</a-auto-complete>
|
||||||
|
<div class="ml-5">
|
||||||
|
<fs-button :loading="loading" title="刷新选项" icon="ion:refresh-outline" @click="refreshOptions"></fs-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="helper" :class="{ error: hasError }">
|
||||||
|
{{ message }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ComponentPropsType, doRequest } from "/@/components/plugins/lib";
|
||||||
|
import { defineComponent, inject, ref, useAttrs, watch, Ref } from "vue";
|
||||||
|
import { PluginDefine } from "@certd/pipeline";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "RemoteAutoComplete",
|
||||||
|
});
|
||||||
|
|
||||||
|
const props = defineProps<
|
||||||
|
{
|
||||||
|
watches: string[];
|
||||||
|
} & ComponentPropsType
|
||||||
|
>();
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
"update:value": any;
|
||||||
|
}>();
|
||||||
|
|
||||||
|
const attrs = useAttrs();
|
||||||
|
|
||||||
|
const getCurrentPluginDefine: any = inject("getCurrentPluginDefine", () => {
|
||||||
|
return {};
|
||||||
|
});
|
||||||
|
const getScope: any = inject("get:scope", () => {
|
||||||
|
return {};
|
||||||
|
});
|
||||||
|
const getPluginType: any = inject("get:plugin:type", () => {
|
||||||
|
return "plugin";
|
||||||
|
});
|
||||||
|
|
||||||
|
const optionsRef = ref([]);
|
||||||
|
const message = ref("");
|
||||||
|
const hasError = ref(false);
|
||||||
|
const loading = ref(false);
|
||||||
|
|
||||||
|
const getOptions = async () => {
|
||||||
|
if (loading.value) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!getCurrentPluginDefine) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const define: PluginDefine = getCurrentPluginDefine()?.value;
|
||||||
|
if (!define) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const pluginType = getPluginType();
|
||||||
|
const { form } = getScope();
|
||||||
|
const input = (pluginType === "plugin" ? form?.input : form) || {};
|
||||||
|
|
||||||
|
for (let key in define.input) {
|
||||||
|
const inWatches = props.watches.includes(key);
|
||||||
|
const inputDefine = define.input[key];
|
||||||
|
if (inWatches && inputDefine.required) {
|
||||||
|
const value = input[key];
|
||||||
|
if (value == null || value === "") {
|
||||||
|
console.log("remote-select required", key);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
message.value = "";
|
||||||
|
hasError.value = false;
|
||||||
|
loading.value = true;
|
||||||
|
try {
|
||||||
|
const res = await doRequest(
|
||||||
|
{
|
||||||
|
type: pluginType,
|
||||||
|
typeName: form.type,
|
||||||
|
action: props.action,
|
||||||
|
input,
|
||||||
|
data: {},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
onError(err: any) {
|
||||||
|
hasError.value = true;
|
||||||
|
message.value = `获取选项出错:${err.message}`;
|
||||||
|
},
|
||||||
|
showErrorNotify: false,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
const list = res?.list || res || [];
|
||||||
|
if (list.length > 0) {
|
||||||
|
message.value = "获取数据成功,请从下拉框中选择";
|
||||||
|
} else {
|
||||||
|
message.value = "获取数据成功,没有数据";
|
||||||
|
}
|
||||||
|
optionsRef.value = list;
|
||||||
|
|
||||||
|
return res;
|
||||||
|
} finally {
|
||||||
|
loading.value = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const filterOption = (input: string, option: any) => {
|
||||||
|
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0 || String(option.value).toLowerCase().indexOf(input.toLowerCase());
|
||||||
|
};
|
||||||
|
|
||||||
|
async function onClick() {
|
||||||
|
if (optionsRef.value?.length === 0) {
|
||||||
|
await refreshOptions();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function refreshOptions() {
|
||||||
|
await getOptions();
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => {
|
||||||
|
const pluginType = getPluginType();
|
||||||
|
const { form, key } = getScope();
|
||||||
|
const input = (pluginType === "plugin" ? form?.input : form) || {};
|
||||||
|
const watches = {};
|
||||||
|
for (const key of props.watches) {
|
||||||
|
//@ts-ignore
|
||||||
|
watches[key] = input[key];
|
||||||
|
}
|
||||||
|
return {
|
||||||
|
form: watches,
|
||||||
|
key,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
async (value, oldValue) => {
|
||||||
|
const { form } = value;
|
||||||
|
const oldForm: any = oldValue?.form;
|
||||||
|
let changed = oldForm == null || optionsRef.value.length == 0;
|
||||||
|
for (const key of props.watches) {
|
||||||
|
//@ts-ignore
|
||||||
|
if (oldForm && form[key] != oldForm[key]) {
|
||||||
|
changed = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (changed) {
|
||||||
|
await getOptions();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
immediate: true,
|
||||||
|
}
|
||||||
|
);
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less"></style>
|
||||||
@@ -145,6 +145,8 @@ const getOptions = async () => {
|
|||||||
const list = res?.list || res || [];
|
const list = res?.list || res || [];
|
||||||
if (list.length > 0) {
|
if (list.length > 0) {
|
||||||
message.value = "获取数据成功,请从下拉框中选择";
|
message.value = "获取数据成功,请从下拉框中选择";
|
||||||
|
} else {
|
||||||
|
message.value = "获取数据成功,没有数据";
|
||||||
}
|
}
|
||||||
optionsRef.value = list;
|
optionsRef.value = list;
|
||||||
pagerRef.value.total = list.length;
|
pagerRef.value.total = list.length;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import SynologyIdDeviceGetter from "./synology/device-id-getter.vue";
|
import SynologyIdDeviceGetter from "./synology/device-id-getter.vue";
|
||||||
|
import RemoteAutoComplete from "./common/remote-auto-complete.vue";
|
||||||
import RemoteSelect from "./common/remote-select.vue";
|
import RemoteSelect from "./common/remote-select.vue";
|
||||||
import RemoteInput from "./common/remote-input.vue";
|
import RemoteInput from "./common/remote-input.vue";
|
||||||
import CertDomainsGetter from "./common/cert-domains-getter.vue";
|
import CertDomainsGetter from "./common/cert-domains-getter.vue";
|
||||||
@@ -21,6 +22,7 @@ export default {
|
|||||||
app.component("ApiTest", ApiTest);
|
app.component("ApiTest", ApiTest);
|
||||||
|
|
||||||
app.component("SynologyDeviceIdGetter", SynologyIdDeviceGetter);
|
app.component("SynologyDeviceIdGetter", SynologyIdDeviceGetter);
|
||||||
|
app.component("RemoteAutoComplete", RemoteAutoComplete);
|
||||||
app.component("RemoteSelect", RemoteSelect);
|
app.component("RemoteSelect", RemoteSelect);
|
||||||
app.component("RemoteInput", RemoteInput);
|
app.component("RemoteInput", RemoteInput);
|
||||||
app.component("CertDomainsGetter", CertDomainsGetter);
|
app.component("CertDomainsGetter", CertDomainsGetter);
|
||||||
|
|||||||
@@ -280,10 +280,6 @@ function openUpgrade() {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const productListUrl = computed(() => {
|
|
||||||
return `http://localhost:1017/subject/#/product/list?appKey=${settingStore.installInfo.appKey}&subjectId=${settingStore.installInfo.siteId}`;
|
|
||||||
});
|
|
||||||
|
|
||||||
const modalRef = modal.confirm({
|
const modalRef = modal.confirm({
|
||||||
title,
|
title,
|
||||||
async onOk() {
|
async onOk() {
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export default {
|
|||||||
passwordPlaceholder: "Please enter your password",
|
passwordPlaceholder: "Please enter your password",
|
||||||
mobilePlaceholder: "Please enter your mobile number",
|
mobilePlaceholder: "Please enter your mobile number",
|
||||||
loginButton: "Log In",
|
loginButton: "Log In",
|
||||||
|
forgotPassword: "Forgot password?",
|
||||||
forgotAdminPassword: "Forgot admin password?",
|
forgotAdminPassword: "Forgot admin password?",
|
||||||
registerLink: "Register",
|
registerLink: "Register",
|
||||||
|
|
||||||
|
|||||||
@@ -565,6 +565,7 @@ export default {
|
|||||||
dualStackNetworkHelper: "If IPv6 priority is selected, enable IPv6 in docker-compose.yaml",
|
dualStackNetworkHelper: "If IPv6 priority is selected, enable IPv6 in docker-compose.yaml",
|
||||||
enableCommonCnameService: "Enable Public CNAME Service",
|
enableCommonCnameService: "Enable Public CNAME Service",
|
||||||
commonCnameHelper: "Allow use of public CNAME service. If disabled and no <router-link to='/sys/cname/provider'>custom CNAME service</router-link> is set, CNAME proxy certificate application will not work.",
|
commonCnameHelper: "Allow use of public CNAME service. If disabled and no <router-link to='/sys/cname/provider'>custom CNAME service</router-link> is set, CNAME proxy certificate application will not work.",
|
||||||
|
enableCommonSelfServicePasswordRetrieval: "Enable self-service password recovery",
|
||||||
saveButton: "Save",
|
saveButton: "Save",
|
||||||
stopSuccess: "Stopped successfully",
|
stopSuccess: "Stopped successfully",
|
||||||
google: "Google",
|
google: "Google",
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ export default {
|
|||||||
passwordPlaceholder: "请输入密码",
|
passwordPlaceholder: "请输入密码",
|
||||||
mobilePlaceholder: "请输入手机号",
|
mobilePlaceholder: "请输入手机号",
|
||||||
loginButton: "登录",
|
loginButton: "登录",
|
||||||
|
forgotPassword: "忘记密码?",
|
||||||
forgotAdminPassword: "忘记管理员密码?",
|
forgotAdminPassword: "忘记管理员密码?",
|
||||||
registerLink: "注册",
|
registerLink: "注册",
|
||||||
|
|
||||||
|
|||||||
@@ -571,6 +571,7 @@ export default {
|
|||||||
dualStackNetworkHelper: "如果选择IPv6优先,需要在docker-compose.yaml中启用ipv6",
|
dualStackNetworkHelper: "如果选择IPv6优先,需要在docker-compose.yaml中启用ipv6",
|
||||||
enableCommonCnameService: "启用公共CNAME服务",
|
enableCommonCnameService: "启用公共CNAME服务",
|
||||||
commonCnameHelper: "是否可以使用公共CNAME服务,如果禁用,且没有设置<router-link to='/sys/cname/provider'>自定义CNAME服务</router-link>,则无法使用CNAME代理方式申请证书",
|
commonCnameHelper: "是否可以使用公共CNAME服务,如果禁用,且没有设置<router-link to='/sys/cname/provider'>自定义CNAME服务</router-link>,则无法使用CNAME代理方式申请证书",
|
||||||
|
enableCommonSelfServicePasswordRetrieval: "启用自助找回密码",
|
||||||
saveButton: "保存",
|
saveButton: "保存",
|
||||||
stopSuccess: "停止成功",
|
stopSuccess: "停止成功",
|
||||||
google: "Google",
|
google: "Google",
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ function install(app: App, options: any = {}) {
|
|||||||
|
|
||||||
//不能用 !scope.value , 否则switch组件设置为关之后就消失了
|
//不能用 !scope.value , 否则switch组件设置为关之后就消失了
|
||||||
const { value, key, props } = scope;
|
const { value, key, props } = scope;
|
||||||
return !value && key != "_index" && value != false;
|
return !value && key != "_index" && value != false && value != 0;
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
return "-";
|
return "-";
|
||||||
|
|||||||
@@ -24,6 +24,14 @@ export const outsideResource = [
|
|||||||
path: "/register",
|
path: "/register",
|
||||||
component: "/framework/register/index.vue",
|
component: "/framework/register/index.vue",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
meta: {
|
||||||
|
title: "找回密码",
|
||||||
|
},
|
||||||
|
name: "forgotPassword",
|
||||||
|
path: "/forgotPassword",
|
||||||
|
component: "/framework/forgot-password/index.vue",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
...errorPage,
|
...errorPage,
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ export type SysPublicSetting = {
|
|||||||
emailRegisterEnabled?: boolean;
|
emailRegisterEnabled?: boolean;
|
||||||
passwordLoginEnabled?: boolean;
|
passwordLoginEnabled?: boolean;
|
||||||
smsLoginEnabled?: boolean;
|
smsLoginEnabled?: boolean;
|
||||||
|
selfServicePasswordRetrievalEnabled?: boolean;
|
||||||
|
|
||||||
limitUserPipelineCount?: number;
|
limitUserPipelineCount?: number;
|
||||||
managerOtherUserPipeline?: boolean;
|
managerOtherUserPipeline?: boolean;
|
||||||
|
|||||||
@@ -46,6 +46,10 @@ export interface SettingState {
|
|||||||
price3: number;
|
price3: number;
|
||||||
tooltip?: string;
|
tooltip?: string;
|
||||||
};
|
};
|
||||||
|
app?: {
|
||||||
|
minVersion?: string;
|
||||||
|
minVersionTip?: string;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -107,6 +111,10 @@ export const useSettingStore = defineStore({
|
|||||||
price: 399,
|
price: 399,
|
||||||
price3: 899,
|
price3: 899,
|
||||||
},
|
},
|
||||||
|
app: {
|
||||||
|
minVersion: "",
|
||||||
|
minVersionTip: "",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
|
|||||||
@@ -20,6 +20,17 @@ export interface SmsLoginReq {
|
|||||||
randomStr: string;
|
randomStr: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface ForgotPasswordReq {
|
||||||
|
forgotPasswordType: string;
|
||||||
|
input: string;
|
||||||
|
randomStr: string;
|
||||||
|
imgCode: string;
|
||||||
|
validateCode: string;
|
||||||
|
|
||||||
|
password: string;
|
||||||
|
confirmPassword: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface UserInfoRes {
|
export interface UserInfoRes {
|
||||||
id: string | number;
|
id: string | number;
|
||||||
username: string;
|
username: string;
|
||||||
@@ -43,6 +54,13 @@ export async function register(user: RegisterReq): Promise<UserInfoRes> {
|
|||||||
data: user,
|
data: user,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
export async function forgotPassword(data: ForgotPasswordReq): Promise<any> {
|
||||||
|
return await request({
|
||||||
|
url: "/forgotPassword",
|
||||||
|
method: "post",
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
}
|
||||||
export async function logout() {
|
export async function logout() {
|
||||||
return await request({
|
return await request({
|
||||||
url: "/logout",
|
url: "/logout",
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import router from "../../router";
|
|||||||
import { LocalStorage } from "/src/utils/util.storage";
|
import { LocalStorage } from "/src/utils/util.storage";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import * as UserApi from "./api.user";
|
import * as UserApi from "./api.user";
|
||||||
import { RegisterReq, SmsLoginReq } from "./api.user";
|
import { ForgotPasswordReq, RegisterReq, SmsLoginReq } from "./api.user";
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
import { LoginReq, UserInfoRes } from "/@/store/user/api.user";
|
import { LoginReq, UserInfoRes } from "/@/store/user/api.user";
|
||||||
import { message, Modal, notification } from "ant-design-vue";
|
import { message, Modal, notification } from "ant-design-vue";
|
||||||
@@ -67,6 +67,13 @@ export const useUserStore = defineStore({
|
|||||||
});
|
});
|
||||||
await router.replace("/login");
|
await router.replace("/login");
|
||||||
},
|
},
|
||||||
|
async forgotPassword(params: ForgotPasswordReq): Promise<any> {
|
||||||
|
await UserApi.forgotPassword(params);
|
||||||
|
notification.success({
|
||||||
|
message: "密码已重置,请登录",
|
||||||
|
});
|
||||||
|
await router.replace("/login");
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* @description: login
|
* @description: login
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -488,7 +488,7 @@ const idMainContent = ELEMENT_ID_MAIN_CONTENT;
|
|||||||
</template>
|
</template>
|
||||||
</LayoutContent>
|
</LayoutContent>
|
||||||
|
|
||||||
<LayoutFooter v-if="footerEnable" class="hidden md:block" :fixed="footerFixed" :height="footerHeight" :show="!isFullContent" :width="footerWidth" :z-index="zIndex + 2">
|
<LayoutFooter v-if="footerEnable" class="hidden md:block" :fixed="footerFixed" :height="footerHeight" :show="!isFullContent" :width="footerWidth" :z-index="zIndex">
|
||||||
<slot name="footer"></slot>
|
<slot name="footer"></slot>
|
||||||
</LayoutFooter>
|
</LayoutFooter>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
show: false,
|
show: false,
|
||||||
},
|
},
|
||||||
search: {
|
search: {
|
||||||
show: false,
|
show: true,
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
wrapper: {
|
wrapper: {
|
||||||
|
|||||||
@@ -44,6 +44,20 @@ export default function ({ crudExpose, context }: CreateCrudOptionsProps): Creat
|
|||||||
},
|
},
|
||||||
rowHandle: {
|
rowHandle: {
|
||||||
width: 200,
|
width: 200,
|
||||||
|
buttons: {
|
||||||
|
copy: {
|
||||||
|
async click(ctx: any) {
|
||||||
|
const { row, index } = ctx;
|
||||||
|
await crudExpose.openCopy({
|
||||||
|
row: {
|
||||||
|
...row,
|
||||||
|
_copyFrom: row.id,
|
||||||
|
},
|
||||||
|
index: index,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
columns: {
|
columns: {
|
||||||
id: {
|
id: {
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import { useCertUpload } from "/@/views/certd/pipeline/cert-upload/use";
|
|||||||
import GroupSelector from "/@/views/certd/pipeline/group/group-selector.vue";
|
import GroupSelector from "/@/views/certd/pipeline/group/group-selector.vue";
|
||||||
import { useCertViewer } from "/@/views/certd/pipeline/use";
|
import { useCertViewer } from "/@/views/certd/pipeline/use";
|
||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
|
import { GetDetail, GetObj } from "./api";
|
||||||
|
|
||||||
export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -200,7 +201,9 @@ export default function ({ crudExpose, context: { groupDictRef, selectedRowKeys
|
|||||||
const { ui } = useUi();
|
const { ui } = useUi();
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
let row = context[ui.tableColumn.row];
|
let row = context[ui.tableColumn.row];
|
||||||
row = cloneDeep(row);
|
const info = await GetDetail(row.id);
|
||||||
|
row = info.pipeline;
|
||||||
|
row.content = JSON.parse(row.content);
|
||||||
row.title = row.title + "_copy";
|
row.title = row.title + "_copy";
|
||||||
await crudExpose.openCopy({
|
await crudExpose.openCopy({
|
||||||
row: row,
|
row: row,
|
||||||
|
|||||||
@@ -298,7 +298,7 @@ import { FsIcon } from "@fast-crud/fast-crud";
|
|||||||
import { useSettingStore } from "/@/store/settings";
|
import { useSettingStore } from "/@/store/settings";
|
||||||
import { useUserStore } from "/@/store/user";
|
import { useUserStore } from "/@/store/user";
|
||||||
import TaskShortcuts from "./component/shortcut/task-shortcuts.vue";
|
import TaskShortcuts from "./component/shortcut/task-shortcuts.vue";
|
||||||
import { eachSteps, findStep } from "../utils";
|
import { eachSteps, findStep, eachStages } from "../utils";
|
||||||
import { usePluginStore } from "/@/store/plugin";
|
import { usePluginStore } from "/@/store/plugin";
|
||||||
import { getCronNextTimes } from "/@/components/cron-editor/utils";
|
import { getCronNextTimes } from "/@/components/cron-editor/utils";
|
||||||
import { useCertViewer } from "/@/views/certd/pipeline/use";
|
import { useCertViewer } from "/@/views/certd/pipeline/use";
|
||||||
@@ -381,6 +381,9 @@ export default defineComponent({
|
|||||||
//取消历史记录查看模式
|
//取消历史记录查看模式
|
||||||
currentHistory.value = null;
|
currentHistory.value = null;
|
||||||
pipeline.value = cloneDeep(currentPipeline.value);
|
pipeline.value = cloneDeep(currentPipeline.value);
|
||||||
|
eachStages(pipeline.value.stages, item => {
|
||||||
|
item.status = null;
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
currentHistory.value = history;
|
currentHistory.value = history;
|
||||||
|
|||||||
@@ -0,0 +1,179 @@
|
|||||||
|
<template>
|
||||||
|
<div class="main forgot-password-page">
|
||||||
|
<a-form
|
||||||
|
ref="formRef"
|
||||||
|
class="user-layout-forgot-password"
|
||||||
|
name="custom-validation"
|
||||||
|
:model="formState"
|
||||||
|
:rules="rules"
|
||||||
|
v-bind="layout"
|
||||||
|
:label-col="{ span: 6 }"
|
||||||
|
@finish="handleFinish"
|
||||||
|
@finish-failed="handleFinishFailed"
|
||||||
|
>
|
||||||
|
<a-tabs v-model:active-key="forgotPasswordType" :destroyInactiveTabPane="true">
|
||||||
|
<a-tab-pane key="email" tab="邮箱找回">
|
||||||
|
<a-form-item has-feedback name="input" label="邮箱">
|
||||||
|
<a-input v-model:value="formState.input" placeholder="邮箱" size="large" autocomplete="off">
|
||||||
|
<template #prefix>
|
||||||
|
<fs-icon icon="ion:mail-outline"></fs-icon>
|
||||||
|
</template>
|
||||||
|
</a-input>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item has-feedback name="validateCode" label="邮件验证码">
|
||||||
|
<email-code
|
||||||
|
v-model:value="formState.validateCode"
|
||||||
|
:img-code="formState.imgCode"
|
||||||
|
:email="formState.input"
|
||||||
|
:random-str="formState.randomStr"
|
||||||
|
verification-type="forgotPassword"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-tab-pane>
|
||||||
|
<a-tab-pane key="mobile" tab="手机号找回">
|
||||||
|
<a-form-item required has-feedback name="input" label="手机号">
|
||||||
|
<a-input v-model:value="formState.input" placeholder="手机号" autocomplete="off">
|
||||||
|
<template #prefix>
|
||||||
|
<fs-icon icon="ion:phone-portrait-outline"></fs-icon>
|
||||||
|
</template>
|
||||||
|
</a-input>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item name="validateCode" label="手机验证码">
|
||||||
|
<sms-code
|
||||||
|
v-model:value="formState.validateCode"
|
||||||
|
:img-code="formState.imgCode"
|
||||||
|
:mobile="formState.input"
|
||||||
|
:phone-code="formState.phoneCode"
|
||||||
|
:random-str="formState.randomStr"
|
||||||
|
verification-type="forgotPassword"
|
||||||
|
/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-tab-pane>
|
||||||
|
</a-tabs>
|
||||||
|
|
||||||
|
<a-form-item has-feedback name="imgCode" label="图片验证码">
|
||||||
|
<image-code ref="imageCodeRef" v-model:value="formState.imgCode" v-model:random-str="formState.randomStr"></image-code>
|
||||||
|
</a-form-item>
|
||||||
|
|
||||||
|
<a-form-item has-feedback name="password" label="新密码">
|
||||||
|
<a-input-password v-model:value="formState.password" placeholder="新密码" size="large" autocomplete="off">
|
||||||
|
<template #prefix>
|
||||||
|
<fs-icon icon="ion:lock-closed-outline"></fs-icon>
|
||||||
|
</template>
|
||||||
|
</a-input-password>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item has-feedback name="confirmPassword" label="确认密码">
|
||||||
|
<a-input-password v-model:value="formState.confirmPassword" placeholder="确认密码" size="large" autocomplete="off">
|
||||||
|
<template #prefix>
|
||||||
|
<fs-icon icon="ion:lock-closed-outline"></fs-icon>
|
||||||
|
</template>
|
||||||
|
</a-input-password>
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item>
|
||||||
|
<a-button type="primary" size="large" html-type="submit" class="submit-button"> 找回密码</a-button>
|
||||||
|
|
||||||
|
<div class="mt-2">
|
||||||
|
<a href="https://certd.docmirror.cn/guide/use/forgotpasswd/" target="_blank"> 管理员无绑定通信方式或MFA丢失找回 </a>
|
||||||
|
</div>
|
||||||
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { onMounted, reactive, ref, toRaw, watch } from "vue";
|
||||||
|
import ImageCode from "/@/views/framework/login/image-code.vue";
|
||||||
|
import EmailCode from "/@/views/framework/register/email-code.vue";
|
||||||
|
import SmsCode from "/@/views/framework/login/sms-code.vue";
|
||||||
|
import { utils } from "@fast-crud/fast-crud";
|
||||||
|
import { useUserStore } from "/@/store/user";
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: "ForgotPasswordPage",
|
||||||
|
});
|
||||||
|
|
||||||
|
const rules = {
|
||||||
|
input: [{ required: true }],
|
||||||
|
validateCode: [{ required: true }],
|
||||||
|
imgCode: [{ required: true }, { min: 4, max: 4, message: "请输入4位图片验证码" }],
|
||||||
|
password: [
|
||||||
|
{ required: true, trigger: "change", message: "请输入密码" },
|
||||||
|
{ min: 6, message: "至少输入6位密码" },
|
||||||
|
],
|
||||||
|
confirmPassword: [
|
||||||
|
{ required: true, trigger: "change", message: "请确认密码" },
|
||||||
|
{
|
||||||
|
validator: async (rule: any, value: any) => {
|
||||||
|
if (value && value !== formState.password) {
|
||||||
|
throw new Error("两次输入密码不一致");
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
const layout = {
|
||||||
|
labelCol: {
|
||||||
|
span: 0,
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const forgotPasswordType = ref();
|
||||||
|
const userStore = useUserStore();
|
||||||
|
const formRef = ref();
|
||||||
|
const imageCodeRef = ref();
|
||||||
|
|
||||||
|
const formState: any = reactive({
|
||||||
|
input: "",
|
||||||
|
randomStr: "",
|
||||||
|
imgCode: "",
|
||||||
|
phoneCode: "86",
|
||||||
|
validateCode: "",
|
||||||
|
|
||||||
|
password: "",
|
||||||
|
confirmPassword: "",
|
||||||
|
});
|
||||||
|
|
||||||
|
// TODO 这里配置不同的找回方式
|
||||||
|
onMounted(() => {
|
||||||
|
forgotPasswordType.value = "email";
|
||||||
|
});
|
||||||
|
|
||||||
|
// 监控找回类型变化
|
||||||
|
watch(forgotPasswordType, () => {
|
||||||
|
formState.input = "";
|
||||||
|
formState.validateCode = "";
|
||||||
|
imageCodeRef.value.resetImageCode();
|
||||||
|
formRef.value.clearValidate(Object.keys(formState).filter(key => !["password", "confirmPassword"].includes(key)));
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleFinish = async (values: any) => {
|
||||||
|
await userStore.forgotPassword(
|
||||||
|
toRaw({
|
||||||
|
type: forgotPasswordType.value,
|
||||||
|
input: formState.input,
|
||||||
|
randomStr: formState.randomStr,
|
||||||
|
imgCode: formState.imgCode,
|
||||||
|
validateCode: formState.validateCode,
|
||||||
|
password: formState.password,
|
||||||
|
confirmPassword: formState.confirmPassword,
|
||||||
|
}) as any
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleFinishFailed = (errors: any) => {
|
||||||
|
utils.logger.log(errors);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<style scoped lang="less">
|
||||||
|
.forgot-password-page {
|
||||||
|
.user-layout-forgot-password {
|
||||||
|
.submit-button {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -41,7 +41,7 @@ const option = ref({
|
|||||||
center: ["60%", "50%"],
|
center: ["60%", "50%"],
|
||||||
name: "状态",
|
name: "状态",
|
||||||
type: "pie",
|
type: "pie",
|
||||||
radius: "80%",
|
radius: ["30%", "70%"],
|
||||||
avoidLabelOverlap: false,
|
avoidLabelOverlap: false,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
borderRadius: 0,
|
borderRadius: 0,
|
||||||
|
|||||||
@@ -156,32 +156,48 @@ import * as api from "./api";
|
|||||||
import { useI18n } from "/src/locales";
|
import { useI18n } from "/src/locales";
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
import { usePluginStore } from "/@/store/plugin";
|
import { usePluginStore } from "/@/store/plugin";
|
||||||
|
import { notification } from "ant-design-vue";
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: "DashboardUser",
|
name: "DashboardUser",
|
||||||
});
|
});
|
||||||
|
|
||||||
const version = ref(import.meta.env.VITE_APP_VERSION);
|
const version = ref(import.meta.env.VITE_APP_VERSION);
|
||||||
const latestVersion = ref("");
|
const latestVersion = ref("");
|
||||||
const hasNewVersion = computed(() => {
|
|
||||||
if (!latestVersion.value) {
|
function isNewVersion(version: string, latestVersion: string) {
|
||||||
|
if (!latestVersion) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (latestVersion.value === version.value) {
|
if (latestVersion === version) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
//分段比较
|
//分段比较
|
||||||
const current = version.value.split(".");
|
const current = version.split(".");
|
||||||
const latest = latestVersion.value.split(".");
|
const latest = latestVersion.split(".");
|
||||||
for (let i = 0; i < current.length; i++) {
|
for (let i = 0; i < current.length; i++) {
|
||||||
if (parseInt(latest[i]) < parseInt(current[i])) {
|
if (parseInt(latest[i]) > parseInt(current[i])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return true;
|
const hasNewVersion = computed(() => {
|
||||||
|
return isNewVersion(version.value, latestVersion.value);
|
||||||
});
|
});
|
||||||
async function loadLatestVersion() {
|
async function loadLatestVersion() {
|
||||||
latestVersion.value = await api.GetLatestVersion();
|
latestVersion.value = await api.GetLatestVersion();
|
||||||
console.log("latestVersion", latestVersion.value);
|
console.log("latestVersion", latestVersion.value);
|
||||||
|
|
||||||
|
const minVersion = settingsStore.productInfo?.app?.minVersion;
|
||||||
|
if (minVersion) {
|
||||||
|
//
|
||||||
|
if (isNewVersion(version.value, minVersion)) {
|
||||||
|
notification.error({
|
||||||
|
message: settingsStore.productInfo?.app?.minVersionTip ?? "版本过低,为了您的数据安全,请尽快升级",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const settingStore = useSettingStore();
|
const settingStore = useSettingStore();
|
||||||
const siteInfo: Ref<SiteInfo> = computed(() => {
|
const siteInfo: Ref<SiteInfo> = computed(() => {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, useAttrs } from "vue";
|
import { ref, useAttrs, defineExpose } from "vue";
|
||||||
import { nanoid } from "nanoid";
|
import { nanoid } from "nanoid";
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
@@ -32,5 +32,10 @@ function resetImageCode() {
|
|||||||
imageCodeUrl.value = url + "?randomStr=" + randomStr;
|
imageCodeUrl.value = url + "?randomStr=" + randomStr;
|
||||||
emit("update:randomStr", randomStr);
|
emit("update:randomStr", randomStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
resetImageCode,
|
||||||
|
})
|
||||||
|
|
||||||
resetImageCode();
|
resetImageCode();
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -47,10 +47,10 @@
|
|||||||
{{ t("authentication.loginButton") }}
|
{{ t("authentication.loginButton") }}
|
||||||
</a-button>
|
</a-button>
|
||||||
|
|
||||||
<div v-if="!settingStore.isComm" class="mt-2">
|
<div v-if="!!settingStore.sysPublic.selfServicePasswordRetrievalEnabled" class="mt-2">
|
||||||
<a href="https://certd.docmirror.cn/guide/use/forgotpasswd/" target="_blank">
|
<router-link :to="{ name: 'forgotPassword' }">
|
||||||
{{ t("authentication.forgotAdminPassword") }}
|
{{ t("authentication.forgotPassword") }}
|
||||||
</a>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ const props = defineProps<{
|
|||||||
phoneCode?: string;
|
phoneCode?: string;
|
||||||
imgCode?: string;
|
imgCode?: string;
|
||||||
randomStr?: string;
|
randomStr?: string;
|
||||||
|
verificationType?: string;
|
||||||
}>();
|
}>();
|
||||||
const emit = defineEmits(["update:value", "change"]);
|
const emit = defineEmits(["update:value", "change"]);
|
||||||
|
|
||||||
@@ -58,6 +59,7 @@ async function sendSmsCode() {
|
|||||||
mobile: props.mobile,
|
mobile: props.mobile,
|
||||||
imgCode: props.imgCode,
|
imgCode: props.imgCode,
|
||||||
randomStr: props.randomStr,
|
randomStr: props.randomStr,
|
||||||
|
verificationType: props.verificationType,
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ const props = defineProps<{
|
|||||||
email?: string;
|
email?: string;
|
||||||
imgCode?: string;
|
imgCode?: string;
|
||||||
randomStr?: string;
|
randomStr?: string;
|
||||||
|
verificationType?: string;
|
||||||
}>();
|
}>();
|
||||||
const emit = defineEmits(["update:value", "change"]);
|
const emit = defineEmits(["update:value", "change"]);
|
||||||
|
|
||||||
@@ -53,6 +54,7 @@ async function sendSmsCode() {
|
|||||||
email: props.email,
|
email: props.email,
|
||||||
imgCode: props.imgCode,
|
imgCode: props.imgCode,
|
||||||
randomStr: props.randomStr,
|
randomStr: props.randomStr,
|
||||||
|
verificationType: props.verificationType,
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
|
|||||||
@@ -32,6 +32,13 @@
|
|||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="email" tab="邮箱注册" :disabled="!settingsStore.sysPublic.emailRegisterEnabled">
|
<a-tab-pane key="email" tab="邮箱注册" :disabled="!settingsStore.sysPublic.emailRegisterEnabled">
|
||||||
<template v-if="registerType === 'email'">
|
<template v-if="registerType === 'email'">
|
||||||
|
<a-form-item required has-feedback name="username" label="用户名" :rules="rules.username">
|
||||||
|
<a-input v-model:value="formState.username" placeholder="用户名" size="large" autocomplete="off">
|
||||||
|
<template #prefix>
|
||||||
|
<fs-icon icon="ion:person-outline"></fs-icon>
|
||||||
|
</template>
|
||||||
|
</a-input>
|
||||||
|
</a-form-item>
|
||||||
<a-form-item required has-feedback name="email" label="邮箱">
|
<a-form-item required has-feedback name="email" label="邮箱">
|
||||||
<a-input v-model:value="formState.email" placeholder="邮箱" size="large" autocomplete="off">
|
<a-input v-model:value="formState.email" placeholder="邮箱" size="large" autocomplete="off">
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
<a-form-item :label="t('certd.enableSelfRegistration')" :name="['public', 'registerEnabled']">
|
<a-form-item :label="t('certd.enableSelfRegistration')" :name="['public', 'registerEnabled']">
|
||||||
<a-switch v-model:checked="formState.public.registerEnabled" />
|
<a-switch v-model:checked="formState.public.registerEnabled" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<a-form-item :label="t('certd.enableCommonSelfServicePasswordRetrieval')" :name="['public', 'selfServicePasswordRetrievalEnabled']">
|
||||||
|
<a-switch v-model:checked="formState.public.selfServicePasswordRetrievalEnabled" />
|
||||||
|
</a-form-item>
|
||||||
<a-form-item :label="t('certd.enableUserValidityPeriod')" :name="['public', 'userValidTimeEnabled']">
|
<a-form-item :label="t('certd.enableUserValidityPeriod')" :name="['public', 'userValidTimeEnabled']">
|
||||||
<div class="flex-o">
|
<div class="flex-o">
|
||||||
<a-switch v-model:checked="formState.public.userValidTimeEnabled" :disabled="!settingsStore.isPlus" />
|
<a-switch v-model:checked="formState.public.userValidTimeEnabled" :disabled="!settingsStore.isPlus" />
|
||||||
|
|||||||
@@ -3,6 +3,58 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [1.36.16](https://github.com/certd/certd/compare/v1.36.15...v1.36.16) (2025-08-16)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 百度云支持上传到证书托管,支持部署到负载均衡 ([798a48a](https://github.com/certd/certd/commit/798a48aa9686fd5d11cfffb6cd93eadfc40aacb3))
|
||||||
|
* 验证码可重试次数设置为3次 ([1bdceee](https://github.com/certd/certd/commit/1bdceeecf4b5daecdd621a05a2596b6eb45ce8ea))
|
||||||
|
* 增加找回密码的验证码可重试次数 [@nicheng-he](https://github.com/nicheng-he) ([#496](https://github.com/certd/certd/issues/496)) ([fe03f99](https://github.com/certd/certd/commit/fe03f9942b5662fb90cad86da10782f5dc3603f5))
|
||||||
|
* 支持阿里云API网关 ([9e1e4ee](https://github.com/certd/certd/commit/9e1e4eeec2859759ca5b07834c9d24cf88a6ad33))
|
||||||
|
* 支持部署到金山云CDN ([dfa74a6](https://github.com/certd/certd/commit/dfa74a69f7cbb9009d3e20c7eecfa1b905a00cf0))
|
||||||
|
* 支持更新金山云cdn证书 ([462e22a](https://github.com/certd/certd/commit/462e22a3b0a94887462fe6aa68e4671a365e0737))
|
||||||
|
* 支持apisix证书部署 ([9b63fb4](https://github.com/certd/certd/commit/9b63fb4ee2c6b56139160c5bf63482dab0869c2b))
|
||||||
|
|
||||||
|
## [1.36.15](https://github.com/certd/certd/compare/v1.36.14...v1.36.15) (2025-08-07)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 修复 https://cas.undefined.aliyuncs.com 的bug ([60e6aa9](https://github.com/certd/certd/commit/60e6aa9b54a761a47e39acee4a1ff947a745be27))
|
||||||
|
* 修复阿里云clb api接口没有使用region的问题 ([0770f17](https://github.com/certd/certd/commit/0770f174a14313e28d08113e69829ef6cc02d719))
|
||||||
|
* 修复站点监控使用自定义dns解析域名报错的bug ([eb8cd53](https://github.com/certd/certd/commit/eb8cd53de27991321e36dd14e5ce95f42b51351f))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到阿里云支持选择bucket和域名 ([013b9c4](https://github.com/certd/certd/commit/013b9c4c7c2adf485d086123ccea448719577fd4))
|
||||||
|
* 清理数据库备份的临时目录 ([fd95549](https://github.com/certd/certd/commit/fd95549de9a5d8cec09772ee2630bb7521e15e1f))
|
||||||
|
* 添加免费通知,OneBot V11协议通知支持 ([#491](https://github.com/certd/certd/issues/491)) [@ayakasuki](https://github.com/ayakasuki) ([be053d4](https://github.com/certd/certd/commit/be053d47e41084f817882400882b64143d036d1a))
|
||||||
|
* 支持webhook部署证书 ([cbe0b1c](https://github.com/certd/certd/commit/cbe0b1c5a6538f232e9a63f1693d20d5acf0a306))
|
||||||
|
* 注册时支持填写用户名 ([fdcfcc7](https://github.com/certd/certd/commit/fdcfcc77a0db87954e0b026635d3ccdd9bc6cee8))
|
||||||
|
|
||||||
|
## [1.36.14](https://github.com/certd/certd/compare/v1.36.13...v1.36.14) (2025-07-28)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 授权管理支持模糊查询 ([866eb62](https://github.com/certd/certd/commit/866eb6241baa7b21f6eddc649966324c188236c6))
|
||||||
|
* 新增找回密码功能 [@nicheng-he](https://github.com/nicheng-he) ([81ac240](https://github.com/certd/certd/commit/81ac240ac84db0af2f56b6352e227ecb49f38377))
|
||||||
|
* 运行主机脚本插件支持选择运行策略 ([86b3df1](https://github.com/certd/certd/commit/86b3df194126476e1f58e0952a77e986f62eecce))
|
||||||
|
|
||||||
|
## [1.36.13](https://github.com/certd/certd/compare/v1.36.12...v1.36.13) (2025-07-23)
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 阿里云部分插件优化 [@nicheng-he](https://github.com/nicheng-he) ([e3738f6](https://github.com/certd/certd/commit/e3738f6422270d75ec414c15a343248cc4cad6e1))
|
||||||
|
|
||||||
|
## [1.36.12](https://github.com/certd/certd/compare/v1.36.11...v1.36.12) (2025-07-22)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* 上传到阿里云cas,证书前缀无效的bug ([b382351](https://github.com/certd/certd/commit/b382351c7b91ec10e1f61d94bec5aad075207ec8))
|
||||||
|
|
||||||
|
### Performance Improvements
|
||||||
|
|
||||||
|
* 部署到k8s,tke,ack忽悠证书校验 ([ab84835](https://github.com/certd/certd/commit/ab848353621869464a2c9a45fdb5e28d998b8a58))
|
||||||
|
|
||||||
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
## [1.36.11](https://github.com/certd/certd/compare/v1.36.10...v1.36.11) (2025-07-22)
|
||||||
|
|
||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@certd/ui-server",
|
"name": "@certd/ui-server",
|
||||||
"version": "1.36.11",
|
"version": "1.36.16",
|
||||||
"description": "fast-server base midway",
|
"description": "fast-server base midway",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -42,20 +42,20 @@
|
|||||||
"@aws-sdk/client-cloudfront": "^3.699.0",
|
"@aws-sdk/client-cloudfront": "^3.699.0",
|
||||||
"@aws-sdk/client-iam": "^3.699.0",
|
"@aws-sdk/client-iam": "^3.699.0",
|
||||||
"@aws-sdk/client-s3": "^3.705.0",
|
"@aws-sdk/client-s3": "^3.705.0",
|
||||||
"@certd/acme-client": "^1.36.11",
|
"@certd/acme-client": "^1.36.16",
|
||||||
"@certd/basic": "^1.36.11",
|
"@certd/basic": "^1.36.16",
|
||||||
"@certd/commercial-core": "^1.36.11",
|
"@certd/commercial-core": "^1.36.16",
|
||||||
"@certd/cv4pve-api-javascript": "^8.4.1",
|
"@certd/cv4pve-api-javascript": "^8.4.1",
|
||||||
"@certd/jdcloud": "^1.36.11",
|
"@certd/jdcloud": "^1.36.16",
|
||||||
"@certd/lib-huawei": "^1.36.11",
|
"@certd/lib-huawei": "^1.36.16",
|
||||||
"@certd/lib-k8s": "^1.36.11",
|
"@certd/lib-k8s": "^1.36.16",
|
||||||
"@certd/lib-server": "^1.36.11",
|
"@certd/lib-server": "^1.36.16",
|
||||||
"@certd/midway-flyway-js": "^1.36.11",
|
"@certd/midway-flyway-js": "^1.36.16",
|
||||||
"@certd/pipeline": "^1.36.11",
|
"@certd/pipeline": "^1.36.16",
|
||||||
"@certd/plugin-cert": "^1.36.11",
|
"@certd/plugin-cert": "^1.36.16",
|
||||||
"@certd/plugin-lib": "^1.36.11",
|
"@certd/plugin-lib": "^1.36.16",
|
||||||
"@certd/plugin-plus": "^1.36.11",
|
"@certd/plugin-plus": "^1.36.16",
|
||||||
"@certd/plus-core": "^1.36.11",
|
"@certd/plus-core": "^1.36.16",
|
||||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
|
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
|
||||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
|
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
|
||||||
"@koa/cors": "^5.0.0",
|
"@koa/cors": "^5.0.0",
|
||||||
@@ -91,6 +91,7 @@
|
|||||||
"jsonwebtoken": "^9.0.0",
|
"jsonwebtoken": "^9.0.0",
|
||||||
"jszip": "^3.10.1",
|
"jszip": "^3.10.1",
|
||||||
"koa-send": "^5.0.1",
|
"koa-send": "^5.0.1",
|
||||||
|
"ksyun-sdk-node": "^1.2.4",
|
||||||
"kubernetes-client": "^9.0.0",
|
"kubernetes-client": "^9.0.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"log4js": "^6.7.1",
|
"log4js": "^6.7.1",
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Controller, Get, Inject, Provide } from '@midwayjs/core';
|
import {Body, Controller, Get, Inject, Post, Provide} from '@midwayjs/core';
|
||||||
import { BaseController, Constants, FileService, SysSettingsService, SysSiteInfo } from '@certd/lib-server';
|
import { BaseController, Constants, FileService, SysSettingsService, SysSiteInfo } from '@certd/lib-server';
|
||||||
import { http, logger } from '@certd/basic';
|
import { http, logger } from '@certd/basic';
|
||||||
import { isComm } from '@certd/plus-core';
|
import { isComm } from '@certd/plus-core';
|
||||||
@@ -46,4 +46,10 @@ export class AppController extends BaseController {
|
|||||||
this.ctx.response.redirect(redirect);
|
this.ctx.response.redirect(redirect);
|
||||||
this.ctx.response.set('Cache-Control', 'public,max-age=25920');
|
this.ctx.response.set('Cache-Control', 'public,max-age=25920');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Post('/webhook', { summary: Constants.per.guest })
|
||||||
|
public async webhook( @Body() body: any) {
|
||||||
|
logger.info('webhook', JSON.stringify(body))
|
||||||
|
return this.ok("success")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ export class SmsCodeReq {
|
|||||||
|
|
||||||
@Rule(RuleType.string().required().max(4))
|
@Rule(RuleType.string().required().max(4))
|
||||||
imgCode: string;
|
imgCode: string;
|
||||||
|
|
||||||
|
@Rule(RuleType.string())
|
||||||
|
verificationType: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export class EmailCodeReq {
|
export class EmailCodeReq {
|
||||||
@@ -27,8 +30,14 @@ export class EmailCodeReq {
|
|||||||
|
|
||||||
@Rule(RuleType.string().required().max(4))
|
@Rule(RuleType.string().required().max(4))
|
||||||
imgCode: string;
|
imgCode: string;
|
||||||
|
|
||||||
|
@Rule(RuleType.string())
|
||||||
|
verificationType: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 找回密码的验证码有效期
|
||||||
|
const FORGOT_PASSWORD_CODE_DURATION = 3
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
@Provide()
|
@Provide()
|
||||||
@@ -45,8 +54,18 @@ export class BasicController extends BaseController {
|
|||||||
@Body(ALL)
|
@Body(ALL)
|
||||||
body: SmsCodeReq
|
body: SmsCodeReq
|
||||||
) {
|
) {
|
||||||
|
const opts = {
|
||||||
|
verificationType: body.verificationType,
|
||||||
|
verificationCodeLength: undefined,
|
||||||
|
duration: undefined,
|
||||||
|
};
|
||||||
|
if(body?.verificationType === 'forgotPassword') {
|
||||||
|
opts.duration = FORGOT_PASSWORD_CODE_DURATION;
|
||||||
|
// opts.verificationCodeLength = 6; //部分厂商这里会设置参数长度这里就不改了
|
||||||
|
}
|
||||||
|
|
||||||
await this.codeService.checkCaptcha(body.randomStr, body.imgCode);
|
await this.codeService.checkCaptcha(body.randomStr, body.imgCode);
|
||||||
await this.codeService.sendSmsCode(body.phoneCode, body.mobile, body.randomStr);
|
await this.codeService.sendSmsCode(body.phoneCode, body.mobile, body.randomStr, opts);
|
||||||
return this.ok(null);
|
return this.ok(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -55,8 +74,22 @@ export class BasicController extends BaseController {
|
|||||||
@Body(ALL)
|
@Body(ALL)
|
||||||
body: EmailCodeReq
|
body: EmailCodeReq
|
||||||
) {
|
) {
|
||||||
|
const opts = {
|
||||||
|
verificationType: body.verificationType,
|
||||||
|
verificationCodeLength: undefined,
|
||||||
|
title: undefined,
|
||||||
|
content: undefined,
|
||||||
|
duration: undefined,
|
||||||
|
};
|
||||||
|
if(body?.verificationType === 'forgotPassword') {
|
||||||
|
opts.title = '找回密码';
|
||||||
|
opts.content = '验证码:${code}。您正在找回密码,请输入验证码并完成操作。如非本人操作请忽略';
|
||||||
|
opts.duration = FORGOT_PASSWORD_CODE_DURATION;
|
||||||
|
opts.verificationCodeLength = 6;
|
||||||
|
}
|
||||||
|
|
||||||
await this.codeService.checkCaptcha(body.randomStr, body.imgCode);
|
await this.codeService.checkCaptcha(body.randomStr, body.imgCode);
|
||||||
await this.codeService.sendEmailCode(body.email, body.randomStr);
|
await this.codeService.sendEmailCode(body.email, body.randomStr, opts);
|
||||||
// 设置缓存内容
|
// 设置缓存内容
|
||||||
return this.ok(null);
|
return this.ok(null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,60 @@
|
|||||||
|
import { ALL, Body, Controller, Inject, Post, Provide } from '@midwayjs/core';
|
||||||
|
import { BaseController, CommonException, Constants, SysSettingsService } from "@certd/lib-server";
|
||||||
|
import { CodeService } from '../../../modules/basic/service/code-service.js';
|
||||||
|
import { UserService } from '../../../modules/sys/authority/service/user-service.js';
|
||||||
|
import { LoginService } from "../../../modules/login/service/login-service.js";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*/
|
||||||
|
@Provide()
|
||||||
|
@Controller('/api')
|
||||||
|
export class LoginController extends BaseController {
|
||||||
|
@Inject()
|
||||||
|
loginService: LoginService;
|
||||||
|
@Inject()
|
||||||
|
userService: UserService;
|
||||||
|
@Inject()
|
||||||
|
codeService: CodeService;
|
||||||
|
|
||||||
|
@Inject()
|
||||||
|
sysSettingsService: SysSettingsService;
|
||||||
|
|
||||||
|
@Post('/forgotPassword', { summary: Constants.per.guest })
|
||||||
|
public async forgotPassword(
|
||||||
|
@Body(ALL)
|
||||||
|
body: any,
|
||||||
|
) {
|
||||||
|
const sysSettings = await this.sysSettingsService.getPublicSettings();
|
||||||
|
if(!sysSettings.selfServicePasswordRetrievalEnabled) {
|
||||||
|
throw new CommonException('暂未开启自助找回');
|
||||||
|
}
|
||||||
|
// 找回密码的验证码允许错误次数
|
||||||
|
const errorNum = 5;
|
||||||
|
|
||||||
|
if(body.type === 'email') {
|
||||||
|
this.codeService.checkEmailCode({
|
||||||
|
verificationType: 'forgotPassword',
|
||||||
|
email: body.input,
|
||||||
|
randomStr: body.randomStr,
|
||||||
|
validateCode: body.validateCode,
|
||||||
|
errorNum,
|
||||||
|
throwError: true,
|
||||||
|
});
|
||||||
|
} else if(body.type === 'mobile') {
|
||||||
|
await this.codeService.checkSmsCode({
|
||||||
|
verificationType: 'forgotPassword',
|
||||||
|
mobile: body.input,
|
||||||
|
randomStr: body.randomStr,
|
||||||
|
phoneCode: body.phoneCode,
|
||||||
|
smsCode: body.validateCode,
|
||||||
|
errorNum,
|
||||||
|
throwError: true,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
throw new CommonException('暂不支持的找回类型,请联系管理员找回');
|
||||||
|
}
|
||||||
|
const username = await this.userService.forgotPassword(body);
|
||||||
|
username && this.loginService.clearCacheOnSuccess(username)
|
||||||
|
return this.ok();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -40,10 +40,18 @@ export class RegisterController extends BaseController {
|
|||||||
throw new Error('当前站点已禁止自助注册功能');
|
throw new Error('当前站点已禁止自助注册功能');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (body.username && ["admin","certd"].includes(body.username) ) {
|
||||||
|
throw new Error('用户名不能为保留字');
|
||||||
|
}
|
||||||
|
|
||||||
if (body.type === 'username') {
|
if (body.type === 'username') {
|
||||||
if (sysPublicSettings.usernameRegisterEnabled === false) {
|
if (sysPublicSettings.usernameRegisterEnabled === false) {
|
||||||
throw new Error('当前站点已禁止用户名注册功能');
|
throw new Error('当前站点已禁止用户名注册功能');
|
||||||
}
|
}
|
||||||
|
if (!body.username) {
|
||||||
|
throw new Error('用户名不能为空');
|
||||||
|
}
|
||||||
|
|
||||||
await this.codeService.checkCaptcha(body.randomStr, body.imgCode);
|
await this.codeService.checkCaptcha(body.randomStr, body.imgCode);
|
||||||
const newUser = await this.userService.register(body.type, {
|
const newUser = await this.userService.register(body.type, {
|
||||||
username: body.username,
|
username: body.username,
|
||||||
@@ -64,6 +72,7 @@ export class RegisterController extends BaseController {
|
|||||||
throwError: true,
|
throwError: true,
|
||||||
});
|
});
|
||||||
const newUser = await this.userService.register(body.type, {
|
const newUser = await this.userService.register(body.type, {
|
||||||
|
username: body.username,
|
||||||
phoneCode: body.phoneCode,
|
phoneCode: body.phoneCode,
|
||||||
mobile: body.mobile,
|
mobile: body.mobile,
|
||||||
password: body.password,
|
password: body.password,
|
||||||
@@ -81,6 +90,7 @@ export class RegisterController extends BaseController {
|
|||||||
throwError: true,
|
throwError: true,
|
||||||
});
|
});
|
||||||
const newUser = await this.userService.register(body.type, {
|
const newUser = await this.userService.register(body.type, {
|
||||||
|
username: body.username,
|
||||||
email: body.email,
|
email: body.email,
|
||||||
password: body.password,
|
password: body.password,
|
||||||
} as any);
|
} as any);
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user