-
Notifications
You must be signed in to change notification settings - Fork 4
Refactor virtual drive sync engine #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
dc7c793
ea64034
07c52fa
8277a78
6607102
b222c70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,35 @@ | ||
| import { ContainerBuilder } from 'diod'; | ||
| import { AbsolutePathToRelativeConverter } from '../../../../context/virtual-drive/shared/application/AbsolutePathToRelativeConverter'; | ||
| import { RelativePathToAbsoluteConverter } from '../../../../context/virtual-drive/shared/application/RelativePathToAbsoluteConverter'; | ||
| import { FileRepository } from '../../../../context/virtual-drive/files/domain/FileRepository'; | ||
| import { FolderRepository } from '../../../../context/virtual-drive/folders/domain/FolderRepository'; | ||
| import { PATHS } from '../../../../core/electron/paths'; | ||
| import { | ||
| createDirectoryStateSqliteRepository, | ||
| DirectoryStateSqliteRepository, | ||
| } from '../../../../backend/features/virtual-drive/services/lazy/DirectoryStateSqliteRepository'; | ||
| import { | ||
| createLazyVirtualDriveHydratorService, | ||
| LazyVirtualDriveHydrator, | ||
| } from '../../../../backend/features/virtual-drive/services/lazy/virtual-drive-hydrator/create-lazy-virtual-drive-hydrator-service'; | ||
|
|
||
| export async function registerVirtualDriveSharedServices(builder: ContainerBuilder): Promise<void> { | ||
| const downloaded = PATHS.DOWNLOADED; | ||
|
|
||
| builder.register(RelativePathToAbsoluteConverter).useFactory(() => new RelativePathToAbsoluteConverter(downloaded)); | ||
| builder.register(AbsolutePathToRelativeConverter).useFactory(() => new AbsolutePathToRelativeConverter(downloaded)); | ||
| builder | ||
| .register(DirectoryStateSqliteRepository) | ||
| .useFactory(() => createDirectoryStateSqliteRepository()) | ||
| .asSingleton(); | ||
| builder | ||
| .register(LazyVirtualDriveHydrator) | ||
| .useFactory((container) => | ||
| createLazyVirtualDriveHydratorService({ | ||
| folderRepository: container.get(FolderRepository), | ||
| fileRepository: container.get(FileRepository), | ||
| directoryStateRepository: container.get(DirectoryStateSqliteRepository), | ||
| }), | ||
| ) | ||
| .asSingleton(); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| const uploadSizeLimitBlockedPaths = new Set<string>(); | ||
|
|
||
| export function markUploadSizeLimitBlockedPath(path: string): void { | ||
| uploadSizeLimitBlockedPaths.add(path); | ||
| } | ||
|
|
||
| export function isUploadSizeLimitBlockedPath(path: string): boolean { | ||
| return uploadSizeLimitBlockedPaths.has(path); | ||
| } | ||
|
|
||
| export function clearUploadSizeLimitBlockedPath(path: string): void { | ||
| uploadSizeLimitBlockedPaths.delete(path); | ||
| } | ||
|
Comment on lines
+1
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🔴 Critical | ⚡ Quick win Fix Prettier formatting failures before merge. The pipeline's format check ( #!/bin/bash
# Identify which files have Prettier formatting issues
npx prettier src --check 2>&1 | head -20🧰 Tools🪛 GitHub Actions: Lint / 👨🎨 Format Check[error] 1-1: Command failed: npm run format (prettier src --check). Prettier reported code style issues in 2 files, exiting with code 1. 🤖 Prompt for AI AgentsSource: Pipeline failures |
||
Uh oh!
There was an error while loading. Please reload this page.