node-pluginsmanager-plugin 5.0.3 → 5.0.6
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.
package/LICENSE
CHANGED
|
@@ -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,8 +47,8 @@ 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
54
|
install(...data: any): Promise<void>;
|
|
@@ -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
|
package/lib/cjs/main.d.cts
CHANGED
|
@@ -20,11 +20,11 @@ import { checkIntegerBetween, checkIntegerBetweenSync } from "./checkers/RangeEr
|
|
|
20
20
|
import { checkArrayLength, checkArrayLengthSync } from "./checkers/RangeError/checkArrayLength";
|
|
21
21
|
import { checkArrayLengthBetween, checkArrayLengthBetweenSync } from "./checkers/RangeError/checkArrayLengthBetween";
|
|
22
22
|
export { checkExists, checkExistsSync, checkBoolean, checkBooleanSync, checkFunction, checkFunctionSync, checkNumber, checkNumberSync, checkObject, checkObjectSync, checkString, checkStringSync, checkArray, checkArraySync, checkInteger, checkIntegerSync, checkNonEmptyArray, checkNonEmptyArraySync, checkNonEmptyInteger, checkNonEmptyIntegerSync, checkNonEmptyNumber, checkNonEmptyNumberSync, checkNonEmptyObject, checkNonEmptyObjectSync, checkNonEmptyString, checkNonEmptyStringSync, checkNumberBetween, checkNumberBetweenSync, checkObjectLength, checkObjectLengthSync, checkObjectLengthBetween, checkObjectLengthBetweenSync, checkStringLength, checkStringLengthSync, checkStringLengthBetween, checkStringLengthBetweenSync, checkIntegerBetween, checkIntegerBetweenSync, checkArrayLength, checkArrayLengthSync, checkArrayLengthBetween, checkArrayLengthBetweenSync };
|
|
23
|
-
import DescriptorUser, { tLogType, tLogger } from "./components/DescriptorUser";
|
|
23
|
+
import DescriptorUser, { iDescriptorUserOptions, tLogType, tLogger } from "./components/DescriptorUser";
|
|
24
24
|
import Mediator, { iUrlParameters, iBodyParameters } from "./components/Mediator";
|
|
25
|
-
import MediatorUser from "./components/MediatorUser";
|
|
25
|
+
import MediatorUser, { iMediatorUserOptions } from "./components/MediatorUser";
|
|
26
26
|
import NotFoundError from "./components/NotFoundError";
|
|
27
|
-
import Orchestrator from "./components/Orchestrator";
|
|
27
|
+
import Orchestrator, { iOrchestratorOptions } from "./components/Orchestrator";
|
|
28
28
|
import Server, { iClient, iIncomingMessage, iServerResponse } from "./components/Server";
|
|
29
29
|
export { tLogType, tLogger, iUrlParameters, iBodyParameters, iClient, iIncomingMessage, iServerResponse };
|
|
30
|
-
export { DescriptorUser, Mediator, MediatorUser, NotFoundError, Orchestrator, Server };
|
|
30
|
+
export { DescriptorUser, iDescriptorUserOptions, Mediator, MediatorUser, iMediatorUserOptions, NotFoundError, Orchestrator, iOrchestratorOptions, Server };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-pluginsmanager-plugin",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.6",
|
|
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.
|
|
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",
|