@filebox/core 1.0.14 → 1.0.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.
- package/dist/index.browser.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +1 -1
- package/dist/src/fs/index.d.ts +1 -1
- package/dist/src/stat.d.ts +4 -1
- package/package.json +59 -59
package/dist/src/fs/index.d.ts
CHANGED
|
@@ -71,7 +71,7 @@ declare abstract class FileSystem<T> implements FileSystemType<T> {
|
|
|
71
71
|
private getListByRecursive;
|
|
72
72
|
private unwrapListPayload;
|
|
73
73
|
formatList(resp: any[], workPath: string, path: string): any[];
|
|
74
|
-
format(data: any, workPath: string): Stat;
|
|
74
|
+
format(data: any, workPath: string, parentId?: string | number | null): Stat;
|
|
75
75
|
private findTarget;
|
|
76
76
|
hasMethod(method: string): boolean;
|
|
77
77
|
private getCacheKey;
|
package/dist/src/stat.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export type StatConstructorParams = Omit<IStat, "rawData"> & {
|
|
|
23
23
|
provider: string;
|
|
24
24
|
duplicate?: number;
|
|
25
25
|
cid?: string | null;
|
|
26
|
+
parentId?: string | number | null;
|
|
26
27
|
};
|
|
27
28
|
declare class Stat implements IStat {
|
|
28
29
|
#private;
|
|
@@ -51,11 +52,13 @@ declare class Stat implements IStat {
|
|
|
51
52
|
driver_name: string;
|
|
52
53
|
isStat: boolean;
|
|
53
54
|
basename: string;
|
|
55
|
+
parentId: string | number | null;
|
|
54
56
|
[rawDataSymbol]: any;
|
|
55
|
-
constructor({ id, name, size, thumbnail, type, atime, ctime, mtime, rawData, provider, mountPath, parsePath, rootPath, hash, duplicate, cid, }: StatConstructorParams);
|
|
57
|
+
constructor({ id, name, size, thumbnail, type, atime, ctime, mtime, rawData, provider, parentId, mountPath, parsePath, rootPath, hash, duplicate, cid, }: StatConstructorParams);
|
|
56
58
|
private formatDate;
|
|
57
59
|
private normalizePath;
|
|
58
60
|
getRawData(key?: string): any;
|
|
61
|
+
getParentId(): string | number | null;
|
|
59
62
|
get file(): boolean;
|
|
60
63
|
get directory(): boolean;
|
|
61
64
|
get rootPath(): string;
|
package/package.json
CHANGED
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@filebox/core",
|
|
3
|
-
"email": "ppnows@gmail.com",
|
|
4
|
-
"version": "1.0.
|
|
5
|
-
"description": "filebox-core",
|
|
6
|
-
"main": "./dist/index.cjs",
|
|
7
|
-
"module": "./dist/index.mjs",
|
|
8
|
-
"browser": "./dist/index.browser.js",
|
|
9
|
-
"types": "./dist/index.d.ts",
|
|
10
|
-
"scripts": {
|
|
11
|
-
"watch": "nodemon --watch './**/*' --ext 'js' --exec npm run build:cjs",
|
|
12
|
-
"build:esm": "cross-env BUILD_FORMAT=es node esbuild.config.js",
|
|
13
|
-
"build:cjs": "cross-env BUILD_FORMAT=cjs node esbuild.config.js",
|
|
14
|
-
"build:umd": "cross-env BUILD_FORMAT=umd node esbuild.config.js",
|
|
15
|
-
"build:types": "tsc -p tsconfig.types.json",
|
|
16
|
-
"build": "npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:types",
|
|
17
|
-
"prepublishOnly": "npm run build",
|
|
18
|
-
"publish:patch": "npm version patch && npm publish --access public",
|
|
19
|
-
"publish:minor": "npm version minor && npm publish --access public",
|
|
20
|
-
"publish:major": "npm version major && npm publish --access public",
|
|
21
|
-
"test": "jest"
|
|
22
|
-
},
|
|
23
|
-
"keywords": [],
|
|
24
|
-
"files": [
|
|
25
|
-
"dist/index.cjs",
|
|
26
|
-
"dist/index.mjs",
|
|
27
|
-
"dist/index.browser.js",
|
|
28
|
-
"dist/**/*.d.ts",
|
|
29
|
-
"LICENSE",
|
|
30
|
-
"README.md"
|
|
31
|
-
],
|
|
32
|
-
"publishConfig": {
|
|
33
|
-
"access": "public"
|
|
34
|
-
},
|
|
35
|
-
"author": "ppnow",
|
|
36
|
-
"license": "MIT",
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"bytes": "^3.1.2",
|
|
39
|
-
"dayjs": "^1.11.10",
|
|
40
|
-
"debug": "^4.4.1",
|
|
41
|
-
"lru-cache": "10.4.3",
|
|
42
|
-
"mime-types": "^3.0.0",
|
|
43
|
-
"mitt": "^3.0.1",
|
|
44
|
-
"path-browserify": "^1.0.1"
|
|
45
|
-
},
|
|
46
|
-
"devDependencies": {
|
|
47
|
-
"@types/bytes": "^3.1.4",
|
|
48
|
-
"@types/debug": "^4.1.12",
|
|
49
|
-
"@types/mime-types": "^2.1.4",
|
|
50
|
-
"@types/node": "^22.5.4",
|
|
51
|
-
"@types/path-browserify": "^1.0.3",
|
|
52
|
-
"cross-env": "^7.0.3",
|
|
53
|
-
"esbuild": "^0.24.0",
|
|
54
|
-
"jest": "^29.7.0",
|
|
55
|
-
"nodemon": "^3.0.2",
|
|
56
|
-
"typescript": "^5.9.3"
|
|
57
|
-
},
|
|
58
|
-
"type": "module"
|
|
59
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@filebox/core",
|
|
3
|
+
"email": "ppnows@gmail.com",
|
|
4
|
+
"version": "1.0.16",
|
|
5
|
+
"description": "filebox-core",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.mjs",
|
|
8
|
+
"browser": "./dist/index.browser.js",
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"watch": "nodemon --watch './**/*' --ext 'js' --exec npm run build:cjs",
|
|
12
|
+
"build:esm": "cross-env BUILD_FORMAT=es node esbuild.config.js",
|
|
13
|
+
"build:cjs": "cross-env BUILD_FORMAT=cjs node esbuild.config.js",
|
|
14
|
+
"build:umd": "cross-env BUILD_FORMAT=umd node esbuild.config.js",
|
|
15
|
+
"build:types": "tsc -p tsconfig.types.json",
|
|
16
|
+
"build": "npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:types",
|
|
17
|
+
"prepublishOnly": "npm run build",
|
|
18
|
+
"publish:patch": "npm version patch && npm publish --access public",
|
|
19
|
+
"publish:minor": "npm version minor && npm publish --access public",
|
|
20
|
+
"publish:major": "npm version major && npm publish --access public",
|
|
21
|
+
"test": "jest"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [],
|
|
24
|
+
"files": [
|
|
25
|
+
"dist/index.cjs",
|
|
26
|
+
"dist/index.mjs",
|
|
27
|
+
"dist/index.browser.js",
|
|
28
|
+
"dist/**/*.d.ts",
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"author": "ppnow",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"bytes": "^3.1.2",
|
|
39
|
+
"dayjs": "^1.11.10",
|
|
40
|
+
"debug": "^4.4.1",
|
|
41
|
+
"lru-cache": "10.4.3",
|
|
42
|
+
"mime-types": "^3.0.0",
|
|
43
|
+
"mitt": "^3.0.1",
|
|
44
|
+
"path-browserify": "^1.0.1"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/bytes": "^3.1.4",
|
|
48
|
+
"@types/debug": "^4.1.12",
|
|
49
|
+
"@types/mime-types": "^2.1.4",
|
|
50
|
+
"@types/node": "^22.5.4",
|
|
51
|
+
"@types/path-browserify": "^1.0.3",
|
|
52
|
+
"cross-env": "^7.0.3",
|
|
53
|
+
"esbuild": "^0.24.0",
|
|
54
|
+
"jest": "^29.7.0",
|
|
55
|
+
"nodemon": "^3.0.2",
|
|
56
|
+
"typescript": "^5.9.3"
|
|
57
|
+
},
|
|
58
|
+
"type": "module"
|
|
59
|
+
}
|