mirror of
https://github.com/certd/certd.git
synced 2026-04-05 23:40:55 +08:00
Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d6a945763 | ||
|
|
4fe5939d0b | ||
|
|
bcaf54d4cb | ||
|
|
44d43f45cb | ||
|
|
9f0ee219d0 | ||
|
|
5164116bde | ||
|
|
02404bc97e | ||
|
|
0ebdb037b5 | ||
|
|
a8b60c32b3 | ||
|
|
416621d503 | ||
|
|
b917eb447c | ||
|
|
2ce3c71b88 | ||
|
|
ca13bfa5f8 | ||
|
|
d8812196f3 | ||
|
|
4e750bdbe1 | ||
|
|
f59a37b77c | ||
|
|
ea3db93db9 | ||
|
|
26f2c9fea2 | ||
|
|
290cc0d1bb | ||
|
|
78044c062e | ||
|
|
3a2f653229 | ||
|
|
bbe22e6f36 | ||
|
|
d4474ff0fb | ||
|
|
c7979f1be5 | ||
|
|
ada0b7106e | ||
|
|
c3a5542935 | ||
|
|
287c3688fd | ||
|
|
3948b3993f |
26
CHANGELOG.md
26
CHANGELOG.md
@@ -3,6 +3,32 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 禁止爬虫爬取本网站 ([5164116](https://github.com/certd/certd/commit/5164116bde60dabac774cdf94f5317ff386e95ca))
|
||||
* 上传到阿里云证书名称后缀增加毫秒时间戳 ([9f0ee21](https://github.com/certd/certd/commit/9f0ee219d02907ffe128a5cf10173397d934ccd7))
|
||||
* 支持部署到阿里云FC3.0 ([bcaf54d](https://github.com/certd/certd/commit/bcaf54d4cb7bc469486aae6cdb127ae017eb3abb))
|
||||
* 支持新版本LeCDN ([44d43f4](https://github.com/certd/certd/commit/44d43f45cb9094619df7494c2a64a51ba77ad116))
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package root
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 适配最新版1panel密码编码方式 ([78044c0](https://github.com/certd/certd/commit/78044c062e20cdd04f08baef9fb6745bf25eddcf))
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复腾讯云CLB多域名同证书部署报错的bug ([c3a5542](https://github.com/certd/certd/commit/c3a55429357e78f4b78c9592d3e5897db2d4d549))
|
||||
* 修复新版本1panel密码需要加密,无法登录的问题 ([ada0b71](https://github.com/certd/certd/commit/ada0b7106e97e551783829e4e719f76793a7123d))
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -16,7 +16,6 @@ Certd 是一个免费全自动申请和自动部署更新SSL证书的管理系
|
||||
* 私有化部署,数据保存本地,授权信息加密存储,镜像由Github Actions构建,过程公开透明
|
||||
* 支持SQLite,PostgreSQL、MySQL数据库
|
||||
|
||||
|
||||
>
|
||||
> 流水线数量现已调整为无限制,欢迎大家使用
|
||||
>
|
||||
|
||||
@@ -1 +1 @@
|
||||
23:39
|
||||
15:10
|
||||
|
||||
@@ -7,6 +7,7 @@ services:
|
||||
restart: unless-stopped # 自动重启
|
||||
volumes:
|
||||
# ↓↓↓↓↓ -------------------------------------------------------- 数据库以及证书存储路径,默认存在宿主机的/data/certd/目录下,【您需要定时备份此目录,以保障数据容灾】
|
||||
# 只要修改冒号前面的,冒号后面的别动
|
||||
- /data/certd:/app/data
|
||||
ports: # 端口映射
|
||||
# ↓↓↓↓ ---------------------------------------------------------- 如果端口有冲突,可以修改第一个7001为其他不冲突的端口号
|
||||
|
||||
@@ -78,15 +78,16 @@ export default defineConfig({
|
||||
]
|
||||
},
|
||||
{ text: "演示教程", link: "/guide/tutorial.md" },
|
||||
{ text: "版本升级", link: "/guide/install/upgrade.md" },
|
||||
{ text: "切换数据库", link: "/guide/install/database.md" }
|
||||
{ text: "版本升级", link: "/guide/install/upgrade.md" }
|
||||
]
|
||||
},
|
||||
{
|
||||
text: "特性",
|
||||
items: [
|
||||
{ text: "CNAME代理校验", link: "/guide/feature/cname/index.md" },
|
||||
{ text: "插件列表", link: "/guide/plugins.md" }
|
||||
{ text: "插件列表", link: "/guide/plugins.md" },
|
||||
{ text: "多数据库支持", link: "/guide/install/database.md" },
|
||||
{ text: "开放接口", link: "/guide/open/index.md" }
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
@@ -3,6 +3,34 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package root
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 适配最新版1panel密码编码方式 ([78044c0](https://github.com/certd/certd/commit/78044c062e20cdd04f08baef9fb6745bf25eddcf))
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复腾讯云CLB多域名同证书部署报错的bug ([c3a5542](https://github.com/certd/certd/commit/c3a55429357e78f4b78c9592d3e5897db2d4d549))
|
||||
* 修复新版本1panel密码需要加密,无法登录的问题 ([ada0b71](https://github.com/certd/certd/commit/ada0b7106e97e551783829e4e719f76793a7123d))
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 当前置任务被删除时进行校验 ([c89686a](https://github.com/certd/certd/commit/c89686a2fda251484930f0ae715417b618c21690))
|
||||
* 修复cloudflare删除解析记录报错的bug ([00c2da4](https://github.com/certd/certd/commit/00c2da444f84adb89f3f1226d03294d7c6e3e4f1))
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 上传自定义证书 ([75a38d9](https://github.com/certd/certd/commit/75a38d95f305b4271d9106babe7cffc1c89ae8f3))
|
||||
|
||||
## [1.30.1](https://github.com/certd/certd/compare/v1.30.0...v1.30.1) (2025-01-20)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -20,7 +20,7 @@ https://1panel.cn/docs/installation/online_installation/
|
||||

|
||||
|
||||
> 默认使用sqlite数据库,数据保存在`/data/certd`目录下,您可以手动备份该目录
|
||||
> certd还支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../../database/)
|
||||
> certd还支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../database)
|
||||
|
||||
3. 访问测试
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
点击确定,等待启动完成
|
||||

|
||||
|
||||
> certd默认使用sqlite数据库,另外支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../../database/)
|
||||
> certd默认使用sqlite数据库,另外支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../database)
|
||||
|
||||
|
||||
## 二、访问应用
|
||||
|
||||
@@ -42,7 +42,7 @@ docker compose up -d
|
||||
> 如果提示 没有docker compose命令,请安装docker-compose
|
||||
> https://docs.docker.com/compose/install/linux/
|
||||
|
||||
> certd默认使用sqlite数据库,另外还支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../../database/)
|
||||
> certd默认使用sqlite数据库,另外还支持`mysql`和`postgresql`数据库,[点我了解如何切换其他数据库](../database)
|
||||
|
||||
|
||||
### 3. 访问测试
|
||||
|
||||
BIN
docs/guide/open/images/1.png
Normal file
BIN
docs/guide/open/images/1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
21
docs/guide/open/index.md
Normal file
21
docs/guide/open/index.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# 开放接口
|
||||
被动方式对第三方提供证书, 支持根据域名或证书id获取证书。
|
||||
|
||||
## 获取keyId和KeySecret
|
||||
|
||||

|
||||
|
||||
## 接口文档
|
||||
|
||||
https://apifox.com/apidoc/shared-2e76f8c4-7c58-413b-a32d-a1316529af44/254949529e0
|
||||
|
||||
## Token生成方法
|
||||
|
||||
header中传入x-certd-token即可调用开放接口
|
||||
1、首先从OpenKey页面生成keyId,keySecret;
|
||||
2、准备一个content( json字符串): content={"keyId":keyId, t:时间戳秒数, encrypt:false, signType:"md5"} `// encrypt返回结果是否加密`
|
||||
3、将content加上keySecret进行签名: sign = md5(content + keySecret)
|
||||
4、然后将content和sign分别base64后用.号连接: x-certd-token = base64(content) +"."+base64(sign)
|
||||
|
||||
## SDK
|
||||
待开发
|
||||
@@ -1,2 +1,2 @@
|
||||
User-agent: *
|
||||
Allow: /
|
||||
Disallow: /
|
||||
|
||||
@@ -9,5 +9,5 @@
|
||||
}
|
||||
},
|
||||
"npmClient": "pnpm",
|
||||
"version": "1.30.2"
|
||||
"version": "1.30.6"
|
||||
}
|
||||
|
||||
@@ -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.30.6](https://github.com/publishlab/node-acme-client/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
## [1.30.5](https://github.com/publishlab/node-acme-client/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
## [1.30.4](https://github.com/publishlab/node-acme-client/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
## [1.30.3](https://github.com/publishlab/node-acme-client/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
## [1.30.2](https://github.com/publishlab/node-acme-client/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/acme-client
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"description": "Simple and unopinionated ACME client",
|
||||
"private": false,
|
||||
"author": "nmorsman",
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"type": "module",
|
||||
"module": "scr/index.js",
|
||||
"main": "src/index.js",
|
||||
@@ -18,7 +18,7 @@
|
||||
"types"
|
||||
],
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.30.2",
|
||||
"@certd/basic": "^1.30.6",
|
||||
"@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": "089825d3602440188392f7018d0eb9038617c1d6"
|
||||
"gitHead": "4e750bdbe109e300a5a17a783aa00d2f0eb6daac"
|
||||
}
|
||||
|
||||
@@ -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.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 支持新版本LeCDN ([44d43f4](https://github.com/certd/certd/commit/44d43f45cb9094619df7494c2a64a51ba77ad116))
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/basic
|
||||
|
||||
@@ -1 +1 @@
|
||||
16:07
|
||||
01:03
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/basic",
|
||||
"private": false,
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -44,5 +44,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "089825d3602440188392f7018d0eb9038617c1d6"
|
||||
"gitHead": "4e750bdbe109e300a5a17a783aa00d2f0eb6daac"
|
||||
}
|
||||
|
||||
@@ -6,7 +6,12 @@ function md5(data: string) {
|
||||
function sha256(data: string) {
|
||||
return crypto.createHash('sha256').update(data).digest('hex');
|
||||
}
|
||||
|
||||
function base64(data: string) {
|
||||
return Buffer.from(data).toString('base64');
|
||||
}
|
||||
export const hashUtils = {
|
||||
md5,
|
||||
sha256,
|
||||
base64,
|
||||
};
|
||||
|
||||
@@ -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.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 上传到阿里云证书名称后缀增加毫秒时间戳 ([9f0ee21](https://github.com/certd/certd/commit/9f0ee219d02907ffe128a5cf10173397d934ccd7))
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/pipeline
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/pipeline",
|
||||
"private": false,
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -16,8 +16,8 @@
|
||||
"test": "mocha --loader=ts-node/esm"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.30.2",
|
||||
"@certd/plus-core": "^1.30.2",
|
||||
"@certd/basic": "^1.30.6",
|
||||
"@certd/plus-core": "^1.30.6",
|
||||
"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": "089825d3602440188392f7018d0eb9038617c1d6"
|
||||
"gitHead": "4e750bdbe109e300a5a17a783aa00d2f0eb6daac"
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ export abstract class AbstractTaskPlugin implements ITaskPlugin {
|
||||
if (name == null) {
|
||||
name = "certd";
|
||||
}
|
||||
return name + "_" + dayjs().format("YYYYMMDDHHmmss");
|
||||
return name + "_" + dayjs().format("YYYYMMDDHHmmssSSS");
|
||||
}
|
||||
|
||||
async onRequest(req: PluginRequestHandleReq<any>) {
|
||||
|
||||
@@ -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.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-huawei
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-huawei",
|
||||
"private": false,
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"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": "089825d3602440188392f7018d0eb9038617c1d6"
|
||||
"gitHead": "4e750bdbe109e300a5a17a783aa00d2f0eb6daac"
|
||||
}
|
||||
|
||||
@@ -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.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-iframe
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-iframe",
|
||||
"private": false,
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -30,5 +30,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "089825d3602440188392f7018d0eb9038617c1d6"
|
||||
"gitHead": "4e750bdbe109e300a5a17a783aa00d2f0eb6daac"
|
||||
}
|
||||
|
||||
@@ -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.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-k8s
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/lib-k8s",
|
||||
"private": false,
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"module": "./dist/index.js",
|
||||
@@ -16,7 +16,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/basic": "^1.30.2",
|
||||
"@certd/basic": "^1.30.6",
|
||||
"@kubernetes/client-node": "0.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -31,5 +31,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "089825d3602440188392f7018d0eb9038617c1d6"
|
||||
"gitHead": "4e750bdbe109e300a5a17a783aa00d2f0eb6daac"
|
||||
}
|
||||
|
||||
@@ -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.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/lib-server
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/lib-server",
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -27,10 +27,10 @@
|
||||
],
|
||||
"license": "AGPL",
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.30.2",
|
||||
"@certd/basic": "^1.30.2",
|
||||
"@certd/pipeline": "^1.30.2",
|
||||
"@certd/plus-core": "^1.30.2",
|
||||
"@certd/acme-client": "^1.30.6",
|
||||
"@certd/basic": "^1.30.6",
|
||||
"@certd/pipeline": "^1.30.6",
|
||||
"@certd/plus-core": "^1.30.6",
|
||||
"@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": "089825d3602440188392f7018d0eb9038617c1d6"
|
||||
"gitHead": "4e750bdbe109e300a5a17a783aa00d2f0eb6daac"
|
||||
}
|
||||
|
||||
@@ -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.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/midway-flyway-js
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/midway-flyway-js",
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"description": "midway with flyway, sql upgrade way ",
|
||||
"private": false,
|
||||
"type": "module",
|
||||
@@ -46,5 +46,5 @@
|
||||
"typeorm": "^0.3.11",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "089825d3602440188392f7018d0eb9038617c1d6"
|
||||
"gitHead": "4e750bdbe109e300a5a17a783aa00d2f0eb6daac"
|
||||
}
|
||||
|
||||
@@ -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.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-cert
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-cert",
|
||||
"private": false,
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -15,10 +15,10 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@certd/acme-client": "^1.30.2",
|
||||
"@certd/basic": "^1.30.2",
|
||||
"@certd/pipeline": "^1.30.2",
|
||||
"@certd/plugin-lib": "^1.30.2",
|
||||
"@certd/acme-client": "^1.30.6",
|
||||
"@certd/basic": "^1.30.6",
|
||||
"@certd/pipeline": "^1.30.6",
|
||||
"@certd/plugin-lib": "^1.30.6",
|
||||
"@google-cloud/publicca": "^1.3.0",
|
||||
"dayjs": "^1.11.7",
|
||||
"jszip": "^3.10.1",
|
||||
@@ -41,5 +41,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "089825d3602440188392f7018d0eb9038617c1d6"
|
||||
"gitHead": "4e750bdbe109e300a5a17a783aa00d2f0eb6daac"
|
||||
}
|
||||
|
||||
@@ -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.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
**Note:** Version bump only for package @certd/plugin-lib
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "@certd/plugin-lib",
|
||||
"private": false,
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"type": "module",
|
||||
"main": "./dist/index.js",
|
||||
"types": "./dist/index.d.ts",
|
||||
@@ -16,8 +16,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@alicloud/pop-core": "^1.7.10",
|
||||
"@certd/basic": "^1.30.2",
|
||||
"@certd/pipeline": "^1.30.2",
|
||||
"@certd/basic": "^1.30.6",
|
||||
"@certd/pipeline": "^1.30.6",
|
||||
"@kubernetes/client-node": "0.21.0",
|
||||
"ali-oss": "^6.21.0",
|
||||
"basic-ftp": "^5.0.5",
|
||||
@@ -48,5 +48,5 @@
|
||||
"tslib": "^2.8.1",
|
||||
"typescript": "^5.4.2"
|
||||
},
|
||||
"gitHead": "089825d3602440188392f7018d0eb9038617c1d6"
|
||||
"gitHead": "4e750bdbe109e300a5a17a783aa00d2f0eb6daac"
|
||||
}
|
||||
|
||||
@@ -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.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
**Note:** Version bump only for package @certd/ui-client
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/ui-client
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/ui-client
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
**Note:** Version bump only for package @certd/ui-client
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-client",
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "vite --open",
|
||||
@@ -66,8 +66,8 @@
|
||||
"vuedraggable": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@certd/lib-iframe": "^1.30.2",
|
||||
"@certd/pipeline": "^1.30.2",
|
||||
"@certd/lib-iframe": "^1.30.6",
|
||||
"@certd/pipeline": "^1.30.6",
|
||||
"@rollup/plugin-commonjs": "^25.0.7",
|
||||
"@rollup/plugin-node-resolve": "^15.2.3",
|
||||
"@types/chai": "^4.3.12",
|
||||
|
||||
@@ -3,6 +3,29 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.30.6](https://github.com/certd/certd/compare/v1.30.5...v1.30.6) (2025-02-24)
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* 上传到阿里云证书名称后缀增加毫秒时间戳 ([9f0ee21](https://github.com/certd/certd/commit/9f0ee219d02907ffe128a5cf10173397d934ccd7))
|
||||
* 支持部署到阿里云FC3.0 ([bcaf54d](https://github.com/certd/certd/commit/bcaf54d4cb7bc469486aae6cdb127ae017eb3abb))
|
||||
|
||||
## [1.30.5](https://github.com/certd/certd/compare/v1.30.4...v1.30.5) (2025-02-14)
|
||||
|
||||
**Note:** Version bump only for package @certd/ui-server
|
||||
|
||||
## [1.30.4](https://github.com/certd/certd/compare/v1.30.3...v1.30.4) (2025-02-14)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 适配最新版1panel密码编码方式 ([78044c0](https://github.com/certd/certd/commit/78044c062e20cdd04f08baef9fb6745bf25eddcf))
|
||||
|
||||
## [1.30.3](https://github.com/certd/certd/compare/v1.30.2...v1.30.3) (2025-02-13)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* 修复腾讯云CLB多域名同证书部署报错的bug ([c3a5542](https://github.com/certd/certd/commit/c3a55429357e78f4b78c9592d3e5897db2d4d549))
|
||||
|
||||
## [1.30.2](https://github.com/certd/certd/compare/v1.30.1...v1.30.2) (2025-02-09)
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
@@ -11,6 +11,5 @@
|
||||
|
||||
```shell
|
||||
npm run heap
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@certd/ui-server",
|
||||
"version": "1.30.2",
|
||||
"version": "1.30.6",
|
||||
"description": "fast-server base midway",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
@@ -30,22 +30,26 @@
|
||||
"slimming": "node ./slimming.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@alicloud/fc20230330": "^4.1.7",
|
||||
"@alicloud/openapi-client": "^0.4.12",
|
||||
"@alicloud/pop-core": "^1.7.10",
|
||||
"@alicloud/tea-typescript": "^1.8.0",
|
||||
"@alicloud/tea-util": "^1.4.10",
|
||||
"@aws-sdk/client-acm": "^3.699.0",
|
||||
"@aws-sdk/client-cloudfront": "^3.699.0",
|
||||
"@aws-sdk/client-s3": "^3.705.0",
|
||||
"@certd/acme-client": "^1.30.2",
|
||||
"@certd/basic": "^1.30.2",
|
||||
"@certd/commercial-core": "^1.30.2",
|
||||
"@certd/lib-huawei": "^1.30.2",
|
||||
"@certd/lib-k8s": "^1.30.2",
|
||||
"@certd/lib-server": "^1.30.2",
|
||||
"@certd/midway-flyway-js": "^1.30.2",
|
||||
"@certd/pipeline": "^1.30.2",
|
||||
"@certd/plugin-cert": "^1.30.2",
|
||||
"@certd/plugin-lib": "^1.30.2",
|
||||
"@certd/plugin-plus": "^1.30.2",
|
||||
"@certd/plus-core": "^1.30.2",
|
||||
"@certd/acme-client": "^1.30.6",
|
||||
"@certd/basic": "^1.30.6",
|
||||
"@certd/commercial-core": "^1.30.6",
|
||||
"@certd/lib-huawei": "^1.30.6",
|
||||
"@certd/lib-k8s": "^1.30.6",
|
||||
"@certd/lib-server": "^1.30.6",
|
||||
"@certd/midway-flyway-js": "^1.30.6",
|
||||
"@certd/pipeline": "^1.30.6",
|
||||
"@certd/plugin-cert": "^1.30.6",
|
||||
"@certd/plugin-lib": "^1.30.6",
|
||||
"@certd/plugin-plus": "^1.30.6",
|
||||
"@certd/plus-core": "^1.30.6",
|
||||
"@corsinvest/cv4pve-api-javascript": "^8.3.0",
|
||||
"@huaweicloud/huaweicloud-sdk-cdn": "^3.1.120",
|
||||
"@huaweicloud/huaweicloud-sdk-core": "^3.1.120",
|
||||
|
||||
@@ -87,7 +87,7 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
let certId: any = this.cert;
|
||||
if (typeof this.cert === 'object') {
|
||||
certId = await sslClient.uploadCert({
|
||||
name: this.appendTimeSuffix('certd'),
|
||||
name: this.appendTimeSuffix(this.certName),
|
||||
cert: this.cert,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,215 @@
|
||||
import { IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline';
|
||||
import { CertInfo } from '@certd/plugin-cert';
|
||||
import { AliyunAccess, createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from '@certd/plugin-lib';
|
||||
import { AbstractPlusTaskPlugin } from '@certd/plugin-plus';
|
||||
|
||||
@IsTaskPlugin({
|
||||
name: 'AliyunDeployCertToFC',
|
||||
title: '阿里云-部署至阿里云FC(3.0)',
|
||||
icon: 'ant-design:aliyun-outlined',
|
||||
group: pluginGroups.aliyun.key,
|
||||
desc: '部署证书到阿里云函数计算(FC3.0),【注意】证书的加密算法必须选择【pkcs1旧版】',
|
||||
needPlus: true,
|
||||
default: {
|
||||
strategy: {
|
||||
runStrategy: RunStrategy.SkipWhenSucceed,
|
||||
},
|
||||
},
|
||||
})
|
||||
export class AliyunDeployCertToFC extends AbstractPlusTaskPlugin {
|
||||
@TaskInput({
|
||||
title: '域名证书',
|
||||
helper: '请选择证书申请任务输出的域名证书',
|
||||
component: {
|
||||
name: 'output-selector',
|
||||
from: ['CertApply', 'CertApplyLego'],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
cert!: CertInfo;
|
||||
|
||||
@TaskInput(createCertDomainGetterInputDefine({ props: { required: false } }))
|
||||
certDomains!: string[];
|
||||
|
||||
@TaskInput({
|
||||
title: 'FC大区',
|
||||
value: 'cn-hangzhou',
|
||||
component: {
|
||||
name: 'a-auto-complete',
|
||||
vModel: 'value',
|
||||
options: [
|
||||
{ value: 'cn-qingdao', label: '华北1(青岛)' },
|
||||
{ value: 'cn-beijing', label: '华北2(北京)' },
|
||||
{ value: 'cn-zhangjiakou', label: '华北 3(张家口)' },
|
||||
{ value: 'cn-huhehaote', label: '华北5(呼和浩特)' },
|
||||
{ value: 'cn-hangzhou', label: '华东1(杭州)' },
|
||||
{ value: 'cn-shanghai', label: '华东2(上海)' },
|
||||
{ value: 'cn-shenzhen', label: '华南1(深圳)' },
|
||||
{ value: 'ap-southeast-2', label: '澳大利亚(悉尼)' },
|
||||
{ value: 'eu-central-1', label: '德国(法兰克福)' },
|
||||
{ value: 'ap-southeast-3', label: '马来西亚(吉隆坡)' },
|
||||
{ value: 'us-east-1', label: '美国(弗吉尼亚)' },
|
||||
{ value: 'us-west-1', label: '美国(硅谷)' },
|
||||
{ value: 'ap-northeast-1', label: '日本(东京)' },
|
||||
{ value: 'ap-southeast-7', label: '泰国(曼谷)' },
|
||||
{ value: 'cn-chengdu', label: '西南1(成都)' },
|
||||
{ value: 'ap-southeast-1', label: '新加坡' },
|
||||
{ value: 'ap-south-1', label: '印度(孟买)' },
|
||||
{ value: 'ap-southeast-5', label: '印度尼西亚(雅加达)' },
|
||||
{ value: 'eu-west-1', label: '英国(伦敦)' },
|
||||
{ value: 'cn-hongkong', label: '中国香港' },
|
||||
],
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
regionId!: string;
|
||||
|
||||
@TaskInput({
|
||||
title: 'Access授权',
|
||||
helper: '阿里云授权AccessKeyId、AccessKeySecret',
|
||||
component: {
|
||||
name: 'access-selector',
|
||||
type: 'aliyun',
|
||||
},
|
||||
required: true,
|
||||
})
|
||||
accessId!: string;
|
||||
|
||||
@TaskInput(
|
||||
createRemoteSelectInputDefine({
|
||||
title: 'FC域名',
|
||||
helper: "请选择要部署证书的域名\n【注意】证书的加密算法必须选择【pkcs1旧版】(否则会报'private key' has to be in PEM format错误)",
|
||||
typeName: 'AliyunDeployCertToFC',
|
||||
action: AliyunDeployCertToFC.prototype.onGetDomainList.name,
|
||||
watches: ['accessId', 'regionId'],
|
||||
})
|
||||
)
|
||||
fcDomains!: string[];
|
||||
|
||||
@TaskInput({
|
||||
title: '域名支持的协议类型',
|
||||
component: {
|
||||
name: 'a-select',
|
||||
value: '',
|
||||
options: [
|
||||
{ value: '', label: '保持原样(适用于原来已经开启了HTTPS)' },
|
||||
{ value: 'HTTPS', label: '仅HTTPS' },
|
||||
{ value: 'HTTP,HTTPS', label: 'HTTP与HTTPS同时支持' },
|
||||
],
|
||||
},
|
||||
})
|
||||
protocol!: string;
|
||||
|
||||
async onInstance() {}
|
||||
|
||||
async execute(): Promise<void> {
|
||||
this.logger.info('开始部署证书到阿里云');
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
|
||||
const client = await this.getClient(access);
|
||||
|
||||
const $Util = await import('@alicloud/tea-util');
|
||||
const $OpenApi = await import('@alicloud/openapi-client');
|
||||
for (const domainName of this.fcDomains) {
|
||||
const params = new $OpenApi.Params({
|
||||
// 接口名称
|
||||
action: 'UpdateCustomDomain',
|
||||
// 接口版本
|
||||
version: '2023-03-30',
|
||||
// 接口协议
|
||||
protocol: 'HTTPS',
|
||||
// 接口 HTTP 方法
|
||||
method: 'PUT',
|
||||
authType: 'AK',
|
||||
style: 'FC',
|
||||
// 接口 PATH
|
||||
pathname: `/2023-03-30/custom-domains/${domainName}`,
|
||||
// 接口请求体内容格式
|
||||
reqBodyType: 'json',
|
||||
// 接口响应体内容格式
|
||||
bodyType: 'json',
|
||||
});
|
||||
// body params
|
||||
const body: { [key: string]: any } = {
|
||||
certConfig: {
|
||||
certName: this.appendTimeSuffix('certd_fc'),
|
||||
certificate: this.cert.crt,
|
||||
privateKey: this.cert.key,
|
||||
},
|
||||
};
|
||||
if (this.protocol) {
|
||||
body.protocol = this.protocol;
|
||||
}
|
||||
|
||||
const runtime = new $Util.RuntimeOptions({});
|
||||
const request = new $OpenApi.OpenApiRequest({ body });
|
||||
// 复制代码运行请自行打印 API 的返回值
|
||||
// 返回值实际为 Map 类型,可从 Map 中获得三类数据:响应体 body、响应头 headers、HTTP 返回的状态码 statusCode。
|
||||
await client.callApi(params, request, runtime);
|
||||
this.logger.info(`部署[${domainName}]成功`);
|
||||
}
|
||||
}
|
||||
|
||||
async getClient(access: AliyunAccess) {
|
||||
const $OpenApi = await import('@alicloud/openapi-client');
|
||||
const config = new $OpenApi.Config({
|
||||
accessKeyId: access.accessKeyId,
|
||||
accessKeySecret: access.accessKeySecret,
|
||||
});
|
||||
// Endpoint 请参考 https://api.aliyun.com/product/FC
|
||||
config.endpoint = `1831228848739566.${this.regionId}.fc.aliyuncs.com`;
|
||||
return new $OpenApi.default.default(config);
|
||||
}
|
||||
|
||||
async onGetDomainList(data: any) {
|
||||
if (!this.accessId) {
|
||||
throw new Error('请选择Access授权');
|
||||
}
|
||||
const access = await this.accessService.getById<AliyunAccess>(this.accessId);
|
||||
const client = await this.getClient(access);
|
||||
|
||||
const $OpenApi = await import('@alicloud/openapi-client');
|
||||
const $Util = await import('@alicloud/tea-util');
|
||||
const params = new $OpenApi.Params({
|
||||
// 接口名称
|
||||
action: 'ListCustomDomains',
|
||||
// 接口版本
|
||||
version: '2023-03-30',
|
||||
// 接口协议
|
||||
protocol: 'HTTPS',
|
||||
// 接口 HTTP 方法
|
||||
method: 'GET',
|
||||
authType: 'AK',
|
||||
style: 'FC',
|
||||
// 接口 PATH
|
||||
pathname: `/2023-03-30/custom-domains`,
|
||||
// 接口请求体内容格式
|
||||
reqBodyType: 'json',
|
||||
// 接口响应体内容格式
|
||||
bodyType: 'json',
|
||||
});
|
||||
|
||||
const runtime = new $Util.RuntimeOptions({});
|
||||
const request = new $OpenApi.OpenApiRequest({});
|
||||
// 复制代码运行请自行打印 API 的返回值
|
||||
// 返回值实际为 Map 类型,可从 Map 中获得三类数据:响应体 body、响应头 headers、HTTP 返回的状态码 statusCode。
|
||||
const res = await client.callApi(params, request, runtime);
|
||||
|
||||
const list = res?.body?.customDomains;
|
||||
if (!list || list.length === 0) {
|
||||
throw new Error('没有找到FC域名,请先创建FC域名');
|
||||
}
|
||||
|
||||
const options = list.map((item: any) => {
|
||||
return {
|
||||
label: item.domainName,
|
||||
value: item.domainName,
|
||||
title: item.domainName,
|
||||
domain: item.domainName,
|
||||
};
|
||||
});
|
||||
return this.ctx.utils.options.buildGroupOptions(options, this.certDomains);
|
||||
}
|
||||
}
|
||||
|
||||
new AliyunDeployCertToFC();
|
||||
@@ -3,3 +3,7 @@ export * from './deploy-to-dcdn/index.js';
|
||||
export * from './deploy-to-oss/index.js';
|
||||
export * from './upload-to-aliyun/index.js';
|
||||
export * from './deploy-to-waf/index.js';
|
||||
export * from './deploy-to-alb/index.js';
|
||||
export * from './deploy-to-nlb/index.js';
|
||||
export * from './deploy-to-slb/index.js';
|
||||
export * from './deploy-to-fc/index.js';
|
||||
|
||||
@@ -206,7 +206,24 @@ export class DeployCertToTencentCLB extends AbstractTaskPlugin {
|
||||
params.Domain = domain;
|
||||
const ret = await client.ModifyDomainAttributes(params);
|
||||
this.checkRet(ret);
|
||||
this.logger.info('设置腾讯云CLB证书(sni)成功:', ret.RequestId, '->loadBalancerId:', this.loadBalancerId, 'listenerId', this.listenerId, 'domain:', domain);
|
||||
this.logger.info(
|
||||
`[${domain}] 设置腾讯云CLB证书(sni)任务已提交:taskId:${ret.RequestId},loadBalancerId:${this.loadBalancerId},listenerId:${this.listenerId}`
|
||||
);
|
||||
|
||||
const requestId = ret.RequestId;
|
||||
while (true) {
|
||||
const statusRes = await client.DescribeTaskStatus({ TaskId: requestId });
|
||||
|
||||
if (statusRes.Status === 0) {
|
||||
this.logger.info(`[${domain}] 腾讯云CLB证书(sni)设置成功`);
|
||||
break;
|
||||
} else if (statusRes.Status === 2) {
|
||||
this.logger.info(`[${domain}] 腾讯云CLB证书(sni)设置进行中,请耐心等待`);
|
||||
} else if (statusRes.Status === 1) {
|
||||
throw new Error(`[${domain}] 腾讯云CLB证书(sni)设置失败:` + statusRes.Message);
|
||||
}
|
||||
await this.ctx.utils.sleep(5000);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
appendTimeSuffix(name: string) {
|
||||
|
||||
Reference in New Issue
Block a user