@zenfs/core 2.2.3 → 2.3.1
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/backends/backend.js +6 -9
- package/dist/backends/cow.js +4 -4
- package/dist/backends/fetch.js +8 -6
- package/dist/backends/memory.js +4 -2
- package/dist/backends/passthrough.js +2 -0
- package/dist/backends/port.d.ts +16 -89
- package/dist/backends/port.js +35 -171
- package/dist/backends/single_buffer.d.ts +2 -2
- package/dist/backends/single_buffer.js +165 -198
- package/dist/backends/store/fs.js +50 -73
- package/dist/backends/store/map.js +1 -2
- package/dist/backends/store/store.js +23 -27
- package/dist/config.js +2 -3
- package/dist/context.js +2 -2
- package/dist/internal/devices.js +7 -10
- package/dist/internal/file_index.js +3 -8
- package/dist/internal/filesystem.js +19 -12
- package/dist/internal/index_fs.js +3 -4
- package/dist/internal/inode.js +144 -187
- package/dist/internal/rpc.d.ts +143 -0
- package/dist/internal/rpc.js +251 -0
- package/dist/mixins/async.js +5 -6
- package/dist/mixins/mutexed.js +16 -10
- package/dist/path.js +3 -4
- package/dist/polyfills.js +51 -22
- package/dist/readline.js +32 -30
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +11 -5
- package/dist/vfs/acl.js +44 -68
- package/dist/vfs/async.js +4 -4
- package/dist/vfs/dir.js +12 -8
- package/dist/vfs/file.js +22 -18
- package/dist/vfs/ioctl.js +39 -62
- package/dist/vfs/promises.js +48 -39
- package/dist/vfs/shared.js +4 -5
- package/dist/vfs/stats.js +104 -77
- package/dist/vfs/streams.js +11 -8
- package/dist/vfs/sync.js +23 -26
- package/dist/vfs/watchers.js +9 -3
- package/dist/vfs/xattr.js +6 -12
- package/package.json +2 -2
- package/scripts/test.js +16 -7
- package/tests/backend/fetch.test.ts +14 -14
- package/tests/backend/port.test.ts +25 -17
- package/tests/common/handle.test.ts +5 -3
- package/tests/fetch/run.sh +2 -1
- package/tests/fs/scaling.test.ts +32 -0
- package/tests/fs/watch.test.ts +2 -5
- package/tests/setup/single-buffer.ts +1 -1
- package/tests/tsconfig.json +3 -2
- package/types/uint8array.d.ts +64 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
See:
|
|
3
|
+
https://developer.mozilla.org/Web/JavaScript/Reference/Global_Objects/Uint8Array/toBase64
|
|
4
|
+
https://github.com/microsoft/TypeScript/pull/61696
|
|
5
|
+
https://github.com/microsoft/TypeScript/issues/61695
|
|
6
|
+
|
|
7
|
+
@todo Remove when TypeScript 5.9 is released
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
interface Uint8ArrayConstructor {
|
|
11
|
+
/**
|
|
12
|
+
* Creates a new `Uint8Array` from a base64-encoded string.
|
|
13
|
+
* @param string The base64-encoded string.
|
|
14
|
+
* @param options If provided, specifies the alphabet and handling of the last chunk.
|
|
15
|
+
* @returns A new `Uint8Array` instance.
|
|
16
|
+
* @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last
|
|
17
|
+
* chunk is inconsistent with the `lastChunkHandling` option.
|
|
18
|
+
*/
|
|
19
|
+
fromBase64: (string: string) => Uint8Array;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Creates a new `Uint8Array` from a base16-encoded string.
|
|
23
|
+
* @returns A new `Uint8Array` instance.
|
|
24
|
+
*/
|
|
25
|
+
fromHex: (string: string) => Uint8Array;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface Uint8Array<TArrayBuffer extends ArrayBufferLike> {
|
|
29
|
+
/**
|
|
30
|
+
* Converts the `Uint8Array` to a base64-encoded string.
|
|
31
|
+
* @param options If provided, sets the alphabet and padding behavior used.
|
|
32
|
+
* @returns A base64-encoded string.
|
|
33
|
+
*/
|
|
34
|
+
toBase64: () => string;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Sets the `Uint8Array` from a base64-encoded string.
|
|
38
|
+
* @param string The base64-encoded string.
|
|
39
|
+
* @param options If provided, specifies the alphabet and handling of the last chunk.
|
|
40
|
+
* @returns An object containing the number of bytes read and written.
|
|
41
|
+
* @throws {SyntaxError} If the input string contains characters outside the specified alphabet, or if the last
|
|
42
|
+
* chunk is inconsistent with the `lastChunkHandling` option.
|
|
43
|
+
*/
|
|
44
|
+
setFromBase64?: (string: string) => {
|
|
45
|
+
read: number;
|
|
46
|
+
written: number;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Converts the `Uint8Array` to a base16-encoded string.
|
|
51
|
+
* @returns A base16-encoded string.
|
|
52
|
+
*/
|
|
53
|
+
toHex: () => string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Sets the `Uint8Array` from a base16-encoded string.
|
|
57
|
+
* @param string The base16-encoded string.
|
|
58
|
+
* @returns An object containing the number of bytes read and written.
|
|
59
|
+
*/
|
|
60
|
+
setFromHex?: (string: string) => {
|
|
61
|
+
read: number;
|
|
62
|
+
written: number;
|
|
63
|
+
};
|
|
64
|
+
}
|