Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function diagnose(version: string, minecraft: MinecraftLocation): Promise {
return Task.execute(diagnoseTask(version, minecraft)).wait();
}
export function install(type: "server" | "client", versionMeta: VersionMeta, minecraft: MinecraftLocation, option?: Option): Promise {
return Task.execute(installTask(type, versionMeta, minecraft, option)).wait();
}
/**
export function installLibraries(version: ResolvedVersion, option: LibraryOption = {}): Promise {
return Task.execute(installLibrariesTask(version, option)).wait();
}
/**
export function install(version: VersionMeta, minecraft: MinecraftLocation, option?: {
maven?: string,
java?: JavaExecutor,
}) {
return Task.execute(installTask(version, minecraft, option)).wait();
}
destination: string;
/**
* The cached directory which compressed java lzma will be download to.
* @default os.tempdir()
*/
cacheDir?: string;
/**
* The platform will be installed. It will use detected platform by default.
*/
platform?: Platform;
/**
* Unpack lzma function. It must present, else it will not be able to unpack mojang provided LZMA.
*/
unpackLZMA: (src: string, dest: string) => Promise;
}) {
return Task.execute(installJreFromMojangTask(options)).wait();
}
export function installDependencies(version: ResolvedVersion, option?: Option): Promise {
return Task.execute(installDependenciesTask(version, option)).wait();
}
/**
export async function installByInstallerPartial(version: string | InstallProfile, minecraft: MinecraftLocation, option: {
java?: JavaExecutor,
} & Installer.LibraryOption = {}) {
return Task.execute(installByInstallerPartialTask(version, minecraft, option)).wait();
}
export function installVersion(type: "client" | "server", versionMeta: VersionMeta, minecraft: MinecraftLocation, option: JarOption = {}): Promise {
return Task.execute(installVersionTask(type, versionMeta, minecraft, option)).wait();
}
export function installAssets(version: ResolvedVersion, option?: AssetsOption): Promise {
return Task.execute(installAssetsTask(version, option)).wait();
}
/**
export function installLibrariesDirect(libraries: ResolvedLibrary[], minecraft: MinecraftLocation, option?: LibraryOption): Promise {
return Task.execute(installLibrariesDirectTask(libraries, minecraft, option)).wait();
}
/**