node-pluginsmanager-plugin 6.0.0 → 6.0.1
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/Mediator.d.ts +31 -28
- package/lib/cjs/components/Mediator.js +151 -148
- package/lib/cjs/components/Server.d.ts +55 -55
- package/lib/cjs/main.d.cts +30 -30
- package/package.json +1 -1
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
import { iServerResponse } from "./Server";
|
|
2
|
-
import DescriptorUser, { iDescriptorUserOptions } from "./DescriptorUser";
|
|
3
|
-
import { OpenApiValidator } from "express-openapi-validate";
|
|
4
|
-
export interface
|
|
5
|
-
"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
"
|
|
12
|
-
[key: string]: any;
|
|
13
|
-
};
|
|
14
|
-
"
|
|
15
|
-
[key: string]: any;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
1
|
+
import { iIncomingMessage, iServerResponse } from "./Server";
|
|
2
|
+
import DescriptorUser, { iDescriptorUserOptions } from "./DescriptorUser";
|
|
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
|
+
}
|
|
10
|
+
export interface iUrlParameters {
|
|
11
|
+
"path": {
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
};
|
|
14
|
+
"query": {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
"headers": {
|
|
18
|
+
[key: string]: any;
|
|
19
|
+
};
|
|
20
|
+
"cookies": {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export default class Mediator extends DescriptorUser {
|
|
25
|
+
protected _validator: OpenApiValidator | null;
|
|
26
|
+
constructor(options: iDescriptorUserOptions);
|
|
27
|
+
checkParameters(operationId: string, urlParams: iUrlParameters, bodyParams: string): Promise<void>;
|
|
28
|
+
checkResponse(operationId: string, res: iServerResponseForMediatorValidation): Promise<void>;
|
|
29
|
+
init(...data: any): Promise<void>;
|
|
30
|
+
release(...data: any): Promise<void>;
|
|
31
|
+
}
|
|
@@ -1,148 +1,151 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const checkExists_1 = require("../checkers/ReferenceError/checkExists");
|
|
7
|
-
const checkObject_1 = require("../checkers/TypeError/checkObject");
|
|
8
|
-
const checkNonEmptyString_1 = require("../checkers/RangeError/checkNonEmptyString");
|
|
9
|
-
const checkNonEmptyObject_1 = require("../checkers/RangeError/checkNonEmptyObject");
|
|
10
|
-
const extractPathMethodByOperationId_1 = __importDefault(require("../utils/descriptor/extractPathMethodByOperationId"));
|
|
11
|
-
const jsonParser_1 = __importDefault(require("../utils/jsonParser"));
|
|
12
|
-
const DescriptorUser_1 = __importDefault(require("./DescriptorUser"));
|
|
13
|
-
// types & interfaces
|
|
14
|
-
// externals
|
|
15
|
-
const express_openapi_validate_1 = require("express-openapi-validate");
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
case "
|
|
68
|
-
|
|
69
|
-
case "
|
|
70
|
-
case "
|
|
71
|
-
case "
|
|
72
|
-
case "
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
else {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
mutedRes.body =
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
return
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
(
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
this.
|
|
142
|
-
|
|
143
|
-
this.
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const checkExists_1 = require("../checkers/ReferenceError/checkExists");
|
|
7
|
+
const checkObject_1 = require("../checkers/TypeError/checkObject");
|
|
8
|
+
const checkNonEmptyString_1 = require("../checkers/RangeError/checkNonEmptyString");
|
|
9
|
+
const checkNonEmptyObject_1 = require("../checkers/RangeError/checkNonEmptyObject");
|
|
10
|
+
const extractPathMethodByOperationId_1 = __importDefault(require("../utils/descriptor/extractPathMethodByOperationId"));
|
|
11
|
+
const jsonParser_1 = __importDefault(require("../utils/jsonParser"));
|
|
12
|
+
const DescriptorUser_1 = __importDefault(require("./DescriptorUser"));
|
|
13
|
+
// types & interfaces
|
|
14
|
+
// externals
|
|
15
|
+
const express_openapi_validate_1 = require("express-openapi-validate");
|
|
16
|
+
;
|
|
17
|
+
;
|
|
18
|
+
;
|
|
19
|
+
// module
|
|
20
|
+
class Mediator extends DescriptorUser_1.default {
|
|
21
|
+
// constructor
|
|
22
|
+
constructor(options) {
|
|
23
|
+
super(options);
|
|
24
|
+
this._validator = null;
|
|
25
|
+
}
|
|
26
|
+
// public
|
|
27
|
+
// Check sended parameters by method name (used by the Server)
|
|
28
|
+
checkParameters(operationId, urlParams, bodyParams) {
|
|
29
|
+
// parameters validation
|
|
30
|
+
return this.checkDescriptor().then(() => {
|
|
31
|
+
return (0, checkNonEmptyString_1.checkNonEmptyString)("operationId", operationId);
|
|
32
|
+
}).then(() => {
|
|
33
|
+
return (0, checkNonEmptyObject_1.checkNonEmptyObject)("urlParams", urlParams).then(() => {
|
|
34
|
+
return (0, checkObject_1.checkObject)("urlParams.path", urlParams.path);
|
|
35
|
+
}).then(() => {
|
|
36
|
+
return (0, checkObject_1.checkObject)("urlParams.query", urlParams.query);
|
|
37
|
+
}).then(() => {
|
|
38
|
+
return (0, checkObject_1.checkObject)("urlParams.headers", urlParams.headers);
|
|
39
|
+
}).then(() => {
|
|
40
|
+
return (0, checkObject_1.checkObject)("urlParams.cookies", urlParams.cookies);
|
|
41
|
+
});
|
|
42
|
+
}).then(() => {
|
|
43
|
+
return (0, checkExists_1.checkExists)("bodyParams", bodyParams);
|
|
44
|
+
}).then(() => {
|
|
45
|
+
// search wanted operation
|
|
46
|
+
const foundPathMethod = (0, extractPathMethodByOperationId_1.default)(this._Descriptor.paths, operationId);
|
|
47
|
+
return !foundPathMethod ? Promise.reject(new ReferenceError("Unknown operationId \"" + operationId + "\"")) : new Promise((resolve, reject) => {
|
|
48
|
+
const req = {
|
|
49
|
+
"path": foundPathMethod.path,
|
|
50
|
+
"method": foundPathMethod.method,
|
|
51
|
+
"params": urlParams.path,
|
|
52
|
+
"query": urlParams.query,
|
|
53
|
+
"headers": urlParams.headers,
|
|
54
|
+
"cookies": urlParams.cookies,
|
|
55
|
+
"body": bodyParams
|
|
56
|
+
};
|
|
57
|
+
const validateRequest = this._validator.validate(req.method, req.path); // set to "any" for ts validation
|
|
58
|
+
validateRequest(req, null, (err) => {
|
|
59
|
+
return err ? reject(err) : resolve();
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
}).catch((err) => {
|
|
63
|
+
return err instanceof express_openapi_validate_1.ValidationError ? Promise.resolve().then(() => {
|
|
64
|
+
switch (err.data[0].keyword) { // extract first Error
|
|
65
|
+
case "required":
|
|
66
|
+
return Promise.reject(new ReferenceError(err.message));
|
|
67
|
+
case "type":
|
|
68
|
+
return Promise.reject(new TypeError(err.message));
|
|
69
|
+
case "minimum":
|
|
70
|
+
case "maximum":
|
|
71
|
+
case "minLength":
|
|
72
|
+
case "maxLength":
|
|
73
|
+
case "minItems":
|
|
74
|
+
case "maxItems":
|
|
75
|
+
case "enum":
|
|
76
|
+
return Promise.reject(new RangeError(err.message));
|
|
77
|
+
default:
|
|
78
|
+
return Promise.reject(new Error(err.message));
|
|
79
|
+
}
|
|
80
|
+
}) : Promise.reject(err);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
// Check sended parameters by method name (used by the Server)
|
|
84
|
+
checkResponse(operationId, res) {
|
|
85
|
+
// parameters validation
|
|
86
|
+
return this.checkDescriptor().then(() => {
|
|
87
|
+
return (0, checkNonEmptyString_1.checkNonEmptyString)("operationId", operationId);
|
|
88
|
+
}).then(() => {
|
|
89
|
+
// search wanted operation
|
|
90
|
+
const foundPathMethod = (0, extractPathMethodByOperationId_1.default)(this._Descriptor.paths, operationId);
|
|
91
|
+
return !foundPathMethod ? Promise.reject(new ReferenceError("Unknown operationId \"" + operationId + "\"")) : new Promise((resolve, reject) => {
|
|
92
|
+
// no content, no validation
|
|
93
|
+
if (204 === res.statusCode) {
|
|
94
|
+
return "undefined" !== typeof res.body ? reject(new ReferenceError("You should not have content data with 204 statusCode")) : resolve();
|
|
95
|
+
}
|
|
96
|
+
// no content, no validation (put requests)
|
|
97
|
+
else if (201 === res.statusCode && "undefined" === typeof res.body) {
|
|
98
|
+
return resolve();
|
|
99
|
+
}
|
|
100
|
+
// validator cannot correctly check pure boolean return
|
|
101
|
+
else if ("undefined" !== typeof res.body && ["true", "false"].includes(res.body)) {
|
|
102
|
+
return resolve();
|
|
103
|
+
}
|
|
104
|
+
else {
|
|
105
|
+
try {
|
|
106
|
+
const mutedRes = Object.assign({}, res);
|
|
107
|
+
mutedRes.headers = res.getHeaders();
|
|
108
|
+
if ("undefined" === typeof mutedRes.body || "" === mutedRes.body) {
|
|
109
|
+
mutedRes.body = {};
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
mutedRes.body = (0, jsonParser_1.default)(mutedRes.body);
|
|
113
|
+
}
|
|
114
|
+
const validateResponse = this._validator.validateResponse(foundPathMethod.method, foundPathMethod.path);
|
|
115
|
+
validateResponse(mutedRes);
|
|
116
|
+
return resolve();
|
|
117
|
+
}
|
|
118
|
+
catch (e) {
|
|
119
|
+
return reject(new Error("[" + foundPathMethod.method + "]" +
|
|
120
|
+
foundPathMethod.path +
|
|
121
|
+
" (" + foundPathMethod.operationId + ") => " +
|
|
122
|
+
res.statusCode +
|
|
123
|
+
"\r\n" +
|
|
124
|
+
(e.message ? e.message : e)));
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
// init / release
|
|
131
|
+
init(...data) {
|
|
132
|
+
return this._initWorkSpace(...data).then(() => {
|
|
133
|
+
this._validator = new express_openapi_validate_1.OpenApiValidator(this._Descriptor);
|
|
134
|
+
this.initialized = true;
|
|
135
|
+
this.emit("initialized", ...data);
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
release(...data) {
|
|
139
|
+
return this._releaseWorkSpace(...data).then(() => {
|
|
140
|
+
// can only be released by Orchestrator
|
|
141
|
+
this._Descriptor = null;
|
|
142
|
+
this._validator = null;
|
|
143
|
+
this.initialized = false;
|
|
144
|
+
this.emit("released", ...data);
|
|
145
|
+
}).then(() => {
|
|
146
|
+
this.removeAllListeners();
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
exports.default = Mediator;
|
|
151
|
+
;
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import MediatorUser from "./MediatorUser";
|
|
3
|
-
import { IncomingMessage, ServerResponse } from "node:http";
|
|
4
|
-
import { Server as WebSocketServer } from "ws";
|
|
5
|
-
import { Server as SocketIOServer } from "socket.io";
|
|
6
|
-
import { iMediatorUserOptions } from "./MediatorUser";
|
|
7
|
-
export interface iClient {
|
|
8
|
-
"id": string;
|
|
9
|
-
"status": "CONNECTED" | "DISCONNECTED";
|
|
10
|
-
}
|
|
11
|
-
export interface iIncomingMessage extends IncomingMessage {
|
|
12
|
-
"method": string;
|
|
13
|
-
"pattern": string;
|
|
14
|
-
"validatedIp": string;
|
|
15
|
-
"headers": {
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
};
|
|
18
|
-
"cookies": {
|
|
19
|
-
[key: string]: any;
|
|
20
|
-
};
|
|
21
|
-
"query": {
|
|
22
|
-
[key: string]: any;
|
|
23
|
-
};
|
|
24
|
-
"params": {
|
|
25
|
-
[key: string]: any;
|
|
26
|
-
};
|
|
27
|
-
"body":
|
|
28
|
-
}
|
|
29
|
-
export interface iServerResponse extends ServerResponse {
|
|
30
|
-
"body":
|
|
31
|
-
"headers": {
|
|
32
|
-
[key: string]: any;
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
export default class Server extends MediatorUser {
|
|
36
|
-
protected _socketServer: WebSocketServer | SocketIOServer | null;
|
|
37
|
-
protected _checkParameters: boolean;
|
|
38
|
-
protected _checkResponse: boolean;
|
|
39
|
-
protected _cors: boolean;
|
|
40
|
-
constructor(opt: iMediatorUserOptions);
|
|
41
|
-
protected _serverType(): "NO_SERVER" | "WEBSOCKET" | "SOCKETIO" | "UNKNOWN";
|
|
42
|
-
disableCheckParameters(): this;
|
|
43
|
-
enableCheckParameters(): this;
|
|
44
|
-
disableCheckResponse(): this;
|
|
45
|
-
enableCheckResponse(): this;
|
|
46
|
-
disableCors(): this;
|
|
47
|
-
enableCors(): this;
|
|
48
|
-
appMiddleware(req: iIncomingMessage, res: iServerResponse, next: Function): void;
|
|
49
|
-
socketMiddleware(socketServer: WebSocketServer | SocketIOServer): void;
|
|
50
|
-
push(command: string, data?: any, log?: boolean): this;
|
|
51
|
-
getClients(): Array<iClient>;
|
|
52
|
-
pushClient(clientId: string, command: string, data: any, log?: boolean): this;
|
|
53
|
-
init(...data: any): Promise<void>;
|
|
54
|
-
release(...data: any): Promise<void>;
|
|
55
|
-
}
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import MediatorUser from "./MediatorUser";
|
|
3
|
+
import { IncomingMessage, ServerResponse } from "node:http";
|
|
4
|
+
import { Server as WebSocketServer } from "ws";
|
|
5
|
+
import { Server as SocketIOServer } from "socket.io";
|
|
6
|
+
import { iMediatorUserOptions } from "./MediatorUser";
|
|
7
|
+
export interface iClient {
|
|
8
|
+
"id": string;
|
|
9
|
+
"status": "CONNECTED" | "DISCONNECTED";
|
|
10
|
+
}
|
|
11
|
+
export interface iIncomingMessage extends IncomingMessage {
|
|
12
|
+
"method": string;
|
|
13
|
+
"pattern": string;
|
|
14
|
+
"validatedIp": string;
|
|
15
|
+
"headers": {
|
|
16
|
+
[key: string]: any;
|
|
17
|
+
};
|
|
18
|
+
"cookies": {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
};
|
|
21
|
+
"query": {
|
|
22
|
+
[key: string]: any;
|
|
23
|
+
};
|
|
24
|
+
"params": {
|
|
25
|
+
[key: string]: any;
|
|
26
|
+
};
|
|
27
|
+
"body": string;
|
|
28
|
+
}
|
|
29
|
+
export interface iServerResponse extends ServerResponse {
|
|
30
|
+
"body": string;
|
|
31
|
+
"headers": {
|
|
32
|
+
[key: string]: any;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export default class Server extends MediatorUser {
|
|
36
|
+
protected _socketServer: WebSocketServer | SocketIOServer | null;
|
|
37
|
+
protected _checkParameters: boolean;
|
|
38
|
+
protected _checkResponse: boolean;
|
|
39
|
+
protected _cors: boolean;
|
|
40
|
+
constructor(opt: iMediatorUserOptions);
|
|
41
|
+
protected _serverType(): "NO_SERVER" | "WEBSOCKET" | "SOCKETIO" | "UNKNOWN";
|
|
42
|
+
disableCheckParameters(): this;
|
|
43
|
+
enableCheckParameters(): this;
|
|
44
|
+
disableCheckResponse(): this;
|
|
45
|
+
enableCheckResponse(): this;
|
|
46
|
+
disableCors(): this;
|
|
47
|
+
enableCors(): this;
|
|
48
|
+
appMiddleware(req: iIncomingMessage, res: iServerResponse, next: Function): void;
|
|
49
|
+
socketMiddleware(socketServer: WebSocketServer | SocketIOServer): void;
|
|
50
|
+
push(command: string, data?: any, log?: boolean): this;
|
|
51
|
+
getClients(): Array<iClient>;
|
|
52
|
+
pushClient(clientId: string, command: string, data: any, log?: boolean): this;
|
|
53
|
+
init(...data: any): Promise<void>;
|
|
54
|
+
release(...data: any): Promise<void>;
|
|
55
|
+
}
|
package/lib/cjs/main.d.cts
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { checkExists, checkExistsSync } from "./checkers/ReferenceError/checkExists";
|
|
2
|
-
import { checkBoolean, checkBooleanSync } from "./checkers/TypeError/checkBoolean";
|
|
3
|
-
import { checkFunction, checkFunctionSync } from "./checkers/TypeError/checkFunction";
|
|
4
|
-
import { checkNumber, checkNumberSync } from "./checkers/TypeError/checkNumber";
|
|
5
|
-
import { checkObject, checkObjectSync } from "./checkers/TypeError/checkObject";
|
|
6
|
-
import { checkString, checkStringSync } from "./checkers/TypeError/checkString";
|
|
7
|
-
import { checkArray, checkArraySync } from "./checkers/TypeError/checkArray";
|
|
8
|
-
import { checkInteger, checkIntegerSync } from "./checkers/TypeError/checkInteger";
|
|
9
|
-
import { checkNonEmptyArray, checkNonEmptyArraySync } from "./checkers/RangeError/checkNonEmptyArray";
|
|
10
|
-
import { checkNonEmptyInteger, checkNonEmptyIntegerSync } from "./checkers/RangeError/checkNonEmptyInteger";
|
|
11
|
-
import { checkNonEmptyNumber, checkNonEmptyNumberSync } from "./checkers/RangeError/checkNonEmptyNumber";
|
|
12
|
-
import { checkNonEmptyObject, checkNonEmptyObjectSync } from "./checkers/RangeError/checkNonEmptyObject";
|
|
13
|
-
import { checkNonEmptyString, checkNonEmptyStringSync } from "./checkers/RangeError/checkNonEmptyString";
|
|
14
|
-
import { checkNumberBetween, checkNumberBetweenSync } from "./checkers/RangeError/checkNumberBetween";
|
|
15
|
-
import { checkObjectLength, checkObjectLengthSync } from "./checkers/RangeError/checkObjectLength";
|
|
16
|
-
import { checkObjectLengthBetween, checkObjectLengthBetweenSync } from "./checkers/RangeError/checkObjectLengthBetween";
|
|
17
|
-
import { checkStringLength, checkStringLengthSync } from "./checkers/RangeError/checkStringLength";
|
|
18
|
-
import { checkStringLengthBetween, checkStringLengthBetweenSync } from "./checkers/RangeError/checkStringLengthBetween";
|
|
19
|
-
import { checkIntegerBetween, checkIntegerBetweenSync } from "./checkers/RangeError/checkIntegerBetween";
|
|
20
|
-
import { checkArrayLength, checkArrayLengthSync } from "./checkers/RangeError/checkArrayLength";
|
|
21
|
-
import { checkArrayLengthBetween, checkArrayLengthBetweenSync } from "./checkers/RangeError/checkArrayLengthBetween";
|
|
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, { iDescriptorUserOptions, tLogType, tLogger } from "./components/DescriptorUser";
|
|
24
|
-
import Mediator, { iUrlParameters
|
|
25
|
-
import MediatorUser, { iMediatorUserOptions } from "./components/MediatorUser";
|
|
26
|
-
import NotFoundError from "./components/NotFoundError";
|
|
27
|
-
import Orchestrator, { iOrchestratorOptions } from "./components/Orchestrator";
|
|
28
|
-
import Server, { iClient, iIncomingMessage, iServerResponse } from "./components/Server";
|
|
29
|
-
export { tLogType, tLogger, iUrlParameters,
|
|
30
|
-
export { DescriptorUser, iDescriptorUserOptions, Mediator, MediatorUser, iMediatorUserOptions, NotFoundError, Orchestrator, iOrchestratorOptions, Server };
|
|
1
|
+
import { checkExists, checkExistsSync } from "./checkers/ReferenceError/checkExists";
|
|
2
|
+
import { checkBoolean, checkBooleanSync } from "./checkers/TypeError/checkBoolean";
|
|
3
|
+
import { checkFunction, checkFunctionSync } from "./checkers/TypeError/checkFunction";
|
|
4
|
+
import { checkNumber, checkNumberSync } from "./checkers/TypeError/checkNumber";
|
|
5
|
+
import { checkObject, checkObjectSync } from "./checkers/TypeError/checkObject";
|
|
6
|
+
import { checkString, checkStringSync } from "./checkers/TypeError/checkString";
|
|
7
|
+
import { checkArray, checkArraySync } from "./checkers/TypeError/checkArray";
|
|
8
|
+
import { checkInteger, checkIntegerSync } from "./checkers/TypeError/checkInteger";
|
|
9
|
+
import { checkNonEmptyArray, checkNonEmptyArraySync } from "./checkers/RangeError/checkNonEmptyArray";
|
|
10
|
+
import { checkNonEmptyInteger, checkNonEmptyIntegerSync } from "./checkers/RangeError/checkNonEmptyInteger";
|
|
11
|
+
import { checkNonEmptyNumber, checkNonEmptyNumberSync } from "./checkers/RangeError/checkNonEmptyNumber";
|
|
12
|
+
import { checkNonEmptyObject, checkNonEmptyObjectSync } from "./checkers/RangeError/checkNonEmptyObject";
|
|
13
|
+
import { checkNonEmptyString, checkNonEmptyStringSync } from "./checkers/RangeError/checkNonEmptyString";
|
|
14
|
+
import { checkNumberBetween, checkNumberBetweenSync } from "./checkers/RangeError/checkNumberBetween";
|
|
15
|
+
import { checkObjectLength, checkObjectLengthSync } from "./checkers/RangeError/checkObjectLength";
|
|
16
|
+
import { checkObjectLengthBetween, checkObjectLengthBetweenSync } from "./checkers/RangeError/checkObjectLengthBetween";
|
|
17
|
+
import { checkStringLength, checkStringLengthSync } from "./checkers/RangeError/checkStringLength";
|
|
18
|
+
import { checkStringLengthBetween, checkStringLengthBetweenSync } from "./checkers/RangeError/checkStringLengthBetween";
|
|
19
|
+
import { checkIntegerBetween, checkIntegerBetweenSync } from "./checkers/RangeError/checkIntegerBetween";
|
|
20
|
+
import { checkArrayLength, checkArrayLengthSync } from "./checkers/RangeError/checkArrayLength";
|
|
21
|
+
import { checkArrayLengthBetween, checkArrayLengthBetweenSync } from "./checkers/RangeError/checkArrayLengthBetween";
|
|
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, { iDescriptorUserOptions, tLogType, tLogger } from "./components/DescriptorUser";
|
|
24
|
+
import Mediator, { iUrlParameters } from "./components/Mediator";
|
|
25
|
+
import MediatorUser, { iMediatorUserOptions } from "./components/MediatorUser";
|
|
26
|
+
import NotFoundError from "./components/NotFoundError";
|
|
27
|
+
import Orchestrator, { iOrchestratorOptions } from "./components/Orchestrator";
|
|
28
|
+
import Server, { iClient, iIncomingMessage, iServerResponse } from "./components/Server";
|
|
29
|
+
export { tLogType, tLogger, iUrlParameters, iClient, iIncomingMessage, iServerResponse };
|
|
30
|
+
export { DescriptorUser, iDescriptorUserOptions, Mediator, MediatorUser, iMediatorUserOptions, NotFoundError, Orchestrator, iOrchestratorOptions, Server };
|