2024-08-05 20:33:00 +10:00

36 lines
1.3 KiB
TypeScript

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";
export declare class BundleInfo {
modpath: string;
filename: string;
crc: number;
dependencies: string[];
constructor(modpath: string, bundle: BundleManifestEntry, bundleHash: number);
}
export declare class BundleLoader {
protected httpServerHelper: HttpServerHelper;
protected vfs: VFS;
protected jsonUtil: JsonUtil;
protected bundleHashCacheService: BundleHashCacheService;
protected cloner: ICloner;
protected bundles: Record<string, BundleInfo>;
constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner);
/**
* Handle singleplayer/bundles
*/
getBundles(): BundleInfo[];
getBundle(key: string): BundleInfo;
addBundles(modpath: string): void;
addBundle(key: string, b: BundleInfo): void;
}
export interface BundleManifest {
manifest: BundleManifestEntry[];
}
export interface BundleManifestEntry {
key: string;
dependencyKeys: string[];
}