Compare commits

...

86 Commits

Author SHA1 Message Date
xiaojunnuo
d4385ad8a5 v1.28.4 2024-12-13 00:17:10 +08:00
xiaojunnuo
da07ce419f build: prepare to build 2024-12-13 00:08:18 +08:00
xiaojunnuo
714e0206c4 build: prepare to build 2024-12-13 00:07:32 +08:00
xiaojunnuo
79f7ec4672 perf: 群晖支持6.x 2024-12-12 17:55:54 +08:00
xiaojunnuo
0f5c69040b fix: 修复证书成功通知发送失败的bug 2024-12-12 17:28:33 +08:00
xiaojunnuo
c9d1c45d97 docs: 证书成功同志 2024-12-12 16:49:40 +08:00
xiaojunnuo
ea8fdb120c docs: 证书说明 2024-12-12 16:45:40 +08:00
xiaojunnuo
f6fa830ffe docs: 2024-12-12 12:37:38 +08:00
xiaojunnuo
992e50c014 docs: 2024-12-12 12:30:26 +08:00
xiaojunnuo
bd705d91ba build: publish 2024-12-12 12:08:12 +08:00
xiaojunnuo
2656394195 build: trigger build image 2024-12-12 12:07:54 +08:00
xiaojunnuo
c8df9e698c v1.28.3 2024-12-12 12:06:46 +08:00
xiaojunnuo
19b78a1d2f build: prepare to build 2024-12-12 12:05:16 +08:00
xiaojunnuo
8039e8baf8 perf: 支持腾讯虚拟机开关机(@wujingke) 2024-12-12 11:50:01 +08:00
xiaojunnuo
9c5142c73c chore: 2024-12-12 11:42:46 +08:00
xiaojunnuo
8e3dcdde17 chore: tke挪出来 2024-12-11 22:17:11 +08:00
xiaojunnuo
34023adafb chore: 2024-12-11 17:40:34 +08:00
xiaojunnuo
79914e8d08 chore: 2024-12-11 15:06:02 +08:00
xiaojunnuo
454fbda581 perf: 点击版本红点按钮,跳转到升级帮助页面 2024-12-11 13:59:00 +08:00
xiaojunnuo
2c32703e6b chore: 2024-12-11 12:01:06 +08:00
xiaojunnuo
b561535626 Merge branch 'v2' into v2-dev 2024-12-11 11:48:34 +08:00
xiaojunnuo
1fc684d995 chore: 2024-12-11 11:48:05 +08:00
greper
7595d9fdfd pref: 腾讯云实例开机插件( @wujingke )
pr:  #265
2024-12-11 11:44:53 +08:00
w
3bf7732a21 腾讯云实例开机插件 2024-12-11 11:40:11 +08:00
xiaojunnuo
71b5aaf8ab chore: 2024-12-11 11:38:28 +08:00
xiaojunnuo
e1e5347476 chore: 2024-12-11 11:37:52 +08:00
xiaojunnuo
cdcdb6a2d9 chore: 2024-12-11 11:36:00 +08:00
xiaojunnuo
ec79104ad2 chore: 2024-12-11 11:33:33 +08:00
xiaojunnuo
ff083ce684 perf: 通知标题优化 2024-12-11 11:30:32 +08:00
xiaojunnuo
0f051e322e docs: upgrade 2024-12-11 10:25:16 +08:00
xiaojunnuo
657a2ae032 fix: 修复没有配置eab时,报order无法读取的问题 2024-12-11 09:30:21 +08:00
xiaojunnuo
0db3570026 chore: 2024-12-10 18:30:32 +08:00
xiaojunnuo
0ae39f160a perf: 支持aws cloudfront 2024-12-10 18:28:48 +08:00
xiaojunnuo
b45977c29a fix: 修复授权被删除后,无法清空的bug 2024-12-10 17:22:43 +08:00
xiaojunnuo
b7f5740c57 fix: mysql下access.setting字段改成text 2024-12-10 00:19:35 +08:00
xiaojunnuo
21e23369d3 chore: 2024-12-09 23:08:40 +08:00
xiaojunnuo
fca598991a chore: 2024-12-09 22:56:18 +08:00
xiaojunnuo
aa5b909486 build: publish 2024-12-09 22:53:08 +08:00
xiaojunnuo
0a888cf51a build: trigger build image 2024-12-09 22:52:44 +08:00
xiaojunnuo
e5c164065c v1.28.2 2024-12-09 22:45:02 +08:00
xiaojunnuo
8bc241ca14 build: prepare to build 2024-12-09 22:42:55 +08:00
xiaojunnuo
15beb79631 chore: 2024-12-09 22:40:17 +08:00
xiaojunnuo
fef1305e41 chore: 2024-12-09 21:44:37 +08:00
xiaojunnuo
498cf34999 fix: 修复创建流水线通知设置无效的bug 2024-12-09 18:04:45 +08:00
xiaojunnuo
7cde1fdc4a perf: 支持mysql 2024-12-09 17:47:01 +08:00
xiaojunnuo
228fdf0a0d perf: 优化数据表索引 2024-12-09 15:59:14 +08:00
xiaojunnuo
fdb5ea0ff4 Merge remote-tracking branch 'origin/v2-dev' into v2-dev 2024-12-09 09:34:12 +08:00
xiaojunnuo
a0e838d1ee fix: 修复流水线分组可以被所有人看见的bug 2024-12-09 02:24:30 +08:00
xiaojunnuo
30ddf5ec41 build: publish 2024-12-09 01:56:13 +08:00
xiaojunnuo
cfd3b7b3ae build: trigger build image 2024-12-09 01:55:54 +08:00
xiaojunnuo
a6cd532035 v1.28.1 2024-12-09 01:53:42 +08:00
xiaojunnuo
b1db952fcb build: prepare to build 2024-12-09 01:50:40 +08:00
xiaojunnuo
51e8bab352 build: prepare to build 2024-12-09 01:49:03 +08:00
xiaojunnuo
618ec93786 perf: 支持邀请奖励 2024-12-09 01:40:55 +08:00
xiaojunnuo
a673f9c8ca chore: 2024-12-09 01:39:11 +08:00
xiaojunnuo
e8c9c2a47d perf: cname value优化 2024-12-09 01:31:16 +08:00
xiaojunnuo
aafa5d5f90 chore: 1 2024-12-09 01:25:23 +08:00
xiaojunnuo
8b9c47daf1 perf: favicon支持自定义 2024-12-09 00:12:15 +08:00
xiaojunnuo
4042577c0b chore: 2024-12-08 02:30:25 +08:00
xiaojunnuo
6c9f9940e3 chore: 2024-12-07 16:16:50 +08:00
xiaojunnuo
8f7b3f29ce chore: 2024-12-07 16:13:00 +08:00
xiaojunnuo
6bca7333c9 Merge remote-tracking branch 'origin/v2-dev' into v2-dev 2024-12-07 15:20:08 +08:00
xiaojunnuo
3dfeeec899 fix: 修复cname排查方法 nslookup命令显示黑色的问题 2024-12-07 15:19:28 +08:00
xiaojunnuo
138dc286f6 chore: 删除cloudflare cdn插件 2024-12-05 13:34:21 +08:00
xiaojunnuo
07cee2aadf chore: 2024-12-05 12:10:31 +08:00
xiaojunnuo
1b267813c9 Merge remote-tracking branch 'origin/v2-dev' into v2-dev 2024-12-05 11:10:39 +08:00
xiaojunnuo
96b5981f8c chore: 2024-12-05 11:09:14 +08:00
xiaojunnuo
a2fd9559c5 chore: 2024-12-04 23:05:12 +08:00
xiaojunnuo
3f06419d47 chore: 2024-12-04 22:27:48 +08:00
xiaojunnuo
2aefca3813 chore: 2024-12-04 12:36:17 +08:00
xiaojunnuo
6aa487269c perf: 新增server酱3通知 2024-12-03 10:32:47 +08:00
xiaojunnuo
393ea27fa4 chore: 2024-12-03 00:55:37 +08:00
xiaojunnuo
febe87508c chore: 2024-12-03 00:43:43 +08:00
xiaojunnuo
30db27980c Merge remote-tracking branch 'origin/v2-dev' into v2-dev 2024-12-03 00:35:51 +08:00
xiaojunnuo
4e768ec50f chore: 2024-12-03 00:35:34 +08:00
xiaojunnuo
4467e09426 chore: 2024-12-03 00:07:30 +08:00
xiaojunnuo
66b95d52fd Merge remote-tracking branch 'origin/v2-dev' into v2-dev 2024-12-02 23:21:43 +08:00
xiaojunnuo
1398417829 chore: 2024-12-02 23:17:40 +08:00
xiaojunnuo
58dd5e2750 chore: 2024-12-02 18:15:27 +08:00
xiaojunnuo
70210f567a chore: 2024-12-02 16:43:09 +08:00
xiaojunnuo
49e7dc56e1 perf: 新增七牛云插件分组 2024-12-02 16:35:31 +08:00
xiaojunnuo
72cc586f88 chore: 2024-12-02 15:19:13 +08:00
xiaojunnuo
94fa77fcd2 perf: 支持易发云短信 2024-12-02 15:11:29 +08:00
xiaojunnuo
2c0cbdd29e perf: 通知选择器优化 2024-12-02 14:06:55 +08:00
xiaojunnuo
68a503796c build: publish 2024-12-01 03:25:17 +08:00
xiaojunnuo
48cf28dd7f build: trigger build image 2024-12-01 03:24:59 +08:00
175 changed files with 2919 additions and 641 deletions

View File

@@ -3,6 +3,59 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
### Bug Fixes
* 修复证书成功通知发送失败的bug ([0f5c690](https://github.com/certd/certd/commit/0f5c69040ba77340c909813220a26bc7ddada3ea))
### Performance Improvements
* 群晖支持6.x ([79f7ec4](https://github.com/certd/certd/commit/79f7ec4672f4fd5744cc45e4a6f104da943f4026))
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
### Bug Fixes
* 修复没有配置eab时报order无法读取的问题 ([657a2ae](https://github.com/certd/certd/commit/657a2ae032e6f61ac27fbdd26c7bf169c041219e))
* 修复授权被删除后无法清空的bug ([b45977c](https://github.com/certd/certd/commit/b45977c29a29084c11e496bec3415eaaebafdd74))
* mysql下access.setting字段改成text ([b7f5740](https://github.com/certd/certd/commit/b7f5740c57743914f754f3b4fdd94b59a2e8338c))
### Performance Improvements
* 点击版本红点按钮,跳转到升级帮助页面 ([454fbda](https://github.com/certd/certd/commit/454fbda581bbe22abca5b91e5086ea9d9d58a020))
* 通知标题优化 ([ff083ce](https://github.com/certd/certd/commit/ff083ce6848a8bee3c8248e4b881086ae1517c28))
* 支持腾讯虚拟机开关机([@wujingke](https://github.com/wujingke)) ([8039e8b](https://github.com/certd/certd/commit/8039e8baf83c82d03f1a6198cf61c372026b962b))
* 支持aws cloudfront ([0ae39f1](https://github.com/certd/certd/commit/0ae39f160a7c6b6696b3bf513d68aa28905810ad))
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
### Bug Fixes
* 修复创建流水线通知设置无效的bug ([498cf34](https://github.com/certd/certd/commit/498cf34999fddfa24ce088e2e678469fa669abb8))
* 修复流水线分组可以被所有人看见的bug ([a0e838d](https://github.com/certd/certd/commit/a0e838d1eec918e5dc92fe95dc72ac14facb930e))
### Performance Improvements
* 优化数据表索引 ([228fdf0](https://github.com/certd/certd/commit/228fdf0a0d28013f5dd156a97bbde80537e8e97e))
* 支持mysql ([7cde1fd](https://github.com/certd/certd/commit/7cde1fdc4a9ed851900d231a5460c8dbfbcd148e))
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
### Bug Fixes
* 修复cname排查方法 nslookup命令显示黑色的问题 ([3dfeeec](https://github.com/certd/certd/commit/3dfeeec899d7d0d7292695ce410f78548e076c03))
### Performance Improvements
* 通知选择器优化 ([2c0cbdd](https://github.com/certd/certd/commit/2c0cbdd29ecb74cc939b2ae7ee86b8d40f70ba31))
* 新增七牛云插件分组 ([49e7dc5](https://github.com/certd/certd/commit/49e7dc56e1a95fbdea3e30cdeb945b48415b69e3))
* 新增server酱3通知 ([6aa4872](https://github.com/certd/certd/commit/6aa487269c9f6862e188b37a0d6c73f79c937d94))
* 支持邀请奖励 ([618ec93](https://github.com/certd/certd/commit/618ec937866b24ebcf8164db43acb1ed66a5b329))
* 支持易发云短信 ([94fa77f](https://github.com/certd/certd/commit/94fa77fcd2b9bea294fb05736c0d8cdc81f56103))
* cname value优化 ([e8c9c2a](https://github.com/certd/certd/commit/e8c9c2a47d47048ae743b16f7bc932dbe18a89e9))
* favicon支持自定义 ([8b9c47d](https://github.com/certd/certd/commit/8b9c47daf194515006689a212ae9cf586bdf5993))
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
### Bug Fixes

View File

@@ -9,11 +9,11 @@ Certd 是一个免费全自动申请和自动部署更新SSL证书的管理系
本项目不仅支持证书申请过程自动化,还可以自动化部署更新证书,让你的证书永不过期。
* 全自动申请证书(支持所有注册商注册的域名)
* 全自动部署更新证书(目前支持部署到主机、部署到阿里云、腾讯云等,目前已支持30+部署插件)
* 全自动部署更新证书(目前支持部署到主机、阿里云、腾讯云等,目前已支持40+部署插件)
* 支持通配符域名/泛域名支持多个域名打到一个证书上支持pem、pfx、der、jks等多种证书格式
* 邮件通知
* 邮件通知、webhook通知
* 私有化部署数据保存本地镜像由Github Actions构建过程公开透明
* 支持sqlitepostgresql数据库
* 支持SQLitePostgreSQL、MySQL数据库

View File

@@ -1 +1 @@
15:28
12:07

View File

@@ -23,7 +23,6 @@ services:
# # ↓↓↓↓ --------------------------------------------------------- 如果你服务器部署在国外可以用这个替换上面阿里云的公共dns
# - 8.8.8.8 # 谷歌公共dns
# - 8.8.4.4
# extra_hosts:
# # ↓↓↓↓ -------------------------------------------------------- 这里可以配置自定义hosts外网域名可以指向本地局域网ip地址
# - "localdomain.comm:192.168.1.3"
@@ -34,7 +33,7 @@ services:
# 配置规则: certd_ + 配置项, 点号用_代替
# #↓↓↓↓ ----------------------------- 如果忘记管理员密码可以设置为true重启之后管理员密码将改成123456然后请及时修改回false
- certd_system_resetAdminPasswd=false
# #↓↓↓↓ ----------------------------- 使用postgresql数据库
# #↓↓↓↓ ----------------------------- 使用postgresql数据库,需要提前创建数据库
# - certd_flyway_scriptDir=./db/migration-pg # 升级脚本目录
# - certd_typeorm_dataSource_default_type=postgres # 数据库类型
# - certd_typeorm_dataSource_default_host=localhost # 数据库地址
@@ -43,6 +42,19 @@ services:
# - certd_typeorm_dataSource_default_password=yourpasswd # 密码
# - certd_typeorm_dataSource_default_database=certd # 数据库名
# #↓↓↓↓ ----------------------------- 使用mysql数据库需要提前创建数据库 charset=utf8mb4, collation=utf8mb4_bin
# - certd_flyway_scriptDir=./db/migration-mysql # 升级脚本目录
# - certd_typeorm_dataSource_default_type=mysql # 数据库类型, 或者 mariadb
# - certd_typeorm_dataSource_default_host=localhost # 数据库地址
# - certd_typeorm_dataSource_default_port=3306 # 数据库端口
# - certd_typeorm_dataSource_default_username=root # 用户名
# - certd_typeorm_dataSource_default_password=yourpasswd # 密码
# - certd_typeorm_dataSource_default_database=certd # 数据库名
# #↓↓↓↓ ------------------------------------------------------------- 启用ipv6网络
# networks:
# - ip6net

View File

@@ -76,8 +76,8 @@ export default defineConfig({
{ text: "源码部署", link: "/guide/install/source/" }
]
},
{ text: "演示教程", link: "/guide/tutorial.md" }
{ text: "演示教程", link: "/guide/tutorial.md" },
{ text: "版本升级", link: "/guide/install/upgrade.md" }
]
},
{

View File

@@ -3,6 +3,74 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
### Bug Fixes
* 修复没有配置eab时报order无法读取的问题 ([657a2ae](https://github.com/certd/certd/commit/657a2ae032e6f61ac27fbdd26c7bf169c041219e))
* 修复授权被删除后无法清空的bug ([b45977c](https://github.com/certd/certd/commit/b45977c29a29084c11e496bec3415eaaebafdd74))
* mysql下access.setting字段改成text ([b7f5740](https://github.com/certd/certd/commit/b7f5740c57743914f754f3b4fdd94b59a2e8338c))
### Performance Improvements
* 点击版本红点按钮,跳转到升级帮助页面 ([454fbda](https://github.com/certd/certd/commit/454fbda581bbe22abca5b91e5086ea9d9d58a020))
* 通知标题优化 ([ff083ce](https://github.com/certd/certd/commit/ff083ce6848a8bee3c8248e4b881086ae1517c28))
* 支持腾讯虚拟机开关机([@wujingke](https://github.com/wujingke)) ([8039e8b](https://github.com/certd/certd/commit/8039e8baf83c82d03f1a6198cf61c372026b962b))
* 支持aws cloudfront ([0ae39f1](https://github.com/certd/certd/commit/0ae39f160a7c6b6696b3bf513d68aa28905810ad))
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
### Bug Fixes
* 修复创建流水线通知设置无效的bug ([498cf34](https://github.com/certd/certd/commit/498cf34999fddfa24ce088e2e678469fa669abb8))
* 修复流水线分组可以被所有人看见的bug ([a0e838d](https://github.com/certd/certd/commit/a0e838d1eec918e5dc92fe95dc72ac14facb930e))
### Performance Improvements
* 优化数据表索引 ([228fdf0](https://github.com/certd/certd/commit/228fdf0a0d28013f5dd156a97bbde80537e8e97e))
* 支持mysql ([7cde1fd](https://github.com/certd/certd/commit/7cde1fdc4a9ed851900d231a5460c8dbfbcd148e))
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
### Bug Fixes
* 修复cname排查方法 nslookup命令显示黑色的问题 ([3dfeeec](https://github.com/certd/certd/commit/3dfeeec899d7d0d7292695ce410f78548e076c03))
### Performance Improvements
* 通知选择器优化 ([2c0cbdd](https://github.com/certd/certd/commit/2c0cbdd29ecb74cc939b2ae7ee86b8d40f70ba31))
* 新增七牛云插件分组 ([49e7dc5](https://github.com/certd/certd/commit/49e7dc56e1a95fbdea3e30cdeb945b48415b69e3))
* 新增server酱3通知 ([6aa4872](https://github.com/certd/certd/commit/6aa487269c9f6862e188b37a0d6c73f79c937d94))
* 支持邀请奖励 ([618ec93](https://github.com/certd/certd/commit/618ec937866b24ebcf8164db43acb1ed66a5b329))
* 支持易发云短信 ([94fa77f](https://github.com/certd/certd/commit/94fa77fcd2b9bea294fb05736c0d8cdc81f56103))
* cname value优化 ([e8c9c2a](https://github.com/certd/certd/commit/e8c9c2a47d47048ae743b16f7bc932dbe18a89e9))
* favicon支持自定义 ([8b9c47d](https://github.com/certd/certd/commit/8b9c47daf194515006689a212ae9cf586bdf5993))
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
### Bug Fixes
* 修复自定义webhook contextType的bug ([7e5ea0c](https://github.com/certd/certd/commit/7e5ea0cee003acda952d922ca70592f1e8a2ed80))
### Features
* 手机号登录、邮箱验证码注册 ([7b55337](https://github.com/certd/certd/commit/7b55337c5edb470cca7aa62201eda8d274784004))
### Performance Improvements
* 部署到IIS插件 ([1534f45](https://github.com/certd/certd/commit/1534f4523633265d219d7b3a249a9ea1af99c512))
* 登录失败增加重试次数限制及冷却时间 ([954b6df](https://github.com/certd/certd/commit/954b6df3608695fe074130f8149a33e311d80cc4))
* 流水线支持批量修改分组,批量删除 ([a847e66](https://github.com/certd/certd/commit/a847e66c4fc843b98f1520b2b8072d3586ce8b81))
* 取消docker-compose的dns配置 ([87bbf6f](https://github.com/certd/certd/commit/87bbf6f14080b9fa287c250d7fc4d33279c83ff7))
* 首页新增修改密码提示 ([0772d3b](https://github.com/certd/certd/commit/0772d3b3fd24afdde4086d9f09ef19d037b431b4))
* 选项显示图标 ([aedc462](https://github.com/certd/certd/commit/aedc46213571a3bd93809b7af7fa17a08d546237))
* 优化七牛云cdn获取域名列表可以选择 ([5a20242](https://github.com/certd/certd/commit/5a20242111d6bd255b25dac86fe1f062c8543096))
* 优化七牛云cdn部署保持http2和forceHttp设置当未开启https时主动开启https ([196f7d9](https://github.com/certd/certd/commit/196f7d9dc23d7dd96b663c686542e85270b81aef))
* 优化证书申请成功通知发送方式 ([8002a56](https://github.com/certd/certd/commit/8002a56efc5998aa03db5711ae87f9eb4bc9e160))
* 支持短信验证码登录 ([387bcc5](https://github.com/certd/certd/commit/387bcc5fa418cdeea81a06da5e3f8cd6b43cd082))
* 支持威联通证书部署 ([0d8913e](https://github.com/certd/certd/commit/0d8913ea2f56fdebbcc9bb207eae59e8ddbb8cad))
* 自定义webhook显示详细的错误信息 ([3254afc](https://github.com/certd/certd/commit/3254afc75640eed3729d0fc02a818fefbe5c7fc3))
## [1.27.9](https://github.com/certd/certd/compare/v1.27.8...v1.27.9) (2024-11-26)
### Performance Improvements

View File

@@ -14,9 +14,6 @@ git clone https://github.com/certd/certd --depth=1
#进入项目目录
cd certd
# 切换到最新版本代码【如果v2分支无法编译请尝试切换到最新版tag】
# git checkout v1.27.0 # 这里换成最新版本号
```
### 修改pnpm-workspace.yaml文件
@@ -109,4 +106,4 @@ throw new Error("错误信息")
## 五、贡献插件送激活码
- PR要求插件功能完整代码规范
- PR通过后联系我们送您一个专业版激活码
- PR通过后联系我们送您一个半年期专业版激活码

View File

@@ -14,7 +14,7 @@ Certd 是一款开源、免费、全自动申请和部署更新SSL证书的工
* 支持通配符域名/泛域名,支持多个域名打到一个证书上
* 邮件通知
* 私有化部署,保障数据安全
* 支持sqlitepostgresql数据库
* 支持SQLite、Postgresql、MySQL数据库
## 二、一些说明
@@ -30,5 +30,5 @@ Certd 是一款开源、免费、全自动申请和部署更新SSL证书的工
## 三、证书颁发机构对比
* Let's Encrypt申请最简单。
* Google: 大厂光环兼容性好需要翻墙获取EAB。
* ZeroSSL 有数量限制获取EAB无需翻墙。
* Google: 大厂光环,兼容性好,首次需要翻墙获取EAB。
* ZeroSSL 需要EAB获取EAB无需翻墙。

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@@ -31,15 +31,12 @@ admin/123456
## 三、升级
1. 找到容器,点击编辑
![](./images/edit1.png)
1. 找到容器,点击更多->升级
![](./images/upgrade-1.png)
2. 将latest修改为最新版本号
![](https://img.shields.io/npm/v/%40certd%2Fpipeline)
2. 选择强制拉取镜像,点击确认即可
![img.png](./images/upgrade-2.png)
![img.png](./images/edit2.png)
3. 点击确定,重启容器
## 四、数据备份

View File

@@ -38,28 +38,12 @@ admin/123456
登录后请及时修改密码
## 三、如何升级
宝塔升级certd非常简单
### 1. 应用商店安装,直接更新镜像即可
`docker`->`容器编排`->`左侧选择Certd-xxxx`->`更新镜像`
`docker`->`容器编排`->`左侧选择Certd`->`更新镜像`
![img.png](./images/upgrade.png)
### 2. latest更新方式
在主机上拉取最新镜像,然后面板上重启容器
```shell
docker pull registry.cn-shenzhen.aliyuncs.com/handsfree/certd:latest
```
### 3. 固定版本号方式
修改容器编排模版中的镜像版本号,然后面板上重启容器
```shell
services:
certd:
# 镜像 # 修改最新版本号 ---- ↓↓↓↓↓
image: registry.cn-shenzhen.aliyuncs.com/handsfree/certd:v1.xx.x
```
## 四、数据备份
### 4.1 应用商店部署方式

View File

@@ -41,7 +41,7 @@ docker compose up -d
> 如果提示 没有docker compose命令,请安装docker-compose
> https://docs.docker.com/compose/install/linux/
> 然后使用 `docker-compose up -d` 启动
### 3. 访问测试

View File

@@ -8,7 +8,7 @@
```shell
# 克隆代码
git clone https://github.com/certd/certd
# git checkout v1.x.x # 1.x.x换成最新版本号当v2主干分支代码无法正常启动时可以尝试此命令
# git checkout v1.x.x # 当v2主干分支代码无法正常启动时可以尝试此命令1.x.x换成最新版本号
cd certd
# 启动服务
./start.sh
@@ -29,9 +29,15 @@ https://your_server_ip:7002
## 二、升级
```shell
# 更新代码并启动
cd certd
# 确保数据安全,备份一下数据
cp -rf ./packages/ui/certd-server/data ../certd-data-backup
git pull
# 如果提示pull失败可以尝试强制更新
# git checkout v2 -f && git pull
# 先停止旧的服务,7001是certd的默认端口
kill -9 $(lsof -t -i:7001)
# 重新编译启动

View File

@@ -0,0 +1,12 @@
# 版本升级
## 升级方法
根据不同部署方式查看升级方法
1. [Docker方式部署升级](./docker/#二、升级)
2. [宝塔面板方式部署升级](./baota/#三、如何升级)
3. [1Panel面板方式部署升级](./1panel/#三、升级)
4. [源码方式部署](./source/#二、升级)
## 升级日志
[CHANGELOG](../changelogs/CHANGELOG.md)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 53 KiB

View File

@@ -3,6 +3,8 @@
## 一、群晖部署Certd
以下是群晖`7.x`的部署`certd`步骤
### 1. 打开Container Manager
![](./images/1.png)
@@ -32,6 +34,8 @@
## 二、更新群晖证书
证书部署插件支持群晖`6.x``7.x`
## 1. 前提条件
* 已经部署了certd
* 群晖上已经设置好了证书(证书建议设置好描述,插件需要根据描述查找证书)

View File

@@ -32,5 +32,5 @@ features:
- title: 支持私有化部署
details: 保障数据安全
- title: 多数据库支持
details: 支持sqlitepostgresql数据库
details: 支持SQLite、Postgresql、MySQL数据库
---

View File

@@ -9,5 +9,5 @@
}
},
"npmClient": "pnpm",
"version": "1.28.0"
"version": "1.28.4"
}

View File

@@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/publishlab/node-acme-client/compare/v1.28.3...v1.28.4) (2024-12-12)
**Note:** Version bump only for package @certd/acme-client
## [1.28.3](https://github.com/publishlab/node-acme-client/compare/v1.28.2...v1.28.3) (2024-12-12)
**Note:** Version bump only for package @certd/acme-client
## [1.28.2](https://github.com/publishlab/node-acme-client/compare/v1.28.1...v1.28.2) (2024-12-09)
### Performance Improvements
* 支持mysql ([7cde1fd](https://github.com/publishlab/node-acme-client/commit/7cde1fdc4a9ed851900d231a5460c8dbfbcd148e))
## [1.28.1](https://github.com/publishlab/node-acme-client/compare/v1.28.0...v1.28.1) (2024-12-08)
**Note:** Version bump only for package @certd/acme-client
# [1.28.0](https://github.com/publishlab/node-acme-client/compare/v1.27.9...v1.28.0) (2024-11-30)
**Note:** Version bump only for package @certd/acme-client

View File

@@ -3,7 +3,7 @@
"description": "Simple and unopinionated ACME client",
"private": false,
"author": "nmorsman",
"version": "1.28.0",
"version": "1.28.4",
"type": "module",
"module": "scr/index.js",
"main": "src/index.js",
@@ -18,7 +18,7 @@
"types"
],
"dependencies": {
"@certd/basic": "^1.28.0",
"@certd/basic": "^1.28.4",
"@peculiar/x509": "^1.11.0",
"asn1js": "^3.0.5",
"axios": "^1.7.2",
@@ -65,5 +65,5 @@
"bugs": {
"url": "https://github.com/publishlab/node-acme-client/issues"
},
"gitHead": "cf1936309241d3cf05c2fba767f530bbb3b62b15"
"gitHead": "c8df9e698c265568e0e5e8b2f352c0599542d744"
}

View File

@@ -0,0 +1,137 @@
"use strict";
/**
* acme-client type definition tests
*/
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;
return g = { next: verb(0), "throw": verb(1), "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 });
var acme = require("acme-client");
(function () { return __awaiter(void 0, void 0, void 0, function () {
var accountKey, client, order, authorizations, authorization, challenge, _a, certKey, certCsr;
return __generator(this, function (_b) {
switch (_b.label) {
case 0: return [4 /*yield*/, acme.crypto.createPrivateKey()];
case 1:
accountKey = _b.sent();
client = new acme.Client({
accountKey: accountKey,
directoryUrl: acme.directory.letsencrypt.staging
});
/* Account */
return [4 /*yield*/, client.createAccount({
termsOfServiceAgreed: true,
contact: ['mailto:test@example.com']
})];
case 2:
/* Account */
_b.sent();
return [4 /*yield*/, client.createOrder({
identifiers: [
{ type: 'dns', value: 'example.com' },
{ type: 'dns', value: '*.example.com' },
]
})];
case 3:
order = _b.sent();
return [4 /*yield*/, client.getOrder(order)];
case 4:
_b.sent();
return [4 /*yield*/, client.getAuthorizations(order)];
case 5:
authorizations = _b.sent();
authorization = authorizations[0];
challenge = authorization.challenges[0];
return [4 /*yield*/, client.getChallengeKeyAuthorization(challenge)];
case 6:
_b.sent();
return [4 /*yield*/, client.verifyChallenge(authorization, challenge)];
case 7:
_b.sent();
return [4 /*yield*/, client.completeChallenge(challenge)];
case 8:
_b.sent();
return [4 /*yield*/, client.waitForValidStatus(challenge)];
case 9:
_b.sent();
return [4 /*yield*/, acme.crypto.createCsr({
commonName: 'example.com',
altNames: ['example.com', '*.example.com']
})];
case 10:
_a = _b.sent(), certKey = _a[0], certCsr = _a[1];
return [4 /*yield*/, client.finalizeOrder(order, certCsr)];
case 11:
_b.sent();
return [4 /*yield*/, client.getCertificate(order)];
case 12:
_b.sent();
return [4 /*yield*/, client.getCertificate(order, 'DST Root CA X3')];
case 13:
_b.sent();
/* Auto */
return [4 /*yield*/, client.auto({
csr: certCsr,
challengeCreateFn: function (authz, challenge, keyAuthorization) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
return [2 /*return*/];
}); }); },
challengeRemoveFn: function (authz, challenge, keyAuthorization) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
return [2 /*return*/];
}); }); }
})];
case 14:
/* Auto */
_b.sent();
return [4 /*yield*/, client.auto({
csr: certCsr,
email: 'test@example.com',
termsOfServiceAgreed: false,
skipChallengeVerification: false,
challengePriority: ['http-01', 'dns-01'],
preferredChain: 'DST Root CA X3',
challengeCreateFn: function (authz, challenge, keyAuthorization) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
return [2 /*return*/];
}); }); },
challengeRemoveFn: function (authz, challenge, keyAuthorization) { return __awaiter(void 0, void 0, void 0, function () { return __generator(this, function (_a) {
return [2 /*return*/];
}); }); }
})];
case 15:
_b.sent();
return [2 /*return*/];
}
});
}); })();

View File

@@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
**Note:** Version bump only for package @certd/basic
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
**Note:** Version bump only for package @certd/basic
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
**Note:** Version bump only for package @certd/basic
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
### Performance Improvements
* 通知选择器优化 ([2c0cbdd](https://github.com/certd/certd/commit/2c0cbdd29ecb74cc939b2ae7ee86b8d40f70ba31))
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
### Performance Improvements

View File

@@ -1 +1 @@
03:20
00:08

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/basic",
"private": false,
"version": "1.28.0",
"version": "1.28.4",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -43,5 +43,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "cf1936309241d3cf05c2fba767f530bbb3b62b15"
"gitHead": "c8df9e698c265568e0e5e8b2f352c0599542d744"
}

View File

@@ -98,10 +98,22 @@ export function createAxiosService({ logger }: { logger: Logger }) {
config.timeout = 15000;
}
let agents = defaultAgents;
if (config.skipSslVerify) {
logger.info('跳过SSL验证');
agents = createAgent({ rejectUnauthorized: false } as any);
if (config.skipSslVerify || config.httpProxy) {
let rejectUnauthorized = true;
if (config.skipSslVerify) {
logger.info('跳过SSL验证');
rejectUnauthorized = false;
}
const proxy: any = {};
if (config.httpProxy) {
logger.info('使用自定义http代理:', config.httpProxy);
proxy.httpProxy = config.httpProxy;
proxy.httpsProxy = config.httpProxy;
}
agents = createAgent({ rejectUnauthorized, ...proxy } as any);
}
delete config.skipSslVerify;
config.httpsAgent = agents.httpsAgent;
config.httpAgent = agents.httpAgent;
@@ -132,6 +144,9 @@ export function createAxiosService({ logger }: { logger: Logger }) {
} else {
logger.info('http response status:', response?.status);
}
if (response?.config?.returnResponse) {
return response;
}
return response.data;
},
(error: any) => {
@@ -200,6 +215,7 @@ export type HttpRequestConfig<D = any> = {
skipCheckRes?: boolean;
logParams?: boolean;
logRes?: boolean;
httpProxy?: string;
} & AxiosRequestConfig<D>;
export type HttpClient = {
request<D = any, R = any>(config: HttpRequestConfig<D>): Promise<HttpClientResponse<R>>;

View File

@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
### Bug Fixes
* 修复证书成功通知发送失败的bug ([0f5c690](https://github.com/certd/certd/commit/0f5c69040ba77340c909813220a26bc7ddada3ea))
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
### Performance Improvements
* 通知标题优化 ([ff083ce](https://github.com/certd/certd/commit/ff083ce6848a8bee3c8248e4b881086ae1517c28))
* 支持aws cloudfront ([0ae39f1](https://github.com/certd/certd/commit/0ae39f160a7c6b6696b3bf513d68aa28905810ad))
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
**Note:** Version bump only for package @certd/pipeline
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
### Performance Improvements
* 通知选择器优化 ([2c0cbdd](https://github.com/certd/certd/commit/2c0cbdd29ecb74cc939b2ae7ee86b8d40f70ba31))
* 新增七牛云插件分组 ([49e7dc5](https://github.com/certd/certd/commit/49e7dc56e1a95fbdea3e30cdeb945b48415b69e3))
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
### Features

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/pipeline",
"private": false,
"version": "1.28.0",
"version": "1.28.4",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -16,8 +16,8 @@
"test": "mocha --loader=ts-node/esm"
},
"dependencies": {
"@certd/basic": "^1.28.0",
"@certd/plus-core": "^1.28.0",
"@certd/basic": "^1.28.4",
"@certd/plus-core": "^1.28.4",
"dayjs": "^1.11.7",
"lodash-es": "^4.17.21",
"reflect-metadata": "^0.1.13"
@@ -43,5 +43,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "cf1936309241d3cf05c2fba767f530bbb3b62b15"
"gitHead": "c8df9e698c265568e0e5e8b2f352c0599542d744"
}

View File

@@ -10,7 +10,12 @@ import { Decorator } from "../decorator/index.js";
import { ICnameProxyService, IEmailService, IPluginConfigService, IUrlService } from "../service/index.js";
import { FileStore } from "./file-store.js";
import { cloneDeep, forEach, merge } from "lodash-es";
import { INotificationService, NotificationBody, NotificationContext, notificationRegistry } from "../notification/index.js";
import { INotificationService } from "../notification/index.js";
export type SysInfo = {
//系统标题
title?: string;
};
export type ExecutorOptions = {
pipeline: Pipeline;
@@ -25,6 +30,7 @@ export type ExecutorOptions = {
fileRootDir?: string;
user: UserInfo;
baseURL?: string;
sysInfo?: SysInfo;
};
export class Executor {
@@ -369,16 +375,16 @@ export class Executor {
let content = "";
const errorMessage = error?.message;
if (when === "start") {
subject = `【Certd】开始执行,${this.pipeline.title}${this.pipeline.id}`;
subject = `开始执行,${this.pipeline.title}${this.pipeline.id}`;
content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}`;
} else if (when === "success") {
subject = `【Certd】执行成功,${this.pipeline.title}${this.pipeline.id}`;
subject = `执行成功,${this.pipeline.title}${this.pipeline.id}`;
content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}`;
} else if (when === "turnToSuccess") {
subject = `【Certd】执行成功(失败转成功),${this.pipeline.title}${this.pipeline.id}`;
subject = `执行成功(失败转成功),${this.pipeline.title}${this.pipeline.id}`;
content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}`;
} else if (when === "error") {
subject = `【Certd】执行失败,${this.pipeline.title}${this.pipeline.id}`;
subject = `执行失败,${this.pipeline.title}${this.pipeline.id}`;
content = `流水线ID:${this.pipeline.id}运行ID:${this.runtime.id}\n错误详情:${error.message}`;
} else {
return;
@@ -388,6 +394,7 @@ export class Executor {
if (!notification.when.includes(when)) {
continue;
}
if (notification.type === "email") {
try {
await this.options.emailService?.send({
@@ -400,34 +407,24 @@ export class Executor {
}
} else {
try {
//构建notification插件发送通知
const notifyConfig = await this.options.notificationService.getById(notification.notificationId);
const notificationPlugin = notificationRegistry.get(notifyConfig.type);
const notificationCls: any = notificationPlugin.target;
const notificationSender = new notificationCls();
const notificationCtx: NotificationContext = {
http: utils.http,
logger,
utils,
emailService: this.options.emailService,
};
//设置参数
merge(notificationSender, notifyConfig.setting);
notificationSender.setCtx(notificationCtx);
await notificationSender.onInstance();
const body: NotificationBody = {
title: subject,
content,
userId: this.pipeline.userId,
pipeline: this.pipeline,
result: this.lastRuntime.pipeline.status,
pipelineId: this.pipeline.id,
historyId: this.runtime.id,
errorMessage,
url,
};
//发送通知
await notificationSender.send(body);
await this.options.notificationService.send({
id: notification.notificationId,
useDefault: true,
useEmail: false,
logger: this.logger,
body: {
title: subject,
content,
userId: this.pipeline.userId,
pipeline: this.pipeline,
result: this.lastRuntime.pipeline.status,
pipelineId: this.pipeline.id,
historyId: this.runtime.id,
errorMessage,
url,
},
});
} catch (e) {
logger.error("send notification error", e);
}

View File

@@ -48,9 +48,18 @@ export type NotificationInstanceConfig = {
};
};
export type NotificationSendReq = {
id?: number;
useDefault?: boolean;
useEmail?: boolean;
emailAddress?: string;
logger: ILogger;
body: NotificationBody;
};
export interface INotificationService {
getById(id: number): Promise<NotificationInstanceConfig>;
getDefault(): Promise<NotificationInstanceConfig>;
send(req: NotificationSendReq): Promise<void>;
}
export interface INotification {

View File

@@ -1,9 +1,9 @@
// src/decorator/memoryCache.decorator.ts
import { Decorator } from "../decorator/index.js";
import * as _ from "lodash-es";
import { merge } from "lodash-es";
import { notificationRegistry } from "./registry.js";
import { BaseNotification, NotificationBody, NotificationContext, NotificationDefine, NotificationInputDefine, NotificationInstanceConfig } from "./api.js";
import { isPlus } from "@certd/plus-core";
// 提供一个唯一 key
export const NOTIFICATION_CLASS_KEY = "pipeline:notification";
@@ -47,9 +47,7 @@ export async function newNotification(type: string, input: any, ctx: Notificatio
// @ts-ignore
const plugin = new register.target();
for (const key in input) {
plugin[key] = input[key];
}
merge(plugin, input);
if (!ctx) {
throw new Error("ctx is required");
}
@@ -61,8 +59,5 @@ export async function newNotification(type: string, input: any, ctx: Notificatio
export async function sendNotification(opts: { config: NotificationInstanceConfig; ctx: NotificationContext; body: NotificationBody }) {
const notification: BaseNotification = await newNotification(opts.config.type, opts.config.setting, opts.ctx);
if (notification.define.needPlus && !isPlus()) {
opts.body.content = `${opts.body.content}\n\n注意此通知渠道已调整为专业版功能后续版本将不再支持发送请尽快修改或升级为专业版`;
}
await notification.doSend(opts.body);
}

View File

@@ -20,8 +20,10 @@ export const pluginGroups = {
aliyun: new PluginGroup("aliyun", "阿里云", 2),
huawei: new PluginGroup("huawei", "华为云", 3),
tencent: new PluginGroup("tencent", "腾讯云", 4),
host: new PluginGroup("host", "主机", 5),
cdn: new PluginGroup("cdn", "CDN", 6),
panel: new PluginGroup("panel", "面板", 7),
other: new PluginGroup("other", "其他", 8),
qiniu: new PluginGroup("qiniu", "七牛云", 5),
aws: new PluginGroup("aws", "亚马逊云", 6),
host: new PluginGroup("host", "主机", 7),
cdn: new PluginGroup("cdn", "CDN", 8),
panel: new PluginGroup("panel", "面板", 9),
other: new PluginGroup("other", "其他", 10),
};

View File

@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
**Note:** Version bump only for package @certd/lib-huawei
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
**Note:** Version bump only for package @certd/lib-huawei
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
**Note:** Version bump only for package @certd/lib-huawei
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
**Note:** Version bump only for package @certd/lib-huawei
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
**Note:** Version bump only for package @certd/lib-huawei

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/lib-huawei",
"private": false,
"version": "1.28.0",
"version": "1.28.4",
"main": "./dist/bundle.js",
"module": "./dist/bundle.js",
"types": "./dist/d/index.d.ts",
@@ -21,5 +21,5 @@
"prettier": "^2.8.8",
"tslib": "^2.8.1"
},
"gitHead": "cf1936309241d3cf05c2fba767f530bbb3b62b15"
"gitHead": "c8df9e698c265568e0e5e8b2f352c0599542d744"
}

View File

@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
**Note:** Version bump only for package @certd/lib-iframe
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
**Note:** Version bump only for package @certd/lib-iframe
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
**Note:** Version bump only for package @certd/lib-iframe
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
**Note:** Version bump only for package @certd/lib-iframe
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
**Note:** Version bump only for package @certd/lib-iframe

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/lib-iframe",
"private": false,
"version": "1.28.0",
"version": "1.28.4",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -30,5 +30,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "cf1936309241d3cf05c2fba767f530bbb3b62b15"
"gitHead": "c8df9e698c265568e0e5e8b2f352c0599542d744"
}

View File

@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
**Note:** Version bump only for package @certd/lib-k8s
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
**Note:** Version bump only for package @certd/lib-k8s
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
**Note:** Version bump only for package @certd/lib-k8s
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
**Note:** Version bump only for package @certd/lib-k8s
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
**Note:** Version bump only for package @certd/lib-k8s

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/lib-k8s",
"private": false,
"version": "1.28.0",
"version": "1.28.4",
"type": "module",
"main": "./dist/index.js",
"module": "./dist/index.js",
@@ -16,7 +16,7 @@
"preview": "vite preview"
},
"dependencies": {
"@certd/basic": "^1.28.0",
"@certd/basic": "^1.28.4",
"@kubernetes/client-node": "0.21.0"
},
"devDependencies": {
@@ -31,5 +31,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "cf1936309241d3cf05c2fba767f530bbb3b62b15"
"gitHead": "c8df9e698c265568e0e5e8b2f352c0599542d744"
}

View File

@@ -3,6 +3,24 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
**Note:** Version bump only for package @certd/lib-server
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
**Note:** Version bump only for package @certd/lib-server
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
**Note:** Version bump only for package @certd/lib-server
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
### Performance Improvements
* favicon支持自定义 ([8b9c47d](https://github.com/certd/certd/commit/8b9c47daf194515006689a212ae9cf586bdf5993))
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
### Performance Improvements

View File

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

View File

@@ -38,9 +38,9 @@ export class PlusService {
return installInfo.siteId;
}
async active(code: string) {
async active(code: string, inviteCode?: string) {
const plusRequestService = await this.getPlusRequestService();
return await plusRequestService.active(code);
return await plusRequestService.active(code, inviteCode);
}
async updateLicense(license: string) {

View File

@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
**Note:** Version bump only for package @certd/midway-flyway-js
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
**Note:** Version bump only for package @certd/midway-flyway-js
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
**Note:** Version bump only for package @certd/midway-flyway-js

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/midway-flyway-js",
"version": "1.28.0",
"version": "1.28.4",
"description": "midway with flyway, sql upgrade way ",
"private": false,
"type": "module",
@@ -46,5 +46,5 @@
"typeorm": "^0.3.11",
"typescript": "^5.4.2"
},
"gitHead": "cf1936309241d3cf05c2fba767f530bbb3b62b15"
"gitHead": "c8df9e698c265568e0e5e8b2f352c0599542d744"
}

View File

@@ -3,6 +3,28 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
**Note:** Version bump only for package @certd/plugin-cert
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
### Bug Fixes
* 修复没有配置eab时报order无法读取的问题 ([657a2ae](https://github.com/certd/certd/commit/657a2ae032e6f61ac27fbdd26c7bf169c041219e))
### Performance Improvements
* 通知标题优化 ([ff083ce](https://github.com/certd/certd/commit/ff083ce6848a8bee3c8248e4b881086ae1517c28))
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
**Note:** Version bump only for package @certd/plugin-cert
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
**Note:** Version bump only for package @certd/plugin-cert
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
### Features

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-cert",
"private": false,
"version": "1.28.0",
"version": "1.28.4",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -15,9 +15,9 @@
"preview": "vite preview"
},
"dependencies": {
"@certd/acme-client": "^1.28.0",
"@certd/basic": "^1.28.0",
"@certd/pipeline": "^1.28.0",
"@certd/acme-client": "^1.28.4",
"@certd/basic": "^1.28.4",
"@certd/pipeline": "^1.28.4",
"@google-cloud/publicca": "^1.3.0",
"dayjs": "^1.11.7",
"jszip": "^3.10.1",
@@ -40,5 +40,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "cf1936309241d3cf05c2fba767f530bbb3b62b15"
"gitHead": "c8df9e698c265568e0e5e8b2f352c0599542d744"
}

View File

@@ -24,10 +24,11 @@ export type DomainsVerifyPlan = {
};
export type CertInfo = {
crt: string;
key: string;
csr: string;
ic?: string;
crt: string; //fullchain证书
key: string; //私钥
csr: string; //csr
oc?: string; //仅证书非fullchain证书
ic?: string; //中间证书
pfx?: string;
der?: string;
jks?: string;

View File

@@ -1,4 +1,4 @@
import { AbstractTaskPlugin, IContext, NotificationBody, sendNotification, Step, TaskInput, TaskOutput } from "@certd/pipeline";
import { AbstractTaskPlugin, IContext, NotificationBody, Step, TaskInput, TaskOutput } from "@certd/pipeline";
import dayjs from "dayjs";
import type { CertInfo } from "./acme.js";
import { CertReader } from "./cert-reader.js";
@@ -191,7 +191,7 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin {
zip.file("cert.crt", cert.crt);
zip.file("cert.key", cert.key);
zip.file("intermediate.crt", cert.ic);
zip.file("origin.crt", cert.oc);
if (cert.pfx) {
zip.file("cert.pfx", Buffer.from(cert.pfx, "base64"));
}
@@ -201,6 +201,20 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin {
if (cert.jks) {
zip.file("cert.jks", Buffer.from(cert.jks, "base64"));
}
zip.file(
"说明.txt",
`证书文件说明
cert.crt证书文件包含证书链pem格式
cert.key私钥文件pem格式
intermediate.crt中间证书文件pem格式
origin.crt原始证书文件不含证书链pem格式
cert.pfxpfx格式证书文件iis服务器使用
cert.derder格式证书文件
cert.jksjks格式证书文件java服务器使用
`
);
const content = await zip.generateAsync({ type: "nodebuffer" });
this.saveFile(filename, content);
this.logger.info(`已保存文件:${filename}`);
@@ -295,7 +309,6 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin {
* 检查是否过期默认提前35天
* @param expires
* @param maxDays
* @returns {boolean}
*/
isWillExpire(expires: number, maxDays = 20) {
if (expires == null) {
@@ -312,39 +325,20 @@ export abstract class CertApplyBasePlugin extends AbstractTaskPlugin {
this.logger.info("发送证书申请成功通知");
const url = await this.ctx.urlService.getPipelineDetailUrl(this.pipeline.id, this.ctx.runtime.id);
const body: NotificationBody = {
title: `【Certd】证书申请成功【${this.pipeline.title}`,
title: `证书申请成功【${this.pipeline.title}`,
content: `域名:${this.domains.join(",")}`,
url: url,
};
try {
const defNotification = await this.ctx.notificationService.getDefault();
if (defNotification) {
this.logger.info(`通知渠道:${defNotification.name}`);
const notificationCtx = {
http: this.ctx.http,
logger: this.logger,
utils: this.ctx.utils,
emailService: this.ctx.emailService,
};
await sendNotification({
config: defNotification,
ctx: notificationCtx,
body,
});
return;
}
this.logger.warn("未配置默认通知,将发送邮件通知");
await this.sendSuccessEmail(body);
await this.ctx.notificationService.send({
useDefault: true,
useEmail: true,
emailAddress: this.email,
logger: this.logger,
body,
});
} catch (e) {
this.logger.error("证书申请成功通知发送失败", e);
}
}
async sendSuccessEmail(body: NotificationBody) {
this.logger.info("发送邮件通知:" + this.email);
await this.ctx.emailService.send({
receivers: [this.email],
subject: body.title,
content: body.content,
});
}
}

View File

@@ -10,6 +10,7 @@ export type CertReaderHandleContext = {
reader: CertReader;
tmpCrtPath: string;
tmpKeyPath: string;
tmpOcPath?: string;
tmpPfxPath?: string;
tmpDerPath?: string;
tmpIcPath?: string;
@@ -19,6 +20,7 @@ export type CertReaderHandle = (ctx: CertReaderHandleContext) => Promise<void>;
export type HandleOpts = { logger: ILogger; handle: CertReaderHandle };
export class CertReader {
cert: CertInfo;
oc: string; //仅证书非fullchain证书
crt: string;
key: string;
csr: string;
@@ -38,6 +40,12 @@ export class CertReader {
this.cert.ic = this.ic;
}
this.oc = certInfo.oc;
if (!this.oc) {
this.oc = this.getOc();
this.cert.oc = this.oc;
}
const { detail, expires } = this.getCrtDetail(this.cert.crt);
this.detail = detail;
this.expires = expires.getTime();
@@ -56,6 +64,13 @@ export class CertReader {
return ic.trim();
}
getOc() {
//原始证书 就是crt的第一个 -----END CERTIFICATE----- 之前的内容
const endStr = "-----END CERTIFICATE-----";
const arr = this.crt.split(endStr);
return arr[0] + endStr;
}
toCertInfo(): CertInfo {
return this.cert;
}
@@ -73,7 +88,7 @@ export class CertReader {
return domains;
}
saveToFile(type: "crt" | "key" | "pfx" | "der" | "ic" | "jks", filepath?: string) {
saveToFile(type: "crt" | "key" | "pfx" | "der" | "oc" | "ic" | "jks", filepath?: string) {
if (!this.cert[type]) {
return;
}
@@ -87,7 +102,7 @@ export class CertReader {
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
}
if (type === "crt" || type === "key" || type === "ic") {
if (type === "crt" || type === "key" || type === "ic" || type === "oc") {
fs.writeFileSync(filepath, this.cert[type]);
} else {
fs.writeFileSync(filepath, Buffer.from(this.cert[type], "base64"));
@@ -102,9 +117,10 @@ export class CertReader {
const tmpKeyPath = this.saveToFile("key");
const tmpPfxPath = this.saveToFile("pfx");
const tmpIcPath = this.saveToFile("ic");
logger.info("本地文件写入成功");
const tmpOcPath = this.saveToFile("oc");
const tmpDerPath = this.saveToFile("der");
const tmpJksPath = this.saveToFile("jks");
logger.info("本地文件写入成功");
try {
return await opts.handle({
reader: this,
@@ -114,6 +130,7 @@ export class CertReader {
tmpDerPath: tmpDerPath,
tmpIcPath: tmpIcPath,
tmpJksPath: tmpJksPath,
tmpOcPath: tmpOcPath,
});
} catch (err) {
throw err;
@@ -128,6 +145,7 @@ export class CertReader {
removeFile(tmpCrtPath);
removeFile(tmpKeyPath);
removeFile(tmpPfxPath);
removeFile(tmpOcPath);
removeFile(tmpDerPath);
removeFile(tmpIcPath);
removeFile(tmpJksPath);

View File

@@ -137,7 +137,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
{ value: "zerossl", label: "ZeroSSL", icon: "emojione:digit-zero" },
],
},
helper: "Let's Encrypt申请最简单\nGoogle大厂光环兼容性好需要翻墙获取EAB授权\nZeroSSL有数量限制,获取EAB授权无需翻墙",
helper: "Let's Encrypt申请最简单\nGoogle大厂光环兼容性好仅首次需要翻墙获取EAB授权\nZeroSSL需要EAB授权无需翻墙",
required: true,
})
sslProvider!: SSLProvider;
@@ -271,8 +271,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
this.logger.info("当前正在使用 google公共EAB授权");
eab = await this.ctx.accessService.getCommonById(this.googleCommonEabAccessId);
} else {
this.logger.error("google需要配置EAB授权或服务账号授权");
return;
throw new Error("google需要配置EAB授权或服务账号授权");
}
} else if (this.sslProvider === "zerossl") {
if (this.eabAccessId) {
@@ -282,8 +281,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
this.logger.info("当前正在使用 zerossl 公共EAB授权");
eab = await this.ctx.accessService.getCommonById(this.zerosslCommonEabAccessId);
} else {
this.logger.error("zerossl需要配置EAB授权");
return;
throw new Error("zerossl需要配置EAB授权");
}
}
this.eab = eab;

View File

@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
**Note:** Version bump only for package @certd/plugin-lib
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
**Note:** Version bump only for package @certd/plugin-lib
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
**Note:** Version bump only for package @certd/plugin-lib
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
**Note:** Version bump only for package @certd/plugin-lib
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
### Features

View File

@@ -1,7 +1,7 @@
{
"name": "@certd/plugin-lib",
"private": false,
"version": "1.28.0",
"version": "1.28.4",
"type": "module",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
@@ -16,9 +16,9 @@
},
"dependencies": {
"@alicloud/pop-core": "^1.7.10",
"@certd/basic": "^1.28.0",
"@certd/pipeline": "^1.28.0",
"@certd/plugin-cert": "^1.28.0",
"@certd/basic": "^1.28.4",
"@certd/pipeline": "^1.28.4",
"@certd/plugin-cert": "^1.28.4",
"@kubernetes/client-node": "0.21.0",
"dayjs": "^1.11.7",
"iconv-lite": "^0.6.3",
@@ -44,5 +44,5 @@
"tslib": "^2.8.1",
"typescript": "^5.4.2"
},
"gitHead": "cf1936309241d3cf05c2fba767f530bbb3b62b15"
"gitHead": "c8df9e698c265568e0e5e8b2f352c0599542d744"
}

View File

@@ -9,6 +9,7 @@ RUN npm install -g pnpm@8.15.7
RUN cp /workspace/certd-client/dist/* /workspace/certd-server/public/ -rf
RUN cd /workspace/certd-server && pnpm install && npm run build-on-docker
FROM node:20-alpine
EXPOSE 7001
EXPOSE 7002

View File

@@ -3,6 +3,42 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
**Note:** Version bump only for package @certd/ui-client
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
### Bug Fixes
* 修复授权被删除后无法清空的bug ([b45977c](https://github.com/certd/certd/commit/b45977c29a29084c11e496bec3415eaaebafdd74))
### Performance Improvements
* 点击版本红点按钮,跳转到升级帮助页面 ([454fbda](https://github.com/certd/certd/commit/454fbda581bbe22abca5b91e5086ea9d9d58a020))
* 通知标题优化 ([ff083ce](https://github.com/certd/certd/commit/ff083ce6848a8bee3c8248e4b881086ae1517c28))
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
### Bug Fixes
* 修复创建流水线通知设置无效的bug ([498cf34](https://github.com/certd/certd/commit/498cf34999fddfa24ce088e2e678469fa669abb8))
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
### Bug Fixes
* 修复cname排查方法 nslookup命令显示黑色的问题 ([3dfeeec](https://github.com/certd/certd/commit/3dfeeec899d7d0d7292695ce410f78548e076c03))
### Performance Improvements
* 通知选择器优化 ([2c0cbdd](https://github.com/certd/certd/commit/2c0cbdd29ecb74cc939b2ae7ee86b8d40f70ba31))
* 新增七牛云插件分组 ([49e7dc5](https://github.com/certd/certd/commit/49e7dc56e1a95fbdea3e30cdeb945b48415b69e3))
* 新增server酱3通知 ([6aa4872](https://github.com/certd/certd/commit/6aa487269c9f6862e188b37a0d6c73f79c937d94))
* 支持邀请奖励 ([618ec93](https://github.com/certd/certd/commit/618ec937866b24ebcf8164db43acb1ed66a5b329))
* 支持易发云短信 ([94fa77f](https://github.com/certd/certd/commit/94fa77fcd2b9bea294fb05736c0d8cdc81f56103))
* favicon支持自定义 ([8b9c47d](https://github.com/certd/certd/commit/8b9c47daf194515006689a212ae9cf586bdf5993))
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
### Features

View File

@@ -2,7 +2,7 @@
<html lang="en">
<head>
<meta charset="UTF-8"/>
<link rel="icon" href="/static/images/logo/logo.svg"/>
<link rel="icon" href="/api/app/favicon"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Loading</title>
<script src="/static/icons/iconfont.js"></script>

View File

@@ -1,6 +1,6 @@
{
"name": "@certd/ui-client",
"version": "1.28.0",
"version": "1.28.4",
"private": true,
"scripts": {
"dev": "vite --open",
@@ -26,10 +26,10 @@
"dependencies": {
"@ant-design/colors": "^7.0.2",
"@ant-design/icons-vue": "^6.1.0",
"@fast-crud/fast-crud": "^1.23.1",
"@fast-crud/fast-extends": "^1.23.1",
"@fast-crud/ui-antdv4": "^1.23.1",
"@fast-crud/ui-interface": "^1.23.1",
"@fast-crud/fast-crud": "^1.23.4",
"@fast-crud/fast-extends": "^1.23.4",
"@fast-crud/ui-antdv4": "^1.23.4",
"@fast-crud/ui-interface": "^1.23.4",
"@iconify/vue": "^4.1.1",
"@soerenmartius/vue3-clipboard": "^0.1.2",
"@vue-js-cron/light": "^4.0.5",
@@ -65,8 +65,8 @@
"vuedraggable": "^4.1.0"
},
"devDependencies": {
"@certd/lib-iframe": "^1.28.0",
"@certd/pipeline": "^1.28.0",
"@certd/lib-iframe": "^1.28.4",
"@certd/pipeline": "^1.28.4",
"@rollup/plugin-commonjs": "^25.0.7",
"@rollup/plugin-node-resolve": "^15.2.3",
"@types/chai": "^4.3.12",

View File

@@ -76,7 +76,7 @@ function createService() {
error.message = "拒绝访问";
break;
case 404:
error.message = `请求地址出错: ${error.response.config.url}`;
error.message = `请求地址出错`;
break;
case 408:
error.message = "请求超时";
@@ -102,6 +102,7 @@ function createService() {
default:
break;
}
error.message += `: ${error.response?.config?.url}`;
errorLog(error, error?.response?.config?.showErrorNotify);
if (status === 401) {
const userStore = useUserStore();

View File

@@ -6,9 +6,8 @@
<div>1. 解析记录应该添加在{{ record.domain }}域名下</div>
<div>2. 要添加的是CNAME类型的记录不是TXT</div>
<div>3. 核对记录值是否是:{{ record.recordValue }}</div>
<div>
4. 运行命令 <a-tag>nslookup -qa=txt {{ record.hostRecord }}{{ record.domain }}</a-tag> 查看解析配置是否正确
</div>
<div>4. 运行下面的命令,查看解析是否正确 <fs-copyable :style="{ color: '#52c41a' }" :model-value="nslookupCmd"></fs-copyable></div>
<div>5. 如果以上检查都没有问题则可能是DNS解析生效时间比较慢某些提供商延迟可能高达几个小时</div>
</div>
</template>
<fs-icon class="ml-5 pointer" icon="mingcute:question-line"></fs-icon>
@@ -16,7 +15,12 @@
</template>
<script lang="ts" setup>
import { computed } from "vue";
const props = defineProps<{
record: any;
}>();
const nslookupCmd = computed(() => {
return `nslookup -qa=txt _acme-challenge.${props.record.domain}`;
});
</script>

View File

@@ -12,7 +12,7 @@ const slots = defineSlots();
<template>
<div class="tutorial-button pointer" @click="open">
<template v-if="!slots.default">
<fs-icon icon="mingcute:question-line"></fs-icon>
<fs-icon icon="ant-design:question-circle-outlined"></fs-icon>
<div class="ml-5">使用教程</div>
</template>
<slot></slot>

View File

@@ -118,7 +118,8 @@ const expiredDays = computed(() => {
});
const formState = reactive({
code: ""
code: "",
inviteCode: ""
});
const router = useRouter();
@@ -268,7 +269,7 @@ function openUpgrade() {
activationCodeGetWay = (
<span>
<a href="https://afdian.com/a/greper" target="_blank">
爱发电赞助VIP会员后获取专业版
爱发电赞助VIP会员¥29.9后获取一年期专业版激活码
</a>
<span> 商业版请直接联系作者</span>
</span>
@@ -327,6 +328,7 @@ function openUpgrade() {
<fs-copyable class="flex-1" v-model={computedSiteId.value}></fs-copyable>
</div>
<a-input class="mt-10" v-model:value={formState.code} placeholder={placeholder} />
<a-input class="mt-10" v-model:value={formState.inviteCode} placeholder={"邀请码【选填】可额外获得专业版30天/商业版15天时长"} />
</div>
<div class="mt-10">

View File

@@ -77,9 +77,7 @@ export default {
closeAll: pageStore.closeAll,
openedSort: pageStore.openedSort
};
console.log("opened", pageStore.getOpened);
const computeOpened = computed(() => {
console.log("opened", pageStore.getOpened);
return pageStore.getOpened;
});

View File

@@ -23,7 +23,6 @@ defineOptions({
name: "FsUserInfo"
});
const userStore = useUserStore();
console.log("user", userStore);
const { t } = useI18n();
const router = useRouter();

View File

@@ -37,3 +37,7 @@
margin-right: 3px;
}
}
.fs-search .ant-row{
}

View File

@@ -77,6 +77,9 @@ h1, h2, h3, h4, h5, h6 {
.flex-1 {
flex: 1;
}
.flex-0 {
flex: 0;
}
.flex-col {
display: flex;

View File

@@ -1,7 +1,7 @@
<template>
<div class="access-selector">
<span v-if="target?.name" class="mr-5 cd-flex-inline">
<a-tag class="mr-5" color="green">{{ target.name }}</a-tag>
<span v-if="modelValue" class="mr-5 cd-flex-inline">
<a-tag class="mr-5" color="green">{{ target.name || modelValue }}</a-tag>
<fs-icon class="cd-icon-button" icon="ion:close-circle-outline" @click="clear"></fs-icon>
</span>
<span v-else class="mlr-5 text-gray">{{ placeholder }}</span>

View File

@@ -1,6 +1,6 @@
import { request } from "/src/api/service";
export function createApi() {
export function createNotificationApi() {
const apiPrefix = "/pi/notification";
return {
async GetList(query: any) {
@@ -43,6 +43,13 @@ export function createApi() {
});
},
async GetOptions(id: number) {
return await request({
url: apiPrefix + "/options",
method: "post"
});
},
async SetDefault(id: number) {
return await request({
url: apiPrefix + "/setDefault",
@@ -66,6 +73,13 @@ export function createApi() {
});
},
async GetDefineTypes() {
return await request({
url: apiPrefix + "/getTypeDict",
method: "post"
});
},
async GetProviderDefine(type: string) {
return await request({
url: apiPrefix + "/define",
@@ -80,6 +94,13 @@ export function createApi() {
method: "post",
params: { type }
});
},
async GetOrCreateDefault(param: { email: any }) {
return await request({
url: apiPrefix + "/getOrCreateDefault",
method: "post",
data: param
});
}
};
}

View File

@@ -6,11 +6,14 @@ import { Modal } from "ant-design-vue";
import * as api from "/@/views/sys/cname/provider/api";
import { mitter } from "/@/utils/util.mitt";
export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
export function notificationProvide(api: any) {
provide("notificationApi", api);
provide("get:plugin:type", () => {
return "notification";
});
}
export function getCommonColumnDefine(crudExpose: any, typeRef: any, api: any) {
const notificationTypeDictRef = dict({
url: "/pi/notification/getTypeDict"
});

View File

@@ -1,12 +1,9 @@
// @ts-ignore
import { useI18n } from "vue-i18n";
import { ref } from "vue";
import { getCommonColumnDefine } from "./common";
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, dict, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
import { AddReq, CreateCrudOptionsProps, CreateCrudOptionsRet, DelReq, EditReq, UserPageQuery, UserPageRes } from "@fast-crud/fast-crud";
import { createNotificationApi } from "/@/views/certd/notification/api";
const api = createNotificationApi();
export default function ({ crudExpose, context }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const { t } = useI18n();
const api = context.api;
const pageRequest = async (query: UserPageQuery): Promise<UserPageRes> => {
return await api.GetList(query);
};

View File

@@ -14,12 +14,14 @@
import { defineComponent, onActivated, onMounted } from "vue";
import { useFs } from "@fast-crud/fast-crud";
import createCrudOptions from "./crud";
import { createApi } from "./api";
import { createNotificationApi } from "./api";
import { notificationProvide } from "/@/views/certd/notification/common";
export default defineComponent({
name: "NotificationManager",
setup() {
const api = createApi();
const api = createNotificationApi();
notificationProvide(api);
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context: { api } });
// 页面打开后获取列表数据

View File

@@ -1,162 +1,163 @@
<template>
<div class="notification-selector">
<span v-if="target?.name" class="mr-5 cd-flex-inline">
<a-tag class="mr-5" color="green">{{ target.name }}</a-tag>
<fs-icon class="cd-icon-button" icon="ion:close-circle-outline" @click="clear"></fs-icon>
</span>
<span v-else class="mlr-5 text-gray">{{ placeholder }}</span>
<a-button class="ml-5" :disabled="disabled" :size="size" @click="chooseForm.open">选择</a-button>
<a-form-item-rest v-if="chooseForm.show">
<a-modal v-model:open="chooseForm.show" title="选择通知渠道" width="905px" @ok="chooseForm.ok">
<div style="height: 400px; position: relative">
<cert-notification-modal v-model="selectedId"></cert-notification-modal>
</div>
</a-modal>
</a-form-item-rest>
<div class="flex-o w-100">
<fs-dict-select
class="flex-1"
:value="modelValue"
:dict="optionsDictRef"
:disabled="disabled"
:render-label="renderLabel"
:slots="selectSlots"
:allow-clear="true"
@update:value="onChange"
/>
<fs-table-select
ref="tableSelectRef"
class="flex-0"
:model-value="modelValue"
:dict="optionsDictRef"
:create-crud-options="createCrudOptions"
:crud-options-override="{
search: { show: false },
table: {
scroll: {
x: 540
}
}
}"
:show-current="false"
:show-select="false"
:dialog="{ width: 960 }"
:destroy-on-close="false"
height="400px"
@update:model-value="onChange"
@dialog-closed="doRefresh"
>
<template #default="scope">
<fs-button class="ml-5" :disabled="disabled" :size="size" type="primary" icon="ant-design:edit-outlined" @click="scope.open"></fs-button>
</template>
</fs-table-select>
</div>
</div>
</template>
<script>
import { defineComponent, reactive, ref, watch, inject } from "vue";
import CertNotificationModal from "./modal/index.vue";
import { createApi } from "../api";
<script lang="tsx" setup>
import { inject, ref, Ref, watch } from "vue";
import { createNotificationApi } from "../api";
import { message } from "ant-design-vue";
import { dict } from "@fast-crud/fast-crud";
import createCrudOptions from "../crud";
import { notificationProvide } from "/@/views/certd/notification/common";
export default defineComponent({
name: "NotificationSelector",
components: { CertNotificationModal },
props: {
modelValue: {
type: [Number, String],
default: null
},
type: {
type: String,
default: ""
},
placeholder: {
type: String,
default: "请选择"
},
size: {
type: String,
default: "middle"
},
disabled: {
type: Boolean,
default: false
},
useDefault: {
type: Boolean,
default: false
}
},
emits: ["update:modelValue", "selectedChange", "change"],
setup(props, ctx) {
const api = createApi();
defineOptions({
name: "NotificationSelector"
});
const target = ref({});
const selectedId = ref();
async function refreshTarget(value) {
selectedId.value = value;
if (value > 0) {
target.value = await api.GetSimpleInfo(value);
}
}
const props = defineProps<{
modelValue?: number | string;
type?: string;
placeholder?: string;
size?: string;
disabled?: boolean;
}>();
async function loadDefault() {
const defId = await api.GetDefaultId();
if (defId) {
await emitValue(defId);
}
}
const onChange = async (value: number) => {
await emitValue(value);
};
loadDefault();
const emit = defineEmits(["update:modelValue", "selectedChange", "change"]);
function clear() {
if (props.disabled) {
return;
}
emitValue(null);
}
async function emitValue(value) {
if (pipeline?.value && target?.value && pipeline.value.userId !== target.value.userId) {
message.error("对不起,您不能修改他人流水线的通知");
return;
}
if (value == null) {
selectedId.value = "";
target.value = null;
} else {
selectedId.value = value;
await refreshTarget(selectedId.value);
}
ctx.emit("change", selectedId.value);
ctx.emit("update:modelValue", selectedId.value);
ctx.emit("selectedChange", target.value);
}
watch(
() => {
return props.modelValue;
},
async (value) => {
selectedId.value = null;
target.value = null;
if (value == null) {
return;
}
await refreshTarget(value);
},
const api = createNotificationApi();
notificationProvide(api);
// const types = ref({});
// async function loadNotificationTypes() {
// const types = await api.GetDefineTypes();
// const map: any = {};
// for (const item of types) {
// map[item.type] = item;
// }
// types.value = map;
// }
// loadNotificationTypes();
const tableSelectRef = ref();
const optionsDictRef = dict({
url: "/pi/notification/options",
value: "id",
label: "name",
onReady: ({ dict }) => {
const data = [
{
immediate: true
}
);
const providerDefine = ref({});
async function refreshProviderDefine(type) {
providerDefine.value = await api.GetProviderDefine(type);
}
// watch(
// () => {
// return props.type;
// },
// async (value) => {
// await refreshProviderDefine(value);
// },
// {
// immediate: true
// }
// );
//当不在pipeline中编辑时可能为空
const pipeline = inject("pipeline", null);
const chooseForm = reactive({
show: false,
open() {
chooseForm.show = true;
id: 0,
name: "使用默认通知",
icon: "ion:notifications"
},
ok: () => {
console.log("choose ok:", selectedId.value);
emitValue(selectedId.value);
chooseForm.show = false;
}
});
return {
clear,
target,
selectedId,
providerDefine,
chooseForm
};
...dict.data
];
dict.setData(data);
}
});
const renderLabel = (option: any) => {
return <span>{option.name}</span>;
};
async function openTableSelectDialog(e: any) {
e.preventDefault();
await tableSelectRef.value.open();
await tableSelectRef.value.crudExpose.openAdd({});
}
const selectSlots = ref({
dropdownRender({ menuNode }: any) {
const res = [];
res.push(menuNode);
res.push(<a-divider style="margin: 4px 0" />);
res.push(<a-space style="padding: 4px 8px" />);
res.push(<fs-button class="w-100" type="text" icon="plus-outlined" text="新建通知渠道" onClick={openTableSelectDialog}></fs-button>);
return res;
}
});
const target: Ref<any> = ref({});
function clear() {
if (props.disabled) {
return;
}
emitValue(null);
}
async function emitValue(value: any) {
target.value = optionsDictRef.dataMap[value];
if (value !== 0 && pipeline?.value && target && pipeline.value.userId !== target.value.userId) {
message.error("对不起,您不能修改他人流水线的通知");
return;
}
emit("change", value);
emit("update:modelValue", value);
}
watch(
() => {
return props.modelValue;
},
async (value) => {
await optionsDictRef.loadDict();
target.value = optionsDictRef.dataMap[value];
emit("selectedChange", target.value);
},
{
immediate: true
}
);
//当不在pipeline中编辑时可能为空
const pipeline = inject("pipeline", null);
async function doRefresh() {
await optionsDictRef.reloadDict();
}
</script>
<style lang="less">
.notification-selector {
width: 100%;
}
</style>

View File

@@ -8,7 +8,7 @@
import { defineComponent, onMounted, watch } from "vue";
import { useFs } from "@fast-crud/fast-crud";
import createCrudOptions from "./crud";
import { createApi } from "../../api";
import { createNotificationApi } from "../../api";
export default defineComponent({
name: "CertNotificationModal",
@@ -17,7 +17,7 @@ export default defineComponent({
},
emits: ["update:modelValue"],
setup(props, ctx) {
const api = createApi();
const api = createNotificationApi();
const context: any = { props, ctx, api };
const { crudBinding, crudRef, crudExpose } = useFs({ createCrudOptions, context });
onMounted(() => {

View File

@@ -10,11 +10,10 @@ export async function GetList(query: any) {
data: query
});
for (const item of list) {
if (item.pipeline) {
if (item.pipeline && typeof item.pipeline === "string") {
item.pipeline = JSON.parse(item.pipeline);
}
}
console.log("history", list);
return list;
}

View File

@@ -29,7 +29,6 @@ function initPlugins(plugins: any) {
plugin.input[key] = field;
}
}
console.log("plugins", plugins);
}
export async function GetList(query: any) {
@@ -56,6 +55,18 @@ export async function GetGroups(query: any) {
return groups;
}
export async function GetPluginDefine(type: string) {
const define = await request({
url: apiPrefix + "/getDefineByType",
method: "post",
data: {
type
}
});
initPlugins([define]);
return define;
}
export async function GetPluginConfig(req: { id?: number; name: string; type: string }): Promise<PluginConfigBean> {
return await request({
url: apiPrefix + "/config",

View File

@@ -1,16 +1,16 @@
import { compute, CreateCrudOptionsRet, dict } from "@fast-crud/fast-crud";
import { PluginGroup } from "@certd/pipeline";
import { useReference } from "/@/use/use-refrence";
import _, { merge } from "lodash-es";
import { useUserStore } from "/@/store/modules/user";
import { useSettingStore } from "/@/store/modules/settings";
import * as api from "../api.plugin";
import NotificationSelector from "/@/views/certd/notification/notification-selector/index.vue";
export default function (certPluginGroup: PluginGroup, formWrapperRef: any): CreateCrudOptionsRet {
export default function (certPlugins: any[], formWrapperRef: any): CreateCrudOptionsRet {
const inputs: any = {};
const userStore = useUserStore();
const settingStore = useSettingStore();
for (const plugin of certPluginGroup.plugins) {
for (const plugin of certPlugins) {
for (const inputKey in plugin.input) {
if (inputs[inputKey]) {
inputs[inputKey].form.show = true;
@@ -107,13 +107,18 @@ export default function (certPluginGroup: PluginGroup, formWrapperRef: any): Cre
title: "失败通知",
type: "text",
form: {
value: 0,
component: {
name: NotificationSelector,
vModel: "modelValue",
useDefault: true
on: {
selectedChange({ $event, form }) {
form.notificationTarget = $event;
}
}
},
order: 101,
helper: "建议设置,任务执行失败实时提醒"
helper: "任务执行失败实时提醒"
}
}
}

View File

@@ -9,6 +9,8 @@ import { ref } from "vue";
import * as _ from "lodash-es";
import * as api from "../api.plugin";
import { PluginGroup, PluginGroups } from "/@/views/certd/pipeline/pipeline/type";
import { GetPluginDefine } from "../api.plugin";
import { createNotificationApi } from "/@/views/certd/notification/api";
export default {
name: "PiCertdForm",
setup(props: any, ctx: any) {
@@ -19,17 +21,29 @@ export default {
const pluginGroups: { [key: string]: PluginGroup } = await api.GetGroups({});
const certPluginGroup = pluginGroups.cert;
const certPlugins = [];
for (const plugin of certPluginGroup.plugins) {
const detail: any = await api.GetPluginDefine(plugin.name);
certPlugins.push(detail);
}
// 自定义表单配置
const { buildFormOptions } = useColumns();
//使用crudOptions结构来构建自定义表单配置
let { crudOptions } = createCrudOptions(certPluginGroup, formWrapperRef);
let { crudOptions } = createCrudOptions(certPlugins, formWrapperRef);
const formOptions = buildFormOptions(
_.merge(crudOptions, {
form: {
doSubmit({ form }: any) {
async doSubmit({ form }: any) {
// 创建certd 的pipeline
doSubmitRef.value({ form });
await doSubmitRef.value({ form });
if (form.email) {
//创建一个默认的邮件通知
const notificationApi = createNotificationApi();
await notificationApi.GetOrCreateDefault({ email: form.email });
}
}
}
}) as any

View File

@@ -14,7 +14,7 @@ import * as _ from "lodash-es";
import { useModal } from "/@/use/use-modal";
import CertView from "./cert-view.vue";
import { eachStages } from "./utils";
import { createApi as createNotificationApi } from "../notification/api";
import { createNotificationApi as createNotificationApi } from "../notification/api";
export default function ({ crudExpose, context: { certdFormRef, groupDictRef, selectedRowKeys } }: CreateCrudOptionsProps): CreateCrudOptionsRet {
const router = useRouter();
const { t } = useI18n();
@@ -102,13 +102,12 @@ export default function ({ crudExpose, context: { certdFormRef, groupDictRef, se
triggers.push({ title: "定时触发", type: "timer", props: { cron: form.triggerCron } });
}
const notifications = [];
if (form.notification) {
const notify = await createNotificationApi().GetSimpleInfo(form.notification);
if (form.notification != null) {
notifications.push({
type: "custom",
when: ["error", "turnToSuccess"],
notificationId: form.notification,
title: notify.name
title: form.notificationTarget?.name || "自定义通知"
});
}
let pipeline = {
@@ -174,16 +173,17 @@ export default function ({ crudExpose, context: { certdFormRef, groupDictRef, se
const downloadCert = async (row: any) => {
const files = await api.GetFiles(row.id);
model.success({
title: "文件下载",
title: "点击链接下载",
maskClosable: true,
okText: "↑↑↑ 点击上面链接下载",
okText: "关闭",
content: () => {
const children = [];
for (const file of files) {
const downloadUrl = `${env.API}/pi/history/download?pipelineId=${row.id}&fileId=${file.id}`;
children.push(
<div>
<div>
<div class={"flex-o m-5"}>
<fs-icon icon={"ant-design:cloud-download-outlined"} class={"mr-5 fs-16"}></fs-icon>
<a href={downloadUrl} target={"_blank"}>
{file.filename}
</a>
@@ -192,7 +192,15 @@ export default function ({ crudExpose, context: { certdFormRef, groupDictRef, se
);
}
return <div class={"mt-3"}>{children}</div>;
if (children.length === 0) {
return <div></div>;
}
return (
<div class={"mt-3"}>
<div> {children}</div>
</div>
);
}
});
};

View File

@@ -239,13 +239,13 @@ export default {
const stepType = step.type;
step.type = stepType;
step._isAdd = false;
let pluginDefine = pluginGroups.get(stepType);
const pluginDefine = await pluginApi.GetPluginDefine(stepType);
// let pluginDefine = pluginGroups.get(stepType);
if (pluginDefine == null) {
console.log("插件未找到", stepType);
return;
}
pluginDefine = _.cloneDeep(pluginDefine);
// pluginDefine = _.cloneDeep(pluginDefine);
const columns = pluginDefine.input;
for (let key in columns) {
const column = columns[key];

View File

@@ -321,7 +321,6 @@ export default defineComponent({
currentHistory.value = history;
pipeline.value = history.pipeline;
await loadCurrentHistoryDetail();
console.log("currentHistory:", currentHistory);
};
async function loadHistoryList(reload = false) {

View File

@@ -15,7 +15,7 @@
<div>
<a-tag color="green" class="flex-inline pointer"> <fs-icon icon="ion:time-outline" class="mr-5"></fs-icon> {{ now }}</a-tag>
<a-badge v-if="userStore.isAdmin" :dot="hasNewVersion">
<a-tag color="blue" class="flex-inline pointer" :title="'最新版本:' + latestVersion">
<a-tag color="blue" class="flex-inline pointer" :title="'最新版本:' + latestVersion" @click="openUpgradeUrl()">
<fs-icon icon="ion:rocket-outline" class="mr-5"></fs-icon>
v{{ version }}
</a-tag>
@@ -210,6 +210,10 @@ onMounted(async () => {
await loadCount();
await loadPluginGroups();
});
function openUpgradeUrl() {
window.open("https://certd.docmirror.cn/guide/install/upgrade.html");
}
</script>
<style lang="less">

View File

@@ -128,7 +128,6 @@ export default defineComponent({
};
const handleFinish = async (values: any) => {
utils.logger.log(values, formState);
loading.value = true;
try {
const loginType = formState.loginType;

View File

@@ -1,11 +1,11 @@
<template>
<fs-page class="cd-page-account">
<template #header>
<div class="title">
站点绑定
<span class="sub">管理你安装过的Certd站点可以通过转移功能避免丢失VIP强烈建议绑定</span>
</div>
</template>
<!-- <template #header>-->
<!-- <div class="title">-->
<!-- 站点绑定-->
<!-- <span class="sub">管理你安装过的Certd站点可以通过转移功能避免丢失VIP强烈建议绑定</span>-->
<!-- </div>-->
<!-- </template>-->
<iframe ref="iframeRef" class="account-iframe" :src="iframeSrcRef"> </iframe>
</fs-page>

View File

@@ -19,7 +19,7 @@
<a-form-item label="公共ZeroSSL EAB授权" :name="['CertApply', 'sysSetting', 'input', 'zerosslCommonEabAccessId']">
<access-selector v-model:model-value="formState.CertApply.sysSetting.input.zerosslCommonEabAccessId" type="eab" from="sys"></access-selector>
<div class="helper">
<div>设置公共ZeroSSL EAB授权给用户使用避免用户自己去翻墙获取Zero EAB授权注意ZeroSSL免费证书有数量限制</div>
<div>设置公共ZeroSSL EAB授权给用户使用避免用户自己去翻墙获取Zero EAB授权</div>
<div>
<a href="https://app.zerossl.com/developer">zerossl开发者中心获取EAB </a>
</div>

View File

@@ -85,3 +85,13 @@ export async function TestSms(data: any) {
data
});
}
export async function GetSmsTypeDefine(type: string) {
return await request({
url: apiPrefix + "/getSmsTypeDefine",
method: "post",
data: {
type
}
});
}

View File

@@ -65,6 +65,7 @@
<a-form :model="testFormState" name="basic" :label-col="{ span: 8 }" :wrapper-col="{ span: 16 }" autocomplete="off" @finish="onTestSend">
<a-form-item label="测试收件邮箱" name="receiver" :rules="[{ required: true, message: '请输入测试收件邮箱' }]">
<a-input v-model:value="testFormState.receiver" />
<div class="helper">保存后再点击测试</div>
<div class="helper">发送失败<a href="https://certd.docmirror.cn/guide/use/email/" target="_blank">邮件配置帮助文档</a></div>
<div class="helper">您还可以试试使用官方邮件服务器</div>
</a-form-item>

View File

@@ -32,23 +32,15 @@
</a-form-item>
<template v-if="formState.public.smsLoginEnabled">
<a-form-item label="短信提供商" :name="['private', 'sms', 'type']">
<a-select v-model:value="formState.private.sms.type">
<a-select-option value="aliyun">阿里云</a-select-option>
<a-select v-model:value="formState.private.sms.type" @change="smsTypeChange">
<a-select-option value="aliyun">阿里云短信</a-select-option>
<a-select-option value="yfysms">易发云短信</a-select-option>
</a-select>
</a-form-item>
<template v-for="item of smsTypeDefineInputs" :key="item.simpleKey">
<fs-form-item v-model="formState.private.sms.config[item.simpleKey]" :path="'private.sms.config' + item.key" :item="item" />
</template>
<a-form-item label="阿里云授权" :name="['private', 'sms', 'config', 'accessId']" :rules="rules.required">
<access-selector v-model="formState.private.sms.config.accessId" />
</a-form-item>
<a-form-item label="短信签名" :name="['private', 'sms', 'config', 'signName']" :rules="rules.required">
<a-input v-model:value="formState.private.sms.config.signName" />
</a-form-item>
<a-form-item label="验证码模版ID" :name="['private', 'sms', 'config', 'codeTemplateId']" :rules="rules.required">
<a-input v-model:value="formState.private.sms.config.codeTemplateId" />
<div class="helper">需要配置一个变量为{code}的验证码模版</div>
</a-form-item>
<a-form-item label="短信测试">
<div class="flex">
<a-input v-model:value="testMobile" placeholder="输入测试手机号" />
@@ -67,8 +59,8 @@
</template>
<script setup lang="tsx">
import { reactive, ref } from "vue";
import { SysSettings } from "/@/views/sys/settings/api";
import { reactive, ref, Ref } from "vue";
import { GetSmsTypeDefine, SysSettings } from "/@/views/sys/settings/api";
import * as api from "/@/views/sys/settings/api";
import { merge } from "lodash-es";
import { useSettingStore } from "/@/store/modules/settings";
@@ -121,9 +113,48 @@ const rules = {
}
};
async function smsTypeChange(value: string) {
if (formState.private?.sms?.config) {
formState.private.sms.config = {};
}
await loadTypeDefine(value);
}
const smsTypeDefineInputs: Ref = ref({});
async function loadTypeDefine(type: string) {
const define: any = await api.GetSmsTypeDefine(type);
const keys = Object.keys(define.input);
const inputs: any = {};
keys.forEach((key) => {
const value = define.input[key];
value.simpleKey = key;
value.key = "private.sms.config." + key;
if (!value.component) {
value.component = {
name: "a-input"
};
}
if (!value.component.name) {
value.component.vModel = "value";
}
if (!value.rules) {
value.rules = [];
}
if (value.required) {
value.rules.push(rules.required);
}
inputs[key] = define.input[key];
});
smsTypeDefineInputs.value = inputs;
}
async function loadSysSettings() {
const data: any = await api.SysSettingsGet();
merge(formState, data);
if (data?.private.sms?.type) {
await loadTypeDefine(data.private.sms.type);
}
}
const saveLoading = ref(false);

View File

@@ -0,0 +1,14 @@
flyway:
scriptDir: './db/migration-mysql'
typeorm:
dataSource:
default:
type: mysql # mariadb
host: localhost
port: 3306
username: root
password: root
database: certd

View File

@@ -1,12 +0,0 @@
{
"extends": "./node_modules/mwts/",
"ignorePatterns": ["node_modules", "dist", "test", "typings"],
"env": {
"mocha": true
},
"rules": {
"max-len": ["error", 160],
"@typescript-eslint/ban-ts-ignore": "off",
"@typescript-eslint/ban-ts-comment": "off"
}
}

View File

@@ -1,7 +0,0 @@
{
"printWidth": 160,
"bracketSpacing": true,
"singleQuote": true,
"trailingComma": "es5",
"arrowParens": "avoid"
}

View File

@@ -1,4 +0,0 @@
module.exports = {
...require('mwts/.prettierrc.json'),
"printWidth": 160,
}

View File

@@ -3,6 +3,45 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.28.4](https://github.com/certd/certd/compare/v1.28.3...v1.28.4) (2024-12-12)
**Note:** Version bump only for package @certd/ui-server
## [1.28.3](https://github.com/certd/certd/compare/v1.28.2...v1.28.3) (2024-12-12)
### Bug Fixes
* mysql下access.setting字段改成text ([b7f5740](https://github.com/certd/certd/commit/b7f5740c57743914f754f3b4fdd94b59a2e8338c))
### Performance Improvements
* 通知标题优化 ([ff083ce](https://github.com/certd/certd/commit/ff083ce6848a8bee3c8248e4b881086ae1517c28))
* 支持腾讯虚拟机开关机([@wujingke](https://github.com/wujingke)) ([8039e8b](https://github.com/certd/certd/commit/8039e8baf83c82d03f1a6198cf61c372026b962b))
* 支持aws cloudfront ([0ae39f1](https://github.com/certd/certd/commit/0ae39f160a7c6b6696b3bf513d68aa28905810ad))
## [1.28.2](https://github.com/certd/certd/compare/v1.28.1...v1.28.2) (2024-12-09)
### Bug Fixes
* 修复创建流水线通知设置无效的bug ([498cf34](https://github.com/certd/certd/commit/498cf34999fddfa24ce088e2e678469fa669abb8))
* 修复流水线分组可以被所有人看见的bug ([a0e838d](https://github.com/certd/certd/commit/a0e838d1eec918e5dc92fe95dc72ac14facb930e))
### Performance Improvements
* 优化数据表索引 ([228fdf0](https://github.com/certd/certd/commit/228fdf0a0d28013f5dd156a97bbde80537e8e97e))
* 支持mysql ([7cde1fd](https://github.com/certd/certd/commit/7cde1fdc4a9ed851900d231a5460c8dbfbcd148e))
## [1.28.1](https://github.com/certd/certd/compare/v1.28.0...v1.28.1) (2024-12-08)
### Performance Improvements
* 通知选择器优化 ([2c0cbdd](https://github.com/certd/certd/commit/2c0cbdd29ecb74cc939b2ae7ee86b8d40f70ba31))
* 新增七牛云插件分组 ([49e7dc5](https://github.com/certd/certd/commit/49e7dc56e1a95fbdea3e30cdeb945b48415b69e3))
* 新增server酱3通知 ([6aa4872](https://github.com/certd/certd/commit/6aa487269c9f6862e188b37a0d6c73f79c937d94))
* 支持易发云短信 ([94fa77f](https://github.com/certd/certd/commit/94fa77fcd2b9bea294fb05736c0d8cdc81f56103))
* cname value优化 ([e8c9c2a](https://github.com/certd/certd/commit/e8c9c2a47d47048ae743b16f7bc932dbe18a89e9))
* favicon支持自定义 ([8b9c47d](https://github.com/certd/certd/commit/8b9c47daf194515006689a212ae9cf586bdf5993))
# [1.28.0](https://github.com/certd/certd/compare/v1.27.9...v1.28.0) (2024-11-30)
### Bug Fixes

View File

@@ -1,29 +1,16 @@
# my_midway_project
# certd-server
## QuickStart
## heap分析
<!-- add docs here for user -->
```shell
# node_modules\@midwayjs\bootstrap\dist\bootstrap.js
# 注释 137行
// process.once('SIGINT', this.onSignal.bind(t
see [midway docs][midway] for more detail.
### Development
```bash
$ npm i
$ npm run dev
$ open http://localhost:7001/
```
### Deploy
```shell
npm run heap
```bash
$ npm start
```
### npm scripts
- Use `npm run lint` to check code style.
- Use `npm test` to run unit test.
[midway]: https://midwayjs.org

View File

@@ -1,5 +1,24 @@
import fs from 'fs';
//读取 packages/core/pipline/package.json的版本号
//删除references
import { default as packageJson } from './tsconfig.json' assert { type: 'json' };
delete packageJson.references;
fs.writeFileSync('./tsconfig.json', JSON.stringify(packageJson, null, 2));
//瘦身
const filePath = './node_modules/typeorm/platform/PlatformTools.js';
const find = `const cli_highlight_1 = require("cli-highlight");`;
const rep = 'const cli_highlight_1 ={highlight: (str) => { return str }};';
// 在 filePath 找到 find那一行 用 rep 替换
function slimming(filePath, find, rep) {
fs.readFile(filePath, 'utf8', function (err, data) {
if (err) {
return console.log(err);
}
var result = data.replace(find, rep);
fs.writeFile(filePath, result, 'utf8', function (err) {
if (err) return console.log(err);
});
});
}
slimming(filePath, find, rep);

View File

@@ -0,0 +1,77 @@
-- 表sys_permission
CREATE TABLE `sys_permission` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `title` varchar(100) NOT NULL, `permission` varchar(100), `parent_id` bigint NOT NULL DEFAULT -1, `sort` bigint NOT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (1, '系统管理', 'sys', -1, 1 );
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (2, '权限管理', 'sys:auth', 1, 1 );
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (3, '用户管理', 'sys:auth:user', 2, 1);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (4, '查看', 'sys:auth:user:view', 3, 100);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (5, '权限管理', 'sys:auth:per', 2, 1 );
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (6, '查看', 'sys:auth:per:view', 5, 100);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (7, '角色管理', 'sys:auth:role', 2, 1 );
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (8, '查看', 'sys:auth:role:view', 7, 1);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (9, '修改', 'sys:auth:user:edit', 3, 300);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (10, '删除', 'sys:auth:user:remove', 3, 400);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (11, '添加', 'sys:auth:user:add', 3, 200);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (12, '修改', 'sys:auth:role:edit', 7, 1);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (13, '删除', 'sys:auth:role:remove', 7, 1);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (14, '添加', 'sys:auth:role:add', 7, 1);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (15, '修改', 'sys:auth:per:edit', 5, 300);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (16, '删除', 'sys:auth:per:remove', 5, 400);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (17, '添加', 'sys:auth:per:add', 5, 200);
INSERT INTO sys_permission (id, title, permission, parent_id, sort) VALUES (18,'授权','sys:auth:role:authz',7,100);
-- 表sys_role
CREATE TABLE `sys_role` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `name` varchar(100) NOT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
INSERT INTO sys_role (id, name) VALUES (1, '管理员');
INSERT INTO sys_role (id, name) VALUES (2, '只读角色');
-- 表sys_role_permission
CREATE TABLE `sys_role_permission` (`role_id` bigint NOT NULL, `permission_id` bigint NOT NULL, PRIMARY KEY (`role_id`, `permission_id`));
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 1);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 2);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 3);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 4);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 5);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 6);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 7);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 8);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 9);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 10);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 11);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 12);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 13);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 14);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 15);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 16);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 17);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, 18);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, -1);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (2, 4);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (2, 6);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (2, 8);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (2, 1);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (2, 2);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (2, 3);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (2, 5);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (2, 7);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (2, -1);
-- 表sys_user
CREATE TABLE `sys_user` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `username` varchar(100) NOT NULL, `password` varchar(100) NOT NULL, `nick_name` varchar(50), `avatar` varchar(255), `phone_code` varchar(20), `mobile` varchar(20), `email` varchar(100),`remark` varchar(100), `status` bigint NOT NULL DEFAULT 1, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
INSERT INTO sys_user (id, username, password, nick_name, avatar, phone_code, mobile, email, status,remark) VALUES (1, 'admin', 'e10adc3949ba59abbe56e057f20f883e', 'admin', NULL, NULL, NULL, NULL, 1, NULL);
INSERT INTO sys_user (id, username, password, nick_name, avatar, phone_code, mobile, email, status,remark) VALUES (2, 'readonly', 'e10adc3949ba59abbe56e057f20f883e', '只读用户', NULL, NULL, NULL, NULL, 0, '密码123456');
-- 表sys_user_role
CREATE TABLE `sys_user_role` (`role_id` bigint NOT NULL, `user_id` bigint NOT NULL, PRIMARY KEY (`role_id`, `user_id`));
INSERT INTO sys_user_role (role_id, user_id) VALUES (1, 1);
INSERT INTO sys_user_role (role_id, user_id) VALUES (2, 2);
-- 索引IDX_223de54d6badbe43a5490450c3
CREATE UNIQUE INDEX `IDX_223de54d6badbe43a5490450c3` ON `sys_role` (`name`);
-- 索引IDX_9e7164b2f1ea1348bc0eb0a7da
CREATE UNIQUE INDEX `IDX_9e7164b2f1ea1348bc0eb0a7da` ON `sys_user` (`username`);

View File

@@ -0,0 +1,4 @@
-- for preview 限制演示环境的数据修改
ALTER TABLE sys_user AUTO_INCREMENT = 1000;
ALTER TABLE sys_permission AUTO_INCREMENT = 1000;
ALTER TABLE sys_role AUTO_INCREMENT = 1000;

View File

@@ -0,0 +1,24 @@
--
-- 由SQLiteStudio v3.3.3 产生的文件 周六 7月 3 00:38:02 2021
--
-- 文本编码UTF-8
--
-- 表cd_access
CREATE TABLE `cd_access` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `user_id` bigint NOT NULL, `name` varchar(100) NOT NULL, `type` varchar(100) NOT NULL, `setting` varchar(1024), `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
-- 表cd_cert
CREATE TABLE `cd_cert` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `user_id` bigint NOT NULL, `domains` varchar(2048) NOT NULL, `email` varchar(100) NOT NULL, `cert_issuer_id` bigint, `challenge_type` varchar(100), `challenge_dns_type` varchar(100),`challenge_access_id` bigint, `country` varchar(100), `state` varchar(100), `locality` varchar(100), `organization` varchar(100), `organization_unit` varchar(100), `remark` varchar(100), `last_history_id` bigint, `last_success_id` bigint, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
-- 表cd_cert_apply_history
CREATE TABLE `cd_cert_apply_history` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `user_id` bigint NOT NULL, `cert_id` bigint NOT NULL, `success` boolean, `result` varchar(1024), `cert_crt` varchar(1024), `cert_key` varchar(1024), `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
-- 表cd_cert_issuer
CREATE TABLE `cd_cert_issuer` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `user_id` bigint NOT NULL, `type` varchar(20) NOT NULL, `account` varchar(100) NOT NULL, `private_key` varchar(1024), `setting` varchar(1024), `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
-- 表cd_task
CREATE TABLE `cd_task` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `user_id` bigint NOT NULL, `name` varchar(100), `type` varchar(100), `setting` varchar(2048), `cert_id` bigint NOT NULL, `last_history_id` bigint, `last_success_id` bigint, `remark` varchar(100), `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
-- 表cd_task_history
CREATE TABLE `cd_task_history` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `user_id` bigint NOT NULL, `task_id` bigint NOT NULL, `cert_id` bigint NOT NULL, `cert_apply_history_id` bigint NOT NULL, `success` boolean, `result` varchar(2048), `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);

View File

@@ -0,0 +1,7 @@
CREATE TABLE `pi_history` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `user_id` bigint NOT NULL, `pipeline_id` bigint NOT NULL, `pipeline` TEXT, `status` varchar(20), `end_time` timestamp, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
CREATE TABLE `pi_history_log` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `user_id` bigint NOT NULL, `pipeline_id` bigint NOT NULL, `history_id` bigint NOT NULL, `node_id` varchar(100), `logs` TEXT, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
CREATE TABLE `pi_pipeline` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `user_id` bigint NOT NULL, `title` varchar(200) NOT NULL, `content` TEXT NOT NULL, `keep_history_count` bigint, `remark` varchar(100), `status` varchar(100), `disabled` boolean DEFAULT 0, `last_history_time` bigint, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);
CREATE TABLE `pi_storage` (`id` bigint PRIMARY KEY AUTO_INCREMENT NOT NULL, `user_id` bigint NOT NULL, `scope` varchar(100) NOT NULL, `namespace` varchar(100) NOT NULL, `version` varchar(100),`key` varchar(100), `value` TEXT, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP);

View File

@@ -0,0 +1,9 @@
CREATE TABLE `sys_settings` (
`id` bigint NOT NULL PRIMARY KEY AUTO_INCREMENT,
`user_id` bigint NOT NULL,
`key` varchar(100) NOT NULL,
`title` varchar(100) NOT NULL,
`setting` varchar(1024),
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);

View File

@@ -0,0 +1 @@
INSERT INTO sys_role (id, name) VALUES (3, '普通用户');

View File

@@ -0,0 +1,22 @@
ALTER TABLE `sys_settings` RENAME TO `user_settings`;
CREATE TABLE `sys_settings` (
`id` bigint NOT NULL PRIMARY KEY AUTO_INCREMENT,
`key` varchar(100) NOT NULL,
`title` varchar(100) NOT NULL,
`setting` varchar(1024),
`access` varchar(100) NOT NULL,
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
SET @parent_id = (SELECT id FROM sys_permission WHERE permission = 'sys');
INSERT INTO sys_permission (title, permission, parent_id, sort) VALUES ('系统设置', 'sys:settings', @parent_id, 1);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, LAST_INSERT_ID());
SET @parent_id = (SELECT id FROM sys_permission WHERE permission = 'sys:settings');
INSERT INTO sys_permission (title, permission, parent_id, sort) VALUES ('查看', 'sys:settings:view',@parent_id, 1);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, LAST_INSERT_ID());
INSERT INTO sys_permission (title, permission, parent_id, sort) VALUES ('编辑', 'sys:settings:edit', @parent_id, 1);
INSERT INTO sys_role_permission (role_id, permission_id) VALUES (1, LAST_INSERT_ID());

View File

@@ -0,0 +1,10 @@
INSERT INTO sys_settings (`key`, title, setting, access)
VALUES (
'sys.install',
'安装信息',
CONCAT('{"installTime":', (SELECT timestamp FROM flyway_history WHERE id = 1), '}'),
'private'
);
ALTER TABLE sys_user ADD COLUMN password_version bigint DEFAULT 1;
ALTER TABLE sys_user ADD COLUMN password_salt varchar(36);

View File

@@ -0,0 +1,3 @@
alter table pi_pipeline add COLUMN `order` bigint default 0;

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