node-pluginsmanager-plugin 7.3.0 → 7.3.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.
- package/lib/cjs/components/Server.js +1 -1
- package/lib/cjs/components/errors/ConflictError.d.ts +2 -0
- package/lib/cjs/components/errors/ConflictError.js +6 -0
- package/lib/cjs/main.cjs +7 -5
- package/lib/cjs/main.d.cts +4 -3
- package/lib/cjs/utils/server/formateError.js +8 -0
- package/lib/cjs/utils/serverCodes.d.ts +1 -0
- package/lib/cjs/utils/serverCodes.js +1 -0
- package/package.json +2 -2
|
@@ -340,7 +340,7 @@ class Server extends MediatorUser_1.default {
|
|
|
340
340
|
if ("get" === req.method.toLowerCase()) {
|
|
341
341
|
return Promise.resolve("");
|
|
342
342
|
}
|
|
343
|
-
else if (
|
|
343
|
+
else if ("undefined" !== typeof req.body) {
|
|
344
344
|
return Promise.resolve(req.body);
|
|
345
345
|
}
|
|
346
346
|
else {
|
package/lib/cjs/main.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.formateError = exports.
|
|
7
|
+
exports.formateError = exports.UnauthorizedError = exports.NotFoundError = exports.LockedError = exports.ConflictError = exports.Server = exports.Orchestrator = exports.MediatorUser = exports.Mediator = exports.DescriptorUser = exports.checkNonEmptyStringSync = exports.checkNonEmptyString = exports.checkNonEmptyObjectSync = exports.checkNonEmptyObject = exports.checkNonEmptyNumberSync = exports.checkNonEmptyNumber = exports.checkIntegerSync = exports.checkInteger = exports.checkStringSync = exports.checkString = exports.checkObjectSync = exports.checkObject = exports.checkNumberSync = exports.checkNumber = exports.checkFunctionSync = exports.checkFunction = exports.checkExistsSync = exports.checkExists = void 0;
|
|
8
8
|
// undefined
|
|
9
9
|
const checkExists_1 = require("./checkers/ReferenceError/checkExists");
|
|
10
10
|
Object.defineProperty(exports, "checkExists", { enumerable: true, get: function () { return checkExists_1.checkExists; } });
|
|
@@ -47,11 +47,13 @@ const Orchestrator_1 = __importDefault(require("./components/Orchestrator"));
|
|
|
47
47
|
exports.Orchestrator = Orchestrator_1.default;
|
|
48
48
|
const Server_1 = __importDefault(require("./components/Server"));
|
|
49
49
|
exports.Server = Server_1.default;
|
|
50
|
-
const
|
|
51
|
-
exports.
|
|
52
|
-
const NotFoundError_1 = __importDefault(require("./components/errors/NotFoundError"));
|
|
53
|
-
exports.NotFoundError = NotFoundError_1.default;
|
|
50
|
+
const ConflictError_1 = __importDefault(require("./components/errors/ConflictError"));
|
|
51
|
+
exports.ConflictError = ConflictError_1.default;
|
|
54
52
|
const LockedError_1 = __importDefault(require("./components/errors/LockedError"));
|
|
55
53
|
exports.LockedError = LockedError_1.default;
|
|
54
|
+
const NotFoundError_1 = __importDefault(require("./components/errors/NotFoundError"));
|
|
55
|
+
exports.NotFoundError = NotFoundError_1.default;
|
|
56
|
+
const UnauthorizedError_1 = __importDefault(require("./components/errors/UnauthorizedError"));
|
|
57
|
+
exports.UnauthorizedError = UnauthorizedError_1.default;
|
|
56
58
|
const formateError_1 = __importDefault(require("./utils/server/formateError"));
|
|
57
59
|
exports.formateError = formateError_1.default;
|
package/lib/cjs/main.d.cts
CHANGED
|
@@ -13,9 +13,10 @@ import Mediator, { type iUrlAllowedParameters } from "./components/Mediator";
|
|
|
13
13
|
import MediatorUser, { type iMediatorUserOptions } from "./components/MediatorUser";
|
|
14
14
|
import Orchestrator, { type iOrchestratorOptions } from "./components/Orchestrator";
|
|
15
15
|
import Server, { type iClient } from "./components/Server";
|
|
16
|
-
import
|
|
17
|
-
import NotFoundError from "./components/errors/NotFoundError";
|
|
16
|
+
import ConflictError from "./components/errors/ConflictError";
|
|
18
17
|
import LockedError from "./components/errors/LockedError";
|
|
18
|
+
import NotFoundError from "./components/errors/NotFoundError";
|
|
19
|
+
import UnauthorizedError from "./components/errors/UnauthorizedError";
|
|
19
20
|
import formateError, { type iFormattedError } from "./utils/server/formateError";
|
|
20
21
|
export type { tLogType, tLogger, iEventsMinimal, iUrlAllowedParameters, iClient };
|
|
21
|
-
export { DescriptorUser, type iDescriptorUserOptions, Mediator, MediatorUser, type iMediatorUserOptions, Orchestrator, type iOrchestratorOptions, Server,
|
|
22
|
+
export { DescriptorUser, type iDescriptorUserOptions, Mediator, MediatorUser, type iMediatorUserOptions, Orchestrator, type iOrchestratorOptions, Server, ConflictError, LockedError, NotFoundError, UnauthorizedError, formateError, type iFormattedError };
|
|
@@ -6,6 +6,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
7
|
exports.default = formateError;
|
|
8
8
|
// locals
|
|
9
|
+
const ConflictError_1 = __importDefault(require("../../components/errors/ConflictError"));
|
|
9
10
|
const LockedError_1 = __importDefault(require("../../components/errors/LockedError"));
|
|
10
11
|
const NotFoundError_1 = __importDefault(require("../../components/errors/NotFoundError"));
|
|
11
12
|
const UnauthorizedError_1 = __importDefault(require("../../components/errors/UnauthorizedError"));
|
|
@@ -55,6 +56,13 @@ function formateError(err) {
|
|
|
55
56
|
"message": (0, cleanSendedError_1.default)(err)
|
|
56
57
|
};
|
|
57
58
|
}
|
|
59
|
+
else if (err instanceof ConflictError_1.default) {
|
|
60
|
+
return {
|
|
61
|
+
"httpCode": serverCodes_1.default.CONFLICT,
|
|
62
|
+
"code": "CONFLICT",
|
|
63
|
+
"message": (0, cleanSendedError_1.default)(err)
|
|
64
|
+
};
|
|
65
|
+
}
|
|
58
66
|
else if (err instanceof LockedError_1.default) {
|
|
59
67
|
return {
|
|
60
68
|
"httpCode": serverCodes_1.default.LOCKED,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
|
|
3
3
|
"name": "node-pluginsmanager-plugin",
|
|
4
|
-
"version": "7.3.
|
|
4
|
+
"version": "7.3.2",
|
|
5
5
|
"description": "An abstract parent plugin for node-pluginsmanager.",
|
|
6
6
|
|
|
7
7
|
"type": "commonjs",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/express": "5.0.6",
|
|
57
|
-
"@types/node": "25.9.
|
|
57
|
+
"@types/node": "25.9.2",
|
|
58
58
|
"@types/socket.io": "3.0.2",
|
|
59
59
|
"@types/uniqid": "5.3.4",
|
|
60
60
|
"@types/ws": "8.18.1",
|