node-pluginsmanager-plugin 7.3.2 → 7.4.0
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/main.cjs +10 -1
- package/lib/cjs/main.d.cts +5 -0
- package/lib/cjs/utils/file/isDirectory.d.ts +1 -0
- package/lib/cjs/utils/file/isDirectory.js +18 -0
- package/lib/cjs/utils/file/isFile.d.ts +1 -1
- package/lib/cjs/utils/file/isFile.js +3 -3
- package/lib/cjs/utils/isPlainObject.d.ts +1 -0
- package/lib/cjs/utils/isPlainObject.js +10 -0
- package/package.json +2 -2
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.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;
|
|
7
|
+
exports.formateError = exports.UnauthorizedError = exports.NotFoundError = exports.LockedError = exports.ConflictError = exports.Server = exports.Orchestrator = exports.MediatorUser = exports.Mediator = exports.DescriptorUser = exports.isDirectory = exports.readJSONFile = exports.isFile = exports.isPlainObject = 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; } });
|
|
@@ -36,6 +36,15 @@ Object.defineProperty(exports, "checkNonEmptyObjectSync", { enumerable: true, ge
|
|
|
36
36
|
const checkNonEmptyString_1 = require("./checkers/RangeError/checkNonEmptyString");
|
|
37
37
|
Object.defineProperty(exports, "checkNonEmptyString", { enumerable: true, get: function () { return checkNonEmptyString_1.checkNonEmptyString; } });
|
|
38
38
|
Object.defineProperty(exports, "checkNonEmptyStringSync", { enumerable: true, get: function () { return checkNonEmptyString_1.checkNonEmptyStringSync; } });
|
|
39
|
+
// utils
|
|
40
|
+
const isPlainObject_1 = __importDefault(require("./utils/isPlainObject"));
|
|
41
|
+
exports.isPlainObject = isPlainObject_1.default;
|
|
42
|
+
const isFile_1 = __importDefault(require("./utils/file/isFile"));
|
|
43
|
+
exports.isFile = isFile_1.default;
|
|
44
|
+
const readJSONFile_1 = __importDefault(require("./utils/file/readJSONFile"));
|
|
45
|
+
exports.readJSONFile = readJSONFile_1.default;
|
|
46
|
+
const isDirectory_1 = __importDefault(require("./utils/file/isDirectory"));
|
|
47
|
+
exports.isDirectory = isDirectory_1.default;
|
|
39
48
|
// components
|
|
40
49
|
const DescriptorUser_1 = __importDefault(require("./components/DescriptorUser"));
|
|
41
50
|
exports.DescriptorUser = DescriptorUser_1.default;
|
package/lib/cjs/main.d.cts
CHANGED
|
@@ -8,6 +8,11 @@ import { checkNonEmptyNumber, checkNonEmptyNumberSync } from "./checkers/RangeEr
|
|
|
8
8
|
import { checkNonEmptyObject, checkNonEmptyObjectSync } from "./checkers/RangeError/checkNonEmptyObject";
|
|
9
9
|
import { checkNonEmptyString, checkNonEmptyStringSync } from "./checkers/RangeError/checkNonEmptyString";
|
|
10
10
|
export { checkExists, checkExistsSync, checkFunction, checkFunctionSync, checkNumber, checkNumberSync, checkObject, checkObjectSync, checkString, checkStringSync, checkInteger, checkIntegerSync, checkNonEmptyNumber, checkNonEmptyNumberSync, checkNonEmptyObject, checkNonEmptyObjectSync, checkNonEmptyString, checkNonEmptyStringSync };
|
|
11
|
+
import isPlainObject from "./utils/isPlainObject";
|
|
12
|
+
import isFile from "./utils/file/isFile";
|
|
13
|
+
import readJSONFile from "./utils/file/readJSONFile";
|
|
14
|
+
import isDirectory from "./utils/file/isDirectory";
|
|
15
|
+
export { isPlainObject, isFile, readJSONFile, isDirectory };
|
|
11
16
|
import DescriptorUser, { type iDescriptorUserOptions, type tLogType, type tLogger, type iEventsMinimal } from "./components/DescriptorUser";
|
|
12
17
|
import Mediator, { type iUrlAllowedParameters } from "./components/Mediator";
|
|
13
18
|
import MediatorUser, { type iMediatorUserOptions } from "./components/MediatorUser";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isDirectory(directoryPath: string): Promise<boolean>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// deps
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.default = isDirectory;
|
|
5
|
+
// natives
|
|
6
|
+
const node_fs_1 = require("node:fs");
|
|
7
|
+
// locals
|
|
8
|
+
const checkNonEmptyString_1 = require("../../checkers/RangeError/checkNonEmptyString");
|
|
9
|
+
// module
|
|
10
|
+
function isDirectory(directoryPath) {
|
|
11
|
+
return (0, checkNonEmptyString_1.checkNonEmptyString)("directoryPath", directoryPath).then(() => {
|
|
12
|
+
return new Promise((resolve) => {
|
|
13
|
+
(0, node_fs_1.lstat)(directoryPath, (err, stats) => {
|
|
14
|
+
return resolve(Boolean(!err && stats.isDirectory()));
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function isFile(
|
|
1
|
+
export default function isFile(filePath: string): Promise<boolean>;
|
|
@@ -7,10 +7,10 @@ const node_fs_1 = require("node:fs");
|
|
|
7
7
|
// locals
|
|
8
8
|
const checkNonEmptyString_1 = require("../../checkers/RangeError/checkNonEmptyString");
|
|
9
9
|
// module
|
|
10
|
-
function isFile(
|
|
11
|
-
return (0, checkNonEmptyString_1.checkNonEmptyString)("
|
|
10
|
+
function isFile(filePath) {
|
|
11
|
+
return (0, checkNonEmptyString_1.checkNonEmptyString)("filePath", filePath).then(() => {
|
|
12
12
|
return new Promise((resolve) => {
|
|
13
|
-
(0, node_fs_1.lstat)(
|
|
13
|
+
(0, node_fs_1.lstat)(filePath, (err, stats) => {
|
|
14
14
|
return resolve(Boolean(!err && stats.isFile()));
|
|
15
15
|
});
|
|
16
16
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isPlainObject(value: unknown): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// module
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.default = isPlainObject;
|
|
5
|
+
function isPlainObject(value) {
|
|
6
|
+
if ("object" !== typeof value || null === value) {
|
|
7
|
+
return false;
|
|
8
|
+
}
|
|
9
|
+
return Object.getPrototypeOf(value) === Object.getPrototypeOf({});
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
|
|
3
3
|
"name": "node-pluginsmanager-plugin",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.4.0",
|
|
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.3",
|
|
58
58
|
"@types/socket.io": "3.0.2",
|
|
59
59
|
"@types/uniqid": "5.3.4",
|
|
60
60
|
"@types/ws": "8.18.1",
|