286 Commits

Author SHA1 Message Date
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
comp500
d25817273b Fix Modrinth URL version number precedence (oldest-first) 2023-05-21 16:35:26 +01:00
comp500
21876cba1e Fix CurseForge file loader/ID comparison
(unsigned arithmetic moment)
2023-04-26 03:17:29 +01:00
comp500
7de26ec5c3 Allow "updating" CurseForge files to older versions 2023-04-15 02:23:52 +01:00
comp500
e966eaffc0 Manually replace FLK deps with QKL when using Quilt >=1.19.2 (fixes #212) 2023-04-13 17:12:44 +01:00
comp500
bd71ad5679 Manually replace FAPI deps with QFAPI/QSL when using Quilt (fixes #212) 2023-04-13 16:45:10 +01:00
comp500
bfe570a6a2 Allow mc-version-prefixed Forge version in init command 2023-04-13 02:39:21 +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
06f9204cd4 Fix Quilt+Fabric files from Modrinth being preferred over Fabric (fixes #208) 2023-04-12 23:24:34 +01:00
Matt Artist
a344ba11ba
Add a command for changing the acceptable versions (#206)
* feat: add packwiz settings command to allow for changing acceptable versions

* Add deduping on the list

* Fix typo in comment

* Detect out of order list and give the user an option to correct it

* Support adding and removing specific versions

* Ensure the options aren't nil

* Clean up the slice removal boilerplate

* Fix usage of slices.Delete
2023-04-08 19:00:40 +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
comp500
8d50b97356 Fix Modrinth searches taking the first argument as a slug 2023-03-16 13:42:20 +00:00
comp500
433218e3cf Make most Modrinth dep errors non-fatal, improve err message (fixes #201) 2023-03-15 02:41:46 +00:00
Matt Artist
1786e47806
fix: convert download hashes to lower before compare (#199) 2023-03-11 18:21:21 +00:00
comp500
abf701560d Fix crash creating Modrinth packs with multiple files from the same CF project (fixes #197) 2023-03-11 00:09:26 +00:00
comp500
aeae76a569 Linter fixes (error handling, unused constants, raw strings) 2023-03-10 17:06:48 +00:00
comp500
da04eb7f13 Regression fix: filter Modrinth search results by game versions 2023-03-10 16:47:18 +00:00
comp500
58bb2ae4cf Fix GoReleaser CI versions 2023-03-10 16:43:49 +00:00
comp500
b2c1c39cb0 Update Nix flake to use Go 1.19 2023-03-10 16:42:08 +00:00
comp500
773944729f Update CI Go/GoReleaser versions, Go version in README 2023-03-10 16:40:50 +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
00fcaaade3 Tweak goreleaser config 2023-02-18 01:44:32 +00:00
comp500
4b336e46e2 Prefer Quilt files to Fabric files from CurseForge (fixes #128) 2023-02-18 00:14:44 +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
d667447a88 Compare Modrinth versions by release date, warn if inconsistent with version numbers 2023-02-14 12:16:24 +00:00
comp500
074e68f9b0 Exclude .DS_Store folder in default packwizignore 2023-02-12 22:27:50 +00:00
comp500
0598b07b9c Fix DisableAutoGenTag usage 2023-02-04 15:55:00 +00:00
Matt Artist
00c142c6ca
Add Curseforge's beta site to regex (#190) 2023-01-28 20:11:29 +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
eee067964a chore: update packwiz vendorSha256 2023-01-20 17:57:36 +00:00
comp500
d9db25afdb Update dependencies 2023-01-20 17:38:48 +00:00
comp500
945a608112 Modrinth: add support for Canvas shaders 2023-01-20 17:13:40 +00:00
comp500
b258d64520 chore: update packwiz vendorSha256 2023-01-20 06:46:27 +00:00
comp500
44f562927c Change datapack-path to datapack-folder 2023-01-20 06:45:19 +00:00
comp500
d498b13f3d chore: update packwiz vendorSha256 2023-01-20 05:41:02 +00:00
comp500
d57140c33a Modrinth: version number resolution (fixes #103) 2023-01-20 05:39:36 +00:00
comp500
c596179c5c Modrinth: fix loader folder lookup 2023-01-20 04:54:31 +00:00
comp500
66bf34c1c2 Modrinth: rename url categories list to be clearer 2023-01-20 04:53:23 +00:00
comp500
f3963ec169 Modrinth: detect default meta-folder, prefer mods to datapacks
Requires specifying datapack-path option to install datapacks (as the location varies between datapack loader mods)
2023-01-20 04:51:04 +00:00
comp500
94a74676c8 CurseForge: remove invalid comment 2023-01-17 04:53:39 +00:00
comp500
8937960d52 Modrinth: Parse non-mod and CDN URLs, bring more in line with CF impl 2023-01-17 04:51:47 +00:00
comp500
a25a651748 Remove duplicate (default "") in flag desc (fixes #172) 2022-12-13 13:27:50 +00:00
comp500
791bfcc30f Force-disable no-internal-hashes mode when serving (fixes #166) 2022-11-28 05:21:10 +00:00
comp500
dcea50a67b chore: update packwiz vendorSha256 2022-11-20 01:18:08 +00:00
comp500
ef757559f9 Fix nix branch 2022-11-20 01:16:49 +00:00