34 lines
1.2 KiB
TypeScript
Raw Normal View History

2024-04-03 20:15:11 +11:00
import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper";
import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService";
import { JsonUtil } from "@spt-aki/utils/JsonUtil";
import { VFS } from "@spt-aki/utils/VFS";
export declare class BundleInfo {
modpath: string;
filename: string;
crc: number;
dependencies: string[];
constructor(modpath: string, bundle: BundleManifestEntry, bundleHash: number);
2023-06-11 15:10:34 +10:00
}
export declare class BundleLoader {
protected httpServerHelper: HttpServerHelper;
protected vfs: VFS;
protected jsonUtil: JsonUtil;
2024-04-03 20:15:11 +11:00
protected bundleHashCacheService: BundleHashCacheService;
2023-06-11 15:10:34 +10:00
protected bundles: Record<string, BundleInfo>;
2024-04-03 20:15:11 +11:00
constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService);
2023-10-09 20:21:00 +11:00
/**
* Handle singleplayer/bundles
*/
2024-04-03 20:15:11 +11:00
getBundles(): BundleInfo[];
getBundle(key: string): BundleInfo;
2023-06-11 15:10:34 +10:00
addBundles(modpath: string): void;
addBundle(key: string, b: BundleInfo): void;
}
export interface BundleManifest {
2024-04-03 20:15:11 +11:00
manifest: BundleManifestEntry[];
2023-06-11 15:10:34 +10:00
}
export interface BundleManifestEntry {
key: string;
2024-04-03 20:15:11 +11:00
dependencyKeys: string[];
2023-06-11 15:10:34 +10:00
}