Repository navigation
Add Windows support to database plugin - #1
Merged
Merged
Conversation
…idge) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Xq7cCtgmRF34jJo3GAqfC
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds full Windows support to the Ervisio Database Plugin, enabling database management on Windows alongside the existing Linux support. The plugin now detects and manages native Windows services, discovers SQLite files in user profiles, and supports installation via
winget.Key Changes
Backend (db-bridge.py)
IS_WINDOWSflag and conditional logic throughout to handle Windows-specific operationswindows_database_services()function queries Windows service manager via PowerShell for MariaDB, MySQL, and PostgreSQL servicesaction_manage_instance()now supportsnet.execommands (start/stop/restart) for Windows native servicesfind_sqlite_windows()function recursively searches user profile and%ProgramData%for SQLite files (with depth and count limits to avoid noise)action_install_winget()function installs databases viawingeton Windows;action_install_apt()delegates to it when on Windowsprivileged()helper function addssudoonly on Linux when not root; Windows uses manifest-based elevationtail_file()function replaces externaltailcommand (unavailable on Windows)action_create_sqlite()now expands~in pathsread_payload_file()searches Windows user directories instead of/home/*encoding="utf-8"anderrors="replace"to allsubprocess.run()calls; Windows subprocess creation usesCREATE_NO_WINDOWflagFrontend (React/TypeScript)
InstancesView.tsxto useinst.servicefield for native Windows serviceswingetIDs (e.g.,MariaDB.Server,Oracle.MySQL)C:\ProgramData\Ervisio\data\database.sqliteon Windowswingeton Windows onlyManifest & Configuration
platforms: ["linux", "windows"]to manifestminCore: 0.6.2(required for Windows support)db-bridgecommand entry usingpython.exewith Windows pathdocker-usersgroup for Windows (allows non-admin Docker operations)CI/CD
bridge-windowsjob onwindows-2022runner that:detect,create-sqlite, andqueryactionsDocumentation
docker.exe,winget), service detection/control, and required Python packagesNotable Implementation Details
sudoortailcommands, improving portabilitySERVICE_REregex before useprivileged()function checksos.geteuid()only when available (Unix systems)https://claude.ai/code/session_016Xq7cCtgmRF34jJo3GAqfC