Files
certd/packages/core/pipeline/test/echo-plugin.ts

31 lines
649 B
TypeScript
Raw Normal View History

2023-05-24 17:30:42 +08:00
import { Autowire, ILogger, IsTaskPlugin, ITaskPlugin, TaskInput, TaskOutput } from "../src";
2022-10-26 09:02:47 +08:00
2023-01-07 23:22:02 +08:00
@IsTaskPlugin({
name: "EchoPlugin",
title: "测试插件【echo】",
2022-10-26 09:02:47 +08:00
})
2023-01-07 23:22:02 +08:00
export class EchoPlugin implements ITaskPlugin {
@TaskInput({
title: "cert",
component: {
name: "pi-output-selector",
},
helper: "输出选择",
})
cert!: any;
@Autowire()
2023-01-11 20:39:48 +08:00
logger!: ILogger;
2023-01-07 23:22:02 +08:00
@TaskOutput({
title: "cert info",
})
certInfo!: any;
// eslint-disable-next-line @typescript-eslint/no-empty-function
2023-05-09 10:16:49 +08:00
async onInstance(): Promise<void> {}
2023-01-07 23:22:02 +08:00
async execute(): Promise<void> {
console.log("input :cert", this.cert);
2022-10-26 09:02:47 +08:00
}
}