@zenfs/core 0.16.2 → 0.16.4
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/browser.min.js +2 -2
- package/dist/browser.min.js.map +2 -2
- package/dist/config.js +1 -3
- package/dist/emulation/promises.js +1 -1
- package/dist/emulation/sync.js +1 -1
- package/package.json +1 -1
- package/scripts/build.js +1 -3
- package/src/config.ts +2 -5
- package/src/emulation/promises.ts +2 -2
- package/src/emulation/sync.ts +1 -1
package/dist/config.js
CHANGED
|
@@ -41,9 +41,7 @@ export async function resolveMountConfig(config, _depth = 0) {
|
|
|
41
41
|
}
|
|
42
42
|
await checkOptions(backend, config);
|
|
43
43
|
const mount = (await backend.create(config));
|
|
44
|
-
|
|
45
|
-
mount._disableSync = config.disableAsyncCache || false;
|
|
46
|
-
}
|
|
44
|
+
mount._disableSync = config.disableAsyncCache || false;
|
|
47
45
|
await mount.ready();
|
|
48
46
|
return mount;
|
|
49
47
|
}
|
|
@@ -876,7 +876,7 @@ export async function rm(path, options) {
|
|
|
876
876
|
case constants.S_IFDIR:
|
|
877
877
|
if (options?.recursive) {
|
|
878
878
|
for (const entry of await readdir(path)) {
|
|
879
|
-
await rm(join(path, entry));
|
|
879
|
+
await rm(join(path, entry), options);
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
882
|
await rmdir(path);
|
package/dist/emulation/sync.js
CHANGED
package/package.json
CHANGED
package/scripts/build.js
CHANGED
package/src/config.ts
CHANGED
|
@@ -4,7 +4,7 @@ import * as fs from './emulation/index.js';
|
|
|
4
4
|
import type { AbsolutePath } from './emulation/path.js';
|
|
5
5
|
import { setCred, type MountObject } from './emulation/shared.js';
|
|
6
6
|
import { Errno, ErrnoError } from './error.js';
|
|
7
|
-
import { FileSystem
|
|
7
|
+
import { FileSystem } from './filesystem.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Configuration for a specific mount point
|
|
@@ -59,10 +59,7 @@ export async function resolveMountConfig<T extends Backend>(config: MountConfigu
|
|
|
59
59
|
}
|
|
60
60
|
await checkOptions(backend, config);
|
|
61
61
|
const mount = (await backend.create(config)) as FilesystemOf<T>;
|
|
62
|
-
|
|
63
|
-
type AsyncFS = InstanceType<ReturnType<typeof Async<new () => FilesystemOf<T>>>>;
|
|
64
|
-
(mount as AsyncFS)._disableSync = config.disableAsyncCache || false;
|
|
65
|
-
}
|
|
62
|
+
mount._disableSync = config.disableAsyncCache || false;
|
|
66
63
|
await mount.ready();
|
|
67
64
|
return mount;
|
|
68
65
|
}
|
|
@@ -514,7 +514,7 @@ async function _open(path: fs.PathLike, _flag: fs.OpenMode, _mode: fs.Mode = 0o6
|
|
|
514
514
|
return new FileHandle(await fs.openFile(resolved, flag, cred));
|
|
515
515
|
}
|
|
516
516
|
|
|
517
|
-
/*
|
|
517
|
+
/*
|
|
518
518
|
In a previous implementation, we deleted the file and
|
|
519
519
|
re-created it. However, this created a race condition if another
|
|
520
520
|
asynchronous request was trying to read the file, as the file
|
|
@@ -907,7 +907,7 @@ export async function rm(path: fs.PathLike, options?: fs.RmOptions) {
|
|
|
907
907
|
case constants.S_IFDIR:
|
|
908
908
|
if (options?.recursive) {
|
|
909
909
|
for (const entry of await readdir(path)) {
|
|
910
|
-
await rm(join(path, entry));
|
|
910
|
+
await rm(join(path, entry), options);
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
913
|
|
package/src/emulation/sync.ts
CHANGED
|
@@ -731,7 +731,7 @@ export function rmSync(path: fs.PathLike, options?: fs.RmOptions): void {
|
|
|
731
731
|
case S_IFDIR:
|
|
732
732
|
if (options?.recursive) {
|
|
733
733
|
for (const entry of readdirSync(path)) {
|
|
734
|
-
rmSync(join(path, entry));
|
|
734
|
+
rmSync(join(path, entry), options);
|
|
735
735
|
}
|
|
736
736
|
}
|
|
737
737
|
|