node-pluginsmanager-plugin 6.0.0 → 6.0.2
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,6 +1,12 @@
|
|
|
1
|
-
import { iServerResponse } from "./Server";
|
|
1
|
+
import { iIncomingMessage, iServerResponse } from "./Server";
|
|
2
2
|
import DescriptorUser, { iDescriptorUserOptions } from "./DescriptorUser";
|
|
3
3
|
import { OpenApiValidator } from "express-openapi-validate";
|
|
4
|
+
export interface iIncomingMessageForMediatorValidation extends iIncomingMessage {
|
|
5
|
+
"body": any;
|
|
6
|
+
}
|
|
7
|
+
export interface iServerResponseForMediatorValidation extends iServerResponse {
|
|
8
|
+
"body": any;
|
|
9
|
+
}
|
|
4
10
|
export interface iUrlParameters {
|
|
5
11
|
"path": {
|
|
6
12
|
[key: string]: any;
|
|
@@ -15,14 +21,11 @@ export interface iUrlParameters {
|
|
|
15
21
|
[key: string]: any;
|
|
16
22
|
};
|
|
17
23
|
}
|
|
18
|
-
export interface iBodyParameters {
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
}
|
|
21
24
|
export default class Mediator extends DescriptorUser {
|
|
22
25
|
protected _validator: OpenApiValidator | null;
|
|
23
26
|
constructor(options: iDescriptorUserOptions);
|
|
24
|
-
checkParameters(operationId: string, urlParams: iUrlParameters, bodyParams:
|
|
25
|
-
checkResponse(operationId: string, res:
|
|
27
|
+
checkParameters(operationId: string, urlParams: iUrlParameters, bodyParams: any): Promise<void>;
|
|
28
|
+
checkResponse(operationId: string, res: iServerResponseForMediatorValidation): Promise<void>;
|
|
26
29
|
init(...data: any): Promise<void>;
|
|
27
30
|
release(...data: any): Promise<void>;
|
|
28
31
|
}
|
|
@@ -13,6 +13,9 @@ const DescriptorUser_1 = __importDefault(require("./DescriptorUser"));
|
|
|
13
13
|
// types & interfaces
|
|
14
14
|
// externals
|
|
15
15
|
const express_openapi_validate_1 = require("express-openapi-validate");
|
|
16
|
+
;
|
|
17
|
+
;
|
|
18
|
+
;
|
|
16
19
|
// module
|
|
17
20
|
class Mediator extends DescriptorUser_1.default {
|
|
18
21
|
// constructor
|
|
@@ -24,10 +24,10 @@ export interface iIncomingMessage extends IncomingMessage {
|
|
|
24
24
|
"params": {
|
|
25
25
|
[key: string]: any;
|
|
26
26
|
};
|
|
27
|
-
"body":
|
|
27
|
+
"body": string;
|
|
28
28
|
}
|
|
29
29
|
export interface iServerResponse extends ServerResponse {
|
|
30
|
-
"body":
|
|
30
|
+
"body": string;
|
|
31
31
|
"headers": {
|
|
32
32
|
[key: string]: any;
|
|
33
33
|
};
|
package/lib/cjs/main.d.cts
CHANGED
|
@@ -21,10 +21,10 @@ import { checkArrayLength, checkArrayLengthSync } from "./checkers/RangeError/ch
|
|
|
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
23
|
import DescriptorUser, { iDescriptorUserOptions, tLogType, tLogger } from "./components/DescriptorUser";
|
|
24
|
-
import Mediator, { iUrlParameters
|
|
24
|
+
import Mediator, { iUrlParameters } from "./components/Mediator";
|
|
25
25
|
import MediatorUser, { iMediatorUserOptions } from "./components/MediatorUser";
|
|
26
26
|
import NotFoundError from "./components/NotFoundError";
|
|
27
27
|
import Orchestrator, { iOrchestratorOptions } from "./components/Orchestrator";
|
|
28
28
|
import Server, { iClient, iIncomingMessage, iServerResponse } from "./components/Server";
|
|
29
|
-
export { tLogType, tLogger, iUrlParameters,
|
|
29
|
+
export { tLogType, tLogger, iUrlParameters, iClient, iIncomingMessage, iServerResponse };
|
|
30
30
|
export { DescriptorUser, iDescriptorUserOptions, Mediator, MediatorUser, iMediatorUserOptions, NotFoundError, Orchestrator, iOrchestratorOptions, Server };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
|
|
3
3
|
"name": "node-pluginsmanager-plugin",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.2",
|
|
5
5
|
"description": "An abstract parent plugin for node-pluginsmanager",
|
|
6
6
|
|
|
7
7
|
"type": "commonjs",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/express": "4.17.21",
|
|
48
|
-
"@types/node": "20.10.
|
|
48
|
+
"@types/node": "20.10.2",
|
|
49
49
|
"@types/socket.io": "3.0.2",
|
|
50
50
|
"@types/uniqid": "5.3.4",
|
|
51
51
|
"@types/ws": "8.5.10",
|
|
52
52
|
"check-version-modules": "2.0.0",
|
|
53
53
|
"coveralls": "3.1.1",
|
|
54
54
|
"colors": "1.4.0",
|
|
55
|
-
"eslint": "8.
|
|
55
|
+
"eslint": "8.55.0",
|
|
56
56
|
"express": "4.18.2",
|
|
57
57
|
"husky": "8.0.3",
|
|
58
58
|
"mocha": "10.2.0",
|