powerhouse-inc / document-drive

GNU Affero General Public License v3.0
1 stars 0 forks source link

handle default drives and initial sync status in document-drive #263

Open gpuente opened 3 weeks ago

gpuente commented 3 weeks ago

Description:

Extend DocumentDriveServer class to support a config object.

Information related to default drives now should be added using a config like this:

export const BrowserDocumentDriveServer = new DocumentDriveServer(
    documentModels,
    new BrowserStorage(connectConfig.routerBasename),
    new InMemoryCache(),
    new BaseQueueManager(1, 10),
    {
        resetDrives: boolean, // reset drives that are not part of the default drives
        defaultDrives: {
            local: [{ ...localDriveInfo }],
            remote: [{ ...remoteDriveInfo }],
        },
    },
);

from there, document-drive should take care of adding the drives, initialize them, and track sync information (initial sync information)

sync information should be available to the clients

CallmeT-ty commented 2 weeks ago

Memo is adding a couple of test and will push a PR

CallmeT-ty commented 1 week ago

Test: Open a connect tab in incognito mode and check default drives to be still loading. @CallmeT-ty

CallmeT-ty commented 1 week ago

I've tested on Dev Environment. lgtm. Let's promote to staging