🌟 Data migration from nextcloud (#302)

- Files upload to Twake Drive
- New logger
This commit is contained in:
Anton Shepilov
2024-01-02 17:09:43 +03:00
committed by GitHub
parent 75dffb1c7a
commit 6f7f714fe8
14 changed files with 261 additions and 57 deletions
@@ -0,0 +1,26 @@
import { expect, test } from '@jest/globals';
import { TwakeDriveClient, TwakeDriveUser } from '../src/twake_client';
import { NextcloudMigration, NextcloudMigrationConfiguration } from '../src/nextcloud_migration';
//FOR LOCAL DEBUG PURPOSE ONLY, ITS NOT A TEST
describe.skip('nextcloud migration module', () => {
test('upload directory', async () => {
//given
const subj = new NextcloudMigration({
drive: {
url: "http://localhost:4000",
credentials: {
appId: "tdrive_onlyoffice",
secret: "c1cc66db78e1d3bb4713c55d5ab2"
}
}
} as NextcloudMigrationConfiguration);
let user = await subj.driveClient.createUser({firstName: "DWHO", lastName: "DWHO", email: "dwho@example.com", uid: "test"});
//when
await subj.upload(user, "/Users/shepilov/WebstormProjects/TDrive/Documentation/docs/onprem");
});
});