2024-08-05 20:33:00 +10:00
|
|
|
import { HttpServerHelper } from "@spt/helpers/HttpServerHelper";
|
|
|
|
import { BundleHashCacheService } from "@spt/services/cache/BundleHashCacheService";
|
|
|
|
import { JsonUtil } from "@spt/utils/JsonUtil";
|
|
|
|
import { VFS } from "@spt/utils/VFS";
|
|
|
|
import { ICloner } from "@spt/utils/cloners/ICloner";
|
2024-04-03 20:15:11 +11:00
|
|
|
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;
|
2024-08-05 20:33:00 +10:00
|
|
|
protected cloner: ICloner;
|
2023-06-11 15:10:34 +10:00
|
|
|
protected bundles: Record<string, BundleInfo>;
|
2024-08-05 20:33:00 +10:00
|
|
|
constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner);
|
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
|
|
|
}
|