Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
chore(backend:files): rename FilesParser to FilesContentParser
johavenadd866856db9
diff --git a/backend/src/applications/files/files.module.ts b/backend/src/applications/files/files.module.tsindex d1bc08f2..b30dfb35 100644--- a/backend/src/applications/files/files.module.ts+++ b/backend/src/applications/files/files.module.ts@@ -10,7 +10,7 @@ import { FilesContentIndexer } from './services/files-content-indexer.service'import { FilesLockManager } from './services/files-lock-manager.service'import { FilesManager } from './services/files-manager.service'import { FilesMethods } from './services/files-methods.service'-import { FilesParser } from './services/files-parser.service'+import { FilesContentParser } from './services/files-content-parser.service'import { FilesQueries } from './services/files-queries.service'import { FilesRecents } from './services/files-recents.service'import { FilesScheduler } from './services/files-scheduler.service'@@ -18,6 +18,7 @@ import { FilesSearchManager } from './services/files-search-manager.service'import { FilesTasksManager } from './services/files-tasks-manager.service'import { FilesEventManager } from './services/files-event-manager.service'import { FilesQuotaManager } from './services/files-quota-manager.service'+import { FilesTrashManagerService } from './services/files-trash-manager.service'@Module({imports: [@@ -33,7 +34,7 @@ import { FilesQuotaManager } from './services/files-quota-manager.service'FilesTasksManager,FilesScheduler,FilesRecents,- FilesParser,+ FilesContentParser,FilesContentIndexer,{ provide: FilesContentStore, useClass: FilesContentStoreMySQL },FilesSearchManager,diff --git a/backend/src/applications/files/services/files-content-indexer.service.spec.ts b/backend/src/applications/files/services/files-content-indexer.service.spec.tsindex 63e117d0..8b9615da 100644--- a/backend/src/applications/files/services/files-content-indexer.service.spec.ts+++ b/backend/src/applications/files/services/files-content-indexer.service.spec.ts@@ -14,7 +14,7 @@ import { IndexingState } from '../interfaces/indexing.interface'import { FilesContentStore } from '../models/files-content-store'import * as docTextifyModule from '../utils/doc-textify/doc-textify'import { OCRManager } from '../utils/doc-textify/utils/ocr'-import { FilesParser } from './files-parser.service'+import { FilesContentParser } from './files-content-parser.service'import { FilesContentIndexer } from './files-content-indexer.service'describe(FilesContentIndexer.name, () => {@@ -75,7 +75,7 @@ describe(FilesContentIndexer.name, () => {FilesContentIndexer,{ provide: Cache, useValue: cache },{ provide: FilesContentStore, useValue: filesIndexer },- { provide: FilesParser, useValue: filesParser }+ { provide: FilesContentParser, useValue: filesParser }]}).compile()diff --git a/backend/src/applications/files/services/files-content-indexer.service.ts b/backend/src/applications/files/services/files-content-indexer.service.tsindex 3d5f3247..46aa319b 100644--- a/backend/src/applications/files/services/files-content-indexer.service.ts+++ b/backend/src/applications/files/services/files-content-indexer.service.ts@@ -16,7 +16,7 @@ import { FileContent } from '../schemas/file-content.interface'import { docTextify } from '../utils/doc-textify/doc-textify'import { OCRManager } from '../utils/doc-textify/utils/ocr'import { getExtensionWithoutDot, getMimeType } from '../utils/files'-import { FilesParser } from './files-parser.service'+import { FilesContentParser } from './files-content-parser.service'import { genIndexingKey } from '../utils/indexing'import { FILE_REPOSITORY } from '../constants/operations'import { Cache } from '../../../infrastructure/cache/services/cache.service'@@ -34,7 +34,7 @@ export class FilesContentIndexer {constructor(private readonly cache: Cache,private readonly filesContentStore: FilesContentStore,- private readonly filesParser: FilesParser+ private readonly filesParser: FilesContentParser) {}isRunning(): Promise<boolean> {diff --git a/backend/src/applications/files/services/files-parser.service.spec.ts b/backend/src/applications/files/services/files-content-parser.service.spec.tssimilarity index 52%rename from backend/src/applications/files/services/files-parser.service.spec.tsrename to backend/src/applications/files/services/files-content-parser.service.spec.tsindex be77d6a4..3a2f6589 100644--- a/backend/src/applications/files/services/files-parser.service.spec.ts+++ b/backend/src/applications/files/services/files-content-parser.service.spec.ts@@ -1,16 +1,16 @@import { Test, TestingModule } from '@nestjs/testing'import { DB_TOKEN_PROVIDER } from '../../../infrastructure/database/constants'-import { FilesParser } from './files-parser.service'+import { FilesContentParser } from './files-content-parser.service'-describe(FilesParser.name, () => {- let service: FilesParser+describe(FilesContentParser.name, () => {+ let service: FilesContentParserbeforeAll(async () => {const module: TestingModule = await Test.createTestingModule({- providers: [FilesParser, { provide: DB_TOKEN_PROVIDER, useValue: {} }]+ providers: [FilesContentParser, { provide: DB_TOKEN_PROVIDER, useValue: {} }]}).compile()- service = module.get<FilesParser>(FilesParser)+ service = module.get<FilesContentParser>(FilesContentParser)})it('should be defined', () => {diff --git a/backend/src/applications/files/services/files-parser.service.ts b/backend/src/applications/files/services/files-content-parser.service.tssimilarity index 98%rename from backend/src/applications/files/services/files-parser.service.tsrename to backend/src/applications/files/services/files-content-parser.service.tsindex 2364f08e..6be0f627 100644--- a/backend/src/applications/files/services/files-parser.service.ts+++ b/backend/src/applications/files/services/files-content-parser.service.ts@@ -19,8 +19,8 @@ import { isPathExists } from '../utils/files'import { FILE_REPOSITORY } from '../constants/operations'@Injectable()-export class FilesParser {- private readonly logger = new Logger(FilesParser.name)+export class FilesContentParser {+ private readonly logger = new Logger(FilesContentParser.name)constructor(@Inject(DB_TOKEN_PROVIDER) private readonly db: DBSchema) {}diff --git a/backend/src/applications/files/services/files-search-manager.service.spec.ts b/backend/src/applications/files/services/files-search-manager.service.spec.tsindex 9b023b3a..5be0d5e9 100644--- a/backend/src/applications/files/services/files-search-manager.service.spec.ts+++ b/backend/src/applications/files/services/files-search-manager.service.spec.ts@@ -6,7 +6,7 @@ import { SpacesQueries } from '../../spaces/services/spaces-queries.service'import { FilesContentStore } from '../models/files-content-store'import { FILE_REPOSITORY } from '../constants/operations'import { configuration } from '../../../configuration/config.environment'-import { FilesParser } from './files-parser.service'+import { FilesContentParser } from './files-content-parser.service'import { FilesSearchManager } from './files-search-manager.service'describe(FilesSearchManager.name, () => {@@ -53,7 +53,7 @@ describe(FilesSearchManager.name, () => {providers: [FilesSearchManager,{ provide: FilesContentStore, useValue: filesIndexer },- { provide: FilesParser, useValue: filesParser },+ { provide: FilesContentParser, useValue: filesParser },{provide: SpacesQueries,useValue: spacesQueriesdiff --git a/backend/src/applications/files/services/files-search-manager.service.ts b/backend/src/applications/files/services/files-search-manager.service.tsindex e485841b..35da841e 100644--- a/backend/src/applications/files/services/files-search-manager.service.ts+++ b/backend/src/applications/files/services/files-search-manager.service.ts@@ -11,7 +11,7 @@ import { FilesContentStore } from '../models/files-content-store'import { FileContent } from '../schemas/file-content.interface'import { dirName, fileName, getMimeType } from '../utils/files'import { genRegexPositiveAndNegativeTerms } from '../utils/files-search'-import { FilesParser } from './files-parser.service'+import { FilesContentParser } from './files-content-parser.service'import { FILE_REPOSITORY } from '../constants/operations'import { genIndexingKey } from '../utils/indexing'import { escapePath } from '../../../common/functions'@@ -22,7 +22,7 @@ export class FilesSearchManager {constructor(private readonly filesIndexer: FilesContentStore,- private readonly filesParser: FilesParser,+ private readonly filesParser: FilesContentParser,private readonly spacesQueries: SpacesQueries,private readonly sharesQueries: SharesQueries) {}