What is this PR about? feat: Add production-ready meta.json processing tools with duplicate removal and alphabetical sorting
📋 Overview
Created comprehensive tooling to maintain meta.json file integrity by removing duplicate entries and ensuring alphabetical ordering. This addresses template management efficiency and prevents inconsistencies in the template catalog.
🔧 Features Implemented
Core Processing Scripts
dedupe-and-sort-meta.js - Simple, standalone script for quick processing
Removes duplicate entries based on id field (keeps first occurrence)
Sorts all entries alphabetically by id
Optional backup creation (disabled by default for performance)
Comprehensive error handling and reporting
build-scripts/process-meta.js - Advanced production script
# Process meta.json (no backup, fast)
npm run process-meta
# Process with backup creation
npm run process-meta-with-backup
# Validate without changes
make validate
CI/CD Integration
# Production build process
npm run build
# Validation in GitHub Actions# Automatically runs on meta.json changes
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/Dokploy/templates/pull/281
Author: @jaainil
Created: 8/13/2025
Status: ✅ Merged
Merged: 8/16/2025
Merged by: @Siumauricio
Base:
main← Head:fix/remove-duplicate-meta-entries📝 Commits (10+)
821f17cremoved28d8398Replace application catalog entries with new software entries16351e6Test 1db4d883Updated Scripts60004aeFinal Testb5ecea3Fixa816240Remove redundant dependency installation steps from GitHub Actions workflow0520be1Test 215e19fbUpdate meta sorting logic to ASCII order and add --backup option for deduplication6a784b9Fix meta.json: Remove duplicates and apply correct ASCII sorting📊 Changes
7 files changed (+858 additions, -1 deletions)
View changed files
📝
.github/.github/pull_request_template.md(+1 -1)➕
.github/workflows/validate-meta.yml(+80 -0)➕
Makefile(+45 -0)➕
README-meta-processing.md(+227 -0)➕
build-scripts/process-meta.js(+292 -0)➕
dedupe-and-sort-meta.js(+182 -0)➕
package.json(+31 -0)📄 Description
🔍 Removed Duplicate IDs
What is this PR about? feat: Add production-ready meta.json processing tools with duplicate removal and alphabetical sorting
📋 Overview
Created comprehensive tooling to maintain meta.json file integrity by removing duplicate entries and ensuring alphabetical ordering. This addresses template management efficiency and prevents inconsistencies in the template catalog.
🔧 Features Implemented
Core Processing Scripts
dedupe-and-sort-meta.js- Simple, standalone script for quick processingidfield (keeps first occurrence)idbuild-scripts/process-meta.js- Advanced production script--input,--output,--backup,--verbose)Build Integration
package.json- NPM scripts for easy executionprocess-meta- Fast processing without backupprocess-meta-with-backup- Processing with backup creationprocess-meta-verbose- Detailed output for debuggingvalidate-meta- Validation without modificationMakefile- Make targets for various operationsmake process-meta- Process the meta.json filemake validate- Validate without modifyingmake check- Quick duplicate/sort verificationmake clean- Remove backup filesCI/CD Automation
.github/workflows/validate-meta.yml- GitHub Actions workflow🎯 Key Improvements
Performance Optimizations
Data Quality Assurance
idfieldsidsortingid(string, unique)name(string)version(string)description(string)links(object with github property)logo(string)tags(array)Developer Experience
📊 Processing Results
Current Status
File Structure Added
🚀 Usage Examples
Basic Processing
CI/CD Integration
CLI Options
🛡️ Quality Gates
Automated Validation
Production Safety
🎯 Benefits
For Developers
For CI/CD
For Maintenance
🔧 Breaking Changes
None - All changes are additive and maintain backward compatibility.
🐛 Bug Fixes
--no-backupflag from validate command--no-backupflag from CI validation step--backupcase to argument parsing inbuild-scripts/process-meta.js📝 Notes
--backupflag when needed--no-schema-validation✅ Final Verification
Make Commands:
make process-meta- Processes 241 entries, no backup creation (confirmed)make validate- Validates JSON structure and schema, exit code 0 (confirmed)make clean- Successfully removes backup files (confirmed)NPM Scripts:
npm run process-meta- Uses simple script, no backup creation (confirmed)npm run process-meta-with-backup- Uses advanced script with --backup flag (confirmed)CLI Commands:
node dedupe-and-sort-meta.js --help- Shows proper help information (confirmed)node dedupe-and-sort-meta.js --backup <file>- Creates backups when requested (confirmed)node build-scripts/process-meta.js --backup- Creates backups when requested (confirmed)node build-scripts/process-meta.js --verbose- Shows detailed logging (confirmed)Backup Functionality:
--backupusedmake cleanremoves all backup files properlyCore Features:
CI/CD Pipeline:
Checklist
Before submitting this PR, please make sure that:
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.