fix(core): force sorting mimetypenames.dist.json

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
pull/52822/head
John Molakvoæ (skjnldsv) 5 months ago
parent 24bc1d606e
commit d7c70d0367
No known key found for this signature in database
GPG Key ID: 60C25B8C072916CF
  1. 8
      resources/config/mimetypenames-update.sh
  2. 18
      resources/config/mimetypenames.dist.json
  3. 2
      resources/config/mimetypenames.dist.json.license

@ -1,4 +1,8 @@
#!/bin/bash #!/bin/bash
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
set -e set -e
# Paths # Paths
@ -48,8 +52,8 @@ while read -r MIME; do
fi fi
done <<< "$MIME_TYPES" done <<< "$MIME_TYPES"
# Final formatting # Final formatting and sorting by keys
jq '.' "$OUTPUT_JSON.tmp" > "$OUTPUT_JSON" && rm "$OUTPUT_JSON.tmp" jq -S . "$OUTPUT_JSON.tmp" > "$OUTPUT_JSON" && rm "$OUTPUT_JSON.tmp"
echo "✅ Done!" echo "✅ Done!"
echo " Descriptions found for $MATCHED_COUNT MIME types" echo " Descriptions found for $MATCHED_COUNT MIME types"

@ -1,12 +1,10 @@
{ {
"_comment" : "Array of human readable mimes.", "_comment": "Array of human readable mimes.",
"_comment2": "Any changes you make here will be overwritten on an update of Nextcloud.", "_comment2": "Any changes you make here will be overwritten on an update of Nextcloud.",
"_comment3": "Put any custom mappings in a new file mimetypenames.json in the config/ folder of Nextcloud", "_comment3": "Put any custom mappings in a new file mimetypenames.json in the config/ folder of Nextcloud",
"_comment4": "After any change to mimetypenames.json run:",
"_comment4": "After any change to mimetypenames.json run:", "_comment5": "./occ maintenance:mimetype:update-js",
"_comment5": "./occ maintenance:mimetype:update-js", "_comment6": "Otherwise your update won't propagate through the system.",
"_comment6": "Otherwise your update won't propagate through the system.",
"application/epub+zip": "Electronic book document", "application/epub+zip": "Electronic book document",
"application/gpx+xml": "GPX geographic data", "application/gpx+xml": "GPX geographic data",
"application/gzip": "Gzip archive", "application/gzip": "Gzip archive",
@ -32,6 +30,7 @@
"application/vnd.ms-powerpoint.slideshow.macroEnabled.12": "PowerPoint presentation", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12": "PowerPoint presentation",
"application/vnd.ms-powerpoint.template.macroEnabled.12": "PowerPoint presentation template", "application/vnd.ms-powerpoint.template.macroEnabled.12": "PowerPoint presentation template",
"application/vnd.ms-word.document.macroEnabled.12": "Word document", "application/vnd.ms-word.document.macroEnabled.12": "Word document",
"application/vnd.oasis.opendocument.formula": "ODF formula",
"application/vnd.oasis.opendocument.graphics": "ODG drawing", "application/vnd.oasis.opendocument.graphics": "ODG drawing",
"application/vnd.oasis.opendocument.graphics-flat-xml": "ODG drawing (Flat XML)", "application/vnd.oasis.opendocument.graphics-flat-xml": "ODG drawing (Flat XML)",
"application/vnd.oasis.opendocument.graphics-template": "ODG template", "application/vnd.oasis.opendocument.graphics-template": "ODG template",
@ -109,6 +108,5 @@
"video/webm": "WebM video", "video/webm": "WebM video",
"video/x-flv": "Flash video", "video/x-flv": "Flash video",
"video/x-matroska": "Matroska video", "video/x-matroska": "Matroska video",
"video/x-ms-wmv": "Windows Media video", "video/x-ms-wmv": "Windows Media video"
"application/vnd.oasis.opendocument.formula": "ODF formula"
} }

@ -0,0 +1,2 @@
SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors
SPDX-License-Identifier: AGPL-3.0-only
Loading…
Cancel
Save