mirror of https://github.com/certd/certd
chore:
parent
2ecf1cce5b
commit
93fc8dc665
|
@ -1,2 +1,3 @@
|
||||||
export * from './plugin-restart.js';
|
export * from './plugin-restart.js';
|
||||||
export * from './plugin-script.js';
|
export * from './plugin-script.js';
|
||||||
|
export * from './plugin-wait.js';
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
import { AbstractTaskPlugin, IsTaskPlugin, pluginGroups, RunStrategy, TaskInput } from '@certd/pipeline';
|
||||||
|
|
||||||
|
@IsTaskPlugin({
|
||||||
|
name: 'WaitPlugin',
|
||||||
|
title: '等待',
|
||||||
|
icon: 'ri:rest-time-line',
|
||||||
|
desc: '等待一段时间',
|
||||||
|
group: pluginGroups.other.key,
|
||||||
|
default: {
|
||||||
|
strategy: {
|
||||||
|
runStrategy: RunStrategy.SkipWhenSucceed,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
export class WaitPlugin extends AbstractTaskPlugin {
|
||||||
|
@TaskInput({
|
||||||
|
title: '等待时长',
|
||||||
|
value: 30,
|
||||||
|
component: {
|
||||||
|
name: 'a-number',
|
||||||
|
vModel: 'value',
|
||||||
|
},
|
||||||
|
helper: '单位:秒',
|
||||||
|
required: true,
|
||||||
|
})
|
||||||
|
waitTime!: number;
|
||||||
|
|
||||||
|
async onInstance() {}
|
||||||
|
async execute(): Promise<void> {
|
||||||
|
await this.ctx.utils.sleep(this.waitTime * 1000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
new WaitPlugin();
|
|
@ -1 +1,2 @@
|
||||||
import './dnspod-dns-provider.js';
|
import './dnspod-dns-provider.js';
|
||||||
|
import './tencent-dns-provider.js';
|
||||||
|
|
Loading…
Reference in New Issue