Skip to content

Commit

Permalink
chore: ts lint fixes
Browse files Browse the repository at this point in the history
JoanVicens committed Jan 17, 2024
1 parent aff2b4a commit 687914d
Showing 15 changed files with 14 additions and 101 deletions.
1 change: 0 additions & 1 deletion src/apps/fuse/FuseApp.ts
Original file line number Diff line number Diff line change
@@ -18,7 +18,6 @@ import { FuseDependencyContainer } from './dependency-injection/FuseDependencyCo
const fuse = require('@gcas/fuse');

export class FuseApp {
private static readonly SID = 41033;
private _fuse: any;

constructor(
2 changes: 1 addition & 1 deletion src/apps/fuse/callbacks/MakeDirectoryCallback.ts
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ export class MakeDirectoryCallback extends NotifyFuseCallback {
} catch (err: unknown) {
const error = this.resolveError({ path, mode }, err);

this.container.syncFolderMessenger.error();
this.container.syncFolderMessenger.error(path, 'unknown error');

return this.left(error);
}
7 changes: 1 addition & 6 deletions src/apps/fuse/callbacks/StatFsCallback.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { UserDependencyContainer } from '../dependency-injection/user/UserDependencyContainer';
import { FuseCallback } from './FuseCallback';
import Logger from 'electron-log';

@@ -17,11 +16,7 @@ type StatFsCallbackData = {
};

export class StatFsCallback extends FuseCallback<Partial<StatFsCallbackData>> {
constructor(
private readonly _userContainer: UserDependencyContainer,
private readonly localStats: Partial<StatFsCallbackData>,
private readonly sid: number
) {
constructor(private readonly localStats: Partial<StatFsCallbackData>) {
super('Stat FS');
}

1 change: 1 addition & 0 deletions src/apps/fuse/dependency-injection/user/usage/builder.ts
Original file line number Diff line number Diff line change
@@ -15,6 +15,7 @@ export async function buildUsageContainer(): Promise<UsageContainer> {
const { photos } = Photos;

const repository = new CachedHttpUserUsageRepository(
// @ts-ignore
clients.newDrive,
photos
);
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ import { FuseLocalFileSystem } from '../../../../../context/virtual-drive/files/
import { InMemoryFileRepository } from '../../../../../context/virtual-drive/files/infrastructure/InMemoryFileRepository';
import { MainProcessSyncFileMessenger } from '../../../../../context/virtual-drive/files/infrastructure/MainProcessSyncFileMessenger';
import { SDKRemoteFileSystem } from '../../../../../context/virtual-drive/files/infrastructure/SDKRemoteFileSystem';
import { DependencyInjectionHttpClientsProvider } from '../../common/clients';
import { DependencyInjectionEventBus } from '../../common/eventBus';
import { DependencyInjectionEventRepository } from '../../common/eventRepository';
import { DependencyInjectionStorageSdk } from '../../common/sdk';
@@ -31,6 +32,7 @@ export async function buildFilesContainer(
const user = DependencyInjectionUserProvider.get();
const sdk = await DependencyInjectionStorageSdk.get();
const { bus: eventBus } = DependencyInjectionEventBus;
const clients = DependencyInjectionHttpClientsProvider.get();

const repositoryPopulator = new RepositoryPopulator(repository);

@@ -45,7 +47,12 @@ export async function buildFilesContainer(

const filesSearcher = new FilesSearcher(repository);

const remoteFileSystem = new SDKRemoteFileSystem(sdk, crypt, user.bucket);
const remoteFileSystem = new SDKRemoteFileSystem(
sdk,
clients,
crypt,
user.bucket
);
const localFileSystem = new FuseLocalFileSystem(
sharedContainer.relativePathToAbsoluteConverter
);
2 changes: 1 addition & 1 deletion src/apps/fuse/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import Logger from 'electron-log';

import { app } from 'electron';
import { getRootVirtualDrive } from '../main/virutal-root-folder/service';
import eventBus from '../main/event-bus';
import { FuseApp } from './FuseApp';
import path from 'path';
import { FuseDependencyContainerFactory } from './dependency-injection/FuseDependencyContainerFactory';
import { HydrationApi } from '../hydration-api/HydrationApi';
import { getRootVirtualDrive } from '../main/virtual-root-folder/service';

let fuseApp: FuseApp;

1 change: 0 additions & 1 deletion src/apps/main/remote-sync/handlers.ts
Original file line number Diff line number Diff line change
@@ -9,7 +9,6 @@ import { ipcMain } from 'electron';
import { reportError } from '../bug-report/service';
import { sleep } from '../util';
import { broadcastToWindows } from '../windows';
import { updateSyncEngine } from '../background-processes/sync-engine';

let initialSyncReady = false;
const driveFilesCollection = new DriveFilesCollection();
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import crypt from '../../../../context/shared/infrastructure/crypt';
import { Traverser } from '../../../../context/virtual-drive/items/application/Traverser';
import { DependencyInjectionUserProvider } from './user';
import { ipcRendererSyncEngine } from '../../ipcRendererSyncEngine';

export class DependencyInjectionTraverserProvider {
private static traverser: Traverser;
@@ -13,11 +12,7 @@ export class DependencyInjectionTraverserProvider {

const user = DependencyInjectionUserProvider.get();

const traverser = Traverser.existingItems(
crypt,
ipcRendererSyncEngine,
user.root_folder_id
);
const traverser = Traverser.existingItems(crypt, user.root_folder_id);

DependencyInjectionTraverserProvider.traverser = traverser;

This file was deleted.

27 changes: 0 additions & 27 deletions src/context/virtual-drive/folders/domain/OldFolderRepository.ts

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import axios, { Axios } from 'axios';
import { Axios } from 'axios';
import Logger from 'electron-log';
import * as uuid from 'uuid';
import { Folder } from '../domain/Folder';
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { trackError } from '../../../../apps/main/analytics/service';
import { setTrayStatus } from '../../../../apps/main/tray/tray';
import { broadcastToWindows } from '../../../../apps/main/windows';
import { SyncFolderMessenger } from '../domain/SyncFolderMessenger';

export class MainProcessSyncFolderMessenger implements SyncFolderMessenger {

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { FolderCreatorFromOfflineFolder } from '../../../../../src/context/virtual-drive/folders/application/FolderCreatorFromOfflineFolder';
import { Folder } from '../../../../../src/context/virtual-drive/folders/domain/Folder';
import { EventBusMock } from '../../shared/__mock__/EventBusMock';
import { FolderRemoteFileSystemMock } from '../__mocks__/FolderRemoteFileSystemMock';
import { FolderRepositoryMock } from '../__mocks__/FolderRepositoryMock';

0 comments on commit 687914d

Please sign in to comment.