From aa50e97b3d591b75cc0b1359419c21fe5fb15a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Raes?= Date: Tue, 9 Jul 2024 22:53:10 +0200 Subject: [PATCH 1/2] feat: Adjust JSON structure to allow for other mod sources (but better) (#39) Use direct link to mod source and specify platform in `enum`. This allows for easy extending for other platforms in the future. --- .github/schema.json | 17 ++++++++++------- README.md | 10 ++++++++-- verified-mods.json | 29 ++++++++++++++++++----------- 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/.github/schema.json b/.github/schema.json index 11ecd21..53dfc22 100644 --- a/.github/schema.json +++ b/.github/schema.json @@ -7,10 +7,6 @@ "^[A-Za-z._0-9]+": { "type": "object", "properties": { - "DependencyPrefix": { - "type": "string", - "pattern": "^([A-Za-z._0-9]+)-([A-Za-z._0-9]+)$" - }, "Repository": { "type": "string", "pattern": "^https://" @@ -35,13 +31,20 @@ "pattern": "^([0-9a-f]+)$", "minLength": 40, "maxLength": 40 - } + }, + "DownloadLink": { + "type": "string", + "pattern": "^https://" + }, + "Platform": { + "enum": [ "thunderstore" ] + } }, - "required": [ "Version", "Checksum", "CommitHash" ] + "required": [ "Version", "Checksum", "CommitHash", "DownloadLink" ] } } }, - "required": [ "DependencyPrefix", "Repository", "Versions" ] + "required": [ "Repository", "Versions" ] } } } diff --git a/README.md b/README.md index 80c42c8..9d26728 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,17 @@ This verified mods enables players to join servers that require custom content s Verified mods are listed in the present `verified-mods.json` file, using following format: * Key is mod's name (contained in its `mod.json` manifest's "Name" key); -* Body holds three fields: - * "DependencyPrefix" contains the string that allows Northstar to retrieve mods on Thunderstore; +* Body holds two fields: * "Repository" contains the link of the repository hosting the source code of the mod; * "Versions" contains a list of version (for the current mod) that have been verified. +Each version contains the following attributes: +* "Version" is the current version identifier (using the `x.y.z` format); +* "CommitHash" is the Git commit associated to the current version; +* "DownloadLink" is the direct download link of the version archive; +* "Checksum" is the SHA256 hash of the version archive; +* "Platform" is the origin of the version ("thunderstore" is currently the only supported option). + ## How to submit a mod for verification Before starting to submit your mod for verification, please ensure that it is a valid candidate to mod verification! Only mods required by a server to be client-side can be verified. diff --git a/verified-mods.json b/verified-mods.json index 1fba31b..fba7443 100644 --- a/verified-mods.json +++ b/verified-mods.json @@ -1,61 +1,68 @@ { "Odd.s2space": { - "DependencyPrefix": "odds-s2space", "Repository": "https://github.com/uniboi/s2space", "Versions": [ { "Version": "0.0.5", "CommitHash": "f27b8f1f05d5278aa8f47ead2d9e70f39f274173", - "Checksum": "670987e07806e8dffcb591bad8724f29abc18d9baa304d9ab4fae7804bd86bc2" + "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/odds-s2space-0.0.5.zip", + "Checksum": "670987e07806e8dffcb591bad8724f29abc18d9baa304d9ab4fae7804bd86bc2", + "Platform": "thunderstore" } ] }, "Parkour": { - "DependencyPrefix": "Alystrasz-Parkour", "Repository": "https://github.com/Alystrasz/Alystrasz.Parkour", "Versions": [ { "Version": "0.2.1", "CommitHash": "0eca593ac1666aeeaa061a5c545d917d47d6d113", - "Checksum": "eef8ae5a88df68b249529f31713d0219b18391202dfeedc2d109936c729c571c" + "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/Alystrasz-Parkour-0.2.1.zip", + "Checksum": "eef8ae5a88df68b249529f31713d0219b18391202dfeedc2d109936c729c571c", + "Platform": "thunderstore" } ] }, "Dinorush's LTS Rebalance": { - "DependencyPrefix": "Dinorush-LTS_Rebalance", "Repository": "https://github.com/Dinorush/LTSRebalance", "Versions": [ { "Version": "1.0.9", "CommitHash": "f8353281b8daf6a94cfb4bc04c9ced0635e58c37", - "Checksum": "ec19938e44872c02c618190880a60fddbf2ea04ef8c09b0fd1bb246e5607880f" + "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/Dinorush-LTS_Rebalance-1.0.9.zip", + "Checksum": "ec19938e44872c02c618190880a60fddbf2ea04ef8c09b0fd1bb246e5607880f", + "Platform": "thunderstore" } ] }, "HotPotato": { - "DependencyPrefix": "x3Karma-HotPotato", "Repository": "https://github.com/x3Karma/HotPotato", "Versions": [ { "Version": "1.0.0", "CommitHash": "01fb15e22f62855cdcc2d87e3b52fa71d3401446", - "Checksum": "d83f39a63c0ab7d886d23605a7b3310d0cd4260c77159eb71c8cbccce963cec2" + "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/x3Karma-HotPotato-1.0.0.zip", + "Checksum": "d83f39a63c0ab7d886d23605a7b3310d0cd4260c77159eb71c8cbccce963cec2", + "Platform": "thunderstore" }, { "Version": "1.1.0", "CommitHash": "72a1f00602e0643877688f065d0124e1f2397c5e", - "Checksum": "e2fa138cc22b7a576b2a5f0dbe7a489448edce331b06d9c5430abbc36ad41078" + "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/x3Karma-HotPotato-1.1.0.zip", + "Checksum": "e2fa138cc22b7a576b2a5f0dbe7a489448edce331b06d9c5430abbc36ad41078", + "Platform": "thunderstore" } ] }, "nyami.mp_brick": { - "DependencyPrefix": "Nyami11-mp_brick", "Repository": "https://github.com/Nyami11/mp_brick", "Versions": [ { "Version": "1.0.2", "CommitHash": "38ff920639dc6556a039808770b5470122494a47", - "Checksum": "6eeae287c4cdd7b79e07366828940282952b82738a6dd97c3cf3ad35e0858d9f" + "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/Nyami11-mp_brick-1.0.2.zip", + "Checksum": "6eeae287c4cdd7b79e07366828940282952b82738a6dd97c3cf3ad35e0858d9f", + "Platform": "thunderstore" } ] } From 6b2a374357aaaa727a849be917b10a5e9c0955bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Raes?= Date: Tue, 9 Jul 2024 23:29:05 +0200 Subject: [PATCH 2/2] Revert "feat: Adjust JSON structure to allow for other mod sources (but better)" (#40) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert "feat: Adjust JSON structure to allow for other mod sources (but betteā€¦" This reverts commit aa50e97b3d591b75cc0b1359419c21fe5fb15a9d. --- .github/schema.json | 17 +++++++---------- README.md | 10 ++-------- verified-mods.json | 29 +++++++++++------------------ 3 files changed, 20 insertions(+), 36 deletions(-) diff --git a/.github/schema.json b/.github/schema.json index 53dfc22..11ecd21 100644 --- a/.github/schema.json +++ b/.github/schema.json @@ -7,6 +7,10 @@ "^[A-Za-z._0-9]+": { "type": "object", "properties": { + "DependencyPrefix": { + "type": "string", + "pattern": "^([A-Za-z._0-9]+)-([A-Za-z._0-9]+)$" + }, "Repository": { "type": "string", "pattern": "^https://" @@ -31,20 +35,13 @@ "pattern": "^([0-9a-f]+)$", "minLength": 40, "maxLength": 40 - }, - "DownloadLink": { - "type": "string", - "pattern": "^https://" - }, - "Platform": { - "enum": [ "thunderstore" ] - } + } }, - "required": [ "Version", "Checksum", "CommitHash", "DownloadLink" ] + "required": [ "Version", "Checksum", "CommitHash" ] } } }, - "required": [ "Repository", "Versions" ] + "required": [ "DependencyPrefix", "Repository", "Versions" ] } } } diff --git a/README.md b/README.md index 9d26728..80c42c8 100644 --- a/README.md +++ b/README.md @@ -6,17 +6,11 @@ This verified mods enables players to join servers that require custom content s Verified mods are listed in the present `verified-mods.json` file, using following format: * Key is mod's name (contained in its `mod.json` manifest's "Name" key); -* Body holds two fields: +* Body holds three fields: + * "DependencyPrefix" contains the string that allows Northstar to retrieve mods on Thunderstore; * "Repository" contains the link of the repository hosting the source code of the mod; * "Versions" contains a list of version (for the current mod) that have been verified. -Each version contains the following attributes: -* "Version" is the current version identifier (using the `x.y.z` format); -* "CommitHash" is the Git commit associated to the current version; -* "DownloadLink" is the direct download link of the version archive; -* "Checksum" is the SHA256 hash of the version archive; -* "Platform" is the origin of the version ("thunderstore" is currently the only supported option). - ## How to submit a mod for verification Before starting to submit your mod for verification, please ensure that it is a valid candidate to mod verification! Only mods required by a server to be client-side can be verified. diff --git a/verified-mods.json b/verified-mods.json index fba7443..1fba31b 100644 --- a/verified-mods.json +++ b/verified-mods.json @@ -1,68 +1,61 @@ { "Odd.s2space": { + "DependencyPrefix": "odds-s2space", "Repository": "https://github.com/uniboi/s2space", "Versions": [ { "Version": "0.0.5", "CommitHash": "f27b8f1f05d5278aa8f47ead2d9e70f39f274173", - "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/odds-s2space-0.0.5.zip", - "Checksum": "670987e07806e8dffcb591bad8724f29abc18d9baa304d9ab4fae7804bd86bc2", - "Platform": "thunderstore" + "Checksum": "670987e07806e8dffcb591bad8724f29abc18d9baa304d9ab4fae7804bd86bc2" } ] }, "Parkour": { + "DependencyPrefix": "Alystrasz-Parkour", "Repository": "https://github.com/Alystrasz/Alystrasz.Parkour", "Versions": [ { "Version": "0.2.1", "CommitHash": "0eca593ac1666aeeaa061a5c545d917d47d6d113", - "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/Alystrasz-Parkour-0.2.1.zip", - "Checksum": "eef8ae5a88df68b249529f31713d0219b18391202dfeedc2d109936c729c571c", - "Platform": "thunderstore" + "Checksum": "eef8ae5a88df68b249529f31713d0219b18391202dfeedc2d109936c729c571c" } ] }, "Dinorush's LTS Rebalance": { + "DependencyPrefix": "Dinorush-LTS_Rebalance", "Repository": "https://github.com/Dinorush/LTSRebalance", "Versions": [ { "Version": "1.0.9", "CommitHash": "f8353281b8daf6a94cfb4bc04c9ced0635e58c37", - "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/Dinorush-LTS_Rebalance-1.0.9.zip", - "Checksum": "ec19938e44872c02c618190880a60fddbf2ea04ef8c09b0fd1bb246e5607880f", - "Platform": "thunderstore" + "Checksum": "ec19938e44872c02c618190880a60fddbf2ea04ef8c09b0fd1bb246e5607880f" } ] }, "HotPotato": { + "DependencyPrefix": "x3Karma-HotPotato", "Repository": "https://github.com/x3Karma/HotPotato", "Versions": [ { "Version": "1.0.0", "CommitHash": "01fb15e22f62855cdcc2d87e3b52fa71d3401446", - "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/x3Karma-HotPotato-1.0.0.zip", - "Checksum": "d83f39a63c0ab7d886d23605a7b3310d0cd4260c77159eb71c8cbccce963cec2", - "Platform": "thunderstore" + "Checksum": "d83f39a63c0ab7d886d23605a7b3310d0cd4260c77159eb71c8cbccce963cec2" }, { "Version": "1.1.0", "CommitHash": "72a1f00602e0643877688f065d0124e1f2397c5e", - "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/x3Karma-HotPotato-1.1.0.zip", - "Checksum": "e2fa138cc22b7a576b2a5f0dbe7a489448edce331b06d9c5430abbc36ad41078", - "Platform": "thunderstore" + "Checksum": "e2fa138cc22b7a576b2a5f0dbe7a489448edce331b06d9c5430abbc36ad41078" } ] }, "nyami.mp_brick": { + "DependencyPrefix": "Nyami11-mp_brick", "Repository": "https://github.com/Nyami11/mp_brick", "Versions": [ { "Version": "1.0.2", "CommitHash": "38ff920639dc6556a039808770b5470122494a47", - "DownloadLink": "https://gcdn.thunderstore.io/live/repository/packages/Nyami11-mp_brick-1.0.2.zip", - "Checksum": "6eeae287c4cdd7b79e07366828940282952b82738a6dd97c3cf3ad35e0858d9f", - "Platform": "thunderstore" + "Checksum": "6eeae287c4cdd7b79e07366828940282952b82738a6dd97c3cf3ad35e0858d9f" } ] }