import { UpdatedObject } from "@xmcl/net"; import { ForgeInstaller } from "./index"; export declare namespace ForgeWebPage { interface Download { md5: string; sha1: string; path: string; } /** * Parse the html string of forge webpage */ function parse(content: string): ForgeWebPage; /** * Query the webpage content from files.minecraftforge.net. * * You can put the last query result to the fallback option. It will check if your old result is up-to-date. * It will request a new page only when the fallback option is outdated. * * @param option The option can control querying minecraft version, and page caching. */ function getWebPage(): Promise; /** * Query the webpage content from files.minecraftforge.net. * * You can put the last query result to the fallback option. It will check if your old result is up-to-date. * It will request a new page only when the fallback option is outdated. * * @param option The option can control querying minecraft version, and page caching. */ function getWebPage(option?: { mcversion?: string; }): Promise; /** * Query the webpage content from files.minecraftforge.net. * * You can put the last query result to the fallback option. It will check if your old result is up-to-date. * It will request a new page only when the fallback option is outdated. * * @param option The option can control querying minecraft version, and page caching. */ function getWebPage(option?: { mcversion?: string; fallback?: ForgeWebPage; }): Promise; /** * Query the webpage content from files.minecraftforge.net. * * You can put the last query result to the fallback option. It will check if your old result is up-to-date. * It will request a new page only when the fallback option is outdated. * * @param option The option can control querying minecraft version, and page caching. */ function getWebPage(option?: { mcversion?: string; fallback: ForgeWebPage; }): Promise; /** * A richer version info than forge installer required */ interface Version extends ForgeInstaller.VersionMeta { /** * The minecraft version */ mcversion: string; /** * The version of forge */ version: string; date: string; /** * The changelog info */ changelog?: ForgeWebPage.Download; installer: ForgeWebPage.Download; mdk?: ForgeWebPage.Download; universal: ForgeWebPage.Download; source?: ForgeWebPage.Download; launcher?: ForgeWebPage.Download; /** * The type of the forge release. The `common` means the normal release. */ type: "buggy" | "recommended" | "common" | "latest"; } namespace Version { function to(webPageVersion: ForgeWebPage.Version): ForgeInstaller.VersionMeta; } } declare module "./index" { namespace VersionMeta { function from(webPageVersion: ForgeWebPage.Version): ForgeInstaller.VersionMeta; } } export interface ForgeWebPage extends UpdatedObject { versions: ForgeWebPage.Version[]; mcversion: string; }