SurviePote 2/4: atlas Nebula (serveur SurviePote-26.3, distribution.json, sans binaires)

This commit is contained in:
kisakay
2026-10-18 18:44:09 +02:00
parent 14355ac2ad
commit ccaee11472
69 changed files with 8289 additions and 0 deletions
@@ -0,0 +1,37 @@
import { join } from 'path'
import { URL } from 'url'
import { BaseFileStructure } from '../BaseFileStructure.js'
import { MinecraftVersion } from '../../util/MinecraftVersion.js'
export class VersionRepoStructure extends BaseFileStructure {
private name: string
constructor(
absoluteRoot: string,
relativeRoot: string,
name: string
) {
super(absoluteRoot, relativeRoot, 'versions')
this.name = name
}
public getLoggerName(): string {
return 'VersionRepoStructure'
}
public getFileName(minecraftVersion: MinecraftVersion, loaderVersion: string): string {
return `${minecraftVersion}-${this.name}-${loaderVersion}`
}
public getVersionManifest(minecraftVersion: MinecraftVersion, loaderVersion: string): string {
const fileName = this.getFileName(minecraftVersion, loaderVersion)
return join(this.containerDirectory, fileName, `${fileName}.json`)
}
public getVersionManifestURL(url: string, minecraftVersion: MinecraftVersion, loaderVersion: string): string {
const fileName = this.getFileName(minecraftVersion, loaderVersion)
return new URL(join(this.relativeRoot, fileName, `${fileName}.json`), url).toString()
}
}