mirror of
https://github.com/certd/certd.git
synced 2026-04-24 12:27:25 +08:00
refactor: for test
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
"name": "@certd/acme-client",
|
||||
"description": "Simple and unopinionated ACME client",
|
||||
"author": "nmorsman",
|
||||
"version": "0.3.1",
|
||||
"version": "0.3.0",
|
||||
"main": "src/index.js",
|
||||
"types": "types",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -34,8 +34,7 @@
|
||||
"@midwayjs/typeorm": "^3.9.0",
|
||||
"@midwayjs/validate": "^3.9.0",
|
||||
"@types/chai": "^4.3.3",
|
||||
"@types/lodash": "^4.14.186",
|
||||
"@types/lodash-es": "^4.17.6",
|
||||
"@types/lodash": "^4.14.194",
|
||||
"@types/mocha": "^10.0.0",
|
||||
"@types/node-forge": "^1.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.38.1",
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
import { AbstractRegistrable } from "../registry";
|
||||
import { Logger } from "log4js";
|
||||
import { IContext } from "../core/context";
|
||||
import { PluginDefine, TaskInput, TaskOutput, TaskPlugin } from "./api";
|
||||
import { IAccessService } from "../access";
|
||||
import { AxiosInstance } from "axios";
|
||||
|
||||
export abstract class AbstractPlugin extends AbstractRegistrable<PluginDefine> implements TaskPlugin {
|
||||
logger!: Logger;
|
||||
// @ts-ignore
|
||||
accessService: IAccessService;
|
||||
// @ts-ignore
|
||||
pipelineContext: IContext;
|
||||
// @ts-ignore
|
||||
userContext: IContext;
|
||||
http!: AxiosInstance;
|
||||
|
||||
async doInit(options: { accessService: IAccessService; pipelineContext: IContext; userContext: IContext; logger: Logger; http: AxiosInstance }) {
|
||||
this.accessService = options.accessService;
|
||||
this.pipelineContext = options.pipelineContext;
|
||||
this.userContext = options.userContext;
|
||||
this.logger = options.logger;
|
||||
this.http = options.http;
|
||||
await this.onInit();
|
||||
}
|
||||
|
||||
protected async onInit(): Promise<void> {
|
||||
//
|
||||
}
|
||||
|
||||
abstract execute(input: TaskInput): Promise<TaskOutput>;
|
||||
}
|
||||
@@ -8,13 +8,13 @@ export default defineConfig({
|
||||
name: "pipeline",
|
||||
},
|
||||
rollupOptions: {
|
||||
external: ["vue", "lodash-es", "dayjs", "@fast-crud/fast-crud"],
|
||||
external: ["vue", "lodash", "dayjs", "@fast-crud/fast-crud"],
|
||||
output: {
|
||||
// Provide global variables to use in the UMD build
|
||||
// for externalized deps
|
||||
globals: {
|
||||
vue: "Vue",
|
||||
"lodash-es": "_",
|
||||
"lodash": "_",
|
||||
dayjs: "dayjs",
|
||||
"@fast-crud/fast-crud": "FastCrud",
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user