mirror of
https://github.com/certd/certd.git
synced 2026-06-27 14:07:33 +08:00
Merge branch 'v2-dev' into v2-invite
This commit is contained in:
@@ -104,6 +104,8 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
action: DeployCertToAliyunCDN.prototype.onGetDomainList.name,
|
||||
watches: ['certDomains', 'accessId'],
|
||||
required: true,
|
||||
pageSize: 100,
|
||||
search:true,
|
||||
mergeScript: `
|
||||
return {
|
||||
show: ctx.compute(({form})=>{
|
||||
@@ -256,9 +258,10 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
|
||||
const pager = new Pager(data)
|
||||
const params = {
|
||||
// 'DomainName': 'aaa',
|
||||
DomainName: data.searchKey,
|
||||
PageSize: pager.pageSize || 100,
|
||||
PageNumber: pager.pageNo || 1,
|
||||
DomainSearchType: "fuzzy_match"
|
||||
};
|
||||
|
||||
const requestOption = {
|
||||
@@ -275,7 +278,7 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
total: 0,
|
||||
};
|
||||
}
|
||||
const total = res?.Domains?.TotalCount || 0;
|
||||
const total = res?.TotalCount || 0;
|
||||
const options = pageData.map((item: any) => {
|
||||
return {
|
||||
value: item.DomainName,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AbstractTaskPlugin, CertTargetItem, IsTaskPlugin, PageSearch, pluginGroups, RunStrategy, TaskInput, TaskOutput } from '@certd/pipeline';
|
||||
import { AbstractTaskPlugin, CertTargetItem, IsTaskPlugin, Pager, PageSearch, pluginGroups, RunStrategy, TaskInput, TaskOutput } from '@certd/pipeline';
|
||||
import {
|
||||
createCertDomainGetterInputDefine,
|
||||
createRemoteSelectInputDefine
|
||||
@@ -76,6 +76,8 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
||||
action: DeployCertToAliyunDCDN.prototype.onGetDomainList.name,
|
||||
watches: ['certDomains', 'accessId'],
|
||||
required: true,
|
||||
pageSize: 100,
|
||||
search:true,
|
||||
pager:true,
|
||||
mergeScript: `
|
||||
return {
|
||||
@@ -196,10 +198,12 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
|
||||
const client = await this.getClient(access);
|
||||
|
||||
const pager = new Pager(data)
|
||||
const params = {
|
||||
PageNumber: data.pageNo || 1,
|
||||
PageSize: 500,
|
||||
DomainName: data.searchKey,
|
||||
PageSize: pager.pageSize || 200,
|
||||
PageNumber: pager.pageNo || 1,
|
||||
DomainSearchType: "fuzzy_match"
|
||||
};
|
||||
|
||||
const requestOption = {
|
||||
@@ -210,7 +214,7 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
||||
const res = await client.request('DescribeDcdnUserDomains', params, requestOption);
|
||||
this.checkRet(res);
|
||||
const pageData = res?.Domains?.PageData || [];
|
||||
const total = res?.Domains?.TotalCount || 0;
|
||||
const total = res?.TotalCount || 0;
|
||||
|
||||
const options = pageData.map((item: any) => {
|
||||
return {
|
||||
|
||||
@@ -332,15 +332,22 @@ export class AcmeService {
|
||||
value: recordValue,
|
||||
};
|
||||
this.logger.info("添加 TXT 解析记录", JSON.stringify(recordReq));
|
||||
const recordRes = await dnsProvider.createRecord(recordReq);
|
||||
this.logger.info("添加 TXT 解析记录成功", JSON.stringify(recordRes));
|
||||
return {
|
||||
recordReq,
|
||||
recordRes,
|
||||
dnsProvider,
|
||||
challenge,
|
||||
keyAuthorization,
|
||||
};
|
||||
try {
|
||||
const recordRes = await dnsProvider.createRecord(recordReq);
|
||||
this.logger.info("添加 TXT 解析记录成功", JSON.stringify(recordRes));
|
||||
return {
|
||||
recordReq,
|
||||
recordRes,
|
||||
dnsProvider,
|
||||
challenge,
|
||||
keyAuthorization,
|
||||
};
|
||||
} catch (e: any) {
|
||||
//@ts-ignore
|
||||
e.message = `[${dnsProvider?.constructor?.name}错误] ${e.message}`;
|
||||
throw e
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const doDnsPersistVerify = async (challenge: any, plan: DnsPersistVerifyPlan) => {
|
||||
|
||||
@@ -230,7 +230,7 @@ export class CertApplyPlugin extends CertApplyBasePlugin {
|
||||
if(form.challengeType === 'cname' ){
|
||||
return '请按照上面的提示,给要申请证书的域名添加CNAME记录,添加后,点击验证,验证成功后不要删除记录,申请和续期证书会一直用它'
|
||||
}else if (form.challengeType === 'http'){
|
||||
return '请按照上面的提示,给每个域名设置文件上传配置,证书申请过程中会上传校验文件到网站根目录的.well-known/acme-challenge/目录下'
|
||||
return '请按照上面的提示,给每个域名设置文件上传配置,证书申请过程中会上传校验文件到网站根目录文件夹下,请确保该校验文件可以公网http访问到'
|
||||
}else if (form.challengeType === 'dnses'){
|
||||
return '给每个域名单独配置dns提供商'
|
||||
}else if (form.challengeType === 'dns-persist'){
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ export class NginxProxyManagerDeploy extends AbstractTaskPlugin {
|
||||
action: "onGetProxyHostOptions",
|
||||
search: true,
|
||||
pager: false,
|
||||
multi: true,
|
||||
single: false,
|
||||
watches: ["certDomains", "accessId"],
|
||||
},
|
||||
helper: "选择要绑定此证书的一个或多个代理主机。",
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@ describe("VolcengineDeployToVKE", () => {
|
||||
it("uses a single-select cluster field", () => {
|
||||
const clusterInput = (VolcengineDeployToVKE as any).define.input.clusterId;
|
||||
|
||||
assert.equal(clusterInput.component.multi, false);
|
||||
assert.equal(clusterInput.component.mode, "default");
|
||||
assert.equal(clusterInput.component.single, true);
|
||||
assert.equal(clusterInput.component.mode, "tags");
|
||||
});
|
||||
|
||||
it("sends the configured string ClusterId", async () => {
|
||||
|
||||
Reference in New Issue
Block a user