@zenfs/dom 1.1.7 → 1.1.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/dist/IndexedDB.js CHANGED
@@ -29,7 +29,7 @@ export class IndexedDBTransaction extends Transaction {
29
29
  this._idb = tx.objectStore(store.name);
30
30
  }
31
31
  async keys() {
32
- return (await wrap(this._idb.getAllKeys())).filter(k => typeof k == 'string').map(k => Number(k));
32
+ return (await wrap(this._idb.getAllKeys())).map(Number);
33
33
  }
34
34
  async get(id) {
35
35
  const data = await wrap(this._idb.get(id));
package/dist/access.d.ts CHANGED
@@ -23,7 +23,7 @@ export declare class WebAccessFS extends WebAccessFS_base {
23
23
  */
24
24
  _sync: FileSystem;
25
25
  constructor(handle: FileSystemDirectoryHandle);
26
- remove(path: string): Promise<void>;
26
+ protected remove(path: string): Promise<void>;
27
27
  protected removeSync(): void;
28
28
  read(path: string, buffer: Uint8Array, offset: number, end: number): Promise<void>;
29
29
  write(path: string, buffer: Uint8Array, offset: number): Promise<void>;
package/dist/access.js CHANGED
@@ -2,6 +2,7 @@ import { Async, constants, IndexFS, InMemory, Inode } from '@zenfs/core';
2
2
  import { basename, dirname, join } from '@zenfs/core/path.js';
3
3
  import { S_IFDIR, S_IFMT } from '@zenfs/core/vfs/constants.js';
4
4
  import { log, withErrno } from 'kerium';
5
+ import { alert } from 'kerium/log';
5
6
  import { _throw } from 'utilium';
6
7
  import { convertException } from './utils.js';
7
8
  function isResizable(buffer) {
@@ -78,7 +79,7 @@ export class WebAccessFS extends Async(IndexFS) {
78
79
  const file = await handle.getFile();
79
80
  const data = await file.arrayBuffer();
80
81
  if (data.byteLength < end - offset)
81
- throw withErrno('ENODATA');
82
+ throw alert(withErrno('EIO', `Unexpected mismatch in file data size. This should not happen.\n\t\tTried to read ${end - offset} bytes but the file is ${data.byteLength} bytes.`));
82
83
  buffer.set(new Uint8Array(data, offset, end - offset));
83
84
  }
84
85
  async write(path, buffer, offset) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenfs/dom",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "DOM backends for ZenFS",
5
5
  "funding": {
6
6
  "type": "individual",
@@ -32,7 +32,7 @@
32
32
  "tsconfig.json"
33
33
  ],
34
34
  "engines": {
35
- "node": ">= 18"
35
+ "node": ">= 22"
36
36
  },
37
37
  "exports": {
38
38
  ".": "./dist/index.js",
@@ -53,10 +53,10 @@
53
53
  "c8": "^10.1.3",
54
54
  "eslint": "^9.12.0",
55
55
  "fake-indexeddb": "^6.0.0",
56
- "globals": "^15.10.0",
56
+ "globals": "^16.0.0",
57
57
  "prettier": "^3.2.5",
58
58
  "tsx": "^4.19.2",
59
- "typedoc": "^0.27.2",
59
+ "typedoc": "^0.28.0",
60
60
  "typescript": "^5.7.2",
61
61
  "typescript-eslint": "^8.8.1"
62
62
  },