Files
patatapack2-distribution/src/model/struct/repo/repo.struct.ts
Daniel Scalzi 21d80fef82 Integrate with PackXZExtract to support pack.xz libs.
All pack.xz libraries now have their MD5s properly calculated.
Sha1 validations are performed on jar libraries. The checksums
forge provides for compressed files are neither the sha1 or md5
of the initial or extracted file. Ignoring those for now.

Still TODO is integration with baseurl. Might move both that
and base path to the .env file to reduce redundency in command processing.
2020-01-12 05:27:35 -05:00

47 lines
1.4 KiB
TypeScript

import { join } from 'path'
import { BaseFileStructure } from '../BaseFileStructure'
import { ForgeRepoStructure } from './forgerepo.struct'
import { LibRepoStructure } from './librepo.struct'
import { LiteLoaderRepoStructure } from './liteloaderrepo.struct'
export class RepoStructure extends BaseFileStructure {
private forgeRepoStruct: ForgeRepoStructure
private liteloaderRepoStruct: LiteLoaderRepoStructure
private libRepoStruct: LibRepoStructure
constructor(
absoluteRoot: string,
relativeRoot: string
) {
super(absoluteRoot, relativeRoot, 'repo')
this.forgeRepoStruct = new ForgeRepoStructure(this.containerDirectory, this.relativeRoot)
this.liteloaderRepoStruct = new LiteLoaderRepoStructure(this.containerDirectory, this.relativeRoot)
this.libRepoStruct = new LibRepoStructure(this.containerDirectory, this.relativeRoot)
}
public async init() {
super.init()
await this.forgeRepoStruct.init()
await this.liteloaderRepoStruct.init()
await this.libRepoStruct.init()
}
public getForgeRepoStruct() {
return this.forgeRepoStruct
}
public getLiteLoaderRepoStruct() {
return this.liteloaderRepoStruct
}
public getLibRepoStruct() {
return this.libRepoStruct
}
public getTempDirectory() {
return join(this.absoluteRoot, 'temp')
}
}