@e-mc/file-manager 0.9.19 → 0.9.20

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 +10 -10
  2. package/index.js +3 -3
  3. package/package.json +10 -10
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.19/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.9.20/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { DataSource, IncrementalMatch, TaskAction } from "./squared";
@@ -286,15 +286,15 @@ NOTE: **FileManager** is a sub-class of [Host](https://www.npmjs.com/package/@e-
286
286
 
287
287
  ## References
288
288
 
289
- - https://www.unpkg.com/@e-mc/types@0.9.19/lib/squared.d.ts
290
- - https://www.unpkg.com/@e-mc/types@0.9.19/lib/asset.d.ts
291
- - https://www.unpkg.com/@e-mc/types@0.9.19/lib/core.d.ts
292
- - https://www.unpkg.com/@e-mc/types@0.9.19/lib/filemanager.d.ts
293
- - https://www.unpkg.com/@e-mc/types@0.9.19/lib/logger.d.ts
294
- - https://www.unpkg.com/@e-mc/types@0.9.19/lib/module.d.ts
295
- - https://www.unpkg.com/@e-mc/types@0.9.19/lib/node.d.ts
296
- - https://www.unpkg.com/@e-mc/types@0.9.19/lib/request.d.ts
297
- - https://www.unpkg.com/@e-mc/types@0.9.19/lib/settings.d.ts
289
+ - https://www.unpkg.com/@e-mc/types@0.9.20/lib/squared.d.ts
290
+ - https://www.unpkg.com/@e-mc/types@0.9.20/lib/asset.d.ts
291
+ - https://www.unpkg.com/@e-mc/types@0.9.20/lib/core.d.ts
292
+ - https://www.unpkg.com/@e-mc/types@0.9.20/lib/filemanager.d.ts
293
+ - https://www.unpkg.com/@e-mc/types@0.9.20/lib/logger.d.ts
294
+ - https://www.unpkg.com/@e-mc/types@0.9.20/lib/module.d.ts
295
+ - https://www.unpkg.com/@e-mc/types@0.9.20/lib/node.d.ts
296
+ - https://www.unpkg.com/@e-mc/types@0.9.20/lib/request.d.ts
297
+ - https://www.unpkg.com/@e-mc/types@0.9.20/lib/settings.d.ts
298
298
 
299
299
  * https://www.npmjs.com/package/@types/node
300
300
 
package/index.js CHANGED
@@ -201,8 +201,8 @@ function validatePaths(rootDir, values, patterns, include, dot) {
201
201
  value = value.substring(1);
202
202
  invert = true;
203
203
  }
204
- const matchBase = !isMatchRoot(value = core_1.Permission.toPosix(value));
205
- return [pm(value, { posixSlashes: true, windows: true, nocase: PLATFORM_WIN32, dot, matchBase }), path.isAbsolute(value), invert];
204
+ value = core_1.Permission.toPosix(value);
205
+ return [pm(value, getPmOptions(value, dot)), path.isAbsolute(value), invert];
206
206
  });
207
207
  return values.filter(value => {
208
208
  for (const [pattern, absolute, invert] of items) {
@@ -323,7 +323,7 @@ function rejectModule(err, type, hint) {
323
323
  const padStart = (value, char) => value > 9 ? value.toString() : char + value;
324
324
  const checksumFile = (algorithm) => "checksum" + '.' + ((0, types_1.isString)(algorithm) ? algorithm.toLowerCase() : "sha256");
325
325
  const checksumError = (algorithm) => new Error("Invalid parameters" + ` (${algorithm || "sha256"})`);
326
- const isMatchRoot = (value) => !value.startsWith('*') && value.includes('/');
326
+ const getPmOptions = (value, dot = false) => ({ nocase: PLATFORM_WIN32, matchBase: value.startsWith('*') && !value.includes('/'), dot });
327
327
  const isFunction = (value) => typeof value === 'function';
328
328
  const ignoreAsset = (item, exists) => item.invalid || (0, types_1.hasBit)(item.flags, 1 | (!exists ? 128 : 0));
329
329
  class Scheduler {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/file-manager",
3
- "version": "0.9.19",
3
+ "version": "0.9.20",
4
4
  "description": "FileManager constructor for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -20,15 +20,15 @@
20
20
  "license": "MIT",
21
21
  "homepage": "https://github.com/anpham6/e-mc#readme",
22
22
  "dependencies": {
23
- "@e-mc/cloud": "0.9.19",
24
- "@e-mc/compress": "0.9.19",
25
- "@e-mc/core": "0.9.19",
26
- "@e-mc/document": "0.9.19",
27
- "@e-mc/image": "0.9.19",
28
- "@e-mc/request": "0.9.19",
29
- "@e-mc/task": "0.9.19",
30
- "@e-mc/types": "0.9.19",
31
- "@e-mc/watch": "0.9.19",
23
+ "@e-mc/cloud": "0.9.20",
24
+ "@e-mc/compress": "0.9.20",
25
+ "@e-mc/core": "0.9.20",
26
+ "@e-mc/document": "0.9.20",
27
+ "@e-mc/image": "0.9.20",
28
+ "@e-mc/request": "0.9.20",
29
+ "@e-mc/task": "0.9.20",
30
+ "@e-mc/types": "0.9.20",
31
+ "@e-mc/watch": "0.9.20",
32
32
  "chalk": "4.1.2",
33
33
  "picomatch": "^4.0.2"
34
34
  }