Commit Graph
100 Commits
Author SHA1 Message Date
Daniel Scalzi 6b2d9edf26 Add command to generate server from CurseForge modpack. 2023-03-18 17:26:35 -04:00
Daniel Scalzi 71c2e9baa0 Fix git casing, esm bug. 2023-03-18 16:56:10 -04:00
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 82967469e9 Node 18. 2023-02-12 19:11:46 -05:00
Daniel Scalzi f9041a6dfc Log which file caused zip analysis failure, upgrade claritas. 2023-02-04 18:03:30 -05:00
Daniel Scalzi 530d47539b Fail with a more useful error message if the forge installer was not run correctly. 2023-01-16 21:46:09 -05:00
Daniel Scalzi 4aeb570541 Dependency upgrade. 2023-01-15 11:25:21 -05:00
Daniel Scalzi 50fc6a97a4 Fix version comparison logic. 2023-01-03 19:46:31 -05:00
Daniel Scalzi 41a4e7fdcb Dependency upgrade. 2022-12-26 15:13:36 -05:00
Daniel ScalziandMatt Artist 5111e29512 1.17+ Support / Java Settings by Instance (#50)
* Initial 1.17 configuration, dep upgrade.

* Enable 1.18 for initial tests.

* Add lowcodelanguage for 1.18 (#49)

* Set classpath flag for 1.17+ generated files. Enable 1.19 (not yet working).

* Support 1.19.

Co-authored-by: Matt Artist <me@mja00.dev>
2022-11-27 18:01:48 -05:00
Daniel Scalzi ad6db8c3d3 Dependency upgrade. 2022-07-29 11:56:45 -04:00
Daniel Scalzi 8c224e3e39 Dependency upgrade. 2022-04-03 16:02:49 -04:00
Daniel Scalzi 77a118125b Update dependencies. 2022-03-25 15:15:22 -04:00
Daniel Scalzi c044535091 Dependency upgrade. 2022-02-11 16:20:17 -05:00
Daniel Scalzi 2f143d74a7 Drop support for LiteLoader.
Liteloader is obsolete and abandoned. It is not worth the hassle of maintenance.
2022-02-04 19:17:17 -05:00
Daniel Scalzi f70c7b6802 Update Claritas - Do not fail when mod's entrypoint is in the default package.
Resolves https://github.com/dscalzi/Nebula/issues/41
2022-01-23 13:54:34 -05:00
Daniel Scalzi 7f71b97526 Lift security warning for 1.7-1.11 as per Forge guidance. 2022-01-21 17:02:45 -05:00
Daniel Scalzi 2e977e1e2d Add fs alias for faststart, dependency upgrade. 2022-01-21 16:00:43 -05:00
Daniel Scalzi 640f3f0507 Add security warning. 2021-12-10 16:11:39 -05:00
Daniel Scalzi e97ac9bfad Upgrade to Node.js 16. 2021-10-31 02:38:16 -04:00
Daniel Scalzi b0f0f02cf9 Update Java executable example in README due to AdoptOpenJDK name change. 2021-10-13 13:42:23 -04:00
Daniel Scalzi 5b0b9fb4fe Fix claritas failure with module-info.
Resolves https://github.com/dscalzi/Nebula/issues/35
2021-09-30 12:07:36 -04:00
Daniel Scalzi 62695ce996 Full upgrade. 2021-09-28 21:34:04 -04:00
Daniel Scalzi f612e0e89f Fix upgrade bug. 2021-09-28 21:28:19 -04:00
Daniel Scalzi 3656bf52e4 Dependency upgrade. 2021-09-28 21:26:54 -04:00
Daniel Scalzi aeda32cf02 Update claritas. 2021-09-28 21:22:04 -04:00
Daniel Scalzi 57c376e78c Add note about Java 16. 2021-06-30 20:15:21 -04:00
Daniel Scalzi 70bc6b8d5e Upgrade dependencies and java libs. 2021-06-24 18:21:02 -04:00
Daniel Scalzi b1196dbb3e Dependency upgrade. 2021-06-11 22:47:44 -04:00
Daniel Scalzi bc3367af28 Dep upgrade. 2021-04-27 20:05:40 -04:00
Daniel Scalzi 362bbc1d83 Ignore .gitkeep, remove deprecated url.resolve(), update dependencies (resolves #25). 2021-04-06 17:34:06 -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 2540ca383e Update deps, enforce return type. 2021-03-20 15:07:15 -04:00
Daniel Scalzi 07ea0e8b98 Update dependencies. 2021-03-07 10:51:51 -05:00
Daniel Scalzi 5c9e44db91 Alias to run the project without building. Dependency upgrade. 2021-02-19 17:41:36 -05:00
Daniel Scalzi 9ead2ca219 Support Typescript 4.1, dependency upgrade. 2020-11-28 15:23:42 -05:00
Daniel Scalzi 0d46a529fc Node 14, dependency upgrade.
Node 14 is now LTS, so we'll use that.
2020-11-01 17:22:53 -05:00
Daniel Scalzi 28cb5a3d52 Dependency upgrade, replace moment with luxon. 2020-10-14 23:21:20 -04:00
Daniel Scalzi b6cb191aca Update Claritas, dependencies. 2020-10-01 21:30:39 -04:00
Daniel Scalzi 42e47f4748 Add JSON schemas for DistroMeta and ServerMeta.
JSON schemas are used by editors to validate data and provide useful insights.
The JSON schemas will be generated by the init root command. They can also be generated
using the generate schemas command.

The JSON files will reference the schemas on the user's local disk rather than hosted versions.
This allows offline editing and ensures that the schema is exactly one-to-one with the local
version of Nebula.

Existing servers will have to manually add the schema property. To see how to do this, generate
a new server and copy the $\schema value.
The schema property will need to be added to any existing distrometa files. This is the same
format as the server meta, just replace ServerMeta with DistroMeta.

More information, including sample files with json schemas, is provided
on the README.
2020-09-13 01:06:50 -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 cd7b4d8abc Tweak logging levels. 2020-09-07 17:08:37 -04:00
Daniel Scalzi 7c099f749d Claritas now reports MOD, CORE_MOD, TWEAKER, or UNKNOWN for ForgeMods 1.12-. 2020-09-05 18:52:44 -04:00
Daniel Scalzi 59d3744f56 Sort forgemods by file name to control load order. 2020-09-05 00:01:36 -04:00
Daniel Scalzi d2e317b4df Replace axios with got, check for empty version in forgemod meta. 2020-09-04 23:29:36 -04:00
Daniel Scalzi f287388931 Pass arguments to Claritas via an argFile to bypass cli length limits. (#16) 2020-08-02 16:01:04 -04:00
Daniel Scalzi 0e83a071d7 Update claritas integration to support large result sets.
The output is now pulled from a json file.
2020-07-18 00:41:46 -04:00
Daniel Scalzi 0ac31e5eb7 Move claritas invocation to separate function, clean versions in Claritas. 2020-07-16 20:26:22 -04:00
Daniel Scalzi ea23912a85 Compensate for lack of mod id in litemod claritas resolution.
More tweaks to Claritas.
2020-07-16 20:26:22 -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 7620971c99 Fix minor typo. 2020-07-06 01:29:13 -04:00
Daniel Scalzi 8e611175ca Add support for optional vs required modules.
Directories representing toggleable modules are now segemented into three subdirectories.

* `required` Modules that are required.
* `optionalon` Modules that are optional and enabled by default.
* `optionaloff` Modules that are optional and disabled by default.

Filter your files into these three directories. Files at the root directory will no longer be processed. Currently, forgemods and litemods are the only toggleable modules.

For existing servers, just manually create these directories and move your files inside either of them. Generating a new server will automatically create them.
2020-07-05 13:51:49 -04:00
Daniel Scalzi bac2480c1b Add option to install a generated distro to the local Helios data folder
* Run g distro with --installLocal to have the generated file be copied into the local helios data folder.
* New property required in the .env, HELIOS_DATA_FOLDER
* Added two launch configurations to vs code.
2020-06-29 18:07:46 -04:00
Daniel Scalzi c470c22f14 Update FG3 resolver for latest 1.16.1 changes. 2020-06-29 10:17:05 -04:00
Daniel Scalzi 0a9c82434b Enable 1.16 support (resolves #13). 2020-06-25 18:53:10 -04:00
Daniel Scalzi 6626cc1c02 Use inferred value if modid is null/empty. 2020-06-13 01:22:49 -04:00
Daniel Scalzi bf8e420bbd Fix error caused by undefined versions, error propagation in zip processor. 2020-06-13 00:56:51 -04:00
Daniel Scalzi 2f679411b9 Fix OptiFine resolution for 1.13+. 2020-06-13 00:31:47 -04:00
Daniel Scalzi ceb23f11a5 Attempt to perform a metadata inference on file names to account for mod author neglect. 2020-06-13 00:10:20 -04:00
Daniel Scalzi a6b6ed9db3 Add distrometa.json for storing distribution wide metadata.
The distrometa.json file is stored at {ROOT}/meta/distrometa.json.
You can generate it by rereunning the init root command.
It behaves exactly the same as the servermeta.json file.
2020-06-10 11:09:49 -04:00
Daniel Scalzi 97ffb9c44b Add more properties to servermeta.json
This file will have to be regenerated for existing servers.
2020-06-04 20:25:50 -04:00
Daniel Scalzi 151ad481ad Update README.md. 2020-06-04 19:13:51 -04:00
Daniel Scalzi 2d8e5d16e7 Update fs-extra. 2020-06-04 17:51:57 -04:00
Daniel Scalzi d627ce72a3 Replace AdmZip with node-stream-zip. 2020-06-02 23:07:59 -04:00
Daniel Scalzi 0b063e4bfc Added winston for logging. 2020-06-02 20:47:34 -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 6e94883f23 Ensure invalid checksums arent used. 2020-05-30 01:26:39 -04:00
Daniel Scalzi 407032df61 Fix download of forge libraries for older versions.
Added function to determine extension type by checking the forge server.
2020-05-30 01:19:19 -04:00
Daniel Scalzi 87e5299af6 Update eslint. 2020-05-29 22:35:45 -04:00
Daniel Scalzi 00842c9dff Wrap MinecraftVersion in its own object. 2020-05-29 22:15:56 -04:00
Daniel Scalzi 23a452f0b6 Use TypeMetadata for lib extension, listen to process error event. 2020-05-19 22:14:11 -04:00
Daniel Scalzi afcae366b5 Added basic library discovery.
Put all libraries into the libraries folder at the root of your server directory.
These will be added to the distribution as Library modules. Recall, Library modules
are added to the client's classpath at runtime.
2020-05-19 21:52:41 -04:00
Daniel Scalzi 43fb84f4a9 Fix vuln in eslint dependency. 2020-03-18 19:05:05 -04:00
Daniel Scalzi 00d8f6b12a Dependency Upgrade. 2020-03-16 21:00:57 -04:00
Daniel Scalzi ef4506a8fd Fix issue where client slim and extra are appended with -stable on 1.14.4. 2020-02-25 15:40:27 -05:00
Daniel Scalzi 4d7c8e2f9f Dependency upgrade. 2020-02-25 14:58:45 -05:00
Daniel Scalzi f99e53bed2 Default to 0.0.0 if 1.7-1.12 mod contains version wildcard.
This data likely lives only in the class file, which we cannot access.
2020-02-19 01:16:44 -05:00
Daniel Scalzi 126d6e67dc Dependency upgrade. 2020-02-19 01:06:11 -05:00
Daniel Scalzi 68ba25543b Fix url generation for recursive files. 2020-02-16 19:07:32 -05:00
Daniel Scalzi 80efeb268b Dependency upgrade. 2020-02-16 19:00:31 -05:00
Daniel Scalzi 54cc93d499 Implement recursive scan for File modules.
Ex. store resourcepacks at /files/resourcepacks/MyPack.zip
Added as a module with destination path resourcepacks/MyPack.zip
2020-02-02 17:30:53 -05: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 8911f54039 Automatic resolution of latest and recommended forge builds.
You can now use 'latest' or 'recommended' as the forge version option in the generate commands.
Two new commands are provided to query the latest/recommended version of forge.
2020-01-19 15:40:52 -05:00
Daniel Scalzi f7173c4f5c Infer version from MANIFEST.MF if mod uses version wildcard. 2020-01-19 14:23:44 -05:00
Daniel Scalzi ec30886cbb Client srg always required. 2020-01-19 13:21:28 -05:00
Daniel Scalzi 17e18c8c00 Include srg mappings as required library. (1.15 support). 2020-01-19 13:09:35 -05:00
Daniel Scalzi 2b0ba5ac07 Always tag client jar with forge artifact version.
This allows multiple versions of the same forge to be used.
Ex. Recommended 1.15 on prod, latest 1.15 on test.
Also fixed a bug with artifact classifier formatting.
2020-01-19 12:36:06 -05:00
Daniel Scalzi b5e2b3db1c Remove forge/liteloader specific repos.
Just put everything in the libraries repo.
2020-01-19 12:08:53 -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
Daniel Scalzi 4d342b7b0a Support for 1.13+ Forge Resolution.
Tested versions: 1.13.2
TODO: Test 1.14.4, 1.15.1
TODO: Read mod metadata from mods.toml in 1.13+
2020-01-19 10:58:02 -05:00
Daniel Scalzi e827dea7ff Create default metadata if mcmod.info is malformed. 2020-01-18 13:01:27 -05:00
Daniel Scalzi 083c878a2d Fix bug with artifact id resolution. 2020-01-18 12:08:33 -05:00
Daniel Scalzi aeef30e3c8 Initial work on 1.13 forge resolver, fixes.
Moved java executable to its own util class.
Fixed artifact resolution links for older versions of forge.

1.13 support is going to be difficult because forge does not
make anything developer friendly.
2020-01-18 10:50:28 -05:00
Daniel Scalzi b4bef1b258 Update docs.
Leaving root and baseURL docs for now incase I decide to keep that functionality.
2020-01-12 07:30:08 -05:00
Daniel Scalzi a236e8408e Forge and its submodules are now included in the generated distribution. 2020-01-12 07:15:21 -05:00
Daniel Scalzi 9e420db907 Propagate baseURL to resolved forge modules. 2020-01-12 06:20:23 -05:00
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
Daniel Scalzi 0674bd5808 Parse version manifest and download forge libraries.
TODO:
Integrate base url propagation.
Integrate PackXZExtract to calculate hashes  of jar.pack.xz files.
OR ammend the distribution spec to accept different hash algos (requires helioslauncher update).
2020-01-12 03:42:34 -05:00
Daniel Scalzi 419a4d5e91 Completed steps up to downloading forge universal jar for 1.8-1.12.
Next step is processing the version.json and transforming it into a deliverable module.
2020-01-12 01:36:36 -05:00