node-pluginsmanager-plugin 7.4.0 → 7.4.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.
|
@@ -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,14 @@ export default class Orchestrator<T extends iEventsMinimal & tEventMap<T> = iEve
|
|
|
26
30
|
enabled: boolean;
|
|
27
31
|
authors: string[];
|
|
28
32
|
description: string;
|
|
29
|
-
dependencies:
|
|
30
|
-
devDependencies:
|
|
31
|
-
engines:
|
|
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
|
-
|
|
39
|
+
repository: string;
|
|
40
|
+
scripts: Record<string, string> | null;
|
|
36
41
|
version: string;
|
|
37
42
|
constructor(options: iOrchestratorOptions);
|
|
38
43
|
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"));
|
|
@@ -44,6 +42,7 @@ class Orchestrator extends MediatorUser_1.default {
|
|
|
44
42
|
license;
|
|
45
43
|
main;
|
|
46
44
|
name;
|
|
45
|
+
repository;
|
|
47
46
|
scripts;
|
|
48
47
|
version;
|
|
49
48
|
// constructor
|
|
@@ -84,6 +83,7 @@ class Orchestrator extends MediatorUser_1.default {
|
|
|
84
83
|
this.license = "";
|
|
85
84
|
this.main = "";
|
|
86
85
|
this.name = "";
|
|
86
|
+
this.repository = "";
|
|
87
87
|
this.scripts = null;
|
|
88
88
|
this.version = "";
|
|
89
89
|
}
|
|
@@ -206,23 +206,20 @@ class Orchestrator extends MediatorUser_1.default {
|
|
|
206
206
|
}
|
|
207
207
|
// load / destroy
|
|
208
208
|
load(...data) {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
return (0, readJSONFile_1.default)(this._packageFile);
|
|
224
|
-
// formate authors
|
|
225
|
-
}).then((packageData) => {
|
|
209
|
+
// native
|
|
210
|
+
this.authors = [];
|
|
211
|
+
this.description = "";
|
|
212
|
+
this.dependencies = {};
|
|
213
|
+
this.devDependencies = {};
|
|
214
|
+
this.engines = null;
|
|
215
|
+
this.license = "MIT";
|
|
216
|
+
this.main = "lib/main.js";
|
|
217
|
+
this.name = "";
|
|
218
|
+
this.repository = "";
|
|
219
|
+
this.scripts = {};
|
|
220
|
+
this.version = "";
|
|
221
|
+
return (0, readJSONFile_1.default)(this._packageFile).then((packageData) => {
|
|
222
|
+
// extract authors
|
|
226
223
|
if ("undefined" !== typeof packageData.authors) {
|
|
227
224
|
if (Array.isArray(packageData.authors)) {
|
|
228
225
|
this.authors = packageData.authors;
|
|
@@ -242,6 +239,20 @@ class Orchestrator extends MediatorUser_1.default {
|
|
|
242
239
|
delete packageData.author;
|
|
243
240
|
}
|
|
244
241
|
return packageData;
|
|
242
|
+
}).then((packageData) => {
|
|
243
|
+
// extract repository
|
|
244
|
+
if ("string" === typeof packageData.repository) {
|
|
245
|
+
this.repository = packageData.repository;
|
|
246
|
+
delete packageData.repository;
|
|
247
|
+
}
|
|
248
|
+
else if ("object" === typeof packageData.repository && null !== packageData.repository) {
|
|
249
|
+
const { url } = packageData.repository;
|
|
250
|
+
if ("string" === typeof url) {
|
|
251
|
+
this.repository = url;
|
|
252
|
+
delete packageData.repository;
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return packageData;
|
|
245
256
|
// formate other data
|
|
246
257
|
}).then((packageData) => {
|
|
247
258
|
Object.keys(packageData).forEach((key) => {
|
package/lib/cjs/main.d.cts
CHANGED
|
@@ -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.
|
|
4
|
+
"version": "7.4.2",
|
|
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.
|
|
47
|
+
"node": ">=22.23.1"
|
|
48
48
|
},
|
|
49
49
|
|
|
50
50
|
"dependencies": {
|