Move claritas invocation to separate function, clean versions in Claritas.
This commit is contained in:
Binary file not shown.
@@ -126,16 +126,7 @@ export abstract class ModuleStructure extends BaseModelStructure<Module> {
|
||||
|
||||
}
|
||||
|
||||
protected async _doModuleRetrieval(moduleCandidates: ModuleCandidate[], options?: {
|
||||
preProcess?: (candidate: ModuleCandidate) => void
|
||||
postProcess?: (module: Module) => void
|
||||
}): Promise<Module[]> {
|
||||
|
||||
const accumulator: Module[] = []
|
||||
|
||||
if(moduleCandidates.length > 0) {
|
||||
|
||||
// Invoke Claritas
|
||||
protected async invokeClaritas(moduleCandidates: ModuleCandidate[]): Promise<void> {
|
||||
if(this.getClaritasType() != null) {
|
||||
const claritasExecutor = new ClaritasWrapper()
|
||||
|
||||
@@ -154,6 +145,7 @@ export abstract class ModuleStructure extends BaseModelStructure<Module> {
|
||||
this.minecraftVersion,
|
||||
claritasCandidates.map(entry => entry.filePath)
|
||||
)
|
||||
|
||||
if(this.claritasResult == null) {
|
||||
this.logger.error('Failed to process Claritas result!')
|
||||
} else {
|
||||
@@ -162,6 +154,19 @@ export abstract class ModuleStructure extends BaseModelStructure<Module> {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected async _doModuleRetrieval(moduleCandidates: ModuleCandidate[], options?: {
|
||||
preProcess?: (candidate: ModuleCandidate) => void
|
||||
postProcess?: (module: Module) => void
|
||||
}): Promise<Module[]> {
|
||||
|
||||
const accumulator: Module[] = []
|
||||
|
||||
if(moduleCandidates.length > 0) {
|
||||
|
||||
// Invoke Claritas and attach result to class.
|
||||
await this.invokeClaritas(moduleCandidates)
|
||||
|
||||
// Process Modules
|
||||
for(const candidate of moduleCandidates) {
|
||||
|
||||
Reference in New Issue
Block a user