mirror of
https://github.com/certd/certd.git
synced 2026-07-16 10:47:31 +08:00
fix: 修复上传到cos报runtimeDepsService未初始化的问题
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { utils } from "@certd/basic";
|
||||
|
||||
import { CertApplyPluginNames, CertInfo } from "@certd/plugin-cert";
|
||||
@@ -241,7 +241,7 @@ export class DeployCertToAliyunAckPlugin extends AbstractTaskPlugin {
|
||||
}
|
||||
|
||||
async getClient(aliyunProvider: any, regionId: string) {
|
||||
const client = new AliyunClient({ logger: this.logger, useROAClient: true, importRuntime: aliyunProvider.importRuntime.bind(aliyunProvider) });
|
||||
const client = new AliyunClient({ logger: this.logger, useROAClient: true });
|
||||
await client.init({
|
||||
accessKeyId: aliyunProvider.accessKeyId,
|
||||
accessKeySecret: aliyunProvider.accessKeySecret,
|
||||
@@ -275,3 +275,4 @@ export class DeployCertToAliyunAckPlugin extends AbstractTaskPlugin {
|
||||
}
|
||||
|
||||
new DeployCertToAliyunAckPlugin();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { CertApplyPluginNames, CertInfo, CertReader } from "@certd/plugin-cert";
|
||||
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||
import { AliyunAccess } from "../../../plugin-lib/aliyun/access/index.js";
|
||||
@@ -128,7 +128,7 @@ export class AliyunDeployCertToALB extends AbstractTaskPlugin {
|
||||
async onInstance() {}
|
||||
|
||||
async getLBClient(access: AliyunAccess, region: string) {
|
||||
const client = new AliyunClient({ logger: this.logger, importRuntime: access.importRuntime.bind(access) });
|
||||
const client = new AliyunClient({ logger: this.logger });
|
||||
|
||||
const version = "2020-06-16";
|
||||
await client.init({
|
||||
@@ -239,7 +239,7 @@ export class AliyunDeployCertToALB extends AbstractTaskPlugin {
|
||||
access: client.access,
|
||||
logger: this.logger,
|
||||
endpoint: this.casEndpoint,
|
||||
});
|
||||
});
|
||||
|
||||
const certIds = [];
|
||||
for (const item of list) {
|
||||
@@ -295,7 +295,7 @@ export class AliyunDeployCertToALB extends AbstractTaskPlugin {
|
||||
access,
|
||||
logger: this.logger,
|
||||
endpoint: this.casEndpoint,
|
||||
});
|
||||
});
|
||||
|
||||
if (certInfo.crt) {
|
||||
const certName = this.buildCertName(CertReader.getMainDomain(certInfo.crt));
|
||||
@@ -404,3 +404,4 @@ export class AliyunDeployCertToALB extends AbstractTaskPlugin {
|
||||
}
|
||||
|
||||
new AliyunDeployCertToALB();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { optionsUtils } from "@certd/basic";
|
||||
import { optionsUtils } from "@certd/basic";
|
||||
import { AbstractTaskPlugin, CertTargetItem, IsTaskPlugin, Pager, PageSearch, pluginGroups, RunStrategy, TaskInput, TaskOutput } from "@certd/pipeline";
|
||||
import { CertApplyPluginNames, CertReader } from "@certd/plugin-cert";
|
||||
import { CertInfo, createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||
@@ -136,7 +136,7 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
access,
|
||||
logger: this.logger,
|
||||
endpoint: this.endpoint || "cas.aliyuncs.com",
|
||||
});
|
||||
});
|
||||
|
||||
if (this.domainMatchMode === "auto") {
|
||||
const { result, deployedList } = await this.autoMatchedDeploy({
|
||||
@@ -209,7 +209,7 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
}
|
||||
|
||||
async getClient(access: AliyunAccess) {
|
||||
const client = new AliyunClient({ logger: this.logger, importRuntime: access.importRuntime.bind(access) });
|
||||
const client = new AliyunClient({ logger: this.logger });
|
||||
await client.init({
|
||||
accessKeyId: access.accessKeyId,
|
||||
accessKeySecret: access.accessKeySecret,
|
||||
@@ -293,3 +293,4 @@ export class DeployCertToAliyunCDN extends AbstractTaskPlugin {
|
||||
}
|
||||
}
|
||||
new DeployCertToAliyunCDN();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AbstractTaskPlugin, CertTargetItem, IsTaskPlugin, Pager, PageSearch, pluginGroups, RunStrategy, TaskInput, TaskOutput } from "@certd/pipeline";
|
||||
import { AbstractTaskPlugin, CertTargetItem, IsTaskPlugin, Pager, PageSearch, pluginGroups, RunStrategy, TaskInput, TaskOutput } from "@certd/pipeline";
|
||||
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||
import dayjs from "dayjs";
|
||||
import { AliyunAccess } from "../../../plugin-lib/aliyun/access/index.js";
|
||||
@@ -143,7 +143,7 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
||||
}
|
||||
|
||||
async getClient(access: AliyunAccess) {
|
||||
const client = new AliyunClient({ logger: this.logger, importRuntime: access.importRuntime.bind(access) });
|
||||
const client = new AliyunClient({ logger: this.logger });
|
||||
await client.init({
|
||||
accessKeyId: access.accessKeyId,
|
||||
accessKeySecret: access.accessKeySecret,
|
||||
@@ -224,3 +224,4 @@ export class DeployCertToAliyunDCDN extends AbstractTaskPlugin {
|
||||
}
|
||||
}
|
||||
new DeployCertToAliyunDCDN();
|
||||
|
||||
|
||||
@@ -137,8 +137,8 @@ export class AliyunDeployCertToFC extends AbstractTaskPlugin {
|
||||
|
||||
const client = await this.getClient(access);
|
||||
|
||||
const $Util = await access.importRuntime("@alicloud/tea-util");
|
||||
const $OpenApi = await access.importRuntime("@alicloud/openapi-client");
|
||||
const $Util = await this.importRuntime("@alicloud/tea-util");
|
||||
const $OpenApi = await this.importRuntime("@alicloud/openapi-client");
|
||||
|
||||
let privateKey = this.cert.key;
|
||||
try {
|
||||
@@ -204,7 +204,7 @@ export class AliyunDeployCertToFC extends AbstractTaskPlugin {
|
||||
}
|
||||
|
||||
async getClient(access: AliyunAccess) {
|
||||
const $OpenApi = await access.importRuntime("@alicloud/openapi-client");
|
||||
const $OpenApi = await this.importRuntime("@alicloud/openapi-client");
|
||||
const config = new $OpenApi.Config({
|
||||
accessKeyId: access.accessKeyId,
|
||||
accessKeySecret: access.accessKeySecret,
|
||||
@@ -221,8 +221,8 @@ export class AliyunDeployCertToFC extends AbstractTaskPlugin {
|
||||
const access = await this.getAccess<AliyunAccess>(this.accessId);
|
||||
const client = await this.getClient(access);
|
||||
|
||||
const $OpenApi = await access.importRuntime("@alicloud/openapi-client");
|
||||
const $Util = await access.importRuntime("@alicloud/tea-util");
|
||||
const $OpenApi = await this.importRuntime("@alicloud/openapi-client");
|
||||
const $Util = await this.importRuntime("@alicloud/tea-util");
|
||||
const params = new $OpenApi.Params({
|
||||
// 接口名称
|
||||
action: "ListCustomDomains",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { CertInfo, CertReader } from "@certd/plugin-cert";
|
||||
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||
import { CertApplyPluginNames } from "@certd/plugin-cert";
|
||||
@@ -117,7 +117,7 @@ export class AliyunDeployCertToNLB extends AbstractTaskPlugin {
|
||||
async onInstance() {}
|
||||
|
||||
async getLBClient(access: AliyunAccess, region: string) {
|
||||
const client = new AliyunClient({ logger: this.logger, importRuntime: access.importRuntime.bind(access) });
|
||||
const client = new AliyunClient({ logger: this.logger });
|
||||
|
||||
const version = "2022-04-30";
|
||||
await client.init({
|
||||
@@ -221,7 +221,7 @@ export class AliyunDeployCertToNLB extends AbstractTaskPlugin {
|
||||
access: client.access,
|
||||
logger: this.logger,
|
||||
endpoint: this.casEndpoint,
|
||||
});
|
||||
});
|
||||
|
||||
const certIds = [];
|
||||
for (const item of list) {
|
||||
@@ -286,7 +286,7 @@ export class AliyunDeployCertToNLB extends AbstractTaskPlugin {
|
||||
access,
|
||||
logger: this.logger,
|
||||
endpoint: this.casEndpoint,
|
||||
});
|
||||
});
|
||||
|
||||
const certName = this.buildCertName(CertReader.getMainDomain(certInfo.crt));
|
||||
|
||||
@@ -389,3 +389,4 @@ export class AliyunDeployCertToNLB extends AbstractTaskPlugin {
|
||||
}
|
||||
|
||||
new AliyunDeployCertToNLB();
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ export class DeployCertToAliyunOSS extends AbstractTaskPlugin {
|
||||
|
||||
async getClient(access: AliyunAccess) {
|
||||
// @ts-ignore
|
||||
const OSS = await access.importRuntime("ali-oss");
|
||||
const OSS = await this.importRuntime("ali-oss");
|
||||
return new OSS.default({
|
||||
accessKeyId: access.accessKeyId,
|
||||
accessKeySecret: access.accessKeySecret,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, PageSearch, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, PageSearch, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { CertInfo } from "@certd/plugin-cert";
|
||||
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||
import { CertApplyPluginNames } from "@certd/plugin-cert";
|
||||
@@ -130,7 +130,7 @@ export class AliyunDeployCertToSLB extends AbstractTaskPlugin {
|
||||
async onInstance() {}
|
||||
|
||||
async getLBClient(access: AliyunAccess, region: string) {
|
||||
const client = new AliyunClient({ logger: this.logger, importRuntime: access.importRuntime.bind(access) });
|
||||
const client = new AliyunClient({ logger: this.logger });
|
||||
const version = "2014-05-15";
|
||||
await client.init({
|
||||
accessKeyId: access.accessKeyId,
|
||||
@@ -234,7 +234,7 @@ export class AliyunDeployCertToSLB extends AbstractTaskPlugin {
|
||||
access,
|
||||
logger: this.logger,
|
||||
endpoint: this.casEndpoint,
|
||||
});
|
||||
});
|
||||
|
||||
if (typeof this.cert === "object") {
|
||||
const name = this.appendTimeSuffix("certd");
|
||||
@@ -412,3 +412,4 @@ export class AliyunDeployCertToSLB extends AbstractTaskPlugin {
|
||||
}
|
||||
|
||||
new AliyunDeployCertToSLB();
|
||||
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, Pager, PageSearch, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, Pager, PageSearch, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { CertApplyPluginNames, CertInfo, CertReader } from "@certd/plugin-cert";
|
||||
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||
import { AliyunAccess } from "../../../plugin-lib/aliyun/access/index.js";
|
||||
@@ -103,7 +103,7 @@ export class AliyunDeployCertToWafCloud extends AbstractTaskPlugin {
|
||||
async onInstance() {}
|
||||
|
||||
async getWafClient(access: AliyunAccess) {
|
||||
const client = new AliyunClient({ logger: this.logger, importRuntime: access.importRuntime.bind(access) });
|
||||
const client = new AliyunClient({ logger: this.logger });
|
||||
await client.init({
|
||||
accessKeyId: access.accessKeyId,
|
||||
accessKeySecret: access.accessKeySecret,
|
||||
@@ -316,3 +316,4 @@ export class AliyunDeployCertToWafCloud extends AbstractTaskPlugin {
|
||||
}
|
||||
|
||||
new AliyunDeployCertToWafCloud();
|
||||
|
||||
|
||||
+4
-3
@@ -1,4 +1,4 @@
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, Pager, PageSearch, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { AbstractTaskPlugin, IsTaskPlugin, Pager, PageSearch, pluginGroups, RunStrategy, TaskInput } from "@certd/pipeline";
|
||||
import { CertApplyPluginNames, CertInfo, CertReader } from "@certd/plugin-cert";
|
||||
import { createCertDomainGetterInputDefine, createRemoteSelectInputDefine } from "@certd/plugin-lib";
|
||||
import { AliyunAccess } from "../../../plugin-lib/aliyun/access/index.js";
|
||||
@@ -115,7 +115,7 @@ export class AliyunDeployCertToWaf extends AbstractTaskPlugin {
|
||||
async onInstance() {}
|
||||
|
||||
async getWafClient(access: AliyunAccess) {
|
||||
const client = new AliyunClient({ logger: this.logger, importRuntime: access.importRuntime.bind(access) });
|
||||
const client = new AliyunClient({ logger: this.logger });
|
||||
await client.init({
|
||||
accessKeyId: access.accessKeyId,
|
||||
accessKeySecret: access.accessKeySecret,
|
||||
@@ -144,7 +144,7 @@ export class AliyunDeployCertToWaf extends AbstractTaskPlugin {
|
||||
access,
|
||||
logger: this.logger,
|
||||
endpoint: this.casEndpoint,
|
||||
});
|
||||
});
|
||||
|
||||
const cert = this.cert as CertInfo;
|
||||
const casCert = this.cert as CasCertInfo;
|
||||
@@ -250,3 +250,4 @@ export class AliyunDeployCertToWaf extends AbstractTaskPlugin {
|
||||
}
|
||||
|
||||
new AliyunDeployCertToWaf();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user