mirror of
https://github.com/certd/certd.git
synced 2026-04-16 05:50:50 +08:00
refactor: register
This commit is contained in:
25
packages/plugins/plugin-all/test/plugin/echo-plugin.ts
Normal file
25
packages/plugins/plugin-all/test/plugin/echo-plugin.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Autowire, IsTaskPlugin, TaskInput, ITaskPlugin } from "@certd/pipeline";
|
||||
|
||||
@IsTaskPlugin({
|
||||
name: "EchoPlugin",
|
||||
title: "测试插件",
|
||||
desc: "test",
|
||||
})
|
||||
export class EchoPlugin implements ITaskPlugin {
|
||||
@TaskInput({
|
||||
title: "测试属性",
|
||||
component: {
|
||||
name: "text",
|
||||
},
|
||||
})
|
||||
test?: string;
|
||||
|
||||
async execute(): Promise<void> {
|
||||
console.log("output", this.test);
|
||||
}
|
||||
|
||||
onInstance(): Promise<void> {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
}
|
||||
new EchoPlugin();
|
||||
Reference in New Issue
Block a user