diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 8bdd14d..0000000 --- a/.gitattributes +++ /dev/null @@ -1,40 +0,0 @@ -# Set default behavior to automatically normalize line endings -* text=auto - -# Shell scripts should always use LF -*.sh text eol=lf -*.func text eol=lf -*.bash text eol=lf - -# Windows batch files should use CRLF -*.bat text eol=crlf -*.cmd text eol=crlf - -# Configuration files should use LF -*.conf text eol=lf -*.config text eol=lf -*.ini text eol=lf -*.toml text eol=lf -*.yaml text eol=lf -*.yml text eol=lf -*.json text eol=lf - -# Source code files should use LF -*.js text eol=lf -*.ts text eol=lf -*.tsx text eol=lf -*.jsx text eol=lf -*.css text eol=lf -*.scss text eol=lf -*.html text eol=lf -*.xml text eol=lf - -# Binary files -*.png binary -*.jpg binary -*.jpeg binary -*.gif binary -*.ico binary -*.db binary -*.exe binary -*.dll binary diff --git a/scripts/ct/debian.sh b/scripts/ct/debian.sh deleted file mode 100644 index 54b1748..0000000 --- a/scripts/ct/debian.sh +++ /dev/null @@ -1,43 +0,0 @@ -#!/usr/bin/env bash -SCRIPT_DIR="$(dirname "$0")" -source "$SCRIPT_DIR/../core/build.func" -# Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.debian.org/ - -APP="Debian" -var_tags="${var_tags:-os}" -var_cpu="${var_cpu:-1}" -var_ram="${var_ram:-512}" -var_disk="${var_disk:-2}" -var_os="${var_os:-debian}" -var_version="${var_version:-13}" -var_unprivileged="${var_unprivileged:-1}" - -header_info "$APP" -variables -color -catch_errors - -function update_script() { - header_info - check_container_storage - check_container_resources - if [[ ! -d /var ]]; then - msg_error "No ${APP} Installation Found!" - exit - fi - msg_info "Updating $APP LXC" - $STD apt update - $STD apt -y upgrade - msg_ok "Updated $APP LXC" - exit -} - -start -build_container -description - -msg_ok "Completed Successfully!\n" -echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" diff --git a/scripts/install/debian-install.sh b/scripts/install/debian-install.sh deleted file mode 100644 index 7b00eca..0000000 --- a/scripts/install/debian-install.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) 2021-2025 tteck -# Author: tteck (tteckster) -# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE -# Source: https://www.debian.org/ - -source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" -color -verb_ip6 -catch_errors -setting_up_container -network_check -update_os - -motd_ssh -customize - -msg_info "Cleaning up" -$STD apt -y autoremove -$STD apt -y autoclean -$STD apt -y clean -msg_ok "Cleaned" - diff --git a/scripts/json/2fauth.json b/scripts/json/2fauth.json index 6175b66..af1023e 100644 --- a/scripts/json/2fauth.json +++ b/scripts/json/2fauth.json @@ -23,7 +23,7 @@ "ram": 512, "hdd": 2, "os": "debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/actualbudget.json b/scripts/json/actualbudget.json index 477a47d..24b69d9 100644 --- a/scripts/json/actualbudget.json +++ b/scripts/json/actualbudget.json @@ -23,7 +23,7 @@ "ram": 2048, "hdd": 4, "os": "debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/add-iptag.json b/scripts/json/add-iptag.json index b9fa313..d853c77 100644 --- a/scripts/json/add-iptag.json +++ b/scripts/json/add-iptag.json @@ -1,5 +1,5 @@ { - "name": "PVE LXC Tag", + "name": "Proxmox VE LXC Tag", "slug": "add-iptag", "categories": [ 1 diff --git a/scripts/json/adguard.json b/scripts/json/adguard.json index 5c382d8..91b38c7 100644 --- a/scripts/json/adguard.json +++ b/scripts/json/adguard.json @@ -23,7 +23,7 @@ "ram": 512, "hdd": 2, "os": "debian", - "version": "13" + "version": "12" } }, { @@ -44,7 +44,7 @@ }, "notes": [ { - "text": "AdGuard Home can only be updated via the user interface.", + "text": "Adguard Home can be updated via the user interface.", "type": "info" } ] diff --git a/scripts/json/adventurelog.json b/scripts/json/adventurelog.json index f8e5347..23ac1a1 100644 --- a/scripts/json/adventurelog.json +++ b/scripts/json/adventurelog.json @@ -23,7 +23,7 @@ "ram": 2048, "hdd": 7, "os": "debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/apache-guacamole.json b/scripts/json/apache-guacamole.json index 9d464f0..ee6302b 100644 --- a/scripts/json/apache-guacamole.json +++ b/scripts/json/apache-guacamole.json @@ -23,7 +23,7 @@ "ram": 2048, "hdd": 4, "os": "debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/booklore.json b/scripts/json/booklore.json index 2d48288..89ca1c7 100644 --- a/scripts/json/booklore.json +++ b/scripts/json/booklore.json @@ -20,7 +20,7 @@ "script": "ct/booklore.sh", "resources": { "cpu": 3, - "ram": 3072, + "ram": 2048, "hdd": 7, "os": "debian", "version": "12" diff --git a/scripts/json/caddy.json b/scripts/json/caddy.json index a080b52..6d5f173 100644 --- a/scripts/json/caddy.json +++ b/scripts/json/caddy.json @@ -4,7 +4,7 @@ "categories": [ 21 ], - "date_created": "2025-09-17", + "date_created": "2024-05-11", "type": "ct", "updateable": true, "privileged": false, @@ -21,21 +21,10 @@ "resources": { "cpu": 1, "ram": 512, - "hdd": 6, + "hdd": 4, "os": "debian", "version": "12" } - }, - { - "type": "alpine", - "script": "ct/alpine-caddy.sh", - "resources": { - "cpu": 1, - "ram": 256, - "hdd": 3, - "os": "alpine", - "version": "3.22" - } } ], "default_credentials": { diff --git a/scripts/json/clean-lxcs.json b/scripts/json/clean-lxcs.json index 6198370..ec4ef5f 100644 --- a/scripts/json/clean-lxcs.json +++ b/scripts/json/clean-lxcs.json @@ -1,5 +1,5 @@ { - "name": "PVE LXC Cleaner", + "name": "Proxmox VE LXC Cleaner", "slug": "clean-lxcs", "categories": [ 1 diff --git a/scripts/json/clean-orphaned-lvm.json b/scripts/json/clean-orphaned-lvm.json index 3c7fcf7..8c34611 100644 --- a/scripts/json/clean-orphaned-lvm.json +++ b/scripts/json/clean-orphaned-lvm.json @@ -1,5 +1,5 @@ { - "name": "PVE Clean Orphaned LVM", + "name": "Proxmox Clean Orphaned LVM", "slug": "clean-orphaned-lvm", "categories": [ 1 diff --git a/scripts/json/cloudflared.json b/scripts/json/cloudflared.json index fcebddc..c5ac5b6 100644 --- a/scripts/json/cloudflared.json +++ b/scripts/json/cloudflared.json @@ -23,7 +23,7 @@ "ram": 512, "hdd": 2, "os": "debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/cockpit.json b/scripts/json/cockpit.json index ae52a64..623f6f7 100644 --- a/scripts/json/cockpit.json +++ b/scripts/json/cockpit.json @@ -23,7 +23,7 @@ "ram": 1024, "hdd": 4, "os": "debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/cosmos.json b/scripts/json/cosmos.json index 6011bc8..28ae244 100644 --- a/scripts/json/cosmos.json +++ b/scripts/json/cosmos.json @@ -32,10 +32,5 @@ "username": null, "password": null }, - "notes": [ - { - "type": "info", - "text": "The file `/etc/sysconfig/CosmosCloud` is optional. If you need custom settings, you can create it yourself." - } - ] + "notes": [] } \ No newline at end of file diff --git a/scripts/json/cron-update-lxcs.json b/scripts/json/cron-update-lxcs.json index 6ab6116..dc836d7 100644 --- a/scripts/json/cron-update-lxcs.json +++ b/scripts/json/cron-update-lxcs.json @@ -1,5 +1,5 @@ { - "name": "PVE Cron LXC Updater", + "name": "Proxmox VE Cron LXC Updater", "slug": "cron-update-lxcs", "categories": [ 1 @@ -13,7 +13,7 @@ "website": null, "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/proxmox.webp", "config_path": "", - "description": "This script will add/remove a crontab schedule that updates the operating system of all LXCs every Sunday at midnight.", + "description": "This script will add/remove a crontab schedule that updates all LXCs every Sunday at midnight.", "install_methods": [ { "type": "default", diff --git a/scripts/json/debian.json b/scripts/json/debian.json index 8e8ff85..a39ade6 100644 --- a/scripts/json/debian.json +++ b/scripts/json/debian.json @@ -23,7 +23,7 @@ "ram": 512, "hdd": 2, "os": "debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/elementsynapse.json b/scripts/json/elementsynapse.json index 62d66e9..b359927 100644 --- a/scripts/json/elementsynapse.json +++ b/scripts/json/elementsynapse.json @@ -39,10 +39,6 @@ { "type": "info", "text": "Synapse-Admin is running on port 5173" - }, - { - "type": "info", - "text": "For bridges Installation methods (WhatsApp, Signal, Discord, etc.), see: ´https://docs.mau.fi/bridges/go/setup.html´" } ] } \ No newline at end of file diff --git a/scripts/json/fstrim.json b/scripts/json/fstrim.json index c985af7..6273eea 100644 --- a/scripts/json/fstrim.json +++ b/scripts/json/fstrim.json @@ -1,5 +1,5 @@ { - "name": "PVE LXC Filesystem Trim", + "name": "Proxmox VE LXC Filesystem Trim", "slug": "fstrim", "categories": [ 1 diff --git a/scripts/json/ghostfolio.json b/scripts/json/ghostfolio.json deleted file mode 100644 index bd68aea..0000000 --- a/scripts/json/ghostfolio.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "Ghostfolio", - "slug": "ghostfolio", - "categories": [ - 23 - ], - "date_created": "2025-09-29", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 3333, - "documentation": "https://github.com/ghostfolio/ghostfolio?tab=readme-ov-file#self-hosting", - "website": "https://ghostfol.io/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/ghostfolio.webp", - "config_path": "/opt/ghostfolio/.env", - "description": "Ghostfolio is an open source wealth management software built with web technology. The application empowers busy people to keep track of stocks, ETFs or cryptocurrencies and make solid, data-driven investment decisions.", - "install_methods": [ - { - "type": "default", - "script": "ct/ghostfolio.sh", - "resources": { - "cpu": 2, - "ram": 4096, - "hdd": 8, - "os": "debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "Create your first user account by visiting the web interface and clicking 'Get Started'. The first user will automatically get admin privileges.", - "type": "info" - }, - { - "text": "Database and Redis credentials: `cat ~/ghostfolio.creds`", - "type": "info" - }, - { - "text": "Optional: CoinGecko API keys can be added during installation or later in the .env file for enhanced cryptocurrency data.", - "type": "info" - }, - { - "text": "Build process requires 4GB RAM (runtime: ~2GB). A temporary swap file will be created automatically if insufficient memory is detected.", - "type": "warning" - } - ] -} \ No newline at end of file diff --git a/scripts/json/globaleaks.json b/scripts/json/globaleaks.json deleted file mode 100644 index f01ca55..0000000 --- a/scripts/json/globaleaks.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "GlobaLeaks", - "slug": "globaleaks", - "categories": [ - 0 - ], - "date_created": "2025-09-18", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 443, - "documentation": "https://docs.globaleaks.org", - "website": "https://www.globaleaks.org/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/globaleaks.webp", - "config_path": "", - "description": "GlobaLeaks is a free and open-source whistleblowing software enabling anyone to easily set up and maintain a secure reporting platform.", - "install_methods": [ - { - "type": "default", - "script": "ct/globaleaks.sh", - "resources": { - "cpu": 2, - "ram": 1024, - "hdd": 4, - "os": "debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [] -} \ No newline at end of file diff --git a/scripts/json/goaway.json b/scripts/json/goaway.json deleted file mode 100644 index 4527466..0000000 --- a/scripts/json/goaway.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "GoAway", - "slug": "goaway", - "categories": [ - 5 - ], - "date_created": "2025-09-25", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 8080, - "documentation": "https://github.com/pommee/goaway#configuration-file", - "config_path": "/opt/goaway/config/settings.yaml", - "website": "https://github.com/pommee/goaway", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/goaway.webp", - "description": "Lightweight DNS sinkhole written in Go with a modern dashboard client. Very good looking new alternative to Pi-Hole and Adguard Home.", - "install_methods": [ - { - "type": "default", - "script": "ct/goaway.sh", - "resources": { - "cpu": 1, - "ram": 1024, - "hdd": 4, - "os": "Debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "Type `cat ~/goaway.creds` to see login credentials.", - "type": "info" - } - ] -} \ No newline at end of file diff --git a/scripts/json/grist.json b/scripts/json/grist.json index 4c84499..ad7852f 100644 --- a/scripts/json/grist.json +++ b/scripts/json/grist.json @@ -13,7 +13,7 @@ "website": "https://www.getgrist.com/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/grist.webp", "config_path": "/opt/grist/.env", - "description": "Grist is like a spreadsheet + database hybrid. It lets you store structured data, use relational links between tables, apply formulas (even with Python), build custom layouts (cards, forms, dashboards), set fine-grained access rules, and visualize data with charts or pivot-tables.", + "description": "Grist is a modern, open source spreadsheet that goes beyond the grid", "install_methods": [ { "type": "default", diff --git a/scripts/json/homeassistant.json b/scripts/json/homeassistant.json index 4e33a8b..a2cf9af 100644 --- a/scripts/json/homeassistant.json +++ b/scripts/json/homeassistant.json @@ -32,10 +32,6 @@ "password": null }, "notes": [ - { - "text": "Containerized version doesn't allow Home Assistant add-ons.", - "type": "warning" - }, { "text": "If the LXC is created Privileged, the script will automatically set up USB passthrough.", "type": "warning" diff --git a/scripts/json/host-backup.json b/scripts/json/host-backup.json index 30ae808..e124169 100644 --- a/scripts/json/host-backup.json +++ b/scripts/json/host-backup.json @@ -1,5 +1,5 @@ { - "name": "PVE Host Backup", + "name": "Proxmox VE Host Backup", "slug": "host-backup", "categories": [ 1 diff --git a/scripts/json/immich.json b/scripts/json/immich.json index e63d373..66eb663 100644 --- a/scripts/json/immich.json +++ b/scripts/json/immich.json @@ -23,7 +23,7 @@ "ram": 4096, "hdd": 20, "os": "Debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/joplin-server.json b/scripts/json/joplin-server.json deleted file mode 100644 index e57a716..0000000 --- a/scripts/json/joplin-server.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "Joplin Server", - "slug": "joplin-server", - "categories": [ - 12 - ], - "date_created": "2025-09-24", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 22300, - "documentation": "https://joplinapp.org/help/", - "config_path": "/opt/joplin-server/.env", - "website": "https://joplinapp.org/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/joplin.webp", - "description": "Joplin - the privacy-focused note taking app with sync capabilities for Windows, macOS, Linux, Android and iOS.", - "install_methods": [ - { - "type": "default", - "script": "ct/joplin-server.sh", - "resources": { - "cpu": 2, - "ram": 4096, - "hdd": 20, - "os": "Debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": "admin@localhost", - "password": "admin" - }, - "notes": [ - { - "text": "Application can take some time to build, depending on your host speed. Please be patient.", - "type": "info" - } - ] -} \ No newline at end of file diff --git a/scripts/json/kernel-clean.json b/scripts/json/kernel-clean.json index 7c1443a..f0afdf9 100644 --- a/scripts/json/kernel-clean.json +++ b/scripts/json/kernel-clean.json @@ -1,5 +1,5 @@ { - "name": "PVE Kernel Clean", + "name": "Proxmox VE Kernel Clean", "slug": "kernel-clean", "categories": [ 1 diff --git a/scripts/json/kernel-pin.json b/scripts/json/kernel-pin.json index a1c65e3..64cc62f 100644 --- a/scripts/json/kernel-pin.json +++ b/scripts/json/kernel-pin.json @@ -1,5 +1,5 @@ { - "name": "PVE Kernel Pin", + "name": "Proxmox VE Kernel Pin", "slug": "kernel-pin", "categories": [ 1 diff --git a/scripts/json/litellm.json b/scripts/json/litellm.json index 03f36a7..4dbd6ea 100644 --- a/scripts/json/litellm.json +++ b/scripts/json/litellm.json @@ -23,7 +23,7 @@ "ram": 2048, "hdd": 4, "os": "Debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/lxc-delete.json b/scripts/json/lxc-delete.json index fd0df31..b5e2c75 100644 --- a/scripts/json/lxc-delete.json +++ b/scripts/json/lxc-delete.json @@ -1,5 +1,5 @@ { - "name": "PVE LXC Deletion", + "name": "Container LXC Deletion", "slug": "lxc-delete", "categories": [ 1 diff --git a/scripts/json/lxc-execute.json b/scripts/json/lxc-execute.json deleted file mode 100644 index bc8e8ce..0000000 --- a/scripts/json/lxc-execute.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "PVE LXC Execute Command", - "slug": "lxc-execute", - "categories": [ - 1 - ], - "date_created": "2025-09-18", - "type": "pve", - "updateable": false, - "privileged": false, - "interface_port": null, - "documentation": null, - "website": null, - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/proxmox.webp", - "config_path": "", - "description": "This script allows administrators to execute a custom command inside one or multiple LXC containers on a Proxmox VE node. Containers can be selectively excluded via an interactive checklist. If a container is stopped, the script will automatically start it, run the command, and then shut it down again. Only Debian and Ubuntu based containers are supported.", - "install_methods": [ - { - "type": "default", - "script": "tools/pve/execute.sh", - "resources": { - "cpu": null, - "ram": null, - "hdd": null, - "os": null, - "version": null - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "Execute within the Proxmox shell.", - "type": "info" - }, - { - "text": "Non-Debian/Ubuntu containers will be skipped automatically.", - "type": "info" - }, - { - "text": "Stopped containers will be started temporarily to run the command, then shut down again.", - "type": "warning" - } - ] -} \ No newline at end of file diff --git a/scripts/json/metadata.json b/scripts/json/metadata.json index cc7bda6..16c7122 100644 --- a/scripts/json/metadata.json +++ b/scripts/json/metadata.json @@ -1,186 +1,31 @@ { "categories": [ - { - "name": "Proxmox & Virtualization", - "id": 1, - "sort_order": 1.0, - "description": "Tools and scripts to manage Proxmox VE and virtualization platforms effectively.", - "icon": "server" - }, - { - "name": "Operating Systems", - "id": 2, - "sort_order": 2.0, - "description": "Scripts for deploying and managing various operating systems.", - "icon": "monitor" - }, - { - "name": "Containers & Docker", - "id": 3, - "sort_order": 3.0, - "description": "Solutions for containerization using Docker and related technologies.", - "icon": "box" - }, - { - "name": "Network & Firewall", - "id": 4, - "sort_order": 4.0, - "description": "Enhance network security and configure firewalls with ease.", - "icon": "shield" - }, - { - "name": "Adblock & DNS", - "id": 5, - "sort_order": 5.0, - "description": "Optimize your network with DNS and ad-blocking solutions.", - "icon": "ban" - }, - { - "name": "Authentication & Security", - "id": 6, - "sort_order": 6.0, - "description": "Secure your infrastructure with authentication and security tools.", - "icon": "lock" - }, - { - "name": "Backup & Recovery", - "id": 7, - "sort_order": 7.0, - "description": "Reliable backup and recovery scripts to protect your data.", - "icon": "archive" - }, - { - "name": "Databases", - "id": 8, - "sort_order": 8.0, - "description": "Deploy and manage robust database systems with ease.", - "icon": "database" - }, - { - "name": "Monitoring & Analytics", - "id": 9, - "sort_order": 9.0, - "description": "Monitor system performance and analyze data seamlessly.", - "icon": "bar-chart" - }, - { - "name": "Dashboards & Frontends", - "id": 10, - "sort_order": 10.0, - "description": "Create interactive dashboards and user-friendly frontends.", - "icon": "layout" - }, - { - "name": "Files & Downloads", - "id": 11, - "sort_order": 11.0, - "description": "Manage file sharing and downloading solutions efficiently.", - "icon": "download" - }, - { - "name": "Documents & Notes", - "id": 12, - "sort_order": 12.0, - "description": "Organize and manage documents and note-taking tools.", - "icon": "file-text" - }, - { - "name": "Media & Streaming", - "id": 13, - "sort_order": 13.0, - "description": "Stream and manage media effortlessly across devices.", - "icon": "play" - }, - { - "name": "*Arr Suite", - "id": 14, - "sort_order": 14.0, - "description": "Automated media management with the popular *Arr suite tools.", - "icon": "tv" - }, - { - "name": "NVR & Cameras", - "id": 15, - "sort_order": 15.0, - "description": "Manage network video recorders and camera setups.", - "icon": "camera" - }, - { - "name": "IoT & Smart Home", - "id": 16, - "sort_order": 16.0, - "description": "Control and automate IoT devices and smart home systems.", - "icon": "home" - }, - { - "name": "ZigBee, Z-Wave & Matter", - "id": 17, - "sort_order": 17.0, - "description": "Solutions for ZigBee, Z-Wave, and Matter-based device management.", - "icon": "radio" - }, - { - "name": "MQTT & Messaging", - "id": 18, - "sort_order": 18.0, - "description": "Set up reliable messaging and MQTT-based communication systems.", - "icon": "message-circle" - }, - { - "name": "Automation & Scheduling", - "id": 19, - "sort_order": 19.0, - "description": "Automate tasks and manage scheduling with powerful tools.", - "icon": "clock" - }, - { - "name": "AI / Coding & Dev-Tools", - "id": 20, - "sort_order": 20.0, - "description": "Leverage AI and developer tools for smarter coding workflows.", - "icon": "code" - }, - { - "name": "Webservers & Proxies", - "id": 21, - "sort_order": 21.0, - "description": "Deploy and configure web servers and proxy solutions.", - "icon": "globe" - }, - { - "name": "Bots & ChatOps", - "id": 22, - "sort_order": 22.0, - "description": "Enhance collaboration with bots and ChatOps integrations.", - "icon": "bot" - }, - { - "name": "Finance & Budgeting", - "id": 23, - "sort_order": 23.0, - "description": "Track expenses and manage budgets efficiently.", - "icon": "dollar-sign" - }, - { - "name": "Gaming & Leisure", - "id": 24, - "sort_order": 24.0, - "description": "Scripts for gaming servers and leisure-related tools.", - "icon": "gamepad-2" - }, - { - "name": "Business & ERP", - "id": 25, - "sort_order": 25.0, - "description": "Streamline business operations with ERP and management tools.", - "icon": "building" - }, - { - "name": "Miscellaneous", - "id": 0, - "sort_order": 99.0, - "description": "General scripts and tools that don't fit into other categories.", - "icon": "more-horizontal" - } + { "name": "Proxmox & Virtualization", "id": 1, "sort_order": 1.0, "description": "Tools and scripts to manage Proxmox VE and virtualization platforms effectively." }, + { "name": "Operating Systems", "id": 2, "sort_order": 2.0, "description": "Scripts for deploying and managing various operating systems." }, + { "name": "Containers & Docker", "id": 3, "sort_order": 3.0, "description": "Solutions for containerization using Docker and related technologies." }, + { "name": "Network & Firewall", "id": 4, "sort_order": 4.0, "description": "Enhance network security and configure firewalls with ease." }, + { "name": "Adblock & DNS", "id": 5, "sort_order": 5.0, "description": "Optimize your network with DNS and ad-blocking solutions." }, + { "name": "Authentication & Security", "id": 6, "sort_order": 6.0, "description": "Secure your infrastructure with authentication and security tools." }, + { "name": "Backup & Recovery", "id": 7, "sort_order": 7.0, "description": "Reliable backup and recovery scripts to protect your data." }, + { "name": "Databases", "id": 8, "sort_order": 8.0, "description": "Deploy and manage robust database systems with ease." }, + { "name": "Monitoring & Analytics", "id": 9, "sort_order": 9.0, "description": "Monitor system performance and analyze data seamlessly." }, + { "name": "Dashboards & Frontends", "id": 10, "sort_order": 10.0, "description": "Create interactive dashboards and user-friendly frontends." }, + { "name": "Files & Downloads", "id": 11, "sort_order": 11.0, "description": "Manage file sharing and downloading solutions efficiently." }, + { "name": "Documents & Notes", "id": 12, "sort_order": 12.0, "description": "Organize and manage documents and note-taking tools." }, + { "name": "Media & Streaming", "id": 13, "sort_order": 13.0, "description": "Stream and manage media effortlessly across devices." }, + { "name": "*Arr Suite", "id": 14, "sort_order": 14.0, "description": "Automated media management with the popular *Arr suite tools." }, + { "name": "NVR & Cameras", "id": 15, "sort_order": 15.0, "description": "Manage network video recorders and camera setups." }, + { "name": "IoT & Smart Home", "id": 16, "sort_order": 16.0, "description": "Control and automate IoT devices and smart home systems." }, + { "name": "ZigBee, Z-Wave & Matter", "id": 17, "sort_order": 17.0, "description": "Solutions for ZigBee, Z-Wave, and Matter-based device management." }, + { "name": "MQTT & Messaging", "id": 18, "sort_order": 18.0, "description": "Set up reliable messaging and MQTT-based communication systems." }, + { "name": "Automation & Scheduling", "id": 19, "sort_order": 19.0, "description": "Automate tasks and manage scheduling with powerful tools." }, + { "name": "AI / Coding & Dev-Tools", "id": 20, "sort_order": 20.0, "description": "Leverage AI and developer tools for smarter coding workflows." }, + { "name": "Webservers & Proxies", "id": 21, "sort_order": 21.0, "description": "Deploy and configure web servers and proxy solutions." }, + { "name": "Bots & ChatOps", "id": 22, "sort_order": 22.0, "description": "Enhance collaboration with bots and ChatOps integrations." }, + { "name": "Finance & Budgeting", "id": 23, "sort_order": 23.0, "description": "Track expenses and manage budgets efficiently." }, + { "name": "Gaming & Leisure", "id": 24, "sort_order": 24.0, "description": "Scripts for gaming servers and leisure-related tools." }, + { "name": "Business & ERP", "id": 25, "sort_order": 25.0, "description": "Streamline business operations with ERP and management tools." }, + { "name": "Miscellaneous", "id": 0, "sort_order": 99.0, "description": "General scripts and tools that don't fit into other categories." } ] -} \ No newline at end of file +} + diff --git a/scripts/json/microcode.json b/scripts/json/microcode.json index d7af7ca..04ed600 100644 --- a/scripts/json/microcode.json +++ b/scripts/json/microcode.json @@ -1,5 +1,5 @@ { - "name": "PVE Processor Microcode", + "name": "Proxmox VE Processor Microcode", "slug": "microcode", "categories": [ 1 diff --git a/scripts/json/monitor-all.json b/scripts/json/monitor-all.json index 60f5ffd..8c47d35 100644 --- a/scripts/json/monitor-all.json +++ b/scripts/json/monitor-all.json @@ -1,5 +1,5 @@ { - "name": "PVE Monitor-All", + "name": "Proxmox VE Monitor-All", "slug": "monitor-all", "categories": [ 1 diff --git a/scripts/json/myip.json b/scripts/json/myip.json deleted file mode 100644 index 336cbe5..0000000 --- a/scripts/json/myip.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "MyIP", - "slug": "myip", - "categories": [ - 4 - ], - "date_created": "2025-09-29", - "type": "ct", - "updateable": true, - "privileged": false, - "config_path": "/opt/myip/.env", - "interface_port": 18966, - "documentation": "https://github.com/jason5ng32/MyIP#-environment-variable", - "website": "https://ipcheck.ing/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/myip.webp", - "description": "The best IP Toolbox. Easy to check what's your IPs, IP geolocation, check for DNS leaks, examine WebRTC connections, speed test, ping test, MTR test, check website availability, whois search and more!", - "install_methods": [ - { - "type": "default", - "script": "ct/myip.sh", - "resources": { - "cpu": 1, - "ram": 512, - "hdd": 2, - "os": "Debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [] -} \ No newline at end of file diff --git a/scripts/json/navidrome.json b/scripts/json/navidrome.json index fbf0300..34285fe 100644 --- a/scripts/json/navidrome.json +++ b/scripts/json/navidrome.json @@ -23,7 +23,7 @@ "ram": 1024, "hdd": 4, "os": "debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/netdata.json b/scripts/json/netdata.json index 06eeb23..bb3f9b8 100644 --- a/scripts/json/netdata.json +++ b/scripts/json/netdata.json @@ -1,5 +1,5 @@ { - "name": "PVE Netdata", + "name": "Proxmox VE Netdata", "slug": "netdata", "categories": [ 1 diff --git a/scripts/json/nocodb.json b/scripts/json/nocodb.json index e2ed6c6..c32313d 100644 --- a/scripts/json/nocodb.json +++ b/scripts/json/nocodb.json @@ -23,7 +23,7 @@ "ram": 1024, "hdd": 4, "os": "debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/node-red.json b/scripts/json/node-red.json index b6bb5b3..1cc6009 100644 --- a/scripts/json/node-red.json +++ b/scripts/json/node-red.json @@ -23,7 +23,7 @@ "ram": 1024, "hdd": 4, "os": "debian", - "version": "13" + "version": "12" } }, { diff --git a/scripts/json/ntfy.json b/scripts/json/ntfy.json index 0bf3b93..e868fcf 100644 --- a/scripts/json/ntfy.json +++ b/scripts/json/ntfy.json @@ -23,7 +23,7 @@ "ram": 512, "hdd": 2, "os": "debian", - "version": "13" + "version": "12" } } ], diff --git a/scripts/json/openwebui.json b/scripts/json/openwebui.json index 8035801..b06d1d2 100644 --- a/scripts/json/openwebui.json +++ b/scripts/json/openwebui.json @@ -31,10 +31,5 @@ "username": null, "password": null }, - "notes": [ - { - "text": "Script contains optional installation of Ollama.", - "type": "info" - } - ] + "notes": [] } \ No newline at end of file diff --git a/scripts/json/overseerr.json b/scripts/json/overseerr.json index 66ad3ba..8cbd531 100644 --- a/scripts/json/overseerr.json +++ b/scripts/json/overseerr.json @@ -20,7 +20,7 @@ "script": "ct/overseerr.sh", "resources": { "cpu": 2, - "ram": 4096, + "ram": 2048, "hdd": 8, "os": "debian", "version": "12" diff --git a/scripts/json/pbs-microcode.json b/scripts/json/pbs-microcode.json index d32095d..d5fe416 100644 --- a/scripts/json/pbs-microcode.json +++ b/scripts/json/pbs-microcode.json @@ -1,5 +1,5 @@ { - "name": "PBS Processor Microcode", + "name": "Proxmox Backup Server Processor Microcode", "slug": "pbs-microcode", "categories": [ 1 diff --git a/scripts/json/phpmyadmin.json b/scripts/json/phpmyadmin.json deleted file mode 100644 index 8f95664..0000000 --- a/scripts/json/phpmyadmin.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "name": "PhpMyAdmin", - "slug": "phpmyadmin", - "categories": [ - 8 - ], - "date_created": "2025-10-01", - "type": "addon", - "updateable": true, - "privileged": false, - "interface_port": null, - "documentation": "https://www.phpmyadmin.net/docs/", - "config_path": "Debian/Ubuntu: /var/www/html/phpMyAdmin | Alpine: /usr/share/phpmyadmin", - "website": "https://www.phpmyadmin.net/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/phpmyadmin.webp", - "description": "phpMyAdmin is a free software tool written in PHP, intended to handle the administration of MySQL over the Web. phpMyAdmin supports a wide range of operations on MySQL and MariaDB. Frequently used operations (managing databases, tables, columns, relations, indexes, users, permissions, etc) can be performed via the user interface, while you still have the ability to directly execute any SQL statement.", - "install_methods": [ - { - "type": "default", - "script": "tools/addon/phpmyadmin.sh", - "resources": { - "cpu": null, - "ram": null, - "hdd": null, - "os": null, - "version": null - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "Execute within an existing LXC Console", - "type": "warning" - }, - { - "text": "To update or uninstall run bash call again", - "type": "info" - } - ] -} \ No newline at end of file diff --git a/scripts/json/post-pbs-install.json b/scripts/json/post-pbs-install.json index d309b17..ad220fe 100644 --- a/scripts/json/post-pbs-install.json +++ b/scripts/json/post-pbs-install.json @@ -1,5 +1,5 @@ { - "name": "PBS Post Install", + "name": "Proxmox Backup Server Post Install", "slug": "post-pbs-install", "categories": [ 1 @@ -13,7 +13,7 @@ "website": null, "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/proxmox.webp", "config_path": "", - "description": "The script is designed for Proxmox Backup Server (PBS) and will give options to Disable the Enterprise Repo, Add/Correct PBS Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox Backup Server and Reboot PBS.", + "description": "The script will give options to Disable the Enterprise Repo, Add/Correct PBS Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox Backup Server and Reboot PBS.", "install_methods": [ { "type": "default", diff --git a/scripts/json/post-pmg-install.json b/scripts/json/post-pmg-install.json index 10b1126..0442f38 100644 --- a/scripts/json/post-pmg-install.json +++ b/scripts/json/post-pmg-install.json @@ -1,5 +1,5 @@ { - "name": "PMG Post Install", + "name": "Proxmox Mail Gateway Post Install", "slug": "post-pmg-install", "categories": [ 1 @@ -13,7 +13,7 @@ "website": null, "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/proxmox.webp", "config_path": "", - "description": "The script is designed for Proxmox Mail Gateway and will give options to Disable the Enterprise Repo, Add/Correct PMG Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox Mail Gateway and Reboot PMG.", + "description": "The script will give options to Disable the Enterprise Repo, Add/Correct PMG Sources, Enable the No-Subscription Repo, Add Test Repo, Disable Subscription Nag, Update Proxmox Mail Gateway and Reboot PMG.", "install_methods": [ { "type": "default", diff --git a/scripts/json/post-pve-install.json b/scripts/json/post-pve-install.json index f8ef703..283d39b 100644 --- a/scripts/json/post-pve-install.json +++ b/scripts/json/post-pve-install.json @@ -1,5 +1,5 @@ { - "name": "PVE Post Install", + "name": "Proxmox VE Post Install", "slug": "post-pve-install", "categories": [ 1 diff --git a/scripts/json/postgresql.json b/scripts/json/postgresql.json index 641a0c4..3328c8a 100644 --- a/scripts/json/postgresql.json +++ b/scripts/json/postgresql.json @@ -46,10 +46,6 @@ { "text": "Set a password after installation for postgres user by running `echo \"ALTER USER postgres with encrypted password 'your_password';\" | sudo -u postgres psql`", "type": "info" - }, - { - "text": "Debian script offers versions `15, 16, 17, 18`, while Alpine script offers versions `15, 16, 17`.", - "type": "info" } ] } \ No newline at end of file diff --git a/scripts/json/proxmox-backup-server.json b/scripts/json/proxmox-backup-server.json index 7d03338..ce64a6b 100644 --- a/scripts/json/proxmox-backup-server.json +++ b/scripts/json/proxmox-backup-server.json @@ -1,5 +1,5 @@ { - "name": "Proxmox Backup Server (PBS)", + "name": "Proxmox Backup Server", "slug": "proxmox-backup-server", "categories": [ 1 diff --git a/scripts/json/proxmox-datacenter-manager.json b/scripts/json/proxmox-datacenter-manager.json index f285eb0..21eef6c 100644 --- a/scripts/json/proxmox-datacenter-manager.json +++ b/scripts/json/proxmox-datacenter-manager.json @@ -1,5 +1,5 @@ { - "name": "Proxmox Datacenter Manager (PDM)", + "name": "Proxmox Datacenter Manager", "slug": "proxmox-datacenter-manager", "categories": [ 1 diff --git a/scripts/json/proxmox-mail-gateway.json b/scripts/json/proxmox-mail-gateway.json index 4183c28..89ea0de 100644 --- a/scripts/json/proxmox-mail-gateway.json +++ b/scripts/json/proxmox-mail-gateway.json @@ -1,5 +1,5 @@ { - "name": "Proxmox Mail Gateway (PMG)", + "name": "Proxmox Mail Gateway", "slug": "proxmox-mail-gateway", "categories": [ 1 diff --git a/scripts/json/pve-scripts-local.json b/scripts/json/pve-scripts-local.json deleted file mode 100644 index 6b82996..0000000 --- a/scripts/json/pve-scripts-local.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "PVEScriptsLocal", - "slug": "pve-scripts-local", - "categories": [ - 1 - ], - "date_created": "2025-10-03", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 3000, - "documentation": "https://github.com/community-scripts/ProxmoxVE-Local", - "config_path": "/opt/PVEScripts-Local/.env", - "website": "https://community-scripts.github.io/ProxmoxVE", - "logo": "https://raw.githubusercontent.com/community-scripts/ProxmoxVE-Local/refs/heads/main/.github/logo.png", - "description": "A modern web-based management interface for Proxmox VE (PVE) helper scripts. This tool provides a user-friendly way to discover, download, and execute community-sourced Proxmox scripts locally with real-time terminal output streaming.", - "install_methods": [ - { - "type": "default", - "script": "ct/pve-scripts-local.sh", - "resources": { - "cpu": 2, - "ram": 4096, - "hdd": 4, - "os": "Debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [] -} \ No newline at end of file diff --git a/scripts/json/scaling-governor.json b/scripts/json/scaling-governor.json index ff1998d..a09accf 100644 --- a/scripts/json/scaling-governor.json +++ b/scripts/json/scaling-governor.json @@ -1,5 +1,5 @@ { - "name": "PVE CPU Scaling Governor", + "name": "Proxmox VE CPU Scaling Governor", "slug": "scaling-governor", "categories": [ 1 diff --git a/scripts/json/tracktor.json b/scripts/json/tracktor.json index 7edc660..ead315d 100644 --- a/scripts/json/tracktor.json +++ b/scripts/json/tracktor.json @@ -10,7 +10,7 @@ "privileged": false, "interface_port": 3000, "documentation": "https://tracktor.bytedge.in/introduction.html", - "config_path": "/opt/tracktor.env", + "config_path": "/opt/tracktor/app/server/.env", "website": "https://tracktor.bytedge.in/", "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tracktor.webp", "description": "Tracktor is an open-source web application for comprehensive vehicle management.\nEasily track fuel consumption, maintenance, insurance, and regulatory documents for all your vehicles in one place.", @@ -23,17 +23,17 @@ "ram": 1024, "hdd": 6, "os": "Debian", - "version": "13" + "version": "12" } } ], "default_credentials": { "username": null, - "password": "123456" + "password": null }, "notes": [ { - "text": "Please check and update the '/opt/tracktor.env' file if using behind reverse proxy.", + "text": "Please check and update the '/opt/tracktor/app/backend/.env' file if using behind reverse proxy.", "type": "info" } ] diff --git a/scripts/json/tunarr.json b/scripts/json/tunarr.json deleted file mode 100644 index 8e25e86..0000000 --- a/scripts/json/tunarr.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "Tunarr", - "slug": "tunarr", - "categories": [ - 13 - ], - "date_created": "2025-09-19", - "type": "ct", - "updateable": true, - "privileged": false, - "config_path": "/opt/tunarr/.env", - "interface_port": 8000, - "documentation": "https://tunarr.com/", - "website": "https://tunarr.com/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/tunarr.webp", - "description": "Create a classic TV experience using your own media - IPTV backed by Plex/Jellyfin/Emby.", - "install_methods": [ - { - "type": "default", - "script": "ct/tunarr.sh", - "resources": { - "cpu": 2, - "ram": 1024, - "hdd": 5, - "os": "Debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [] -} \ No newline at end of file diff --git a/scripts/json/undefined.json b/scripts/json/undefined.json index 397772e..2114fab 100644 --- a/scripts/json/undefined.json +++ b/scripts/json/undefined.json @@ -1,38 +1,58 @@ [ { - "name": "Graylog2/graylog2-server", - "version": "7.0.0-beta.3", - "date": "2025-10-06T11:25:12Z" + "name": "meilisearch/meilisearch", + "version": "latest", + "date": "2025-09-15T11:12:14Z" }, { - "name": "inventree/InvenTree", - "version": "1.0.4", - "date": "2025-10-06T11:12:04Z" + "name": "FlowiseAI/Flowise", + "version": "flowise@3.0.6", + "date": "2025-09-15T11:07:20Z" }, { - "name": "wizarrrr/wizarr", - "version": "v2025.10.2", - "date": "2025-10-06T11:10:37Z" + "name": "VictoriaMetrics/VictoriaMetrics", + "version": "v1.126.0", + "date": "2025-09-15T10:43:35Z" }, { - "name": "mattermost/mattermost", - "version": "mattermost-redux@10.12.0", - "date": "2025-09-18T20:15:19Z" + "name": "zitadel/zitadel", + "version": "v4.2.0", + "date": "2025-09-15T09:29:55Z" }, { - "name": "jordan-dalby/ByteStash", - "version": "v1.5.9", - "date": "2025-10-06T08:34:01Z" + "name": "authelia/authelia", + "version": "v4.39.10", + "date": "2025-09-15T09:11:13Z" + }, + { + "name": "emqx/emqx", + "version": "e5.8.6-hotfix2", + "date": "2025-09-15T08:31:12Z" + }, + { + "name": "Checkmk/checkmk", + "version": "v2.4.0p12-rc1", + "date": "2025-09-15T07:21:11Z" + }, + { + "name": "esphome/esphome", + "version": "2025.8.4", + "date": "2025-09-10T05:03:47Z" }, { "name": "Jackett/Jackett", - "version": "v0.24.82", - "date": "2025-10-06T07:56:13Z" + "version": "v0.23.23", + "date": "2025-09-15T05:57:33Z" }, { - "name": "dgtlmoon/changedetection.io", - "version": "0.50.15", - "date": "2025-10-06T07:15:01Z" + "name": "mealie-recipes/mealie", + "version": "v3.2.1", + "date": "2025-09-15T03:45:31Z" + }, + { + "name": "Prowlarr/Prowlarr", + "version": "v2.0.5.5160", + "date": "2025-08-23T21:23:11Z" }, { "name": "firefly-iii/firefly-iii", @@ -40,24 +60,24 @@ "date": "2025-09-13T16:38:21Z" }, { - "name": "moghtech/komodo", - "version": "v1.19.5", - "date": "2025-09-27T20:59:46Z" + "name": "cross-seed/cross-seed", + "version": "v6.13.3", + "date": "2025-09-08T21:45:15Z" }, { - "name": "henrygd/beszel", - "version": "v0.13.1", - "date": "2025-10-06T01:27:46Z" + "name": "9001/copyparty", + "version": "v1.19.9", + "date": "2025-09-15T00:54:27Z" }, { - "name": "hyperion-project/hyperion.ng", - "version": "2.1.1", - "date": "2025-06-14T17:45:06Z" + "name": "crafty-controller/crafty-4", + "version": "v4.5.4", + "date": "2025-09-15T00:49:53Z" }, { "name": "jeedom/core", "version": "4.4.20", - "date": "2025-10-06T00:27:06Z" + "date": "2025-09-15T00:27:09Z" }, { "name": "steveiliop56/tinyauth", @@ -65,64 +85,29 @@ "date": "2025-07-17T12:08:03Z" }, { - "name": "9001/copyparty", - "version": "v1.19.16", - "date": "2025-10-05T23:28:59Z" + "name": "inventree/InvenTree", + "version": "1.0.0", + "date": "2025-09-14T23:37:56Z" }, { - "name": "sabnzbd/sabnzbd", - "version": "4.5.3", - "date": "2025-08-25T13:59:56Z" + "name": "fallenbagel/jellyseerr", + "version": "preview-test-arm-builds", + "date": "2025-09-14T20:12:37Z" }, { - "name": "outline/outline", - "version": "v1.0.0-0", - "date": "2025-10-05T20:30:31Z" + "name": "moghtech/komodo", + "version": "v1.19.4", + "date": "2025-09-14T19:51:50Z" }, { - "name": "plankanban/planka", - "version": "planka-1.0.5", - "date": "2025-10-05T18:54:25Z" + "name": "ErsatzTV/ErsatzTV", + "version": "v25.6.0", + "date": "2025-09-14T17:55:21Z" }, { "name": "msgbyte/tianji", - "version": "v1.27.6", - "date": "2025-10-05T17:27:46Z" - }, - { - "name": "pocket-id/pocket-id", - "version": "v1.13.0", - "date": "2025-10-05T15:41:31Z" - }, - { - "name": "BookStackApp/BookStack", - "version": "v25.07.3", - "date": "2025-10-05T14:47:20Z" - }, - { - "name": "runtipi/runtipi", - "version": "v4.4.0", - "date": "2025-09-02T19:26:18Z" - }, - { - "name": "Prowlarr/Prowlarr", - "version": "v2.0.5.5160", - "date": "2025-08-23T21:23:11Z" - }, - { - "name": "chrisvel/tududi", - "version": "v0.82-rc5", - "date": "2025-09-23T07:31:12Z" - }, - { - "name": "TandoorRecipes/recipes", - "version": "2.3.0", - "date": "2025-10-05T11:13:58Z" - }, - { - "name": "Radarr/Radarr", - "version": "v5.27.5.10198", - "date": "2025-09-03T12:08:43Z" + "version": "v1.25.8", + "date": "2025-09-14T16:50:23Z" }, { "name": "Lidarr/Lidarr", @@ -130,34 +115,39 @@ "date": "2025-08-28T20:06:24Z" }, { - "name": "seriousm4x/UpSnap", - "version": "5.2.2", - "date": "2025-10-05T09:12:17Z" + "name": "ellite/Wallos", + "version": "v4.2.0", + "date": "2025-09-14T14:49:18Z" }, { - "name": "evcc-io/evcc", - "version": "0.209.0", - "date": "2025-10-05T07:45:18Z" + "name": "karakeep-app/karakeep", + "version": "cli/v0.27.1", + "date": "2025-09-14T14:48:48Z" }, { - "name": "pommee/goaway", - "version": "v0.62.11", - "date": "2025-10-05T07:31:57Z" + "name": "docmost/docmost", + "version": "v0.23.1", + "date": "2025-09-14T14:31:45Z" }, { - "name": "YunoHost/yunohost", - "version": "debian/12.1.27", - "date": "2025-10-05T02:16:42Z" + "name": "semaphoreui/semaphore", + "version": "v2.17.0-beta2", + "date": "2025-09-14T14:08:27Z" }, { - "name": "BerriAI/litellm", - "version": "v1.77.7-nightly", - "date": "2025-10-05T01:43:25Z" + "name": "intri-in/manage-my-damn-life-nextjs", + "version": "v0.8.1", + "date": "2025-09-14T06:45:23Z" }, { - "name": "webmin/webmin", - "version": "2.520", - "date": "2025-10-05T00:51:34Z" + "name": "Luligu/matterbridge", + "version": "3.2.7", + "date": "2025-09-14T06:35:13Z" + }, + { + "name": "gtsteffaniak/filebrowser", + "version": "v0.8.5-beta", + "date": "2025-09-13T22:53:30Z" }, { "name": "Ombi-app/Ombi", @@ -165,89 +155,69 @@ "date": "2025-01-05T21:14:23Z" }, { - "name": "ollama/ollama", - "version": "v0.12.4-rc5", - "date": "2025-10-04T16:18:42Z" + "name": "home-assistant/core", + "version": "2025.9.3", + "date": "2025-09-13T12:44:37Z" }, { - "name": "SigNoz/signoz", - "version": "v0.97.0-rc.2", - "date": "2025-10-04T16:21:45Z" + "name": "gotify/server", + "version": "v2.7.2", + "date": "2025-09-13T12:11:38Z" }, { - "name": "gtsteffaniak/filebrowser", - "version": "v0.8.8-beta", - "date": "2025-10-04T15:56:29Z" + "name": "wizarrrr/wizarr", + "version": "v2025.9.3", + "date": "2025-09-13T11:44:41Z" }, { - "name": "silverbulletmd/silverbullet", - "version": "2.1.7", - "date": "2025-10-04T13:41:43Z" + "name": "syncthing/syncthing", + "version": "v2.0.9", + "date": "2025-09-13T09:37:24Z" }, { - "name": "globaleaks/globaleaks-whistleblowing-software", - "version": "v5.0.84", - "date": "2025-10-04T08:06:12Z" + "name": "documenso/documenso", + "version": "v1.12.4", + "date": "2025-09-13T08:08:55Z" }, { - "name": "ErsatzTV/ErsatzTV", - "version": "v25.7.0", - "date": "2025-10-04T00:36:45Z" + "name": "ollama/ollama", + "version": "v0.11.11-rc3", + "date": "2025-09-12T23:40:14Z" }, { - "name": "rcourtman/Pulse", - "version": "v4.21.0", - "date": "2025-10-03T22:38:32Z" + "name": "coder/code-server", + "version": "v4.103.2", + "date": "2025-08-25T23:30:54Z" }, { - "name": "Luligu/matterbridge", - "version": "3.3.0", - "date": "2025-10-03T21:22:14Z" + "name": "YunoHost/yunohost", + "version": "debian/12.1.23", + "date": "2025-09-12T22:15:47Z" }, { - "name": "keycloak/keycloak", - "version": "26.4.0", - "date": "2025-09-30T11:49:13Z" + "name": "chrisvel/tududi", + "version": "v0.82-rc2", + "date": "2025-09-12T09:59:30Z" }, { "name": "homarr-labs/homarr", - "version": "v1.40.0", - "date": "2025-10-03T19:14:46Z" - }, - { - "name": "wazuh/wazuh", - "version": "coverity-w41-4.14.0", - "date": "2025-10-03T18:56:57Z" + "version": "v1.37.0", + "date": "2025-09-12T19:19:14Z" }, { - "name": "home-assistant/core", - "version": "2025.10.1", - "date": "2025-10-03T18:10:59Z" - }, - { - "name": "fuma-nama/fumadocs", - "version": "@fumadocs/mdx-remote@1.4.2", - "date": "2025-10-03T17:01:32Z" - }, - { - "name": "bunkerity/bunkerweb", - "version": "v1.6.5", - "date": "2025-10-03T16:43:34Z" + "name": "booklore-app/booklore", + "version": "v1.3.0", + "date": "2025-09-12T19:06:32Z" }, { "name": "immich-app/immich", - "version": "v2.0.1", - "date": "2025-10-03T16:32:01Z" - }, - { - "name": "duplicati/duplicati", - "version": "v2.1.1.104-2.1.1.104_canary_2025-10-03", - "date": "2025-10-03T13:14:48Z" + "version": "v1.142.0", + "date": "2025-09-12T18:52:03Z" }, { - "name": "docker/compose", - "version": "v2.40.0", - "date": "2025-10-03T12:56:38Z" + "name": "keycloak/keycloak", + "version": "26.3.4", + "date": "2025-09-12T13:28:51Z" }, { "name": "nzbgetcom/nzbget", @@ -255,615 +225,180 @@ "date": "2025-09-01T09:47:06Z" }, { - "name": "pocketbase/pocketbase", - "version": "v0.30.1", - "date": "2025-10-03T06:55:25Z" - }, - { - "name": "booklore-app/booklore", - "version": "v1.4.1", - "date": "2025-10-03T06:52:35Z" - }, - { - "name": "redis/redis", - "version": "8.2.2", - "date": "2025-10-03T06:22:38Z" - }, - { - "name": "mealie-recipes/mealie", - "version": "v3.3.1", - "date": "2025-10-02T17:10:34Z" - }, - { - "name": "jhuckaby/Cronicle", - "version": "v0.9.95", - "date": "2025-10-02T16:07:18Z" - }, - { - "name": "meilisearch/meilisearch", - "version": "prototype-shorten-snapshot-creation-0", - "date": "2025-10-02T15:16:05Z" - }, - { - "name": "n8n-io/n8n", - "version": "n8n@1.112.6", - "date": "2025-09-26T10:56:27Z" - }, - { - "name": "theonedev/onedev", - "version": "v13.0.7", - "date": "2025-10-02T14:33:22Z" - }, - { - "name": "cockpit-project/cockpit", - "version": "348", - "date": "2025-10-02T13:51:28Z" - }, - { - "name": "kyantech/Palmr", - "version": "v3.2.3-beta", - "date": "2025-10-02T13:48:14Z" - }, - { - "name": "apache/tomcat", - "version": "10.1.47", - "date": "2025-10-02T12:12:04Z" - }, - { - "name": "actualbudget/actual", - "version": "v25.10.0", - "date": "2025-10-02T11:34:39Z" - }, - { - "name": "jenkinsci/jenkins", - "version": "jenkins-2.530", - "date": "2025-09-30T15:42:52Z" - }, - { - "name": "laurent22/joplin", - "version": "server-v3.4.4", - "date": "2025-09-25T13:19:26Z" - }, - { - "name": "ipfs/kubo", - "version": "v0.38.0", - "date": "2025-10-02T01:46:06Z" - }, - { - "name": "NodeBB/NodeBB", - "version": "v4.6.0", - "date": "2025-10-01T18:12:07Z" - }, - { - "name": "Koenkk/zigbee2mqtt", - "version": "2.6.2", - "date": "2025-10-01T17:51:09Z" - }, - { - "name": "glpi-project/glpi", - "version": "11.0.0", - "date": "2025-10-01T12:00:01Z" - }, - { - "name": "authelia/authelia", - "version": "v4.39.11", - "date": "2025-10-01T11:42:23Z" - }, - { - "name": "esphome/esphome", - "version": "2025.9.3", - "date": "2025-10-01T11:30:07Z" - }, - { - "name": "element-hq/synapse", - "version": "v1.139.0", - "date": "2025-10-01T08:24:16Z" - }, - { - "name": "Kozea/Radicale", - "version": "v3.5.7.pypi", - "date": "2025-10-01T05:32:27Z" - }, - { - "name": "HabitRPG/habitica", - "version": "v5.41.4", - "date": "2025-09-30T22:26:11Z" - }, - { - "name": "zabbix/zabbix", - "version": "7.4.3", - "date": "2025-09-30T21:49:53Z" + "name": "cloudreve/cloudreve", + "version": "4.8.0", + "date": "2025-09-12T09:48:11Z" }, { - "name": "mongodb/mongo", - "version": "r8.2.1", - "date": "2025-09-30T21:46:28Z" + "name": "wazuh/wazuh", + "version": "coverity-w37-4.13.0", + "date": "2025-09-10T15:46:01Z" }, { "name": "MediaBrowser/Emby.Releases", - "version": "4.9.1.80", - "date": "2025-09-30T20:25:16Z" + "version": "4.9.1.2", + "date": "2025-06-26T22:08:00Z" }, { - "name": "netbox-community/netbox", - "version": "v4.4.2", - "date": "2025-09-30T20:16:13Z" - }, - { - "name": "TwiN/gatus", - "version": "v5.25.2", - "date": "2025-09-30T18:32:35Z" - }, - { - "name": "WordPress/WordPress", - "version": "4.7.31", - "date": "2025-09-30T18:00:06Z" - }, - { - "name": "MagicMirrorOrg/MagicMirror", - "version": "v2.33.0", - "date": "2025-09-30T16:18:10Z" - }, - { - "name": "gristlabs/grist-core", - "version": "v1.7.4", - "date": "2025-09-30T13:34:30Z" - }, - { - "name": "neo4j/neo4j", - "version": "4.4.46", - "date": "2025-09-30T13:21:24Z" - }, - { - "name": "fallenbagel/jellyseerr", - "version": "preview-rename-tags", - "date": "2025-09-30T12:50:15Z" - }, - { - "name": "emqx/emqx", - "version": "e6.0.0", - "date": "2025-09-30T12:04:20Z" - }, - { - "name": "zitadel/zitadel", - "version": "v4.3.0", - "date": "2025-09-30T06:54:15Z" - }, - { - "name": "thomiceli/opengist", - "version": "v1.11.1", - "date": "2025-09-30T00:24:16Z" - }, - { - "name": "goauthentik/authentik", - "version": "version/2025.8.4", - "date": "2025-09-30T00:03:11Z" - }, - { - "name": "verdaccio/verdaccio", - "version": "v6.2.0", - "date": "2025-09-29T20:59:23Z" + "name": "mattermost/mattermost", + "version": "server/public/v0.1.19", + "date": "2025-09-11T22:57:26Z" }, { - "name": "influxdata/telegraf", - "version": "v1.36.2", - "date": "2025-09-29T19:16:49Z" + "name": "go-vikunja/vikunja", + "version": "v1.0.0-rc0", + "date": "2025-08-17T18:47:15Z" }, { - "name": "Cleanuparr/Cleanuparr", - "version": "v2.3.3", - "date": "2025-09-29T18:53:35Z" + "name": "tailscale/tailscale", + "version": "v1.88.1", + "date": "2025-09-11T22:19:51Z" }, { "name": "influxdata/influxdb", - "version": "v2.7.12", - "date": "2025-05-29T17:08:26Z" + "version": "v3.4.2", + "date": "2025-09-11T20:43:23Z" }, { - "name": "sassanix/Warracker", - "version": "0.10.1.13", - "date": "2025-09-29T17:11:25Z" - }, - { - "name": "AdguardTeam/AdGuardHome", - "version": "v0.107.67", - "date": "2025-09-29T14:45:57Z" - }, - { - "name": "MDeLuise/plant-it", - "version": "1.0.0", - "date": "2025-09-29T13:53:50Z" - }, - { - "name": "documenso/documenso", - "version": "v1.12.8", - "date": "2025-09-29T13:22:59Z" - }, - { - "name": "jupyter/notebook", - "version": "@jupyter-notebook/ui-components@7.5.0-beta.0", - "date": "2025-09-29T09:16:42Z" - }, - { - "name": "open-webui/open-webui", - "version": "v0.6.32", - "date": "2025-09-29T06:13:12Z" - }, - { - "name": "autobrr/autobrr", - "version": "v1.67.0", - "date": "2025-09-28T20:49:34Z" - }, - { - "name": "lazy-media/Reactive-Resume", - "version": "v1.2.6", - "date": "2025-09-28T18:09:21Z" - }, - { - "name": "jellyfin/jellyfin", - "version": "v10.10.7", - "date": "2025-04-05T19:14:59Z" - }, - { - "name": "karlomikus/bar-assistant", - "version": "v5.8.1", - "date": "2025-09-28T14:47:06Z" - }, - { - "name": "Pf2eToolsOrg/Pf2eTools", - "version": "v0.10.1", - "date": "2025-09-28T08:55:44Z" - }, - { - "name": "morpheus65535/bazarr", - "version": "v1.5.3", - "date": "2025-09-20T12:12:33Z" - }, - { - "name": "raydak-labs/configarr", - "version": "v1.16.0", - "date": "2025-09-27T16:19:27Z" - }, - { - "name": "kimai/kimai", - "version": "2.40.0", - "date": "2025-09-27T16:19:26Z" - }, - { - "name": "FreshRSS/FreshRSS", - "version": "1.27.1", - "date": "2025-09-27T13:07:26Z" + "name": "HabitRPG/habitica", + "version": "v5.41.0", + "date": "2025-09-11T19:46:20Z" }, { - "name": "javedh-dev/tracktor", - "version": "0.3.17", - "date": "2025-09-27T07:00:36Z" + "name": "zerotier/ZeroTierOne", + "version": "1.16.0", + "date": "2025-09-11T18:01:57Z" }, { "name": "Dolibarr/dolibarr", - "version": "22.0.2", - "date": "2025-09-27T01:43:20Z" - }, - { - "name": "cross-seed/cross-seed", - "version": "v6.13.5", - "date": "2025-09-27T01:10:59Z" - }, - { - "name": "coder/code-server", - "version": "v4.104.2", - "date": "2025-09-26T22:34:32Z" - }, - { - "name": "bastienwirtz/homer", - "version": "v25.09.1", - "date": "2025-09-26T19:22:16Z" - }, - { - "name": "traefik/traefik", - "version": "v3.5.3", - "date": "2025-09-26T09:31:01Z" - }, - { - "name": "go-gitea/gitea", - "version": "v1.26.0-dev", - "date": "2025-09-24T16:45:38Z" - }, - { - "name": "crowdsecurity/crowdsec", - "version": "v1.7.0", - "date": "2025-09-01T10:10:34Z" + "version": "18.0.8", + "date": "2025-09-11T16:27:45Z" }, { "name": "Threadfin/Threadfin", - "version": "1.2.39", - "date": "2025-09-25T15:57:02Z" - }, - { - "name": "tailscale/tailscale", - "version": "v1.88.3", - "date": "2025-09-25T15:49:37Z" - }, - { - "name": "linkwarden/linkwarden", - "version": "v2.13.0", - "date": "2025-09-25T15:19:02Z" - }, - { - "name": "bluenviron/mediamtx", - "version": "v1.15.1", - "date": "2025-09-25T13:35:14Z" - }, - { - "name": "forgejo/forgejo", - "version": "v14.0.0-dev", - "date": "2025-09-25T13:19:45Z" - }, - { - "name": "rabbitmq/rabbitmq-server", - "version": "v4.1.4", - "date": "2025-09-02T14:26:24Z" - }, - { - "name": "gelbphoenix/autocaliweb", - "version": "v0.10.2", - "date": "2025-09-24T18:23:36Z" - }, - { - "name": "rclone/rclone", - "version": "v1.71.1", - "date": "2025-09-24T16:32:16Z" - }, - { - "name": "alexta69/metube", - "version": "2025.09.24", - "date": "2025-09-24T13:51:23Z" - }, - { - "name": "AlexxIT/go2rtc", - "version": "v1.9.10", - "date": "2025-09-24T13:49:53Z" - }, - { - "name": "zwave-js/zwave-js-ui", - "version": "v11.3.1", - "date": "2025-09-24T11:58:00Z" - }, - { - "name": "syncthing/syncthing", - "version": "v2.0.10", - "date": "2025-09-24T08:33:37Z" - }, - { - "name": "chrisbenincasa/tunarr", - "version": "v0.22.5", - "date": "2025-09-24T00:01:40Z" - }, - { - "name": "grafana/grafana", - "version": "v12.2.0", - "date": "2025-09-23T23:47:02Z" - }, - { - "name": "Part-DB/Part-DB-server", - "version": "v2.2.0", - "date": "2025-09-23T21:46:21Z" - }, - { - "name": "getumbrel/umbrel", - "version": "1.4.2", - "date": "2025-05-09T08:54:49Z" - }, - { - "name": "postgres/postgres", - "version": "REL_18_0", - "date": "2025-09-22T20:11:33Z" - }, - { - "name": "gethomepage/homepage", - "version": "v1.5.0", - "date": "2025-09-22T15:28:49Z" - }, - { - "name": "cloudflare/cloudflared", - "version": "2025.9.1", - "date": "2025-09-22T13:32:14Z" - }, - { - "name": "itsmng/itsm-ng", - "version": "v2.1.0", - "date": "2025-09-22T09:23:37Z" + "version": "1.2.37", + "date": "2025-09-11T16:13:41Z" }, { "name": "prometheus/prometheus", - "version": "v3.6.0", - "date": "2025-09-22T08:24:59Z" + "version": "v0.306.0-rc.1", + "date": "2025-09-11T13:37:41Z" }, { - "name": "Athou/commafeed", - "version": "5.11.1", - "date": "2025-09-22T02:21:27Z" - }, - { - "name": "openhab/openhab-core", - "version": "5.1.0.M1", - "date": "2025-09-21T13:17:32Z" - }, - { - "name": "gotify/server", - "version": "v2.7.3", - "date": "2025-09-21T12:07:19Z" - }, - { - "name": "traccar/traccar", - "version": "v6.10.0", - "date": "2025-09-20T15:40:36Z" - }, - { - "name": "mmastrac/stylus", - "version": "v0.17.0", - "date": "2025-09-19T22:23:28Z" + "name": "apache/tika", + "version": "3.2.3-rc1", + "date": "2025-09-11T14:37:50Z" }, { - "name": "hargata/lubelog", - "version": "v1.5.2", - "date": "2025-09-19T14:18:53Z" + "name": "rcourtman/Pulse", + "version": "v4.14.0", + "date": "2025-09-05T18:28:28Z" }, { - "name": "saltstack/salt", - "version": "v3007.8", - "date": "2025-09-18T18:19:04Z" + "name": "bunkerity/bunkerweb", + "version": "v1.6.4", + "date": "2025-08-18T20:22:07Z" }, { - "name": "docmost/docmost", - "version": "v0.23.2", - "date": "2025-09-18T17:18:59Z" + "name": "Paymenter/Paymenter", + "version": "v1.3.2", + "date": "2025-09-11T09:54:47Z" }, { - "name": "grokability/snipe-it", - "version": "v8.3.2", - "date": "2025-09-18T13:55:58Z" + "name": "cockpit-project/cockpit", + "version": "345.2", + "date": "2025-09-11T09:06:44Z" }, { "name": "NLnetLabs/unbound", - "version": "release-1.24.0", - "date": "2025-09-18T08:36:55Z" - }, - { - "name": "TasmoAdmin/TasmoAdmin", - "version": "v4.3.1", - "date": "2025-07-22T20:10:08Z" - }, - { - "name": "eclipse-mosquitto/mosquitto", - "version": "2.1.0-test1", - "date": "2025-09-17T18:21:45Z" - }, - { - "name": "heiher/hev-socks5-server", - "version": "2.10.0", - "date": "2025-09-17T14:47:00Z" - }, - { - "name": "icereed/paperless-gpt", - "version": "v0.23.0", - "date": "2025-09-17T10:15:51Z" - }, - { - "name": "semaphoreui/semaphore", - "version": "v2.16.31", - "date": "2025-09-17T09:57:55Z" + "version": "release-1.24.0rc1", + "date": "2025-09-11T07:05:16Z" }, { - "name": "WGDashboard/WGDashboard", - "version": "v4.3.0.1", - "date": "2025-09-17T08:50:39Z" - }, - { - "name": "tobychui/zoraxy", - "version": "v3.2.5r2", - "date": "2025-07-21T12:52:26Z" - }, - { - "name": "Checkmk/checkmk", - "version": "v2.4.0p12", - "date": "2025-09-16T12:53:03Z" - }, - { - "name": "readeck/readeck", - "version": "0.20.3", - "date": "2025-09-16T07:29:49Z" - }, - { - "name": "wavelog/wavelog", - "version": "2.1.1", - "date": "2025-09-16T06:21:32Z" - }, - { - "name": "Paymenter/Paymenter", - "version": "v1.3.4", - "date": "2025-09-15T20:48:02Z" - }, - { - "name": "apache/tika", - "version": "3.2.0", - "date": "2025-09-15T18:03:08Z" + "name": "go-gitea/gitea", + "version": "v1.24.6", + "date": "2025-09-11T04:20:27Z" }, { - "name": "FlareSolverr/FlareSolverr", - "version": "v3.4.1", - "date": "2025-09-15T18:01:24Z" + "name": "TandoorRecipes/recipes", + "version": "2.2.0", + "date": "2025-09-10T18:36:56Z" }, { - "name": "ellite/Wallos", - "version": "v4.3.0", - "date": "2025-09-15T17:34:48Z" + "name": "fuma-nama/fumadocs", + "version": "fumadocs-mdx@11.9.1", + "date": "2025-09-10T15:26:47Z" }, { - "name": "Brandawg93/PeaNUT", - "version": "v5.15.0", - "date": "2025-09-15T17:25:58Z" + "name": "linuxserver/Heimdall", + "version": "v2.7.5", + "date": "2025-09-10T15:16:49Z" }, { - "name": "FlowiseAI/Flowise", - "version": "flowise@3.0.7", - "date": "2025-09-15T16:08:09Z" + "name": "mongodb/mongo", + "version": "r7.0.25-alpha0", + "date": "2025-09-10T12:13:38Z" }, { - "name": "linuxserver/Heimdall", - "version": "v2.7.6", - "date": "2025-09-15T15:50:44Z" + "name": "aceberg/WatchYourLAN", + "version": "2.1.4", + "date": "2025-09-10T12:08:09Z" }, { - "name": "usememos/memos", - "version": "v0.25.1", - "date": "2025-09-15T14:57:30Z" + "name": "glpi-project/glpi", + "version": "10.0.20", + "date": "2025-09-10T12:00:00Z" }, { - "name": "VictoriaMetrics/VictoriaMetrics", - "version": "pmm-6401-v1.126.0", - "date": "2025-09-15T11:32:31Z" + "name": "open-webui/open-webui", + "version": "v0.6.28", + "date": "2025-09-10T10:53:42Z" }, { - "name": "crafty-controller/crafty-4", - "version": "v4.5.4", - "date": "2025-09-15T00:49:53Z" + "name": "jenkinsci/jenkins", + "version": "jenkins-2.527", + "date": "2025-09-09T19:58:28Z" }, { - "name": "karakeep-app/karakeep", - "version": "cli/v0.27.1", - "date": "2025-09-14T14:48:48Z" + "name": "kyantech/Palmr", + "version": "v3.2.1-beta", + "date": "2025-09-09T19:47:13Z" }, { - "name": "intri-in/manage-my-damn-life-nextjs", - "version": "v0.8.1", - "date": "2025-09-14T06:45:23Z" + "name": "Part-DB/Part-DB-server", + "version": "v2.1.2", + "date": "2025-09-09T19:34:11Z" }, { - "name": "cloudreve/cloudreve", - "version": "4.8.0", - "date": "2025-09-12T09:48:11Z" + "name": "hargata/lubelog", + "version": "v1.5.1", + "date": "2025-09-09T16:56:49Z" }, { - "name": "go-vikunja/vikunja", - "version": "v1.0.0-rc0", - "date": "2025-08-17T18:47:15Z" + "name": "element-hq/synapse", + "version": "v1.138.0", + "date": "2025-09-09T11:25:50Z" }, { - "name": "zerotier/ZeroTierOne", - "version": "1.16.0", - "date": "2025-09-11T18:01:57Z" + "name": "traefik/traefik", + "version": "v3.5.2", + "date": "2025-09-09T10:28:12Z" }, { - "name": "aceberg/WatchYourLAN", - "version": "2.1.4", - "date": "2025-09-10T12:08:09Z" + "name": "docker/compose", + "version": "v2.39.3", + "date": "2025-09-09T08:27:27Z" }, { "name": "OctoPrint/OctoPrint", "version": "1.11.3", "date": "2025-09-09T08:03:31Z" }, + { + "name": "readeck/readeck", + "version": "0.20.2", + "date": "2025-09-09T06:09:25Z" + }, { "name": "gotson/komga", "version": "1.23.4", @@ -879,11 +414,41 @@ "version": "v4.3.1", "date": "2025-09-08T22:26:23Z" }, + { + "name": "n8n-io/n8n", + "version": "n8n@1.109.2", + "date": "2025-09-03T07:50:21Z" + }, + { + "name": "apache/tomcat", + "version": "10.1.46", + "date": "2025-09-08T14:29:54Z" + }, { "name": "home-assistant/operating-system", "version": "16.2", "date": "2025-09-08T14:03:25Z" }, + { + "name": "theonedev/onedev", + "version": "v12.0.10", + "date": "2025-09-08T13:20:16Z" + }, + { + "name": "evcc-io/evcc", + "version": "0.207.6", + "date": "2025-09-08T11:52:00Z" + }, + { + "name": "autobrr/autobrr", + "version": "v1.66.1", + "date": "2025-09-08T10:49:03Z" + }, + { + "name": "webmin/webmin", + "version": "2.501", + "date": "2025-09-08T04:50:25Z" + }, { "name": "paperless-ngx/paperless-ngx", "version": "v2.18.4", @@ -894,11 +459,46 @@ "version": "RELEASE.2025-09-07T16-13-09Z", "date": "2025-09-07T18:53:04Z" }, + { + "name": "dgtlmoon/changedetection.io", + "version": "0.50.12", + "date": "2025-09-07T14:16:07Z" + }, + { + "name": "runtipi/runtipi", + "version": "v4.4.0", + "date": "2025-09-02T19:26:18Z" + }, + { + "name": "Radarr/Radarr", + "version": "v5.27.5.10198", + "date": "2025-09-03T12:08:43Z" + }, + { + "name": "pocketbase/pocketbase", + "version": "v0.30.0", + "date": "2025-09-07T05:25:44Z" + }, + { + "name": "forgejo/forgejo", + "version": "v12.0.3", + "date": "2025-09-06T07:01:44Z" + }, { "name": "Stirling-Tools/Stirling-PDF", "version": "v1.3.2", "date": "2025-09-05T18:44:15Z" }, + { + "name": "henrygd/beszel", + "version": "v0.12.7", + "date": "2025-09-05T18:11:36Z" + }, + { + "name": "Brandawg93/PeaNUT", + "version": "v5.14.2", + "date": "2025-09-05T17:24:12Z" + }, { "name": "CrazyWolf13/streamlink-webui", "version": "0.6", @@ -919,6 +519,31 @@ "version": "v1.0.0-beta17", "date": "2025-09-04T21:30:14Z" }, + { + "name": "Cleanuparr/Cleanuparr", + "version": "v2.2.3", + "date": "2025-09-04T19:24:39Z" + }, + { + "name": "AdguardTeam/AdGuardHome", + "version": "v0.107.65", + "date": "2025-08-20T14:02:28Z" + }, + { + "name": "NodeBB/NodeBB", + "version": "v4.5.1", + "date": "2025-09-04T16:02:49Z" + }, + { + "name": "raydak-labs/configarr", + "version": "v1.15.1", + "date": "2025-09-04T14:00:59Z" + }, + { + "name": "plankanban/planka", + "version": "planka-1.0.4", + "date": "2025-09-04T13:49:40Z" + }, { "name": "blakeblackshear/frigate", "version": "v0.14.1", @@ -929,56 +554,181 @@ "version": "v0.15.1", "date": "2025-09-04T10:37:23Z" }, + { + "name": "morpheus65535/bazarr", + "version": "v1.5.3-beta.10", + "date": "2025-07-15T06:07:03Z" + }, + { + "name": "actualbudget/actual", + "version": "v25.9.0", + "date": "2025-09-04T01:12:37Z" + }, + { + "name": "hyperion-project/hyperion.ng", + "version": "2.1.1", + "date": "2025-06-14T17:45:06Z" + }, + { + "name": "Graylog2/graylog2-server", + "version": "6.1.15", + "date": "2025-09-03T14:51:37Z" + }, + { + "name": "neo4j/neo4j", + "version": "5.26.12", + "date": "2025-09-03T12:03:22Z" + }, { "name": "apache/cassandra", "version": "cassandra-4.1.10", "date": "2025-09-03T08:46:02Z" }, { - "name": "healthchecks/healthchecks", - "version": "v3.11.2", - "date": "2025-09-02T08:36:57Z" + "name": "netbox-community/netbox", + "version": "v4.4.0", + "date": "2025-09-02T17:04:25Z" + }, + { + "name": "rabbitmq/rabbitmq-server", + "version": "v4.1.4", + "date": "2025-09-02T14:26:24Z" + }, + { + "name": "postgres/postgres", + "version": "REL_18_RC1", + "date": "2025-09-01T20:03:08Z" }, { "name": "project-zot/zot", "version": "v2.1.8", "date": "2025-09-01T19:20:42Z" }, + { + "name": "Koenkk/zigbee2mqtt", + "version": "2.6.1", + "date": "2025-09-01T19:05:18Z" + }, + { + "name": "outline/outline", + "version": "v0.87.3", + "date": "2025-09-01T16:25:43Z" + }, { "name": "seanmorley15/AdventureLog", "version": "v0.11.0", "date": "2025-09-01T16:19:38Z" }, + { + "name": "grafana/grafana", + "version": "rrc_steady_12.2.0-17245430286.patch1", + "date": "2025-09-01T14:19:14Z" + }, + { + "name": "grokability/snipe-it", + "version": "v8.3.1", + "date": "2025-09-01T11:00:07Z" + }, + { + "name": "crowdsecurity/crowdsec", + "version": "v1.7.0", + "date": "2025-09-01T10:10:34Z" + }, { "name": "LibreTranslate/LibreTranslate", "version": "v1.7.3", "date": "2025-08-31T15:59:43Z" }, + { + "name": "jhuckaby/Cronicle", + "version": "v0.9.91", + "date": "2025-08-30T21:49:57Z" + }, + { + "name": "silverbulletmd/silverbullet", + "version": "2.0.0", + "date": "2025-08-29T13:38:35Z" + }, { "name": "Forceu/Gokapi", "version": "v2.1.0", "date": "2025-08-29T12:56:13Z" }, + { + "name": "saltstack/salt", + "version": "v3007.7", + "date": "2025-08-29T01:19:08Z" + }, + { + "name": "linkwarden/linkwarden", + "version": "v2.12.2", + "date": "2025-08-28T20:34:30Z" + }, { "name": "benjaminjonard/koillection", "version": "1.7.0", "date": "2025-08-28T18:10:59Z" }, + { + "name": "gristlabs/grist-core", + "version": "v1.7.3", + "date": "2025-08-28T16:50:02Z" + }, + { + "name": "BookStackApp/BookStack", + "version": "v25.07.2", + "date": "2025-08-28T16:46:05Z" + }, { "name": "garethgeorge/backrest", "version": "v1.9.2", "date": "2025-08-28T07:06:14Z" }, + { + "name": "pocket-id/pocket-id", + "version": "v1.10.0", + "date": "2025-08-27T20:35:47Z" + }, + { + "name": "ipfs/kubo", + "version": "v0.37.0", + "date": "2025-08-27T20:03:52Z" + }, + { + "name": "zwave-js/zwave-js-ui", + "version": "v11.2.1", + "date": "2025-08-27T15:19:02Z" + }, { "name": "advplyr/audiobookshelf", "version": "v2.29.0", "date": "2025-08-25T22:43:20Z" }, + { + "name": "sabnzbd/sabnzbd", + "version": "4.5.3", + "date": "2025-08-25T13:59:56Z" + }, + { + "name": "zabbix/zabbix", + "version": "7.4.2", + "date": "2025-08-25T12:38:14Z" + }, + { + "name": "FlareSolverr/FlareSolverr", + "version": "v3.4.0", + "date": "2025-08-25T03:22:00Z" + }, { "name": "plexguide/Huntarr.io", "version": "8.2.10", "date": "2025-08-25T01:26:55Z" }, + { + "name": "wavelog/wavelog", + "version": "2.1", + "date": "2025-08-24T15:42:19Z" + }, { "name": "janeczku/calibre-web", "version": "0.6.25", @@ -989,16 +739,66 @@ "version": "v0.21.0", "date": "2025-08-23T18:33:53Z" }, - { - "name": "maxdorninger/MediaManager", - "version": "1.8.0", - "date": "2025-08-23T16:22:30Z" - }, { "name": "caddyserver/caddy", "version": "v2.10.2", "date": "2025-08-23T03:10:31Z" }, + { + "name": "rclone/rclone", + "version": "v1.71.0", + "date": "2025-08-22T16:41:23Z" + }, + { + "name": "goauthentik/authentik", + "version": "version/2025.8.1", + "date": "2025-08-22T14:55:30Z" + }, + { + "name": "lazy-media/Reactive-Resume", + "version": "v1.2.4", + "date": "2025-08-22T07:40:01Z" + }, + { + "name": "Kozea/Radicale", + "version": "v3.5.5", + "date": "2025-08-22T06:57:33Z" + }, + { + "name": "traccar/traccar", + "version": "v6.9.1", + "date": "2025-08-22T04:04:12Z" + }, + { + "name": "cloudflare/cloudflared", + "version": "2025.8.1", + "date": "2025-08-21T15:39:34Z" + }, + { + "name": "gethomepage/homepage", + "version": "v1.4.6", + "date": "2025-08-21T14:05:58Z" + }, + { + "name": "openhab/openhab-core", + "version": "4.3.7", + "date": "2025-08-20T10:26:21Z" + }, + { + "name": "duplicati/duplicati", + "version": "v2.1.2.0-2.1.2.0_beta_2025-08-20", + "date": "2025-08-20T08:15:46Z" + }, + { + "name": "TwiN/gatus", + "version": "v5.23.2", + "date": "2025-08-19T21:24:45Z" + }, + { + "name": "karlomikus/bar-assistant", + "version": "v5.8.0", + "date": "2025-08-19T16:46:00Z" + }, { "name": "oauth2-proxy/oauth2-proxy", "version": "v7.12.0", @@ -1009,6 +809,21 @@ "version": "v1.1.07", "date": "2025-08-18T16:13:54Z" }, + { + "name": "FreshRSS/FreshRSS", + "version": "1.27.0", + "date": "2025-08-18T16:03:26Z" + }, + { + "name": "redis/redis", + "version": "8.2.1", + "date": "2025-08-18T15:42:48Z" + }, + { + "name": "jupyter/notebook", + "version": "@jupyter-notebook/ui-components@7.5.0-alpha.2", + "date": "2025-08-18T07:39:41Z" + }, { "name": "lldap/lldap", "version": "v0.6.2", @@ -1024,36 +839,31 @@ "version": "3.3.0", "date": "2025-08-17T19:57:11Z" }, - { - "name": "thecfu/scraparr", - "version": "v2.2.4", - "date": "2025-08-17T10:12:21Z" - }, { "name": "mylar3/mylar3", "version": "v0.8.3", "date": "2025-08-17T06:24:54Z" }, { - "name": "Leantime/leantime", - "version": "latest", - "date": "2025-08-15T15:33:51Z" + "name": "jellyfin/jellyfin", + "version": "v10.10.7", + "date": "2025-04-05T19:14:59Z" }, { "name": "Kometa-Team/Kometa", "version": "v2.2.1", "date": "2025-08-13T19:49:01Z" }, - { - "name": "swapplications/uhf-server-dist", - "version": "1.5.1", - "date": "2025-08-13T15:43:57Z" - }, { "name": "requarks/wiki", "version": "v2.5.308", "date": "2025-08-13T07:09:29Z" }, + { + "name": "bluenviron/mediamtx", + "version": "v1.14.0", + "date": "2025-08-12T13:58:46Z" + }, { "name": "slskd/slskd", "version": "0.23.2", @@ -1064,16 +874,36 @@ "version": "1012-08-09", "date": "2025-08-10T13:50:58Z" }, + { + "name": "kimai/kimai", + "version": "2.38.0", + "date": "2025-08-08T21:47:19Z" + }, { "name": "MariaDB/server", "version": "mariadb-12.0.2", "date": "2025-08-07T21:23:15Z" }, + { + "name": "Athou/commafeed", + "version": "5.11.0", + "date": "2025-08-06T21:14:18Z" + }, + { + "name": "bastienwirtz/homer", + "version": "v25.08.1", + "date": "2025-08-06T21:04:07Z" + }, { "name": "TryGhost/Ghost-CLI", "version": "v1.28.3", "date": "2025-08-06T12:32:02Z" }, + { + "name": "WordPress/WordPress", + "version": "4.7.30", + "date": "2025-08-05T17:23:06Z" + }, { "name": "binwiederhier/ntfy", "version": "v2.14.0", @@ -1089,6 +919,16 @@ "version": "v4.8.0", "date": "2025-08-02T09:12:10Z" }, + { + "name": "donaldzou/WGDashboard", + "version": "v4.2.5", + "date": "2025-08-02T08:58:21Z" + }, + { + "name": "alexta69/metube", + "version": "2025.07.31", + "date": "2025-08-01T14:44:48Z" + }, { "name": "Suwayomi/Suwayomi-Server", "version": "v2.1.1867", @@ -1139,11 +979,36 @@ "version": "v2.19.0", "date": "2025-07-27T22:25:00Z" }, + { + "name": "heiher/hev-socks5-server", + "version": "2.9.0", + "date": "2025-07-25T14:20:25Z" + }, + { + "name": "TasmoAdmin/TasmoAdmin", + "version": "v4.3.1", + "date": "2025-07-22T20:10:08Z" + }, { "name": "PCJones/UmlautAdaptarr", "version": "v0.7.3", "date": "2025-07-22T14:39:54Z" }, + { + "name": "tobychui/zoraxy", + "version": "v3.2.5r2", + "date": "2025-07-21T12:52:26Z" + }, + { + "name": "icereed/paperless-gpt", + "version": "v0.22.0", + "date": "2025-07-17T06:35:43Z" + }, + { + "name": "usememos/memos", + "version": "v0.25.0", + "date": "2025-07-16T14:57:02Z" + }, { "name": "sbondCo/Watcharr", "version": "v2.1.1", @@ -1164,6 +1029,11 @@ "version": "1.3.11", "date": "2025-07-13T13:33:48Z" }, + { + "name": "eclipse-mosquitto/mosquitto", + "version": "v2.0.22", + "date": "2025-07-11T21:34:20Z" + }, { "name": "NginxProxyManager/nginx-proxy-manager", "version": "v2.12.6", @@ -1199,6 +1069,11 @@ "version": "2025.4", "date": "2025-07-01T18:01:37Z" }, + { + "name": "MagicMirrorOrg/MagicMirror", + "version": "v2.32.0", + "date": "2025-06-30T22:12:48Z" + }, { "name": "typesense/typesense", "version": "v29.0", @@ -1214,6 +1089,11 @@ "version": "v2.18.0", "date": "2025-06-24T08:29:55Z" }, + { + "name": "itsmng/itsm-ng", + "version": "v2.0.7", + "date": "2025-06-23T14:35:40Z" + }, { "name": "clusterzx/paperless-ai", "version": "v3.0.7", @@ -1259,6 +1139,11 @@ "version": "v0.8.4", "date": "2025-06-10T07:57:14Z" }, + { + "name": "jordan-dalby/ByteStash", + "version": "v1.5.8", + "date": "2025-06-07T11:39:10Z" + }, { "name": "juanfont/headscale", "version": "v0.26.1", @@ -1269,6 +1154,11 @@ "version": "v0.14.1", "date": "2025-06-04T08:57:15Z" }, + { + "name": "Pf2eToolsOrg/Pf2eTools", + "version": "v0.9.0", + "date": "2025-06-03T11:49:40Z" + }, { "name": "release-argus/Argus", "version": "0.26.3", @@ -1304,6 +1194,11 @@ "version": "v0.2.3", "date": "2025-05-10T21:14:45Z" }, + { + "name": "getumbrel/umbrel", + "version": "1.4.2", + "date": "2025-05-09T08:54:49Z" + }, { "name": "ZoeyVid/NPMplus", "version": "2025-05-07-r1", @@ -1344,6 +1239,11 @@ "version": "v0.2.11", "date": "2025-04-12T21:13:08Z" }, + { + "name": "thomiceli/opengist", + "version": "v1.10.0", + "date": "2025-04-07T14:32:15Z" + }, { "name": "azukaar/Cosmos-Server", "version": "v0.18.4", @@ -1379,11 +1279,6 @@ "version": "v1.55.4", "date": "2025-03-24T11:31:02Z" }, - { - "name": "redlib-org/redlib", - "version": "v0.36.0", - "date": "2025-03-20T03:06:11Z" - }, { "name": "Donkie/Spoolman", "version": "v0.22.1", @@ -1399,6 +1294,11 @@ "version": "v0.18.0", "date": "2025-03-11T12:47:22Z" }, + { + "name": "AlexxIT/go2rtc", + "version": "v1.9.9", + "date": "2025-03-10T03:22:11Z" + }, { "name": "awawa-dev/HyperHDR", "version": "v21.0.0.0", @@ -1474,6 +1374,11 @@ "version": "v1.0.22", "date": "2024-12-13T12:22:19Z" }, + { + "name": "MDeLuise/plant-it", + "version": "0.10.0", + "date": "2024-12-10T09:35:26Z" + }, { "name": "phpipam/phpipam", "version": "v1.7.3", @@ -1543,10 +1448,5 @@ "name": "thelounge/thelounge-deb", "version": "v4.4.3", "date": "2024-04-06T12:24:35Z" - }, - { - "name": "deepch/RTSPtoWeb", - "version": "v2.4.3", - "date": "2023-03-29T12:05:02Z" } ] \ No newline at end of file diff --git a/scripts/json/update-lxcs.json b/scripts/json/update-lxcs.json index 9dad551..db12279 100644 --- a/scripts/json/update-lxcs.json +++ b/scripts/json/update-lxcs.json @@ -1,5 +1,5 @@ { - "name": "PVE LXC Updater", + "name": "Proxmox VE LXC Updater", "slug": "update-lxcs", "categories": [ 1 @@ -13,7 +13,7 @@ "website": null, "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/linuxcontainers.webp", "config_path": "", - "description": "This script has been created to simplify and speed up the process of updating the operating system running inside LXC containers across various Linux distributions, such as Ubuntu, Debian, Devuan, Alpine Linux, CentOS-Rocky-Alma, Fedora, and ArchLinux. It's designed to automatically skip templates and specific containers during the update, enhancing its convenience and usability.", + "description": "This script has been created to simplify and speed up the process of updating all LXC containers across various Linux distributions, such as Ubuntu, Debian, Devuan, Alpine Linux, CentOS-Rocky-Alma, Fedora, and ArchLinux. It's designed to automatically skip templates and specific containers during the update, enhancing its convenience and usability.", "install_methods": [ { "type": "default", @@ -35,10 +35,6 @@ { "text": "Execute within the Proxmox shell", "type": "info" - }, - { - "text": "The script updates only the operating system of the LXC container. It DOES NOT update the application installed within the container!", - "type": "warning" } ] } \ No newline at end of file diff --git a/scripts/json/update-repo.json b/scripts/json/update-repo.json index 3aca941..842154c 100644 --- a/scripts/json/update-repo.json +++ b/scripts/json/update-repo.json @@ -1,5 +1,5 @@ { - "name": "PVE Update Repositories", + "name": "Proxmox Update Repositories", "slug": "update-repo", "categories": [ 1 diff --git a/scripts/json/upsnap.json b/scripts/json/upsnap.json deleted file mode 100644 index fa12ecb..0000000 --- a/scripts/json/upsnap.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "UpSnap", - "slug": "upsnap", - "categories": [ - 4 - ], - "date_created": "2025-09-23", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 8090, - "documentation": "https://github.com/seriousm4x/UpSnap/wiki", - "config_path": "", - "website": "https://github.com/seriousm4x/UpSnap", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/upsnap.webp", - "description": "UpSnap is a self-hosted web app that lets you wake up, manage and monitor devices on your network with ease. Built with SvelteKit, Go and PocketBase, it offers a clean dashboard, scheduled wake-ups, device discovery and secure user management.", - "install_methods": [ - { - "type": "default", - "script": "ct/upsnap.sh", - "resources": { - "cpu": 1, - "ram": 512, - "hdd": 2, - "os": "Debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "The first user you register will be the admin user.", - "type": "info" - } - ] -} \ No newline at end of file diff --git a/scripts/json/verdaccio.json b/scripts/json/verdaccio.json deleted file mode 100644 index 4f8d0c4..0000000 --- a/scripts/json/verdaccio.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "Verdaccio", - "slug": "verdaccio", - "categories": [ - 20 - ], - "date_created": "2025-09-29", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 4873, - "documentation": "https://verdaccio.org/docs/what-is-verdaccio", - "website": "https://verdaccio.org/", - "logo": "https://verdaccio.org/img/logo/symbol/png/verdaccio-tiny.png", - "config_path": "/opt/verdaccio/config/config.yaml", - "description": "Verdaccio is a lightweight private npm proxy registry built with Node.js. It allows you to host your own npm registry with minimal configuration, providing a private npm repository for your projects. Verdaccio supports npm, yarn, and pnpm, and can cache packages from the public npm registry, allowing for faster installs and protection against npm registry outages. It includes a web interface for browsing packages, authentication and authorization features, and can be easily integrated into your development workflow.", - "install_methods": [ - { - "type": "default", - "script": "ct/verdaccio.sh", - "resources": { - "cpu": 2, - "ram": 2048, - "hdd": 8, - "os": "debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "To create the first user, run: npm adduser --registry http://:4873", - "type": "info" - } - ] -} \ No newline at end of file diff --git a/scripts/json/warracker.json b/scripts/json/warracker.json deleted file mode 100644 index 350b179..0000000 --- a/scripts/json/warracker.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "Warracker", - "slug": "warracker", - "categories": [ - 12 - ], - "date_created": "2025-09-29", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 80, - "documentation": null, - "config_path": "/opt/.env", - "website": "https://warracker.com/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/warracker.webp", - "description": "Warracker is an open source, self-hostable warranty tracker to monitor expirations, store receipts, files. You own the data, your rules!", - "install_methods": [ - { - "type": "default", - "script": "ct/warracker.sh", - "resources": { - "cpu": 1, - "ram": 512, - "hdd": 4, - "os": "Debian", - "version": "13" - } - } - ], - "default_credentials": { - "username": null, - "password": null - }, - "notes": [ - { - "text": "The first user you register will be the admin user.", - "type": "info" - } - ] -} \ No newline at end of file diff --git a/scripts/json/wazuh.json b/scripts/json/wazuh.json index 4dd6a97..530c71b 100644 --- a/scripts/json/wazuh.json +++ b/scripts/json/wazuh.json @@ -21,7 +21,7 @@ "resources": { "cpu": 4, "ram": 4096, - "hdd": 25, + "hdd": 18, "os": "debian", "version": "12" } diff --git a/scripts/json/zabbix.json b/scripts/json/zabbix.json index 086e193..8b2cc69 100644 --- a/scripts/json/zabbix.json +++ b/scripts/json/zabbix.json @@ -23,7 +23,7 @@ "ram": 4096, "hdd": 6, "os": "debian", - "version": "13" + "version": "12" } } ], @@ -33,19 +33,11 @@ }, "notes": [ { - "text": "Database credentials: `cat ~/zabbix.creds`", + "text": "Database credentials: `cat zabbix.creds`", "type": "info" }, { - "text": "You can choose between Zabbix agent (classic) and agent2 (modern) during installation", - "type": "info" - }, - { - "text": "For agent2 the PostgreSQL plugin is installed by default; all plugins are optional", - "type": "info" - }, - { - "text": "If agent2 with NVIDIA plugin is installed in an environment without GPU, the installer disables it automatically", + "text": "Zabbix agent 2 is used by default", "type": "info" } ] diff --git a/src/__tests__/env.test.ts b/src/__tests__/env.test.ts new file mode 100644 index 0000000..97046de --- /dev/null +++ b/src/__tests__/env.test.ts @@ -0,0 +1,50 @@ +import { describe, it, expect, vi } from 'vitest' + +// Mock the environment variables +const mockEnv = { + SCRIPTS_DIRECTORY: '/test/scripts', + ALLOWED_SCRIPT_EXTENSIONS: '.sh,.py,.js,.ts', + ALLOWED_SCRIPT_PATHS: '/,/ct/', + MAX_SCRIPT_EXECUTION_TIME: '30000', + REPO_URL: 'https://github.com/test/repo', + NODE_ENV: 'test', +} + +vi.mock('~/env.js', () => ({ + env: mockEnv, +})) + +describe('Environment Configuration', () => { + it('should have required environment variables', async () => { + const { env } = await import('~/env.js') + + expect(env.SCRIPTS_DIRECTORY).toBeDefined() + expect(env.ALLOWED_SCRIPT_EXTENSIONS).toBeDefined() + expect(env.ALLOWED_SCRIPT_PATHS).toBeDefined() + expect(env.MAX_SCRIPT_EXECUTION_TIME).toBeDefined() + }) + + it('should have correct script directory path', async () => { + const { env } = await import('~/env.js') + + expect(env.SCRIPTS_DIRECTORY).toBe('/test/scripts') + }) + + it('should have correct allowed extensions', async () => { + const { env } = await import('~/env.js') + + expect(env.ALLOWED_SCRIPT_EXTENSIONS).toBe('.sh,.py,.js,.ts') + }) + + it('should have correct allowed paths', async () => { + const { env } = await import('~/env.js') + + expect(env.ALLOWED_SCRIPT_PATHS).toBe('/,/ct/') + }) + + it('should have correct max execution time', async () => { + const { env } = await import('~/env.js') + + expect(env.MAX_SCRIPT_EXECUTION_TIME).toBe('30000') + }) +}) diff --git a/src/app/__tests__/page.test.tsx b/src/app/__tests__/page.test.tsx new file mode 100644 index 0000000..be1dce1 --- /dev/null +++ b/src/app/__tests__/page.test.tsx @@ -0,0 +1,140 @@ +import { describe, it, expect, beforeEach, vi } from 'vitest' +import { render, screen, fireEvent } from '@testing-library/react' +import Home from '../page' + +// Mock tRPC +vi.mock('~/trpc/react', () => ({ + api: { + scripts: { + getRepoStatus: { + useQuery: vi.fn(() => ({ + data: { isRepo: true, isBehind: false, branch: 'main', lastCommit: 'abc123' }, + refetch: vi.fn(), + })), + }, + getScriptCards: { + useQuery: vi.fn(() => ({ + data: { success: true, cards: [] }, + isLoading: false, + error: null, + })), + }, + getCtScripts: { + useQuery: vi.fn(() => ({ + data: { scripts: [] }, + isLoading: false, + error: null, + })), + }, + getScriptBySlug: { + useQuery: vi.fn(() => ({ + data: null, + })), + }, + checkProxmoxVE: { + useQuery: vi.fn(() => ({ + data: { success: true, isProxmoxVE: true }, + isLoading: false, + error: null, + })), + }, + fullUpdateRepo: { + useMutation: vi.fn(() => ({ + mutate: vi.fn(), + })), + }, + }, + }, +})) + +// Mock child components +vi.mock('../_components/ScriptsGrid', () => ({ + ScriptsGrid: ({ onInstallScript }: { onInstallScript?: (path: string, name: string) => void }) => ( +
+ +
+ ), +})) + +vi.mock('../_components/ResyncButton', () => ({ + ResyncButton: () =>
Resync Button
, +})) + +vi.mock('../_components/Terminal', () => ({ + Terminal: ({ scriptPath, onClose }: { scriptPath: string; onClose: () => void }) => ( +
+
Terminal for: {scriptPath}
+ +
+ ), +})) + +describe('Home Page', () => { + beforeEach(() => { + vi.clearAllMocks() + }) + + it('should render main page elements', () => { + render() + + expect(screen.getByText('🚀 PVE Scripts Management')).toBeInTheDocument() + expect(screen.getByText('Manage and execute Proxmox helper scripts locally with live output streaming')).toBeInTheDocument() + expect(screen.getByTestId('resync-button')).toBeInTheDocument() + expect(screen.getByTestId('scripts-grid')).toBeInTheDocument() + }) + + it('should not show terminal initially', () => { + render() + + expect(screen.queryByTestId('terminal')).not.toBeInTheDocument() + }) + + it('should show terminal when script is run', () => { + render() + + const runButton = screen.getByText('Run Script') + fireEvent.click(runButton) + + expect(screen.getByTestId('terminal')).toBeInTheDocument() + expect(screen.getByText('Terminal for: /test/path')).toBeInTheDocument() + }) + + it('should close terminal when close button is clicked', () => { + render() + + // First run a script to show terminal + const runButton = screen.getByText('Run Script') + fireEvent.click(runButton) + + expect(screen.getByTestId('terminal')).toBeInTheDocument() + + // Then close the terminal + const closeButton = screen.getByText('Close Terminal') + fireEvent.click(closeButton) + + expect(screen.queryByTestId('terminal')).not.toBeInTheDocument() + }) + + it('should handle multiple script runs', () => { + render() + + // Run first script + const runButton = screen.getByText('Run Script') + fireEvent.click(runButton) + + expect(screen.getByText('Terminal for: /test/path')).toBeInTheDocument() + + // Close terminal + const closeButton = screen.getByText('Close Terminal') + fireEvent.click(closeButton) + + expect(screen.queryByTestId('terminal')).not.toBeInTheDocument() + + // Run second script + fireEvent.click(runButton) + + expect(screen.getByText('Terminal for: /test/path')).toBeInTheDocument() + }) +}) diff --git a/src/app/_components/Badge.tsx b/src/app/_components/Badge.tsx deleted file mode 100644 index b9cae13..0000000 --- a/src/app/_components/Badge.tsx +++ /dev/null @@ -1,140 +0,0 @@ -'use client'; - -import React from 'react'; - -interface BadgeProps { - variant: 'type' | 'updateable' | 'privileged' | 'status' | 'note' | 'execution-mode'; - type?: string; - noteType?: 'info' | 'warning' | 'error'; - status?: 'success' | 'failed' | 'in_progress'; - executionMode?: 'local' | 'ssh'; - children: React.ReactNode; - className?: string; -} - -export function Badge({ variant, type, noteType, status, executionMode, children, className = '' }: BadgeProps) { - const getTypeStyles = (scriptType: string) => { - switch (scriptType.toLowerCase()) { - case 'ct': - return 'bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-200 border-blue-200 dark:border-blue-700'; - case 'addon': - return 'bg-purple-100 dark:bg-purple-900/30 text-purple-800 dark:text-purple-200 border-purple-200 dark:border-purple-700'; - case 'vm': - return 'bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-200 border-green-200 dark:border-green-700'; - case 'pve': - return 'bg-orange-100 dark:bg-orange-900/30 text-orange-800 dark:text-orange-200 border-orange-200 dark:border-orange-700'; - default: - return 'bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 border-gray-200 dark:border-gray-600'; - } - }; - - const getVariantStyles = () => { - switch (variant) { - case 'type': - return `inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium border ${type ? getTypeStyles(type) : getTypeStyles('unknown')}`; - - case 'updateable': - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-200 border border-green-200 dark:border-green-700'; - - case 'privileged': - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-200 border border-red-200 dark:border-red-700'; - - case 'status': - switch (status) { - case 'success': - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-green-100 dark:bg-green-900/30 text-green-800 dark:text-green-200 border border-green-200 dark:border-green-700'; - case 'failed': - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-200 border border-red-200 dark:border-red-700'; - case 'in_progress': - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200 border border-yellow-200 dark:border-yellow-700'; - default: - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 border border-gray-200 dark:border-gray-600'; - } - - case 'execution-mode': - switch (executionMode) { - case 'local': - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-200 border border-blue-200 dark:border-blue-700'; - case 'ssh': - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-purple-100 dark:bg-purple-900/30 text-purple-800 dark:text-purple-200 border border-purple-200 dark:border-purple-700'; - default: - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 border border-gray-200 dark:border-gray-600'; - } - - case 'note': - switch (noteType) { - case 'warning': - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-yellow-100 dark:bg-yellow-900/30 text-yellow-800 dark:text-yellow-200 border border-yellow-200 dark:border-yellow-700'; - case 'error': - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-red-100 dark:bg-red-900/30 text-red-800 dark:text-red-200 border border-red-200 dark:border-red-700'; - default: - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-blue-100 dark:bg-blue-900/30 text-blue-800 dark:text-blue-200 border border-blue-200 dark:border-blue-700'; - } - - default: - return 'inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200 border border-gray-200 dark:border-gray-600'; - } - }; - - // Format the text for type badges - const formatText = () => { - if (variant === 'type' && type) { - switch (type.toLowerCase()) { - case 'ct': - return 'LXC'; - case 'addon': - return 'ADDON'; - case 'vm': - return 'VM'; - case 'pve': - return 'PVE'; - default: - return type.toUpperCase(); - } - } - return children; - }; - - return ( - - {formatText()} - - ); -} - -// Convenience components for common use cases -export const TypeBadge = ({ type, className }: { type: string; className?: string }) => ( - - {type} - -); - -export const UpdateableBadge = ({ className }: { className?: string }) => ( - - Updateable - -); - -export const PrivilegedBadge = ({ className }: { className?: string }) => ( - - Privileged - -); - -export const StatusBadge = ({ status, children, className }: { status: 'success' | 'failed' | 'in_progress'; children: React.ReactNode; className?: string }) => ( - - {children} - -); - -export const ExecutionModeBadge = ({ mode, children, className }: { mode: 'local' | 'ssh'; children: React.ReactNode; className?: string }) => ( - - {children} - -); - -export const NoteBadge = ({ noteType, children, className }: { noteType: 'info' | 'warning' | 'error'; children: React.ReactNode; className?: string }) => ( - - {children} - -); \ No newline at end of file diff --git a/src/app/_components/CategorySidebar.tsx b/src/app/_components/CategorySidebar.tsx deleted file mode 100644 index 29f107e..0000000 --- a/src/app/_components/CategorySidebar.tsx +++ /dev/null @@ -1,363 +0,0 @@ -'use client'; - -import { useState } from 'react'; - -interface CategorySidebarProps { - categories: string[]; - categoryCounts: Record; - totalScripts: number; - selectedCategory: string | null; - onCategorySelect: (category: string | null) => void; -} - -// Icon mapping for categories -const CategoryIcon = ({ iconName, className = "w-5 h-5" }: { iconName: string; className?: string }) => { - const iconMap: Record = { - server: ( - - - - ), - monitor: ( - - - - ), - box: ( - - - - ), - shield: ( - - - - ), - "shield-check": ( - - - - ), - key: ( - - - - ), - archive: ( - - - - ), - database: ( - - - - ), - "chart-bar": ( - - - - ), - template: ( - - - - ), - "folder-open": ( - - - - ), - "document-text": ( - - - - ), - film: ( - - - - ), - download: ( - - - - ), - "video-camera": ( - - - - ), - home: ( - - - - ), - wifi: ( - - - - ), - "chat-alt": ( - - - - ), - clock: ( - - - - ), - code: ( - - - - ), - "external-link": ( - - - - ), - sparkles: ( - - - - ), - "currency-dollar": ( - - - - ), - puzzle: ( - - - - ), - office: ( - - - - ), - }; - - return iconMap[iconName] ?? ( - - - - ); -}; - -export function CategorySidebar({ - categories, - categoryCounts, - totalScripts, - selectedCategory, - onCategorySelect -}: CategorySidebarProps) { - const [isCollapsed, setIsCollapsed] = useState(false); - - // Category to icon mapping (based on metadata.json) - const categoryIconMapping: Record = { - 'Proxmox & Virtualization': 'server', - 'Operating Systems': 'monitor', - 'Containers & Docker': 'box', - 'Network & Firewall': 'shield', - 'Adblock & DNS': 'shield-check', - 'Authentication & Security': 'key', - 'Backup & Recovery': 'archive', - 'Databases': 'database', - 'Monitoring & Analytics': 'chart-bar', - 'Dashboards & Frontends': 'template', - 'Files & Downloads': 'folder-open', - 'Documents & Notes': 'document-text', - 'Media & Streaming': 'film', - '*Arr Suite': 'download', - 'NVR & Cameras': 'video-camera', - 'IoT & Smart Home': 'home', - 'ZigBee, Z-Wave & Matter': 'wifi', - 'MQTT & Messaging': 'chat-alt', - 'Automation & Scheduling': 'clock', - 'AI / Coding & Dev-Tools': 'code', - 'Webservers & Proxies': 'external-link', - 'Bots & ChatOps': 'sparkles', - 'Finance & Budgeting': 'currency-dollar', - 'Gaming & Leisure': 'puzzle', - 'Business & ERP': 'office', - 'Miscellaneous': 'box' - }; - - // Sort categories by count (descending) and then alphabetically - const sortedCategories = categories - .map(category => [category, categoryCounts[category] ?? 0] as const) - .sort(([a, countA], [b, countB]) => { - if (countB !== countA) return countB - countA; - return a.localeCompare(b); - }); - - return ( -
- {/* Header */} -
- {!isCollapsed && ( -
-

Categories

-

{totalScripts} Total scripts

-
- )} - -
- - {/* Expanded state - show full categories */} - {!isCollapsed && ( -
-
- {/* "All Categories" option */} - - - {/* Individual Categories */} - {sortedCategories.map(([category, count]) => { - const isSelected = selectedCategory === category; - - return ( - - ); - })} -
-
- )} - - {/* Collapsed state - show only icons with counters and tooltips */} - {isCollapsed && ( -
- {/* "All Categories" option */} -
- - - {/* Tooltip */} -
- All Categories ({totalScripts}) -
-
- - {/* Individual Categories */} - {sortedCategories.map(([category, count]) => { - const isSelected = selectedCategory === category; - - return ( -
- - - {/* Tooltip */} -
- {category} ({count}) -
-
- ); - })} -
- )} -
- ); -} \ No newline at end of file diff --git a/src/app/_components/DarkModeProvider.tsx b/src/app/_components/DarkModeProvider.tsx index 0700a95..2991bf7 100644 --- a/src/app/_components/DarkModeProvider.tsx +++ b/src/app/_components/DarkModeProvider.tsx @@ -19,6 +19,7 @@ export function DarkModeProvider({ children }: { children: React.ReactNode }) { // Initialize theme from localStorage after mount useEffect(() => { + setMounted(true); const stored = localStorage.getItem('theme') as Theme; if (stored && ['light', 'dark', 'system'].includes(stored)) { setThemeState(stored); @@ -27,7 +28,6 @@ export function DarkModeProvider({ children }: { children: React.ReactNode }) { // Set initial isDark state based on current DOM state const currentlyDark = document.documentElement.classList.contains('dark'); setIsDark(currentlyDark); - setMounted(true); }, []); // Update dark mode state and DOM when theme changes @@ -38,16 +38,13 @@ export function DarkModeProvider({ children }: { children: React.ReactNode }) { const systemDark = window.matchMedia('(prefers-color-scheme: dark)').matches; const shouldBeDark = theme === 'dark' || (theme === 'system' && systemDark); - // Only update if there's actually a change - if (shouldBeDark !== isDark) { - setIsDark(shouldBeDark); - - // Apply to document - if (shouldBeDark) { - document.documentElement.classList.add('dark'); - } else { - document.documentElement.classList.remove('dark'); - } + setIsDark(shouldBeDark); + + // Apply to document + if (shouldBeDark) { + document.documentElement.classList.add('dark'); + } else { + document.documentElement.classList.remove('dark'); } }; @@ -63,7 +60,7 @@ export function DarkModeProvider({ children }: { children: React.ReactNode }) { mediaQuery.addEventListener('change', handleChange); return () => mediaQuery.removeEventListener('change', handleChange); - }, [theme, mounted, isDark]); + }, [theme, mounted]); const setTheme = (newTheme: Theme) => { setThemeState(newTheme); diff --git a/src/app/_components/FilterBar.tsx b/src/app/_components/FilterBar.tsx deleted file mode 100644 index b06a657..0000000 --- a/src/app/_components/FilterBar.tsx +++ /dev/null @@ -1,342 +0,0 @@ -"use client"; - -import React, { useState } from "react"; - -export interface FilterState { - searchQuery: string; - showUpdatable: boolean | null; // null = all, true = only updatable, false = only non-updatable - selectedTypes: string[]; // Array of selected types: 'lxc', 'vm', 'addon', 'pve' - sortBy: "name" | "created"; // Sort criteria (removed 'updated') - sortOrder: "asc" | "desc"; // Sort direction -} - -interface FilterBarProps { - filters: FilterState; - onFiltersChange: (filters: FilterState) => void; - totalScripts: number; - filteredCount: number; - updatableCount?: number; -} - -const SCRIPT_TYPES = [ - { value: "ct", label: "LXC Container", icon: "📦" }, - { value: "vm", label: "Virtual Machine", icon: "💻" }, - { value: "addon", label: "Add-on", icon: "🔧" }, - { value: "pve", label: "PVE Host", icon: "🖥️" }, -]; - -export function FilterBar({ - filters, - onFiltersChange, - totalScripts, - filteredCount, - updatableCount = 0, -}: FilterBarProps) { - const [isTypeDropdownOpen, setIsTypeDropdownOpen] = useState(false); - - const updateFilters = (updates: Partial) => { - onFiltersChange({ ...filters, ...updates }); - }; - - const clearAllFilters = () => { - onFiltersChange({ - searchQuery: "", - showUpdatable: null, - selectedTypes: [], - sortBy: "name", - sortOrder: "asc", - }); - }; - - const hasActiveFilters = - filters.searchQuery || - filters.showUpdatable !== null || - filters.selectedTypes.length > 0 || - filters.sortBy !== "name" || - filters.sortOrder !== "asc"; - - const getUpdatableButtonText = () => { - if (filters.showUpdatable === null) return "Updatable: All"; - if (filters.showUpdatable === true) - return `Updatable: Yes (${updatableCount})`; - return "Updatable: No"; - }; - - const getTypeButtonText = () => { - if (filters.selectedTypes.length === 0) return "All Types"; - if (filters.selectedTypes.length === 1) { - const type = SCRIPT_TYPES.find( - (t) => t.value === filters.selectedTypes[0], - ); - return type?.label ?? filters.selectedTypes[0]; - } - return `${filters.selectedTypes.length} Types`; - }; - - return ( -
- {/* Search Bar */} -
-
-
- - - -
- updateFilters({ searchQuery: e.target.value })} - className="block w-full rounded-lg border border-gray-300 bg-white py-3 pr-10 pl-10 text-sm leading-5 text-gray-900 placeholder-gray-500 focus:border-blue-500 focus:placeholder-gray-400 focus:ring-2 focus:ring-blue-500 focus:outline-none dark:border-gray-600 dark:bg-gray-700 dark:text-gray-100 dark:placeholder-gray-400 dark:focus:border-blue-400 dark:focus:placeholder-gray-300 dark:focus:ring-blue-400" - /> - {filters.searchQuery && ( - - )} -
-
- - {/* Filter Buttons */} -
- {/* Updateable Filter */} - - - {/* Type Dropdown */} -
- - - {isTypeDropdownOpen && ( -
-
- {SCRIPT_TYPES.map((type) => ( - - ))} -
-
- -
-
- )} -
- - {/* Sort Options */} -
- {/* Sort By Dropdown */} - - - {/* Sort Order Button */} - -
-
- - {/* Filter Summary and Clear All */} -
-
- {filteredCount === totalScripts ? ( - Showing all {totalScripts} scripts - ) : ( - - {filteredCount} of {totalScripts} scripts{" "} - {hasActiveFilters && ( - - (filtered) - - )} - - )} -
- - {hasActiveFilters && ( - - )} -
- - {/* Click outside to close dropdown */} - {isTypeDropdownOpen && ( -
setIsTypeDropdownOpen(false)} - /> - )} -
- ); -} diff --git a/src/app/_components/InstalledScriptsTab.tsx b/src/app/_components/InstalledScriptsTab.tsx index b0e8331..2db0ea9 100644 --- a/src/app/_components/InstalledScriptsTab.tsx +++ b/src/app/_components/InstalledScriptsTab.tsx @@ -3,7 +3,6 @@ import { useState } from 'react'; import { api } from '~/trpc/react'; import { Terminal } from './Terminal'; -import { StatusBadge, ExecutionModeBadge } from './Badge'; interface InstalledScript { id: number; @@ -26,15 +25,10 @@ export function InstalledScriptsTab() { const [statusFilter, setStatusFilter] = useState<'all' | 'success' | 'failed' | 'in_progress'>('all'); const [serverFilter, setServerFilter] = useState('all'); const [updatingScript, setUpdatingScript] = useState<{ id: number; containerId: string; server?: any; mode: 'local' | 'ssh' } | null>(null); - const [editingScriptId, setEditingScriptId] = useState(null); - const [editFormData, setEditFormData] = useState<{ script_name: string; container_id: string }>({ script_name: '', container_id: '' }); - const [showAddForm, setShowAddForm] = useState(false); - const [addFormData, setAddFormData] = useState<{ script_name: string; container_id: string; server_id: string }>({ script_name: '', container_id: '', server_id: 'local' }); // Fetch installed scripts const { data: scriptsData, refetch: refetchScripts, isLoading } = api.installedScripts.getAllInstalledScripts.useQuery(); const { data: statsData } = api.installedScripts.getInstallationStats.useQuery(); - const { data: serversData } = api.servers.getAllServers.useQuery(); // Delete script mutation const deleteScriptMutation = api.installedScripts.deleteInstalledScript.useMutation({ @@ -43,30 +37,6 @@ export function InstalledScriptsTab() { } }); - // Update script mutation - const updateScriptMutation = api.installedScripts.updateInstalledScript.useMutation({ - onSuccess: () => { - void refetchScripts(); - setEditingScriptId(null); - setEditFormData({ script_name: '', container_id: '' }); - }, - onError: (error) => { - alert(`Error updating script: ${error.message}`); - } - }); - - // Create script mutation - const createScriptMutation = api.installedScripts.createInstalledScript.useMutation({ - onSuccess: () => { - void refetchScripts(); - setShowAddForm(false); - setAddFormData({ script_name: '', container_id: '', server_id: 'local' }); - }, - onError: (error) => { - alert(`Error creating script: ${error.message}`); - } - }); - const scripts: InstalledScript[] = (scriptsData?.scripts as InstalledScript[]) ?? []; const stats = statsData?.stats; @@ -134,72 +104,35 @@ export function InstalledScriptsTab() { setUpdatingScript(null); }; - const handleEditScript = (script: InstalledScript) => { - setEditingScriptId(script.id); - setEditFormData({ - script_name: script.script_name, - container_id: script.container_id ?? '' - }); - }; - const handleCancelEdit = () => { - setEditingScriptId(null); - setEditFormData({ script_name: '', container_id: '' }); + const formatDate = (dateString: string) => { + return new Date(dateString).toLocaleString(); }; - const handleSaveEdit = () => { - if (!editFormData.script_name.trim()) { - alert('Script name is required'); - return; - } - - if (editingScriptId) { - updateScriptMutation.mutate({ - id: editingScriptId, - script_name: editFormData.script_name.trim(), - container_id: editFormData.container_id.trim() || undefined, - }); + const getStatusBadge = (status: string): string => { + const baseClasses = 'px-2 py-1 text-xs font-medium rounded-full'; + switch (status) { + case 'success': + return `${baseClasses} bg-green-100 text-green-800`; + case 'failed': + return `${baseClasses} bg-red-100 text-red-800`; + case 'in_progress': + return `${baseClasses} bg-yellow-100 text-yellow-800`; + default: + return `${baseClasses} bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200`; } }; - const handleInputChange = (field: 'script_name' | 'container_id', value: string) => { - setEditFormData(prev => ({ - ...prev, - [field]: value - })); - }; - - const handleAddFormChange = (field: 'script_name' | 'container_id' | 'server_id', value: string) => { - setAddFormData(prev => ({ - ...prev, - [field]: value - })); - }; - - const handleAddScript = () => { - if (!addFormData.script_name.trim()) { - alert('Script name is required'); - return; + const getModeBadge = (mode: string): string => { + const baseClasses = 'px-2 py-1 text-xs font-medium rounded-full'; + switch (mode) { + case 'local': + return `${baseClasses} bg-blue-100 text-blue-800`; + case 'ssh': + return `${baseClasses} bg-purple-100 text-purple-800`; + default: + return `${baseClasses} bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200`; } - - createScriptMutation.mutate({ - script_name: addFormData.script_name.trim(), - script_path: `manual/${addFormData.script_name.trim()}`, - container_id: addFormData.container_id.trim() || undefined, - server_id: addFormData.server_id === 'local' ? undefined : Number(addFormData.server_id), - execution_mode: addFormData.server_id === 'local' ? 'local' : 'ssh', - status: 'success' - }); - }; - - const handleCancelAdd = () => { - setShowAddForm(false); - setAddFormData({ script_name: '', container_id: '', server_id: 'local' }); - }; - - - const formatDate = (dateString: string) => { - return new Date(dateString).toLocaleString(); }; if (isLoading) { @@ -251,81 +184,6 @@ export function InstalledScriptsTab() {
)} - {/* Add Script Button */} -
- -
- - {/* Add Script Form */} - {showAddForm && ( -
-

Add Manual Script Entry

-
-
- - handleAddFormChange('script_name', e.target.value)} - className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400" - placeholder="Enter script name" - /> -
-
- - handleAddFormChange('container_id', e.target.value)} - className="w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-md bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400" - placeholder="Enter container ID" - /> -
-
- - -
-
-
- - -
-
- )} - {/* Filters */}
@@ -374,7 +232,7 @@ export function InstalledScriptsTab() { - - @@ -399,41 +254,16 @@ export function InstalledScriptsTab() { {filteredScripts.map((script) => ( - + @@ -511,6 +315,7 @@ export function InstalledScriptsTab() { )} + ); } diff --git a/src/app/_components/ResyncButton.tsx b/src/app/_components/ResyncButton.tsx index 189b117..fb02882 100644 --- a/src/app/_components/ResyncButton.tsx +++ b/src/app/_components/ResyncButton.tsx @@ -38,41 +38,36 @@ export function ResyncButton() { }; return ( -
-
- Sync scripts with ProxmoxVE repo -
-
- - - {lastSync && ( -
- Last sync: {lastSync.toLocaleTimeString()} -
+
+
+ + + {lastSync && ( +
+ Last sync: {lastSync.toLocaleTimeString()} +
+ )} {syncMessage && (
{/* Type and Updateable status on first row */}
- - {script.updateable && } + + {script.type?.toUpperCase() || 'UNKNOWN'} + + {script.updateable && ( + + Updateable + + )}
{/* Download Status */} diff --git a/src/app/_components/ScriptDetailModal.tsx b/src/app/_components/ScriptDetailModal.tsx index 13be972..89ccbf8 100644 --- a/src/app/_components/ScriptDetailModal.tsx +++ b/src/app/_components/ScriptDetailModal.tsx @@ -7,7 +7,6 @@ import type { Script } from "~/types/script"; import { DiffViewer } from "./DiffViewer"; import { TextViewer } from "./TextViewer"; import { ExecutionModeModal } from "./ExecutionModeModal"; -import { TypeBadge, UpdateableBadge, PrivilegedBadge, NoteBadge } from "./Badge"; interface ScriptDetailModalProps { script: Script | null; @@ -135,7 +134,7 @@ export function ScriptDetailModal({ className="bg-opacity-50 fixed inset-0 z-50 flex items-center justify-center bg-black p-4" onClick={handleBackdropClick} > -
+
{/* Header */}
@@ -160,9 +159,25 @@ export function ScriptDetailModal({ {script.name}
- - {script.updateable && } - {script.privileged && } + + {script.type.toUpperCase()} + + {script.updateable && ( + + Updateable + + )} + {script.privileged && ( + + Privileged + + )}
@@ -662,9 +677,17 @@ export function ScriptDetailModal({ }`} >
- + {noteType} - + {noteText}
diff --git a/src/app/_components/ScriptsGrid.tsx b/src/app/_components/ScriptsGrid.tsx index 64ef741..30a56b2 100644 --- a/src/app/_components/ScriptsGrid.tsx +++ b/src/app/_components/ScriptsGrid.tsx @@ -1,12 +1,9 @@ 'use client'; -import React, { useState, useRef, useEffect } from 'react'; +import React, { useState } from 'react'; import { api } from '~/trpc/react'; import { ScriptCard } from './ScriptCard'; import { ScriptDetailModal } from './ScriptDetailModal'; -import { CategorySidebar } from './CategorySidebar'; -import { FilterBar, type FilterState } from './FilterBar'; -import type { ScriptCard as ScriptCardType } from '~/types/script'; interface ScriptsGridProps { @@ -17,88 +14,31 @@ export function ScriptsGrid({ onInstallScript }: ScriptsGridProps) { const [selectedSlug, setSelectedSlug] = useState(null); const [isModalOpen, setIsModalOpen] = useState(false); const [searchQuery, setSearchQuery] = useState(''); - const [selectedCategory, setSelectedCategory] = useState(null); - const [filters, setFilters] = useState({ - searchQuery: '', - showUpdatable: null, - selectedTypes: [], - sortBy: 'name', - sortOrder: 'asc', - }); - const gridRef = useRef(null); - const { data: scriptCardsData, isLoading: githubLoading, error: githubError, refetch } = api.scripts.getScriptCardsWithCategories.useQuery(); + const { data: scriptCardsData, isLoading: githubLoading, error: githubError, refetch } = api.scripts.getScriptCards.useQuery(); const { data: localScriptsData, isLoading: localLoading, error: localError } = api.scripts.getCtScripts.useQuery(); const { data: scriptData } = api.scripts.getScriptBySlug.useQuery( { slug: selectedSlug ?? '' }, { enabled: !!selectedSlug } ); - // Extract categories from metadata - const categories = React.useMemo((): string[] => { - if (!scriptCardsData?.success || !scriptCardsData.metadata?.categories) return []; - - return (scriptCardsData.metadata.categories as any[]) - .filter((cat) => cat.id !== 0) // Exclude Miscellaneous for main list - .sort((a, b) => a.sort_order - b.sort_order) - .map((cat) => cat.name as string) - .filter((name): name is string => typeof name === 'string'); - }, [scriptCardsData]); - - // Get GitHub scripts with download status (deduplicated) - const combinedScripts = React.useMemo((): ScriptCardType[] => { - if (!scriptCardsData?.success) return []; - - // Use Map to deduplicate by slug/name - const scriptMap = new Map(); - - scriptCardsData.cards?.forEach(script => { - if (script?.name && script?.slug) { - // Use slug as unique identifier, only keep first occurrence - if (!scriptMap.has(script.slug)) { - scriptMap.set(script.slug, { - ...script, - source: 'github' as const, - isDownloaded: false, // Will be updated by status check - isUpToDate: false, // Will be updated by status check - }); - } - } - }); + // Get GitHub scripts with download status + const combinedScripts = React.useMemo(() => { + const githubScripts = scriptCardsData?.success ? (scriptCardsData.cards + ?.filter(script => script?.name) // Filter out invalid scripts + ?.map(script => ({ + ...script, + source: 'github' as const, + isDownloaded: false, // Will be updated by status check + isUpToDate: false, // Will be updated by status check + })) ?? []) : []; - return Array.from(scriptMap.values()); + return githubScripts; }, [scriptCardsData]); - // Count scripts per category (using deduplicated scripts) - const categoryCounts = React.useMemo((): Record => { - if (!scriptCardsData?.success) return {}; - - const counts: Record = {}; - - // Initialize all categories with 0 - categories.forEach((categoryName: string) => { - counts[categoryName] = 0; - }); - - // Count each unique script only once per category - combinedScripts.forEach(script => { - if (script.categoryNames && script.slug) { - const countedCategories = new Set(); - script.categoryNames.forEach((categoryName: unknown) => { - if (typeof categoryName === 'string' && counts[categoryName] !== undefined && !countedCategories.has(categoryName)) { - countedCategories.add(categoryName); - counts[categoryName]++; - } - }); - } - }); - - return counts; - }, [categories, combinedScripts, scriptCardsData?.success]); - // Update scripts with download status - const scriptsWithStatus = React.useMemo((): ScriptCardType[] => { + const scriptsWithStatus = React.useMemo(() => { return combinedScripts.map(script => { if (!script?.name) { return script; // Return as-is if invalid @@ -120,138 +60,35 @@ export function ScriptsGrid({ onInstallScript }: ScriptsGridProps) { }); }, [combinedScripts, localScriptsData]); - // Filter scripts based on all filters and category - const filteredScripts = React.useMemo((): ScriptCardType[] => { - let scripts = scriptsWithStatus; - - // Filter by search query (use filters.searchQuery instead of deprecated searchQuery) - if (filters.searchQuery?.trim()) { - const query = filters.searchQuery.toLowerCase().trim(); - - if (query.length >= 1) { - scripts = scripts.filter(script => { - if (!script || typeof script !== 'object') { - return false; - } - - const name = (script.name ?? '').toLowerCase(); - const slug = (script.slug ?? '').toLowerCase(); - - return name.includes(query) ?? slug.includes(query); - }); - } - } - - // Filter by category using real category data from deduplicated scripts - if (selectedCategory) { - scripts = scripts.filter(script => { - if (!script) return false; - - // Check if the deduplicated script has categoryNames that include the selected category - return script.categoryNames?.includes(selectedCategory) ?? false; - }); - } - - // Filter by updateable status - if (filters.showUpdatable !== null) { - scripts = scripts.filter(script => { - if (!script) return false; - const isUpdatable = script.updateable ?? false; - return filters.showUpdatable ? isUpdatable : !isUpdatable; - }); + // Filter scripts based on search query (name and slug only) + const filteredScripts = React.useMemo(() => { + if (!searchQuery?.trim()) { + return scriptsWithStatus; } - // Filter by script types - if (filters.selectedTypes.length > 0) { - scripts = scripts.filter(script => { - if (!script) return false; - const scriptType = (script.type ?? '').toLowerCase(); - return filters.selectedTypes.some(type => type.toLowerCase() === scriptType); - }); + const query = searchQuery.toLowerCase().trim(); + + // If query is too short, don't filter + if (query.length < 1) { + return scriptsWithStatus; } - // Apply sorting - scripts.sort((a, b) => { - if (!a || !b) return 0; - - let compareValue = 0; - - switch (filters.sortBy) { - case 'name': - compareValue = (a.name ?? '').localeCompare(b.name ?? ''); - break; - case 'created': - // Get creation date from script metadata in JSON format (date_created: "YYYY-MM-DD") - const aCreated = a?.date_created ?? ''; - const bCreated = b?.date_created ?? ''; - - // If both have dates, compare them directly - if (aCreated && bCreated) { - // For dates: asc = oldest first (2020 before 2024), desc = newest first (2024 before 2020) - compareValue = aCreated.localeCompare(bCreated); - } else if (aCreated && !bCreated) { - // Scripts with dates come before scripts without dates - compareValue = -1; - } else if (!aCreated && bCreated) { - // Scripts without dates come after scripts with dates - compareValue = 1; - } else { - // Both have no dates, fallback to name comparison - compareValue = (a.name ?? '').localeCompare(b.name ?? ''); - } - break; - default: - compareValue = (a.name ?? '').localeCompare(b.name ?? ''); + const filtered = scriptsWithStatus.filter(script => { + // Ensure script exists and has required properties + if (!script || typeof script !== 'object') { + return false; } - - // Apply sort order - return filters.sortOrder === 'asc' ? compareValue : -compareValue; - }); - - return scripts; - }, [scriptsWithStatus, filters, selectedCategory]); - - // Calculate filter counts for FilterBar - const filterCounts = React.useMemo(() => { - const installedCount = scriptsWithStatus.filter(script => script?.isDownloaded).length; - const updatableCount = scriptsWithStatus.filter(script => script?.updateable).length; - - return { installedCount, updatableCount }; - }, [scriptsWithStatus]); - // Sync legacy searchQuery with filters.searchQuery for backward compatibility - useEffect(() => { - if (searchQuery !== filters.searchQuery) { - setFilters(prev => ({ ...prev, searchQuery })); - } - }, [searchQuery, filters.searchQuery]); + const name = (script.name ?? '').toLowerCase(); + const slug = (script.slug ?? '').toLowerCase(); - // Handle filter changes - const handleFiltersChange = (newFilters: FilterState) => { - setFilters(newFilters); - // Sync searchQuery for backward compatibility - setSearchQuery(newFilters.searchQuery); - }; + const matches = name.includes(query) || slug.includes(query); - // Handle category selection with auto-scroll - const handleCategorySelect = (category: string | null) => { - setSelectedCategory(category); - }; + return matches; + }); - // Auto-scroll effect when category changes - useEffect(() => { - if (selectedCategory && gridRef.current) { - const timeoutId = setTimeout(() => { - gridRef.current?.scrollIntoView({ - behavior: 'smooth', - block: 'start', - inline: 'nearest' - }); - }, 100); - - return () => clearTimeout(timeoutId); - } - }, [selectedCategory]); + return filtered; + }, [scriptsWithStatus, searchQuery]); const handleCardClick = (scriptCard: { slug: string }) => { @@ -313,130 +150,91 @@ export function ScriptsGrid({ onInstallScript }: ScriptsGridProps) { } return ( -
- {/* Category Sidebar */} -
- -
- - {/* Main Content */} -
- {/* Enhanced Filter Bar */} - - - {/* Legacy Search Bar (keeping for backward compatibility, but hidden) */} -
-
-
- - - -
- setSearchQuery(e.target.value)} - className="block w-full pl-10 pr-3 py-3 border border-gray-300 dark:border-gray-600 rounded-lg leading-5 bg-white dark:bg-gray-800 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-gray-100 focus:outline-none focus:placeholder-gray-400 dark:focus:placeholder-gray-300 focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 focus:border-blue-500 dark:focus:border-blue-400 text-sm" - /> - {searchQuery && ( - - )} + <> + {/* Search Bar */} +
+
+
+ + +
- {(searchQuery || selectedCategory) && ( -
- {filteredScripts.length === 0 ? ( - No scripts found{searchQuery ? ` matching "${searchQuery}"` : ''}{selectedCategory ? ` in category "${selectedCategory}"` : ''} - ) : ( - - Found {filteredScripts.length} script{filteredScripts.length !== 1 ? 's' : ''} - {searchQuery ? ` matching "${searchQuery}"` : ''} - {selectedCategory ? ` in category "${selectedCategory}"` : ''} - - )} -
+ setSearchQuery(e.target.value)} + className="block w-full pl-10 pr-3 py-3 border border-gray-300 dark:border-gray-600 rounded-lg leading-5 bg-white dark:bg-gray-800 placeholder-gray-500 dark:placeholder-gray-400 text-gray-900 dark:text-gray-100 focus:outline-none focus:placeholder-gray-400 dark:focus:placeholder-gray-300 focus:ring-2 focus:ring-blue-500 dark:focus:ring-blue-400 focus:border-blue-500 dark:focus:border-blue-400 text-sm" + /> + {searchQuery && ( + )}
- - {/* Scripts Grid */} - {filteredScripts.length === 0 && (filters.searchQuery || selectedCategory || filters.showUpdatable !== null || filters.selectedTypes.length > 0) ? ( -
-
- - - -

No matching scripts found

-

- Try different filter settings or clear all filters. -

-
- {filters.searchQuery && ( - - )} - {selectedCategory && ( - - )} -
-
-
- ) : ( -
- {filteredScripts.map((script, index) => { - // Add validation to ensure script has required properties - if (!script || typeof script !== 'object') { - return null; - } - - // Create a unique key by combining slug, name, and index to handle duplicates - const uniqueKey = `${script.slug ?? 'unknown'}-${script.name ?? 'unnamed'}-${index}`; - - return ( - - ); - })} + {searchQuery && ( +
+ {filteredScripts.length === 0 ? ( + No scripts found matching "{searchQuery}" + ) : ( + Found {filteredScripts.length} script{filteredScripts.length !== 1 ? 's' : ''} matching "{searchQuery}" + )}
)} - -
-
+ + {/* Scripts Grid */} + {filteredScripts.length === 0 && searchQuery ? ( +
+
+ + + +

No matching scripts found

+

+ Try adjusting your search terms or clear the search to see all scripts. +

+ +
+
+ ) : ( +
+ {filteredScripts.map((script, index) => { + // Add validation to ensure script has required properties + if (!script || typeof script !== 'object') { + return null; + } + + // Create a unique key by combining slug, name, and index to handle duplicates + const uniqueKey = `${script.slug ?? 'unknown'}-${script.name ?? 'unnamed'}-${index}`; + + return ( + + ); + })} +
+ )} + + + ); } diff --git a/src/app/_components/SettingsButton.tsx b/src/app/_components/SettingsButton.tsx index c561c64..9b16cb5 100644 --- a/src/app/_components/SettingsButton.tsx +++ b/src/app/_components/SettingsButton.tsx @@ -8,38 +8,33 @@ export function SettingsButton() { return ( <> -
-
- Add and manage PVE Servers -
- -
+ + + + Add PVE Server + setIsOpen(false)} /> diff --git a/src/app/_components/__tests__/AlwaysPass.test.tsx b/src/app/_components/__tests__/AlwaysPass.test.tsx deleted file mode 100644 index c2b063b..0000000 --- a/src/app/_components/__tests__/AlwaysPass.test.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { describe, it, expect } from 'vitest' - -describe('Always Pass Tests', () => { - it('should always pass - basic assertion', () => { - expect(true).toBe(true) - }) -}) diff --git a/src/app/_components/__tests__/ResyncButton.test.tsx b/src/app/_components/__tests__/ResyncButton.test.tsx new file mode 100644 index 0000000..13445e0 --- /dev/null +++ b/src/app/_components/__tests__/ResyncButton.test.tsx @@ -0,0 +1,62 @@ +import { describe, it, expect, beforeEach, vi } from 'vitest' +import { render, screen, fireEvent } from '@testing-library/react' +import { ResyncButton } from '../ResyncButton' + +// Mock tRPC +vi.mock('~/trpc/react', () => ({ + api: { + scripts: { + resyncScripts: { + useMutation: vi.fn(), + }, + }, + }, +})) + +describe('ResyncButton', () => { + beforeEach(() => { + vi.clearAllMocks() + }) + + it('should render resync button', async () => { + const { api } = await import('~/trpc/react') + vi.mocked(api.scripts.resyncScripts.useMutation).mockReturnValue({ + mutate: vi.fn(), + }) + + render() + + expect(screen.getByText('Resync Scripts')).toBeInTheDocument() + }) + + it('should show loading state when resyncing', async () => { + const mockMutate = vi.fn() + const { api } = await import('~/trpc/react') + vi.mocked(api.scripts.resyncScripts.useMutation).mockReturnValue({ + mutate: mockMutate, + }) + + render() + + const button = screen.getByRole('button') + fireEvent.click(button) + + expect(screen.getByText('Syncing...')).toBeInTheDocument() + expect(button).toBeDisabled() + }) + + it('should handle button click', async () => { + const mockMutate = vi.fn() + const { api } = await import('~/trpc/react') + vi.mocked(api.scripts.resyncScripts.useMutation).mockReturnValue({ + mutate: mockMutate, + }) + + render() + + const button = screen.getByRole('button') + fireEvent.click(button) + + expect(mockMutate).toHaveBeenCalled() + }) +}) \ No newline at end of file diff --git a/src/app/_components/__tests__/ScriptsGrid.test.tsx b/src/app/_components/__tests__/ScriptsGrid.test.tsx new file mode 100644 index 0000000..5f163c2 --- /dev/null +++ b/src/app/_components/__tests__/ScriptsGrid.test.tsx @@ -0,0 +1,192 @@ +import { describe, it, expect, beforeEach, vi } from 'vitest' +import { render, screen, fireEvent, waitFor } from '@testing-library/react' +import userEvent from '@testing-library/user-event' +import { ScriptsGrid } from '../ScriptsGrid' + +// Mock tRPC +vi.mock('~/trpc/react', () => ({ + api: { + scripts: { + getScriptCards: { + useQuery: vi.fn(), + }, + getCtScripts: { + useQuery: vi.fn(), + }, + getScriptBySlug: { + useQuery: vi.fn(), + }, + }, + }, +})) + +// Mock child components +vi.mock('../ScriptCard', () => ({ + ScriptCard: ({ script, onClick }: { script: any; onClick: (script: any) => void }) => ( +
onClick(script)}> + {script.name} +
+ ), +})) + +vi.mock('../ScriptDetailModal', () => ({ + ScriptDetailModal: ({ isOpen, onClose, onInstallScript }: any) => + isOpen ? ( +
+ + +
+ ) : null, +})) + +describe('ScriptsGrid', () => { + const mockOnInstallScript = vi.fn() + + beforeEach(async () => { + vi.clearAllMocks() + mockOnInstallScript.mockClear() + }) + + it('should render loading state', async () => { + const { api } = await import('~/trpc/react') + vi.mocked(api.scripts.getScriptCards.useQuery).mockReturnValue({ data: null, isLoading: true, error: null }) + vi.mocked(api.scripts.getCtScripts.useQuery).mockReturnValue({ data: null, isLoading: true, error: null }) + vi.mocked(api.scripts.getScriptBySlug.useQuery).mockReturnValue({ data: null, isLoading: false, error: null }) + + render() + + expect(screen.getByText('Loading scripts...')).toBeInTheDocument() + }) + + it('should render error state', async () => { + const mockRefetch = vi.fn() + const { api } = await import('~/trpc/react') + vi.mocked(api.scripts.getScriptCards.useQuery).mockReturnValue({ + data: null, + isLoading: false, + error: { message: 'Test error' }, + refetch: mockRefetch + }) + vi.mocked(api.scripts.getCtScripts.useQuery).mockReturnValue({ data: null, isLoading: false, error: null }) + vi.mocked(api.scripts.getScriptBySlug.useQuery).mockReturnValue({ data: null, isLoading: false, error: null }) + + render() + + expect(screen.getByText('Failed to load scripts')).toBeInTheDocument() + expect(screen.getByText('Test error')).toBeInTheDocument() + expect(screen.getByText('Try Again')).toBeInTheDocument() + }) + + it('should render empty state when no scripts', async () => { + const { api } = await import('~/trpc/react') + vi.mocked(api.scripts.getScriptCards.useQuery).mockReturnValue({ data: { success: true, cards: [] }, isLoading: false, error: null }) + vi.mocked(api.scripts.getCtScripts.useQuery).mockReturnValue({ data: { scripts: [] }, isLoading: false, error: null }) + vi.mocked(api.scripts.getScriptBySlug.useQuery).mockReturnValue({ data: null, isLoading: false, error: null }) + + render() + + expect(screen.getByText('No scripts found')).toBeInTheDocument() + }) + + it('should render scripts grid with search functionality', async () => { + const mockScripts = [ + { name: 'Test Script 1', slug: 'test-script-1' }, + { name: 'Test Script 2', slug: 'test-script-2' }, + ] + + const { api } = await import('~/trpc/react') + vi.mocked(api.scripts.getScriptCards.useQuery).mockReturnValue({ + data: { success: true, cards: mockScripts }, + isLoading: false, + error: null + }) + vi.mocked(api.scripts.getCtScripts.useQuery).mockReturnValue({ data: { scripts: [] }, isLoading: false, error: null }) + vi.mocked(api.scripts.getScriptBySlug.useQuery).mockReturnValue({ data: null, isLoading: false, error: null }) + + render() + + expect(screen.getByTestId('script-card-test-script-1')).toBeInTheDocument() + expect(screen.getByTestId('script-card-test-script-2')).toBeInTheDocument() + + // Test search functionality + const searchInput = screen.getByPlaceholderText('Search scripts by name...') + await userEvent.type(searchInput, 'Script 1') + + await waitFor(() => { + expect(screen.getByTestId('script-card-test-script-1')).toBeInTheDocument() + expect(screen.queryByTestId('script-card-test-script-2')).not.toBeInTheDocument() + }) + }) + + it('should handle script card click and open modal', async () => { + const mockScripts = [ + { name: 'Test Script', slug: 'test-script' }, + ] + + const { api } = await import('~/trpc/react') + vi.mocked(api.scripts.getScriptCards.useQuery).mockReturnValue({ + data: { success: true, cards: mockScripts }, + isLoading: false, + error: null + }) + vi.mocked(api.scripts.getCtScripts.useQuery).mockReturnValue({ data: { scripts: [] }, isLoading: false, error: null }) + vi.mocked(api.scripts.getScriptBySlug.useQuery).mockReturnValue({ data: null, isLoading: false, error: null }) + + render() + + const scriptCard = screen.getByTestId('script-card-test-script') + fireEvent.click(scriptCard) + + expect(screen.getByTestId('script-detail-modal')).toBeInTheDocument() + }) + + it('should handle clear search', async () => { + const mockScripts = [ + { name: 'Test Script', slug: 'test-script' }, + ] + + const { api } = await import('~/trpc/react') + vi.mocked(api.scripts.getScriptCards.useQuery).mockReturnValue({ + data: { success: true, cards: mockScripts }, + isLoading: false, + error: null + }) + vi.mocked(api.scripts.getCtScripts.useQuery).mockReturnValue({ data: { scripts: [] }, isLoading: false, error: null }) + vi.mocked(api.scripts.getScriptBySlug.useQuery).mockReturnValue({ data: null, isLoading: false, error: null }) + + render() + + const searchInput = screen.getByPlaceholderText('Search scripts by name...') + await userEvent.type(searchInput, 'test') + + // Clear search - the clear button doesn't have accessible text, so we'll click it directly + const clearButton = screen.getByRole('button') + fireEvent.click(clearButton) + + expect(searchInput).toHaveValue('') + }) + + it('should show no matching scripts when search returns empty', async () => { + const mockScripts = [ + { name: 'Test Script', slug: 'test-script' }, + ] + + const { api } = await import('~/trpc/react') + vi.mocked(api.scripts.getScriptCards.useQuery).mockReturnValue({ + data: { success: true, cards: mockScripts }, + isLoading: false, + error: null + }) + vi.mocked(api.scripts.getCtScripts.useQuery).mockReturnValue({ data: { scripts: [] }, isLoading: false, error: null }) + vi.mocked(api.scripts.getScriptBySlug.useQuery).mockReturnValue({ data: null, isLoading: false, error: null }) + + render() + + const searchInput = screen.getByPlaceholderText('Search scripts by name...') + await userEvent.type(searchInput, 'nonexistent') + + await waitFor(() => { + expect(screen.getByText('No matching scripts found')).toBeInTheDocument() + }) + }) +}) \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 11a1f35..36d1edb 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -43,22 +43,13 @@ export default function RootLayout({ } else { document.documentElement.classList.remove('dark'); } - } catch (e) { - // Fallback to system preference if localStorage fails - const systemDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches; - if (systemDark) { - document.documentElement.classList.add('dark'); - } - } + } catch (e) {} })(); `, }} /> - + {/* Dark Mode Toggle in top right corner */}
diff --git a/src/app/page.tsx b/src/app/page.tsx index 58a6257..065a4e3 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -35,13 +35,9 @@ export default function Home() { {/* Controls */}
-
-
- -
-
- -
+
+ +
diff --git a/src/server/api/routers/__tests__/scripts.test.ts b/src/server/api/routers/__tests__/scripts.test.ts new file mode 100644 index 0000000..a1cfab0 --- /dev/null +++ b/src/server/api/routers/__tests__/scripts.test.ts @@ -0,0 +1,368 @@ +import { describe, it, expect, beforeEach, vi } from 'vitest' +import { createCallerFactory } from '~/server/api/trpc' +import { scriptsRouter } from '../scripts' + +// Mock dependencies +vi.mock('~/server/lib/scripts', () => ({ + scriptManager: { + getScripts: vi.fn(), + getCtScripts: vi.fn(), + validateScriptPath: vi.fn(), + getScriptsDirectoryInfo: vi.fn(), + }, +})) + +vi.mock('~/server/lib/git', () => ({ + gitManager: { + getStatus: vi.fn(), + pullUpdates: vi.fn(), + }, +})) + +vi.mock('~/server/services/githubJsonService', () => ({ + githubJsonService: { + syncJsonFiles: vi.fn(), + getAllScripts: vi.fn(), + getScriptBySlug: vi.fn(), + }, +})) + +vi.mock('~/server/services/localScripts', () => ({ + localScriptsService: { + getScriptCards: vi.fn(), + getAllScripts: vi.fn(), + getScriptBySlug: vi.fn(), + saveScriptsFromGitHub: vi.fn(), + }, +})) + +vi.mock('~/server/services/scriptDownloader', () => ({ + scriptDownloaderService: { + loadScript: vi.fn(), + checkScriptExists: vi.fn(), + compareScriptContent: vi.fn(), + getScriptDiff: vi.fn(), + }, +})) + +vi.mock('fs/promises', () => ({ + readFile: vi.fn(), +})) + +vi.mock('path', () => ({ + join: vi.fn((...args) => { + // Simulate path.join behavior for security check + const result = args.join('/') + // If the path contains '..', it should be considered invalid + if (result.includes('../')) { + return '/invalid/path' + } + return result + }), +})) + +vi.mock('~/env', () => ({ + env: { + SCRIPTS_DIRECTORY: '/test/scripts', + }, +})) + +describe('scriptsRouter', () => { + let caller: ReturnType> + + beforeEach(() => { + vi.clearAllMocks() + caller = createCallerFactory(scriptsRouter)({}) + }) + + describe('getScripts', () => { + it('should return scripts and directory info', async () => { + const mockScripts = [ + { name: 'test.sh', path: '/test/scripts/test.sh', extension: '.sh' }, + ] + const mockDirectoryInfo = { + path: '/test/scripts', + allowedExtensions: ['.sh'], + allowedPaths: ['/'], + maxExecutionTime: 30000, + } + + const { scriptManager } = await import('~/server/lib/scripts') + vi.mocked(scriptManager.getScripts).mockResolvedValue(mockScripts) + vi.mocked(scriptManager.getScriptsDirectoryInfo).mockReturnValue(mockDirectoryInfo) + + const result = await caller.getScripts() + + expect(result).toEqual({ + scripts: mockScripts, + directoryInfo: mockDirectoryInfo, + }) + }) + }) + + describe('getCtScripts', () => { + it('should return CT scripts and directory info', async () => { + const mockScripts = [ + { name: 'ct-test.sh', path: '/test/scripts/ct/ct-test.sh', slug: 'ct-test' }, + ] + const mockDirectoryInfo = { + path: '/test/scripts', + allowedExtensions: ['.sh'], + allowedPaths: ['/'], + maxExecutionTime: 30000, + } + + const { scriptManager } = await import('~/server/lib/scripts') + vi.mocked(scriptManager.getCtScripts).mockResolvedValue(mockScripts) + vi.mocked(scriptManager.getScriptsDirectoryInfo).mockReturnValue(mockDirectoryInfo) + + const result = await caller.getCtScripts() + + expect(result).toEqual({ + scripts: mockScripts, + directoryInfo: mockDirectoryInfo, + }) + }) + }) + + describe('getScriptContent', () => { + it('should return script content for valid path', async () => { + const mockContent = '#!/bin/bash\necho "Hello World"' + const { readFile } = await import('fs/promises') + vi.mocked(readFile).mockResolvedValue(mockContent) + + const result = await caller.getScriptContent({ path: 'test.sh' }) + + expect(result).toEqual({ + success: true, + content: mockContent, + }) + }) + + it('should return error for invalid path', async () => { + const result = await caller.getScriptContent({ path: '../../../etc/passwd' }) + + expect(result).toEqual({ + success: false, + error: 'Failed to read script content', + }) + }) + }) + + describe('validateScript', () => { + it('should return validation result', async () => { + const mockValidation = { valid: true } + const { scriptManager } = await import('~/server/lib/scripts') + vi.mocked(scriptManager.validateScriptPath).mockReturnValue(mockValidation) + + const result = await caller.validateScript({ scriptPath: '/test/scripts/test.sh' }) + + expect(result).toEqual(mockValidation) + }) + }) + + describe('getDirectoryInfo', () => { + it('should return directory information', async () => { + const mockDirectoryInfo = { + path: '/test/scripts', + allowedExtensions: ['.sh'], + allowedPaths: ['/'], + maxExecutionTime: 30000, + } + + const { scriptManager } = await import('~/server/lib/scripts') + vi.mocked(scriptManager.getScriptsDirectoryInfo).mockReturnValue(mockDirectoryInfo) + + const result = await caller.getDirectoryInfo() + + expect(result).toEqual(mockDirectoryInfo) + }) + }) + + describe('getScriptCards', () => { + it('should return script cards on success', async () => { + const mockCards = [ + { name: 'Test Script', slug: 'test-script' }, + ] + + const { localScriptsService } = await import('~/server/services/localScripts') + vi.mocked(localScriptsService.getScriptCards).mockResolvedValue(mockCards) + + const result = await caller.getScriptCards() + + expect(result).toEqual({ + success: true, + cards: mockCards, + }) + }) + + it('should return error on failure', async () => { + const { localScriptsService } = await import('~/server/services/localScripts') + vi.mocked(localScriptsService.getScriptCards).mockRejectedValue(new Error('Test error')) + + const result = await caller.getScriptCards() + + expect(result).toEqual({ + success: false, + error: 'Test error', + cards: [], + }) + }) + }) + + describe('getScriptBySlug', () => { + it('should return script on success', async () => { + const mockScript = { name: 'Test Script', slug: 'test-script' } + + const { githubJsonService } = await import('~/server/services/githubJsonService') + vi.mocked(githubJsonService.getScriptBySlug).mockResolvedValue(mockScript) + + const result = await caller.getScriptBySlug({ slug: 'test-script' }) + + expect(result).toEqual({ + success: true, + script: mockScript, + }) + }) + + it('should return error when script not found', async () => { + const { githubJsonService } = await import('~/server/services/githubJsonService') + vi.mocked(githubJsonService.getScriptBySlug).mockResolvedValue(null) + + const result = await caller.getScriptBySlug({ slug: 'nonexistent' }) + + expect(result).toEqual({ + success: false, + error: 'Script not found', + script: null, + }) + }) + }) + + describe('resyncScripts', () => { + it('should resync scripts successfully', async () => { + const { githubJsonService } = await import('~/server/services/githubJsonService') + + vi.mocked(githubJsonService.syncJsonFiles).mockResolvedValue({ + success: true, + message: 'Successfully synced 2 scripts from GitHub using 1 API call + raw downloads', + count: 2 + }) + + const result = await caller.resyncScripts() + + expect(result).toEqual({ + success: true, + message: 'Successfully synced 2 scripts from GitHub using 1 API call + raw downloads', + count: 2, + }) + }) + + it('should return error on failure', async () => { + const { githubJsonService } = await import('~/server/services/githubJsonService') + vi.mocked(githubJsonService.syncJsonFiles).mockResolvedValue({ + success: false, + message: 'GitHub error', + count: 0 + }) + + const result = await caller.resyncScripts() + + expect(result).toEqual({ + success: false, + message: 'GitHub error', + count: 0, + }) + }) + }) + + describe('loadScript', () => { + it('should load script successfully', async () => { + const mockScript = { name: 'Test Script', slug: 'test-script' } + const mockResult = { success: true, files: ['test.sh'] } + + const { localScriptsService } = await import('~/server/services/localScripts') + const { scriptDownloaderService } = await import('~/server/services/scriptDownloader') + + vi.mocked(localScriptsService.getScriptBySlug).mockResolvedValue(mockScript) + vi.mocked(scriptDownloaderService.loadScript).mockResolvedValue(mockResult) + + const result = await caller.loadScript({ slug: 'test-script' }) + + expect(result).toEqual(mockResult) + }) + + it('should return error when script not found', async () => { + const { localScriptsService } = await import('~/server/services/localScripts') + vi.mocked(localScriptsService.getScriptBySlug).mockResolvedValue(null) + + const result = await caller.loadScript({ slug: 'nonexistent' }) + + expect(result).toEqual({ + success: false, + error: 'Script not found', + files: [], + }) + }) + }) + + describe('checkScriptFiles', () => { + it('should check script files successfully', async () => { + const mockScript = { name: 'Test Script', slug: 'test-script' } + const mockResult = { ctExists: true, installExists: false, files: ['test.sh'] } + + const { localScriptsService } = await import('~/server/services/localScripts') + const { scriptDownloaderService } = await import('~/server/services/scriptDownloader') + + vi.mocked(localScriptsService.getScriptBySlug).mockResolvedValue(mockScript) + vi.mocked(scriptDownloaderService.checkScriptExists).mockResolvedValue(mockResult) + + const result = await caller.checkScriptFiles({ slug: 'test-script' }) + + expect(result).toEqual({ + success: true, + ...mockResult, + }) + }) + }) + + describe('compareScriptContent', () => { + it('should compare script content successfully', async () => { + const mockScript = { name: 'Test Script', slug: 'test-script' } + const mockResult = { hasDifferences: true, differences: ['line 1'] } + + const { localScriptsService } = await import('~/server/services/localScripts') + const { scriptDownloaderService } = await import('~/server/services/scriptDownloader') + + vi.mocked(localScriptsService.getScriptBySlug).mockResolvedValue(mockScript) + vi.mocked(scriptDownloaderService.compareScriptContent).mockResolvedValue(mockResult) + + const result = await caller.compareScriptContent({ slug: 'test-script' }) + + expect(result).toEqual({ + success: true, + ...mockResult, + }) + }) + }) + + describe('getScriptDiff', () => { + it('should get script diff successfully', async () => { + const mockScript = { name: 'Test Script', slug: 'test-script' } + const mockResult = { diff: 'diff content' } + + const { localScriptsService } = await import('~/server/services/localScripts') + const { scriptDownloaderService } = await import('~/server/services/scriptDownloader') + + vi.mocked(localScriptsService.getScriptBySlug).mockResolvedValue(mockScript) + vi.mocked(scriptDownloaderService.getScriptDiff).mockResolvedValue(mockResult) + + const result = await caller.getScriptDiff({ slug: 'test-script', filePath: 'test.sh' }) + + expect(result).toEqual({ + success: true, + ...mockResult, + }) + }) + }) +}) diff --git a/src/server/api/routers/installedScripts.ts b/src/server/api/routers/installedScripts.ts index fa17360..f33a1ac 100644 --- a/src/server/api/routers/installedScripts.ts +++ b/src/server/api/routers/installedScripts.ts @@ -105,7 +105,6 @@ export const installedScriptsRouter = createTRPCRouter({ updateInstalledScript: publicProcedure .input(z.object({ id: z.number(), - script_name: z.string().optional(), container_id: z.string().optional(), status: z.enum(['in_progress', 'success', 'failed']).optional(), output_log: z.string().optional() diff --git a/src/server/api/routers/scripts.ts b/src/server/api/routers/scripts.ts index 58e70d0..330e6a8 100644 --- a/src/server/api/routers/scripts.ts +++ b/src/server/api/routers/scripts.ts @@ -4,7 +4,6 @@ import { scriptManager } from "~/server/lib/scripts"; import { githubJsonService } from "~/server/services/githubJsonService"; import { localScriptsService } from "~/server/services/localScripts"; import { scriptDownloaderService } from "~/server/services/scriptDownloader"; -import type { ScriptCard } from "~/types/script"; export const scriptsRouter = createTRPCRouter({ // Get all available scripts @@ -122,68 +121,6 @@ export const scriptsRouter = createTRPCRouter({ } }), - // Get metadata (categories and other metadata) - getMetadata: publicProcedure - .query(async () => { - try { - const metadata = await localScriptsService.getMetadata(); - return { success: true, metadata }; - } catch (error) { - console.error('Error in getMetadata:', error); - return { - success: false, - error: error instanceof Error ? error.message : 'Failed to fetch metadata', - metadata: null - }; - } - }), - - // Get script cards with category information - getScriptCardsWithCategories: publicProcedure - .query(async () => { - try { - const [cards, metadata] = await Promise.all([ - localScriptsService.getScriptCards(), - localScriptsService.getMetadata() - ]); - - // Get all scripts to access their categories - const scripts = await localScriptsService.getAllScripts(); - - // Create category ID to name mapping - const categoryMap: Record = {}; - if (metadata?.categories) { - metadata.categories.forEach((cat: any) => { - categoryMap[cat.id] = cat.name; - }); - } - - // Enhance cards with category information and additional script data - const cardsWithCategories = cards.map(card => { - const script = scripts.find(s => s.slug === card.slug); - const categoryNames: string[] = script?.categories?.map(id => categoryMap[id]).filter((name): name is string => typeof name === 'string') ?? []; - - return { - ...card, - categories: script?.categories ?? [], - categoryNames: categoryNames, - // Add date_created from script - date_created: script?.date_created, - } as ScriptCard; - }); - - return { success: true, cards: cardsWithCategories, metadata }; - } catch (error) { - console.error('Error in getScriptCardsWithCategories:', error); - return { - success: false, - error: error instanceof Error ? error.message : 'Failed to fetch script cards with categories', - cards: [], - metadata: null - }; - } - }), - // Resync scripts from GitHub (1 API call + raw downloads) resyncScripts: publicProcedure .mutation(async () => { diff --git a/src/server/database.js b/src/server/database.js index 99e65d3..9300923 100644 --- a/src/server/database.js +++ b/src/server/database.js @@ -167,20 +167,15 @@ class DatabaseService { /** * @param {number} id * @param {Object} updateData - * @param {string} [updateData.script_name] * @param {string} [updateData.container_id] * @param {string} [updateData.status] * @param {string} [updateData.output_log] */ updateInstalledScript(id, updateData) { - const { script_name, container_id, status, output_log } = updateData; + const { container_id, status, output_log } = updateData; const updates = []; const values = []; - if (script_name !== undefined) { - updates.push('script_name = ?'); - values.push(script_name); - } if (container_id !== undefined) { updates.push('container_id = ?'); values.push(container_id); diff --git a/src/server/lib/__tests__/scripts.test.ts b/src/server/lib/__tests__/scripts.test.ts new file mode 100644 index 0000000..5dac993 --- /dev/null +++ b/src/server/lib/__tests__/scripts.test.ts @@ -0,0 +1,349 @@ +import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest' + +// Create mock functions using vi.hoisted +const mockReaddir = vi.hoisted(() => vi.fn()) +const mockStat = vi.hoisted(() => vi.fn()) +const mockReadFile = vi.hoisted(() => vi.fn()) +const mockSpawn = vi.hoisted(() => vi.fn()) + +// Mock the dependencies before importing ScriptManager +vi.mock('fs/promises', () => ({ + readdir: mockReaddir, + stat: mockStat, + readFile: mockReadFile, + default: { + readdir: mockReaddir, + stat: mockStat, + readFile: mockReadFile, + } +})) + +vi.mock('child_process', () => ({ + spawn: mockSpawn, + default: { + spawn: mockSpawn, + } +})) + +vi.mock('~/env.js', () => ({ + env: { + SCRIPTS_DIRECTORY: '/test/scripts', + ALLOWED_SCRIPT_EXTENSIONS: '.sh,.py,.js,.ts', + ALLOWED_SCRIPT_PATHS: '/,/ct/', + MAX_SCRIPT_EXECUTION_TIME: '30000', + }, +})) + +vi.mock('~/server/services/localScripts', () => ({ + localScriptsService: { + getScriptBySlug: vi.fn(), + }, +})) + +// Import after mocking +import { ScriptManager } from '../scripts' + +describe('ScriptManager', () => { + let scriptManager: ScriptManager + + beforeEach(async () => { + vi.clearAllMocks() + scriptManager = new ScriptManager() + }) + + afterEach(() => { + vi.clearAllMocks() + }) + + describe('constructor', () => { + it('should initialize with correct configuration', () => { + const info = scriptManager.getScriptsDirectoryInfo() + + expect(info.path).toBe('/test/scripts') + expect(info.allowedExtensions).toEqual(['.sh', '.py', '.js', '.ts']) + expect(info.allowedPaths).toEqual(['/', '/ct/']) + expect(info.maxExecutionTime).toBe(30000) + }) + }) + + describe('getScripts', () => { + it('should return empty array when directory read fails', async () => { + mockReaddir.mockRejectedValue(new Error('Directory not found')) + + const scripts = await scriptManager.getScripts() + + expect(scripts).toEqual([]) + }) + + it('should return scripts with correct properties', async () => { + const mockFiles = ['script1.sh', 'script2.py', 'script3.js', 'readme.txt'] + + mockReaddir.mockResolvedValue(mockFiles) + mockStat.mockImplementation((filePath) => { + // Mock different responses based on file path + if (filePath.includes('script1.sh') || filePath.includes('script2.py') || filePath.includes('script3.js')) { + return Promise.resolve({ + isFile: () => true, + isDirectory: () => false, + size: 1024, + mtime: new Date('2024-01-01T00:00:00Z'), + mode: 0o755, // executable permissions + } as any) + } + return Promise.resolve({ + isFile: () => false, + isDirectory: () => true, + size: 0, + mtime: new Date('2024-01-01T00:00:00Z'), + mode: 0o755, + } as any) + }) + + const scripts = await scriptManager.getScripts() + + expect(scripts).toHaveLength(3) // Only .sh, .py, .js files + expect(scripts[0]).toMatchObject({ + name: 'script1.sh', + path: '/test/scripts/script1.sh', + extension: '.sh', + size: 1024, + executable: true, + }) + expect(scripts[1]).toMatchObject({ + name: 'script2.py', + path: '/test/scripts/script2.py', + extension: '.py', + size: 1024, + executable: true, + }) + expect(scripts[2]).toMatchObject({ + name: 'script3.js', + path: '/test/scripts/script3.js', + extension: '.js', + size: 1024, + executable: true, + }) + }) + + it('should sort scripts alphabetically', async () => { + const mockFiles = ['z_script.sh', 'a_script.sh', 'm_script.sh'] + + mockReaddir.mockResolvedValue(mockFiles) + mockStat.mockResolvedValue({ + isFile: () => true, + isDirectory: () => false, + size: 1024, + mtime: new Date('2024-01-01T00:00:00Z'), + mode: 0o755, + } as any) + + const scripts = await scriptManager.getScripts() + + expect(scripts.map(s => s.name)).toEqual(['a_script.sh', 'm_script.sh', 'z_script.sh']) + }) + }) + + describe('getCtScripts', () => { + it('should return ct scripts with slug and logo', async () => { + const mockFiles = ['test-script.sh'] + + // Mock readdir for the ct directory + mockReaddir.mockImplementation((dirPath) => { + if (dirPath.includes('/ct')) { + return Promise.resolve(mockFiles) + } + return Promise.resolve([]) + }) + + mockStat.mockResolvedValue({ + isFile: () => true, + isDirectory: () => false, + size: 1024, + mtime: new Date('2024-01-01T00:00:00Z'), + mode: 0o755, + } as any) + + // Mock the localScriptsService + const { localScriptsService } = await import('~/server/services/localScripts') + vi.mocked(localScriptsService.getScriptBySlug).mockResolvedValue({ + logo: 'test-logo.png', + name: 'Test Script', + description: 'A test script', + } as { logo: string; name: string; description: string }) + + const scripts = await scriptManager.getCtScripts() + + expect(scripts).toHaveLength(1) + expect(scripts[0]).toMatchObject({ + name: 'test-script.sh', + path: '/test/scripts/ct/test-script.sh', + slug: 'test-script', + logo: 'test-logo.png', + }) + }) + + it('should handle missing logo gracefully', async () => { + const mockFiles = ['test-script.sh'] + + // Mock readdir for the ct directory + mockReaddir.mockImplementation((dirPath) => { + if (dirPath.includes('/ct')) { + return Promise.resolve(mockFiles) + } + return Promise.resolve([]) + }) + + mockStat.mockResolvedValue({ + isFile: () => true, + isDirectory: () => false, + size: 1024, + mtime: new Date('2024-01-01T00:00:00Z'), + mode: 0o755, + } as any) + + const { localScriptsService } = await import('~/server/services/localScripts') + vi.mocked(localScriptsService.getScriptBySlug).mockRejectedValue(new Error('Not found')) + + const scripts = await scriptManager.getCtScripts() + + expect(scripts).toHaveLength(1) + expect(scripts[0].logo).toBeUndefined() + }) + }) + + describe('validateScriptPath', () => { + it('should validate correct script path', () => { + const result = scriptManager.validateScriptPath('/test/scripts/valid-script.sh') + + expect(result.valid).toBe(true) + expect(result.message).toBeUndefined() + }) + + it('should reject path outside scripts directory', () => { + const result = scriptManager.validateScriptPath('/other/path/script.sh') + + expect(result.valid).toBe(false) + expect(result.message).toBe('Script path is not within the allowed scripts directory') + }) + + it('should reject path not in allowed paths', () => { + const result = scriptManager.validateScriptPath('/test/scripts/forbidden/script.sh') + + expect(result.valid).toBe(false) + expect(result.message).toBe('Script path is not in the allowed paths list') + }) + + it('should reject invalid file extension', () => { + const result = scriptManager.validateScriptPath('/test/scripts/script.exe') + + expect(result.valid).toBe(false) + expect(result.message).toContain('File extension') + }) + + it('should accept ct subdirectory paths', () => { + const result = scriptManager.validateScriptPath('/test/scripts/ct/script.sh') + + expect(result.valid).toBe(true) + }) + }) + + describe('executeScript', () => { + it('should execute bash script correctly', async () => { + const mockChildProcess = { + kill: vi.fn(), + on: vi.fn(), + killed: false, + stdout: { on: vi.fn() }, + stderr: { on: vi.fn() }, + stdin: { write: vi.fn(), end: vi.fn() }, + } + mockSpawn.mockReturnValue(mockChildProcess as any) + + const childProcess = await scriptManager.executeScript('/test/scripts/script.sh') + + expect(mockSpawn).toHaveBeenCalledWith('bash', ['/test/scripts/script.sh'], { + cwd: '/test/scripts', + stdio: ['pipe', 'pipe', 'pipe'], + shell: true, + }) + expect(childProcess).toBe(mockChildProcess) + }) + + it('should execute python script correctly', async () => { + const mockChildProcess = { + kill: vi.fn(), + on: vi.fn(), + killed: false, + stdout: { on: vi.fn() }, + stderr: { on: vi.fn() }, + stdin: { write: vi.fn(), end: vi.fn() }, + } + mockSpawn.mockReturnValue(mockChildProcess as any) + + await scriptManager.executeScript('/test/scripts/script.py') + + expect(mockSpawn).toHaveBeenCalledWith('python', ['/test/scripts/script.py'], { + cwd: '/test/scripts', + stdio: ['pipe', 'pipe', 'pipe'], + shell: true, + }) + }) + + it('should throw error for invalid script path', async () => { + await expect(scriptManager.executeScript('/invalid/path/script.sh')) + .rejects.toThrow('Script path is not within the allowed scripts directory') + }) + + it('should set up timeout correctly', async () => { + vi.useFakeTimers() + const mockChildProcess = { + kill: vi.fn(), + on: vi.fn(), + killed: false, + stdout: { on: vi.fn() }, + stderr: { on: vi.fn() }, + stdin: { write: vi.fn(), end: vi.fn() }, + } + mockSpawn.mockReturnValue(mockChildProcess as any) + + await scriptManager.executeScript('/test/scripts/script.sh') + + // Fast-forward time to trigger timeout + vi.advanceTimersByTime(30001) + + expect(mockChildProcess.kill).toHaveBeenCalledWith('SIGTERM') + + vi.useRealTimers() + }) + }) + + describe('getScriptContent', () => { + it('should return script content', async () => { + const mockContent = '#!/bin/bash\necho "Hello World"' + mockReadFile.mockResolvedValue(mockContent) + + const content = await scriptManager.getScriptContent('/test/scripts/script.sh') + + expect(content).toBe(mockContent) + expect(mockReadFile).toHaveBeenCalledWith('/test/scripts/script.sh', 'utf-8') + }) + + it('should throw error for invalid script path', async () => { + await expect(scriptManager.getScriptContent('/invalid/path/script.sh')) + .rejects.toThrow('Script path is not within the allowed scripts directory') + }) + }) + + describe('getScriptsDirectoryInfo', () => { + it('should return correct directory information', () => { + const info = scriptManager.getScriptsDirectoryInfo() + + expect(info).toEqual({ + path: '/test/scripts', + allowedExtensions: ['.sh', '.py', '.js', '.ts'], + allowedPaths: ['/', '/ct/'], + maxExecutionTime: 30000, + }) + }) + }) +}) \ No newline at end of file diff --git a/src/server/lib/scripts.ts b/src/server/lib/scripts.ts index 1d3da37..20a8bb4 100644 --- a/src/server/lib/scripts.ts +++ b/src/server/lib/scripts.ts @@ -84,15 +84,6 @@ export class ScriptManager { this.initializeConfig(); try { const ctDir = join(this.scriptsDir!, 'ct'); - - // Check if ct directory exists - try { - await stat(ctDir); - } catch { - console.warn(`CT scripts directory not found: ${ctDir}`); - return []; - } - const files = await readdir(ctDir); const scripts: ScriptInfo[] = []; diff --git a/src/server/services/localScripts.ts b/src/server/services/localScripts.ts index c238970..1d8e234 100644 --- a/src/server/services/localScripts.ts +++ b/src/server/services/localScripts.ts @@ -90,17 +90,6 @@ export class LocalScriptsService { } } - async getMetadata(): Promise { - try { - const filePath = join(this.scriptsDirectory, 'metadata.json'); - const content = await readFile(filePath, 'utf-8'); - return JSON.parse(content); - } catch (error) { - console.error('Error reading metadata file:', error); - throw new Error('Failed to read metadata'); - } - } - async saveScriptsFromGitHub(scripts: Script[]): Promise { try { // Ensure the directory exists diff --git a/src/test/__mocks__/child_process.ts b/src/test/__mocks__/child_process.ts new file mode 100644 index 0000000..935ebfa --- /dev/null +++ b/src/test/__mocks__/child_process.ts @@ -0,0 +1,24 @@ +import { vi } from 'vitest' + +export const mockSpawn = vi.fn() + +export const mockChildProcess = { + kill: vi.fn(), + on: vi.fn(), + killed: false, + stdout: { + on: vi.fn(), + }, + stderr: { + on: vi.fn(), + }, + stdin: { + write: vi.fn(), + end: vi.fn(), + }, +} + +export const resetMocks = () => { + mockSpawn.mockReset() + mockSpawn.mockReturnValue(mockChildProcess) +} diff --git a/src/test/__mocks__/fs.ts b/src/test/__mocks__/fs.ts new file mode 100644 index 0000000..615620b --- /dev/null +++ b/src/test/__mocks__/fs.ts @@ -0,0 +1,21 @@ +import { vi } from 'vitest' + +export const mockStats = { + isFile: vi.fn(() => true), + isDirectory: vi.fn(() => false), + size: 1024, + mtime: new Date('2024-01-01T00:00:00Z'), + mode: 0o755, // executable permissions +} + +export const mockReaddir = vi.fn() +export const mockStat = vi.fn() +export const mockReadFile = vi.fn() + +export const resetMocks = () => { + mockReaddir.mockReset() + mockStat.mockReset() + mockReadFile.mockReset() + mockStats.isFile.mockReset() + mockStats.isDirectory.mockReset() +} diff --git a/src/test/setup.ts b/src/test/setup.ts new file mode 100644 index 0000000..a86c2a2 --- /dev/null +++ b/src/test/setup.ts @@ -0,0 +1,24 @@ +import '@testing-library/jest-dom' +import { vi } from 'vitest' + +// Global test utilities +global.ResizeObserver = vi.fn().mockImplementation(() => ({ + observe: vi.fn(), + unobserve: vi.fn(), + disconnect: vi.fn(), +})) + +// Mock window.matchMedia +Object.defineProperty(window, 'matchMedia', { + writable: true, + value: vi.fn().mockImplementation(query => ({ + matches: false, + media: query, + onchange: null, + addListener: vi.fn(), // deprecated + removeListener: vi.fn(), // deprecated + addEventListener: vi.fn(), + removeEventListener: vi.fn(), + dispatchEvent: vi.fn(), + })), +}) diff --git a/src/types/script.ts b/src/types/script.ts index 2de1401..063134b 100644 --- a/src/types/script.ts +++ b/src/types/script.ts @@ -51,12 +51,7 @@ export interface ScriptCard { website: string | null; source?: 'github' | 'local'; isDownloaded?: boolean; - isUpToDate?: boolean; localPath?: string; - // Additional properties added by API - categories?: number[]; - categoryNames?: string[]; - date_created?: string; } export interface GitHubFile { diff --git a/test/scripts/ct/test-script.sh b/test/scripts/ct/test-script.sh new file mode 100644 index 0000000..e69de29 diff --git a/test/scripts/script1.sh b/test/scripts/script1.sh new file mode 100644 index 0000000..e69de29 diff --git a/test/scripts/script2.py b/test/scripts/script2.py new file mode 100644 index 0000000..e69de29 diff --git a/test/scripts/script3.js b/test/scripts/script3.js new file mode 100644 index 0000000..e69de29 diff --git a/vitest.config.ts b/vitest.config.ts index 13687c8..3a2b14a 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -7,6 +7,7 @@ export default defineConfig({ test: { globals: true, environment: 'jsdom', + setupFiles: ['./src/test/setup.ts'], include: ['**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'], exclude: ['node_modules', 'dist', '.next', '.git'], coverage: {
+ Script Name @@ -383,9 +241,6 @@ export function InstalledScriptsTab() { Server - Mode - Status
- {editingScriptId === script.id ? ( -
- handleInputChange('script_name', e.target.value)} - className="w-full px-2 py-1 text-sm border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500" - placeholder="Script name" - /> -
{script.script_path}
-
- ) : ( -
-
{script.script_name}
-
{script.script_path}
-
- )} +
{script.script_name}
+
{script.script_path}
- {editingScriptId === script.id ? ( - handleInputChange('container_id', e.target.value)} - className="w-full px-2 py-1 text-sm font-mono border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500" - placeholder="Container ID" - /> + {script.container_id ? ( + {String(script.container_id)} ) : ( - script.container_id ? ( - {String(script.container_id)} - ) : ( - - - ) + - )} @@ -447,61 +277,35 @@ export function InstalledScriptsTab() { )} - - {script.execution_mode.toUpperCase()} - + + {String(script.execution_mode).toUpperCase()} + - - {script.status.replace('_', ' ').toUpperCase()} - + + {String(script.status).replace('_', ' ').toUpperCase()} + {formatDate(String(script.installation_date))}
- {editingScriptId === script.id ? ( - <> - - - - ) : ( - <> - - {script.container_id && ( - - )} - - + {script.container_id && ( + )} +