mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
Co-authored-by: Florent FAYOLLE <florent.fayolle@beta.gouv.fr>
This commit is contained in:
@@ -50,6 +50,7 @@ export interface ICreateActiveDocOptions {
|
||||
export interface ICreateStorageOptions {
|
||||
name: string;
|
||||
check(): boolean;
|
||||
checkBackend?(): Promise<void>;
|
||||
create(purpose: 'doc'|'meta', extraPrefix: string): ExternalStorage|undefined;
|
||||
}
|
||||
|
||||
@@ -119,7 +120,10 @@ export function makeSimpleCreator(opts: {
|
||||
},
|
||||
async configure() {
|
||||
for (const s of storage || []) {
|
||||
if (s.check()) { break; }
|
||||
if (s.check()) {
|
||||
await s.checkBackend?.();
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
...(opts.shell && {
|
||||
|
||||
Reference in New Issue
Block a user