chore: pre publish

This commit is contained in:
xiaojunnuo
2023-05-25 10:33:42 +08:00
parent c553f63127
commit c553b017af
16 changed files with 13 additions and 97 deletions
-1
View File
@@ -5,6 +5,5 @@ export * from "./access";
export * from "./registry";
export * from "./plugin";
export * from "./utils";
export * from "./midway";
export * from "./context";
export * from "./decorator";
@@ -1,44 +0,0 @@
import { Config, Configuration, Inject } from "@midwayjs/decorator";
import { IMidwayContainer, MidwayDecoratorService } from "@midwayjs/core";
// ... (see below) ...
@Configuration({
namespace: "pipeline",
//importConfigs: [join(__dirname, './config')],
})
export class PipelineConfiguration {
@Config()
// @ts-ignore
config;
@Inject()
// @ts-ignore
decoratorService: MidwayDecoratorService;
async onReady(container: IMidwayContainer) {
//this.implPropertyDecorator(container);
}
// implPropertyDecorator(container: IMidwayContainer) {
// this.logger.info("初始化 property decorator");
// // 实现装饰器
// this.decoratorService.registerPropertyHandler(CLASS_INPUTS_KEY, (propertyName, meta) => {
// return undefined;
// });
//
// const autowireWhiteList: any = {
// logger: true,
// };
// this.decoratorService.registerPropertyHandler(CLASS_AUTOWIRE_KEY, (propertyName, meta) => {
// // eslint-disable-next-line no-debugger
// debugger;
// const className = meta.name;
// if (autowireWhiteList[className]) {
// //在白名单里面,注入
// return container.get(className);
// }
// this.logger.warn(`autowire failed:${className} class is not in white list`);
// return undefined;
// });
// }
}
@@ -1,5 +0,0 @@
// src/index.ts
export { PipelineConfiguration } from "./configuration";
// export * from './controller/user';
// export * from './controller/api';
// export * from './service/user';
@@ -3,7 +3,7 @@ import { pluginRegistry } from "./registry";
import { PluginDefine, TaskInputDefine, TaskOutputDefine } from "./api";
import { Decorator } from "../decorator";
import { AUTOWIRE_KEY } from "../decorator";
import "reflect-metadata";
// 提供一个唯一 key
export const PLUGIN_CLASS_KEY = "pipeline:plugin";
@@ -1,4 +1,3 @@
import { ILogger } from "@midwayjs/logger";
import { ITaskPlugin } from "../api";
import { IsTaskPlugin, TaskInput } from "../decorator";
import { Autowire } from "../../decorator";
@@ -17,10 +16,6 @@ export class EchoPlugin implements ITaskPlugin {
})
test?: string;
@Autowire()
// @ts-ignore
logger: ILogger;
onInstance(): Promise<void> {
throw new Error("Method not implemented.");
}