node-pluginsmanager-plugin 5.0.1 → 5.0.4
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/lib/cjs/components/DescriptorUser.d.ts +5 -5
- package/lib/cjs/components/Mediator.d.ts +2 -2
- package/lib/cjs/components/MediatorUser.d.ts +2 -2
- package/lib/cjs/components/Orchestrator.d.ts +7 -5
- package/lib/cjs/components/Orchestrator.js +3 -3
- package/lib/cjs/components/Server.d.ts +2 -2
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -15,13 +15,13 @@ export default class DescriptorUser extends Events {
|
|
|
15
15
|
protected _Descriptor: OpenApiDocument | null;
|
|
16
16
|
protected _Logger: tLogger | null;
|
|
17
17
|
constructor(options: iDescriptorUserOptions);
|
|
18
|
-
protected _initWorkSpace(...data:
|
|
19
|
-
protected _releaseWorkSpace(...data:
|
|
18
|
+
protected _initWorkSpace(...data: any): Promise<void>;
|
|
19
|
+
protected _releaseWorkSpace(...data: any): Promise<void>;
|
|
20
20
|
protected _log(type: tLogType, message: string | Error, bold?: boolean): this;
|
|
21
21
|
getPluginName(): string;
|
|
22
22
|
getPluginVersion(): string;
|
|
23
23
|
getPluginDescription(): string;
|
|
24
|
-
init(...data:
|
|
25
|
-
release(...data:
|
|
24
|
+
init(...data: any): Promise<void>;
|
|
25
|
+
release(...data: any): Promise<void>;
|
|
26
26
|
checkDescriptor(): Promise<void>;
|
|
27
27
|
}
|
|
@@ -15,6 +15,6 @@ export default class Mediator extends DescriptorUser {
|
|
|
15
15
|
constructor(options: iDescriptorUserOptions);
|
|
16
16
|
checkParameters(operationId: string, urlParams: iUrlParameters, bodyParams: iBodyParameters): Promise<void>;
|
|
17
17
|
checkResponse(operationId: string, res: iServerResponse): Promise<void>;
|
|
18
|
-
init(...data:
|
|
19
|
-
release(...data:
|
|
18
|
+
init(...data: any): Promise<void>;
|
|
19
|
+
release(...data: any): Promise<void>;
|
|
20
20
|
}
|
|
@@ -6,7 +6,7 @@ export interface iMediatorUserOptions extends iDescriptorUserOptions {
|
|
|
6
6
|
export default class MediatorUser extends DescriptorUser {
|
|
7
7
|
protected _Mediator: Mediator | null;
|
|
8
8
|
constructor(options: iMediatorUserOptions);
|
|
9
|
-
_initWorkSpace(...data:
|
|
10
|
-
_releaseWorkSpace(...data:
|
|
9
|
+
_initWorkSpace(...data: any): Promise<void>;
|
|
10
|
+
_releaseWorkSpace(...data: any): Promise<void>;
|
|
11
11
|
checkMediator(): Promise<void>;
|
|
12
12
|
}
|
|
@@ -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;
|
|
@@ -47,9 +49,9 @@ export default class Orchestrator extends MediatorUser {
|
|
|
47
49
|
socketMiddleware(server: WebSocketServer | SocketIOServer): void;
|
|
48
50
|
load(): Promise<void>;
|
|
49
51
|
destroy(): Promise<void>;
|
|
50
|
-
init(...data:
|
|
51
|
-
release(...data:
|
|
52
|
-
install(): Promise<void>;
|
|
53
|
-
update(): Promise<void>;
|
|
54
|
-
uninstall(): Promise<void>;
|
|
52
|
+
init(...data: any): Promise<void>;
|
|
53
|
+
release(...data: any): Promise<void>;
|
|
54
|
+
install(...data: any): Promise<void>;
|
|
55
|
+
update(...data: any): Promise<void>;
|
|
56
|
+
uninstall(...data: any): Promise<void>;
|
|
55
57
|
}
|
|
@@ -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
|
}
|
|
@@ -50,6 +50,6 @@ export default class Server extends MediatorUser {
|
|
|
50
50
|
push(command: string, data?: any, log?: boolean): this;
|
|
51
51
|
getClients(): Array<iClient>;
|
|
52
52
|
pushClient(clientId: string, command: string, data: any, log?: boolean): this;
|
|
53
|
-
init(...data:
|
|
54
|
-
release(...data:
|
|
53
|
+
init(...data: any): Promise<void>;
|
|
54
|
+
release(...data: any): Promise<void>;
|
|
55
55
|
}
|