86 Commits

Author SHA1 Message Date
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
Sasha Sorokin
f41235b04c
Fix ignore file inconsistencies (#88)
* Fix ignore file inconsistencies

.packwizignore is supposed to work like .gitignore, yet it fails
miserably at doing so, being able to ignore only global patterns like
*.zip, and failing at patterns like /*.zip.

This commit introduces two changes to fix the issue:

- First, it uses a more up-to-date library. denormal/go-gitignore has
  not been updated since 2018 and has long open issues and pull
  requests, one of which tries to address leading slash ignoring, a-la
  /*.zip. denormal account seems to be abandoned since around the same
  year, so it makes sense to find a new library that does roughly the
  same thing.

  Gladly so, there's actually a library by sabhiram that shares the same
  name (but not the package name itself - which is just ignore - so it
  probably requires aliasing when importing).

- Secondly, it checks relative paths against ignore file instead of the
  absolute ones, which makes it possible to use leading slash (and
  probably some other features) with the new library.

From personal tests, it seems to address most - if not all - of the
inconsistencies. However, since it's a different library more throughout
testing probably wouldn't hurt to make sure it didn't break anything.

* Move dependency to main block
2022-01-23 21:05:34 +00:00
comp500
ce49820ef5 Add description field for Modrinth exports 2021-12-28 22:29:35 +00:00
comp500
60c08b93f3 Implement Modrinth pack exporting (fixes #34) 2021-12-28 22:03:22 +00:00
comp500
96a2d5fdf6 Update loader/mc versions from imported CF packs (fixes #70)
also refactored internal modloader handling!
2021-11-22 14:44:08 +00:00
comp500
b628e2762c Switch to better semver library and add pack-format field 2021-10-12 18:51:02 +01:00
comp500
a8bf26cc26 Remove unused Client/Server fields 2021-10-11 21:09:55 +01:00
comp500
c89aeed576 Remove unnecessary filepath.Rel (Ignore calls Abs anyway) 2021-09-19 14:31:19 +01:00
comp500
896b9548de Fabric filtering and native export for CurseForge 2021-06-15 03:09:49 +01:00
comp500
76460c5414 Remove pack-root, fix serve command (fixes #39)
index.toml is now the pack root - if you want to replicate
what the pack-root option would have provided, just move
your index.toml (and update the path in pack.toml)
2021-06-13 19:15:33 +01:00
comp500
8cbe7d4c61 Add pack-root option (fixes #27) 2021-06-04 02:10:29 +01:00
comp500
49d7b26b2e Add no-internal-hashes mode 2021-05-04 19:56:56 +01:00
comp500
7bedd820c2 Add option to specify additional game versions (closes #25) 2021-05-04 19:07:29 +01:00
comp500
b5757fa63a Fix loader game version prefix stripping in init command 2021-03-14 14:08:09 +00:00
TheEpicBlock
b5b9fd6810
Modrinth Support (#11)
Co-authored-by: comp500 <comp500@users.noreply.github.com>
2021-02-16 16:34:52 +00:00
AppleTheGolden
f2c6b89932
Lowercase hashes before comparing them (#10) 2021-01-13 19:00:04 +00:00
comp500
b8887e6704 Don't serialise empty author/version fields in pack.toml 2021-01-08 01:17:27 +00:00
comp500
877c7d1b02 Add Jumploader to Fabric packs for CurseForge automatically (fixes #5) 2020-11-28 18:10:00 +00:00
ThetaDev
a87f7b50f0
Added author + pack version (#6)
* Added author + pack version

* Remove unnecessary binary

* Apply suggestions, clean up somewhat

Co-authored-by: comp500 <comp500@users.noreply.github.com>
2020-11-28 17:10:29 +00:00
Draylar
c5328ee788
Update core/mod.go
Co-authored-by: comp500 <comp500@users.noreply.github.com>
2020-10-20 11:40:11 -05:00
Draylar
aaf6ae77ac no -> not 2020-10-19 17:31:05 -05:00
Draylar
1a21eca3a2 Remove special casing for casing differences, clarify error message 2020-10-19 17:29:54 -05:00
Draylar
0656d794e1 Add newlines after prints 2020-10-19 17:24:49 -05:00
Draylar
463848eaa0 Print error when a file hash only matches when uppercase 2020-10-19 17:20:07 -05:00
Draylar
ca20d88093 Clarify hash mismatch error in mod.go and also check with uppercase hash 2020-10-19 16:57:52 -05:00