node-pluginsmanager-plugin 5.0.2 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import Events from "events";
3
3
  import { OpenApiDocument } from "express-openapi-validate";
4
- export declare type tLogType = "log" | "info" | "success" | "warning" | "error";
4
+ export declare type tLogType = "data" | "debug" | "log" | "info" | "success" | "warning" | "error";
5
5
  export declare type tLogger = (type: tLogType, message: string | Error, bold?: boolean, pluginName?: string) => void;
6
6
  export interface iDescriptorUserOptions {
7
7
  "externalRessourcesDirectory": string;
@@ -2,6 +2,7 @@ import MediatorUser from "./MediatorUser";
2
2
  import Server from "./Server";
3
3
  import { Server as WebSocketServer } from "ws";
4
4
  import { Server as SocketIOServer } from "socket.io";
5
+ import { tLogger } from "./DescriptorUser";
5
6
  import { iIncomingMessage, iServerResponse } from "./Server";
6
7
  export interface iOrchestratorOptions {
7
8
  "externalRessourcesDirectory": string;
@@ -9,6 +10,7 @@ export interface iOrchestratorOptions {
9
10
  "descriptorFile": string;
10
11
  "mediatorFile": string;
11
12
  "serverFile": string;
13
+ "logger"?: tLogger;
12
14
  }
13
15
  export default class Orchestrator extends MediatorUser {
14
16
  protected _Server: Server | null;
@@ -45,11 +47,11 @@ export default class Orchestrator extends MediatorUser {
45
47
  enableCors(): this;
46
48
  appMiddleware(req: iIncomingMessage, res: iServerResponse, next: Function): void;
47
49
  socketMiddleware(server: WebSocketServer | SocketIOServer): void;
48
- load(): Promise<void>;
49
- destroy(): Promise<void>;
50
+ load(...data: any): Promise<void>;
51
+ destroy(...data: any): Promise<void>;
50
52
  init(...data: any): Promise<void>;
51
53
  release(...data: any): Promise<void>;
52
- install(): Promise<void>;
53
- update(): Promise<void>;
54
- uninstall(): Promise<void>;
54
+ install(...data: any): Promise<void>;
55
+ update(...data: any): Promise<void>;
56
+ uninstall(...data: any): Promise<void>;
55
57
  }
@@ -170,7 +170,7 @@ class Orchestrator extends MediatorUser_1.default {
170
170
  }
171
171
  }
172
172
  // load / destroy
173
- load() {
173
+ load(...data) {
174
174
  return this.checkFiles().then(() => {
175
175
  return (0, readJSONFile_1.default)((0, path_1.join)(__dirname, "..", "..", "..", "package.json"));
176
176
  }).then(({ engines }) => {
@@ -216,7 +216,7 @@ class Orchestrator extends MediatorUser_1.default {
216
216
  });
217
217
  });
218
218
  }
219
- destroy() {
219
+ destroy(...data) {
220
220
  return Promise.resolve().then(() => {
221
221
  // protected
222
222
  // params
@@ -372,13 +372,13 @@ class Orchestrator extends MediatorUser_1.default {
372
372
  });
373
373
  }
374
374
  // write
375
- install() {
375
+ install(...data) {
376
376
  return Promise.resolve();
377
377
  }
378
- update() {
378
+ update(...data) {
379
379
  return Promise.resolve();
380
380
  }
381
- uninstall() {
381
+ uninstall(...data) {
382
382
  return Promise.resolve();
383
383
  }
384
384
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-pluginsmanager-plugin",
3
- "version": "5.0.2",
3
+ "version": "5.0.5",
4
4
  "description": "An abstract parent plugin for node-pluginsmanager",
5
5
 
6
6
  "type": "commonjs",
@@ -58,7 +58,7 @@
58
58
  },
59
59
  "devDependencies": {
60
60
  "@types/express": "4.17.13",
61
- "@types/node": "18.0.0",
61
+ "@types/node": "18.0.1",
62
62
  "@types/socket.io": "3.0.2",
63
63
  "@types/uniqid": "5.3.2",
64
64
  "@types/ws": "8.5.3",