mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
refactor: pipeline run log
This commit is contained in:
@@ -1,12 +1,11 @@
|
||||
import { AbstractRegistrable } from "../registry";
|
||||
import { Logger } from "log4js";
|
||||
import { logger } from "../utils/util.log";
|
||||
import { IAccessService } from "../access/access-service";
|
||||
import { IContext } from "../core/context";
|
||||
import { PluginDefine, TaskInput, TaskOutput, TaskPlugin } from "./api";
|
||||
|
||||
export abstract class AbstractPlugin extends AbstractRegistrable<PluginDefine> implements TaskPlugin {
|
||||
logger: Logger = logger;
|
||||
logger!: Logger;
|
||||
// @ts-ignore
|
||||
accessService: IAccessService;
|
||||
// @ts-ignore
|
||||
@@ -14,10 +13,11 @@ export abstract class AbstractPlugin extends AbstractRegistrable<PluginDefine> i
|
||||
// @ts-ignore
|
||||
userContext: IContext;
|
||||
|
||||
async doInit(options: { accessService: IAccessService; pipelineContext: IContext; userContext: IContext }) {
|
||||
async doInit(options: { accessService: IAccessService; pipelineContext: IContext; userContext: IContext; logger: Logger }) {
|
||||
this.accessService = options.accessService;
|
||||
this.pipelineContext = options.pipelineContext;
|
||||
this.userContext = options.userContext;
|
||||
this.logger = options.logger;
|
||||
await this.onInit();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user