@zenfs/core
Advanced tools
Comparing version 0.12.9 to 0.12.10
@@ -30,2 +30,11 @@ import type { RequiredKeys } from 'utilium'; | ||
/** | ||
* Configuration options shared by backends and `Configuration` | ||
*/ | ||
export interface SharedConfig { | ||
/** | ||
* If set, disables the sync cache and sync operations on async file systems. | ||
*/ | ||
disableAsyncCache: boolean; | ||
} | ||
/** | ||
* A backend | ||
@@ -37,3 +46,3 @@ */ | ||
*/ | ||
create(options: TOptions): FS | Promise<FS>; | ||
create(options: TOptions & Partial<SharedConfig>): FS | Promise<FS>; | ||
/** | ||
@@ -86,5 +95,4 @@ * A name to identify the backend. | ||
*/ | ||
export type BackendConfiguration<T extends Backend> = OptionsOf<T> & { | ||
export type BackendConfiguration<T extends Backend> = OptionsOf<T> & Partial<SharedConfig> & { | ||
backend: T; | ||
disableAsyncCache?: boolean; | ||
}; | ||
@@ -91,0 +99,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import type { Backend, BackendConfiguration, FilesystemOf } from './backends/backend.js'; | ||
import type { Backend, BackendConfiguration, FilesystemOf, SharedConfig } from './backends/backend.js'; | ||
import type { AbsolutePath } from './emulation/path.js'; | ||
@@ -18,3 +18,3 @@ /** | ||
*/ | ||
export interface Configuration<T extends ConfigMounts> { | ||
export interface Configuration<T extends ConfigMounts> extends SharedConfig { | ||
/** | ||
@@ -34,6 +34,2 @@ * An object mapping mount points to mount configuration | ||
gid: number; | ||
/** | ||
* If set, disables the sync cache and sync operations on async file systems. | ||
*/ | ||
disableAsyncCache: boolean; | ||
} | ||
@@ -40,0 +36,0 @@ /** |
{ | ||
"name": "@zenfs/core", | ||
"version": "0.12.9", | ||
"version": "0.12.10", | ||
"description": "A filesystem in your browser", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -38,2 +38,12 @@ import type { RequiredKeys } from 'utilium'; | ||
/** | ||
* Configuration options shared by backends and `Configuration` | ||
*/ | ||
export interface SharedConfig { | ||
/** | ||
* If set, disables the sync cache and sync operations on async file systems. | ||
*/ | ||
disableAsyncCache: boolean; | ||
} | ||
/** | ||
* A backend | ||
@@ -45,3 +55,3 @@ */ | ||
*/ | ||
create(options: TOptions): FS | Promise<FS>; | ||
create(options: TOptions & Partial<SharedConfig>): FS | Promise<FS>; | ||
@@ -151,6 +161,3 @@ /** | ||
*/ | ||
export type BackendConfiguration<T extends Backend> = OptionsOf<T> & { | ||
backend: T; | ||
disableAsyncCache?: boolean; | ||
}; | ||
export type BackendConfiguration<T extends Backend> = OptionsOf<T> & Partial<SharedConfig> & { backend: T }; | ||
@@ -157,0 +164,0 @@ /** |
import { type Entries } from 'utilium'; | ||
import type { Backend, BackendConfiguration, FilesystemOf } from './backends/backend.js'; | ||
import type { Backend, BackendConfiguration, FilesystemOf, SharedConfig } from './backends/backend.js'; | ||
import { checkOptions, isBackend, isBackendConfig } from './backends/backend.js'; | ||
@@ -76,3 +76,3 @@ import * as fs from './emulation/index.js'; | ||
*/ | ||
export interface Configuration<T extends ConfigMounts> { | ||
export interface Configuration<T extends ConfigMounts> extends SharedConfig { | ||
/** | ||
@@ -90,6 +90,2 @@ * An object mapping mount points to mount configuration | ||
gid: number; | ||
/** | ||
* If set, disables the sync cache and sync operations on async file systems. | ||
*/ | ||
disableAsyncCache: boolean; | ||
} | ||
@@ -96,0 +92,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1863371
20593