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.
Files changed (79) hide show
  1. ndev/__init__.py +8 -0
  2. ndev/__main__.py +4 -0
  3. ndev/cli.py +24 -0
  4. ndev/common/__init__.py +3 -0
  5. ndev/common/config.py +114 -0
  6. ndev/common/constants.py +51 -0
  7. ndev/common/github.py +13 -0
  8. ndev/common/logger.py +11 -0
  9. ndev/common/manifest.py +41 -0
  10. ndev/common/utils.py +96 -0
  11. ndev/linux/__init__.py +1 -0
  12. ndev/linux/chroot/manager.py +63 -0
  13. ndev/linux/chroot/packages.py +91 -0
  14. ndev/linux/chroot/shell.py +9 -0
  15. ndev/linux/cli.py +235 -0
  16. ndev/linux/commands/available.py +38 -0
  17. ndev/linux/commands/clean.py +25 -0
  18. ndev/linux/commands/ctl.py +192 -0
  19. ndev/linux/commands/current.py +11 -0
  20. ndev/linux/commands/db.py +319 -0
  21. ndev/linux/commands/doctor.py +56 -0
  22. ndev/linux/commands/grok.py +75 -0
  23. ndev/linux/commands/install.py +39 -0
  24. ndev/linux/commands/list.py +47 -0
  25. ndev/linux/commands/logs.py +36 -0
  26. ndev/linux/commands/mailpit.py +82 -0
  27. ndev/linux/commands/reload.py +26 -0
  28. ndev/linux/commands/restart.py +34 -0
  29. ndev/linux/commands/setup.py +113 -0
  30. ndev/linux/commands/start.py +34 -0
  31. ndev/linux/commands/status.py +81 -0
  32. ndev/linux/commands/stop.py +34 -0
  33. ndev/linux/commands/uninstall.py +69 -0
  34. ndev/linux/commands/update.py +57 -0
  35. ndev/linux/commands/upgrade.py +81 -0
  36. ndev/linux/commands/use.py +108 -0
  37. ndev/linux/commands/vhost.py +350 -0
  38. ndev/linux/php/builder.py +183 -0
  39. ndev/linux/php/downloader.py +58 -0
  40. ndev/linux/php/extensions.py +146 -0
  41. ndev/linux/php/installer.py +42 -0
  42. ndev/linux/php/resolver.py +59 -0
  43. ndev/linux/php/templates.py +128 -0
  44. ndev/linux/runtime/fpm.py +117 -0
  45. ndev/linux/runtime/mailpit.py +244 -0
  46. ndev/linux/runtime/pma.py +223 -0
  47. ndev/linux/runtime/process.py +37 -0
  48. ndev/linux/runtime/sockets.py +16 -0
  49. ndev/linux/runtime/upgrade.py +431 -0
  50. ndev/linux/tui.py +1423 -0
  51. ndev/main.py +52 -0
  52. ndev/tui.py +23 -0
  53. ndev/win/__init__.py +1 -0
  54. ndev/win/cli.py +1898 -0
  55. ndev/win/commands/__init__.py +0 -0
  56. ndev/win/core/__init__.py +0 -0
  57. ndev/win/core/db.py +265 -0
  58. ndev/win/core/elevate.py +94 -0
  59. ndev/win/core/ext.py +241 -0
  60. ndev/win/core/fcgi.py +216 -0
  61. ndev/win/core/grok.py +55 -0
  62. ndev/win/core/logs.py +66 -0
  63. ndev/win/core/mailpit.py +236 -0
  64. ndev/win/core/mkcert.py +65 -0
  65. ndev/win/core/paths.py +85 -0
  66. ndev/win/core/php.py +533 -0
  67. ndev/win/core/pma.py +190 -0
  68. ndev/win/core/services.py +349 -0
  69. ndev/win/core/setup.py +361 -0
  70. ndev/win/core/upgrade.py +513 -0
  71. ndev/win/core/vhost.py +289 -0
  72. ndev/win/templates/vhost.conf.tmpl +33 -0
  73. ndev/win/templates/vhost_ssl.conf.tmpl +43 -0
  74. ndev/win/tui.py +1313 -0
  75. ndev_stack-0.1.0.dist-info/METADATA +553 -0
  76. ndev_stack-0.1.0.dist-info/RECORD +79 -0
  77. ndev_stack-0.1.0.dist-info/WHEEL +5 -0
  78. ndev_stack-0.1.0.dist-info/entry_points.txt +4 -0
  79. 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."""