Skip to main content

Interface: IInstallationService

Defined in: Services/IInstallationService.ts:8

Installation service interface Handles module installation, verification, and removal

Methods

decompressModule()

decompressModule(sourcePath, destinationPath): Promise<void>

Defined in: Services/IInstallationService.ts:52

Decompress a gzipped module file

Parameters

sourcePath

string

Path to .gz file

destinationPath

string

Path to output file

Returns

Promise<void>


extractModuleInfo()

extractModuleInfo(dbPath): Promise<Partial<ModuleMetadata>>

Defined in: Services/IInstallationService.ts:66

Extract module information from a module database file

Parameters

dbPath

string

Path to module database (.db or .db.gz)

Returns

Promise<Partial<ModuleMetadata>>

Module metadata extracted from module_info table


getModulePath()

getModulePath(moduleType, moduleId): string

Defined in: Services/IInstallationService.ts:45

Get module installation path

Parameters

moduleType

string

Type of module

moduleId

string

Module identifier

Returns

string

Full path to module database


getModuleSize()

getModuleSize(dbPath): Promise<number>

Defined in: Services/IInstallationService.ts:59

Get module size on disk

Parameters

dbPath

string

Path to module database

Returns

Promise<number>

Size in bytes


installModule()

installModule(sourcePath, moduleInfo): Promise<InstallationResult>

Defined in: Services/IInstallationService.ts:15

Install a native format module

Parameters

sourcePath

string

Path to the downloaded module file

moduleInfo

Partial<ModuleMetadata>

Module metadata from catalog

Returns

Promise<InstallationResult>

Installation result with module ID


registerModule()

registerModule(moduleInfo): Promise<number>

Defined in: Services/IInstallationService.ts:29

Register module in main database

Parameters

moduleInfo

ModuleMetadata

Module metadata

Returns

Promise<number>

Module ID


uninstallModule()

uninstallModule(moduleId, removeUserData?): Promise<boolean>

Defined in: Services/IInstallationService.ts:37

Uninstall a module

Parameters

moduleId

number

Module ID to uninstall

removeUserData?

boolean

Whether to remove associated user data

Returns

Promise<boolean>

True if successful


verifyModule()

verifyModule(dbPath): Promise<boolean>

Defined in: Services/IInstallationService.ts:22

Verify module integrity

Parameters

dbPath

string

Path to module database file

Returns

Promise<boolean>

True if module is valid