@e-mc/file-manager 0.6.6 → 0.6.8
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/LICENSE +6 -6
- package/README.md +6 -6
- package/index.d.ts +5 -5
- package/index.js +8 -7
- package/package.json +33 -33
package/LICENSE
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
Copyright 2024 An Pham
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
-
|
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
-
|
|
1
|
+
Copyright 2024 An Pham
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
7
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
# @e-mc/file-manager
|
|
2
|
-
|
|
3
|
-
PEP 402 - Forever Any Mayo
|
|
4
|
-
|
|
5
|
-
## LICENSE
|
|
6
|
-
|
|
1
|
+
# @e-mc/file-manager
|
|
2
|
+
|
|
3
|
+
PEP 402 - Forever Any Mayo
|
|
4
|
+
|
|
5
|
+
## LICENSE
|
|
6
|
+
|
|
7
7
|
MIT
|
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { FileManagerConstructor } from '../types/lib';
|
|
2
|
-
import type { ExternalAsset } from '../types/lib/asset';
|
|
3
|
-
|
|
4
|
-
declare const FileManager: FileManagerConstructor<ExternalAsset>;
|
|
5
|
-
|
|
1
|
+
import type { FileManagerConstructor } from '../types/lib';
|
|
2
|
+
import type { ExternalAsset } from '../types/lib/asset';
|
|
3
|
+
|
|
4
|
+
declare const FileManager: FileManagerConstructor<ExternalAsset>;
|
|
5
|
+
|
|
6
6
|
export = FileManager;
|
package/index.js
CHANGED
|
@@ -1356,6 +1356,7 @@ class FileManager extends core_1.Host {
|
|
|
1356
1356
|
return document === moduleName || Array.isArray(document) && document.includes(moduleName);
|
|
1357
1357
|
}
|
|
1358
1358
|
setLocalUri(file, replace) {
|
|
1359
|
+
var _l;
|
|
1359
1360
|
let uri = file.uri, torrent;
|
|
1360
1361
|
if (uri && !file.content && !file.base64 && !file.url) {
|
|
1361
1362
|
if (core_1.Host.isFile(uri, 'torrent')) {
|
|
@@ -1416,6 +1417,13 @@ class FileManager extends core_1.Host {
|
|
|
1416
1417
|
}
|
|
1417
1418
|
}
|
|
1418
1419
|
file.fetchType = type;
|
|
1420
|
+
if (file.document) {
|
|
1421
|
+
for (const { instance } of this.Document) {
|
|
1422
|
+
if (this.hasDocument(instance, file.document)) {
|
|
1423
|
+
(_l = instance.setLocalUri) === null || _l === void 0 ? void 0 : _l.call(instance, file, replace);
|
|
1424
|
+
}
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1419
1427
|
const segments = [];
|
|
1420
1428
|
if (file.moveTo) {
|
|
1421
1429
|
segments.push(file.moveTo);
|
|
@@ -1423,13 +1431,6 @@ class FileManager extends core_1.Host {
|
|
|
1423
1431
|
if (file.pathname) {
|
|
1424
1432
|
segments.push(file.pathname = core_1.Host.toPosix(file.pathname));
|
|
1425
1433
|
}
|
|
1426
|
-
if (file.document) {
|
|
1427
|
-
for (const { instance } of this.Document) {
|
|
1428
|
-
if (instance.setLocalUri && this.hasDocument(instance, file.document)) {
|
|
1429
|
-
instance.setLocalUri(file, replace);
|
|
1430
|
-
}
|
|
1431
|
-
}
|
|
1432
|
-
}
|
|
1433
1434
|
const pathname = segments.length ? path.join(this.baseDirectory, ...segments) : this.baseDirectory;
|
|
1434
1435
|
const localUri = file.filename ? path.join(pathname, file.filename) : pathname;
|
|
1435
1436
|
file.localUri = localUri;
|
package/package.json
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@e-mc/file-manager",
|
|
3
|
-
"version": "0.6.
|
|
4
|
-
"description": "FileManager constructor for E-mc.",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"types": "index.d.ts",
|
|
7
|
-
"publishConfig": {
|
|
8
|
-
"access": "public"
|
|
9
|
-
},
|
|
10
|
-
"repository": {
|
|
11
|
-
"type": "git",
|
|
12
|
-
"url": "https://github.com/anpham6/e-mc.git",
|
|
13
|
-
"directory": "src/file-manager"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"squared",
|
|
17
|
-
"squared-functions"
|
|
18
|
-
],
|
|
19
|
-
"author": "An Pham <anpham6@gmail.com>",
|
|
20
|
-
"license": "MIT",
|
|
21
|
-
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"@e-mc/cloud": "0.6.
|
|
24
|
-
"@e-mc/compress": "0.6.
|
|
25
|
-
"@e-mc/core": "0.6.
|
|
26
|
-
"@e-mc/document": "0.6.
|
|
27
|
-
"@e-mc/image": "0.6.
|
|
28
|
-
"@e-mc/request": "0.6.
|
|
29
|
-
"@e-mc/task": "0.6.
|
|
30
|
-
"@e-mc/types": "0.6.
|
|
31
|
-
"@e-mc/watch": "0.6.
|
|
32
|
-
}
|
|
33
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@e-mc/file-manager",
|
|
3
|
+
"version": "0.6.8",
|
|
4
|
+
"description": "FileManager constructor for E-mc.",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.d.ts",
|
|
7
|
+
"publishConfig": {
|
|
8
|
+
"access": "public"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/anpham6/e-mc.git",
|
|
13
|
+
"directory": "src/file-manager"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"squared",
|
|
17
|
+
"squared-functions"
|
|
18
|
+
],
|
|
19
|
+
"author": "An Pham <anpham6@gmail.com>",
|
|
20
|
+
"license": "MIT",
|
|
21
|
+
"homepage": "https://github.com/anpham6/e-mc#readme",
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@e-mc/cloud": "0.6.8",
|
|
24
|
+
"@e-mc/compress": "0.6.8",
|
|
25
|
+
"@e-mc/core": "0.6.8",
|
|
26
|
+
"@e-mc/document": "0.6.8",
|
|
27
|
+
"@e-mc/image": "0.6.8",
|
|
28
|
+
"@e-mc/request": "0.6.8",
|
|
29
|
+
"@e-mc/task": "0.6.8",
|
|
30
|
+
"@e-mc/types": "0.6.8",
|
|
31
|
+
"@e-mc/watch": "0.6.8"
|
|
32
|
+
}
|
|
33
|
+
}
|