@e-mc/core 0.7.19 → 0.7.21
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/index.js +7 -4
- package/package.json +3 -3
package/index.js
CHANGED
|
@@ -118,7 +118,7 @@ function setPermission(name, pathname, enabled) {
|
|
|
118
118
|
break;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
this[name] = Object.freeze({ enabled, value: enabled ? pathname : '' });
|
|
121
|
+
this[name] = Object.freeze({ enabled, value: enabled ? Object.freeze(pathname) : '' });
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
function getFunctions(values) {
|
|
@@ -217,8 +217,11 @@ function updateHostQueue(host, position, priority, broadcast) {
|
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
function asPosix(value) {
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
if (PLATFORM_WIN32) {
|
|
221
|
+
value = path.normalize(value.trim());
|
|
222
|
+
return value.replace(/(?:^\\|\\+)/g, '/');
|
|
223
|
+
}
|
|
224
|
+
return path.normalize(value);
|
|
222
225
|
}
|
|
223
226
|
const readable = (value) => (0, types_1.isString)(value) || (0, types_1.isArray)(value);
|
|
224
227
|
const expireTime = (value) => Date.now() + value * 1000;
|
|
@@ -340,7 +343,7 @@ class Host extends module_1.default {
|
|
|
340
343
|
return permission;
|
|
341
344
|
}
|
|
342
345
|
static isPermission(value) {
|
|
343
|
-
return value instanceof Permission;
|
|
346
|
+
return value instanceof Permission || (0, types_1.isObject)(value) && !!value[kDiskRead] && !!value[kDiskWrite];
|
|
344
347
|
}
|
|
345
348
|
static kill(username, iv, pid) {
|
|
346
349
|
let result = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@e-mc/core",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.21",
|
|
4
4
|
"description": "Core modules for E-mc.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@e-mc/module": "0.7.
|
|
24
|
-
"@e-mc/types": "0.7.
|
|
23
|
+
"@e-mc/module": "0.7.21",
|
|
24
|
+
"@e-mc/types": "0.7.21",
|
|
25
25
|
"picomatch": "^3.0.1"
|
|
26
26
|
}
|
|
27
27
|
}
|