node-pluginsmanager-plugin 5.0.0 → 5.0.3
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 +4 -4
- package/lib/cjs/components/Mediator.d.ts +6 -5
- package/lib/cjs/components/MediatorUser.d.ts +2 -2
- package/lib/cjs/components/Orchestrator.d.ts +8 -7
- package/lib/cjs/components/Orchestrator.js +3 -3
- package/lib/cjs/components/Server.d.ts +5 -5
- package/lib/cjs/components/Server.js +1 -0
- package/lib/cjs/main.cjs +3 -3
- package/lib/cjs/main.d.cts +6 -5
- package/lib/cjs/utils/descriptor/extractPattern.js +1 -0
- package/lib/cjs/utils/request/extractBody.js +2 -0
- package/package.json +1 -1
|
@@ -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
|
}
|
|
@@ -7,13 +7,14 @@ export interface iUrlParameters {
|
|
|
7
7
|
"headers": object;
|
|
8
8
|
"cookies": object;
|
|
9
9
|
}
|
|
10
|
+
export interface iBodyParameters {
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
}
|
|
10
13
|
export default class Mediator extends DescriptorUser {
|
|
11
14
|
protected _validator: OpenApiValidator | null;
|
|
12
15
|
constructor(options: iDescriptorUserOptions);
|
|
13
|
-
checkParameters(operationId: string, urlParams: iUrlParameters, bodyParams:
|
|
14
|
-
[key: string]: any;
|
|
15
|
-
}): Promise<void>;
|
|
16
|
+
checkParameters(operationId: string, urlParams: iUrlParameters, bodyParams: iBodyParameters): Promise<void>;
|
|
16
17
|
checkResponse(operationId: string, res: iServerResponse): Promise<void>;
|
|
17
|
-
init(...data:
|
|
18
|
-
release(...data:
|
|
18
|
+
init(...data: any): Promise<void>;
|
|
19
|
+
release(...data: any): Promise<void>;
|
|
19
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
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import MediatorUser from "./MediatorUser";
|
|
2
|
+
import Server from "./Server";
|
|
1
3
|
import { Server as WebSocketServer } from "ws";
|
|
2
4
|
import { Server as SocketIOServer } from "socket.io";
|
|
3
|
-
import
|
|
4
|
-
import Server, { iIncomingMessage, iServerResponse } from "./Server";
|
|
5
|
+
import { iIncomingMessage, iServerResponse } from "./Server";
|
|
5
6
|
export interface iOrchestratorOptions {
|
|
6
7
|
"externalRessourcesDirectory": string;
|
|
7
8
|
"packageFile": string;
|
|
@@ -46,9 +47,9 @@ export default class Orchestrator extends MediatorUser {
|
|
|
46
47
|
socketMiddleware(server: WebSocketServer | SocketIOServer): void;
|
|
47
48
|
load(): Promise<void>;
|
|
48
49
|
destroy(): Promise<void>;
|
|
49
|
-
init(...data:
|
|
50
|
-
release(...data:
|
|
51
|
-
install(): Promise<void>;
|
|
52
|
-
update(): Promise<void>;
|
|
53
|
-
uninstall(): Promise<void>;
|
|
50
|
+
init(...data: any): Promise<void>;
|
|
51
|
+
release(...data: any): Promise<void>;
|
|
52
|
+
install(...data: any): Promise<void>;
|
|
53
|
+
update(...data: any): Promise<void>;
|
|
54
|
+
uninstall(...data: any): Promise<void>;
|
|
54
55
|
}
|
|
@@ -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
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
+
import MediatorUser from "./MediatorUser";
|
|
2
3
|
import { IncomingMessage, ServerResponse } from "http";
|
|
3
4
|
import { Server as WebSocketServer } from "ws";
|
|
4
5
|
import { Server as SocketIOServer } from "socket.io";
|
|
5
|
-
import
|
|
6
|
-
interface iClient {
|
|
6
|
+
import { iMediatorUserOptions } from "./MediatorUser";
|
|
7
|
+
export interface iClient {
|
|
7
8
|
"id": string;
|
|
8
9
|
"status": "CONNECTED" | "DISCONNECTED";
|
|
9
10
|
}
|
|
@@ -49,7 +50,6 @@ export default class Server extends MediatorUser {
|
|
|
49
50
|
push(command: string, data?: any, log?: boolean): this;
|
|
50
51
|
getClients(): Array<iClient>;
|
|
51
52
|
pushClient(clientId: string, command: string, data: any, log?: boolean): this;
|
|
52
|
-
init(...data:
|
|
53
|
-
release(...data:
|
|
53
|
+
init(...data: any): Promise<void>;
|
|
54
|
+
release(...data: any): Promise<void>;
|
|
54
55
|
}
|
|
55
|
-
export {};
|
|
@@ -7,6 +7,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
7
7
|
// natives
|
|
8
8
|
const url_1 = require("url");
|
|
9
9
|
const os_1 = require("os");
|
|
10
|
+
// externals
|
|
10
11
|
const uniqid_1 = __importDefault(require("uniqid"));
|
|
11
12
|
// locals
|
|
12
13
|
const checkInteger_1 = require("../checkers/TypeError/checkInteger");
|
package/lib/cjs/main.cjs
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.Server = exports.Orchestrator = exports.NotFoundError = exports.MediatorUser = exports.Mediator = exports.DescriptorUser = exports.checkArrayLengthBetweenSync = exports.checkArrayLengthBetween = exports.checkArrayLengthSync = exports.checkArrayLength = exports.checkIntegerBetweenSync = exports.checkIntegerBetween = exports.checkStringLengthBetweenSync = exports.checkStringLengthBetween = exports.checkStringLengthSync = exports.checkStringLength = exports.checkObjectLengthBetweenSync = exports.checkObjectLengthBetween = exports.checkObjectLengthSync = exports.checkObjectLength = exports.checkNumberBetweenSync = exports.checkNumberBetween = exports.checkNonEmptyStringSync = exports.checkNonEmptyString = exports.checkNonEmptyObjectSync = exports.checkNonEmptyObject = exports.checkNonEmptyNumberSync = exports.checkNonEmptyNumber = exports.checkNonEmptyIntegerSync = exports.checkNonEmptyInteger = exports.checkNonEmptyArraySync = exports.checkNonEmptyArray = exports.checkIntegerSync = exports.checkInteger = exports.checkArraySync = exports.checkArray = exports.checkStringSync = exports.checkString = exports.checkObjectSync = exports.checkObject = exports.checkNumberSync = exports.checkNumber = exports.checkFunctionSync = exports.checkFunction = exports.checkBooleanSync = exports.checkBoolean = exports.checkExistsSync = exports.checkExists = void 0;
|
|
7
7
|
// checkers
|
|
8
8
|
// undefined
|
|
9
9
|
const checkExists_1 = require("./checkers/ReferenceError/checkExists");
|
|
@@ -82,9 +82,9 @@ const Mediator_1 = __importDefault(require("./components/Mediator"));
|
|
|
82
82
|
exports.Mediator = Mediator_1.default;
|
|
83
83
|
const MediatorUser_1 = __importDefault(require("./components/MediatorUser"));
|
|
84
84
|
exports.MediatorUser = MediatorUser_1.default;
|
|
85
|
+
const NotFoundError_1 = __importDefault(require("./components/NotFoundError"));
|
|
86
|
+
exports.NotFoundError = NotFoundError_1.default;
|
|
85
87
|
const Orchestrator_1 = __importDefault(require("./components/Orchestrator"));
|
|
86
88
|
exports.Orchestrator = Orchestrator_1.default;
|
|
87
89
|
const Server_1 = __importDefault(require("./components/Server"));
|
|
88
90
|
exports.Server = Server_1.default;
|
|
89
|
-
const NotFoundError_1 = __importDefault(require("./components/NotFoundError"));
|
|
90
|
-
exports.NotFoundError = NotFoundError_1.default;
|
package/lib/cjs/main.d.cts
CHANGED
|
@@ -20,10 +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 from "./components/DescriptorUser";
|
|
24
|
-
import Mediator from "./components/Mediator";
|
|
23
|
+
import DescriptorUser, { tLogType, tLogger } from "./components/DescriptorUser";
|
|
24
|
+
import Mediator, { iUrlParameters, iBodyParameters } from "./components/Mediator";
|
|
25
25
|
import MediatorUser from "./components/MediatorUser";
|
|
26
|
-
import Orchestrator from "./components/Orchestrator";
|
|
27
|
-
import Server from "./components/Server";
|
|
28
26
|
import NotFoundError from "./components/NotFoundError";
|
|
29
|
-
|
|
27
|
+
import Orchestrator from "./components/Orchestrator";
|
|
28
|
+
import Server, { iClient, iIncomingMessage, iServerResponse } from "./components/Server";
|
|
29
|
+
export { tLogType, tLogger, iUrlParameters, iBodyParameters, iClient, iIncomingMessage, iServerResponse };
|
|
30
|
+
export { DescriptorUser, Mediator, MediatorUser, NotFoundError, Orchestrator, Server };
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
// deps
|
|
6
7
|
// locals
|
|
7
8
|
const removeFirstSlash_1 = __importDefault(require("../removeFirstSlash"));
|
|
8
9
|
// module
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
// deps
|
|
4
|
+
// locals
|
|
3
5
|
const checkInteger_1 = require("../../checkers/TypeError/checkInteger");
|
|
4
6
|
const checkFunction_1 = require("../../checkers/TypeError/checkFunction");
|
|
5
7
|
const checkNonEmptyObject_1 = require("../../checkers/RangeError/checkNonEmptyObject");
|