mirror of https://github.com/certd/certd
refactor: pipeline edit view
parent
e1466737e3
commit
25d5a99b3d
|
@ -1,5 +1,5 @@
|
||||||
import { AbstractAccess } from "./abstract-access";
|
import { AbstractAccess } from "./abstract-access";
|
||||||
|
|
||||||
export interface IAccessService {
|
export interface IAccessService {
|
||||||
getById(id: any): AbstractAccess;
|
getById(id: any): Promise<AbstractAccess>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import { Registrable } from "../registry";
|
import { Registrable } from "../registry";
|
||||||
import { FormItemProps } from "@fast-crud/fast-crud";
|
import { FormItemProps } from "@fast-crud/fast-crud";
|
||||||
|
import { accessRegistry } from "./registry";
|
||||||
|
|
||||||
export type AccessDefine = Registrable & {
|
export type AccessDefine = Registrable & {
|
||||||
input: {
|
input: {
|
||||||
|
@ -9,5 +10,6 @@ export type AccessDefine = Registrable & {
|
||||||
export function IsAccess(define: AccessDefine) {
|
export function IsAccess(define: AccessDefine) {
|
||||||
return function (target: any) {
|
return function (target: any) {
|
||||||
target.prototype.define = define;
|
target.prototype.define = define;
|
||||||
|
accessRegistry.install(target);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
import { Registry } from "../registry";
|
||||||
|
import { AbstractAccess } from "./abstract-access";
|
||||||
|
|
||||||
|
// @ts-ignore
|
||||||
|
export const accessRegistry = new Registry<typeof AbstractAccess>();
|
|
@ -52,7 +52,7 @@ export class DeployCertToAliyunCDN extends AbstractPlugin implements TaskPlugin
|
||||||
|
|
||||||
async execute(input: TaskInput): Promise<TaskOutput> {
|
async execute(input: TaskInput): Promise<TaskOutput> {
|
||||||
console.log("开始部署证书到阿里云cdn");
|
console.log("开始部署证书到阿里云cdn");
|
||||||
const access = this.accessService.getById(input.accessId) as AliyunAccess;
|
const access = (await this.accessService.getById(input.accessId)) as AliyunAccess;
|
||||||
const client = this.getClient(access);
|
const client = this.getClient(access);
|
||||||
const params = await this.buildParams(input);
|
const params = await this.buildParams(input);
|
||||||
await this.doRequest(client, params);
|
await this.doRequest(client, params);
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit c9bae7552e25828d9a29d5be71b518b082c71eed
|
Subproject commit ae0676e9e3e32a9359195a1f0ab4b83c941698c1
|
|
@ -1 +1 @@
|
||||||
Subproject commit cb01f4fddf910d81b44556c907acea54dc298d5d
|
Subproject commit 1f108c8ee8d455eb9d99cd9131bf5bdc474efc0a
|
Loading…
Reference in New Issue