initial: packwiz → simple-mod-sync manifest converter

Reads packwiz pack (pack.toml + index.toml + per-file .pw.toml) and
emits a simple-mod-sync sync_version=3 manifest. Drops server-only
mods, skips CurseForge metadata-mode entries with a warning, maps
content type from the parent directory of each metafile.

Optional --bundle-non-mods zips config/, options.txt etc into one
archive served as a 'packed' entry — covers the gap where simple-mod-sync
only ships zip-extractable content for non-mods.

15 tests, includes integration against upstream packwiz-example-pack.
This commit is contained in:
2026-06-02 11:44:20 +02:00
commit 8651b076d3
15 changed files with 708 additions and 0 deletions
@@ -0,0 +1,2 @@
voice_chat_volume=0.8
microphone_amplification=1.0
+39
View File
@@ -0,0 +1,39 @@
hash-format = "sha256"
[[files]]
file = "mods/sodium.pw.toml"
hash = "0000000000000000000000000000000000000000000000000000000000000000"
metafile = true
[[files]]
file = "mods/fabric-api.pw.toml"
hash = "0000000000000000000000000000000000000000000000000000000000000000"
metafile = true
[[files]]
file = "mods/server-side-tool.pw.toml"
hash = "0000000000000000000000000000000000000000000000000000000000000000"
metafile = true
[[files]]
file = "mods/cf-only-mod.pw.toml"
hash = "0000000000000000000000000000000000000000000000000000000000000000"
metafile = true
[[files]]
file = "resourcepacks/branding.pw.toml"
hash = "0000000000000000000000000000000000000000000000000000000000000000"
metafile = true
[[files]]
file = "shaderpacks/iris.pw.toml"
hash = "0000000000000000000000000000000000000000000000000000000000000000"
metafile = true
[[files]]
file = "config/voicechat-client.properties"
hash = "1111111111111111111111111111111111111111111111111111111111111111"
[[files]]
file = "options.txt"
hash = "2222222222222222222222222222222222222222222222222222222222222222"
@@ -0,0 +1,13 @@
name = "CF Only Mod"
filename = "cfmod-1.0.jar"
side = "both"
[download]
hash-format = "murmur2"
hash = "1234567"
mode = "metadata:curseforge"
[update]
[update.curseforge]
project-id = 12345
file-id = 67890
@@ -0,0 +1,8 @@
name = "Fabric API"
filename = "fabric-api-0.110.5+1.21.1.jar"
side = "both"
[download]
url = "https://cdn.modrinth.com/data/P7dR8mSH/versions/4OZL6q6h/fabric-api-0.110.5%2B1.21.1.jar"
hash-format = "sha1"
hash = "1234560000000000000000000000000000000000"
@@ -0,0 +1,8 @@
name = "Server Side Tool"
filename = "spark-1.10.55-fabric.jar"
side = "server"
[download]
url = "https://example.com/spark.jar"
hash-format = "sha1"
hash = "9999990000000000000000000000000000000000"
+13
View File
@@ -0,0 +1,13 @@
name = "Sodium"
filename = "sodium-fabric-0.6.5+mc1.21.1.jar"
side = "client"
[download]
url = "https://cdn.modrinth.com/data/AANobbMI/versions/EoNKHoLH/sodium-fabric-0.6.5%2Bmc1.21.1.jar"
hash-format = "sha1"
hash = "abcdef0000000000000000000000000000000000"
[update]
[update.modrinth]
mod-id = "AANobbMI"
version = "EoNKHoLH"
+2
View File
@@ -0,0 +1,2 @@
fov:90
renderDistance:12
+13
View File
@@ -0,0 +1,13 @@
name = "Test Pack"
author = "tester"
version = "0.1.0"
pack-format = "packwiz:1.1.0"
[index]
file = "index.toml"
hash-format = "sha256"
hash = "0000000000000000000000000000000000000000000000000000000000000000"
[versions]
minecraft = "1.21.1"
fabric = "0.16.5"
@@ -0,0 +1,8 @@
name = "Server Branding"
filename = "automc-branding-0.3.zip"
side = "client"
[download]
url = "https://example.com/automc-branding-0.3.zip"
hash-format = "sha256"
hash = "aaaa000000000000000000000000000000000000000000000000000000000000"
@@ -0,0 +1,8 @@
name = "Complementary Shaders"
filename = "complementary-r5.5.zip"
side = "client"
[download]
url = "https://example.com/complementary-r5.5.zip"
hash-format = "sha256"
hash = "bbbb000000000000000000000000000000000000000000000000000000000000"