refactor: pipeline edit view

This commit is contained in:
xiaojunnuo
2022-10-27 09:26:32 +08:00
parent e1466737e3
commit 25d5a99b3d
6 changed files with 11 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
import { AbstractAccess } from "./abstract-access";
export interface IAccessService {
getById(id: any): AbstractAccess;
getById(id: any): Promise<AbstractAccess>;
}

View File

@@ -1,5 +1,6 @@
import { Registrable } from "../registry";
import { FormItemProps } from "@fast-crud/fast-crud";
import { accessRegistry } from "./registry";
export type AccessDefine = Registrable & {
input: {
@@ -9,5 +10,6 @@ export type AccessDefine = Registrable & {
export function IsAccess(define: AccessDefine) {
return function (target: any) {
target.prototype.define = define;
accessRegistry.install(target);
};
}

View File

@@ -0,0 +1,5 @@
import { Registry } from "../registry";
import { AbstractAccess } from "./abstract-access";
// @ts-ignore
export const accessRegistry = new Registry<typeof AbstractAccess>();

View File

@@ -52,7 +52,7 @@ export class DeployCertToAliyunCDN extends AbstractPlugin implements TaskPlugin
async execute(input: TaskInput): Promise<TaskOutput> {
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 params = await this.buildParams(input);
await this.doRequest(client, params);