node-pluginsmanager-plugin 7.3.1 → 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.
@@ -0,0 +1,2 @@
1
+ export default class ConflictError extends Error {
2
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ // module
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ class ConflictError extends Error {
5
+ }
6
+ exports.default = ConflictError;
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.LockedError = exports.NotFoundError = exports.UnauthorizedError = 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;
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 UnauthorizedError_1 = __importDefault(require("./components/errors/UnauthorizedError"));
51
- exports.UnauthorizedError = UnauthorizedError_1.default;
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;
@@ -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 UnauthorizedError from "./components/errors/UnauthorizedError";
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, UnauthorizedError, NotFoundError, LockedError, formateError, type iFormattedError };
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,
@@ -8,6 +8,7 @@ declare const _default: {
8
8
  JSON_PARSE: number;
9
9
  UNAUTHORIZED: number;
10
10
  NOT_FOUND: number;
11
+ CONFLICT: number;
11
12
  MISSING_HEADER: number;
12
13
  LOCKED: number;
13
14
  INTERNAL_SERVER_ERROR: number;
@@ -10,6 +10,7 @@ exports.default = {
10
10
  "JSON_PARSE": 400,
11
11
  "UNAUTHORIZED": 401,
12
12
  "NOT_FOUND": 404,
13
+ "CONFLICT": 409,
13
14
  "MISSING_HEADER": 411,
14
15
  "LOCKED": 423,
15
16
  "INTERNAL_SERVER_ERROR": 500,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "node-pluginsmanager-plugin",
4
- "version": "7.3.1",
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.1",
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",