ndev-stack 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ndev/__init__.py +8 -0
- ndev/__main__.py +4 -0
- ndev/cli.py +24 -0
- ndev/common/__init__.py +3 -0
- ndev/common/config.py +114 -0
- ndev/common/constants.py +51 -0
- ndev/common/github.py +13 -0
- ndev/common/logger.py +11 -0
- ndev/common/manifest.py +41 -0
- ndev/common/utils.py +96 -0
- ndev/linux/__init__.py +1 -0
- ndev/linux/chroot/manager.py +63 -0
- ndev/linux/chroot/packages.py +91 -0
- ndev/linux/chroot/shell.py +9 -0
- ndev/linux/cli.py +235 -0
- ndev/linux/commands/available.py +38 -0
- ndev/linux/commands/clean.py +25 -0
- ndev/linux/commands/ctl.py +192 -0
- ndev/linux/commands/current.py +11 -0
- ndev/linux/commands/db.py +319 -0
- ndev/linux/commands/doctor.py +56 -0
- ndev/linux/commands/grok.py +75 -0
- ndev/linux/commands/install.py +39 -0
- ndev/linux/commands/list.py +47 -0
- ndev/linux/commands/logs.py +36 -0
- ndev/linux/commands/mailpit.py +82 -0
- ndev/linux/commands/reload.py +26 -0
- ndev/linux/commands/restart.py +34 -0
- ndev/linux/commands/setup.py +113 -0
- ndev/linux/commands/start.py +34 -0
- ndev/linux/commands/status.py +81 -0
- ndev/linux/commands/stop.py +34 -0
- ndev/linux/commands/uninstall.py +69 -0
- ndev/linux/commands/update.py +57 -0
- ndev/linux/commands/upgrade.py +81 -0
- ndev/linux/commands/use.py +108 -0
- ndev/linux/commands/vhost.py +350 -0
- ndev/linux/php/builder.py +183 -0
- ndev/linux/php/downloader.py +58 -0
- ndev/linux/php/extensions.py +146 -0
- ndev/linux/php/installer.py +42 -0
- ndev/linux/php/resolver.py +59 -0
- ndev/linux/php/templates.py +128 -0
- ndev/linux/runtime/fpm.py +117 -0
- ndev/linux/runtime/mailpit.py +244 -0
- ndev/linux/runtime/pma.py +223 -0
- ndev/linux/runtime/process.py +37 -0
- ndev/linux/runtime/sockets.py +16 -0
- ndev/linux/runtime/upgrade.py +431 -0
- ndev/linux/tui.py +1423 -0
- ndev/main.py +52 -0
- ndev/tui.py +23 -0
- ndev/win/__init__.py +1 -0
- ndev/win/cli.py +1898 -0
- ndev/win/commands/__init__.py +0 -0
- ndev/win/core/__init__.py +0 -0
- ndev/win/core/db.py +265 -0
- ndev/win/core/elevate.py +94 -0
- ndev/win/core/ext.py +241 -0
- ndev/win/core/fcgi.py +216 -0
- ndev/win/core/grok.py +55 -0
- ndev/win/core/logs.py +66 -0
- ndev/win/core/mailpit.py +236 -0
- ndev/win/core/mkcert.py +65 -0
- ndev/win/core/paths.py +85 -0
- ndev/win/core/php.py +533 -0
- ndev/win/core/pma.py +190 -0
- ndev/win/core/services.py +349 -0
- ndev/win/core/setup.py +361 -0
- ndev/win/core/upgrade.py +513 -0
- ndev/win/core/vhost.py +289 -0
- ndev/win/templates/vhost.conf.tmpl +33 -0
- ndev/win/templates/vhost_ssl.conf.tmpl +43 -0
- ndev/win/tui.py +1313 -0
- ndev_stack-0.1.0.dist-info/METADATA +553 -0
- ndev_stack-0.1.0.dist-info/RECORD +79 -0
- ndev_stack-0.1.0.dist-info/WHEEL +5 -0
- ndev_stack-0.1.0.dist-info/entry_points.txt +4 -0
- ndev_stack-0.1.0.dist-info/top_level.txt +1 -0
ndev/main.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""
|
|
2
|
+
ndev Main Entrypoint
|
|
3
|
+
====================
|
|
4
|
+
Detects the host operating system (Windows vs Linux/POSIX)
|
|
5
|
+
and dispatches execution to the appropriate platform subsystem:
|
|
6
|
+
|
|
7
|
+
ndev
|
|
8
|
+
├── ndev.common (shared constants, logger, config, utils)
|
|
9
|
+
├── ndev.win (Windows core runtime, CLI, TUI)
|
|
10
|
+
└── ndev.linux (Linux runtime, PHP-FPM, chroot, CLI, TUI)
|
|
11
|
+
"""
|
|
12
|
+
from __future__ import annotations
|
|
13
|
+
|
|
14
|
+
import platform
|
|
15
|
+
import sys
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def is_windows() -> bool:
|
|
19
|
+
"""Return True if running on Windows."""
|
|
20
|
+
return sys.platform == "win32" or platform.system() == "Windows"
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def main() -> None:
|
|
24
|
+
"""Unified CLI entrypoint for ndev."""
|
|
25
|
+
# Ensure UTF-8 output on Windows consoles
|
|
26
|
+
if is_windows() and hasattr(sys.stdout, "reconfigure"):
|
|
27
|
+
try:
|
|
28
|
+
sys.stdout.reconfigure(encoding="utf-8", errors="replace")
|
|
29
|
+
sys.stderr.reconfigure(encoding="utf-8", errors="replace")
|
|
30
|
+
except Exception:
|
|
31
|
+
pass
|
|
32
|
+
|
|
33
|
+
try:
|
|
34
|
+
if is_windows():
|
|
35
|
+
from ndev.win.cli import main as win_main
|
|
36
|
+
win_main()
|
|
37
|
+
else:
|
|
38
|
+
from ndev.linux.cli import app as linux_app
|
|
39
|
+
linux_app()
|
|
40
|
+
except KeyboardInterrupt:
|
|
41
|
+
sys.exit(130)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# Dynamic application alias
|
|
45
|
+
if is_windows():
|
|
46
|
+
from ndev.win.cli import main as app
|
|
47
|
+
else:
|
|
48
|
+
from ndev.linux.cli import app
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
if __name__ == "__main__":
|
|
52
|
+
main()
|
ndev/tui.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Cross-platform Textual TUI dashboard entrypoint for ndev.
|
|
3
|
+
Auto-detects host operating system and launches the corresponding TUI implementation.
|
|
4
|
+
"""
|
|
5
|
+
from __future__ import annotations
|
|
6
|
+
|
|
7
|
+
import platform
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def run_dashboard() -> None:
|
|
11
|
+
"""Launch the interactive Textual TUI stack monitor for the current OS."""
|
|
12
|
+
if platform.system() == "Windows":
|
|
13
|
+
from ndev.win.tui import NdevDashboard
|
|
14
|
+
app = NdevDashboard()
|
|
15
|
+
app.run()
|
|
16
|
+
else:
|
|
17
|
+
from ndev.linux.tui import NdevDashboard
|
|
18
|
+
app = NdevDashboard()
|
|
19
|
+
app.run()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
if __name__ == "__main__":
|
|
23
|
+
run_dashboard()
|
ndev/win/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Windows runtime engine and CLI for ndev."""
|