From fafa1fb0de9df388ea494f4d44c0ff921cd345c0 Mon Sep 17 00:00:00 2001 From: Breezebuilder Date: Fri, 7 Mar 2025 12:56:16 +1100 Subject: [PATCH 1/7] Add optional property "folderName" which rejects names containing any invalid characters. Rejected characters are /< > : " / \ | ? * Does not protect against strings containing non-printable control characters, or strings of reserved filenames like CON, PRN, AUX, NUL. --- schema/meta.schema.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/schema/meta.schema.json b/schema/meta.schema.json index e033fca8..6586bae4 100644 --- a/schema/meta.schema.json +++ b/schema/meta.schema.json @@ -31,6 +31,10 @@ "downloadURL": { "type": "string", "format": "uri" + }, + "folderName": { + "type": "string", + "pattern": "^[^<>:\"/\\|?*]+$" } }, "required": ["title", "requires-steamodded", "categories", "author", "repo", "downloadURL"] From 0a5beb6e797bb4763699e29a0a607be64a90e3e2 Mon Sep 17 00:00:00 2001 From: Breezebuilder Date: Fri, 7 Mar 2025 12:57:39 +1100 Subject: [PATCH 2/7] Set folderName property for MathIsFun0@Trance --- mods/MathIsFun0@Trance/meta.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/MathIsFun0@Trance/meta.json b/mods/MathIsFun0@Trance/meta.json index 0bf2a70c..f58f6e6b 100644 --- a/mods/MathIsFun0@Trance/meta.json +++ b/mods/MathIsFun0@Trance/meta.json @@ -5,5 +5,6 @@ "categories": ["Miscellaneous"], "author": "MathIsFun0", "repo":"https://github.com/MathIsFun0/Trance", - "downloadURL": "https://github.com/MathIsFun0/Trance/archive/refs/heads/main.zip" + "downloadURL": "https://github.com/MathIsFun0/Trance/archive/refs/heads/main.zip", + "folderName": "Trance" } From aa148c16ff09cde45b788cf32690f809df22fd76 Mon Sep 17 00:00:00 2001 From: Breezebuilder Date: Fri, 7 Mar 2025 13:00:42 +1100 Subject: [PATCH 3/7] Set folderName property for MathIsFun0@Cryptid --- mods/MathIsFun0@Cryptid/meta.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/MathIsFun0@Cryptid/meta.json b/mods/MathIsFun0@Cryptid/meta.json index 886ce022..979e3a7a 100644 --- a/mods/MathIsFun0@Cryptid/meta.json +++ b/mods/MathIsFun0@Cryptid/meta.json @@ -5,5 +5,6 @@ "categories": ["Content"], "author": "MathIsFun0", "repo":"https://github.com/MathIsFun0/Cryptid", - "downloadURL": "https://github.com/MathIsFun0/Cryptid/archive/refs/heads/main.zip" + "downloadURL": "https://github.com/MathIsFun0/Cryptid/archive/refs/heads/main.zip", + "folderName": "Cryptid" } From a1a15af0e6748e636d6c38a96f87c5945e9d71a4 Mon Sep 17 00:00:00 2001 From: Breezebuilder Date: Fri, 7 Mar 2025 13:00:51 +1100 Subject: [PATCH 4/7] Set folderName property for MathIsFun0@Talisman --- mods/MathIsFun0@Talisman/meta.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mods/MathIsFun0@Talisman/meta.json b/mods/MathIsFun0@Talisman/meta.json index 25d67289..5c74007d 100644 --- a/mods/MathIsFun0@Talisman/meta.json +++ b/mods/MathIsFun0@Talisman/meta.json @@ -5,5 +5,6 @@ "categories": ["API", "Technical", "Quality of Life"], "author": "MathIsFun0", "repo":"https://github.com/MathIsFun0/Talisman", - "downloadURL": "https://github.com/MathIsFun0/Talisman/releases/latest/download/Talisman.zip" + "downloadURL": "https://github.com/MathIsFun0/Talisman/releases/latest/download/Talisman.zip", + "folderName": "Talisman" } From ea45924a8fffbf5e7dab87110bc11f0150625ad3 Mon Sep 17 00:00:00 2001 From: Breezebuilder Date: Fri, 7 Mar 2025 13:21:33 +1100 Subject: [PATCH 5/7] Update README.md to include folderName parameter Document new optional parameter folderName. Also add clarification of required vs optional parameters, and Categories requiring at least one item from the valid Category list. --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 59ebff2d..21596b32 100644 --- a/README.md +++ b/README.md @@ -35,17 +35,19 @@ This file stores essential metadata in JSON format. **Make sure you adhere to th "categories": ["Content"], "author": "Joe Mama", "repo": "https://github.com/joemama/extended-cards", - "downloadURL": "https://github.com/joemama/extended-cards/releases/latest/extended-cards.tar.gz" + "downloadURL": "https://github.com/joemama/extended-cards/releases/latest/extended-cards.tar.gz", + "folderName": "ExtendedCards" } ``` - **title**: The name of your mod. - **requires-steamodded**: If your mod requires the [Steamodded](https://github.com/Steamodded/smods) mod loader, set this to `true`. -- **requires-talisman**: If your mod requires the [Talisman](https://github.com/MathIsFun0/Talisman) mod, set this to `true`. -- **categories**: Must be of `Content`, `Joker`, `Quality of Life`, `Technical`, `Miscellaneous`, `Resource Packs` or `API`. +- **categories**: Must contain at least one of `Content`, `Joker`, `Quality of Life`, `Technical`, `Miscellaneous`, `Resource Packs` or `API`. - **author**: Your chosen username or handle. - **repo**: A link to your mod's repository. - **downloadURL**: A direct link to the latest version of your released mod. (Can be same as `repo` if no separate download link exists.) +- *requires-talisman*: (*Optional*) If your mod requires the [Talisman](https://github.com/MathIsFun0/Talisman) mod, set this to `true`. +- *folderName*: (*Optional*) The name for the mod's install folder. This must not contain any forbidden characters: `<` `>` `:` `"` `/` `\` `|` `?` `*` ### 3. thumbnail.jpg (Optional) If included, this image will appear alongside your mod in the index. Maximum and recommended size is 1920x1080 pixels. From 109721435290ff9327b43b0f027f696273cf922d Mon Sep 17 00:00:00 2001 From: Breezebuilder Date: Fri, 7 Mar 2025 13:24:59 +1100 Subject: [PATCH 6/7] Update README.md Reorder parameters to match example and reword folderName's description of forbidden characters. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 21596b32..84b5b72f 100644 --- a/README.md +++ b/README.md @@ -42,12 +42,12 @@ This file stores essential metadata in JSON format. **Make sure you adhere to th ``` - **title**: The name of your mod. - **requires-steamodded**: If your mod requires the [Steamodded](https://github.com/Steamodded/smods) mod loader, set this to `true`. +- *requires-talisman*: (*Optional*) If your mod requires the [Talisman](https://github.com/MathIsFun0/Talisman) mod, set this to `true`. - **categories**: Must contain at least one of `Content`, `Joker`, `Quality of Life`, `Technical`, `Miscellaneous`, `Resource Packs` or `API`. - **author**: Your chosen username or handle. - **repo**: A link to your mod's repository. - **downloadURL**: A direct link to the latest version of your released mod. (Can be same as `repo` if no separate download link exists.) -- *requires-talisman*: (*Optional*) If your mod requires the [Talisman](https://github.com/MathIsFun0/Talisman) mod, set this to `true`. -- *folderName*: (*Optional*) The name for the mod's install folder. This must not contain any forbidden characters: `<` `>` `:` `"` `/` `\` `|` `?` `*` +- *folderName*: (*Optional*) The name for the mod's install folder. This must not contain any of the filename-forbidden characters: `<` `>` `:` `"` `/` `\` `|` `?` `*` ### 3. thumbnail.jpg (Optional) If included, this image will appear alongside your mod in the index. Maximum and recommended size is 1920x1080 pixels. From 56c684b05fb540199cc5f5e760de0014ce65c521 Mon Sep 17 00:00:00 2001 From: Breezebuilder Date: Fri, 7 Mar 2025 13:27:19 +1100 Subject: [PATCH 7/7] Update README.md Shorten folderName description to fit on a single line when formatted on GitHub page. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 84b5b72f..d65c60a5 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ This file stores essential metadata in JSON format. **Make sure you adhere to th - **author**: Your chosen username or handle. - **repo**: A link to your mod's repository. - **downloadURL**: A direct link to the latest version of your released mod. (Can be same as `repo` if no separate download link exists.) -- *folderName*: (*Optional*) The name for the mod's install folder. This must not contain any of the filename-forbidden characters: `<` `>` `:` `"` `/` `\` `|` `?` `*` +- *folderName*: (*Optional*) The name for the mod's install folder. This must not contain characters `<` `>` `:` `"` `/` `\` `|` `?` `*` ### 3. thumbnail.jpg (Optional) If included, this image will appear alongside your mod in the index. Maximum and recommended size is 1920x1080 pixels.