diff --git a/.github/workflows/daedalus-docker.yml b/.github/workflows/daedalus-docker.yml new file mode 100644 index 000000000..4fc174b72 --- /dev/null +++ b/.github/workflows/daedalus-docker.yml @@ -0,0 +1,43 @@ +name: daedalus-docker-build + +on: + push: + branches: [ "main" ] + paths: + - .github/workflows/daedalus-docker.yml + - 'apps/daedalus/**' + pull_request: + types: [ opened, synchronize ] + paths: + - .github/workflows/daedalus-docker.yml + - 'apps/daedalus/**' + merge_group: + types: [ checks_requested ] + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Fetch docker metadata + id: docker_meta + uses: docker/metadata-action@v3 + with: + images: ghcr.io/modrinth/daedalus + - + name: Login to GitHub Images + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - + name: Build and push + id: docker_build + uses: docker/build-push-action@v2 + with: + file: ./apps/daedalus_client/Dockerfile + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.docker_meta.outputs.tags }} + labels: ${{ steps.docker_meta.outputs.labels }} diff --git a/.github/workflows/daedalus-run.yml b/.github/workflows/daedalus-run.yml new file mode 100644 index 000000000..dcdbd0496 --- /dev/null +++ b/.github/workflows/daedalus-run.yml @@ -0,0 +1,52 @@ +name: Run Meta + +on: + schedule: + - cron: '*/5 * * * *' + workflow_dispatch: + +jobs: + run-docker: + if: github.repository_owner == 'modrinth' + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Log in to GitHub Container Registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + + - name: Pull Docker image from GHCR + run: docker pull ghcr.io/modrinth/daedalus:main + + - name: Run Docker container + env: + BASE_URL: ${{ secrets.BASE_URL }} + S3_ACCESS_TOKEN: ${{ secrets.S3_ACCESS_TOKEN }} + S3_SECRET: ${{ secrets.S3_SECRET }} + S3_URL: ${{ secrets.S3_URL }} + S3_REGION: ${{ secrets.S3_REGION }} + S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} + CLOUDFLARE_INTEGRATION: ${{ secrets.CLOUDFLARE_INTEGRATION }} + CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }} + CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} + run: | + docker run \ + --name daedalus \ + -e RUST_LOG=warn,daedalus_client=trace \ + -e BASE_URL=$BASE_URL \ + -e S3_ACCESS_TOKEN=$S3_ACCESS_TOKEN \ + -e S3_SECRET=$S3_SECRET \ + -e S3_URL=$S3_URL \ + -e S3_REGION=$S3_REGION \ + -e S3_BUCKET_NAME=$S3_BUCKET_NAME \ + -e CLOUDFLARE_INTEGRATION=$CLOUDFLARE_INTEGRATION \ + -e CLOUDFLARE_TOKEN=$CLOUDFLARE_TOKEN \ + -e CLOUDFLARE_ZONE_ID=$CLOUDFLARE_ZONE_ID \ + ghcr.io/modrinth/daedalus:master diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 000000000..73f69e095 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml +# Editor-based HTTP Client requests +/httpRequests/ diff --git a/.idea/daedalus.iml b/.idea/daedalus.iml new file mode 100644 index 000000000..3d715289c --- /dev/null +++ b/.idea/daedalus.iml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/discord.xml b/.idea/discord.xml new file mode 100644 index 000000000..d8e956166 --- /dev/null +++ b/.idea/discord.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.idea/libraries/KotlinJavaRuntime.xml b/.idea/libraries/KotlinJavaRuntime.xml new file mode 100644 index 000000000..78d18789b --- /dev/null +++ b/.idea/libraries/KotlinJavaRuntime.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 000000000..c73594817 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 000000000..35eb1ddfb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index ddc5ad543..fe2d879aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9,12 +9,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f7b0a21988c1bf877cf4759ef5ddaac04c1c9fe808c9142ecb78ba97d97a28a" dependencies = [ "bitflags 2.6.0", - "bytes", + "bytes 1.7.2", "futures-core", "futures-sink", "memchr", "pin-project-lite", - "tokio", + "tokio 1.40.0", "tokio-util", "tracing", ] @@ -31,7 +31,7 @@ dependencies = [ "futures-util", "log", "once_cell", - "smallvec", + "smallvec 1.13.2", ] [[package]] @@ -45,7 +45,7 @@ dependencies = [ "actix-utils", "actix-web", "bitflags 2.6.0", - "bytes", + "bytes 1.7.2", "derive_more", "futures-core", "http-range", @@ -71,7 +71,7 @@ dependencies = [ "base64 0.22.1", "bitflags 2.6.0", "brotli", - "bytes", + "bytes 1.7.2", "bytestring", "derive_more", "encoding_rs", @@ -89,8 +89,8 @@ dependencies = [ "pin-project-lite", "rand 0.8.5", "sha1 0.10.6", - "smallvec", - "tokio", + "smallvec 1.13.2", + "tokio 1.40.0", "tokio-util", "tracing", "zstd 0.13.2", @@ -115,7 +115,7 @@ dependencies = [ "actix-multipart-derive", "actix-utils", "actix-web", - "bytes", + "bytes 1.7.2", "derive_more", "futures-core", "futures-util", @@ -129,7 +129,7 @@ dependencies = [ "serde_json", "serde_plain", "tempfile", - "tokio", + "tokio 1.40.0", ] [[package]] @@ -152,7 +152,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", - "cfg-if", + "cfg-if 1.0.0", "http 0.2.12", "regex", "regex-lite", @@ -168,7 +168,7 @@ checksum = "24eda4e2a6e042aa4e55ac438a2ae052d3b5da0ecf83d7411e1a368946925208" dependencies = [ "actix-macros", "futures-core", - "tokio", + "tokio 1.40.0", ] [[package]] @@ -184,7 +184,7 @@ dependencies = [ "futures-util", "mio 1.0.2", "socket2", - "tokio", + "tokio 1.40.0", "tracing", ] @@ -225,9 +225,9 @@ dependencies = [ "actix-utils", "actix-web-codegen", "ahash 0.8.11", - "bytes", + "bytes 1.7.2", "bytestring", - "cfg-if", + "cfg-if 1.0.0", "cookie", "derive_more", "encoding_rs", @@ -245,7 +245,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "smallvec", + "smallvec 1.13.2", "socket2", "time", "url", @@ -288,7 +288,7 @@ dependencies = [ "actix-http", "actix-web", "futures-core", - "tokio", + "tokio 1.40.0", ] [[package]] @@ -318,7 +318,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cipher", "cpufeatures", ] @@ -340,7 +340,7 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "getrandom 0.2.15", "once_cell", "version_check", @@ -449,7 +449,7 @@ dependencies = [ "rand 0.8.5", "serde", "serde_repr", - "tokio", + "tokio 1.40.0", "url", "zbus", ] @@ -503,7 +503,8 @@ dependencies = [ "futures-io", "memchr", "pin-project-lite", - "tokio", + "tokio 1.40.0", + "xz2", "zstd 0.13.2", "zstd-safe 7.2.1", ] @@ -539,7 +540,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "444b0228950ee6501b3568d3c93bf1176a1fdbc3b758dcd9475046d30f4dc7e8" dependencies = [ "async-lock", - "cfg-if", + "cfg-if 1.0.0", "concurrent-queue", "futures-io", "futures-lite 2.3.0", @@ -574,7 +575,7 @@ dependencies = [ "async-signal", "async-task", "blocking", - "cfg-if", + "cfg-if 1.0.0", "event-listener 5.3.1", "futures-lite 2.3.0", "rustix", @@ -601,7 +602,7 @@ dependencies = [ "async-io", "async-lock", "atomic-waker", - "cfg-if", + "cfg-if 1.0.0", "futures-core", "futures-io", "rustix", @@ -631,7 +632,7 @@ dependencies = [ "smart-default", "smol_str", "thiserror", - "tokio", + "tokio 1.40.0", "uuid 0.8.2", ] @@ -663,7 +664,7 @@ dependencies = [ "log", "pin-project-lite", "rustls-pki-types", - "tokio", + "tokio 1.40.0", "tokio-rustls 0.26.0", "tungstenite", "webpki-roots", @@ -681,7 +682,7 @@ dependencies = [ "futures-lite 2.3.0", "pin-project", "thiserror", - "tokio", + "tokio 1.40.0", "tokio-util", ] @@ -737,6 +738,20 @@ dependencies = [ "url", ] +[[package]] +name = "attohttpc" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f77d243921b0979fbbd728dd2d5162e68ac8252976797c24eb5b3a6af9090dc" +dependencies = [ + "http 0.2.12", + "log", + "native-tls", + "serde", + "serde_json", + "url", +] + [[package]] name = "autocfg" version = "1.4.0" @@ -749,7 +764,7 @@ version = "0.34.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3776743bb68d4ad02ba30ba8f64373f1be4e082fe47651767171ce75bb2f6cf5" dependencies = [ - "attohttpc", + "attohttpc 0.22.0", "dirs 4.0.0", "log", "quick-xml 0.26.0", @@ -760,6 +775,23 @@ dependencies = [ "url", ] +[[package]] +name = "aws-creds" +version = "0.36.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "390ad3b77f3e21e01a4a0355865853b681daf1988510b0b15e31c0c4ae7eb0f6" +dependencies = [ + "attohttpc 0.26.1", + "home", + "log", + "quick-xml 0.30.0", + "rust-ini 0.19.0", + "serde", + "thiserror", + "time", + "url", +] + [[package]] name = "aws-region" version = "0.25.5" @@ -776,7 +808,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide 0.8.0", "object", @@ -1034,6 +1066,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495" +[[package]] +name = "bytes" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" +dependencies = [ + "byteorder", + "iovec", +] + [[package]] name = "bytes" version = "1.7.2" @@ -1049,7 +1091,7 @@ version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" dependencies = [ - "bytes", + "bytes 1.7.2", ] [[package]] @@ -1124,7 +1166,7 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver", + "semver 1.0.23", "serde", "serde_json", "thiserror", @@ -1189,10 +1231,16 @@ version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" dependencies = [ - "smallvec", + "smallvec 1.13.2", "target-lexicon", ] +[[package]] +name = "cfg-if" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" + [[package]] name = "cfg-if" version = "1.0.0" @@ -1247,10 +1295,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a0875e527e299fc5f4faba42870bf199a39ab0bb2dbba1b8aef0a2151451130f" dependencies = [ "bstr", - "bytes", + "bytes 1.7.2", "clickhouse-derive", "clickhouse-rs-cityhash-sys", - "futures", + "futures 0.3.30", "hyper 0.14.31", "hyper-tls 0.5.0", "lz4", @@ -1259,7 +1307,7 @@ dependencies = [ "static_assertions", "thiserror", "time", - "tokio", + "tokio 1.40.0", "url", "uuid 1.10.0", ] @@ -1285,6 +1333,15 @@ dependencies = [ "cc", ] +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "cocoa" version = "0.25.0" @@ -1366,11 +1423,11 @@ version = "4.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" dependencies = [ - "bytes", + "bytes 1.7.2", "futures-core", "memchr", "pin-project-lite", - "tokio", + "tokio 1.40.0", "tokio-util", ] @@ -1380,7 +1437,7 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.8.20", ] [[package]] @@ -1564,7 +1621,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1573,7 +1630,18 @@ version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.8.20", +] + +[[package]] +name = "crossbeam-deque" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" +dependencies = [ + "crossbeam-epoch 0.8.2", + "crossbeam-utils 0.7.2", + "maybe-uninit", ] [[package]] @@ -1582,8 +1650,23 @@ version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", + "crossbeam-epoch 0.9.18", + "crossbeam-utils 0.8.20", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +dependencies = [ + "autocfg", + "cfg-if 0.1.10", + "crossbeam-utils 0.7.2", + "lazy_static", + "maybe-uninit", + "memoffset 0.5.6", + "scopeguard", ] [[package]] @@ -1592,7 +1675,18 @@ version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.8.20", +] + +[[package]] +name = "crossbeam-queue" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" +dependencies = [ + "cfg-if 0.1.10", + "crossbeam-utils 0.7.2", + "maybe-uninit", ] [[package]] @@ -1601,7 +1695,18 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.8.20", +] + +[[package]] +name = "crossbeam-utils" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +dependencies = [ + "autocfg", + "cfg-if 0.1.10", + "lazy_static", ] [[package]] @@ -1661,7 +1766,7 @@ dependencies = [ "phf 0.8.0", "proc-macro2", "quote", - "smallvec", + "smallvec 1.13.2", "syn 1.0.109", ] @@ -1740,16 +1845,43 @@ dependencies = [ [[package]] name = "daedalus" version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "314dac850cbf02b728fb531c1f3b1bec5b4ccdef6564db274470363792a6d302" dependencies = [ - "bytes", + "bytes 1.7.2", "chrono", "serde", "serde_json", "thiserror", ] +[[package]] +name = "daedalus_client" +version = "0.2.2" +dependencies = [ + "async_zip", + "bytes 1.7.2", + "chrono", + "daedalus", + "dashmap 5.5.3", + "dotenvy", + "futures 0.3.30", + "indexmap 2.5.0", + "itertools 0.13.0", + "lazy_static", + "reqwest 0.12.7", + "rust-s3 0.34.0", + "semver 1.0.23", + "serde", + "serde-xml-rs", + "serde_json", + "sha1_smol", + "thiserror", + "tokio 1.40.0", + "tracing", + "tracing-error", + "tracing-futures", + "tracing-subscriber", +] + [[package]] name = "darling" version = "0.14.4" @@ -1826,11 +1958,11 @@ version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "hashbrown 0.14.5", - "lock_api", + "lock_api 0.4.12", "once_cell", - "parking_lot_core", + "parking_lot_core 0.9.10", ] [[package]] @@ -1839,12 +1971,12 @@ version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ - "cfg-if", - "crossbeam-utils", + "cfg-if 1.0.0", + "crossbeam-utils 0.8.20", "hashbrown 0.14.5", - "lock_api", + "lock_api 0.4.12", "once_cell", - "parking_lot_core", + "parking_lot_core 0.9.10", "serde", ] @@ -1862,7 +1994,7 @@ checksum = "1bb21987b9fb1613058ba3843121dd18b163b254d8a6e797e144cbac14d96d1b" dependencies = [ "libc", "libdbus-sys", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -1873,7 +2005,7 @@ checksum = "6541a3916932fe57768d4be0b1ffb5ec7cbf74ca8c903fdfd5c0fe8aa958f0ed" dependencies = [ "deadpool-runtime", "num_cpus", - "tokio", + "tokio 1.40.0", ] [[package]] @@ -1892,7 +2024,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" dependencies = [ - "tokio", + "tokio 1.40.0", ] [[package]] @@ -1994,7 +2126,7 @@ dependencies = [ "convert_case 0.4.0", "proc-macro2", "quote", - "rustc_version", + "rustc_version 0.4.1", "syn 2.0.79", ] @@ -2043,7 +2175,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "dirs-sys-next", ] @@ -2055,7 +2187,7 @@ checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" dependencies = [ "libc", "redox_users", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2078,7 +2210,7 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2120,7 +2252,7 @@ dependencies = [ "dlopen2_derive", "libc", "once_cell", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2258,7 +2390,7 @@ checksum = "f4e24052d7be71f0efb50c201557f6fe7d237cfd5a64fd5bcd7fd8fe32dbbffa" dependencies = [ "cc", "memchr", - "rustc_version", + "rustc_version 0.4.1", "toml 0.8.19", "vswhom", "winreg 0.52.0", @@ -2288,7 +2420,7 @@ version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -2363,7 +2495,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "home", "windows-sys 0.48.0", ] @@ -2407,7 +2539,7 @@ dependencies = [ "lebe", "miniz_oxide 0.7.4", "rayon-core", - "smallvec", + "smallvec 1.13.2", "zune-inflate", ] @@ -2461,8 +2593,8 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f" dependencies = [ - "memoffset", - "rustc_version", + "memoffset 0.9.1", + "rustc_version 0.4.1", ] [[package]] @@ -2471,7 +2603,7 @@ version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "libredox", "windows-sys 0.59.0", @@ -2486,7 +2618,7 @@ dependencies = [ "cc", "lazy_static", "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2585,6 +2717,22 @@ dependencies = [ "libc", ] +[[package]] +name = "fuchsia-zircon" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +dependencies = [ + "bitflags 1.3.2", + "fuchsia-zircon-sys", +] + +[[package]] +name = "fuchsia-zircon-sys" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" + [[package]] name = "funty" version = "2.0.0" @@ -2601,6 +2749,12 @@ dependencies = [ "new_debug_unreachable", ] +[[package]] +name = "futures" +version = "0.1.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" + [[package]] name = "futures" version = "0.3.30" @@ -2650,8 +2804,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" dependencies = [ "futures-core", - "lock_api", - "parking_lot", + "lock_api 0.4.12", + "parking_lot 0.12.3", ] [[package]] @@ -2870,7 +3024,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] @@ -2881,7 +3035,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] @@ -2917,7 +3071,7 @@ dependencies = [ "libc", "once_cell", "pin-project-lite", - "smallvec", + "smallvec 1.13.2", "thiserror", ] @@ -2931,7 +3085,7 @@ dependencies = [ "gobject-sys", "libc", "system-deps", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -2953,7 +3107,7 @@ dependencies = [ "libc", "memchr", "once_cell", - "smallvec", + "smallvec 1.13.2", "thiserror", ] @@ -3004,17 +3158,17 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68a7f542ee6b35af73b06abc0dad1c1bae89964e4e253bc4b587b91c9637867b" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "dashmap 5.5.3", - "futures", + "futures 0.3.30", "futures-timer", "no-std-compat", "nonzero_ext", - "parking_lot", + "parking_lot 0.12.3", "portable-atomic", "quanta", "rand 0.8.5", - "smallvec", + "smallvec 1.13.2", "spinning_top", ] @@ -3087,7 +3241,7 @@ version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ - "bytes", + "bytes 1.7.2", "fnv", "futures-core", "futures-sink", @@ -3095,7 +3249,7 @@ dependencies = [ "http 0.2.12", "indexmap 2.5.0", "slab", - "tokio", + "tokio 1.40.0", "tokio-util", "tracing", ] @@ -3107,14 +3261,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e8ac6999421f49a846c2d4411f337e53497d8ec55d67753beffa43c5d9205" dependencies = [ "atomic-waker", - "bytes", + "bytes 1.7.2", "fnv", "futures-core", "futures-sink", "http 1.1.0", "indexmap 2.5.0", "slab", - "tokio", + "tokio 1.40.0", "tokio-util", "tracing", ] @@ -3125,7 +3279,7 @@ version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6dd08c532ae367adf81c312a4580bc67f1d0fe8bc9c460520283f4c0ff277888" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crunchy", ] @@ -3138,6 +3292,12 @@ dependencies = [ "ahash 0.7.8", ] +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" + [[package]] name = "hashbrown" version = "0.14.5" @@ -3239,7 +3399,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9c7c7c8ac16c798734b8a24560c1362120597c40d5e1459f09498f8f6c8f2ba" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", "windows 0.52.0", ] @@ -3264,7 +3424,7 @@ version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "bytes", + "bytes 1.7.2", "fnv", "itoa 1.0.11", ] @@ -3275,7 +3435,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ - "bytes", + "bytes 1.7.2", "fnv", "itoa 1.0.11", ] @@ -3286,7 +3446,7 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "bytes", + "bytes 1.7.2", "http 0.2.12", "pin-project-lite", ] @@ -3297,7 +3457,7 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ - "bytes", + "bytes 1.7.2", "http 1.1.0", ] @@ -3307,7 +3467,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ - "bytes", + "bytes 1.7.2", "futures-util", "http 1.1.0", "http-body 1.0.1", @@ -3365,7 +3525,7 @@ version = "0.14.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" dependencies = [ - "bytes", + "bytes 1.7.2", "futures-channel", "futures-core", "futures-util", @@ -3377,7 +3537,7 @@ dependencies = [ "itoa 1.0.11", "pin-project-lite", "socket2", - "tokio", + "tokio 1.40.0", "tower-service", "tracing", "want", @@ -3389,7 +3549,7 @@ version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" dependencies = [ - "bytes", + "bytes 1.7.2", "futures-channel", "futures-util", "h2 0.4.6", @@ -3398,8 +3558,8 @@ dependencies = [ "httparse", "itoa 1.0.11", "pin-project-lite", - "smallvec", - "tokio", + "smallvec 1.13.2", + "tokio 1.40.0", "want", ] @@ -3415,7 +3575,7 @@ dependencies = [ "log", "rustls 0.21.12", "rustls-native-certs", - "tokio", + "tokio 1.40.0", "tokio-rustls 0.24.1", ] @@ -3431,7 +3591,7 @@ dependencies = [ "hyper-util", "rustls 0.23.13", "rustls-pki-types", - "tokio", + "tokio 1.40.0", "tokio-rustls 0.26.0", "tower-service", "webpki-roots", @@ -3443,10 +3603,10 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes", + "bytes 1.7.2", "hyper 0.14.31", "native-tls", - "tokio", + "tokio 1.40.0", "tokio-native-tls", ] @@ -3456,12 +3616,12 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ - "bytes", + "bytes 1.7.2", "http-body-util", "hyper 1.4.1", "hyper-util", "native-tls", - "tokio", + "tokio 1.40.0", "tokio-native-tls", "tower-service", ] @@ -3472,7 +3632,7 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ - "bytes", + "bytes 1.7.2", "futures-channel", "futures-util", "http 1.1.0", @@ -3480,7 +3640,7 @@ dependencies = [ "hyper 1.4.1", "pin-project-lite", "socket2", - "tokio", + "tokio 1.40.0", "tower-service", "tracing", ] @@ -3574,7 +3734,7 @@ dependencies = [ "icu_normalizer_data", "icu_properties", "icu_provider", - "smallvec", + "smallvec 1.13.2", "utf16_iter", "utf8_iter", "write16", @@ -3670,7 +3830,7 @@ checksum = "bd69211b9b519e98303c015e21a007e293db403b6c85b9b124e133d25e242cdd" dependencies = [ "icu_normalizer", "icu_properties", - "smallvec", + "smallvec 1.13.2", "utf8_iter", ] @@ -3800,7 +3960,16 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", +] + +[[package]] +name = "iovec" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +dependencies = [ + "libc", ] [[package]] @@ -3856,7 +4025,7 @@ checksum = "334e04b4d781f436dc315cb1e7515bd96826426345d498149e4bde36b67f8ee9" dependencies = [ "async-channel 1.9.0", "castaway", - "crossbeam-utils", + "crossbeam-utils 0.8.20", "curl", "curl-sys", "encoding_rs", @@ -3911,6 +4080,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.8" @@ -3973,7 +4151,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97" dependencies = [ "cesu8", - "cfg-if", + "cfg-if 1.0.0", "combine", "jni-sys", "log", @@ -4050,6 +4228,16 @@ dependencies = [ "serde_json", ] +[[package]] +name = "kernel32-sys" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "keyboard-types" version = "0.7.0" @@ -4111,7 +4299,7 @@ dependencies = [ "async-trait", "base64 0.21.7", "bitflags 2.6.0", - "bytes", + "bytes 1.7.2", "censor", "chrono", "clickhouse", @@ -4122,7 +4310,7 @@ dependencies = [ "dotenvy", "env_logger", "flate2", - "futures", + "futures 0.3.30", "futures-timer", "futures-util", "governor", @@ -4145,7 +4333,7 @@ dependencies = [ "redis", "regex", "reqwest 0.11.27", - "rust-s3", + "rust-s3 0.33.0", "rust_decimal", "rust_iso3166", "rusty-money", @@ -4160,7 +4348,7 @@ dependencies = [ "sqlx", "tar", "thiserror", - "tokio", + "tokio 1.40.0", "tokio-stream", "totp-rs", "url", @@ -4218,7 +4406,7 @@ dependencies = [ "percent-encoding", "quoted_printable", "socket2", - "tokio", + "tokio 1.40.0", "url", ] @@ -4268,8 +4456,8 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f" dependencies = [ - "cfg-if", - "winapi", + "cfg-if 1.0.0", + "winapi 0.3.9", ] [[package]] @@ -4296,7 +4484,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", - "redox_syscall", + "redox_syscall 0.5.6", ] [[package]] @@ -4367,6 +4555,15 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard", +] + [[package]] name = "lock_api" version = "0.4.12" @@ -4411,6 +4608,17 @@ dependencies = [ "libc", ] +[[package]] +name = "lzma-sys" +version = "0.1.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "mac" version = "0.1.1" @@ -4478,13 +4686,19 @@ dependencies = [ "syn 2.0.79", ] +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + [[package]] name = "md-5" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "digest 0.10.7", ] @@ -4514,7 +4728,7 @@ checksum = "2257ea8ed24b079c21570f473e58cccc3de23b46cee331fc513fccdc3f1ae5a1" dependencies = [ "async-trait", "either", - "futures", + "futures 0.3.30", "futures-io", "isahc", "iso8601", @@ -4539,6 +4753,15 @@ version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +[[package]] +name = "memoffset" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" +dependencies = [ + "autocfg", +] + [[package]] name = "memoffset" version = "0.9.1" @@ -4604,6 +4827,25 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "mio" +version = "0.6.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +dependencies = [ + "cfg-if 0.1.10", + "fuchsia-zircon", + "fuchsia-zircon-sys", + "iovec", + "kernel32-sys", + "libc", + "log", + "miow", + "net2", + "slab", + "winapi 0.2.8", +] + [[package]] name = "mio" version = "0.8.11" @@ -4629,6 +4871,29 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "mio-uds" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" +dependencies = [ + "iovec", + "libc", + "mio 0.6.23", +] + +[[package]] +name = "miow" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" +dependencies = [ + "kernel32-sys", + "net2", + "winapi 0.2.8", + "ws2_32-sys", +] + [[package]] name = "muda" version = "0.15.1" @@ -4675,7 +4940,7 @@ dependencies = [ "versions", "wfd", "which", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -4725,6 +4990,17 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "net2" +version = "0.2.39" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b13b648036a2339d06de780866fbdfda0dde886de7b3af2ddeba8b14f4ee34ac" +dependencies = [ + "cfg-if 0.1.10", + "libc", + "winapi 0.3.9", +] + [[package]] name = "new_debug_unreachable" version = "1.0.6" @@ -4738,10 +5014,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags 2.6.0", - "cfg-if", + "cfg-if 1.0.0", "cfg_aliases", "libc", - "memoffset", + "memoffset 0.9.1", ] [[package]] @@ -4816,7 +5092,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8a3895c6391c39d7fe7ebc444a87eb2991b2a0bc718fdabd071eec617fc68e4" dependencies = [ - "winapi", + "winapi 0.3.9", ] [[package]] @@ -4826,7 +5102,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" dependencies = [ "overload", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -4852,7 +5128,7 @@ dependencies = [ "num-iter", "num-traits", "rand 0.8.5", - "smallvec", + "smallvec 1.13.2", "zeroize", ] @@ -5128,7 +5404,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", - "cfg-if", + "cfg-if 1.0.0", "foreign-types 0.3.2", "libc", "once_cell", @@ -5191,6 +5467,16 @@ dependencies = [ "hashbrown 0.12.3", ] +[[package]] +name = "ordered-multimap" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ed8acf08e98e744e5384c8bc63ceb0364e68a6854187221c18df61c4797690e" +dependencies = [ + "dlv-list 0.5.2", + "hashbrown 0.13.2", +] + [[package]] name = "ordered-multimap" version = "0.7.3" @@ -5281,14 +5567,40 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba" +[[package]] +name = "parking_lot" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.6.3", + "rustc_version 0.2.3", +] + [[package]] name = "parking_lot" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ - "lock_api", - "parking_lot_core", + "lock_api 0.4.12", + "parking_lot_core 0.9.10", +] + +[[package]] +name = "parking_lot_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66b810a62be75176a80873726630147a5ca780cd33921e0b5709033e66b0a" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "rustc_version 0.2.3", + "smallvec 0.6.14", + "winapi 0.3.9", ] [[package]] @@ -5297,10 +5609,10 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", - "redox_syscall", - "smallvec", + "redox_syscall 0.5.6", + "smallvec 1.13.2", "windows-targets 0.52.6", ] @@ -5630,7 +5942,7 @@ checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", "bitflags 1.3.2", - "cfg-if", + "cfg-if 1.0.0", "concurrent-queue", "libc", "log", @@ -5644,7 +5956,7 @@ version = "3.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cc2790cd301dec6cd3b7a025e4815cf825724a51c98dccfe6a3e55f05ffb6511" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "concurrent-queue", "hermit-abi 0.4.0", "pin-project-lite", @@ -5799,12 +6111,12 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fnv", "lazy_static", "libc", "memchr", - "parking_lot", + "parking_lot 0.12.3", "procfs", "thiserror", ] @@ -5853,13 +6165,13 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" dependencies = [ - "crossbeam-utils", + "crossbeam-utils 0.8.20", "libc", "once_cell", "raw-cpuid", "wasi 0.11.0+wasi-snapshot-preview1", "web-sys", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -5878,6 +6190,16 @@ dependencies = [ "serde", ] +[[package]] +name = "quick-xml" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "quick-xml" version = "0.31.0" @@ -5902,7 +6224,7 @@ version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c7c5fdde3cdae7203427dc4f0a68fe0ed09833edc525a03456b153b79828684" dependencies = [ - "bytes", + "bytes 1.7.2", "pin-project-lite", "quinn-proto", "quinn-udp", @@ -5910,7 +6232,7 @@ dependencies = [ "rustls 0.23.13", "socket2", "thiserror", - "tokio", + "tokio 1.40.0", "tracing", ] @@ -5920,7 +6242,7 @@ version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fadfaed2cd7f389d0161bb73eeb07b7b78f8691047a6f3e73caaeae55310a4a6" dependencies = [ - "bytes", + "bytes 1.7.2", "rand 0.8.5", "ring 0.17.8", "rustc-hash", @@ -5966,7 +6288,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51de85fb3fb6524929c8a2eb85e6b6d363de4e8c48f9e2c2eac4944abc181c93" dependencies = [ "log", - "parking_lot", + "parking_lot 0.12.3", "scheduled-thread-pool", ] @@ -6094,8 +6416,8 @@ version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "crossbeam-deque", - "crossbeam-utils", + "crossbeam-deque 0.8.5", + "crossbeam-utils 0.8.20", ] [[package]] @@ -6107,7 +6429,7 @@ dependencies = [ "ahash 0.8.11", "arc-swap", "async-trait", - "bytes", + "bytes 1.7.2", "combine", "futures-util", "itoa 1.0.11", @@ -6118,11 +6440,17 @@ dependencies = [ "ryu", "sha1_smol", "socket2", - "tokio", + "tokio 1.40.0", "tokio-util", "url", ] +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + [[package]] name = "redox_syscall" version = "0.5.6" @@ -6221,7 +6549,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ "base64 0.21.7", - "bytes", + "bytes 1.7.2", "encoding_rs", "futures-core", "futures-util", @@ -6245,7 +6573,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 0.1.2", "system-configuration 0.5.1", - "tokio", + "tokio 1.40.0", "tokio-native-tls", "tokio-util", "tower-service", @@ -6265,7 +6593,7 @@ checksum = "f8f4955649ef5c38cc7f9e8aa41761d48fb9677197daea9984dc54f56aad5e63" dependencies = [ "async-compression", "base64 0.22.1", - "bytes", + "bytes 1.7.2", "encoding_rs", "futures-channel", "futures-core", @@ -6295,7 +6623,7 @@ dependencies = [ "serde_urlencoded", "sync_wrapper 1.0.1", "system-configuration 0.6.1", - "tokio", + "tokio 1.40.0", "tokio-native-tls", "tokio-rustls 0.26.0", "tokio-util", @@ -6370,7 +6698,7 @@ dependencies = [ "spin 0.5.2", "untrusted 0.7.1", "web-sys", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -6380,7 +6708,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "cfg-if", + "cfg-if 1.0.0", "getrandom 0.2.15", "libc", "spin 0.9.8", @@ -6396,7 +6724,7 @@ checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" dependencies = [ "bitvec", "bytecheck", - "bytes", + "bytes 1.7.2", "hashbrown 0.12.3", "ptr_meta", "rend", @@ -6443,17 +6771,27 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "ordered-multimap 0.4.3", ] +[[package]] +name = "rust-ini" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e2a3bcec1f113553ef1c88aae6c020a369d03d55b58de9869a0908930385091" +dependencies = [ + "cfg-if 1.0.0", + "ordered-multimap 0.6.0", +] + [[package]] name = "rust-ini" version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e310ef0e1b6eeb79169a1171daf9abcb87a2e17c03bee2c4bb100b55c75409f" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "ordered-multimap 0.7.3", "trim-in-place", ] @@ -6465,12 +6803,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b2ac5ff6acfbe74226fa701b5ef793aaa054055c13ebb7060ad36942956e027" dependencies = [ "async-trait", - "aws-creds", + "aws-creds 0.34.1", "aws-region", "base64 0.13.1", - "bytes", - "cfg-if", - "futures", + "bytes 1.7.2", + "cfg-if 1.0.0", + "futures 0.3.30", "hex", "hmac 0.12.1", "http 0.2.12", @@ -6486,7 +6824,44 @@ dependencies = [ "sha2 0.10.8", "thiserror", "time", - "tokio", + "tokio 1.40.0", + "tokio-stream", + "url", +] + +[[package]] +name = "rust-s3" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6679da8efaf4c6f0c161de0961dfe95fb6e9049c398d6fbdada2639f053aedb" +dependencies = [ + "async-trait", + "aws-creds 0.36.0", + "aws-region", + "base64 0.21.7", + "bytes 1.7.2", + "cfg-if 1.0.0", + "futures 0.3.30", + "hex", + "hmac 0.12.1", + "http 0.2.12", + "hyper 0.14.31", + "hyper-tls 0.5.0", + "log", + "maybe-async", + "md5", + "minidom", + "native-tls", + "percent-encoding", + "quick-xml 0.30.0", + "serde", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "thiserror", + "time", + "tokio 1.40.0", + "tokio-native-tls", "tokio-stream", "url", ] @@ -6499,7 +6874,7 @@ checksum = "b082d80e3e3cc52b2ed634388d436fe1f4de6af5786cc2de9ba9737527bdf555" dependencies = [ "arrayvec", "borsh", - "bytes", + "bytes 1.7.2", "num-traits", "rand 0.8.5", "rkyv", @@ -6541,13 +6916,22 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + [[package]] name = "rustc_version" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver", + "semver 1.0.23", ] [[package]] @@ -6669,7 +7053,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a98f186c7a2f3abbffb802984b7f1dfd65dac8be1aafdaabbca4137f53f0dff7" dependencies = [ - "bytes", + "bytes 1.7.2", "rxml_validation", "smartstring", ] @@ -6710,7 +7094,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3cbc66816425a074528352f5789333ecff06ca41b36b0b0efdfbb29edc391a19" dependencies = [ - "parking_lot", + "parking_lot 0.12.3", ] [[package]] @@ -6827,10 +7211,19 @@ dependencies = [ "phf_codegen 0.8.0", "precomputed-hash", "servo_arc", - "smallvec", + "smallvec 1.13.2", "thin-slice", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.23" @@ -6840,6 +7233,12 @@ dependencies = [ "serde", ] +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + [[package]] name = "sentry" version = "0.32.3" @@ -6855,7 +7254,7 @@ dependencies = [ "sentry-debug-images", "sentry-panic", "sentry-tracing", - "tokio", + "tokio 1.40.0", "ureq", ] @@ -6891,7 +7290,7 @@ dependencies = [ "hostname", "libc", "os_info", - "rustc_version", + "rustc_version 0.4.1", "sentry-core", "uname", ] @@ -6979,6 +7378,18 @@ dependencies = [ "typeid", ] +[[package]] +name = "serde-xml-rs" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb3aa78ecda1ebc9ec9847d5d3aba7d618823446a049ba2491940506da6e2782" +dependencies = [ + "log", + "serde", + "thiserror", + "xml-rs", +] + [[package]] name = "serde_derive" version = "1.0.210" @@ -7185,7 +7596,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.7", ] @@ -7203,7 +7614,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -7215,7 +7626,7 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.7", ] @@ -7302,6 +7713,15 @@ dependencies = [ "futures-io", ] +[[package]] +name = "smallvec" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" +dependencies = [ + "maybe-uninit", +] + [[package]] name = "smallvec" version = "1.13.2" @@ -7368,7 +7788,7 @@ dependencies = [ "objc2-foundation", "objc2-quartz-core", "raw-window-handle 0.6.2", - "redox_syscall", + "redox_syscall 0.5.6", "wasm-bindgen", "web-sys", "windows-sys 0.59.0", @@ -7406,7 +7826,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47317bbaf63785b53861e1ae2d11b80d6b624211d42cb20efcd210ee6f8a14bc" dependencies = [ - "smallvec", + "smallvec 1.13.2", ] [[package]] @@ -7421,7 +7841,7 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" dependencies = [ - "lock_api", + "lock_api 0.4.12", ] [[package]] @@ -7430,7 +7850,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d96d2d1d716fb500937168cc09353ffdc7a012be8475ac7308e1bdf0e3923300" dependencies = [ - "lock_api", + "lock_api 0.4.12", ] [[package]] @@ -7474,10 +7894,10 @@ checksum = "d4d8060b456358185f7d50c55d9b5066ad956956fddec42ee2e8567134a8936e" dependencies = [ "atoi", "byteorder", - "bytes", + "bytes 1.7.2", "chrono", "crc", - "crossbeam-queue", + "crossbeam-queue 0.3.11", "either", "event-listener 5.3.1", "futures-channel", @@ -7500,10 +7920,10 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", - "smallvec", + "smallvec 1.13.2", "sqlformat", "thiserror", - "tokio", + "tokio 1.40.0", "tokio-stream", "tracing", "url", @@ -7545,7 +7965,7 @@ dependencies = [ "sqlx-sqlite", "syn 2.0.79", "tempfile", - "tokio", + "tokio 1.40.0", "url", ] @@ -7559,7 +7979,7 @@ dependencies = [ "base64 0.22.1", "bitflags 2.6.0", "byteorder", - "bytes", + "bytes 1.7.2", "chrono", "crc", "digest 0.10.7", @@ -7585,7 +8005,7 @@ dependencies = [ "serde", "sha1 0.10.6", "sha2 0.10.8", - "smallvec", + "smallvec 1.13.2", "sqlx-core", "stringprep", "thiserror", @@ -7625,7 +8045,7 @@ dependencies = [ "serde", "serde_json", "sha2 0.10.8", - "smallvec", + "smallvec 1.13.2", "sqlx-core", "stringprep", "thiserror", @@ -7670,7 +8090,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "799c883d55abdb5e98af1a7b3f23b9b6de8ecada0ecac058672d7635eb48ca7b" dependencies = [ "cc", - "cfg-if", + "cfg-if 1.0.0", "libc", "psm", "windows-sys 0.59.0", @@ -7696,7 +8116,7 @@ checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" dependencies = [ "new_debug_unreachable", "once_cell", - "parking_lot", + "parking_lot 0.12.3", "phf_shared 0.10.0", "precomputed-hash", "serde", @@ -7861,7 +8281,7 @@ version = "0.30.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0a5b4ddaee55fb2bea2bf0e5000747e5f5c0de765e5a5ff87f4cd106439f4bb3" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "core-foundation-sys", "libc", "ntapi", @@ -7952,7 +8372,7 @@ dependencies = [ "ndk-sys", "objc", "once_cell", - "parking_lot", + "parking_lot 0.12.3", "raw-window-handle 0.6.2", "scopeguard", "tao-macros", @@ -8005,7 +8425,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "246bd333561c5601241b7a09f19957d5f659667f3c1191c869a066fb309e1841" dependencies = [ "anyhow", - "bytes", + "bytes 1.7.2", "dirs 5.0.1", "dunce", "embed_plist", @@ -8039,7 +8459,7 @@ dependencies = [ "tauri-runtime-wry", "tauri-utils", "thiserror", - "tokio", + "tokio 1.40.0", "tray-icon", "url", "urlpattern", @@ -8063,7 +8483,7 @@ dependencies = [ "json-patch", "quote", "schemars", - "semver", + "semver 1.0.23", "serde", "serde_json", "tauri-codegen", @@ -8087,7 +8507,7 @@ dependencies = [ "png", "proc-macro2", "quote", - "semver", + "semver 1.0.23", "serde", "serde_json", "sha2 0.10.8", @@ -8226,7 +8646,7 @@ dependencies = [ "tauri", "tauri-plugin", "thiserror", - "tokio", + "tokio 1.40.0", ] [[package]] @@ -8258,7 +8678,7 @@ dependencies = [ "infer 0.16.0", "minisign-verify", "reqwest 0.12.7", - "semver", + "semver 1.0.23", "serde", "serde_json", "tar", @@ -8267,7 +8687,7 @@ dependencies = [ "tempfile", "thiserror", "time", - "tokio", + "tokio 1.40.0", "url", "windows-sys 0.59.0", "zip 2.2.0", @@ -8355,7 +8775,7 @@ dependencies = [ "quote", "regex", "schemars", - "semver", + "semver 1.0.23", "serde", "serde-untagged", "serde_json", @@ -8385,7 +8805,7 @@ version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fastrand 2.1.1", "once_cell", "rustix", @@ -8411,7 +8831,7 @@ checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" dependencies = [ "dirs-next", "rustversion", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -8432,7 +8852,7 @@ dependencies = [ "async_zip", "base64 0.22.1", "byteorder", - "bytes", + "bytes 1.7.2", "chrono", "daedalus", "dashmap 6.1.0", @@ -8440,7 +8860,7 @@ dependencies = [ "discord-rich-presence", "dunce", "flate2", - "futures", + "futures 0.3.30", "indicatif", "lazy_static", "notify", @@ -8461,7 +8881,7 @@ dependencies = [ "tauri", "tempfile", "thiserror", - "tokio", + "tokio 1.40.0", "toml 0.8.19", "tracing", "tracing-error", @@ -8483,7 +8903,7 @@ dependencies = [ "daedalus", "dashmap 6.1.0", "dirs 5.0.1", - "futures", + "futures 0.3.30", "lazy_static", "native-dialog", "objc", @@ -8505,7 +8925,7 @@ dependencies = [ "tauri-plugin-window-state", "theseus", "thiserror", - "tokio", + "tokio 1.40.0", "tracing", "tracing-error", "url", @@ -8518,12 +8938,12 @@ name = "theseus_playground" version = "0.0.0" dependencies = [ "dunce", - "futures", + "futures 0.3.30", "serde", "serde_json", "theseus", "thiserror", - "tokio", + "tokio 1.40.0", "tracing", "tracing-error", "tracing-subscriber", @@ -8564,7 +8984,7 @@ version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", ] @@ -8644,6 +9064,30 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "tokio" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "mio 0.6.23", + "num_cpus", + "tokio-codec", + "tokio-current-thread", + "tokio-executor", + "tokio-fs", + "tokio-io", + "tokio-reactor", + "tokio-sync", + "tokio-tcp", + "tokio-threadpool", + "tokio-timer", + "tokio-udp", + "tokio-uds", +] + [[package]] name = "tokio" version = "1.40.0" @@ -8651,10 +9095,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", - "bytes", + "bytes 1.7.2", "libc", "mio 1.0.2", - "parking_lot", + "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", "socket2", @@ -8663,6 +9107,59 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "tokio-codec" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25b2998660ba0e70d18684de5d06b70b70a3a747469af9dea7618cc59e75976b" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "tokio-io", +] + +[[package]] +name = "tokio-current-thread" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" +dependencies = [ + "futures 0.1.31", + "tokio-executor", +] + +[[package]] +name = "tokio-executor" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" +dependencies = [ + "crossbeam-utils 0.7.2", + "futures 0.1.31", +] + +[[package]] +name = "tokio-fs" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "297a1206e0ca6302a0eed35b700d292b275256f596e2f3fea7729d5e629b6ff4" +dependencies = [ + "futures 0.1.31", + "tokio-io", + "tokio-threadpool", +] + +[[package]] +name = "tokio-io" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "log", +] + [[package]] name = "tokio-macros" version = "2.4.0" @@ -8681,7 +9178,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ "native-tls", - "tokio", + "tokio 1.40.0", +] + +[[package]] +name = "tokio-reactor" +version = "0.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" +dependencies = [ + "crossbeam-utils 0.7.2", + "futures 0.1.31", + "lazy_static", + "log", + "mio 0.6.23", + "num_cpus", + "parking_lot 0.9.0", + "slab", + "tokio-executor", + "tokio-io", + "tokio-sync", ] [[package]] @@ -8691,7 +9207,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls 0.21.12", - "tokio", + "tokio 1.40.0", ] [[package]] @@ -8702,7 +9218,7 @@ checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" dependencies = [ "rustls 0.23.13", "rustls-pki-types", - "tokio", + "tokio 1.40.0", ] [[package]] @@ -8713,7 +9229,93 @@ checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" dependencies = [ "futures-core", "pin-project-lite", - "tokio", + "tokio 1.40.0", +] + +[[package]] +name = "tokio-sync" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" +dependencies = [ + "fnv", + "futures 0.1.31", +] + +[[package]] +name = "tokio-tcp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "iovec", + "mio 0.6.23", + "tokio-io", + "tokio-reactor", +] + +[[package]] +name = "tokio-threadpool" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" +dependencies = [ + "crossbeam-deque 0.7.4", + "crossbeam-queue 0.2.3", + "crossbeam-utils 0.7.2", + "futures 0.1.31", + "lazy_static", + "log", + "num_cpus", + "slab", + "tokio-executor", +] + +[[package]] +name = "tokio-timer" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" +dependencies = [ + "crossbeam-utils 0.7.2", + "futures 0.1.31", + "slab", + "tokio-executor", +] + +[[package]] +name = "tokio-udp" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2a0b10e610b39c38b031a2fcab08e4b82f16ece36504988dcbd81dbba650d82" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "log", + "mio 0.6.23", + "tokio-codec", + "tokio-io", + "tokio-reactor", +] + +[[package]] +name = "tokio-uds" +version = "0.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab57a4ac4111c8c9dbcf70779f6fc8bc35ae4b2454809febac840ad19bd7e4e0" +dependencies = [ + "bytes 0.4.12", + "futures 0.1.31", + "iovec", + "libc", + "log", + "mio 0.6.23", + "mio-uds", + "tokio-codec", + "tokio-io", + "tokio-reactor", ] [[package]] @@ -8722,12 +9324,12 @@ version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" dependencies = [ - "bytes", + "bytes 1.7.2", "futures-core", "futures-io", "futures-sink", "pin-project-lite", - "tokio", + "tokio 1.40.0", ] [[package]] @@ -8869,7 +9471,9 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ + "futures 0.3.30", "pin-project", + "tokio 0.1.22", "tracing", ] @@ -8896,7 +9500,7 @@ dependencies = [ "once_cell", "regex", "sharded-slab", - "smallvec", + "smallvec 1.13.2", "thread_local", "tracing", "tracing-core", @@ -8943,7 +9547,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" dependencies = [ "byteorder", - "bytes", + "bytes 1.7.2", "data-encoding", "http 1.1.0", "httparse", @@ -8974,9 +9578,9 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89daebc3e6fd160ac4aa9fc8b3bf71e1f74fbf92367ae71fb83a037e8bf164b9" dependencies = [ - "memoffset", + "memoffset 0.9.1", "tempfile", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -9334,7 +9938,7 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", "wasm-bindgen-macro", ] @@ -9360,7 +9964,7 @@ version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -9547,7 +10151,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e713040b67aae5bf1a0ae3e1ebba8cc29ab2b90da9aa1bff6e09031a8a41d7a8" dependencies = [ "libc", - "winapi", + "winapi 0.3.9", ] [[package]] @@ -9568,11 +10172,17 @@ version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "372d5b87f58ec45c384ba03563b03544dc5fadc3983e434b286913f5b4a9bb6d" dependencies = [ - "redox_syscall", + "redox_syscall 0.5.6", "wasite", "web-sys", ] +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + [[package]] name = "winapi" version = "0.3.9" @@ -9583,6 +10193,12 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -9971,7 +10587,7 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "windows-sys 0.48.0", ] @@ -9981,7 +10597,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "windows-sys 0.48.0", ] @@ -10046,6 +10662,16 @@ dependencies = [ "x11-dl", ] +[[package]] +name = "ws2_32-sys" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "wyz" version = "0.5.1" @@ -10103,6 +10729,15 @@ version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af4e2e2f7cba5a093896c1e150fbfe177d1883e7448200efb81d40b9d339ef26" +[[package]] +name = "xz2" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" +dependencies = [ + "lzma-sys", +] + [[package]] name = "yaserde" version = "0.8.0" @@ -10190,7 +10825,7 @@ dependencies = [ "serde_repr", "sha1 0.10.6", "static_assertions", - "tokio", + "tokio 1.40.0", "tracing", "uds_windows", "windows-sys 0.52.0", @@ -10305,7 +10940,7 @@ dependencies = [ "bzip2", "constant_time_eq 0.1.5", "crc32fast", - "crossbeam-utils", + "crossbeam-utils 0.8.20", "flate2", "hmac 0.12.1", "pbkdf2", @@ -10322,7 +10957,7 @@ checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" dependencies = [ "arbitrary", "crc32fast", - "crossbeam-utils", + "crossbeam-utils 0.8.20", "displaydoc", "indexmap 2.5.0", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 2edb492b0..abed47af3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,9 @@ members = [ './packages/app-lib', './apps/app-playground', './apps/app', - './apps/labrinth' + './apps/labrinth', + './apps/daedalus_client', + './packages/daedalus', ] # Optimize for speed and reduce size on release builds diff --git a/README.md b/README.md index 9bf4cc6ae..74def556e 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ This repository contains two primary packages. For detailed development informat ## Contributing -We welcome contributions! Before submitting any contributions, please read our [contributing guidelines](https://support.modrinth.com/en/articles/8802215-contributing-to-modrinth). +We welcome contributions! Before submitting any contributions, please read our [contributing guidelines](https://docs.modrinth.com/contributing/getting-started/). If you plan to fork this repository for your own purposes, please review our [copying guidelines](COPYING.md). diff --git a/apps/app/Cargo.toml b/apps/app/Cargo.toml index 409038c07..d4120e602 100644 --- a/apps/app/Cargo.toml +++ b/apps/app/Cargo.toml @@ -28,7 +28,7 @@ tauri-plugin-single-instance = { version = "2.0.0-rc" } tokio = { version = "1", features = ["full"] } thiserror = "1.0" futures = "0.3" -daedalus = "0.2.3" +daedalus = { path = "../../packages/daedalus" } chrono = "0.4.26" dirs = "5.0.1" diff --git a/apps/app/package.json b/apps/app/package.json index 9ed027b2a..8a5259531 100644 --- a/apps/app/package.json +++ b/apps/app/package.json @@ -13,6 +13,7 @@ }, "dependencies": { "@modrinth/app-frontend": "workspace:*", - "@modrinth/app-lib": "workspace:*" + "@modrinth/app-lib": "workspace:*", + "@modrinth/daedalus": "workspace:*" } } \ No newline at end of file diff --git a/apps/daedalus_client/.env b/apps/daedalus_client/.env new file mode 100644 index 000000000..9aac220ad --- /dev/null +++ b/apps/daedalus_client/.env @@ -0,0 +1,15 @@ +RUST_LOG=warn,daedalus_client=trace + +BASE_URL=http://localhost:9000/meta + +CONCURRENCY_LIMIT=10 + +S3_ACCESS_TOKEN=none +S3_SECRET=none +S3_URL=http://localhost:9000 +S3_REGION=path-style +S3_BUCKET_NAME=meta + +CLOUDFLARE_INTEGRATION=false +CLOUDFLARE_TOKEN=none +CLOUDFLARE_ZONE_ID=none \ No newline at end of file diff --git a/apps/daedalus_client/Cargo.toml b/apps/daedalus_client/Cargo.toml new file mode 100644 index 000000000..37acaeb10 --- /dev/null +++ b/apps/daedalus_client/Cargo.toml @@ -0,0 +1,33 @@ +[package] +name = "daedalus_client" +version = "0.2.2" +authors = ["Jai A "] +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +daedalus = { path = "../../packages/daedalus" } +tokio = { version = "1", features = ["full"] } +futures = "0.3.25" +dotenvy = "0.15.6" +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +serde-xml-rs = "0.6.0" +lazy_static = "1.4.0" +thiserror = "1.0" +reqwest = { version = "0.12.5", features = ["stream", "json", "rustls-tls"] } +async_zip = { version = "0.0.17", features = ["full"] } +semver = "1.0" +chrono = { version = "0.4", features = ["serde"] } +bytes = "1.6.0" +rust-s3 = "0.34.0" +dashmap = "5.5.3" +sha1_smol = { version = "1.0.0", features = ["std"] } +indexmap = { version = "2.2.6", features = ["serde"]} +itertools = "0.13.0" +tracing-error = "0.2.0" + +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } +tracing-futures = { version = "0.2.5", features = ["futures", "tokio"] } \ No newline at end of file diff --git a/apps/daedalus_client/Dockerfile b/apps/daedalus_client/Dockerfile new file mode 100644 index 000000000..f47e750ea --- /dev/null +++ b/apps/daedalus_client/Dockerfile @@ -0,0 +1,21 @@ +FROM rust:1.82.0 as build +ENV PKG_CONFIG_ALLOW_CROSS=1 + +WORKDIR /usr/src/daedalus +COPY . . +RUN cargo build --release --package daedalus_client + + +FROM debian:bookworm-slim + +RUN apt-get update \ + && apt-get install -y --no-install-recommends ca-certificates openssl \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* + +RUN update-ca-certificates + +COPY --from=build /usr/src/daedalus/target/release/daedalus_client /daedalus/daedalus_client +WORKDIR /daedalus_client + +CMD /daedalus/daedalus_client diff --git a/apps/daedalus_client/LICENSE b/apps/daedalus_client/LICENSE new file mode 100644 index 000000000..bc179be0a --- /dev/null +++ b/apps/daedalus_client/LICENSE @@ -0,0 +1,7 @@ +Copyright © 2024 Rinth, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/apps/daedalus_client/README.md b/apps/daedalus_client/README.md new file mode 100644 index 000000000..7dfca0b3f --- /dev/null +++ b/apps/daedalus_client/README.md @@ -0,0 +1,9 @@ +# Daedalus + +Daedalus is a powerful tool which queries and generates metadata for the Minecraft (and other games in the future!) game +and mod loaders for: +- Performance (Serving static files can be easily cached and is extremely quick) +- Ease for Launcher Devs (Metadata is served in an easy to query and use format) +- Reliability (Provides a versioning system which ensures no breakage with updates) + +Daedalus supports the original Minecraft data and reposting for the Forge, Fabric, Quilt, and NeoForge loaders. \ No newline at end of file diff --git a/apps/daedalus_client/docker-compose.yml b/apps/daedalus_client/docker-compose.yml new file mode 100644 index 000000000..4e74e5ad8 --- /dev/null +++ b/apps/daedalus_client/docker-compose.yml @@ -0,0 +1,17 @@ +version: '3' + +services: + minio: + image: quay.io/minio/minio + volumes: + - minio-data:/data + ports: + - "9000:9000" + - "9001:9001" + environment: + MINIO_ROOT_USER: minioadmin + MINIO_ROOT_PASSWORD: miniosecret + command: server /data --console-address ":9001" + +volumes: + minio-data: \ No newline at end of file diff --git a/apps/daedalus_client/library-patches.json b/apps/daedalus_client/library-patches.json new file mode 100644 index 000000000..0acd32e09 --- /dev/null +++ b/apps/daedalus_client/library-patches.json @@ -0,0 +1,2880 @@ +[ + { + "_comment": "Only allow osx-arm64 for existing LWJGL 3.3.2/3.3.3", + "match": [ + "org.lwjgl:lwjgl-freetype-natives-macos-arm64:3.3.2", + "org.lwjgl:lwjgl-glfw-natives-macos-arm64:3.3.2", + "org.lwjgl:lwjgl-jemalloc-natives-macos-arm64:3.3.2", + "org.lwjgl:lwjgl-openal-natives-macos-arm64:3.3.2", + "org.lwjgl:lwjgl-opengl-natives-macos-arm64:3.3.2", + "org.lwjgl:lwjgl-stb-natives-macos-arm64:3.3.2", + "org.lwjgl:lwjgl-tinyfd-natives-macos-arm64:3.3.2", + "org.lwjgl:lwjgl-natives-macos-arm64:3.3.2", + "org.lwjgl:lwjgl-freetype-natives-macos-arm64:3.3.3", + "org.lwjgl:lwjgl-glfw-natives-macos-arm64:3.3.3", + "org.lwjgl:lwjgl-jemalloc-natives-macos-arm64:3.3.3", + "org.lwjgl:lwjgl-openal-natives-macos-arm64:3.3.3", + "org.lwjgl:lwjgl-opengl-natives-macos-arm64:3.3.3", + "org.lwjgl:lwjgl-stb-natives-macos-arm64:3.3.3", + "org.lwjgl:lwjgl-tinyfd-natives-macos-arm64:3.3.3", + "org.lwjgl:lwjgl-natives-macos-arm64:3.3.3" + ], + "override": { + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + }, + { + "_comment": "Only allow windows-arm64 for existing LWJGL 3.3.2/3.3.3", + "match": [ + "org.lwjgl:lwjgl-freetype-natives-windows-arm64:3.3.2", + "org.lwjgl:lwjgl-glfw-natives-windows-arm64:3.3.2", + "org.lwjgl:lwjgl-jemalloc-natives-windows-arm64:3.3.2", + "org.lwjgl:lwjgl-openal-natives-windows-arm64:3.3.2", + "org.lwjgl:lwjgl-opengl-natives-windows-arm64:3.3.2", + "org.lwjgl:lwjgl-stb-natives-windows-arm64:3.3.2", + "org.lwjgl:lwjgl-tinyfd-natives-windows-arm64:3.3.2", + "org.lwjgl:lwjgl-natives-windows-arm64:3.3.2", + "org.lwjgl:lwjgl-freetype-natives-windows-arm64:3.3.3", + "org.lwjgl:lwjgl-glfw-natives-windows-arm64:3.3.3", + "org.lwjgl:lwjgl-jemalloc-natives-windows-arm64:3.3.3", + "org.lwjgl:lwjgl-openal-natives-windows-arm64:3.3.3", + "org.lwjgl:lwjgl-opengl-natives-windows-arm64:3.3.3", + "org.lwjgl:lwjgl-stb-natives-windows-arm64:3.3.3", + "org.lwjgl:lwjgl-tinyfd-natives-windows-arm64:3.3.3", + "org.lwjgl:lwjgl-natives-windows-arm64:3.3.3" + ], + "override": { + "rules": [ + { + "action": "allow", + "os": { + "name": "windows-arm64" + } + } + ] + } + }, + { + "_comment": "Add missing tinyfd to the broken LWJGL 3.2.2 variant", + "match": [ + "org.lwjgl:lwjgl:3.2.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "fcbe606c8f8da6f8f9a05e2c540eb1ee8632b0e9", + "size": 7092, + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl-tinyfd/3.2.2/lwjgl-tinyfd-3.2.2.jar" + } + }, + "name": "org.lwjgl:lwjgl-tinyfd:3.2.2" + }, + { + "downloads": { + "artifact": { + "sha1": "fcbe606c8f8da6f8f9a05e2c540eb1ee8632b0e9", + "size": 7092, + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl-tinyfd/3.2.2/lwjgl-tinyfd-3.2.2.jar" + }, + "classifiers": { + "natives-linux": { + "sha1": "39e35b161c130635d9c8918ce04e887a30c5b687", + "size": 38804, + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl-tinyfd/3.2.2/lwjgl-tinyfd-3.2.2-natives-linux.jar" + }, + "natives-macos": { + "sha1": "46d0798228b8a28e857a2a0f02310fd6ba2a4eab", + "size": 42136, + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl-tinyfd/3.2.2/lwjgl-tinyfd-3.2.2-natives-macos.jar" + }, + "natives-windows": { + "sha1": "e9115958773644e863332a6a06488d26f9e1fc9f", + "size": 208314, + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl-tinyfd/3.2.2/lwjgl-tinyfd-3.2.2-natives-windows.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-tinyfd:3.2.2", + "natives": { + "linux": "natives-linux", + "osx": "natives-macos", + "windows": "natives-windows" + } + } + ], + "patchAdditionalLibraries": true + }, + { + "_comment": "Add additional library just for osx-arm64. No override needed", + "match": [ + "ca.weblite:java-objc-bridge:1.0.0" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "369a83621e3c65496348491e533cb97fe5f2f37d", + "size": 91947, + "url": "https://github.com/MinecraftMachina/Java-Objective-C-Bridge/releases/download/1.1.0-mmachina.1/java-objc-bridge-1.1.jar" + } + }, + "name": "ca.weblite:java-objc-bridge:1.1.0-mmachina.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add additional classifiers for jinput-platform", + "match": [ + "net.java.jinput:jinput-platform:2.0.5" + ], + "override": { + "downloads": { + "classifiers": { + "natives-osx-arm64": { + "sha1": "5189eb40db3087fb11ca063b68fa4f4c20b199dd", + "size": 10031, + "url": "https://github.com/r58Playz/jinput-m1/raw/main/plugins/OSX/bin/jinput-platform-2.0.5.jar" + }, + "natives-linux-arm64": { + "sha1": "42b388ccb7c63cec4e9f24f4dddef33325f8b212", + "size": 10932, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-2.9.4/jinput-platform-2.0.5-natives-linux.jar" + }, + "natives-linux-arm32": { + "sha1": "f3c455b71c5146acb5f8a9513247fc06db182fd5", + "size": 4521, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-2.9.4/jinput-platform-2.0.5-natives-linux.jar" + } + } + }, + "natives": { + "linux-arm64": "natives-linux-arm64", + "linux-arm32": "natives-linux-arm32", + "osx-arm64": "natives-osx-arm64" + } + } + }, + { + "_comment": "Use a newer version on osx-arm64", + "match": [ + "com.mojang:text2speech:1.0.10", + "com.mojang:text2speech:1.5", + "com.mojang:text2speech:1.6", + "com.mojang:text2speech:1.7", + "com.mojang:text2speech:1.10.1", + "com.mojang:text2speech:1.10.3", + "com.mojang:text2speech:1.11.2" + ], + "override": { + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "f378f889797edd7df8d32272c06ca80a1b6b0f58", + "size": 13164, + "url": "https://libraries.minecraft.net/com/mojang/text2speech/1.11.3/text2speech-1.11.3.jar" + } + }, + "name": "com.mojang:text2speech:1.11.3", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Use a newer version on osx-arm64, linux-arm64, and linux-arm32", + "match": [ + "org.lwjgl.lwjgl:lwjgl:2.9.3", + "org.lwjgl.lwjgl:lwjgl:2.9.1-nightly-20131120", + "org.lwjgl.lwjgl:lwjgl:2.9.1-nightly-20131017", + "org.lwjgl.lwjgl:lwjgl:2.9.1-nightly-20130708-debug3", + "org.lwjgl.lwjgl:lwjgl:2.9.1" + ], + "override": { + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "osx-arm64" + } + }, + { + "action": "disallow", + "os": { + "name": "linux-arm64" + } + }, + { + "action": "disallow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "697517568c68e78ae0b4544145af031c81082dfe", + "size": 1047168, + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl/2.9.4-nightly-20150209/lwjgl-2.9.4-nightly-20150209.jar" + } + }, + "name": "org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + }, + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + }, + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Use a newer version on osx-arm64, linux-arm64, and linux-arm32", + "match": [ + "org.lwjgl.lwjgl:lwjgl_util:2.9.3", + "org.lwjgl.lwjgl:lwjgl_util:2.9.1-nightly-20131120", + "org.lwjgl.lwjgl:lwjgl_util:2.9.1-nightly-20131017", + "org.lwjgl.lwjgl:lwjgl_util:2.9.1-nightly-20130708-debug3", + "org.lwjgl.lwjgl:lwjgl_util:2.9.1" + ], + "override": { + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "osx-arm64" + } + }, + { + "action": "disallow", + "os": { + "name": "linux-arm64" + } + }, + { + "action": "disallow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "d51a7c040a721d13efdfbd34f8b257b2df882ad0", + "size": 173887, + "url": "https://libraries.minecraft.net/org/lwjgl/lwjgl/lwjgl_util/2.9.4-nightly-20150209/lwjgl_util-2.9.4-nightly-20150209.jar" + } + }, + "name": "org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + }, + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + }, + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Use a newer patched version on osx-arm64, linux-arm64, and linux-arm32", + "match": [ + "org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209", + "org.lwjgl.lwjgl:lwjgl-platform:2.9.3", + "org.lwjgl.lwjgl:lwjgl-platform:2.9.1-nightly-20131120", + "org.lwjgl.lwjgl:lwjgl-platform:2.9.1-nightly-20131017", + "org.lwjgl.lwjgl:lwjgl-platform:2.9.1-nightly-20130708-debug3", + "org.lwjgl.lwjgl:lwjgl-platform:2.9.1" + ], + "override": { + "downloads": { + "classifiers": { + "natives-osx-arm64": { + "sha1": "eff546c0b319d6ffc7a835652124c18089c67f36", + "size": 488316, + "url": "https://github.com/MinecraftMachina/lwjgl/releases/download/2.9.4-20150209-mmachina.2/lwjgl-platform-2.9.4-nightly-20150209-natives-osx.jar" + }, + "natives-linux-arm64": { + "sha1": "63ac7da0f4a4785c7eadc0f8edc1e9dcc4dd08cb", + "size": 579979, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-2.9.4/lwjgl-platform-2.9.4-nightly-20150209-natives-linux.jar" + }, + "natives-linux-arm32": { + "sha1": "fa483e540a9a753a5ffbb23dcf7879a5bf752611", + "size": 475177, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-2.9.4/lwjgl-platform-2.9.4-nightly-20150209-natives-linux.jar" + } + } + }, + "natives": { + "linux-arm64": "natives-linux-arm64", + "linux-arm32": "natives-linux-arm32", + "osx-arm64": "natives-osx-arm64" + } + } + }, + { + "_comment": "Use a newer patched version on osx-arm64, linux-arm64, and linux-arm32", + "match": [ + "org.lwjgl:lwjgl-glfw:3.2.2", + "org.lwjgl:lwjgl-glfw:3.2.1", + "org.lwjgl:lwjgl-glfw:3.1.6", + "org.lwjgl:lwjgl-glfw:3.1.2" + ], + "override": { + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "linux-arm64" + } + }, + { + "action": "disallow", + "os": { + "name": "linux-arm32" + } + }, + { + "action": "disallow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "155d175037efc76630940c197ca6dea2b17d7e18", + "size": 108691, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-glfw.jar" + } + }, + "name": "org.lwjgl:lwjgl-glfw:3.2.2-gman64.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "155d175037efc76630940c197ca6dea2b17d7e18", + "size": 108691, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-glfw.jar" + }, + "classifiers": { + "natives-linux-arm64": { + "sha1": "074ad243761147df0d060fbefc814614d2ff75cc", + "size": 85072, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-glfw-natives-linux-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-glfw:3.2.2-gman64.1", + "natives": { + "linux-arm64": "natives-linux-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "99e9a39fa8ed4167e3ff9e04d47eb32c9e69804d", + "size": 108691, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-glfw.jar" + } + }, + "name": "org.lwjgl:lwjgl-glfw:3.2.2-gman32.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "99e9a39fa8ed4167e3ff9e04d47eb32c9e69804d", + "size": 108691, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-glfw.jar" + }, + "classifiers": { + "natives-linux-arm32": { + "sha1": "4265f2fbe3b9d642591165165a17cf406cf7b98e", + "size": 80186, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-glfw-natives-linux-arm32.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-glfw:3.2.2-gman32.1", + "natives": { + "linux-arm32": "natives-linux-arm32" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "e9a101bca4fa30d26b21b526ff28e7c2d8927f1b", + "size": 130128, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-glfw.jar" + } + }, + "name": "org.lwjgl:lwjgl-glfw:3.3.1-mmachina.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "e9a101bca4fa30d26b21b526ff28e7c2d8927f1b", + "size": 130128, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-glfw.jar" + }, + "classifiers": { + "natives-osx-arm64": { + "sha1": "71d793d0a5a42e3dfe78eb882abc2523a2c6b496", + "size": 129076, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-glfw-natives-macos-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-glfw:3.3.1-mmachina.1", + "natives": { + "osx-arm64": "natives-osx-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Use a newer patched version on osx-arm64, linux-arm64, and linux-arm32", + "match": [ + "org.lwjgl:lwjgl-jemalloc:3.2.2", + "org.lwjgl:lwjgl-jemalloc:3.2.1", + "org.lwjgl:lwjgl-jemalloc:3.1.6", + "org.lwjgl:lwjgl-jemalloc:3.1.2" + ], + "override": { + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "linux-arm64" + } + }, + { + "action": "disallow", + "os": { + "name": "linux-arm32" + } + }, + { + "action": "disallow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "cc04eec29b2fa8c298791af9800a3766d9617954", + "size": 33790, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-jemalloc.jar" + } + }, + "name": "org.lwjgl:lwjgl-jemalloc:3.2.2-gman64.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "cc04eec29b2fa8c298791af9800a3766d9617954", + "size": 33790, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-jemalloc.jar" + }, + "classifiers": { + "natives-linux-arm64": { + "sha1": "762d7d80c9cdf3a3f3fc80c8a5f86612255edfe0", + "size": 156343, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-jemalloc-patched-natives-linux-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-jemalloc:3.2.2-gman64.2", + "natives": { + "linux-arm64": "natives-linux-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "8224ae2e8fc6d8e1a0fc7d84dc917aa3c440620c", + "size": 33790, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-jemalloc.jar" + } + }, + "name": "org.lwjgl:lwjgl-jemalloc:3.2.2-gman32.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "8224ae2e8fc6d8e1a0fc7d84dc917aa3c440620c", + "size": 33790, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-jemalloc.jar" + }, + "classifiers": { + "natives-linux-arm32": { + "sha1": "9163a2a5559ef87bc13ead8fea84417ea3928748", + "size": 134237, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-jemalloc-natives-linux-arm32.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-jemalloc:3.2.2-gman32.1", + "natives": { + "linux-arm32": "natives-linux-arm32" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "4fb94224378d3588d52d2beb172f2eeafea2d546", + "size": 36976, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-jemalloc.jar" + } + }, + "name": "org.lwjgl:lwjgl-jemalloc:3.3.1-mmachina.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "4fb94224378d3588d52d2beb172f2eeafea2d546", + "size": 36976, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-jemalloc.jar" + }, + "classifiers": { + "natives-osx-arm64": { + "sha1": "b0be721188d2e7195798780b1c5fe7eafe8091c1", + "size": 103478, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-jemalloc-natives-macos-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-jemalloc:3.3.1-mmachina.1", + "natives": { + "osx-arm64": "natives-osx-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Use a newer patched version on osx-arm64, linux-arm64, and linux-arm32", + "match": [ + "org.lwjgl:lwjgl-openal:3.2.2", + "org.lwjgl:lwjgl-openal:3.2.1", + "org.lwjgl:lwjgl-openal:3.1.6", + "org.lwjgl:lwjgl-openal:3.1.2" + ], + "override": { + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "linux-arm64" + } + }, + { + "action": "disallow", + "os": { + "name": "linux-arm32" + } + }, + { + "action": "disallow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "6dfce9dc6a9629c75b2ae01a8df7e7be80ba0261", + "size": 79582, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-openal.jar" + } + }, + "name": "org.lwjgl:lwjgl-openal:3.2.2-gman64.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "6dfce9dc6a9629c75b2ae01a8df7e7be80ba0261", + "size": 79582, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-openal.jar" + }, + "classifiers": { + "natives-linux-arm64": { + "sha1": "948e415b5b2a2c650c25b377a4a9f443b21ce92e", + "size": 469432, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-openal-natives-linux-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-openal:3.2.2-gman64.1", + "natives": { + "linux-arm64": "natives-linux-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "304f0571fd5971621ee6da86a4c1e90f6f52e2ee", + "size": 79582, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-openal.jar" + } + }, + "name": "org.lwjgl:lwjgl-openal:3.2.2-gman32.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "304f0571fd5971621ee6da86a4c1e90f6f52e2ee", + "size": 79582, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-openal.jar" + }, + "classifiers": { + "natives-linux-arm32": { + "sha1": "ecbc981fdd996492a1f6334f003ed62e5a8c0cd5", + "size": 398418, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-openal-natives-linux-arm32.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-openal:3.2.2-gman32.1", + "natives": { + "linux-arm32": "natives-linux-arm32" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "d48e753d85916fc8a200ccddc709b36e3865cc4e", + "size": 88880, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-openal.jar" + } + }, + "name": "org.lwjgl:lwjgl-openal:3.3.1-mmachina.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "d48e753d85916fc8a200ccddc709b36e3865cc4e", + "size": 88880, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-openal.jar" + }, + "classifiers": { + "natives-osx-arm64": { + "sha1": "6b80fc0b982a0723b141e88859c42d6f71bd723f", + "size": 346131, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-openal-natives-macos-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-openal:3.3.1-mmachina.1", + "natives": { + "osx-arm64": "natives-osx-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Use a newer patched version on osx-arm64, linux-arm64, and linux-arm32", + "match": [ + "org.lwjgl:lwjgl-opengl:3.2.2", + "org.lwjgl:lwjgl-opengl:3.2.1", + "org.lwjgl:lwjgl-opengl:3.1.6", + "org.lwjgl:lwjgl-opengl:3.1.2" + ], + "override": { + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "linux-arm64" + } + }, + { + "action": "disallow", + "os": { + "name": "linux-arm32" + } + }, + { + "action": "disallow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "198bc2f72e0b2eb401eb6f5999aea52909b31ac4", + "size": 937609, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-opengl.jar" + } + }, + "name": "org.lwjgl:lwjgl-opengl:3.2.2-gman64.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "198bc2f72e0b2eb401eb6f5999aea52909b31ac4", + "size": 937609, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-opengl.jar" + }, + "classifiers": { + "natives-linux-arm64": { + "sha1": "bd40897077bf7d12f562da898b18ac2c68e1f9d7", + "size": 56109, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-opengl-natives-linux-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-opengl:3.2.2-gman64.1", + "natives": { + "linux-arm64": "natives-linux-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "9762ae928d02147e716cd82e929b74a97ea9600a", + "size": 937609, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-opengl.jar" + } + }, + "name": "org.lwjgl:lwjgl-opengl:3.2.2-gman32.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "9762ae928d02147e716cd82e929b74a97ea9600a", + "size": 937609, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-opengl.jar" + }, + "classifiers": { + "natives-linux-arm32": { + "sha1": "3af5599c74dd76dd8dbb567b3f9b4963a6abeed5", + "size": 56388, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-opengl-natives-linux-arm32.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-opengl:3.2.2-gman32.1", + "natives": { + "linux-arm32": "natives-linux-arm32" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "962c2a8d2a8cdd3b89de3d78d766ab5e2133c2f4", + "size": 929233, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-opengl.jar" + } + }, + "name": "org.lwjgl:lwjgl-opengl:3.3.1-mmachina.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "962c2a8d2a8cdd3b89de3d78d766ab5e2133c2f4", + "size": 929233, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-opengl.jar" + }, + "classifiers": { + "natives-osx-arm64": { + "sha1": "bb575058e0372f515587b5d2d04ff7db185f3ffe", + "size": 41667, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-opengl-natives-macos-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-opengl:3.3.1-mmachina.1", + "natives": { + "osx-arm64": "natives-osx-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Use a newer patched version on osx-arm64, linux-arm64, and linux-arm32", + "match": [ + "org.lwjgl:lwjgl-stb:3.2.2", + "org.lwjgl:lwjgl-stb:3.2.1", + "org.lwjgl:lwjgl-stb:3.1.6", + "org.lwjgl:lwjgl-stb:3.1.2" + ], + "override": { + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "linux-arm64" + } + }, + { + "action": "disallow", + "os": { + "name": "linux-arm32" + } + }, + { + "action": "disallow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "46a5735f3eb9d17eb5dcbdd5afa194066d2a6555", + "size": 104075, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-stb.jar" + } + }, + "name": "org.lwjgl:lwjgl-stb:3.2.2-gman64.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "46a5735f3eb9d17eb5dcbdd5afa194066d2a6555", + "size": 104075, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-stb.jar" + }, + "classifiers": { + "natives-linux-arm64": { + "sha1": "077efa7d7ea41b32df5c6078e912e724cccd06db", + "size": 202038, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-stb-natives-linux-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-stb:3.2.2-gman64.1", + "natives": { + "linux-arm64": "natives-linux-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "ea979b0af45b8e689f5f47c989aa8550c148d8a2", + "size": 104075, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-stb.jar" + } + }, + "name": "org.lwjgl:lwjgl-stb:3.2.2-gman32.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "ea979b0af45b8e689f5f47c989aa8550c148d8a2", + "size": 104075, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-stb.jar" + }, + "classifiers": { + "natives-linux-arm32": { + "sha1": "ec9d70aaebd0ff76dfeecf8f00b56118bf3706b1", + "size": 149387, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-stb-natives-linux-arm32.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-stb:3.2.2-gman32.1", + "natives": { + "linux-arm32": "natives-linux-arm32" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "703e4b533e2542560e9f94d6d8bd148be1c1d572", + "size": 113273, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-stb.jar" + } + }, + "name": "org.lwjgl:lwjgl-stb:3.3.1-mmachina.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "703e4b533e2542560e9f94d6d8bd148be1c1d572", + "size": 113273, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-stb.jar" + }, + "classifiers": { + "natives-osx-arm64": { + "sha1": "98f0ad956c754723ef354d50057cc30417ef376a", + "size": 178409, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-stb-natives-macos-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-stb:3.3.1-mmachina.1", + "natives": { + "osx-arm64": "natives-osx-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Use a newer patched version on osx-arm64, linux-arm64, and linux-arm32", + "match": [ + "org.lwjgl:lwjgl-tinyfd:3.2.2", + "org.lwjgl:lwjgl-tinyfd:3.2.1", + "org.lwjgl:lwjgl-tinyfd:3.1.6", + "org.lwjgl:lwjgl-tinyfd:3.1.2" + ], + "override": { + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "linux-arm64" + } + }, + { + "action": "disallow", + "os": { + "name": "linux-arm32" + } + }, + { + "action": "disallow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "3a75b9811607633bf33c978f53964df1534a4bc1", + "size": 5571, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-tinyfd.jar" + } + }, + "name": "org.lwjgl:lwjgl-tinyfd:3.2.2-gman64.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "3a75b9811607633bf33c978f53964df1534a4bc1", + "size": 5571, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-tinyfd.jar" + }, + "classifiers": { + "natives-linux-arm64": { + "sha1": "37c744ca289b5d7ae155d79e39029488b3254e5b", + "size": 37893, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-tinyfd-natives-linux-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-tinyfd:3.2.2-gman64.1", + "natives": { + "linux-arm64": "natives-linux-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "a8c09f5b7fa24bd53ec329c231b566497a163d5b", + "size": 5571, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-tinyfd.jar" + } + }, + "name": "org.lwjgl:lwjgl-tinyfd:3.2.2-gman32.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "a8c09f5b7fa24bd53ec329c231b566497a163d5b", + "size": 5571, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-tinyfd.jar" + }, + "classifiers": { + "natives-linux-arm32": { + "sha1": "82d16054ada6633297a3108fb6d8bae98800c76f", + "size": 41663, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-tinyfd-natives-linux-arm32.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-tinyfd:3.2.2-gman32.1", + "natives": { + "linux-arm32": "natives-linux-arm32" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "1203660b3131cbb8681b17ce6437412545be95e0", + "size": 6802, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-tinyfd.jar" + } + }, + "name": "org.lwjgl:lwjgl-tinyfd:3.3.1-mmachina.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "1203660b3131cbb8681b17ce6437412545be95e0", + "size": 6802, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-tinyfd.jar" + }, + "classifiers": { + "natives-osx-arm64": { + "sha1": "015b931a2daba8f0c317d84c9d14e8e98ae56e0c", + "size": 41384, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-tinyfd-natives-macos-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl-tinyfd:3.3.1-mmachina.1", + "natives": { + "osx-arm64": "natives-osx-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Use a newer patched version on osx-arm64, linux-arm64, and linux-arm32", + "match": [ + "org.lwjgl:lwjgl:3.2.2", + "org.lwjgl:lwjgl:3.2.1", + "org.lwjgl:lwjgl:3.1.6", + "org.lwjgl:lwjgl:3.1.2" + ], + "override": { + "rules": [ + { + "action": "allow" + }, + { + "action": "disallow", + "os": { + "name": "linux-arm64" + } + }, + { + "action": "disallow", + "os": { + "name": "linux-arm32" + } + }, + { + "action": "disallow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "360899386df83d6a8407844a94478607af937f97", + "size": 318833, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-core.jar" + } + }, + "name": "org.lwjgl:lwjgl:3.2.2-gman64.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "360899386df83d6a8407844a94478607af937f97", + "size": 318833, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-core.jar" + }, + "classifiers": { + "natives-linux-arm64": { + "sha1": "612efd57d12b2e48e554858eb35e7e2eb46ebb4c", + "size": 87121, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.2.2/lwjgl-natives-linux-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl:3.2.2-gman64.1", + "natives": { + "linux-arm64": "natives-linux-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "16ea3934fca417368250d1ddac01a30c1809d317", + "size": 318413, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-core.jar" + } + }, + "name": "org.lwjgl:lwjgl:3.2.2-gman32.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "16ea3934fca417368250d1ddac01a30c1809d317", + "size": 318413, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-core.jar" + }, + "classifiers": { + "natives-linux-arm32": { + "sha1": "6bd0b37fef777a309936a72dc7f63126e8c79ea5", + "size": 90296, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm32/raw/lwjgl-3.2.2/lwjgl-natives-linux-arm32.jar" + } + } + }, + "name": "org.lwjgl:lwjgl:3.2.2-gman32.1", + "natives": { + "linux-arm32": "natives-linux-arm32" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "8e664dd69ad7bbcf2053da23efc7848e39e498db", + "size": 719038, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl.jar" + } + }, + "name": "org.lwjgl:lwjgl:3.3.1-mmachina.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + }, + { + "downloads": { + "artifact": { + "sha1": "8e664dd69ad7bbcf2053da23efc7848e39e498db", + "size": 719038, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl.jar" + }, + "classifiers": { + "natives-osx-arm64": { + "sha1": "984df31fadaab86838877b112e5b4e4f68a00ccf", + "size": 42693, + "url": "https://github.com/MinecraftMachina/lwjgl3/releases/download/3.3.1-mmachina.1/lwjgl-natives-macos-arm64.jar" + } + } + }, + "name": "org.lwjgl:lwjgl:3.3.1-mmachina.1", + "natives": { + "osx-arm64": "natives-osx-arm64" + }, + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Only allow osx-arm64 for existing LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-glfw-natives-macos-arm64:3.3.1", + "org.lwjgl:lwjgl-jemalloc-natives-macos-arm64:3.3.1", + "org.lwjgl:lwjgl-openal-natives-macos-arm64:3.3.1", + "org.lwjgl:lwjgl-opengl-natives-macos-arm64:3.3.1", + "org.lwjgl:lwjgl-stb-natives-macos-arm64:3.3.1", + "org.lwjgl:lwjgl-tinyfd-natives-macos-arm64:3.3.1", + "org.lwjgl:lwjgl-natives-macos-arm64:3.3.1" + ], + "override": { + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + }, + { + "_comment": "Only allow osx-arm64 for existing java-objc-bridge:1.1", + "match": [ + "ca.weblite:java-objc-bridge:1.1" + ], + "override": { + "rules": [ + { + "action": "allow", + "os": { + "name": "osx-arm64" + } + } + ] + } + }, + { + "_comment": "Only allow windows-arm64 for existing LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-glfw-natives-windows-arm64:3.3.1", + "org.lwjgl:lwjgl-jemalloc-natives-windows-arm64:3.3.1", + "org.lwjgl:lwjgl-openal-natives-windows-arm64:3.3.1", + "org.lwjgl:lwjgl-opengl-natives-windows-arm64:3.3.1", + "org.lwjgl:lwjgl-stb-natives-windows-arm64:3.3.1", + "org.lwjgl:lwjgl-tinyfd-natives-windows-arm64:3.3.1", + "org.lwjgl:lwjgl-natives-windows-arm64:3.3.1" + ], + "override": { + "rules": [ + { + "action": "allow", + "os": { + "name": "windows-arm64" + } + } + ] + } + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-glfw:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "513eb39b866d0fe131a18d5c517087805433b029", + "size": 112350, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl-glfw/lwjgl-glfw-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-glfw-natives-linux-arm64:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-jemalloc:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "749be48a9b86ee2c3a2da5fd77511208adcfb33b", + "size": 159993, + "url": "https://github.com/theofficialgman/lwjgl3-binaries-arm64/raw/lwjgl-3.3.1/lwjgl-jemalloc-patched-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-jemalloc-natives-linux-arm64:3.3.1-gman64.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-openal:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "cf4e303257e82981b8b2e31bba3d7f8f7b8f42b2", + "size": 470743, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl-openal/lwjgl-openal-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-openal-natives-linux-arm64:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-opengl:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "1c528fb258a6e63e8fceb4482d8db0f3af10a634", + "size": 57908, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl-opengl/lwjgl-opengl-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-opengl-natives-linux-arm64:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-stb:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "8e8348a1813aad7f30aaf75ea197151ebb7beba9", + "size": 205491, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl-stb/lwjgl-stb-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-stb-natives-linux-arm64:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-tinyfd:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "964f628b7a82fd909def086c0dd9a4b84bb259ae", + "size": 42654, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl-tinyfd/lwjgl-tinyfd-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-tinyfd-natives-linux-arm64:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "b597401014acb7196c76d97e15a6288f54f1f692", + "size": 86308, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl/lwjgl-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-natives-linux-arm64:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-glfw:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "816d935933f2dd743074c4e717cc25b55720f294", + "size": 104027, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl-glfw/lwjgl-glfw-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-glfw-natives-linux-arm32:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-jemalloc:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "a96a6d6cb3876d7813fcee53c3c24f246aeba3b3", + "size": 136157, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl-jemalloc/lwjgl-jemalloc-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-jemalloc-natives-linux-arm32:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-openal:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "ffbe35d7fa5ec9b7eca136a7c71f24d4025a510b", + "size": 400129, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl-openal/lwjgl-openal-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-openal-natives-linux-arm32:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-opengl:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "e3550fa91097fd56e361b4370fa822220fef3595", + "size": 58474, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl-opengl/lwjgl-opengl-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-opengl-natives-linux-arm32:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-stb:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "b08226bab162c06ae69337d8a1b0ee0a3fdf0b90", + "size": 153889, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl-stb/lwjgl-stb-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-stb-natives-linux-arm32:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl-tinyfd:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "d53d331e859217a61298fcbcf8d79137f3df345c", + "size": 48061, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl-tinyfd/lwjgl-tinyfd-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-tinyfd-natives-linux-arm32:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.1", + "match": [ + "org.lwjgl:lwjgl:3.3.1" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "41a3c1dd15d6b964eb8196dde69720a3e3e5e969", + "size": 82374, + "url": "https://build.lwjgl.org/release/3.3.1/bin/lwjgl/lwjgl-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-natives-linux-arm32:3.3.1-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-freetype:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "896e7d9b8f60d7273f3d491c69270afc67ece3ce", + "size": 1073374, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-freetype/lwjgl-freetype-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-freetype-natives-linux-arm64:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-glfw:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "bc49e64bae0f7ff103a312ee8074a34c4eb034c7", + "size": 120168, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-glfw/lwjgl-glfw-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-glfw-natives-linux-arm64:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-jemalloc:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "5249f18a9ae20ea86c5816bc3107a888ce7a17d2", + "size": 206402, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-jemalloc/lwjgl-jemalloc-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-jemalloc-natives-linux-arm64:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-openal:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "22408980cc579709feaf9acb807992d3ebcf693f", + "size": 590865, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-openal/lwjgl-openal-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-openal-natives-linux-arm64:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-opengl:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "bb9eb56da6d1d549d6a767218e675e36bc568eb9", + "size": 58627, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-opengl/lwjgl-opengl-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-opengl-natives-linux-arm64:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-stb:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "11a380c37b0f03cb46db235e064528f84d736ff7", + "size": 207419, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-stb/lwjgl-stb-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-stb-natives-linux-arm64:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-tinyfd:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "93f8c5bc1984963cd79109891fb5a9d1e580373e", + "size": 43381, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-tinyfd/lwjgl-tinyfd-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-tinyfd-natives-linux-arm64:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "8bd89332c90a90e6bc4aa997a25c05b7db02c90a", + "size": 90795, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl/lwjgl-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-natives-linux-arm64:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-freetype:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "b7f77ceb951182659fd400437272aa7e96709968", + "size": 924657, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-freetype/lwjgl-freetype-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-freetype-natives-linux-arm32:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-glfw:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "5907d9a6b7c44fb0612a63bb1cff5992588f65be", + "size": 110067, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-glfw/lwjgl-glfw-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-glfw-natives-linux-arm32:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-jemalloc:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "9367437ce192e4d6f5725d53d85520644c0b0d6f", + "size": 177571, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-jemalloc/lwjgl-jemalloc-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-jemalloc-natives-linux-arm32:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-openal:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "7c82bbc33ef49ee4094b216c940db564b2998224", + "size": 503352, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-openal/lwjgl-openal-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-openal-natives-linux-arm32:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-opengl:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "821f9a2d1d583c44893f42b96f6977682b48a99b", + "size": 59265, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-opengl/lwjgl-opengl-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-opengl-natives-linux-arm32:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-stb:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "ca9333da184aade20757151f4615f1e27ca521ae", + "size": 154928, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-stb/lwjgl-stb-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-stb-natives-linux-arm32:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl-tinyfd:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "807e220913aa0740449ff90d3b3d825cf5f359ed", + "size": 48788, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-tinyfd/lwjgl-tinyfd-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-tinyfd-natives-linux-arm32:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.2", + "match": [ + "org.lwjgl:lwjgl:3.3.2" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "afcbfaaa46f217e98a6da4208550f71de1f2a225", + "size": 89347, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl/lwjgl-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-natives-linux-arm32:3.3.2-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-freetype:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "498965aac06c4a0d42df1fbef6bacd05bde7f974", + "size": 1093516, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-freetype/lwjgl-freetype-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-freetype-natives-linux-arm64:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-glfw:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "492a0f11f85b85899a6568f07511160c1b87cd38", + "size": 122159, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-glfw/lwjgl-glfw-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-glfw-natives-linux-arm64:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-jemalloc:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "eff8b86798191192fe2cba2dc2776109f30c239d", + "size": 209315, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-jemalloc/lwjgl-jemalloc-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-jemalloc-natives-linux-arm64:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-openal:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "ad8f302118a65bb8d615f8a2a680db58fb8f835e", + "size": 592963, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-openal/lwjgl-openal-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-openal-natives-linux-arm64:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-opengl:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "2096f6b94b2d68745d858fbfe53aacf5f0c8074c", + "size": 58625, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-opengl/lwjgl-opengl-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-opengl-natives-linux-arm64:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-stb:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "ddc177afc2be1ee8d93684b11363b80589a13fe1", + "size": 207418, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-stb/lwjgl-stb-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-stb-natives-linux-arm64:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-tinyfd:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "2823a8c955c758d0954d282888075019ef99cec7", + "size": 43864, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-tinyfd/lwjgl-tinyfd-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-tinyfd-natives-linux-arm64:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm64 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "f35d8b6ffe1ac1e3a5eb1d4e33de80f044ad5fd8", + "size": 91294, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl/lwjgl-natives-linux-arm64.jar" + } + }, + "name": "org.lwjgl:lwjgl-natives-linux-arm64:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm64" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-freetype:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "7dd3b1f751571adaf2c4dc882bc675a5d1e796e6", + "size": 942636, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-freetype/lwjgl-freetype-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-freetype-natives-linux-arm32:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-glfw:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "d9af485c32545b37dd5359b163161d42d7534dcf", + "size": 112560, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-glfw/lwjgl-glfw-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-glfw-natives-linux-arm32:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-jemalloc:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "109b6931880d02d4e65ced38928a16e41d19873e", + "size": 178324, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-jemalloc/lwjgl-jemalloc-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-jemalloc-natives-linux-arm32:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-openal:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "e1702aa09d20359d6cf5cb2999fa7685a785eca7", + "size": 505618, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-openal/lwjgl-openal-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-openal-natives-linux-arm32:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-opengl:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "dbba17fc5ac0985d14a57c11f9537617d67b9952", + "size": 59263, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-opengl/lwjgl-opengl-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-opengl-natives-linux-arm32:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-stb:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "1ae28ff044699ff29b0e980ffabd73fba8a664b3", + "size": 154931, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-stb/lwjgl-stb-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-stb-natives-linux-arm32:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl-tinyfd:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "c2a0a05c82c4b9f69ded0b6ad5f417addea78ce2", + "size": 49495, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl-tinyfd/lwjgl-tinyfd-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-tinyfd-natives-linux-arm32:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Add linux-arm32 support for LWJGL 3.3.3", + "match": [ + "org.lwjgl:lwjgl:3.3.3" + ], + "additionalLibraries": [ + { + "downloads": { + "artifact": { + "sha1": "2075c51a80f0ef0f22ba616ba54007ac2b0debd4", + "size": 89565, + "url": "https://build.lwjgl.org/release/3.3.3/bin/lwjgl/lwjgl-natives-linux-arm32.jar" + } + }, + "name": "org.lwjgl:lwjgl-natives-linux-arm32:3.3.3-lwjgl.1", + "rules": [ + { + "action": "allow", + "os": { + "name": "linux-arm32" + } + } + ] + } + ] + }, + { + "_comment": "Replace glfw from 3.3.1 with version from 3.3.2 to prevent stack smashing", + "match": [ + "org.lwjgl:lwjgl-glfw-natives-linux:3.3.1", + "org.lwjgl:lwjgl-glfw:3.3.1:natives-linux" + ], + "override": { + "downloads": { + "artifact": { + "sha1": "0766bb0e8e829598b1c8052fd8173c62af741c52", + "size": 115553, + "url": "https://build.lwjgl.org/release/3.3.2/bin/lwjgl-glfw/lwjgl-glfw-natives-linux.jar" + } + }, + "name": "org.lwjgl:lwjgl-glfw-natives-linux:3.3.2-lwjgl.1" + } + } +] diff --git a/apps/daedalus_client/package.json b/apps/daedalus_client/package.json new file mode 100644 index 000000000..71fb2ebb1 --- /dev/null +++ b/apps/daedalus_client/package.json @@ -0,0 +1,13 @@ +{ + "name": "@modrinth/daedalus_client", + "scripts": { + "build": "cargo build --release", + "lint": "cargo fmt --check && cargo clippy --all-targets --all-features -- -D warnings", + "fix": "cargo fmt && cargo clippy --fix", + "dev": "cargo run", + "test": "cargo test" + }, + "dependencies": { + "@modrinth/daedalus": "workspace:*" + } +} \ No newline at end of file diff --git a/apps/daedalus_client/src/error.rs b/apps/daedalus_client/src/error.rs new file mode 100644 index 000000000..d4a0167cb --- /dev/null +++ b/apps/daedalus_client/src/error.rs @@ -0,0 +1,63 @@ +use tracing_error::InstrumentError; + +#[derive(thiserror::Error, Debug)] +pub enum ErrorKind { + #[error("Daedalus Error: {0}")] + Daedalus(#[from] daedalus::Error), + #[error("Invalid input: {0}")] + InvalidInput(String), + #[error("Error while managing asynchronous tasks")] + TaskError(#[from] tokio::task::JoinError), + #[error("Error while deserializing JSON: {0}")] + SerdeJSON(#[from] serde_json::Error), + #[error("Error while deserializing XML: {0}")] + SerdeXML(#[from] serde_xml_rs::Error), + #[error("Failed to validate file checksum at url {url} with hash {hash} after {tries} tries")] + ChecksumFailure { + hash: String, + url: String, + tries: u32, + }, + #[error("Unable to fetch {item}")] + Fetch { inner: reqwest::Error, item: String }, + #[error("Error while uploading file to S3: {file}")] + S3 { + inner: s3::error::S3Error, + file: String, + }, + #[error("Error acquiring semaphore: {0}")] + Acquire(#[from] tokio::sync::AcquireError), + #[error("Tracing error: {0}")] + Tracing(#[from] tracing::subscriber::SetGlobalDefaultError), + #[error("Zip error: {0}")] + Zip(#[from] async_zip::error::ZipError), +} + +#[derive(Debug)] +pub struct Error { + pub source: tracing_error::TracedError, +} + +impl std::fmt::Display for Error { + fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + write!(fmt, "{}", self.source) + } +} + +impl> From for Error { + fn from(source: E) -> Self { + let error = Into::::into(source); + + Self { + source: error.in_current_span(), + } + } +} + +impl ErrorKind { + pub fn as_error(self) -> Error { + self.into() + } +} + +pub type Result = core::result::Result; diff --git a/apps/daedalus_client/src/fabric.rs b/apps/daedalus_client/src/fabric.rs new file mode 100644 index 000000000..2c394bc23 --- /dev/null +++ b/apps/daedalus_client/src/fabric.rs @@ -0,0 +1,301 @@ +use crate::util::{download_file, fetch_json, format_url}; +use crate::{insert_mirrored_artifact, Error, MirrorArtifact, UploadFile}; +use daedalus::modded::{Manifest, PartialVersionInfo, DUMMY_REPLACE_STRING}; +use dashmap::DashMap; +use serde::Deserialize; +use std::sync::Arc; +use tokio::sync::Semaphore; + +#[tracing::instrument(skip(semaphore, upload_files, mirror_artifacts))] +pub async fn fetch_fabric( + semaphore: Arc, + upload_files: &DashMap, + mirror_artifacts: &DashMap, +) -> Result<(), Error> { + fetch( + daedalus::modded::CURRENT_FABRIC_FORMAT_VERSION, + "fabric", + "https://meta.fabricmc.net/v2", + "https://maven.fabricmc.net/", + &[], + semaphore, + upload_files, + mirror_artifacts, + ) + .await +} + +#[tracing::instrument(skip(semaphore, upload_files, mirror_artifacts))] +pub async fn fetch_quilt( + semaphore: Arc, + upload_files: &DashMap, + mirror_artifacts: &DashMap, +) -> Result<(), Error> { + fetch( + daedalus::modded::CURRENT_QUILT_FORMAT_VERSION, + "quilt", + "https://meta.quiltmc.org/v3", + "https://maven.quiltmc.org/repository/release/", + &[ + // This version is broken as it contains invalid library coordinates + "0.17.5-beta.4", + ], + semaphore, + upload_files, + mirror_artifacts, + ) + .await +} + +#[allow(clippy::too_many_arguments)] +#[tracing::instrument(skip(semaphore, upload_files, mirror_artifacts))] +async fn fetch( + format_version: usize, + mod_loader: &str, + meta_url: &str, + maven_url: &str, + skip_versions: &[&str], + semaphore: Arc, + upload_files: &DashMap, + mirror_artifacts: &DashMap, +) -> Result<(), Error> { + let modrinth_manifest = fetch_json::( + &format_url(&format!("{mod_loader}/v{format_version}/manifest.json",)), + &semaphore, + ) + .await + .ok(); + let fabric_manifest = fetch_json::( + &format!("{meta_url}/versions"), + &semaphore, + ) + .await?; + + // We check Modrinth's fabric version manifest and compare if the fabric version exists in Modrinth's database + // We also check intermediary versions that are newly added to query + let (fetch_fabric_versions, fetch_intermediary_versions) = + if let Some(modrinth_manifest) = modrinth_manifest { + let (mut fetch_versions, mut fetch_intermediary_versions) = + (Vec::new(), Vec::new()); + + for version in &fabric_manifest.loader { + if !modrinth_manifest + .game_versions + .iter() + .any(|x| x.loaders.iter().any(|x| x.id == version.version)) + && !skip_versions.contains(&&*version.version) + { + fetch_versions.push(version); + } + } + + for version in &fabric_manifest.intermediary { + if !modrinth_manifest + .game_versions + .iter() + .any(|x| x.id == version.version) + && fabric_manifest + .game + .iter() + .any(|x| x.version == version.version) + { + fetch_intermediary_versions.push(version); + } + } + + (fetch_versions, fetch_intermediary_versions) + } else { + ( + fabric_manifest + .loader + .iter() + .filter(|x| !skip_versions.contains(&&*x.version)) + .collect(), + fabric_manifest.intermediary.iter().collect(), + ) + }; + + const DUMMY_GAME_VERSION: &str = "1.21"; + + if !fetch_intermediary_versions.is_empty() { + for x in &fetch_intermediary_versions { + insert_mirrored_artifact( + &x.maven, + None, + vec![maven_url.to_string()], + false, + mirror_artifacts, + )?; + } + } + + if !fetch_fabric_versions.is_empty() { + let fabric_version_manifest_urls = fetch_fabric_versions + .iter() + .map(|x| { + format!( + "{}/versions/loader/{}/{}/profile/json", + meta_url, DUMMY_GAME_VERSION, x.version + ) + }) + .collect::>(); + let fabric_version_manifests = futures::future::try_join_all( + fabric_version_manifest_urls + .iter() + .map(|x| download_file(x, None, &semaphore)), + ) + .await? + .into_iter() + .map(|x| serde_json::from_slice(&x)) + .collect::, serde_json::Error>>()?; + + let patched_version_manifests = fabric_version_manifests + .into_iter() + .map(|mut version_info| { + for lib in &mut version_info.libraries { + let new_name = lib + .name + .replace(DUMMY_GAME_VERSION, DUMMY_REPLACE_STRING); + + // Hard-code: This library is not present on fabric's maven, so we fetch it from MC libraries + if &*lib.name == "net.minecraft:launchwrapper:1.12" { + lib.url = Some( + "https://libraries.minecraft.net/".to_string(), + ); + } + + // If a library is not intermediary, we add it to mirror artifacts to be mirrored + if lib.name == new_name { + insert_mirrored_artifact( + &new_name, + None, + vec![lib + .url + .clone() + .unwrap_or_else(|| maven_url.to_string())], + false, + mirror_artifacts, + )?; + } else { + lib.name = new_name; + } + + lib.url = Some(format_url("maven/")); + } + + version_info.id = version_info + .id + .replace(DUMMY_GAME_VERSION, DUMMY_REPLACE_STRING); + version_info.inherits_from = version_info + .inherits_from + .replace(DUMMY_GAME_VERSION, DUMMY_REPLACE_STRING); + + Ok(version_info) + }) + .collect::, Error>>()?; + let serialized_version_manifests = patched_version_manifests + .iter() + .map(|x| serde_json::to_vec(x).map(bytes::Bytes::from)) + .collect::, serde_json::Error>>()?; + + serialized_version_manifests + .into_iter() + .enumerate() + .for_each(|(index, bytes)| { + let loader = fetch_fabric_versions[index]; + + let version_path = format!( + "{mod_loader}/v{format_version}/versions/{}.json", + loader.version + ); + + upload_files.insert( + version_path, + UploadFile { + file: bytes, + content_type: Some("application/json".to_string()), + }, + ); + }); + } + + if !fetch_fabric_versions.is_empty() + || !fetch_intermediary_versions.is_empty() + { + let fabric_manifest_path = + format!("{mod_loader}/v{format_version}/manifest.json",); + + let loader_versions = daedalus::modded::Version { + id: DUMMY_REPLACE_STRING.to_string(), + stable: true, + loaders: fabric_manifest + .loader + .into_iter() + .map(|x| { + let version_path = format!( + "{mod_loader}/v{format_version}/versions/{}.json", + x.version, + ); + + daedalus::modded::LoaderVersion { + id: x.version, + url: format_url(&version_path), + stable: x.stable, + } + }) + .collect(), + }; + + let manifest = daedalus::modded::Manifest { + game_versions: std::iter::once(loader_versions) + .chain(fabric_manifest.game.into_iter().map(|x| { + daedalus::modded::Version { + id: x.version, + stable: x.stable, + loaders: vec![], + } + })) + .collect(), + }; + + upload_files.insert( + fabric_manifest_path, + UploadFile { + file: bytes::Bytes::from(serde_json::to_vec(&manifest)?), + content_type: Some("application/json".to_string()), + }, + ); + } + + Ok(()) +} + +#[derive(Deserialize, Debug, Clone)] +struct FabricVersions { + pub loader: Vec, + pub game: Vec, + #[serde(alias = "hashed")] + pub intermediary: Vec, +} + +#[derive(Deserialize, Debug, Clone)] +struct FabricLoaderVersion { + // pub separator: String, + // pub build: u32, + // pub maven: String, + pub version: String, + #[serde(default)] + pub stable: bool, +} + +#[derive(Deserialize, Debug, Clone)] +struct FabricIntermediaryVersion { + pub maven: String, + pub version: String, +} + +#[derive(Deserialize, Debug, Clone)] +struct FabricGameVersion { + pub version: String, + pub stable: bool, +} diff --git a/apps/daedalus_client/src/forge.rs b/apps/daedalus_client/src/forge.rs new file mode 100644 index 000000000..b36266556 --- /dev/null +++ b/apps/daedalus_client/src/forge.rs @@ -0,0 +1,791 @@ +use crate::util::{download_file, fetch_json, fetch_xml, format_url}; +use crate::{insert_mirrored_artifact, Error, MirrorArtifact, UploadFile}; +use chrono::{DateTime, Utc}; +use daedalus::get_path_from_artifact; +use daedalus::modded::PartialVersionInfo; +use dashmap::DashMap; +use futures::io::Cursor; +use indexmap::IndexMap; +use itertools::Itertools; +use serde::de::DeserializeOwned; +use serde::Deserialize; +use std::collections::HashMap; +use std::sync::Arc; +use tokio::sync::Semaphore; + +#[tracing::instrument(skip(semaphore, upload_files, mirror_artifacts))] +pub async fn fetch_forge( + semaphore: Arc, + upload_files: &DashMap, + mirror_artifacts: &DashMap, +) -> Result<(), Error> { + let forge_manifest = fetch_json::>>( + "https://files.minecraftforge.net/net/minecraftforge/forge/maven-metadata.json", + &semaphore, + ) + .await?; + + let mut format_version = 0; + + let forge_versions = forge_manifest.into_iter().flat_map(|(game_version, versions)| versions.into_iter().map(|loader_version| { + // Forge versions can be in these specific formats: + // 1.10.2-12.18.1.2016-failtests + // 1.9-12.16.0.1886 + // 1.9-12.16.0.1880-1.9 + // 1.14.4-28.1.30 + // This parses them to get the actual Forge version. Ex: 1.15.2-31.1.87 -> 31.1.87 + let version_split = loader_version.split('-').nth(1).unwrap_or(&loader_version).to_string(); + + // Forge has 3 installer formats: + // - Format 0 (Unsupported ATM): Forge Legacy (pre-1.5.2). Uses Binary Patch method to install + // To install: Download patch, download minecraft client JAR. Combine patch and client JAR and delete META-INF/. + // (pre-1.3-2) Client URL: https://maven.minecraftforge.net/net/minecraftforge/forge/{version}/forge-{version}-client.zip + // (pre-1.3-2) Server URL: https://maven.minecraftforge.net/net/minecraftforge/forge/{version}/forge-{version}-server.zip + // (1.3-2-onwards) Universal URL: https://maven.minecraftforge.net/net/minecraftforge/forge/{version}/forge-{version}-universal.zip + // - Format 1: Forge Installer Legacy (1.5.2-1.12.2ish) + // To install: Extract install_profile.json from archive. "versionInfo" is the profile's version info. Convert it to the modern format + // Extract forge library from archive. Path is at "install"."path". + // - Format 2: Forge Installer Modern + // To install: Extract install_profile.json from archive. Extract version.json from archive. Combine the two and extract all libraries + // which are embedded into the installer JAR. + // Then upload. The launcher will need to run processors! + if format_version != 1 && &*version_split == "7.8.0.684" { + format_version = 1; + } else if format_version != 2 && &*version_split == "14.23.5.2851" { + format_version = 2; + } + + ForgeVersion { + format_version, + installer_url: format!("https://maven.minecraftforge.net/net/minecraftforge/forge/{0}/forge-{0}-installer.jar", loader_version), + raw: loader_version, + loader_version: version_split, + game_version: game_version.clone(), + } + }) + .collect::>()) + // TODO: support format version 0 (see above) + .filter(|x| x.format_version != 0) + .filter(|x| { + // These following Forge versions are broken and cannot be installed + const BLACKLIST : &[&str] = &[ + // Not supported due to `data` field being `[]` even though the type is a map + "1.12.2-14.23.5.2851", + // Malformed Archives + "1.6.1-8.9.0.749", + "1.6.1-8.9.0.751", + "1.6.4-9.11.1.960", + "1.6.4-9.11.1.961", + "1.6.4-9.11.1.963", + "1.6.4-9.11.1.964", + ]; + + !BLACKLIST.contains(&&*x.raw) + }) + .collect::>(); + + fetch( + daedalus::modded::CURRENT_FORGE_FORMAT_VERSION, + "forge", + "https://maven.minecraftforge.net/", + forge_versions, + semaphore, + upload_files, + mirror_artifacts, + ) + .await +} + +#[tracing::instrument(skip(semaphore, upload_files, mirror_artifacts))] +pub async fn fetch_neo( + semaphore: Arc, + upload_files: &DashMap, + mirror_artifacts: &DashMap, +) -> Result<(), Error> { + #[derive(Debug, Deserialize)] + struct Metadata { + versioning: Versioning, + } + + #[derive(Debug, Deserialize)] + struct Versioning { + versions: Versions, + } + + #[derive(Debug, Deserialize)] + struct Versions { + version: Vec, + } + + let forge_versions = fetch_xml::( + "https://maven.neoforged.net/net/neoforged/forge/maven-metadata.xml", + &semaphore, + ) + .await?; + let neo_versions = fetch_xml::( + "https://maven.neoforged.net/net/neoforged/neoforge/maven-metadata.xml", + &semaphore, + ) + .await?; + + let parsed_versions = forge_versions.versioning.versions.version.into_iter().map(|loader_version| { + // NeoForge Forge versions can be in these specific formats: + // 1.20.1-47.1.74 + // 47.1.82 + // This parses them to get the actual Forge version. Ex: 1.20.1-47.1.74 -> 47.1.74 + let version_split = loader_version.split('-').nth(1).unwrap_or(&loader_version).to_string(); + + Ok(ForgeVersion { + format_version: 2, + installer_url: format!("https://maven.neoforged.net/net/neoforged/forge/{0}/forge-{0}-installer.jar", loader_version), + raw: loader_version, + loader_version: version_split, + game_version: "1.20.1".to_string(), // All NeoForge Forge versions are for 1.20.1 + }) + }).chain(neo_versions.versioning.versions.version.into_iter().map(|loader_version| { + let mut parts = loader_version.split('.'); + + // NeoForge Forge versions are in this format: 20.2.29-beta, 20.6.119 + // Where the first number is the major MC version, the second is the minor MC version, and the third is the NeoForge version + let major = parts.next().ok_or_else( + || crate::ErrorKind::InvalidInput(format!("Unable to find major game version for NeoForge {loader_version}")) + )?; + + let minor = parts.next().ok_or_else( + || crate::ErrorKind::InvalidInput(format!("Unable to find minor game version for NeoForge {loader_version}")) + )?; + + let game_version = if minor == "0" { + format!("1.{major}") + } else { + format!("1.{major}.{minor}") + }; + + Ok(ForgeVersion { + format_version: 2, + installer_url: format!("https://maven.neoforged.net/net/neoforged/neoforge/{0}/neoforge-{0}-installer.jar", loader_version), + loader_version: loader_version.clone(), + raw: loader_version, + game_version, + }) + })) + .collect::, Error>>()? + .into_iter() + .filter(|x| { + // These following Forge versions are broken and cannot be installed + const BLACKLIST : &[&str] = &[ + // Unreachable / 404 + "1.20.1-47.1.7", + "47.1.82", + ]; + + !BLACKLIST.contains(&&*x.raw) + }).collect(); + + fetch( + daedalus::modded::CURRENT_NEOFORGE_FORMAT_VERSION, + "neo", + "https://maven.neoforged.net/", + parsed_versions, + semaphore, + upload_files, + mirror_artifacts, + ) + .await +} + +#[tracing::instrument(skip( + forge_versions, + semaphore, + upload_files, + mirror_artifacts +))] +async fn fetch( + format_version: usize, + mod_loader: &str, + maven_url: &str, + forge_versions: Vec, + semaphore: Arc, + upload_files: &DashMap, + mirror_artifacts: &DashMap, +) -> Result<(), Error> { + let modrinth_manifest = fetch_json::( + &format_url(&format!("{mod_loader}/v{format_version}/manifest.json",)), + &semaphore, + ) + .await + .ok(); + + let fetch_versions = if let Some(modrinth_manifest) = modrinth_manifest { + let mut fetch_versions = Vec::new(); + + for version in &forge_versions { + if !modrinth_manifest.game_versions.iter().any(|x| { + x.id == version.game_version + && x.loaders.iter().any(|x| x.id == version.loader_version) + }) { + fetch_versions.push(version); + } + } + + fetch_versions + } else { + forge_versions.iter().collect() + }; + + if !fetch_versions.is_empty() { + let forge_installers = futures::future::try_join_all( + fetch_versions + .iter() + .map(|x| download_file(&x.installer_url, None, &semaphore)), + ) + .await?; + + #[tracing::instrument(skip(raw, upload_files, mirror_artifacts))] + async fn read_forge_installer( + raw: bytes::Bytes, + loader: &ForgeVersion, + maven_url: &str, + mod_loader: &str, + upload_files: &DashMap, + mirror_artifacts: &DashMap, + ) -> Result { + tracing::trace!( + "Reading forge installer for {}", + loader.loader_version + ); + type ZipFileReader = async_zip::base::read::seek::ZipFileReader< + Cursor, + >; + + let cursor = Cursor::new(raw); + let mut zip = ZipFileReader::new(cursor).await?; + + #[tracing::instrument(skip(zip))] + async fn read_file( + zip: &mut ZipFileReader, + file_name: &str, + ) -> Result>, Error> { + let zip_index_option = + zip.file().entries().iter().position(|f| { + f.filename().as_str().unwrap_or_default() == file_name + }); + + if let Some(zip_index) = zip_index_option { + let mut buffer = Vec::new(); + let mut reader = zip.reader_with_entry(zip_index).await?; + reader.read_to_end_checked(&mut buffer).await?; + + Ok(Some(buffer)) + } else { + Ok(None) + } + } + + #[tracing::instrument(skip(zip))] + async fn read_json( + zip: &mut ZipFileReader, + file_name: &str, + ) -> Result, Error> { + if let Some(file) = read_file(zip, file_name).await? { + Ok(Some(serde_json::from_slice(&file)?)) + } else { + Ok(None) + } + } + + if loader.format_version == 1 { + #[derive(Deserialize, Debug)] + #[serde(rename_all = "camelCase")] + struct ForgeInstallerProfileInstallDataV1 { + // pub mirror_list: String, + // pub target: String, + /// Path to the Forge universal library + pub file_path: String, + // pub logo: String, + // pub welcome: String, + // pub version: String, + /// Maven coordinates of the Forge universal library + pub path: String, + // pub profile_name: String, + pub minecraft: String, + } + + #[derive(Deserialize, Debug)] + #[serde(rename_all = "camelCase")] + struct ForgeInstallerProfileManifestV1 { + pub id: String, + pub libraries: Vec, + pub main_class: Option, + pub minecraft_arguments: Option, + pub release_time: DateTime, + pub time: DateTime, + pub type_: daedalus::minecraft::VersionType, + // pub assets: Option, + // pub inherits_from: Option, + // pub jar: Option, + } + + #[derive(Deserialize, Debug)] + #[serde(rename_all = "camelCase")] + struct ForgeInstallerProfileV1 { + pub install: ForgeInstallerProfileInstallDataV1, + pub version_info: ForgeInstallerProfileManifestV1, + } + + let install_profile = read_json::( + &mut zip, + "install_profile.json", + ) + .await? + .ok_or_else(|| { + crate::ErrorKind::InvalidInput(format!( + "No install_profile.json present for loader {}", + loader.installer_url + )) + })?; + + let forge_library = + read_file(&mut zip, &install_profile.install.file_path) + .await? + .ok_or_else(|| { + crate::ErrorKind::InvalidInput(format!( + "No forge library present for loader {}", + loader.installer_url + )) + })?; + + upload_files.insert( + format!( + "maven/{}", + get_path_from_artifact(&install_profile.install.path)? + ), + UploadFile { + file: bytes::Bytes::from(forge_library), + content_type: None, + }, + ); + + Ok(PartialVersionInfo { + id: install_profile.version_info.id, + inherits_from: install_profile.install.minecraft, + release_time: install_profile.version_info.release_time, + time: install_profile.version_info.time, + main_class: install_profile.version_info.main_class, + minecraft_arguments: install_profile + .version_info + .minecraft_arguments + .clone(), + arguments: install_profile + .version_info + .minecraft_arguments + .map(|x| { + [( + daedalus::minecraft::ArgumentType::Game, + x.split(' ') + .map(|x| { + daedalus::minecraft::Argument::Normal( + x.to_string(), + ) + }) + .collect(), + )] + .iter() + .cloned() + .collect() + }), + libraries: install_profile + .version_info + .libraries + .into_iter() + .map(|mut lib| { + // For all libraries besides the forge lib extracted, we mirror them from maven servers + // unless the URL is empty/null or available on Minecraft's servers + if let Some(ref url) = lib.url { + if lib.name == install_profile.install.path { + lib.url = Some(format_url("maven/")); + } else if !url.is_empty() + && !url.contains( + "https://libraries.minecraft.net/", + ) + { + insert_mirrored_artifact( + &lib.name, + None, + vec![ + url.clone(), + "https://maven.creeperhost.net/" + .to_string(), + maven_url.to_string(), + ], + false, + mirror_artifacts, + )?; + + lib.url = Some(format_url("maven/")); + } + } + + Ok(lib) + }) + .collect::, Error>>()?, + type_: install_profile.version_info.type_, + data: None, + processors: None, + }) + } else if loader.format_version == 2 { + #[derive(Deserialize, Debug)] + #[serde(rename_all = "camelCase")] + struct ForgeInstallerProfileV2 { + // pub spec: i32, + // pub profile: String, + // pub version: String, + // pub json: String, + // pub path: Option, + // pub minecraft: String, + pub data: HashMap, + pub libraries: Vec, + pub processors: Vec, + } + + let install_profile = read_json::( + &mut zip, + "install_profile.json", + ) + .await? + .ok_or_else(|| { + crate::ErrorKind::InvalidInput(format!( + "No install_profile.json present for loader {}", + loader.installer_url + )) + })?; + + let mut version_info = + read_json::(&mut zip, "version.json") + .await? + .ok_or_else(|| { + crate::ErrorKind::InvalidInput(format!( + "No version.json present for loader {}", + loader.installer_url + )) + })?; + + version_info.processors = Some(install_profile.processors); + version_info.libraries.extend( + install_profile.libraries.into_iter().map(|mut x| { + x.include_in_classpath = false; + + x + }), + ); + + async fn mirror_forge_library( + mut zip: ZipFileReader, + mut lib: daedalus::minecraft::Library, + maven_url: &str, + upload_files: &DashMap, + mirror_artifacts: &DashMap, + ) -> Result + { + let artifact_path = get_path_from_artifact(&lib.name)?; + + if let Some(ref mut artifact) = + lib.downloads.as_mut().and_then(|x| x.artifact.as_mut()) + { + if !artifact.url.is_empty() { + insert_mirrored_artifact( + &lib.name, + Some(artifact.sha1.clone()), + vec![artifact.url.clone()], + true, + mirror_artifacts, + )?; + + artifact.url = + format_url(&format!("maven/{}", artifact_path)); + + return Ok(lib); + } + } else if let Some(url) = &lib.url { + if !url.is_empty() { + insert_mirrored_artifact( + &lib.name, + None, + vec![ + url.clone(), + "https://libraries.minecraft.net/" + .to_string(), + "https://maven.creeperhost.net/" + .to_string(), + maven_url.to_string(), + ], + false, + mirror_artifacts, + )?; + + lib.url = Some(format_url("maven/")); + + return Ok(lib); + } + } + + // Other libraries are generally available in the "maven" directory of the installer. If they are + // not present here, they will be generated by Forge processors. + let extract_path = format!("maven/{artifact_path}"); + if let Some(file) = + read_file(&mut zip, &extract_path).await? + { + upload_files.insert( + extract_path, + UploadFile { + file: bytes::Bytes::from(file), + content_type: None, + }, + ); + + lib.url = Some(format_url("maven/")); + } else { + lib.downloadable = false; + } + + Ok(lib) + } + + version_info.libraries = futures::future::try_join_all( + version_info.libraries.into_iter().map(|lib| { + mirror_forge_library( + zip.clone(), + lib, + maven_url, + upload_files, + mirror_artifacts, + ) + }), + ) + .await?; + + // In Minecraft Forge modern installers, processors are run during the install process. Some processors + // are extracted from the installer JAR. This function finds these files, extracts them, and uploads them + // and registers them as libraries instead. + // Ex: + // "BINPATCH": { + // "client": "/data/client.lzma", + // "server": "/data/server.lzma" + // }, + // Becomes: + // "BINPATCH": { + // "client": "[net.minecraftforge:forge:1.20.3-49.0.1:shim:client@lzma]", + // "server": "[net.minecraftforge:forge:1.20.3-49.0.1:shim:server@lzma]" + // }, + // And the resulting library is added to the profile's libraries + let mut new_data = HashMap::new(); + for (key, entry) in install_profile.data { + async fn extract_data( + zip: &mut ZipFileReader, + key: &str, + value: &str, + upload_files: &DashMap, + libs: &mut Vec, + mod_loader: &str, + version: &ForgeVersion, + ) -> Result { + let extract_file = + read_file(zip, &value[1..value.len()]) + .await? + .ok_or_else(|| { + crate::ErrorKind::InvalidInput(format!( + "Unable reading data key {key} at path {value}", + )) + })?; + + let file_name = value.split('/').last() + .ok_or_else(|| { + crate::ErrorKind::InvalidInput(format!( + "Unable reading filename for data key {key} at path {value}", + + )) + })?; + + let mut file = file_name.split('.'); + let file_name = file.next() + .ok_or_else(|| { + crate::ErrorKind::InvalidInput(format!( + "Unable reading filename only for data key {key} at path {value}", + )) + })?; + let ext = file.next() + .ok_or_else(|| { + crate::ErrorKind::InvalidInput(format!( + "Unable reading extension only for data key {key} at path {value}", + )) + })?; + + let path = format!( + "com.modrinth.daedalus:{}-installer-extracts:{}:{}@{}", + mod_loader, + version.raw, + file_name, + ext + ); + + upload_files.insert( + format!("maven/{}", get_path_from_artifact(&path)?), + UploadFile { + file: bytes::Bytes::from(extract_file), + content_type: None, + }, + ); + + libs.push(daedalus::minecraft::Library { + downloads: None, + extract: None, + name: path.clone(), + url: Some(format_url("maven/")), + natives: None, + rules: None, + checksums: None, + include_in_classpath: false, + downloadable: true, + }); + + Ok(format!("[{path}]")) + } + + let client = if entry.client.starts_with('/') { + extract_data( + &mut zip, + &key, + &entry.client, + upload_files, + &mut version_info.libraries, + mod_loader, + loader, + ) + .await? + } else { + entry.client.clone() + }; + + let server = if entry.server.starts_with('/') { + extract_data( + &mut zip, + &key, + &entry.server, + upload_files, + &mut version_info.libraries, + mod_loader, + loader, + ) + .await? + } else { + entry.server.clone() + }; + + new_data.insert( + key.clone(), + daedalus::modded::SidedDataEntry { client, server }, + ); + } + + version_info.data = Some(new_data); + + Ok(version_info) + } else { + Err(crate::ErrorKind::InvalidInput(format!( + "Unknown format version {} for loader {}", + loader.format_version, loader.installer_url + )) + .into()) + } + } + + let forge_version_infos = futures::future::try_join_all( + forge_installers + .into_iter() + .enumerate() + .map(|(index, raw)| { + let loader = fetch_versions[index]; + + read_forge_installer( + raw, + loader, + maven_url, + mod_loader, + upload_files, + mirror_artifacts, + ) + }), + ) + .await?; + + let serialized_version_manifests = forge_version_infos + .iter() + .map(|x| serde_json::to_vec(x).map(bytes::Bytes::from)) + .collect::, serde_json::Error>>()?; + + serialized_version_manifests + .into_iter() + .enumerate() + .for_each(|(index, bytes)| { + let loader = fetch_versions[index]; + + let version_path = format!( + "{mod_loader}/v{format_version}/versions/{}.json", + loader.loader_version + ); + + upload_files.insert( + version_path, + UploadFile { + file: bytes, + content_type: Some("application/json".to_string()), + }, + ); + }); + + let forge_manifest_path = + format!("{mod_loader}/v{format_version}/manifest.json",); + + let manifest = daedalus::modded::Manifest { + game_versions: forge_versions + .into_iter() + .rev() + .chunk_by(|x| x.game_version.clone()) + .into_iter() + .map(|(game_version, loaders)| daedalus::modded::Version { + id: game_version, + stable: true, + loaders: loaders + .map(|x| daedalus::modded::LoaderVersion { + url: format_url(&format!( + "{mod_loader}/v{format_version}/versions/{}.json", + x.loader_version + )), + id: x.loader_version, + stable: false, + }) + .collect(), + }) + .collect(), + }; + + upload_files.insert( + forge_manifest_path, + UploadFile { + file: bytes::Bytes::from(serde_json::to_vec(&manifest)?), + content_type: Some("application/json".to_string()), + }, + ); + } + + Ok(()) +} + +#[derive(Debug)] +struct ForgeVersion { + pub format_version: usize, + pub raw: String, + pub loader_version: String, + pub game_version: String, + pub installer_url: String, +} diff --git a/apps/daedalus_client/src/main.rs b/apps/daedalus_client/src/main.rs new file mode 100644 index 000000000..870a55ec0 --- /dev/null +++ b/apps/daedalus_client/src/main.rs @@ -0,0 +1,218 @@ +use crate::util::{ + format_url, upload_file_to_bucket, upload_url_to_bucket_mirrors, + REQWEST_CLIENT, +}; +use daedalus::get_path_from_artifact; +use dashmap::{DashMap, DashSet}; +use std::sync::Arc; +use tokio::sync::Semaphore; +use tracing_error::ErrorLayer; +use tracing_subscriber::{fmt, prelude::*, EnvFilter}; + +mod error; +mod fabric; +mod forge; +mod minecraft; +pub mod util; + +pub use error::{Error, ErrorKind, Result}; + +#[tokio::main] +async fn main() -> Result<()> { + dotenvy::dotenv().ok(); + + let subscriber = tracing_subscriber::registry() + .with(fmt::layer()) + .with(EnvFilter::from_default_env()) + .with(ErrorLayer::default()); + + tracing::subscriber::set_global_default(subscriber)?; + + tracing::info!("Initialized tracing. Starting Daedalus!"); + + if check_env_vars() { + tracing::error!("Some environment variables are missing!"); + + return Ok(()); + } + + let semaphore = Arc::new(Semaphore::new( + dotenvy::var("CONCURRENCY_LIMIT") + .ok() + .and_then(|x| x.parse().ok()) + .unwrap_or(10), + )); + + // path, upload file + let upload_files: DashMap = DashMap::new(); + // path, mirror artifact + let mirror_artifacts: DashMap = DashMap::new(); + + minecraft::fetch(semaphore.clone(), &upload_files, &mirror_artifacts) + .await?; + fabric::fetch_fabric(semaphore.clone(), &upload_files, &mirror_artifacts) + .await?; + fabric::fetch_quilt(semaphore.clone(), &upload_files, &mirror_artifacts) + .await?; + forge::fetch_neo(semaphore.clone(), &upload_files, &mirror_artifacts) + .await?; + forge::fetch_forge(semaphore.clone(), &upload_files, &mirror_artifacts) + .await?; + + futures::future::try_join_all(upload_files.iter().map(|x| { + upload_file_to_bucket( + x.key().clone(), + x.value().file.clone(), + x.value().content_type.clone(), + &semaphore, + ) + })) + .await?; + + futures::future::try_join_all(mirror_artifacts.iter().map(|x| { + upload_url_to_bucket_mirrors( + format!("maven/{}", x.key()), + x.value() + .mirrors + .iter() + .map(|mirror| { + if mirror.entire_url { + mirror.path.clone() + } else { + format!("{}{}", mirror.path, x.key()) + } + }) + .collect(), + x.sha1.clone(), + &semaphore, + ) + })) + .await?; + + if dotenvy::var("CLOUDFLARE_INTEGRATION") + .ok() + .and_then(|x| x.parse::().ok()) + .unwrap_or(false) + { + if let Ok(token) = dotenvy::var("CLOUDFLARE_TOKEN") { + if let Ok(zone_id) = dotenvy::var("CLOUDFLARE_ZONE_ID") { + let cache_clears = upload_files + .into_iter() + .map(|x| format_url(&x.0)) + .chain( + mirror_artifacts + .into_iter() + .map(|x| format_url(&format!("maven/{}", x.0))), + ) + .collect::>(); + + // Cloudflare ratelimits cache clears to 500 files per request + for chunk in cache_clears.chunks(500) { + REQWEST_CLIENT.post(format!("https://api.cloudflare.com/client/v4/zones/{zone_id}/purge_cache")) + .bearer_auth(&token) + .json(&serde_json::json!({ + "files": chunk + })) + .send() + .await + .map_err(|err| { + ErrorKind::Fetch { + inner: err, + item: "cloudflare clear cache".to_string(), + } + })? + .error_for_status() + .map_err(|err| { + ErrorKind::Fetch { + inner: err, + item: "cloudflare clear cache".to_string(), + } + })?; + } + } + } + } + + Ok(()) +} + +pub struct UploadFile { + file: bytes::Bytes, + content_type: Option, +} + +pub struct MirrorArtifact { + pub sha1: Option, + pub mirrors: DashSet, +} + +#[derive(Eq, PartialEq, Hash)] +pub struct Mirror { + path: String, + entire_url: bool, +} + +#[tracing::instrument(skip(mirror_artifacts))] +pub fn insert_mirrored_artifact( + artifact: &str, + sha1: Option, + mirrors: Vec, + entire_url: bool, + mirror_artifacts: &DashMap, +) -> Result<()> { + let val = mirror_artifacts + .entry(get_path_from_artifact(artifact)?) + .or_insert(MirrorArtifact { + sha1, + mirrors: DashSet::new(), + }); + + for mirror in mirrors { + val.mirrors.insert(Mirror { + path: mirror, + entire_url, + }); + } + + Ok(()) +} + +fn check_env_vars() -> bool { + let mut failed = false; + + fn check_var(var: &str) -> bool { + if dotenvy::var(var) + .ok() + .and_then(|s| s.parse::().ok()) + .is_none() + { + tracing::warn!( + "Variable `{}` missing in dotenvy or not of type `{}`", + var, + std::any::type_name::() + ); + true + } else { + false + } + } + + failed |= check_var::("BASE_URL"); + + failed |= check_var::("S3_ACCESS_TOKEN"); + failed |= check_var::("S3_SECRET"); + failed |= check_var::("S3_URL"); + failed |= check_var::("S3_REGION"); + failed |= check_var::("S3_BUCKET_NAME"); + + if dotenvy::var("CLOUDFLARE_INTEGRATION") + .ok() + .and_then(|x| x.parse::().ok()) + .unwrap_or(false) + { + failed |= check_var::("CLOUDFLARE_TOKEN"); + failed |= check_var::("CLOUDFLARE_ZONE_ID"); + } + + failed +} diff --git a/apps/daedalus_client/src/minecraft.rs b/apps/daedalus_client/src/minecraft.rs new file mode 100644 index 000000000..e98b12044 --- /dev/null +++ b/apps/daedalus_client/src/minecraft.rs @@ -0,0 +1,230 @@ +use crate::util::fetch_json; +use crate::{ + util::download_file, util::format_url, util::sha1_async, Error, + MirrorArtifact, UploadFile, +}; +use daedalus::minecraft::{ + merge_partial_library, Library, PartialLibrary, VersionInfo, + VersionManifest, VERSION_MANIFEST_URL, +}; +use dashmap::DashMap; +use serde::Deserialize; +use std::sync::Arc; +use tokio::sync::Semaphore; + +#[tracing::instrument(skip(semaphore, upload_files, _mirror_artifacts))] +pub async fn fetch( + semaphore: Arc, + upload_files: &DashMap, + _mirror_artifacts: &DashMap, +) -> Result<(), Error> { + let modrinth_manifest = fetch_json::( + &format_url(&format!( + "minecraft/v{}/manifest.json", + daedalus::minecraft::CURRENT_FORMAT_VERSION + )), + &semaphore, + ) + .await + .ok(); + let mojang_manifest = + fetch_json::(VERSION_MANIFEST_URL, &semaphore).await?; + + // TODO: experimental snapshots: https://github.com/PrismLauncher/meta/blob/main/meta/common/mojang-minecraft-experiments.json + // TODO: old snapshots: https://github.com/PrismLauncher/meta/blob/main/meta/common/mojang-minecraft-old-snapshots.json + + // We check Modrinth's version manifest and compare if the version 1) exists in Modrinth's database and 2) is unchanged + // If they are not, we will fetch them + let (fetch_versions, existing_versions) = + if let Some(mut modrinth_manifest) = modrinth_manifest { + let (mut fetch_versions, mut existing_versions) = + (Vec::new(), Vec::new()); + + for version in mojang_manifest.versions { + if let Some(index) = modrinth_manifest + .versions + .iter() + .position(|x| x.id == version.id) + { + let modrinth_version = + modrinth_manifest.versions.remove(index); + + if modrinth_version + .original_sha1 + .as_ref() + .map(|x| x == &version.sha1) + .unwrap_or(false) + { + existing_versions.push(modrinth_version); + } else { + fetch_versions.push(version); + } + } else { + fetch_versions.push(version); + } + } + + (fetch_versions, existing_versions) + } else { + (mojang_manifest.versions, Vec::new()) + }; + + if !fetch_versions.is_empty() { + let version_manifests = futures::future::try_join_all( + fetch_versions + .iter() + .map(|x| download_file(&x.url, Some(&x.sha1), &semaphore)), + ) + .await? + .into_iter() + .map(|x| serde_json::from_slice(&x)) + .collect::, serde_json::Error>>()?; + + // Patch libraries of Minecraft versions for M-series Mac Support, Better Linux Compatibility, etc + let library_patches = fetch_library_patches()?; + let patched_version_manifests = version_manifests + .into_iter() + .map(|mut x| { + if !library_patches.is_empty() { + let mut new_libraries = Vec::new(); + for library in x.libraries { + let mut libs = patch_library(&library_patches, library); + new_libraries.append(&mut libs) + } + x.libraries = new_libraries + } + + x + }) + .collect::>(); + + // serialize + compute hashes + let serialized_version_manifests = patched_version_manifests + .iter() + .map(|x| serde_json::to_vec(x).map(bytes::Bytes::from)) + .collect::, serde_json::Error>>()?; + let hashes_version_manifests = futures::future::try_join_all( + serialized_version_manifests + .iter() + .map(|x| sha1_async(x.clone())), + ) + .await?; + + // We upload the new version manifests and add them to the versions list + let mut new_versions = patched_version_manifests + .into_iter() + .zip(serialized_version_manifests.into_iter()) + .zip(hashes_version_manifests.into_iter()) + .map(|((version, bytes), hash)| { + let version_path = format!( + "minecraft/v{}/versions/{}.json", + daedalus::minecraft::CURRENT_FORMAT_VERSION, + version.id + ); + + let url = format_url(&version_path); + upload_files.insert( + version_path, + UploadFile { + file: bytes, + content_type: Some("application/json".to_string()), + }, + ); + + daedalus::minecraft::Version { + original_sha1: fetch_versions + .iter() + .find(|x| x.id == version.id) + .map(|x| x.sha1.clone()), + id: version.id, + type_: version.type_, + url, + time: version.time, + release_time: version.release_time, + sha1: hash, + compliance_level: 1, + } + }) + .chain(existing_versions.into_iter()) + .collect::>(); + + new_versions.sort_by(|a, b| b.release_time.cmp(&a.release_time)); + + // create and upload the new manifest + let version_manifest_path = format!( + "minecraft/v{}/manifest.json", + daedalus::minecraft::CURRENT_FORMAT_VERSION + ); + + let new_manifest = VersionManifest { + latest: mojang_manifest.latest, + versions: new_versions, + }; + + upload_files.insert( + version_manifest_path, + UploadFile { + file: bytes::Bytes::from(serde_json::to_vec(&new_manifest)?), + content_type: Some("application/json".to_string()), + }, + ); + } + + Ok(()) +} + +#[derive(Deserialize, Debug)] +#[serde(rename_all = "camelCase")] +pub struct LibraryPatch { + #[serde(rename = "_comment")] + pub _comment: String, + #[serde(rename = "match")] + pub match_: Vec, + pub additional_libraries: Option>, + #[serde(rename = "override")] + pub override_: Option, + pub patch_additional_libraries: Option, +} + +fn fetch_library_patches() -> Result, Error> { + let patches = include_bytes!("../library-patches.json"); + Ok(serde_json::from_slice(patches)?) +} + +pub fn patch_library( + patches: &Vec, + mut library: Library, +) -> Vec { + let mut val = Vec::new(); + + let actual_patches = patches + .iter() + .filter(|x| x.match_.contains(&library.name)) + .collect::>(); + + if !actual_patches.is_empty() { + for patch in actual_patches { + if let Some(override_) = &patch.override_ { + library = merge_partial_library(override_.clone(), library); + } + + if let Some(additional_libraries) = &patch.additional_libraries { + for additional_library in additional_libraries { + if patch.patch_additional_libraries.unwrap_or(false) { + let mut libs = + patch_library(patches, additional_library.clone()); + val.append(&mut libs) + } else { + val.push(additional_library.clone()); + } + } + } + } + + val.push(library); + } else { + val.push(library); + } + + val +} diff --git a/apps/daedalus_client/src/util.rs b/apps/daedalus_client/src/util.rs new file mode 100644 index 000000000..b5e4b360a --- /dev/null +++ b/apps/daedalus_client/src/util.rs @@ -0,0 +1,234 @@ +use crate::{Error, ErrorKind}; +use bytes::Bytes; +use s3::creds::Credentials; +use s3::{Bucket, Region}; +use serde::de::DeserializeOwned; +use std::sync::Arc; +use tokio::sync::Semaphore; + +lazy_static::lazy_static! { + static ref BUCKET : Bucket = { + let region = dotenvy::var("S3_REGION").unwrap(); + let b = Bucket::new( + &dotenvy::var("S3_BUCKET_NAME").unwrap(), + if &*region == "r2" { + Region::R2 { + account_id: dotenvy::var("S3_URL").unwrap(), + } + } else { + Region::Custom { + region: region.clone(), + endpoint: dotenvy::var("S3_URL").unwrap(), + } + }, + Credentials::new( + Some(&*dotenvy::var("S3_ACCESS_TOKEN").unwrap()), + Some(&*dotenvy::var("S3_SECRET").unwrap()), + None, + None, + None, + ).unwrap(), + ).unwrap(); + + if region == "path-style" { + b.with_path_style() + } else { + b + } + }; +} + +lazy_static::lazy_static! { + pub static ref REQWEST_CLIENT: reqwest::Client = { + let mut headers = reqwest::header::HeaderMap::new(); + if let Ok(header) = reqwest::header::HeaderValue::from_str(&format!( + "modrinth/daedalus/{} (support@modrinth.com)", + env!("CARGO_PKG_VERSION") + )) { + headers.insert(reqwest::header::USER_AGENT, header); + } + + reqwest::Client::builder() + .tcp_keepalive(Some(std::time::Duration::from_secs(10))) + .timeout(std::time::Duration::from_secs(15)) + .default_headers(headers) + .build() + .unwrap() + }; +} + +#[tracing::instrument(skip(bytes, semaphore))] +pub async fn upload_file_to_bucket( + path: String, + bytes: Bytes, + content_type: Option, + semaphore: &Arc, +) -> Result<(), Error> { + let _permit = semaphore.acquire().await?; + let key = path.clone(); + + const RETRIES: i32 = 3; + for attempt in 1..=(RETRIES + 1) { + tracing::trace!("Attempting file upload, attempt {attempt}"); + let result = if let Some(ref content_type) = content_type { + BUCKET + .put_object_with_content_type(key.clone(), &bytes, content_type) + .await + } else { + BUCKET.put_object(key.clone(), &bytes).await + } + .map_err(|err| ErrorKind::S3 { + inner: err, + file: path.clone(), + }); + + match result { + Ok(_) => return Ok(()), + Err(_) if attempt <= RETRIES => continue, + Err(_) => { + result?; + } + } + } + unreachable!() +} + +pub async fn upload_url_to_bucket_mirrors( + upload_path: String, + mirrors: Vec, + sha1: Option, + semaphore: &Arc, +) -> Result<(), Error> { + if mirrors.is_empty() { + return Err(ErrorKind::InvalidInput( + "No mirrors provided!".to_string(), + ) + .into()); + } + + for (index, mirror) in mirrors.iter().enumerate() { + let result = upload_url_to_bucket( + upload_path.clone(), + mirror.clone(), + sha1.clone(), + semaphore, + ) + .await; + + if result.is_ok() || (result.is_err() && index == (mirrors.len() - 1)) { + return result; + } + } + + unreachable!() +} + +#[tracing::instrument(skip(semaphore))] +pub async fn upload_url_to_bucket( + path: String, + url: String, + sha1: Option, + semaphore: &Arc, +) -> Result<(), Error> { + let data = download_file(&url, sha1.as_deref(), semaphore).await?; + + upload_file_to_bucket(path, data, None, semaphore).await?; + + Ok(()) +} + +#[tracing::instrument(skip(bytes))] +pub async fn sha1_async(bytes: Bytes) -> Result { + let hash = tokio::task::spawn_blocking(move || { + sha1_smol::Sha1::from(bytes).hexdigest() + }) + .await?; + + Ok(hash) +} + +#[tracing::instrument(skip(semaphore))] +pub async fn download_file( + url: &str, + sha1: Option<&str>, + semaphore: &Arc, +) -> Result { + let _permit = semaphore.acquire().await?; + tracing::trace!("Starting file download"); + + const RETRIES: u32 = 10; + for attempt in 1..=(RETRIES + 1) { + let result = REQWEST_CLIENT + .get(url.replace("http://", "https://")) + .send() + .await + .and_then(|x| x.error_for_status()); + + match result { + Ok(x) => { + let bytes = x.bytes().await; + + if let Ok(bytes) = bytes { + if let Some(sha1) = sha1 { + if &*sha1_async(bytes.clone()).await? != sha1 { + if attempt <= 3 { + continue; + } else { + return Err( + crate::ErrorKind::ChecksumFailure { + hash: sha1.to_string(), + url: url.to_string(), + tries: attempt, + } + .into(), + ); + } + } + } + + return Ok(bytes); + } else if attempt <= RETRIES { + continue; + } else if let Err(err) = bytes { + return Err(crate::ErrorKind::Fetch { + inner: err, + item: url.to_string(), + } + .into()); + } + } + Err(_) if attempt <= RETRIES => continue, + Err(err) => { + return Err(crate::ErrorKind::Fetch { + inner: err, + item: url.to_string(), + } + .into()) + } + } + } + + unreachable!() +} + +pub async fn fetch_json( + url: &str, + semaphore: &Arc, +) -> Result { + Ok(serde_json::from_slice( + &download_file(url, None, semaphore).await?, + )?) +} + +pub async fn fetch_xml( + url: &str, + semaphore: &Arc, +) -> Result { + Ok(serde_xml_rs::from_reader( + &*download_file(url, None, semaphore).await?, + )?) +} + +pub fn format_url(path: &str) -> String { + format!("{}/{}", &*dotenvy::var("BASE_URL").unwrap(), path) +} diff --git a/packages/app-lib/Cargo.toml b/packages/app-lib/Cargo.toml index a7eff7284..04100f4ac 100644 --- a/packages/app-lib/Cargo.toml +++ b/packages/app-lib/Cargo.toml @@ -22,7 +22,7 @@ urlencoding = "2.1.3" dashmap = { version = "6.0.1", features = ["serde"] } chrono = { version = "0.4.19", features = ["serde"] } -daedalus = { version = "0.2.3" } +daedalus = { path = "../../packages/daedalus" } dirs = "5.0.1" regex = "1.5" diff --git a/packages/daedalus/Cargo.toml b/packages/daedalus/Cargo.toml new file mode 100644 index 000000000..a57f4c612 --- /dev/null +++ b/packages/daedalus/Cargo.toml @@ -0,0 +1,21 @@ +[package] +name = "daedalus" +version = "0.2.3" +authors = ["Jai A "] +edition = "2021" +license = "MIT" +description = "Utilities for querying and parsing Minecraft metadata" +repository = "https://github.com/modrinth/daedalus/" +include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"] +keywords = ["minecraft", "launcher"] +categories = ["game-development", "api-bindings"] +readme = "README.md" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" +chrono = { version = "0.4", features = ["serde"] } +bytes = "1" +thiserror = "1.0" diff --git a/packages/daedalus/LICENSE b/packages/daedalus/LICENSE new file mode 100644 index 000000000..bc179be0a --- /dev/null +++ b/packages/daedalus/LICENSE @@ -0,0 +1,7 @@ +Copyright © 2024 Rinth, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/packages/daedalus/README.md b/packages/daedalus/README.md new file mode 100644 index 000000000..aa5602590 --- /dev/null +++ b/packages/daedalus/README.md @@ -0,0 +1,4 @@ +# Daedalus + +Daedalus (the rust library) is a library providing model structs and methods for requesting and parsing things +from Minecraft and other mod loaders meta APIs. diff --git a/packages/daedalus/package.json b/packages/daedalus/package.json new file mode 100644 index 000000000..f01a24e94 --- /dev/null +++ b/packages/daedalus/package.json @@ -0,0 +1,10 @@ +{ + "name": "@modrinth/daedalus", + "scripts": { + "build": "cargo build --release", + "lint": "cargo fmt --check && cargo clippy --all-targets --all-features -- -D warnings", + "fix": "cargo fmt && cargo clippy --fix", + "dev": "cargo run", + "test": "cargo test" + } +} \ No newline at end of file diff --git a/packages/daedalus/src/lib.rs b/packages/daedalus/src/lib.rs new file mode 100644 index 000000000..790088890 --- /dev/null +++ b/packages/daedalus/src/lib.rs @@ -0,0 +1,102 @@ +//! # Daedalus +//! +//! Daedalus is a library which provides models and methods to fetch metadata about games + +#![warn(missing_docs, unused_import_braces, missing_debug_implementations)] + +/// Models and methods for fetching metadata for Minecraft +pub mod minecraft; +/// Models and methods for fetching metadata for Minecraft mod loaders +pub mod modded; + +#[derive(thiserror::Error, Debug)] +/// An error type representing possible errors when fetching metadata +pub enum Error { + /// Error while parsing input + #[error("{0}")] + ParseError(String), +} + +/// Converts a maven artifact to a path +pub fn get_path_from_artifact(artifact: &str) -> Result { + let name_items = artifact.split(':').collect::>(); + + let package = name_items.first().ok_or_else(|| { + Error::ParseError(format!( + "Unable to find package for library {}", + &artifact + )) + })?; + let name = name_items.get(1).ok_or_else(|| { + Error::ParseError(format!( + "Unable to find name for library {}", + &artifact + )) + })?; + + if name_items.len() == 3 { + let version_ext = name_items + .get(2) + .ok_or_else(|| { + Error::ParseError(format!( + "Unable to find version for library {}", + &artifact + )) + })? + .split('@') + .collect::>(); + let version = version_ext.first().ok_or_else(|| { + Error::ParseError(format!( + "Unable to find version for library {}", + &artifact + )) + })?; + let ext = version_ext.get(1); + + Ok(format!( + "{}/{}/{}/{}-{}.{}", + package.replace('.', "/"), + name, + version, + name, + version, + ext.unwrap_or(&"jar") + )) + } else { + let version = name_items.get(2).ok_or_else(|| { + Error::ParseError(format!( + "Unable to find version for library {}", + &artifact + )) + })?; + + let data_ext = name_items + .get(3) + .ok_or_else(|| { + Error::ParseError(format!( + "Unable to find data for library {}", + &artifact + )) + })? + .split('@') + .collect::>(); + let data = data_ext.first().ok_or_else(|| { + Error::ParseError(format!( + "Unable to find data for library {}", + &artifact + )) + })?; + let ext = data_ext.get(1); + + Ok(format!( + "{}/{}/{}/{}-{}-{}.{}", + package.replace('.', "/"), + name, + version, + name, + version, + data, + ext.unwrap_or(&"jar") + )) + } +} diff --git a/packages/daedalus/src/minecraft.rs b/packages/daedalus/src/minecraft.rs new file mode 100644 index 000000000..e117052ad --- /dev/null +++ b/packages/daedalus/src/minecraft.rs @@ -0,0 +1,461 @@ +use crate::modded::{Processor, SidedDataEntry}; +use chrono::{DateTime, Utc}; +use serde::{Deserialize, Serialize}; +use std::collections::HashMap; + +/// The latest version of the format the model structs deserialize to +pub const CURRENT_FORMAT_VERSION: usize = 0; + +#[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "snake_case")] +/// The version type +pub enum VersionType { + /// A major version, which is stable for all players to use + Release, + /// An experimental version, which is unstable and used for feature previews and beta testing + Snapshot, + /// The oldest versions before the game was released + OldAlpha, + /// Early versions of the game + OldBeta, +} + +impl VersionType { + /// Converts the version type to a string + pub fn as_str(&self) -> &'static str { + match self { + VersionType::Release => "release", + VersionType::Snapshot => "snapshot", + VersionType::OldAlpha => "old_alpha", + VersionType::OldBeta => "old_beta", + } + } +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] +/// A game version of Minecraft +pub struct Version { + /// A unique identifier of the version + pub id: String, + #[serde(rename = "type")] + /// The release type of the version + pub type_: VersionType, + /// A link to additional information about the version + pub url: String, + /// The latest time a file in this version was updated + pub time: DateTime, + /// The time this version was released + pub release_time: DateTime, + /// The SHA1 hash of the additional information about the version + pub sha1: String, + /// Whether the version supports the latest player safety features + pub compliance_level: u32, + #[serde(skip_serializing_if = "Option::is_none")] + /// (Modrinth Provided) The SHA1 hash of the original unmodified Minecraft versions JSON + pub original_sha1: Option, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +/// The latest snapshot and release of the game +pub struct LatestVersion { + /// The version id of the latest release + pub release: String, + /// The version id of the latest snapshot + pub snapshot: String, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +/// Data of all game versions of Minecraft +pub struct VersionManifest { + /// A struct containing the latest snapshot and release of the game + pub latest: LatestVersion, + /// A list of game versions of Minecraft + pub versions: Vec, +} + +/// The URL to the version manifest +pub const VERSION_MANIFEST_URL: &str = + "https://piston-meta.mojang.com/mc/game/version_manifest_v2.json"; + +#[derive(Serialize, Deserialize, Debug)] +#[serde(rename_all = "camelCase")] +/// Information about the assets of the game +pub struct AssetIndex { + /// The game version ID the assets are for + pub id: String, + /// The SHA1 hash of the assets index + pub sha1: String, + /// The size of the assets index + pub size: u32, + /// The size of the game version's assets + pub total_size: u32, + /// A URL to a file which contains information about the version's assets + pub url: String, +} + +#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Hash)] +#[serde(rename_all = "snake_case")] +/// The type of download +pub enum DownloadType { + /// The download is for the game client + Client, + /// The download is mappings for the game + ClientMappings, + /// The download is for the game server + Server, + /// The download is mappings for the game server + ServerMappings, + /// The download is for the windows server + WindowsServer, +} + +#[derive(Serialize, Deserialize, Debug)] +/// Download information of a file +pub struct Download { + /// The SHA1 hash of the file + pub sha1: String, + /// The size of the file + pub size: u32, + /// The URL where the file can be downloaded + pub url: String, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +/// Download information of a library +pub struct LibraryDownload { + #[serde(skip_serializing_if = "Option::is_none")] + /// The path that the library should be saved to + pub path: Option, + /// The SHA1 hash of the library + pub sha1: String, + /// The size of the library + pub size: u32, + /// The URL where the library can be downloaded + pub url: String, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +/// A list of files that should be downloaded for libraries +pub struct LibraryDownloads { + #[serde(skip_serializing_if = "Option::is_none")] + /// The primary library artifact + pub artifact: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// Conditional files that may be needed to be downloaded alongside the library + /// The HashMap key specifies a classifier as additional information for downloading files + pub classifiers: Option>, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "snake_case")] +/// The action a rule can follow +pub enum RuleAction { + /// The rule's status allows something to be done + Allow, + /// The rule's status disallows something to be done + Disallow, +} + +#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Hash, Clone)] +#[serde(rename_all = "kebab-case")] +/// An enum representing the different types of operating systems +pub enum Os { + /// MacOS (x86) + Osx, + /// M1-Based Macs + OsxArm64, + /// Windows (x86) + Windows, + /// Windows ARM + WindowsArm64, + /// Linux (x86) and its derivatives + Linux, + /// Linux ARM 64 + LinuxArm64, + /// Linux ARM 32 + LinuxArm32, + /// The OS is unknown + Unknown, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +/// A rule which depends on what OS the user is on +pub struct OsRule { + #[serde(skip_serializing_if = "Option::is_none")] + /// The name of the OS + pub name: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// The version of the OS. This is normally a RegEx + pub version: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// The architecture of the OS + pub arch: Option, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +/// A rule which depends on the toggled features of the launcher +pub struct FeatureRule { + #[serde(skip_serializing_if = "Option::is_none")] + /// Whether the user is in demo mode + pub is_demo_user: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// Whether the user is using a custom resolution + pub has_custom_resolution: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// Whether the launcher has quick plays support + pub has_quick_plays_support: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// Whether the instance is being launched to a single-player world + pub is_quick_play_singleplayer: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// Whether the instance is being launched to a multi-player world + pub is_quick_play_multiplayer: Option, + /// Whether the instance is being launched to a realms world + pub is_quick_play_realms: Option, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +/// A rule deciding whether a file is downloaded, an argument is used, etc. +pub struct Rule { + /// The action the rule takes + pub action: RuleAction, + #[serde(skip_serializing_if = "Option::is_none")] + /// The OS rule + pub os: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// The feature rule + pub features: Option, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +/// Information delegating the extraction of the library +pub struct LibraryExtract { + #[serde(skip_serializing_if = "Option::is_none")] + /// Files/Folders to be excluded from the extraction of the library + pub exclude: Option>, +} + +#[derive(Serialize, Deserialize, Debug)] +#[serde(rename_all = "camelCase")] +/// Information about the java version the game needs +pub struct JavaVersion { + /// The component needed for the Java installation + pub component: String, + /// The major Java version number + pub major_version: u32, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +/// A library which the game relies on to run +pub struct Library { + #[serde(skip_serializing_if = "Option::is_none")] + /// The files the library has + pub downloads: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// Rules of the extraction of the file + pub extract: Option, + /// The maven name of the library. The format is `groupId:artifactId:version` + pub name: String, + #[serde(skip_serializing_if = "Option::is_none")] + /// The URL to the repository where the library can be downloaded + pub url: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// Native files that the library relies on + pub natives: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + /// Rules deciding whether the library should be downloaded or not + pub rules: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + /// SHA1 Checksums for validating the library's integrity. Only present for forge libraries + pub checksums: Option>, + #[serde(default = "default_include_in_classpath")] + /// Whether the library should be included in the classpath at the game's launch + pub include_in_classpath: bool, + #[serde(default = "default_downloadable")] + /// Whether the library should be downloaded + pub downloadable: bool, +} + +#[derive(Deserialize, Debug, Clone)] +/// A partial library which should be merged with a full library +pub struct PartialLibrary { + /// The files the library has + pub downloads: Option, + /// Rules of the extraction of the file + pub extract: Option, + /// The maven name of the library. The format is `groupId:artifactId:version` + pub name: Option, + /// The URL to the repository where the library can be downloaded + pub url: Option, + /// Native files that the library relies on + pub natives: Option>, + /// Rules deciding whether the library should be downloaded or not + pub rules: Option>, + /// SHA1 Checksums for validating the library's integrity. Only present for forge libraries + pub checksums: Option>, + /// Whether the library should be included in the classpath at the game's launch + pub include_in_classpath: Option, +} + +/// Merges a partial library to make a complete library +pub fn merge_partial_library( + partial: PartialLibrary, + mut merge: Library, +) -> Library { + if let Some(downloads) = partial.downloads { + if let Some(merge_downloads) = &mut merge.downloads { + if let Some(artifact) = downloads.artifact { + merge_downloads.artifact = Some(artifact); + } + if let Some(classifiers) = downloads.classifiers { + if let Some(merge_classifiers) = + &mut merge_downloads.classifiers + { + for classifier in classifiers { + merge_classifiers.insert(classifier.0, classifier.1); + } + } else { + merge_downloads.classifiers = Some(classifiers); + } + } + } else { + merge.downloads = Some(downloads) + } + } + if let Some(extract) = partial.extract { + merge.extract = Some(extract) + } + if let Some(name) = partial.name { + merge.name = name + } + if let Some(url) = partial.url { + merge.url = Some(url) + } + if let Some(natives) = partial.natives { + if let Some(merge_natives) = &mut merge.natives { + for native in natives { + merge_natives.insert(native.0, native.1); + } + } else { + merge.natives = Some(natives); + } + } + if let Some(rules) = partial.rules { + if let Some(merge_rules) = &mut merge.rules { + for rule in rules { + merge_rules.push(rule); + } + } else { + merge.rules = Some(rules) + } + } + if let Some(checksums) = partial.checksums { + merge.checksums = Some(checksums) + } + if let Some(include_in_classpath) = partial.include_in_classpath { + merge.include_in_classpath = include_in_classpath + } + + merge +} + +fn default_include_in_classpath() -> bool { + true +} +fn default_downloadable() -> bool { + true +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(untagged)] +/// A container for an argument or multiple arguments +pub enum ArgumentValue { + /// The container has one argument + Single(String), + /// The container has multiple arguments + Many(Vec), +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(untagged)] +/// A command line argument passed to a program +pub enum Argument { + /// An argument which is applied no matter what + Normal(String), + /// An argument which is only applied if certain conditions are met + Ruled { + /// The rules deciding whether the argument(s) is used or not + rules: Vec, + /// The container of the argument(s) that should be applied accordingly + value: ArgumentValue, + }, +} + +#[derive(Serialize, Deserialize, Debug, Eq, PartialEq, Hash, Clone, Copy)] +#[serde(rename_all = "snake_case")] +/// The type of argument +pub enum ArgumentType { + /// The argument is passed to the game + Game, + /// The argument is passed to the JVM + Jvm, +} + +#[derive(Serialize, Deserialize, Debug)] +#[serde(rename_all = "camelCase")] +/// Information about a version +pub struct VersionInfo { + #[serde(skip_serializing_if = "Option::is_none")] + /// Arguments passed to the game or JVM + pub arguments: Option>>, + /// Assets for the game + pub asset_index: AssetIndex, + /// The version ID of the assets + pub assets: String, + /// Game downloads of the version + pub downloads: HashMap, + /// The version ID of the version + pub id: String, + + /// The Java version this version supports + pub java_version: Option, + /// Libraries that the version depends on + pub libraries: Vec, + /// The classpath to the main class to launch the game + pub main_class: String, + #[serde(skip_serializing_if = "Option::is_none")] + /// (Legacy) Arguments passed to the game + pub minecraft_arguments: Option, + /// The minimum version of the Minecraft Launcher that can run this version of the game + pub minimum_launcher_version: u32, + /// The time that the version was released + pub release_time: DateTime, + /// The latest time a file in this version was updated + pub time: DateTime, + #[serde(rename = "type")] + /// The type of version + pub type_: VersionType, + #[serde(skip_serializing_if = "Option::is_none")] + /// (Forge-only) + pub data: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + /// (Forge-only) The list of processors to run after downloading the files + pub processors: Option>, +} + +#[derive(Serialize, Deserialize, Debug)] +/// An asset of the game +pub struct Asset { + /// The SHA1 hash of the asset file + pub hash: String, + /// The size of the asset file + pub size: u32, +} + +#[derive(Serialize, Deserialize, Debug)] +/// An index containing all assets the game needs +pub struct AssetsIndex { + /// A hashmap containing the filename (key) and asset (value) + pub objects: HashMap, +} diff --git a/packages/daedalus/src/modded.rs b/packages/daedalus/src/modded.rs new file mode 100644 index 000000000..4016870ff --- /dev/null +++ b/packages/daedalus/src/modded.rs @@ -0,0 +1,210 @@ +use crate::minecraft::{ + Argument, ArgumentType, Library, VersionInfo, VersionType, +}; +use chrono::{DateTime, TimeZone, Utc}; +use serde::{Deserialize, Deserializer, Serialize}; +use std::collections::HashMap; + +/// The latest version of the format the fabric model structs deserialize to +pub const CURRENT_FABRIC_FORMAT_VERSION: usize = 0; +/// The latest version of the format the fabric model structs deserialize to +pub const CURRENT_FORGE_FORMAT_VERSION: usize = 0; +/// The latest version of the format the quilt model structs deserialize to +pub const CURRENT_QUILT_FORMAT_VERSION: usize = 0; +/// The latest version of the format the neoforge model structs deserialize to +pub const CURRENT_NEOFORGE_FORMAT_VERSION: usize = 0; + +/// The dummy replace string library names, inheritsFrom, and version names should be replaced with +pub const DUMMY_REPLACE_STRING: &str = "${modrinth.gameVersion}"; + +/// A data variable entry that depends on the side of the installation +#[derive(Serialize, Deserialize, Debug)] +pub struct SidedDataEntry { + /// The value on the client + pub client: String, + /// The value on the server + pub server: String, +} + +#[allow(deprecated)] +fn deserialize_date<'de, D>(deserializer: D) -> Result, D::Error> +where + D: Deserializer<'de>, +{ + let s = String::deserialize(deserializer)?; + + serde_json::from_str::>(&format!("\"{s}\"")) + .or_else(|_| Utc.datetime_from_str(&s, "%Y-%m-%dT%H:%M:%S%.9f")) + .map_err(serde::de::Error::custom) +} + +#[derive(Serialize, Deserialize, Debug)] +#[serde(rename_all = "camelCase")] +/// A partial version returned by fabric meta +pub struct PartialVersionInfo { + /// The version ID of the version + pub id: String, + /// The version ID this partial version inherits from + pub inherits_from: String, + /// The time that the version was released + #[serde(deserialize_with = "deserialize_date")] + pub release_time: DateTime, + /// The latest time a file in this version was updated + #[serde(deserialize_with = "deserialize_date")] + pub time: DateTime, + #[serde(skip_serializing_if = "Option::is_none")] + /// The classpath to the main class to launch the game + pub main_class: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// (Legacy) Arguments passed to the game + pub minecraft_arguments: Option, + #[serde(skip_serializing_if = "Option::is_none")] + /// Arguments passed to the game or JVM + pub arguments: Option>>, + /// Libraries that the version depends on + pub libraries: Vec, + #[serde(rename = "type")] + /// The type of version + pub type_: VersionType, + #[serde(skip_serializing_if = "Option::is_none")] + /// (Forge-only) + pub data: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + /// (Forge-only) The list of processors to run after downloading the files + pub processors: Option>, +} + +/// A processor to be ran after downloading the files +#[derive(Serialize, Deserialize, Debug)] +pub struct Processor { + /// Maven coordinates for the JAR library of this processor. + pub jar: String, + /// Maven coordinates for all the libraries that must be included in classpath when running this processor. + pub classpath: Vec, + /// Arguments for this processor. + pub args: Vec, + #[serde(skip_serializing_if = "Option::is_none")] + /// Represents a map of outputs. Keys and values can be data values + pub outputs: Option>, + #[serde(skip_serializing_if = "Option::is_none")] + /// Which sides this processor shall be ran on. + /// Valid values: client, server, extract + pub sides: Option>, +} + +/// Merges a partial version into a complete one +pub fn merge_partial_version( + partial: PartialVersionInfo, + merge: VersionInfo, +) -> VersionInfo { + let merge_id = merge.id.clone(); + + let mut libraries = vec![]; + + // We skip duplicate libraries that exist already in the partial version + for mut lib in merge.libraries { + let lib_artifact = lib.name.rsplit_once(':').map(|x| x.0); + + if let Some(lib_artifact) = lib_artifact { + if !partial.libraries.iter().any(|x| { + let target_artifact = x.name.rsplit_once(':').map(|x| x.0); + + target_artifact == Some(lib_artifact) && x.include_in_classpath + }) { + libraries.push(lib); + } else { + lib.include_in_classpath = false; + } + } else { + libraries.push(lib); + } + } + + VersionInfo { + arguments: if let Some(partial_args) = partial.arguments { + if let Some(merge_args) = merge.arguments { + let mut new_map = HashMap::new(); + + fn add_keys( + new_map: &mut HashMap>, + args: HashMap>, + ) { + for (type_, arguments) in args { + for arg in arguments { + if let Some(vec) = new_map.get_mut(&type_) { + vec.push(arg); + } else { + new_map.insert(type_, vec![arg]); + } + } + } + } + + add_keys(&mut new_map, merge_args); + add_keys(&mut new_map, partial_args); + + Some(new_map) + } else { + Some(partial_args) + } + } else { + merge.arguments + }, + asset_index: merge.asset_index, + assets: merge.assets, + downloads: merge.downloads, + id: partial.id.replace(DUMMY_REPLACE_STRING, &merge_id), + java_version: merge.java_version, + libraries: libraries + .into_iter() + .chain(partial.libraries) + .map(|mut x| { + x.name = x.name.replace(DUMMY_REPLACE_STRING, &merge_id); + + x + }) + .collect::>(), + main_class: if let Some(main_class) = partial.main_class { + main_class + } else { + merge.main_class + }, + minecraft_arguments: partial.minecraft_arguments, + minimum_launcher_version: merge.minimum_launcher_version, + release_time: partial.release_time, + time: partial.time, + type_: partial.type_, + data: partial.data, + processors: partial.processors, + } +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase")] +/// A manifest containing information about a mod loader's versions +pub struct Manifest { + /// The game versions the mod loader supports + pub game_versions: Vec, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +/// A game version of Minecraft +pub struct Version { + /// The minecraft version ID + pub id: String, + /// Whether the release is stable or not + pub stable: bool, + /// A map that contains loader versions for the game version + pub loaders: Vec, +} + +#[derive(Serialize, Deserialize, Debug, Clone)] +/// A version of a Minecraft mod loader +pub struct LoaderVersion { + /// The version ID of the loader + pub id: String, + /// The URL of the version's manifest + pub url: String, + /// Whether the loader is stable or not + pub stable: bool, +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8e11b168a..a76e4287d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,6 +31,9 @@ importers: '@modrinth/app-lib': specifier: workspace:* version: link:../../packages/app-lib + '@modrinth/daedalus': + specifier: workspace:* + version: link:../../packages/daedalus devDependencies: '@tauri-apps/cli': specifier: 2.0.0-rc.16 @@ -150,6 +153,12 @@ importers: apps/app-playground: {} + apps/daedalus_client: + dependencies: + '@modrinth/daedalus': + specifier: workspace:* + version: link:../../packages/daedalus + apps/docs: dependencies: '@astrojs/check': @@ -311,6 +320,8 @@ importers: specifier: ^3.4.31 version: 3.4.31(typescript@5.5.4) + packages/daedalus: {} + packages/eslint-config-custom: devDependencies: '@nuxtjs/eslint-config-typescript': @@ -10393,12 +10404,12 @@ snapshots: '@types/eslint-scope@3.7.7': dependencies: '@types/eslint': 9.6.0 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 optional: true '@types/eslint@9.6.0': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/json-schema': 7.0.15 optional: true @@ -17169,7 +17180,7 @@ snapshots: webpack@5.92.1: dependencies: '@types/eslint-scope': 3.7.7 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@webassemblyjs/ast': 1.12.1 '@webassemblyjs/wasm-edit': 1.12.1 '@webassemblyjs/wasm-parser': 1.12.1