diff --git a/server.py b/server.py index 39adcbc..440b0ef 100644 --- a/server.py +++ b/server.py @@ -9,6 +9,7 @@ Pipeline endpoints (called by n8n): POST /deploy — Deploy extension to a specific customer via EspoCRM API POST /deploy-all — Deploy to all licensed customers POST /sync — Sync installed extensions from EspoCRM servers with platform DB + POST /sync-registry — Discover extensions from Gitea org and sync with DB Dashboard API: GET /api/stats @@ -40,29 +41,21 @@ GITEA_ORG = os.environ.get('GITEA_ORG', 'espocrm-extensions') DIST_DIR = os.environ.get('DIST_DIR', '/app/dashboard/dist') -# Module name mapping -MODULES = { - "CrmAssistant": "crm-assistant", "DigitalSignature": "digital-signature", - "EmailDefaults": "email-defaults", "GoogleIntegration": "google-integration", - "GreenInvoiceBilling": "green-invoice-billing", "HebrewLanguage": "hebrew-language", - "KlearBranding": "klear-branding", "LegalCrm": "legal-crm", - "LicenseManager": "license-manager", "LocalDocuments": "local-documents", - "MpdfEngine": "mpdf-engine", "NetHamishpat": "net-hamishpat", - "NetworkStorageIntegration": "network-storage-integration", - "NextCloudIntegration": "nextcloud-integration", "OfficeAssistant": "office-assistant", - "PhoneIsraelFormat": "phone-israel-format", "SmartAssistant": "smart-assistant", - "SmsIntegration": "sms-integration", "WhatsAppIntegration": "whatsapp-integration", - "DataMigration": "data-migration", -} +# Repos in the Gitea org that are NOT extensions (tools, base images, etc.) +GITEA_NON_EXTENSION_REPOS = {'espocrm-base', 'espo-core', 'espo-tools', 'extension-dashboard', 'extension-platform'} -# Extension dependency tree and install order +def _pascal_to_kebab(name): + """Convert PascalCase to kebab-case: LegalAssistance -> legal-assistance""" + return re.sub(r'(?