xenfra 0.1.1__py3-none-any.whl → 0.1.3__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.
xenfra/cli.py CHANGED
@@ -2,6 +2,7 @@ from rich.console import Console
2
2
  from rich.table import Table
3
3
  from rich.prompt import Prompt, Confirm, IntPrompt
4
4
  from rich.panel import Panel
5
+ import importlib.metadata
5
6
 
6
7
  # Import Custom Logic
7
8
  from xenfra.engine import InfraEngine
@@ -22,10 +23,16 @@ IMAGES = {
22
23
  }
23
24
 
24
25
  def print_header(email):
26
+ try:
27
+ # Get the version of the installed 'xenfra' package
28
+ version = importlib.metadata.version("xenfra")
29
+ except importlib.metadata.PackageNotFoundError:
30
+ version = "dev" # Fallback for local development
31
+
25
32
  console.clear()
26
33
  grid = Table.grid(expand=True)
27
34
  grid.add_column(justify="center", ratio=1)
28
- grid.add_row("[bold cyan]🧘 XENFRA[/bold cyan] [dim]v0.1.0[/dim]")
35
+ grid.add_row(f"[bold cyan]🧘 XENFRA[/bold cyan] [dim]v{version}[/dim]")
29
36
  grid.add_row("[italic]Infrastructure in Zen Mode[/italic]")
30
37
  console.print(Panel(
31
38
  grid,
xenfra/dockerizer.py CHANGED
@@ -57,10 +57,11 @@ def generate_deployment_assets(context):
57
57
  # --- 1. DOCKERFILE ---
58
58
  if not os.path.exists("Dockerfile"):
59
59
  # Use UV if detected, otherwise Pip
60
- install_cmd = "RUN pip install --no-cache-dir -r requirements.txt"
61
60
  if context.get("type") == "uv":
62
- # Assuming uv.lock or pyproject.toml is copied
63
- install_cmd = "RUN pip install uv && uv pip install --system -r requirements.txt"
61
+ install_cmd = "RUN pip install uv && uv pip install --system ."
62
+ else:
63
+ # Modern pip can install from pyproject.toml directly
64
+ install_cmd = "RUN pip install ."
64
65
 
65
66
  dockerfile_content = f"""# Generated by Xenfra
66
67
  FROM python:3.11-slim
xenfra/engine.py CHANGED
@@ -247,7 +247,7 @@ class InfraEngine:
247
247
  if is_dockerized:
248
248
  log("🚀 Starting application with Docker Compose...")
249
249
  c = self._get_connection(droplet.ip_address)
250
- c.run("cd /root/app && docker-compose up -d", hide=True)
250
+ c.run("cd /root/app && docker compose up -d", hide=True)
251
251
 
252
252
  log("🎉 Deployment successful!")
253
253
  return {"status": "success", "ip": droplet.ip_address, "name": name}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: xenfra
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: A 'Zen Mode' infrastructure engine for Python developers.
5
5
  Author: xenfra-cloud
6
6
  Author-email: xenfra-cloud <xenfracloud@gmail.com>
@@ -0,0 +1,10 @@
1
+ xenfra/__init__.py,sha256=ja0-Vc9T61EXZnPeX84Fi-UOjoGAWu5r90_1t-0WjVw,46
2
+ xenfra/cli.py,sha256=3c6EFZuiq2ede3S5WKskrFgup769ECXYMLEMWfeaLo8,6105
3
+ xenfra/dockerizer.py,sha256=3lbzEwYABDZydASs0pDWfm18o2OBgWVpH3GmId6YLSA,4026
4
+ xenfra/engine.py,sha256=wIlVC9krILGY2xmp5CFBPyNsI2ugy1e4cR9YruYLNzI,10636
5
+ xenfra/recipes.py,sha256=rf6dqrbc9P-LPMDQMt2iL100kVMhbWJRgfGYKJ5gqBQ,3780
6
+ xenfra/utils.py,sha256=aGXjJm-pwVCHuCn5UBdrxRcYvM8aJwHQ1kihl7gcxiM,2387
7
+ xenfra-0.1.3.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
8
+ xenfra-0.1.3.dist-info/entry_points.txt,sha256=pLGDlV0SH2hWunZJcEY7UkLLleMExFBaxgxRKYhU9mw,44
9
+ xenfra-0.1.3.dist-info/METADATA,sha256=pZocqRSBWR9Jg5H2-6jSu40t35H2guHZXDfZ11y8LcE,4222
10
+ xenfra-0.1.3.dist-info/RECORD,,
@@ -1,10 +0,0 @@
1
- xenfra/__init__.py,sha256=ja0-Vc9T61EXZnPeX84Fi-UOjoGAWu5r90_1t-0WjVw,46
2
- xenfra/cli.py,sha256=EXhzv5Zd5zNuON-X2mp00SE956_x0stzNUAN4X0tg7w,5840
3
- xenfra/dockerizer.py,sha256=BmL13mYuja9Yst2YQlbxjYO5ZQ125L7LyfG_7pvGn-s,4052
4
- xenfra/engine.py,sha256=A7Ov7_ub-24kfLjkuFZdwzu-AgIbTUpPCvx0t35d_e4,10636
5
- xenfra/recipes.py,sha256=rf6dqrbc9P-LPMDQMt2iL100kVMhbWJRgfGYKJ5gqBQ,3780
6
- xenfra/utils.py,sha256=aGXjJm-pwVCHuCn5UBdrxRcYvM8aJwHQ1kihl7gcxiM,2387
7
- xenfra-0.1.1.dist-info/WHEEL,sha256=ZyFSCYkV2BrxH6-HRVRg3R9Fo7MALzer9KiPYqNxSbo,79
8
- xenfra-0.1.1.dist-info/entry_points.txt,sha256=pLGDlV0SH2hWunZJcEY7UkLLleMExFBaxgxRKYhU9mw,44
9
- xenfra-0.1.1.dist-info/METADATA,sha256=TWb1BjRwqIFZLD8jprpamgIm180A-aIIvG_GbuRPx84,4222
10
- xenfra-0.1.1.dist-info/RECORD,,
File without changes