@e-mc/module 0.8.4 → 0.8.6
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/LICENSE +1 -1
- package/README.md +8 -9
- package/index.js +258 -247
- package/lib-v4.js +4 -4
- package/package.json +2 -2
package/lib-v4.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.validateUUID = exports.renameExt = exports.isString = exports.isPlainObject = exports.isObject = exports.formatSize = exports.escapePattern = exports.toTimeMs = exports.coerceObject = exports.cloneObject = exports.asFunction = exports.allSettled = exports.getFunctions = exports.readFileSafe = exports.isPathUNC = exports.isFileUNC = exports.isFileHTTP = exports.existsSafe = exports.generateUUID = exports.cleanupStream = exports.byteLength = exports.hasSameStat = exports.getSize = exports.hasSize = void 0;
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const fs = require("fs");
|
|
6
|
-
const types_1 = require("
|
|
6
|
+
const types_1 = require("@e-mc/types");
|
|
7
7
|
Object.defineProperty(exports, "asFunction", { enumerable: true, get: function () { return types_1.asFunction; } });
|
|
8
8
|
Object.defineProperty(exports, "cloneObject", { enumerable: true, get: function () { return types_1.cloneObject; } });
|
|
9
9
|
Object.defineProperty(exports, "coerceObject", { enumerable: true, get: function () { return types_1.coerceObject; } });
|
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "isPlainObject", { enumerable: true, get: functio
|
|
|
15
15
|
Object.defineProperty(exports, "isString", { enumerable: true, get: function () { return types_1.isString; } });
|
|
16
16
|
Object.defineProperty(exports, "renameExt", { enumerable: true, get: function () { return types_1.renameExt; } });
|
|
17
17
|
Object.defineProperty(exports, "validateUUID", { enumerable: true, get: function () { return types_1.validateUUID; } });
|
|
18
|
-
const index_1 = require("
|
|
18
|
+
const index_1 = require("@e-mc/module");
|
|
19
19
|
function hasSize(value, keepEmpty) {
|
|
20
20
|
try {
|
|
21
21
|
const statSrc = fs.statSync(value);
|
|
@@ -72,7 +72,7 @@ function cleanupStream(stream, uri) {
|
|
|
72
72
|
}
|
|
73
73
|
catch (err) {
|
|
74
74
|
if (!index_1.default.isErrorCode(err, 'ENOENT')) {
|
|
75
|
-
index_1.default.writeFail(["Unable to delete file"
|
|
75
|
+
index_1.default.writeFail(["Unable to delete file", path.basename(uri)], err, 32);
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -129,7 +129,7 @@ function getFunctions(values, absolute, sync = true, outFailed) {
|
|
|
129
129
|
result.push(method);
|
|
130
130
|
}
|
|
131
131
|
else if (outFailed) {
|
|
132
|
-
outFailed.push(index_1.default.asString(value) || "Unknown"
|
|
132
|
+
outFailed.push(index_1.default.asString(value) || "Unknown");
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
return result;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/module",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.6",
|
|
4
4
|
"description": "Module base class for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"license": "BSD 3-Clause",
|
|
21
21
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/types": "0.8.
|
|
23
|
+
"@e-mc/types": "0.8.6",
|
|
24
24
|
"abort-controller": "^3.0.0",
|
|
25
25
|
"chalk": "4.1.2",
|
|
26
26
|
"event-target-shim": "^5.0.1",
|