Commit Graph

9 Commits

Author SHA1 Message Date
Daniel Scalzi
b55b7af689 Convert project to ESM (#58)
* Convert to ESM, enforce file single naming convention.

* Update fs-extra esm usage.

* Fix minimatch import.

* fixes

* triple-beam issue is finally fixed.
2023-03-17 19:53:27 -04:00
Daniel Scalzi
3f90a22972 Add output caching for Forge 1.13+.
CHANGES
 - Forge installer is no longer stored to the work directory. It is now stored in a cache folder corresponding to the artifact version.
 - Installer output is now cached by default
 - Added options to generate distro.
   - --discardOutput Delete cached output after it is no longer required. May be useful if disk space is limited.
   - --invalidateCache Invalidate and delete existing caches as they are encountered. Requires fresh cache generation.
   - Both options are false by default.
 - To invalide a single version, manually delete the folder.
 - Old functionality is essentially g distro --discardOutput --invalidateCache.
2021-03-20 16:28:12 -04:00
Daniel Scalzi
24b0923903 Add support for untracked files.
Untracked file glob patterns are stored in the servermeta.json. See the README for detailed information.
2020-09-12 22:46:50 -04:00
Daniel Scalzi
1a19df0e93 Move struct out of model folder. 2020-09-12 20:14:18 -04:00
Daniel Scalzi
bda96eb24e First pass at Claritas implementation.
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).
2020-07-16 20:26:22 -04:00
Daniel Scalzi
672424b973 Add support for processing 1.12.2 Forge compiled with Forge Gradle 3 (#8).
Changed the resolver names to match the Forge Gradle versions, since that software version
determines the structure of the jar file and how it needs to be parsed.
Refactored the ForgeGradle3 resolver to conditionally execute the installer only when we
need artifacts generated by the installer. This allows the new 1.12.2 builds to be processed
without running the installer.
Changed the VersionSegemented interface to accept a libraryVersion, so we can segment within
a minecraft version.

This change is pending verification with Helios.
2020-06-02 17:16:15 -04:00
Daniel Scalzi
00842c9dff Wrap MinecraftVersion in its own object. 2020-05-29 22:15:56 -04:00
Daniel Scalzi
064a664687 Externalize spec typings, use eslint.
Tslint is deprecated, as such we have moved to eslint. Linted the project with more
stringent rules. The configuration will be changed as we figure out which rules we
should keep.
2020-01-26 01:01:07 -05:00
Daniel Scalzi
1ff02edc71 Add support for reading mods.toml file from 1.13+ forge mods. 2020-01-19 11:59:11 -05:00