@zenfs/core 0.4.0 → 0.4.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.
@@ -53,7 +53,7 @@ export interface Backend<FS extends FileSystem = FileSystem, OC extends BackendO
53
53
  *
54
54
  * Defaults to 'false', as the FileSystem base class isn't usable alone.
55
55
  */
56
- isAvailable(): boolean;
56
+ isAvailable(): boolean | Promise<boolean>;
57
57
  }
58
58
  /**
59
59
  * @internal
@@ -77,7 +77,7 @@ export async function resolveBackendConfig(options) {
77
77
  options[prop] = await resolveBackendConfig(option);
78
78
  }
79
79
  }
80
- if (!backend.isAvailable()) {
80
+ if (!(await backend.isAvailable())) {
81
81
  throw new ApiError(ErrorCode.EPERM, 'Backend not available: ' + backend);
82
82
  }
83
83
  checkOptions(backend, options);