From 9f80c1f0cc807993ced542beb855dd7fcb8b3c87 Mon Sep 17 00:00:00 2001 From: James P Date: Tue, 2 Apr 2024 08:30:04 -0500 Subject: [PATCH] Updated core and FileSystemAccess --- package-lock.json | 8 ++++---- package.json | 2 +- src/FileSystemAccess.ts | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 8edc189..da7dc7a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,7 +21,7 @@ "node": ">= 18" }, "peerDependencies": { - "@zenfs/core": "^0.4.0" + "@zenfs/core": "^0.5.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -776,9 +776,9 @@ "dev": true }, "node_modules/@zenfs/core": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/@zenfs/core/-/core-0.4.0.tgz", - "integrity": "sha512-7dlTSj4Vo71bIKsZ7k7eqM8MaxPo1U1b48Xpigm1msbGhyIppkaOaXAwnL0JQXrKaRWNxM5RH+CUaA4iOpjD4A==", + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/@zenfs/core/-/core-0.5.0.tgz", + "integrity": "sha512-yNPJgMf5cnloJirgZl1nkLKXmYVtKtdZdnBLr8iuIHgOWgziYWwfdFwq0MF0Ti+up8e+7BQUDdRccpbaWVJx6g==", "peer": true, "dependencies": { "@types/node": "^14.0.0", diff --git a/package.json b/package.json index 55bdea2..65a5609 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,6 @@ "typescript": "5.2.2" }, "peerDependencies": { - "@zenfs/core": "^0.4.0" + "@zenfs/core": "^0.5.0" } } diff --git a/src/FileSystemAccess.ts b/src/FileSystemAccess.ts index 72e85f4..aebcf03 100644 --- a/src/FileSystemAccess.ts +++ b/src/FileSystemAccess.ts @@ -1,6 +1,6 @@ import { basename, dirname, join } from '@zenfs/core/emulation/path.js'; import { ApiError, ErrorCode } from '@zenfs/core/ApiError.js'; -import { FileFlag, PreloadFile } from '@zenfs/core/file.js'; +import { PreloadFile } from '@zenfs/core/file.js'; import { FileSystem, Async, type FileSystemMetadata } from '@zenfs/core/filesystem.js'; import { Stats, FileType } from '@zenfs/core/stats.js'; import type { Backend } from '@zenfs/core/backends/backend.js'; @@ -27,7 +27,7 @@ const handleError = (path = '', error: Error) => { }; export class FileSystemAccessFile extends PreloadFile { - constructor(_fs: FileSystemAccessFS, _path: string, _flag: FileFlag, _stat: Stats, contents?: Uint8Array) { + constructor(_fs: FileSystemAccessFS, _path: string, _flag: string, _stat: Stats, contents?: Uint8Array) { super(_fs, _path, _flag, _stat, contents); } @@ -125,7 +125,7 @@ export class FileSystemAccessFS extends Async(FileSystem) { await writable.close(); } - public async createFile(path: string, flag: FileFlag): Promise { + public async createFile(path: string, flag: string): Promise { await this.writeFile(path, new Uint8Array()); return this.openFile(path, flag); } @@ -144,7 +144,7 @@ export class FileSystemAccessFS extends Async(FileSystem) { } } - public async openFile(path: string, flag: FileFlag): Promise { + public async openFile(path: string, flag: string): Promise { const handle = await this.getHandle(path); if (handle instanceof FileSystemFileHandle) { const file = await handle.getFile();