mirror of https://github.com/certd/certd
chore: pre publish
parent
c553f63127
commit
c553b017af
|
@ -6,7 +6,7 @@
|
|||
"module": "./dist/pipeline.mjs",
|
||||
"types": "./dist/d/index.d.ts",
|
||||
"publishConfig": {
|
||||
"main": "./dist/pipeline.umd.js",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/pipeline.mjs",
|
||||
"types": "./dist/d/index.d.ts"
|
||||
},
|
||||
|
@ -27,8 +27,6 @@
|
|||
"reflect-metadata": "^0.1.13"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@midwayjs/core": "^3.11.6",
|
||||
"@midwayjs/decorator": "^3.11.6",
|
||||
"@types/chai": "^4.3.5",
|
||||
"@types/lodash": "^4.14.194",
|
||||
"@types/mocha": "^10.0.1",
|
||||
|
|
|
@ -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.");
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"module": "./dist/plugin-aliyun.mjs",
|
||||
"types": "./dist/es/plugin-aliyun.d.ts",
|
||||
"publishConfig": {
|
||||
"main": "./dist/plugin-aliyun.umd.js",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/plugin-aliyun.mjs",
|
||||
"types": "./dist/es/plugin-aliyun.d.ts"
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"module": "./dist/plugin-all.mjs",
|
||||
"types": "./dist/es/plugin-all.d.ts",
|
||||
"publishConfig": {
|
||||
"main": "./dist/plugin-all.umd.js",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/plugin-all.mjs",
|
||||
"types": "./dist/es/plugin-all.d.ts"
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"module": "./dist/plugin-cert.mjs",
|
||||
"types": "./dist/es/plugin-cert.d.ts",
|
||||
"publishConfig": {
|
||||
"main": "./dist/plugin-cert.umd.js",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/plugin-cert.mjs",
|
||||
"types": "./dist/es/plugin-cert.d.ts"
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"module": "./dist/plugin-host.mjs",
|
||||
"types": "./dist/es/plugin-host.d.ts",
|
||||
"publishConfig": {
|
||||
"main": "./dist/plugin-host.umd.js",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/plugin-host.mjs",
|
||||
"types": "./dist/es/plugin-host.d.ts"
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"module": "./dist/plugin-huawei.mjs",
|
||||
"types": "./dist/es/plugin-huawei.d.ts",
|
||||
"publishConfig": {
|
||||
"main": "./dist/plugin-huawei.umd.js",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/plugin-huawei.mjs",
|
||||
"types": "./dist/es/plugin-huawei.d.ts"
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"module": "./dist/plugin-tencent.mjs",
|
||||
"types": "./dist/es/plugin-tencent.d.ts",
|
||||
"publishConfig": {
|
||||
"main": "./dist/plugin-tencent.umd.js",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/plugin-tencent.mjs",
|
||||
"types": "./dist/es/plugin-tencent.d.ts"
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"module": "./dist/plugin-util.mjs",
|
||||
"types": "./dist/es/plugin-util.d.ts",
|
||||
"publishConfig": {
|
||||
"main": "./dist/plugin-util.umd.js",
|
||||
"main": "./dist/bundle.js",
|
||||
"module": "./dist/plugin-util.mjs",
|
||||
"types": "./dist/es/plugin-util.d.ts"
|
||||
},
|
||||
|
|
|
@ -4,11 +4,11 @@ import * as previewConfig from './config/config.preview';
|
|||
import * as defaultConfig from './config/config.default';
|
||||
import { Configuration, App } from '@midwayjs/decorator';
|
||||
import * as koa from '@midwayjs/koa';
|
||||
import orm from '@midwayjs/typeorm';
|
||||
import cache from '@midwayjs/cache';
|
||||
import * as orm from '@midwayjs/typeorm';
|
||||
import * as cache from '@midwayjs/cache';
|
||||
import cors from '@koa/cors';
|
||||
import { join } from 'path';
|
||||
import flyway from 'midway-flyway-js';
|
||||
import * as flyway from 'midway-flyway-js';
|
||||
import { ReportMiddleware } from './middleware/report';
|
||||
import { GlobalExceptionMiddleware } from './middleware/global-exception';
|
||||
import { PreviewMiddleware } from './middleware/preview';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// src/index.ts
|
||||
import '@certd/plugin-all';
|
||||
export { PipelineConfiguration as Configuration } from '@certd/pipeline';
|
||||
// export { PipelineConfiguration as Configuration } from '@certd/pipeline';
|
||||
// export * from './controller/user';
|
||||
// export * from './controller/api';
|
||||
// export * from './service/user';
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
import { ILogger } from "@midwayjs/logger";
|
||||
import { ITaskPlugin,Autowire, IsTaskPlugin, TaskInput } from "@certd/pipeline";
|
||||
|
||||
@IsTaskPlugin({
|
||||
name: "EchoPlugin",
|
||||
title: "测试插件",
|
||||
desc: "test",
|
||||
})
|
||||
export class EchoPlugin implements ITaskPlugin {
|
||||
@TaskInput({
|
||||
title: "测试属性",
|
||||
component: {
|
||||
name: "text",
|
||||
},
|
||||
})
|
||||
test?: string;
|
||||
|
||||
@Autowire()
|
||||
// @ts-ignore
|
||||
logger: ILogger;
|
||||
|
||||
async onInstance(){}
|
||||
|
||||
async execute(): Promise<void> {
|
||||
return Promise.resolve(undefined);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue