feat: paper channel badges (#5850)

This commit is contained in:
Calum H.
2026-04-18 18:13:08 +00:00
committed by GitHub
parent ab623dc325
commit 3e32901737
18 changed files with 357 additions and 63 deletions
@@ -1,11 +1,9 @@
import { $fetch } from 'ofetch'
import { AbstractModule } from '../../core/abstract-module'
import type { LauncherMeta } from './types'
export type { LauncherMeta } from './types'
const BASE_URL = 'https://launcher-meta.modrinth.com'
const LAUNCHER_META_BASE_URL = 'https://launcher-meta.modrinth.com'
export class LauncherMetaManifestV0Module extends AbstractModule {
public getModuleID(): string {
@@ -18,6 +16,11 @@ export class LauncherMetaManifestV0Module extends AbstractModule {
* @param loader - Loader platform (fabric, forge, quilt, neo)
*/
public async getManifest(loader: string): Promise<LauncherMeta.Manifest.v0.Manifest> {
return $fetch<LauncherMeta.Manifest.v0.Manifest>(`${BASE_URL}/${loader}/v0/manifest.json`)
return this.client.request<LauncherMeta.Manifest.v0.Manifest>('/manifest.json', {
api: LAUNCHER_META_BASE_URL,
version: `${loader}/v0`,
method: 'GET',
skipAuth: true,
})
}
}