110 Commits

Author SHA1 Message Date
TheEpicBlock
0626c00149
Fix neoforge versions (#319)
* Fix neoforge versions

* Parse NeoForge versions for supported minecraft versions

* Fix fetching NeoForge 1.20.1 versions
2024-10-14 17:49:53 +01:00
comp500
a0c4aadba0 Merge branch 'main' into pr/unilock/230 2024-08-28 18:25:44 +01:00
Tricked
07033023af feat: begin github support 2024-04-15 14:48:55 -04:00
comp500
bee8e601d4 Clean up empty entries in index (not sure why they can exist?) 2023-10-14 14:45:28 +01:00
comp500
9496ad3a7b Pass through warnings from UpdateIndex, don't fetch sha256 if we already have it 2023-10-08 14:53:07 +01:00
comp500
4c23e264b0 Clean up code, filter version numbers for NeoForge as well as Forge
NeoForge doesn't seem to have an update checker JSON yet, so we can't determine
the recommended version
2023-07-30 15:09:18 +01:00
comp500
234f927be9 Support NeoForge as a loader (compatible with Forge mods)
TODO: implement support in migrate command
2023-07-30 14:56:11 +01:00
joeyak
dffdbc9b80
Add pin and unpin commands/updated update command to work with pin & unpin (#234)
* Add pin and unpin commands/updated update command to work with pin & unpin

* Inline cobra functions
2023-06-25 01:38:03 +01:00
comp500
0df199852f Attempt to redownload cached files when errors are found 2023-06-23 19:45:44 +01:00
comp500
dd5520e471 Fix cache errors from files with same length/murmur2 fingerprint 2023-06-23 19:00:35 +01:00
comp500
4fb1f1b59d Index fixes and performance improvements (fixes #223, #224)
- Fixed creation of duplicate index entries when importing from CurseForge (fixes #224)
- Automatically remove duplicates in index
- Fixed `packwiz serve` with a custom `--pack-root` argument (fixes #223)
- Fixed `packwiz serve` with a custom index.toml location
- Cleaned up internal serving code, added comments and better errors
- Refactored path handling code
- Improved refreshing/exporting performance
- Factored out duplicated exporting logic
- Replaced GetAllMods calls with cleaner LoadAllMods calls and made the former private
- Improved variable names in update command
- Improved handling of aliassed files
- Changed CheckUpdate to take references to metadata
- Removed the ability to use an absolute path to the index file (that probably didn't work anyway)
- Behaviour change: order of entries in exported files may be random
2023-05-29 23:15:55 +01:00
Matt Artist
539be71d11
Add migrate command (#207)
* Add base and loader command

* Support updating to latest

* Support explicit fabric versions

* Support explicit Forge version

* Support quilt

* Add support for updating Minecraft

* Add support for Forge recommended

* Fix Forge version sorting

* Various fixes

* Add documentation to the use

* More suggestions
2023-04-13 02:23:37 +01:00
comp500
9bddd21d32 Prevent the pack root directory from being packwizignored 2023-03-25 13:37:25 +00:00
comp500
9fc9ee5e09 Fix O(n^2) path lookup using a binary search 2023-03-24 02:37:45 +00:00
comp500
d79556259b Improve directory traversal performance 2023-03-24 02:18:13 +00:00
comp500
fa5460a187 Normalise paths to ensure they are compared properly 2023-03-24 01:31:10 +00:00
comp500
37cc68a9f7 Significantly improve refreshing performance
Looping through every file on every file update *and* cleaning + fromslash is sloww with many files
(ideally, we'd have a map to look up the file, but this is already significantly faster)
2023-03-24 01:00:05 +00:00
Matt Artist
1786e47806
fix: convert download hashes to lower before compare (#199) 2023-03-11 18:21:21 +00:00
comp500
aeae76a569 Linter fixes (error handling, unused constants, raw strings) 2023-03-10 17:06:48 +00:00
comp500
42d8370d0c Latest version fixes: correctly order preferences (fixes #198)
Both CurseForge and Modrinth preferences were not being done in a specific order - so
a file with a newer Minecraft version would not necessarily take priority over a file
with a more preferred loader (e.g. Quilt over Fabric) or a file with a newer release
date / CurseForge ID.
Also fixed a loop variable reference in the CurseForge loop, which caused eagerly resolved
(included in API response) file info to be inconsistent with the chosen version, and
added filtering for duplicate values in the acceptable-game-versions/primary version list
to ensure game versions are always compared properly (so the same index == same version).
2023-03-10 16:35:34 +00:00
comp500
d38d279d98 Prefer game versions according to acceptable versions list (fixes #181)
The acceptable versions list should now be specified in order of preference, where the last version is the most preferable Minecraft version
2023-02-14 16:10:06 +00:00
comp500
074e68f9b0 Exclude .DS_Store folder in default packwizignore 2023-02-12 22:27:50 +00:00
comp500
672d22d0dd Fix deprecated uses of ioutil 2023-01-20 18:43:46 +00:00
comp500
79d3ed3957 Reword "mod"/"addon"/"install" to clearer terms across all commands (fixes #138) 2023-01-20 18:39:23 +00:00
comp500
6160c2ac01 Use FlexVer to get largest loader version (fixes Forge default version in init) 2022-11-19 20:25:38 +00:00
comp500
4f6528dcb5 Fix Modrinth exports of external files with omitted side field 2022-10-30 04:52:09 +00:00
Tricked
c7c2ca786b
feat: add command for arbitrary URLs (#137)
* feat: install command for direct downloads

* use sha1 instead of sha256

* apply suggestions

* feat: parse urls instead of using hasprefix

* stop by default and add force flag

* Implement various fixes and improvements

Co-authored-by: Tricked <72335827+SkyBlockDev@users.noreply.github.com>
Co-authored-by: comp500 <comp500@users.noreply.github.com>
2022-08-27 00:08:25 +01:00
comp500
044c34e07c Move to go-modrinth lib (v2 API) and always supply UA in HTTP requests 2022-08-02 02:53:31 +01:00
comp500
1ed323e6c6 Fix HTTP link in liteloader maven listing 2022-07-19 03:17:54 +01:00
comp500
0d8c1762a3 Handle uppercase hashes properly (case-fold compare or normalise to lowercase) 2022-06-20 16:59:06 +01:00
Morgane Austreelis
d051932bbb
Add --cache flag to export commands (#133)
This option allow overriding the cache directory

An 'cache.directory' entry has also been added in the config
2022-06-09 00:36:24 +01:00
comp500
f533e677ca Merge duplicate getLoaders methods into single core method 2022-06-08 22:34:50 +01:00
comp500
72fbc68256 Omit mode when empty (equivalent to mode "url") 2022-06-07 03:23:41 +01:00
comp500
bf2f060efc Fix lookup of old .toml files 2022-05-21 14:29:59 +01:00
comp500
fc3b5ff8ea Bump current pack format version number and auto-migrate loaded packs 2022-05-21 05:05:08 +01:00
comp500
dae133b73c Completed download implementation for Modrinth export 2022-05-21 05:00:21 +01:00
comp500
f3837af145 Completed download implementation for CF export
Added support for importing manual files and rehashing where necessary
Moved cache folder to "local" user folder
Cleaned up messages, saved index after importing
2022-05-21 03:40:00 +01:00
comp500
55f0e4a297 WIP: misc fixes, start updating CF/MR export to use download system 2022-05-20 18:13:43 +01:00
comp500
e73fa8c48a Continued work on download system (cache + cf meta now implemented) 2022-05-18 22:11:28 +01:00
comp500
30bc6d81bb WIP caching system for Modrinth/CurseForge pack export 2022-05-18 16:02:40 +01:00
comp500
3a6109c1f9 Merge branch 'master' into wip/new-curseforge-api 2022-05-17 01:07:04 +01:00
comp500
0f3096e251 Use the correct directories for non-mod files; use .pw.toml extension
The mods-folder option is now replaced with two new options: meta-folder and meta-folder-base
This allows non-mod files to use the correct directory based on their category; with correct
import of resource packs/etc from CurseForge packs, and the ability to override this behaviour.
To improve the reliability of packwiz metadata file marking (in the index), new files now use .pw.toml
as the extension - any extension can be used, but .pw.toml will now be automatically be
marked as a metafile regardless of folder, so you can easily move metadata files around.
Existing metadata files will still work (as metafile = true is set in the index); though in
the future .pw.toml may be required.
2022-05-16 21:06:10 +01:00
comp500
2073e4475e Support Modrinth modpack fileSize field and sha512 hash 2022-05-16 01:15:12 +01:00
comp500
5a48ddeb66 Create local store functions 2022-05-14 19:38:32 +01:00
comp500
f1eb34d444 Quilt support 2022-04-20 20:58:49 +01:00
comp500
3fb350f244 Pass through optional-disabled on CF import (fixes #93) 2022-03-07 18:22:29 +00:00
comp500
07c0af7bcb Add packwiz binaries to default ignores (fixes #37) 2022-02-14 20:09:55 +00:00
comp500
f1716faa72 Fix URL re-encoding for square brackets 2022-02-14 18:47:03 +00:00
comp500
36b6d806c8 Re-encode URLs from CF and when exporting to MR for RFC3986 compliance 2022-02-14 15:48:54 +00:00
comp500
fa5de4b4bc Add default .packwizignore contents (fixes #3) 2022-02-10 16:47:38 +00:00