node-pluginsmanager-plugin 7.4.0 → 7.4.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.
@@ -13,6 +13,10 @@ export interface iOrchestratorOptions {
13
13
  "serverFile": string;
14
14
  "logger"?: tLogger;
15
15
  }
16
+ export interface iEngines {
17
+ [key: string]: string;
18
+ "node": string;
19
+ }
16
20
  export default class Orchestrator<T extends iEventsMinimal & tEventMap<T> = iEventsMinimal> extends MediatorUser<T> {
17
21
  protected _Server: Server | null;
18
22
  protected _socketServer: WebSocketServer | SocketIOServer | SocketIOServerV2 | null;
@@ -26,13 +30,13 @@ export default class Orchestrator<T extends iEventsMinimal & tEventMap<T> = iEve
26
30
  enabled: boolean;
27
31
  authors: string[];
28
32
  description: string;
29
- dependencies: object | null;
30
- devDependencies: object | null;
31
- engines: object | null;
33
+ dependencies: Record<string, string> | null;
34
+ devDependencies: Record<string, string> | null;
35
+ engines: iEngines | null;
32
36
  license: string;
33
37
  main: string;
34
38
  name: string;
35
- scripts: object | null;
39
+ scripts: Record<string, string> | null;
36
40
  version: string;
37
41
  constructor(options: iOrchestratorOptions);
38
42
  checkConf(): Promise<void>;
@@ -11,8 +11,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
11
11
  };
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  // deps
14
- // natives
15
- const node_path_1 = require("node:path");
16
14
  // locals
17
15
  const checkObject_1 = require("../checkers/TypeError/checkObject");
18
16
  const MediatorUser_1 = __importDefault(require("./MediatorUser"));
@@ -206,23 +204,18 @@ class Orchestrator extends MediatorUser_1.default {
206
204
  }
207
205
  // load / destroy
208
206
  load(...data) {
209
- return this.checkFiles().then(() => {
210
- return (0, readJSONFile_1.default)((0, node_path_1.join)(__dirname, "..", "..", "..", "package.json")); // enforce current core engine version
211
- }).then(({ engines }) => {
212
- // native
213
- this.authors = [];
214
- this.description = "";
215
- this.dependencies = {};
216
- this.devDependencies = {};
217
- this.engines = engines;
218
- this.license = "MIT";
219
- this.main = "lib/main.js";
220
- this.name = "";
221
- this.scripts = {};
222
- this.version = "";
223
- return (0, readJSONFile_1.default)(this._packageFile);
224
- // formate authors
225
- }).then((packageData) => {
207
+ // native
208
+ this.authors = [];
209
+ this.description = "";
210
+ this.dependencies = {};
211
+ this.devDependencies = {};
212
+ this.engines = null;
213
+ this.license = "MIT";
214
+ this.main = "lib/main.js";
215
+ this.name = "";
216
+ this.scripts = {};
217
+ this.version = "";
218
+ return (0, readJSONFile_1.default)(this._packageFile).then((packageData) => {
226
219
  if ("undefined" !== typeof packageData.authors) {
227
220
  if (Array.isArray(packageData.authors)) {
228
221
  this.authors = packageData.authors;
@@ -16,7 +16,7 @@ export { isPlainObject, isFile, readJSONFile, isDirectory };
16
16
  import DescriptorUser, { type iDescriptorUserOptions, type tLogType, type tLogger, type iEventsMinimal } from "./components/DescriptorUser";
17
17
  import Mediator, { type iUrlAllowedParameters } from "./components/Mediator";
18
18
  import MediatorUser, { type iMediatorUserOptions } from "./components/MediatorUser";
19
- import Orchestrator, { type iOrchestratorOptions } from "./components/Orchestrator";
19
+ import Orchestrator, { type iOrchestratorOptions, type iEngines } from "./components/Orchestrator";
20
20
  import Server, { type iClient } from "./components/Server";
21
21
  import ConflictError from "./components/errors/ConflictError";
22
22
  import LockedError from "./components/errors/LockedError";
@@ -24,4 +24,4 @@ import NotFoundError from "./components/errors/NotFoundError";
24
24
  import UnauthorizedError from "./components/errors/UnauthorizedError";
25
25
  import formateError, { type iFormattedError } from "./utils/server/formateError";
26
26
  export type { tLogType, tLogger, iEventsMinimal, iUrlAllowedParameters, iClient };
27
- export { DescriptorUser, type iDescriptorUserOptions, Mediator, MediatorUser, type iMediatorUserOptions, Orchestrator, type iOrchestratorOptions, Server, ConflictError, LockedError, NotFoundError, UnauthorizedError, formateError, type iFormattedError };
27
+ export { DescriptorUser, type iDescriptorUserOptions, Mediator, MediatorUser, type iMediatorUserOptions, Orchestrator, type iOrchestratorOptions, type iEngines, Server, ConflictError, LockedError, NotFoundError, UnauthorizedError, formateError, type iFormattedError };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "node-pluginsmanager-plugin",
4
- "version": "7.4.0",
4
+ "version": "7.4.1",
5
5
  "description": "An abstract parent plugin for node-pluginsmanager.",
6
6
 
7
7
  "type": "commonjs",
@@ -44,7 +44,7 @@
44
44
  "lib/@types"
45
45
  ],
46
46
  "engines": {
47
- "node": ">=22.22.3"
47
+ "node": ">=22.23.1"
48
48
  },
49
49
 
50
50
  "dependencies": {