import { MinecraftLocation } from '@xmcl/core'; import { Dispatcher } from 'undici'; import { InstallOptions } from './utils'; export declare const YARN_MAVEN_URL = "https://maven.fabricmc.net/net/fabricmc/yarn/maven-metadata.xml"; export declare const LOADER_MAVEN_URL = "https://maven.fabricmc.net/net/fabricmc/fabric-loader/maven-metadata.xml"; export interface FabricArtifactVersion { gameVersion?: string; separator?: string; build?: number; maven: string; version: string; stable: boolean; } export interface FabricArtifacts { mappings: FabricArtifactVersion[]; loader: FabricArtifactVersion[]; } export interface FabricLoaderArtifact { loader: FabricArtifactVersion; intermediary: FabricArtifactVersion; launcherMeta: { version: number; libraries: { client: { name: string; url: string; }[]; common: { name: string; url: string; }[]; server: { name: string; url: string; }[]; }; mainClass: { client: string; server: string; }; }; } export interface FabricOptions { dispatcher?: Dispatcher; } /** * Get all the artifacts provided by fabric * @param remote The fabric API host * @beta */ export declare function getFabricArtifacts(options?: FabricOptions): Promise; /** * Get fabric-yarn artifact list * @param remote The fabric API host * @beta */ export declare function getYarnArtifactList(options?: FabricOptions): Promise; /** * Get fabric-yarn artifact list by Minecraft version * @param minecraft The Minecraft version * @param remote The fabric API host * @beta */ export declare function getYarnArtifactListFor(minecraft: string, options?: FabricOptions): Promise; /** * Get fabric-loader artifact list * @param remote The fabric API host * @beta */ export declare function getLoaderArtifactList(options?: FabricOptions): Promise; /** * Get fabric-loader artifact list by Minecraft version * @param minecraft The minecraft version * @param remote The fabric API host * @beta */ export declare function getLoaderArtifactListFor(minecraft: string, options?: FabricOptions): Promise; /** * Get fabric-loader artifact list by Minecraft version * @param minecraft The minecraft version * @param loader The yarn-loader version * @param remote The fabric API host * @beta */ export declare function getFabricLoaderArtifact(minecraft: string, loader: string, options?: FabricOptions): Promise; /** * Install the fabric to the client. Notice that this will only install the json. * You need to call `Installer.installDependencies` to get a full client. * @param yarnVersion The yarn version * @param loaderVersion The fabric loader version * @param minecraft The minecraft location * @returns The installed version id */ export interface FabricInstallOptions extends InstallOptions { side?: 'client' | 'server'; yarnVersion?: string | FabricArtifactVersion; } /** * Generate fabric version json to the disk according to yarn and loader * @param side Client or server * @param yarnVersion The yarn version string or artifact * @param loader The loader artifact * @param minecraft The Minecraft Location * @param options The options * @beta */ export declare function installFabric(loader: FabricLoaderArtifact, minecraft: MinecraftLocation, options?: FabricInstallOptions): Promise; //# sourceMappingURL=fabric.d.ts.map