mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2025-01-06 17:07:19 +03:00
30 lines
682 B
TypeScript
30 lines
682 B
TypeScript
|
import type {
|
||
|
PatchState,
|
||
|
PatchInfo
|
||
|
} from './types/Patch';
|
||
|
|
||
|
import md5 from 'js-md5';
|
||
|
|
||
|
import constants from './Constants';
|
||
|
|
||
|
declare const Neutralino;
|
||
|
|
||
|
export default class Patch
|
||
|
{
|
||
|
/*public static get latest(): Promise<PatchInfo>
|
||
|
{
|
||
|
return new Promise((resolve) => {
|
||
|
|
||
|
});
|
||
|
}
|
||
|
|
||
|
public static getPatchInfo(version: string, source: 'origin' | 'additional' = 'origin'): Promise<PatchInfo|null>
|
||
|
{
|
||
|
return new Promise(async (resolve) => {
|
||
|
const patchUri = constants.uri.patch[source];
|
||
|
|
||
|
const patchSh = await fetch(`${patchUri}/raw/master/${version.replaceAll('.', '')}/patch.sh`);
|
||
|
});
|
||
|
}*/
|
||
|
}
|