600 Commits

Author SHA1 Message Date
Michel Roegl-Brunner
ffef6313d4 Add error reporting for GitHub rate limit errors
- Add specific error handling for GitHub API rate limit (403) errors
- Create RateLimitError with proper error name for identification
- Store last sync error and error time in settings for UI display
- Add error status display in autosync settings modal
- Show user-friendly error messages with GitHub token suggestion
- Clear error status on successful sync
- Update both GitHubJsonService and GitHubService with rate limit error handling

This provides better user feedback when GitHub API rate limits are exceeded
and guides users to set up a GitHub token for higher rate limits.
2025-10-24 22:23:59 +02:00
Michel Roegl-Brunner
7b4daf8754 Fix autosync continuing to run after being disabled
- Add defensive check in cron job execution to stop if autosync is disabled
- Ensure isRunning flag is set to false when stopping autosync
- Add logging to show when autosync is disabled and not scheduling
- Fix both API route and TRPC router to properly stop service
- Prevent multiple cron jobs from running simultaneously

This fixes the issue where autosync would continue running even after
being disabled in the GUI, causing rate limit errors and unwanted syncs.
2025-10-24 22:20:13 +02:00
Michel Roegl-Brunner
fdeda6c77a Add GitHub token authentication to sync services
- Add GitHub token authentication to GitHubJsonService for API calls
- Add GitHub token authentication to GitHubService for API calls
- Update fetchFromGitHub methods to use GITHUB_TOKEN from .env
- Update downloadJsonFile methods to use GitHub token for raw file downloads
- Add proper error handling for rate limit exceeded (403) errors
- Add console logging to show when token is/isn't being used
- Improve error messages to suggest setting GITHUB_TOKEN for higher rate limits

This ensures that when a GitHub token is specified in .env, it will be used
for all GitHub API calls during sync operations, providing higher rate limits
and better reliability.
2025-10-24 22:16:31 +02:00
Michel Roegl-Brunner
5acaf144fb Fix autosync toggle disable functionality
- Fix service instance management to use global instance for stopping autosync
- Add automatic saving when toggle is changed (no manual save required)
- Fix validation issue where custom sync type without cron expression caused 400 error
- Add comprehensive debugging and error handling
- Ensure .env file is properly updated with AUTO_SYNC_ENABLED value
- Improve service lifecycle management with proper state cleanup
- Add fallback logic for invalid sync interval configurations

Resolves issue where disabling autosync in GUI didn't update .env file or stop service
2025-10-24 22:15:24 +02:00
Michel Roegl-Brunner
926032e83b Fix auto-sync service not stopping when disabled
- Use global auto-sync service instance instead of creating new instances
- This ensures stopAutoSync() is called on the actual running service
- Fix .env file parsing to handle comments and empty lines properly
- Update both TRPC and REST API endpoints to use global instance
- Auto-sync service will now properly stop when disabled in settings
2025-10-24 22:09:16 +02:00
Michel Roegl-Brunner
8fc9b27f55 Fix missing access import in scriptDownloader.js
- Add missing 'access' import from 'fs/promises'
- This was causing checkScriptExists method to fail with 'access is not defined' error
- Now properly detects when script files exist locally
- Fixes issue where UI shows 'Load Script' instead of 'Install' button for downloaded scripts
2025-10-24 22:07:46 +02:00
Michel Roegl-Brunner
9a8cff3227 Add missing checkScriptExists method to scriptDownloader.js
- Add checkScriptExists method that was missing from JavaScript implementation
- This method is required by the checkScriptFiles API endpoint
- Method checks if CT script and install script files exist locally
- Returns ctExists, installExists, and files array
- Fixes issue where UI shows 'Load Script' instead of 'Install' button for downloaded scripts
2025-10-24 22:06:34 +02:00
Michel Roegl-Brunner
e40bd1f6a3 Fix CT script source line replacement
- Implement modifyScriptContent method to replace GitHub source line with local source
- Replace 'source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)'
  with 'SCRIPT_DIR="." \nsource "/../core/build.func"'
- This ensures CT scripts use local build.func instead of downloading from GitHub
- Applied to all CT scripts during download process
- Tested with 2fauth script - replacement works correctly
2025-10-24 22:04:23 +02:00
Michel Roegl-Brunner
6c982050da Fix notification to show script names grouped by category
- Store full script objects instead of just names in results.newScripts and results.updatedScripts
- This allows groupScriptsByCategory to properly group scripts by their categories
- Notification will now show actual script names grouped by category instead of 'undefined synced, undefined up to date'
- Script objects contain name, slug, and categories fields needed for proper grouping
2025-10-24 22:02:56 +02:00
Michel Roegl-Brunner
b40f5b788c Fix script downloader placeholder files issue
- Delete stub scriptDownloader.js that contained placeholder implementation
- Implement real JavaScript script downloader with GitHub fetch functionality
- Fix incremental JSON sync to only process newly synced files
- Add proper error handling and file structure management
- Support all script types (ct/, tools/, vm/, vw/) with directory preservation
- Download install scripts for CT scripts
- Re-enable auto-sync service to use real implementation

Scripts now download real content from GitHub instead of placeholders.
2025-10-24 21:58:35 +02:00
dependabot[bot]
962a3b9908 build(deps-dev): Bump @tailwindcss/postcss from 4.1.15 to 4.1.16
Bumps [@tailwindcss/postcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/@tailwindcss-postcss) from 4.1.15 to 4.1.16.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.16/packages/@tailwindcss-postcss)

---
updated-dependencies:
- dependency-name: "@tailwindcss/postcss"
  dependency-version: 4.1.16
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-24 19:38:29 +00:00
dependabot[bot]
a1fe386efd build(deps-dev): Bump @vitejs/plugin-react from 5.0.4 to 5.1.0
Bumps [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/tree/HEAD/packages/plugin-react) from 5.0.4 to 5.1.0.
- [Release notes](https://github.com/vitejs/vite-plugin-react/releases)
- [Changelog](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite-plugin-react/commits/plugin-react@5.1.0/packages/plugin-react)

---
updated-dependencies:
- dependency-name: "@vitejs/plugin-react"
  dependency-version: 5.1.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-24 19:37:55 +00:00
dependabot[bot]
aa76e17e25 build(deps): Bump lucide-react from 0.546.0 to 0.548.0
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.546.0 to 0.548.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/0.548.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-version: 0.548.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-24 19:37:40 +00:00
Michel Roegl-Brunner
2c3fdf5544 Fix script card click issues and missing Install button
- Fix type signature mismatch in handleCardClick functions
  - Updated ScriptsGrid.tsx and DownloadedScriptsTab.tsx to accept ScriptCardType instead of { slug: string }
  - This resolves the modal not opening when clicking script cards

- Fix server-side import issues
  - Updated autoSyncService.js to import from githubJsonService.ts instead of .js
  - Fixed path aliases in githubJsonService.ts to use relative imports
  - Updated scripts.ts to import from TypeScript service files directly

- Fix missing Install button
  - Resolved scriptDownloaderService.checkScriptExists method not being available
  - Install button now appears when script files exist locally

- Remove debug logging
  - Cleaned up temporary console.log statements and debug UI elements

All script card interactions now work properly:
- Cards open detail modal when clicked
- Install button appears when appropriate
- Server-side API calls work correctly
2025-10-24 21:22:46 +02:00
github-actions[bot]
74dd29b87b chore: add VERSION v0.4.8 (#239)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-24 11:00:54 +00:00
Michel Roegl-Brunner
8a07fb781c Remove sync upstream JSONs step from publish_release.yml
Removed the sync upstream JSONs step from the workflow.
2025-10-24 12:59:53 +02:00
Michel Roegl-Brunner
79f17236db Merge pull request #238 from community-scripts/feat/auto_sync_lxc
feat: Add comprehensive auto-sync functionality
2025-10-24 12:58:56 +02:00
Michel Roegl-Brunner
83ab60ec2d Merge pull request #233 from community-scripts/dependabot/npm_and_yarn/tailwindcss-4.1.16
build(deps-dev): Bump tailwindcss from 4.1.15 to 4.1.16
2025-10-24 12:57:25 +02:00
Michel Roegl-Brunner
cd2b00b704 fix: Resolve linter errors in autoSyncService.js
- Added @ts-ignore comment for scriptDownloaderService.initializeConfig() call
- Added explicit JSDoc type annotations for forEach callback parameters
- Fixed 'implicitly has an any type' errors for catId and scriptName parameters
- All linter errors resolved while maintaining functionality

The categorization feature is now fully functional with clean, type-safe code.
2025-10-24 12:57:08 +02:00
Michel Roegl-Brunner
7817ce3d8e feat: Add script categorization to auto-sync notifications
- Added loadCategories() method to load category definitions from metadata.json
- Added groupScriptsByCategory() method to group scripts by their categories
- Modified scriptDownloaderService to return full script objects instead of just names
- Updated notification format to show scripts grouped by category with proper formatting
- Scripts are now displayed as:
  **Category Name:**
  • Script Name 1
  • Script Name 2

This provides much better organization in notifications, making it easier to
see what types of scripts were downloaded or updated.
2025-10-24 12:53:07 +02:00
Michel Roegl-Brunner
82b2012f50 fix: Import Buffer explicitly for ES module compatibility
- Added import { Buffer } from 'buffer' to githubJsonService.js
- Fixed 'require is not defined' error when using Buffer.from() in ES modules
- Auto-sync now works correctly through both direct execution and web API

The Buffer global is not available in ES module context, so it needs to be
explicitly imported. This fixes the sync errors that were occurring when
the auto-sync service was called through the web interface.
2025-10-24 12:48:22 +02:00
Michel Roegl-Brunner
bb4eb2964b fix: Remove CommonJS require() calls in ES module context
- Fixed 'require is not defined' error in githubJsonService.js
- Imported utimesSync from fs module instead of using require('fs').utimesSync
- Auto-sync now works without ES module errors

The JSON sync now completes successfully without any require() errors.
2025-10-24 12:46:50 +02:00
Michel Roegl-Brunner
a6a02a15fe fix: Auto-sync file detection and script downloader initialization
- Fixed statSync import in githubJsonService.js
- Added proper initialization of scriptDownloaderService before use
- Fixed local file detection - now correctly finds 411 local files instead of 0
- Auto-sync now properly shows 'Files to sync: 0, Up-to-date: 404' instead of downloading all
- Added debugging output to track file detection process

The auto-sync now correctly detects existing files and only syncs what's actually new or changed.
2025-10-24 12:43:50 +02:00
Michel Roegl-Brunner
bf5b602fd1 fix: Custom cron input and auto-sync rescheduling
- Fixed custom cron input field to be properly editable with autoFocus
- Added helpful cron examples and better validation feedback
- Fixed cron validation to work with 5-field expressions (node-cron format)
- Added auto-sync rescheduling when settings are saved via API route
- Improved user experience with better error handling and examples

The custom cron input now works properly and auto-sync will reschedule
immediately when settings are saved, including custom cron expressions.
2025-10-24 12:41:24 +02:00
Michel Roegl-Brunner
4d12a51b05 fix: Auto-sync now only downloads truly new scripts
- Fixed isScriptDownloaded logic to check ALL script files before considering a script downloaded
- Modified auto-sync to filter and only process scripts that haven't been downloaded before
- Added proper logging to show how many new scripts were found vs total scripts
- Made isScriptDownloaded method public in TypeScript version

This ensures auto-sync only downloads scripts that are actually new,
not re-downloading existing scripts or processing unchanged content.
2025-10-24 12:33:00 +02:00
Michel Roegl-Brunner
e0bea6c6e0 feat: Add comprehensive auto-sync functionality
 New Features:
- Auto-sync service with configurable intervals (15min, 30min, 1hour, 6hours, 12hours, 24hours, custom cron)
- Automatic JSON file synchronization from GitHub repositories
- Auto-download new scripts when JSON files are updated
- Auto-update existing scripts when newer versions are available
- Apprise notification service integration for sync status updates
- Comprehensive error handling and logging

🔧 Technical Implementation:
- AutoSyncService: Core scheduling and execution logic
- GitHubJsonService: Handles JSON file synchronization from GitHub
- AppriseService: Sends notifications via multiple channels (Discord, Telegram, Email, Slack, etc.)
- ScriptDownloaderService: Manages automatic script downloads and updates
- Settings API: RESTful endpoints for auto-sync configuration
- UI Integration: Settings modal with auto-sync configuration options

📋 Configuration Options:
- Enable/disable auto-sync functionality
- Flexible scheduling (predefined intervals or custom cron expressions)
- Selective script processing (new downloads, updates, or both)
- Notification settings with multiple Apprise URL support
- Environment-based configuration with .env file persistence

🎯 Benefits:
- Keeps script repository automatically synchronized
- Reduces manual maintenance overhead
- Provides real-time notifications of sync status
- Supports multiple notification channels
- Configurable to match different deployment needs

This feature significantly enhances the automation capabilities of PVE Scripts Local,
making it a truly hands-off solution for script management.
2025-10-24 12:28:44 +02:00
dependabot[bot]
2f1b738164 build(deps-dev): Bump tailwindcss from 4.1.15 to 4.1.16
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss/tree/HEAD/packages/tailwindcss) from 4.1.15 to 4.1.16.
- [Release notes](https://github.com/tailwindlabs/tailwindcss/releases)
- [Changelog](https://github.com/tailwindlabs/tailwindcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/tailwindlabs/tailwindcss/commits/v4.1.16/packages/tailwindcss)

---
updated-dependencies:
- dependency-name: tailwindcss
  dependency-version: 4.1.16
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-24 10:28:06 +00:00
Michel Roegl-Brunner
3639dd231a Merge pull request #234 from community-scripts/dependabot/npm_and_yarn/prisma-6.18.0
build(deps-dev): Bump prisma from 6.17.1 to 6.18.0
2025-10-24 12:26:46 +02:00
Michel Roegl-Brunner
86f55069e6 Merge pull request #237 from community-scripts/update/tools.func
fix: Container ID display not showing after whiptail input and update tools.func
2025-10-24 09:21:51 +02:00
Michel Roegl-Brunner
5faa7f3646 remove debian 2025-10-24 09:20:00 +02:00
Michel Roegl-Brunner
bc52256301 fix: Container ID display not showing after whiptail input
- Move echo statement outside whiptail output capture block
- Fix output redirection interference with Container ID display
- Ensure Container ID is properly displayed regardless of user input
- Consolidate duplicate echo statements into single display
2025-10-24 09:19:34 +02:00
Michel Roegl-Brunner
9e66cdd7ea Cleanup 2025-10-24 08:51:05 +02:00
dependabot[bot]
931c9cedf1 build(deps-dev): Bump prisma from 6.17.1 to 6.18.0
Bumps [prisma](https://github.com/prisma/prisma/tree/HEAD/packages/cli) from 6.17.1 to 6.18.0.
- [Release notes](https://github.com/prisma/prisma/releases)
- [Commits](https://github.com/prisma/prisma/commits/6.18.0/packages/cli)

---
updated-dependencies:
- dependency-name: prisma
  dependency-version: 6.18.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-23 19:26:58 +00:00
Michel Roegl-Brunner
83a51db265 Merge pull request #230 from community-scripts/dependabot/npm_and_yarn/eslint-config-next-16.0.0 2025-10-23 13:39:24 +02:00
Michel Roegl-Brunner
1b09d1494e Merge pull request #231 from community-scripts/dependabot/npm_and_yarn/superjson-2.2.3 2025-10-23 13:38:56 +02:00
dependabot[bot]
02fe842995 build(deps): Bump superjson from 2.2.2 to 2.2.3
Bumps [superjson](https://github.com/blitz-js/superjson) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/blitz-js/superjson/releases)
- [Commits](https://github.com/blitz-js/superjson/commits)

---
updated-dependencies:
- dependency-name: superjson
  dependency-version: 2.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-22 19:27:06 +00:00
dependabot[bot]
a464c845c2 build(deps-dev): Bump eslint-config-next from 15.5.6 to 16.0.0
Bumps [eslint-config-next](https://github.com/vercel/next.js/tree/HEAD/packages/eslint-config-next) from 15.5.6 to 16.0.0.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Changelog](https://github.com/vercel/next.js/blob/canary/release.js)
- [Commits](https://github.com/vercel/next.js/commits/v16.0.0/packages/eslint-config-next)

---
updated-dependencies:
- dependency-name: eslint-config-next
  dependency-version: 16.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-22 19:27:00 +00:00
Michel Roegl-Brunner
5a69f58770 Merge pull request #226 from community-scripts/dependabot/npm_and_yarn/types/node-24.9.1 2025-10-21 21:54:35 +02:00
dependabot[bot]
48c243f624 build(deps-dev): Bump @types/node from 24.9.0 to 24.9.1
Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 24.9.0 to 24.9.1.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 24.9.1
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-10-21 19:28:07 +00:00
github-actions[bot]
7af0717b1b chore: add VERSION v0.4.7 (#225)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-21 14:34:32 +00:00
Michel Roegl-Brunner
9977d390ac fix update.sh and env.example 2025-10-21 16:30:56 +02:00
Michel Roegl-Brunner
ea5e801718 fix update.sh and env.example 2025-10-21 15:46:58 +02:00
Michel Roegl-Brunner
7d54481f75 fix update.sh and env.example 2025-10-21 15:41:50 +02:00
Michel Roegl-Brunner
fbc6a9362e fix update.sh and env.example 2025-10-21 15:34:11 +02:00
Michel Roegl-Brunner
6b534474c4 Fix update.sh 2025-10-21 14:34:51 +02:00
Michel Roegl-Brunner
5bfbaca732 Fix update.sh 2025-10-21 14:33:24 +02:00
github-actions[bot]
a3d0141950 chore: add VERSION v0.4.6 (#220)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-10-21 11:21:33 +00:00
Michel Roegl-Brunner
529cb92e3c Fix Update 2025-10-21 13:16:14 +02:00
Michel Roegl-Brunner
b175c709f0 Fix update 2025-10-21 11:00:12 +02:00
Michel Roegl-Brunner
bf908eef66 Merge pull request #215 from community-scripts/dependabot/npm_and_yarn/npm_and_yarn-fd296dbd23 2025-10-21 07:09:55 +02:00