The resolution logic was reworked so that Claritas only needs to be invoked once per supported type, ie only once for ForgeMod and LiteMod resolutions per server. The resolver now uses identifies module candidates and collects them. Claritas is invoked and the resulting metadata is stored. The module resolution then proceeds with all of this data available. Toggleable module logic was also reworked to first accumulate all candidates and then process. This required the resolution function to optionally take a preprocess and postprocess callback to perform the necessary cleanup and transformations. The minor rework was necessary because spawning child process is expensive, and we should only do it as often as we must to keep the application performant. Claritas resolution also supports exceptions defined by the structure class. This is to facilitate handling of special cases (ex. Optifine).
26 lines
419 B
TypeScript
26 lines
419 B
TypeScript
export interface ClaritasModuleMetadata {
|
|
|
|
/**
|
|
* Present on ForgeMods
|
|
*/
|
|
id?: string
|
|
/**
|
|
* Always Present
|
|
*/
|
|
group: string
|
|
/**
|
|
* Possibly present on ForgeMods 1.12-
|
|
*/
|
|
version?: string
|
|
/**
|
|
* Possibly present on ForgeMods 1.12-
|
|
*/
|
|
name?: string
|
|
|
|
}
|
|
|
|
export interface ClaritasResult {
|
|
|
|
[jarPath: string]: ClaritasModuleMetadata | undefined
|
|
|
|
} |