@e-mc/core 0.9.16 → 0.9.18

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.
Files changed (3) hide show
  1. package/README.md +8 -8
  2. package/index.js +6 -3
  3. package/package.json +3 -3
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- * [View Source](https://www.unpkg.com/@e-mc/types@0.9.16/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.9.18/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { DataSource, LogStatus } from "./squared";
@@ -229,13 +229,13 @@ NOTE: **@e-mc/core** is mostly a collection of abstract base classes which canno
229
229
 
230
230
  ## References
231
231
 
232
- - https://www.unpkg.com/@e-mc/types@0.9.16/lib/squared.d.ts
233
- - https://www.unpkg.com/@e-mc/types@0.9.16/lib/core.d.ts
234
- - https://www.unpkg.com/@e-mc/types@0.9.16/lib/db.d.ts
235
- - https://www.unpkg.com/@e-mc/types@0.9.16/lib/dom.d.ts
236
- - https://www.unpkg.com/@e-mc/types@0.9.16/lib/logger.d.ts
237
- - https://www.unpkg.com/@e-mc/types@0.9.16/lib/node.d.ts
238
- - https://www.unpkg.com/@e-mc/types@0.9.16/lib/settings.d.ts
232
+ - https://www.unpkg.com/@e-mc/types@0.9.18/lib/squared.d.ts
233
+ - https://www.unpkg.com/@e-mc/types@0.9.18/lib/core.d.ts
234
+ - https://www.unpkg.com/@e-mc/types@0.9.18/lib/db.d.ts
235
+ - https://www.unpkg.com/@e-mc/types@0.9.18/lib/dom.d.ts
236
+ - https://www.unpkg.com/@e-mc/types@0.9.18/lib/logger.d.ts
237
+ - https://www.unpkg.com/@e-mc/types@0.9.18/lib/node.d.ts
238
+ - https://www.unpkg.com/@e-mc/types@0.9.18/lib/settings.d.ts
239
239
 
240
240
  ## LICENSE
241
241
 
package/index.js CHANGED
@@ -215,8 +215,11 @@ function isInvalidRange(result, range) {
215
215
  return result.length <= lower || upper > 0 && result.length > upper;
216
216
  }
217
217
  function asPosix(value) {
218
- value = path.normalize(value.trim());
219
- return PLATFORM_WIN32 ? value.replace(/(?:^\\|\\+)/g, '/') : value;
218
+ if (PLATFORM_WIN32) {
219
+ value = path.normalize(value.trim());
220
+ return value.replace(/(?:^\\|\\+)/g, '/');
221
+ }
222
+ return path.normalize(value);
220
223
  }
221
224
  const readable = (value) => (0, types_1.isString)(value) || (0, types_1.isArray)(value);
222
225
  const expireTime = (value) => Date.now() + value * 1000;
@@ -338,7 +341,7 @@ class Host extends module_1 {
338
341
  return permission;
339
342
  }
340
343
  static isPermission(value) {
341
- return value instanceof Permission;
344
+ return value instanceof Permission || (0, types_1.isObject)(value) && !!value[kDiskRead] && !!value[kDiskWrite];
342
345
  }
343
346
  static kill(username, iv, pid) {
344
347
  let result = 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/core",
3
- "version": "0.9.16",
3
+ "version": "0.9.18",
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": "BSD-3-Clause",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/module": "0.9.16",
24
- "@e-mc/types": "0.9.16",
23
+ "@e-mc/module": "0.9.18",
24
+ "@e-mc/types": "0.9.18",
25
25
  "picomatch": "^4.0.2"
26
26
  }
27
27
  }