2024-11-12 11:51:30 -07:00
|
|
|
import { CompilerOptions } from "typescript";
|
|
|
|
import type { ILogger } from "@spt/models/spt/utils/ILogger";
|
|
|
|
import { ModHashCacheService } from "@spt/services/cache/ModHashCacheService";
|
|
|
|
import { VFS } from "@spt/utils/VFS";
|
2023-08-17 19:49:16 -06:00
|
|
|
export declare class ModCompilerService {
|
|
|
|
protected logger: ILogger;
|
2024-04-19 21:23:52 -06:00
|
|
|
protected modHashCacheService: ModHashCacheService;
|
2023-08-17 19:49:16 -06:00
|
|
|
protected vfs: VFS;
|
2024-02-23 15:06:00 -07:00
|
|
|
protected serverDependencies: string[];
|
2024-04-19 21:23:52 -06:00
|
|
|
constructor(logger: ILogger, modHashCacheService: ModHashCacheService, vfs: VFS);
|
2024-02-23 15:06:00 -07:00
|
|
|
/**
|
|
|
|
* Convert a mods TS into JS
|
|
|
|
* @param modName Name of mod
|
|
|
|
* @param modPath Dir path to mod
|
|
|
|
* @param modTypeScriptFiles
|
|
|
|
* @returns
|
|
|
|
*/
|
2023-08-17 19:49:16 -06:00
|
|
|
compileMod(modName: string, modPath: string, modTypeScriptFiles: string[]): Promise<void>;
|
2024-02-23 15:06:00 -07:00
|
|
|
/**
|
|
|
|
* Convert a TS file into JS
|
|
|
|
* @param fileNames Paths to TS files
|
|
|
|
* @param options Compiler options
|
|
|
|
*/
|
2024-11-12 11:51:30 -07:00
|
|
|
protected compile(fileNames: string[], options: CompilerOptions): Promise<void>;
|
2024-02-23 15:06:00 -07:00
|
|
|
/**
|
|
|
|
* Do the files at the provided paths exist
|
|
|
|
* @param fileNames
|
|
|
|
* @returns
|
|
|
|
*/
|
2023-08-17 19:49:16 -06:00
|
|
|
protected areFilesReady(fileNames: string[]): boolean;
|
2024-02-23 15:06:00 -07:00
|
|
|
/**
|
|
|
|
* Wait the provided number of milliseconds
|
|
|
|
* @param ms Milliseconds
|
|
|
|
* @returns
|
|
|
|
*/
|
2023-08-17 19:49:16 -06:00
|
|
|
protected delay(ms: number): Promise<unknown>;
|
|
|
|
}
|