@zenfs/core 0.16.0 → 0.16.2
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/fetch.js +5 -4
- package/dist/backends/index/fs.js +12 -5
- package/dist/backends/overlay.d.ts +1 -1
- package/dist/backends/overlay.js +9 -9
- package/dist/backends/port/fs.d.ts +22 -0
- package/dist/backends/port/fs.js +12 -1
- package/dist/backends/port/rpc.d.ts +2 -0
- package/dist/backends/port/rpc.js +13 -1
- package/dist/backends/store/fs.js +1 -1
- package/dist/browser.min.js +4 -4
- package/dist/browser.min.js.map +4 -4
- package/dist/config.d.ts +1 -2
- package/dist/config.js +2 -2
- package/dist/emulation/async.d.ts +4 -5
- package/dist/emulation/async.js +9 -9
- package/dist/emulation/dir.js +1 -1
- package/dist/emulation/promises.js +10 -5
- package/dist/emulation/sync.d.ts +1 -0
- package/dist/emulation/sync.js +1 -1
- package/dist/file.js +6 -6
- package/dist/filesystem.js +1 -1
- package/dist/inode.d.ts +1 -1
- package/dist/inode.js +54 -37
- package/dist/polyfills.js +1 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/eslint.shared.js +53 -0
- package/package.json +16 -6
- package/src/backends/fetch.ts +6 -5
- package/src/backends/index/fs.ts +12 -5
- package/src/backends/index/index.ts +1 -1
- package/src/backends/overlay.ts +9 -9
- package/src/backends/port/fs.ts +18 -3
- package/src/backends/port/readme.md +7 -12
- package/src/backends/port/rpc.ts +16 -1
- package/src/backends/store/fs.ts +2 -2
- package/src/config.ts +3 -3
- package/src/emulation/async.ts +31 -18
- package/src/emulation/dir.ts +1 -1
- package/src/emulation/promises.ts +11 -6
- package/src/emulation/sync.ts +5 -4
- package/src/file.ts +6 -6
- package/src/filesystem.ts +2 -1
- package/src/inode.ts +56 -37
- package/src/polyfills.ts +1 -0
- package/src/utils.ts +5 -2
package/src/utils.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
2
|
+
/* eslint-disable @typescript-eslint/no-unsafe-call */
|
|
3
|
+
/* eslint-disable @typescript-eslint/no-unsafe-return */
|
|
1
4
|
import type { OptionalTuple } from 'utilium';
|
|
2
5
|
import { ErrnoError, Errno } from './error.js';
|
|
3
6
|
import type { Cred } from './cred.js';
|
|
@@ -187,14 +190,14 @@ export function _toUnixTimestamp(time: Date | number): number {
|
|
|
187
190
|
if (time instanceof Date) {
|
|
188
191
|
return Math.floor(time.getTime() / 1000);
|
|
189
192
|
}
|
|
190
|
-
throw new Error('Cannot parse time
|
|
193
|
+
throw new Error('Cannot parse time');
|
|
191
194
|
}
|
|
192
195
|
|
|
193
196
|
/**
|
|
194
197
|
* Normalizes a mode
|
|
195
198
|
* @internal
|
|
196
199
|
*/
|
|
197
|
-
export function normalizeMode(mode:
|
|
200
|
+
export function normalizeMode(mode: unknown, def?: number): number {
|
|
198
201
|
if (typeof mode == 'number') {
|
|
199
202
|
return mode;
|
|
200
203
|
}
|