[java/curseforge] Install script fixes and enhancements#131
Open
vrrdnt wants to merge 5 commits into
Open
Conversation
Author
|
Is anyone available to give this a review? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes three install-script bugs in the CurseForge generic egg, plus one variable default cleanup.
May resolve:
#121
#127
Commits:
[java/curseforge] Fix null/zero serverPackFileId crash on latest install -- Resolves [Install Bug]: Curseforge Generic #121. Adds
select(. != null and . != 0)guards in twojqexpressions so they stop emitting the literal strings"null"/"0"when CurseForge returns those forserverPackFileId.[java/curseforge] Extract download URL resolution into a helper -- Pure refactor. Consolidates three duplicated
/v1/mods/{pid}/files/{fid}/download-urlfetches into onecf_resolve_download_urlhelper. Same endpoint, auth, parsing, and empty-on-failure behavior.[java/curseforge] Surface clear error when API distribution is disabled -- When a project has
allowModDistribution: false,/download-urlreturns 403 with no body. Replace the opaque "No download url found" message at all three call sites with a prominent block that names the cause (author has opted out of API distribution) and tells the user to download the pack manually. Forjson_download_mods, retain the existingcontinuebehavior but warn loudly that the install will be incomplete. The egg deliberately does not bypass the flag by constructingedge.forgecdn.netURLs fromfileId/fileName, as doing so would ignore the author's wishes and risk API key revocation.[java/curseforge] Default modpack File ID to blank -- Variable default change only. The script already treats
""and"latest"identically (both fall back tomainFileId); drop the magic-string default so users get newest-version behavior by leaving the field blank.[java/curseforge] Mirror fixes to pterodactyl egg variant -- The install script between the pelican egg and pterodactyl egg are identical, so the fixes were copied over to the pelican variant's install script.
Tested locally against a real Pelican panel install with several modpacks, including one with
allowModDistribution: false(COBBLEVERSE - Pokemon Adventure [Cobblemon], project 1210677) to verify the new error path is reached and the message displays cleanly.Checklist for all submissions
Have you followed the guidelines in our Contributing document?
Have you checked to ensure there aren't other open Pull Requests for the same update/change?
Have you tested and reviewed your changes with confidence that everything works?
Did you branch your changes and PR from that branch and not from your master branch?
You verify that the start command applied does not use a shell script
The egg was exported from the panel