import { ConfigService } from '../../config'; import { Seed } from '../interfaces'; import { SupportedDirectusCollections } from './directus-structure'; import { LoggerService, Logger } from '../../logger'; export declare class SeedLoader { protected readonly loggerService: LoggerService; protected readonly config: ConfigService; protected readonly logger: Logger; constructor(loggerService: LoggerService, config: ConfigService); loadFromFiles(): Seed[]; /** * Merge two seeds * - merge data with concat * - merge meta.create, meta.update, meta.delete with AND logic * - merge meta.preserve_ids with OR logic */ protected mergeSeeds(existing: Seed, seed: Seed): void; /** * Applies the defaults for directus collections. * - ignore_on_update: add the fields that are ignored on update in the Directus structure */ protected applyDirectusCollectionDefaults(seed: Seed): void; /** * Denotes if the collection is a directus collection. */ protected isDirectusCollection(collection: string): collection is SupportedDirectusCollections; /** * Returns the directory path if a file path is provided * Otherwise, returns the path as is * Test with Fs */ protected getFolderPath(filePath: string): string; /** * If the seed has a file path _file_path, replace it with the absolute path */ protected applyFilePathToData(seed: Seed, folderPath: string): Seed; }