Setting up flow for resolvers.
Repo structure classes should be responsible for pulling versioned files. Ex. /forge/1.14/ -> get the latest file (or only allow one file). The resolver then gets that file to work with in order to resolve the forge module, pull its libs, and attach them as submodules.
This commit is contained in:
41
src/model/struct/repo/repo.struct.ts
Normal file
41
src/model/struct/repo/repo.struct.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
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
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user