class DatabaseImporter
implements OnLoad
import { DatabaseImporter } from "https://deno.land/x/sptaki@1.2.0/utils/DatabaseImporter.d.ts";
Constructors
new
DatabaseImporter(logger: ILogger,
vfs: VFS,
jsonUtil: JsonUtil,
localisationService: LocalisationService,
databaseServer: DatabaseServer,
imageRouter: ImageRouter,
encodingUtil: EncodingUtil,
hashUtil: HashUtil,
importerUtil: ImporterUtil,
configServer: ConfigServer,
Properties
protected
configServer: ConfigServerprotected
databaseServer: DatabaseServerprotected
encodingUtil: EncodingUtilprotected
hashUtil: HashUtilprotected
httpConfig: IHttpConfigprotected
imageRouter: ImageRouterprotected
importerUtil: ImporterUtilprotected
jsonUtil: JsonUtilprotected
localisationService: LocalisationServiceprotected
logger: ILoggerprotected
vfs: VFSMethods
protected
getImagePathOverride(imagePath: string): stringCheck for a path override in the http json config file
protected
hydrateDatabase(filepath: string): Promise<void>Read all json files in database folder and map into a json object
protected
onReadValidate(fileWithPath: string, data: string): voidprotected
validateFile(filePathAndName: string, fileData: any): booleangetRoute(): string
getSptDataPath(): string
Get path to aki data
loadImages(): void
filepath: string,
directories: string[],
routes: string[],
Find and map files with image router inside a designated path
onLoad(): Promise<void>