You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
1.7 KiB
36 lines
1.7 KiB
4 months ago
|
interface TinkrInitContext {}
|
||
|
interface TinkrPostLaunchContext {}
|
||
|
|
||
|
type TinkrAlias = "tinkr" | "wow";
|
||
|
|
||
|
interface TinkrUtils {
|
||
|
downloadFile: (alias: TinkrAlias, fileName: string, url: string) => Promise<boolean>;
|
||
|
readFile: (alias: TinkrAlias, fileName: string) => Promise<string>;
|
||
|
writeFile: (alias: TinkrAlias, fileName: string, contents: string) => Promise<void>;
|
||
|
deleteFile: (alias: TinkrAlias, fileName: string) => Promise<void>;
|
||
|
copyFile: (alias: TinkrAlias, sourceFileName: string, destFileName: string) => Promise<void>;
|
||
|
moveFile: (alias: TinkrAlias, sourceFileName: string, destFileName: string) => Promise<void>;
|
||
|
fileExists: (alias: TinkrAlias, fileName: string) => Promise<boolean>;
|
||
|
listFiles: (alias: TinkrAlias, dirName: string) => Promise<string[]>;
|
||
|
listDirs: (alias: TinkrAlias, dirName: string) => Promise<string[]>;
|
||
|
createDir: (alias: TinkrAlias, dirName: string) => Promise<void>;
|
||
|
deleteDir: (alias: TinkrAlias, dirName: string) => Promise<void>;
|
||
|
copyDir: (alias: TinkrAlias, sourceDirName: string, destDirName: string) => Promise<void>;
|
||
|
moveDir: (alias: TinkrAlias, sourceDirName: string, destDirName: string) => Promise<void>;
|
||
|
dirExists: (alias: TinkrAlias, dirName: string) => Promise<boolean>;
|
||
|
unzipFile: (alias: TinkrAlias, fileName: string, destDirName: string, destFileName: string) => Promise<void>;
|
||
|
}
|
||
|
|
||
|
interface TinkrPreLaunchContext {
|
||
|
wowPath: string;
|
||
|
tinkrPath: string;
|
||
|
gameVersion: string;
|
||
|
gameRegion: string;
|
||
|
utils: TinkrUtils;
|
||
|
}
|
||
|
|
||
|
interface TinkrPluginHooks {
|
||
|
init: (context: TinkrInitContext) => Promise<void>;
|
||
|
preLaunch: (context: TinkrPreLaunchContext) => Promise<void>;
|
||
|
postLaunch: (context: TinkrPostLaunchContext) => Promise<void>;
|
||
|
}
|