@e-mc/file-manager 0.8.14 → 0.8.16

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 +8 -7
  3. package/package.json +10 -10
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
 
10
10
  ## Interface
11
11
 
12
- - https://www.unpkg.com/@e-mc/types@0.8.14/lib/index.d.ts
12
+ - https://www.unpkg.com/@e-mc/types@0.8.16/lib/index.d.ts
13
13
 
14
14
  ```typescript
15
15
  import type { DataSource, IncrementalMatch, TaskAction } from "./squared";
@@ -191,15 +191,15 @@ interface FileManagerConstructor extends HostConstructor {
191
191
 
192
192
  ## References
193
193
 
194
- - https://www.unpkg.com/@e-mc/types@0.8.14/lib/squared.d.ts
195
- - https://www.unpkg.com/@e-mc/types@0.8.14/lib/asset.d.ts
196
- - https://www.unpkg.com/@e-mc/types@0.8.14/lib/core.d.ts
197
- - https://www.unpkg.com/@e-mc/types@0.8.14/lib/filemanager.d.ts
198
- - https://www.unpkg.com/@e-mc/types@0.8.14/lib/logger.d.ts
199
- - https://www.unpkg.com/@e-mc/types@0.8.14/lib/module.d.ts
200
- - https://www.unpkg.com/@e-mc/types@0.8.14/lib/node.d.ts
201
- - https://www.unpkg.com/@e-mc/types@0.8.14/lib/request.d.ts
202
- - https://www.unpkg.com/@e-mc/types@0.8.14/lib/settings.d.ts
194
+ - https://www.unpkg.com/@e-mc/types@0.8.16/lib/squared.d.ts
195
+ - https://www.unpkg.com/@e-mc/types@0.8.16/lib/asset.d.ts
196
+ - https://www.unpkg.com/@e-mc/types@0.8.16/lib/core.d.ts
197
+ - https://www.unpkg.com/@e-mc/types@0.8.16/lib/filemanager.d.ts
198
+ - https://www.unpkg.com/@e-mc/types@0.8.16/lib/logger.d.ts
199
+ - https://www.unpkg.com/@e-mc/types@0.8.16/lib/module.d.ts
200
+ - https://www.unpkg.com/@e-mc/types@0.8.16/lib/node.d.ts
201
+ - https://www.unpkg.com/@e-mc/types@0.8.16/lib/request.d.ts
202
+ - https://www.unpkg.com/@e-mc/types@0.8.16/lib/settings.d.ts
203
203
 
204
204
  ## LICENSE
205
205
 
package/index.js CHANGED
@@ -1597,6 +1597,7 @@ class FileManager extends core_1.Host {
1597
1597
  return document === moduleName || Array.isArray(document) && document.includes(moduleName);
1598
1598
  }
1599
1599
  setLocalUri(file, replace) {
1600
+ var _l;
1600
1601
  let uri = file.uri, type;
1601
1602
  if (uri && !file.url && !file.content && !file.base64 && !file.dataView) {
1602
1603
  if (core_1.Host.isFile(uri, 'torrent')) {
@@ -1649,6 +1650,13 @@ class FileManager extends core_1.Host {
1649
1650
  }
1650
1651
  }
1651
1652
  file.fetchType = type;
1653
+ if (file.document) {
1654
+ for (const { instance } of this.Document) {
1655
+ if (this.hasDocument(instance, file.document)) {
1656
+ (_l = instance.setLocalUri) === null || _l === void 0 ? void 0 : _l.call(instance, file, replace);
1657
+ }
1658
+ }
1659
+ }
1652
1660
  const segments = [];
1653
1661
  if (file.moveTo) {
1654
1662
  segments.push(file.moveTo);
@@ -1656,13 +1664,6 @@ class FileManager extends core_1.Host {
1656
1664
  if (file.pathname) {
1657
1665
  segments.push(file.pathname = core_1.Host.toPosix(file.pathname));
1658
1666
  }
1659
- if (file.document) {
1660
- for (const { instance } of this.Document) {
1661
- if (instance.setLocalUri && this.hasDocument(instance, file.document)) {
1662
- instance.setLocalUri(file, replace);
1663
- }
1664
- }
1665
- }
1666
1667
  const pathname = segments.length ? path.join(this.baseDirectory, ...segments) : this.baseDirectory;
1667
1668
  const localUri = file.filename ? path.join(pathname, file.filename) : pathname;
1668
1669
  file.localUri = localUri;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/file-manager",
3
- "version": "0.8.14",
3
+ "version": "0.8.16",
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.8.14",
24
- "@e-mc/compress": "0.8.14",
25
- "@e-mc/core": "0.8.14",
26
- "@e-mc/document": "0.8.14",
27
- "@e-mc/image": "0.8.14",
28
- "@e-mc/request": "0.8.14",
29
- "@e-mc/task": "0.8.14",
30
- "@e-mc/types": "0.8.14",
31
- "@e-mc/watch": "0.8.14",
23
+ "@e-mc/cloud": "0.8.16",
24
+ "@e-mc/compress": "0.8.16",
25
+ "@e-mc/core": "0.8.16",
26
+ "@e-mc/document": "0.8.16",
27
+ "@e-mc/image": "0.8.16",
28
+ "@e-mc/request": "0.8.16",
29
+ "@e-mc/task": "0.8.16",
30
+ "@e-mc/types": "0.8.16",
31
+ "@e-mc/watch": "0.8.16",
32
32
  "picomatch": "^3.0.1"
33
33
  }
34
34
  }