Compare commits

..

8 Commits

Author SHA1 Message Date
xiaojunnuo edda1b57f3 chore: 火山vod 上传后等待3秒 2026-07-09 19:09:08 +08:00
xiaojunnuo 5a7766992d chore: 修复update domain传参问题 2026-07-09 16:42:48 +08:00
xiaojunnuo 02dabe11db fix: 修复火山引擎查不到自定义源站域名的问题 2026-07-09 16:39:08 +08:00
xiaojunnuo 58024128d8 Merge branch 'v2-dev' of https://github.com/certd/certd into v2-dev 2026-07-09 14:47:33 +08:00
xiaojunnuo e44bf9d773 fix: 修复火山引擎自定义源站域名查询不到的问题 2026-07-09 14:47:05 +08:00
xiaojunnuo 1114223bda build: release 2026-07-09 00:00:53 +08:00
xiaojunnuo 55022e5fa6 build: publish 2026-07-08 23:48:41 +08:00
xiaojunnuo ae732fb298 build: trigger build image 2026-07-08 23:48:29 +08:00
19 changed files with 69 additions and 71 deletions
+2 -2
View File
@@ -281,12 +281,12 @@ export class DemoTest extends AbstractTaskPlugin {
return { return {
value: item.siteName, value: item.siteName,
label: item.siteName, label: item.siteName,
domain: item.siteName, domain: item.siteName, //这里必须要包含domain 否则后面分组时候全部分配到未匹配中
}; };
}); });
//将站点域名名称根据证书域名进行匹配分组,分成匹配的和不匹配的两组选项,返回给前端,供用户选择 //将站点域名名称根据证书域名进行匹配分组,分成匹配的和不匹配的两组选项,返回给前端,供用户选择
return { return {
list: optionsUtils.buildGroupOptions(options, this.certDomains), list: optionsUtils.buildGroupOptions(options, this.certDomains), //分组后的列表
total: siteRes.length, total: siteRes.length,
}; };
} }
+6
View File
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.42.3](https://github.com/certd/certd/compare/v1.42.2...v1.42.3) (2026-07-08)
### Bug Fixes
* **volcengine-alb:** 修复火山引擎ALB 默认证书部署类型会部署到扩展证书的问题 ([0a068a2](https://github.com/certd/certd/commit/0a068a274673e9768954e9f7367c267d44f3b530))
## [1.42.2](https://github.com/certd/certd/compare/v1.42.1...v1.42.2) (2026-07-07) ## [1.42.2](https://github.com/certd/certd/compare/v1.42.1...v1.42.2) (2026-07-07)
### Bug Fixes ### Bug Fixes
+1 -1
View File
@@ -75,5 +75,5 @@
"bugs": { "bugs": {
"url": "https://github.com/publishlab/node-acme-client/issues" "url": "https://github.com/publishlab/node-acme-client/issues"
}, },
"gitHead": "7808d028e9c7e1b1e3ebc41f12b023d7b553300b" "gitHead": "a6ef6996c3a68ce0c2a4577a0934ed74a53f0515"
} }
+1 -1
View File
@@ -54,5 +54,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "7808d028e9c7e1b1e3ebc41f12b023d7b553300b" "gitHead": "a6ef6996c3a68ce0c2a4577a0934ed74a53f0515"
} }
+1 -1
View File
@@ -51,5 +51,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "7808d028e9c7e1b1e3ebc41f12b023d7b553300b" "gitHead": "a6ef6996c3a68ce0c2a4577a0934ed74a53f0515"
} }
+1 -1
View File
@@ -30,5 +30,5 @@
"prettier": "3.3.3", "prettier": "3.3.3",
"tslib": "^2.8.1" "tslib": "^2.8.1"
}, },
"gitHead": "7808d028e9c7e1b1e3ebc41f12b023d7b553300b" "gitHead": "a6ef6996c3a68ce0c2a4577a0934ed74a53f0515"
} }
+1 -1
View File
@@ -37,5 +37,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "7808d028e9c7e1b1e3ebc41f12b023d7b553300b" "gitHead": "a6ef6996c3a68ce0c2a4577a0934ed74a53f0515"
} }
+1 -1
View File
@@ -62,5 +62,5 @@
"fetch" "fetch"
] ]
}, },
"gitHead": "7808d028e9c7e1b1e3ebc41f12b023d7b553300b" "gitHead": "a6ef6996c3a68ce0c2a4577a0934ed74a53f0515"
} }
+1 -1
View File
@@ -38,5 +38,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "7808d028e9c7e1b1e3ebc41f12b023d7b553300b" "gitHead": "a6ef6996c3a68ce0c2a4577a0934ed74a53f0515"
} }
+1 -1
View File
@@ -69,5 +69,5 @@
"typeorm": "^0.3.20", "typeorm": "^0.3.20",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "7808d028e9c7e1b1e3ebc41f12b023d7b553300b" "gitHead": "a6ef6996c3a68ce0c2a4577a0934ed74a53f0515"
} }
+1 -1
View File
@@ -52,5 +52,5 @@
"typeorm": "^0.3.20", "typeorm": "^0.3.20",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "7808d028e9c7e1b1e3ebc41f12b023d7b553300b" "gitHead": "a6ef6996c3a68ce0c2a4577a0934ed74a53f0515"
} }
+1 -1
View File
@@ -38,5 +38,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "7808d028e9c7e1b1e3ebc41f12b023d7b553300b" "gitHead": "a6ef6996c3a68ce0c2a4577a0934ed74a53f0515"
} }
+1 -1
View File
@@ -45,5 +45,5 @@
"tslib": "^2.8.1", "tslib": "^2.8.1",
"typescript": "^5.4.2" "typescript": "^5.4.2"
}, },
"gitHead": "7808d028e9c7e1b1e3ebc41f12b023d7b553300b" "gitHead": "a6ef6996c3a68ce0c2a4577a0934ed74a53f0515"
} }
@@ -132,6 +132,5 @@ export class MainConfiguration {
logger.info(text); logger.info(text);
}); });
logger.info("当前环境:", this.app.getEnv()); // prod logger.info("当前环境:", this.app.getEnv()); // prod
} }
} }
@@ -65,7 +65,7 @@ export class MineController extends BaseController {
user.needInitAccount = true; user.needInitAccount = true;
} }
} }
return this.ok(user); return this.ok(user);
} }
@@ -150,7 +150,7 @@ export class MineController extends BaseController {
@Post("/accountInit", { description: Constants.per.authOnly, summary: "初始化Let's Encrypt ACME账号和邮件通知" }) @Post("/accountInit", { description: Constants.per.authOnly, summary: "初始化Let's Encrypt ACME账号和邮件通知" })
public async accountInit(@Body("email") email?: string) { public async accountInit(@Body("email") email?: string) {
let userId = this.getUserId(); const userId = this.getUserId();
let userEmail = email; let userEmail = email;
let user: any = null; let user: any = null;
if (!userEmail) { if (!userEmail) {
@@ -190,7 +190,7 @@ export class MineController extends BaseController {
type: "acmeAccount", type: "acmeAccount",
name: "Let's Encrypt", name: "Let's Encrypt",
userId, userId,
projectId:undefined, projectId: undefined,
setting: JSON.stringify({ setting: JSON.stringify({
caType: "letsencrypt", caType: "letsencrypt",
email: userEmail, email: userEmail,
@@ -114,7 +114,7 @@ export class AsiaIspClient {
if (response.code !== "0") { if (response.code !== "0") {
this.logger.error(`接口请求失败: code=${response.code}, msg=${response.msg}`); this.logger.error(`接口请求失败: code=${response.code}, msg=${response.msg}`);
const e= new Error(response.msg || "接口请求失败"); const e = new Error(response.msg || "接口请求失败");
// @ts-ignore // @ts-ignore
e.errorCode = response.code; e.errorCode = response.code;
throw e; throw e;
@@ -122,9 +122,9 @@ export class AsiaIspClient {
return response; return response;
} catch (error: any) { } catch (error: any) {
const response = error.response const response = error.response;
if (response && response.data) { if (response && response.data) {
const e = new Error(response.data.msg || error.message || "接口请求失败"); const e = new Error(response.data.msg || error.message || "接口请求失败");
// @ts-ignore // @ts-ignore
e.errorCode = response.data.code; e.errorCode = response.data.code;
throw e; throw e;
@@ -245,7 +245,7 @@ export class AsiaIspClient {
this.logger.info(`域名 ${req.domain} 已绑定该证书 ${req.certId},无需重复绑定`); this.logger.info(`域名 ${req.domain} 已绑定该证书 ${req.certId},无需重复绑定`);
return; return;
} }
throw e throw e;
} }
this.logger.info(`部署证书到域名成功: ${req.domain}, certId=${req.certId}`); this.logger.info(`部署证书到域名成功: ${req.domain}, certId=${req.certId}`);
} }
@@ -78,6 +78,7 @@ export class VolcengineDeployToVOD extends AbstractTaskPlugin {
options: [ options: [
{ value: "play", label: "点播加速域名" }, { value: "play", label: "点播加速域名" },
{ value: "image", label: "封面加速域名" }, { value: "image", label: "封面加速域名" },
{ value: "third", label: "自定义源站" },
], ],
}, },
value: "play", value: "play",
@@ -85,29 +86,12 @@ export class VolcengineDeployToVOD extends AbstractTaskPlugin {
}) })
domainType!: string; domainType!: string;
@TaskInput({
title: "源站类型",
helper: "选择源站类型",
value: 1,
component: {
name: "a-select",
vModel: "value",
options: [
{ value: 1, label: "点播源站" },
{ value: 2, label: "自定义源站" },
],
helper: "注意:封面加速域名不支持自定义源站",
},
required: false,
})
sourceStationType!: number | undefined;
@TaskInput( @TaskInput(
createRemoteSelectInputDefine({ createRemoteSelectInputDefine({
title: "域名", title: "域名",
helper: "选择要部署证书的域名\n需要先在域名管理页面进行证书中心访问授权(即点击去配置SSL证书)", helper: "选择要部署证书的域名\n需要先在域名管理页面进行证书中心访问授权(即点击去配置SSL证书)",
action: VolcengineDeployToVOD.prototype.onGetDomainList.name, action: VolcengineDeployToVOD.prototype.onGetDomainList.name,
watches: ["certDomains", "accessId", "spaceName", "domainType", "sourceStationType"], watches: ["certDomains", "accessId", "spaceName", "domainType"],
required: true, required: true,
}) })
) )
@@ -124,19 +108,25 @@ export class VolcengineDeployToVOD extends AbstractTaskPlugin {
const access = await this.getAccess<VolcengineAccess>(this.accessId); const access = await this.getAccess<VolcengineAccess>(this.accessId);
const certId = await this.uploadOrGetCertId(access); const certId = await this.uploadOrGetCertId(access);
await this.ctx.utils.sleep(3000);
const domainTypeMapping: Record<string, string> = {
play: "vod_play",
image: "vod_image",
};
const apiDomainType = domainTypeMapping[this.domainType] || this.domainType;
const service = await this.getVodService({ version: "2023-07-01", region: this.regionId }); const service = await this.getVodService({ version: "2026-01-01", region: this.regionId });
const domains = Array.isArray(this.domainList) ? this.domainList : [this.domainList]; const domains = Array.isArray(this.domainList) ? this.domainList : [this.domainList];
for (const domain of domains) { for (const domain of domains) {
this.logger.info(`开始部署域名${domain}证书`); this.logger.info(`开始部署域名${domain}证书`);
await service.request({ await service.request({
action: "UpdateDomainConfig", action: "UpdateVodDomainConfig",
method: "POST", method: "POST",
body: { body: {
SpaceName: this.spaceName, SpaceName: this.spaceName,
DomainType: this.domainType, DomainType: apiDomainType,
Domain: domain, UpdateCdnConfigParam: {
Config: { Domain: domain,
HTTPS: { HTTPS: {
Switch: true, Switch: true,
CertInfo: { CertInfo: {
@@ -221,38 +211,41 @@ export class VolcengineDeployToVOD extends AbstractTaskPlugin {
if (!this.spaceName) { if (!this.spaceName) {
throw new Error("请先选择空间名称"); throw new Error("请先选择空间名称");
} }
const service = await this.getVodService({ version: "2023-01-01", region: this.regionId }); const service = await this.getVodService({ version: "2026-01-01", region: this.regionId });
const query: Record<string, any> = { const domainTypeMapping: Record<string, string> = {
SpaceName: this.spaceName, play: "vod_play",
DomainType: this.domainType, image: "vod_image",
}; };
if (this.sourceStationType !== undefined) { const apiDomainType = domainTypeMapping[this.domainType] || this.domainType;
query.SourceStationType = this.sourceStationType;
}
const body: Record<string, any> = {
SpaceName: this.spaceName,
ListCdnDomainsParam: {
PageNum: 1,
PageSize: 100,
},
};
if (apiDomainType) {
body.DomainType = apiDomainType;
}
const res = await service.request({ const res = await service.request({
action: "ListDomain", action: "ListVodDomains",
query, method: "POST",
body,
}); });
const instances = res.Result?.PlayInstanceInfo?.ByteInstances; const domains = res.Result?.VodInfo?.Domains;
if (!instances || instances.length === 0) { if (!domains || domains.length === 0) {
throw new Error("找不到域名,您也可以手动输入域名"); return [];
}
const list = [];
for (const item of instances) {
if (item.Domains && item.Domains.length > 0) {
for (const domain of item.Domains) {
if (domain.Domain) {
list.push({
value: domain.Domain,
label: domain.Domain,
});
}
}
}
} }
const list = domains.map((item: any) => {
return {
value: item.Domain,
label: item.Domain,
domain : item.Domain,
};
});
return this.ctx.utils.options.buildGroupOptions(list, this.certDomains); return this.ctx.utils.options.buildGroupOptions(list, this.certDomains);
} }
} }
+1 -1
View File
@@ -1 +1 @@
20:04 23:48
+1 -1
View File
@@ -1 +1 @@
21:20 00:00