ScavXpCounts/types/loaders/BundleLoader.d.ts

34 lines
1.2 KiB
TypeScript
Raw Normal View History

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