@e-mc/file-manager 0.13.8 → 0.13.9

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 +7 -4
  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.13.8/lib/index.d.ts)
12
+ * [View Source](https://www.unpkg.com/@e-mc/types@0.13.9/lib/index.d.ts)
13
13
 
14
14
  ```typescript
15
15
  import type { ChecksumValue, DataSource, IncrementalMatch, TaskAction } from "./squared";
@@ -297,15 +297,15 @@ NOTE: **FileManager** is a sub-class of [Host](https://www.npmjs.com/package/@e-
297
297
 
298
298
  ## References
299
299
 
300
- - https://www.unpkg.com/@e-mc/types@0.13.8/lib/squared.d.ts
301
- - https://www.unpkg.com/@e-mc/types@0.13.8/lib/asset.d.ts
302
- - https://www.unpkg.com/@e-mc/types@0.13.8/lib/core.d.ts
303
- - https://www.unpkg.com/@e-mc/types@0.13.8/lib/filemanager.d.ts
304
- - https://www.unpkg.com/@e-mc/types@0.13.8/lib/logger.d.ts
305
- - https://www.unpkg.com/@e-mc/types@0.13.8/lib/module.d.ts
306
- - https://www.unpkg.com/@e-mc/types@0.13.8/lib/node.d.ts
307
- - https://www.unpkg.com/@e-mc/types@0.13.8/lib/request.d.ts
308
- - https://www.unpkg.com/@e-mc/types@0.13.8/lib/settings.d.ts
300
+ - https://www.unpkg.com/@e-mc/types@0.13.9/lib/squared.d.ts
301
+ - https://www.unpkg.com/@e-mc/types@0.13.9/lib/asset.d.ts
302
+ - https://www.unpkg.com/@e-mc/types@0.13.9/lib/core.d.ts
303
+ - https://www.unpkg.com/@e-mc/types@0.13.9/lib/filemanager.d.ts
304
+ - https://www.unpkg.com/@e-mc/types@0.13.9/lib/logger.d.ts
305
+ - https://www.unpkg.com/@e-mc/types@0.13.9/lib/module.d.ts
306
+ - https://www.unpkg.com/@e-mc/types@0.13.9/lib/node.d.ts
307
+ - https://www.unpkg.com/@e-mc/types@0.13.9/lib/request.d.ts
308
+ - https://www.unpkg.com/@e-mc/types@0.13.9/lib/settings.d.ts
309
309
 
310
310
  * https://www.npmjs.com/package/@types/node
311
311
 
package/index.js CHANGED
@@ -1275,6 +1275,9 @@ class FileThread extends core_1.AbortComponent {
1275
1275
  get queuedTasks() {
1276
1276
  return this.#queuedTasks;
1277
1277
  }
1278
+ get localUri() {
1279
+ return this.file.localUri;
1280
+ }
1278
1281
  }
1279
1282
  class FileManager extends core_1.Host {
1280
1283
  static [kFileManager] = true;
@@ -3505,8 +3508,7 @@ class FileManager extends core_1.Host {
3505
3508
  };
3506
3509
  this.performAsyncTask();
3507
3510
  if (cacheDir || cacheBuffer || mainEtag) {
3508
- let redirects = 0;
3509
- (function checkHeaders(href) {
3511
+ const checkHeaders = (href, redirects) => {
3510
3512
  const request = this.Request;
3511
3513
  try {
3512
3514
  ++processTask.pending;
@@ -3618,7 +3620,7 @@ class FileManager extends core_1.Host {
3618
3620
  const location = res.headers.location;
3619
3621
  if (location && ++redirects <= HTTP_CLIENT.redirectLimit) {
3620
3622
  try {
3621
- checkHeaders.call(this, new URL((0, util_2.fromURL)(href, location)));
3623
+ checkHeaders(new URL((0, util_2.fromURL)(href, location)), redirects);
3622
3624
  return;
3623
3625
  }
3624
3626
  catch {
@@ -3652,7 +3654,8 @@ class FileManager extends core_1.Host {
3652
3654
  --processTask.pending;
3653
3655
  downloadUri(request.opts(href), null);
3654
3656
  }
3655
- }).bind(this)(url);
3657
+ };
3658
+ checkHeaders(url, 0);
3656
3659
  }
3657
3660
  else {
3658
3661
  downloadUri(this.Request.opts(url), null);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@e-mc/file-manager",
3
- "version": "0.13.8",
3
+ "version": "0.13.9",
4
4
  "description": "FileManager constructor for E-mc.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -19,15 +19,15 @@
19
19
  "license": "BSD-3-Clause",
20
20
  "homepage": "https://github.com/anpham6/e-mc#readme",
21
21
  "dependencies": {
22
- "@e-mc/cloud": "0.13.8",
23
- "@e-mc/compress": "0.13.8",
24
- "@e-mc/core": "0.13.8",
25
- "@e-mc/document": "0.13.8",
26
- "@e-mc/image": "0.13.8",
27
- "@e-mc/request": "0.13.8",
28
- "@e-mc/task": "0.13.8",
29
- "@e-mc/types": "0.13.8",
30
- "@e-mc/watch": "0.13.8",
22
+ "@e-mc/cloud": "0.13.9",
23
+ "@e-mc/compress": "0.13.9",
24
+ "@e-mc/core": "0.13.9",
25
+ "@e-mc/document": "0.13.9",
26
+ "@e-mc/image": "0.13.9",
27
+ "@e-mc/request": "0.13.9",
28
+ "@e-mc/task": "0.13.9",
29
+ "@e-mc/types": "0.13.9",
30
+ "@e-mc/watch": "0.13.9",
31
31
  "chalk": "4.1.2",
32
32
  "diff": "^8.0.3",
33
33
  "picomatch": "^4.0.3"