wasm-cli 0.15.4__tar.gz → 0.15.6__tar.gz

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 (155) hide show
  1. {wasm_cli-0.15.4/src/wasm_cli.egg-info → wasm_cli-0.15.6}/PKG-INFO +1 -1
  2. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/pyproject.toml +1 -1
  3. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/setup.py +1 -1
  4. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/__init__.py +1 -1
  5. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/site.py +68 -6
  6. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/interactive.py +24 -3
  7. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/parser.py +11 -1
  8. {wasm_cli-0.15.4 → wasm_cli-0.15.6/src/wasm_cli.egg-info}/PKG-INFO +1 -1
  9. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/LICENSE +0 -0
  10. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/MANIFEST.in +0 -0
  11. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/README.md +0 -0
  12. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/docs/MONITOR.md +0 -0
  13. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/docs/OBS_SETUP.md +0 -0
  14. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/docs/assets/logo.png +0 -0
  15. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/docs/assets/logo_bg.png +0 -0
  16. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/man/wasm.1 +0 -0
  17. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/setup.cfg +0 -0
  18. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/__main__.py +0 -0
  19. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/__init__.py +0 -0
  20. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/__init__.py +0 -0
  21. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/backup.py +0 -0
  22. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/cert.py +0 -0
  23. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/config.py +0 -0
  24. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/db.py +0 -0
  25. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/env.py +0 -0
  26. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/health.py +0 -0
  27. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/monitor.py +0 -0
  28. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/service.py +0 -0
  29. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/setup.py +0 -0
  30. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/store.py +0 -0
  31. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/version.py +0 -0
  32. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/web.py +0 -0
  33. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/cli/commands/webapp.py +0 -0
  34. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/completions/__init__.py +0 -0
  35. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/completions/_wasm +0 -0
  36. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/completions/wasm.bash +0 -0
  37. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/completions/wasm.fish +0 -0
  38. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/__init__.py +0 -0
  39. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/config.py +0 -0
  40. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/dependencies.py +0 -0
  41. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/exceptions.py +0 -0
  42. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/logger.py +0 -0
  43. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/store.py +0 -0
  44. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/update_checker.py +0 -0
  45. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/core/utils.py +0 -0
  46. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/__init__.py +0 -0
  47. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/base.py +0 -0
  48. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/docker_compose.py +0 -0
  49. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/__init__.py +0 -0
  50. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/env_manager.py +0 -0
  51. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/nginx_config.py +0 -0
  52. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/package_manager.py +0 -0
  53. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/path_resolver.py +0 -0
  54. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/prisma.py +0 -0
  55. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/turbo.py +0 -0
  56. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/helpers/workspace.py +0 -0
  57. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/monorepo.py +0 -0
  58. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/nextjs.py +0 -0
  59. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/nodejs.py +0 -0
  60. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/python.py +0 -0
  61. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/registry.py +0 -0
  62. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/static.py +0 -0
  63. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/deployers/vite.py +0 -0
  64. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/main.py +0 -0
  65. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/__init__.py +0 -0
  66. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/apache_manager.py +0 -0
  67. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/backup_manager.py +0 -0
  68. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/backup_scheduler.py +0 -0
  69. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/base_manager.py +0 -0
  70. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/cert_manager.py +0 -0
  71. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/__init__.py +0 -0
  72. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/base.py +0 -0
  73. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/mongodb.py +0 -0
  74. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/mysql.py +0 -0
  75. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/postgres.py +0 -0
  76. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/redis.py +0 -0
  77. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/database/registry.py +0 -0
  78. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/nginx_manager.py +0 -0
  79. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/service_manager.py +0 -0
  80. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/managers/source_manager.py +0 -0
  81. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/monitor/__init__.py +0 -0
  82. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/monitor/ai_analyzer.py +0 -0
  83. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/monitor/email_notifier.py +0 -0
  84. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/monitor/process_monitor.py +0 -0
  85. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/monitor/threat_store.py +0 -0
  86. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/__init__.py +0 -0
  87. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/apache/proxy.conf.j2 +0 -0
  88. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/apache/static.conf.j2 +0 -0
  89. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/nginx/advanced.conf.j2 +0 -0
  90. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/nginx/monorepo.conf.j2 +0 -0
  91. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/nginx/proxy.conf.j2 +0 -0
  92. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/nginx/static.conf.j2 +0 -0
  93. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/systemd/app.service.j2 +0 -0
  94. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/systemd/backup-service.j2 +0 -0
  95. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/systemd/backup-timer.j2 +0 -0
  96. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/templates/systemd/docker-compose.service.j2 +0 -0
  97. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/validators/__init__.py +0 -0
  98. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/validators/domain.py +0 -0
  99. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/validators/port.py +0 -0
  100. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/validators/source.py +0 -0
  101. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/validators/ssh.py +0 -0
  102. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/__init__.py +0 -0
  103. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/__init__.py +0 -0
  104. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/apps.py +0 -0
  105. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/auth.py +0 -0
  106. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/backups.py +0 -0
  107. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/certs.py +0 -0
  108. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/config.py +0 -0
  109. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/databases.py +0 -0
  110. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/jobs.py +0 -0
  111. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/monitor.py +0 -0
  112. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/router.py +0 -0
  113. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/services.py +0 -0
  114. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/sites.py +0 -0
  115. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/api/system.py +0 -0
  116. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/auth.py +0 -0
  117. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/jobs.py +0 -0
  118. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/server.py +0 -0
  119. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/css/main.css +0 -0
  120. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/index.html +0 -0
  121. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/components/cards.js +0 -0
  122. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/components/jobs.js +0 -0
  123. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/components/metrics.js +0 -0
  124. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/components/skeleton.js +0 -0
  125. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/api.js +0 -0
  126. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/dialogs.js +0 -0
  127. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/notifications.js +0 -0
  128. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/router.js +0 -0
  129. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/search.js +0 -0
  130. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/shortcuts.js +0 -0
  131. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/theme.js +0 -0
  132. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/ui.js +0 -0
  133. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/core/websocket.js +0 -0
  134. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/main.js +0 -0
  135. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/apps.js +0 -0
  136. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/backups.js +0 -0
  137. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/certs.js +0 -0
  138. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/config.js +0 -0
  139. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/dashboard.js +0 -0
  140. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/databases.js +0 -0
  141. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/jobs.js +0 -0
  142. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/logs.js +0 -0
  143. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/monitor.js +0 -0
  144. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/services.js +0 -0
  145. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/js/pages/sites.js +0 -0
  146. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/login.html +0 -0
  147. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/logo.png +0 -0
  148. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/static/logo.webp +0 -0
  149. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/websockets/__init__.py +0 -0
  150. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm/web/websockets/router.py +0 -0
  151. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm_cli.egg-info/SOURCES.txt +0 -0
  152. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm_cli.egg-info/dependency_links.txt +0 -0
  153. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm_cli.egg-info/entry_points.txt +0 -0
  154. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm_cli.egg-info/requires.txt +0 -0
  155. {wasm_cli-0.15.4 → wasm_cli-0.15.6}/src/wasm_cli.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wasm-cli
3
- Version: 0.15.4
3
+ Version: 0.15.6
4
4
  Summary: Web App System Management - Deploy and manage web applications on Linux servers
5
5
  Author: Yago López Prado
6
6
  Author-email: Yago López Prado <yago.lopez.adeje@gmail.com>
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "wasm-cli"
7
- version = "0.15.4"
7
+ version = "0.15.6"
8
8
  description = "Web App System Management - Deploy and manage web applications on Linux servers"
9
9
  readme = "README.md"
10
10
  license = { text = "WASM-NCSAL" }
@@ -9,7 +9,7 @@ from setuptools import setup, find_packages
9
9
 
10
10
  setup(
11
11
  name="wasm-cli",
12
- version="0.15.4",
12
+ version="0.15.6",
13
13
  description="Web App System Management - Deploy and manage web applications on Linux servers",
14
14
  author="Yago López Prado",
15
15
  author_email="yago.lopez.adeje@gmail.com",
@@ -8,7 +8,7 @@ WASM - Web App System Management
8
8
  A robust CLI tool for deploying and managing web applications on Linux servers.
9
9
  """
10
10
 
11
- __version__ = "0.15.4"
11
+ __version__ = "0.15.6"
12
12
  __author__ = "Yago López Prado"
13
13
  __license__ = "WASM-NCSAL"
14
14
 
@@ -67,21 +67,83 @@ def _get_manager(webserver: str, verbose: bool = False):
67
67
  def _handle_create(args: Namespace) -> int:
68
68
  """Handle site create command."""
69
69
  logger = Logger(verbose=args.verbose)
70
-
70
+
71
+ from wasm.validators.domain import should_include_www
72
+ from wasm.managers.cert_manager import CertManager
73
+
71
74
  domain = validate_domain(args.domain)
72
75
  manager = _get_manager(args.webserver, verbose=args.verbose)
73
-
76
+ no_ssl = getattr(args, "no_ssl", False)
77
+ include_www = getattr(args, "www", False) and should_include_www(domain)
78
+
79
+ server_names = domain
80
+ if include_www:
81
+ server_names = f"{domain} www.{domain}"
82
+ logger.info(f"Including www.{domain}")
83
+
84
+ # Step 1: Create site without SSL (needed for certbot webroot validation)
74
85
  context = {
75
86
  "port": args.port,
76
- "ssl": False, # SSL will be handled separately
87
+ "ssl": False,
88
+ "server_names": server_names,
77
89
  }
78
-
90
+
79
91
  logger.info(f"Creating site: {domain}")
80
92
  manager.create_site(domain, template=args.template, context=context)
81
93
  manager.enable_site(domain)
82
94
  manager.reload()
83
-
84
- logger.success(f"Site created and enabled: {domain}")
95
+
96
+ # Step 2: Obtain SSL certificate if requested
97
+ ssl_obtained = False
98
+ if not no_ssl:
99
+ cert_manager = CertManager(verbose=args.verbose)
100
+ if cert_manager.is_installed():
101
+ # Check if a valid certificate already exists
102
+ if cert_manager.cert_exists(domain):
103
+ test = cert_manager.test_cert(domain)
104
+ if test.get("valid"):
105
+ logger.info(f"Valid SSL certificate found for {domain}")
106
+ ssl_obtained = True
107
+ else:
108
+ logger.warning(f"Existing certificate invalid, obtaining new one...")
109
+
110
+ if not ssl_obtained:
111
+ logger.info(f"Obtaining SSL certificate for {domain}...")
112
+ try:
113
+ additional_domains = None
114
+ if include_www:
115
+ additional_domains = [f"www.{domain}"]
116
+
117
+ nginx = args.webserver == "nginx"
118
+ apache = args.webserver == "apache"
119
+
120
+ cert_manager.obtain(
121
+ domain,
122
+ nginx=nginx,
123
+ apache=apache,
124
+ additional_domains=additional_domains,
125
+ )
126
+ ssl_obtained = True
127
+ except WASMError as e:
128
+ logger.warning(f"SSL certificate failed: {e}")
129
+ logger.info("Site created without SSL. You can add it later with: wasm cert create")
130
+ else:
131
+ logger.warning("Certbot not installed, skipping SSL")
132
+ logger.info("Install with: sudo apt install certbot")
133
+
134
+ # Step 3: Recreate site config with SSL if certificate was obtained
135
+ if ssl_obtained:
136
+ cert_paths = cert_manager.get_cert_path(domain)
137
+ context["ssl"] = True
138
+ context["ssl_certificate"] = str(cert_paths["fullchain"])
139
+ context["ssl_certificate_key"] = str(cert_paths["privkey"])
140
+
141
+ manager.create_site(domain, template=args.template, context=context)
142
+ manager.reload()
143
+ logger.success(f"Site created with SSL: {domain}")
144
+ else:
145
+ logger.success(f"Site created: {domain}")
146
+
85
147
  return 0
86
148
 
87
149
 
@@ -365,12 +365,31 @@ class InteractiveMode:
365
365
  default="3000",
366
366
  validate=lambda _, x: check_port(x) or "Invalid port",
367
367
  ),
368
+ inquirer.Confirm(
369
+ "ssl",
370
+ message="Configure SSL certificate?",
371
+ default=True,
372
+ ),
368
373
  ]
369
-
374
+
370
375
  answers = inquirer.prompt(questions, theme=GreenPassion())
371
376
  if not answers:
372
377
  return 0
373
-
378
+
379
+ # Ask about www if SSL enabled and domain is a base domain
380
+ from wasm.validators.domain import should_include_www
381
+ include_www = False
382
+ if answers["ssl"] and should_include_www(answers["domain"]):
383
+ www_questions = [
384
+ inquirer.Confirm(
385
+ "include_www",
386
+ message=f"Include www.{answers['domain']} in certificate and web server config?",
387
+ default=True,
388
+ ),
389
+ ]
390
+ www_answers = inquirer.prompt(www_questions, theme=GreenPassion())
391
+ include_www = www_answers.get("include_www", True) if www_answers else False
392
+
374
393
  from argparse import Namespace
375
394
  args = Namespace(
376
395
  verbose=self.verbose,
@@ -379,8 +398,10 @@ class InteractiveMode:
379
398
  webserver=answers["webserver"],
380
399
  template=answers["template"],
381
400
  port=int(answers["port"]),
401
+ no_ssl=not answers["ssl"],
402
+ www=include_www,
382
403
  )
383
-
404
+
384
405
  from wasm.cli.commands.site import handle_site
385
406
  return handle_site(args)
386
407
 
@@ -410,7 +410,17 @@ def _add_site_parser(subparsers) -> None:
410
410
  default=3000,
411
411
  help="Backend port for proxy",
412
412
  )
413
-
413
+ create.add_argument(
414
+ "--no-ssl",
415
+ action="store_true",
416
+ help="Skip SSL certificate configuration",
417
+ )
418
+ create.add_argument(
419
+ "--www",
420
+ action="store_true",
421
+ help="Include www subdomain in SSL certificate and web server config",
422
+ )
423
+
414
424
  # site list
415
425
  list_cmd = site_sub.add_parser(
416
426
  "list",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wasm-cli
3
- Version: 0.15.4
3
+ Version: 0.15.6
4
4
  Summary: Web App System Management - Deploy and manage web applications on Linux servers
5
5
  Author: Yago López Prado
6
6
  Author-email: Yago López Prado <yago.lopez.adeje@gmail.com>
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes