xenfra 0.4.1__tar.gz → 0.4.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: xenfra
3
- Version: 0.4.1
3
+ Version: 0.4.2
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>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "xenfra"
3
- version = "0.4.1"
3
+ version = "0.4.2"
4
4
  description = "A 'Zen Mode' infrastructure engine for Python developers."
5
5
  readme = "README.md"
6
6
  authors = [
@@ -65,7 +65,7 @@ def show_patch_preview(patch_data: dict):
65
65
  console.print()
66
66
 
67
67
 
68
- def _stream_deployment(client: XenfraClient, project_name: str, git_repo: str, branch: str, framework: str, region: str, size_slug: str, is_dockerized: bool = True):
68
+ def _stream_deployment(client: XenfraClient, project_name: str, git_repo: str, branch: str, framework: str, region: str, size_slug: str, is_dockerized: bool = True, port: int = None, command: str = None, database: str = None):
69
69
  """
70
70
  Creates deployment with real-time SSE streaming (no polling needed).
71
71
 
@@ -91,6 +91,9 @@ def _stream_deployment(client: XenfraClient, project_name: str, git_repo: str, b
91
91
  region=region,
92
92
  size_slug=size_slug,
93
93
  is_dockerized=is_dockerized,
94
+ port=port,
95
+ command=command,
96
+ database=database,
94
97
  ):
95
98
  event_type = event.get("event", "message")
96
99
  data = event.get("data", "")
@@ -375,6 +378,12 @@ def deploy(project_name, git_repo, branch, framework, region, size, no_heal):
375
378
  else:
376
379
  size = "s-1vcpu-1gb"
377
380
 
381
+ # Extract port, command, database from config
382
+ port = config.get("port", 8000)
383
+ command = config.get("command") # Auto-detected if not provided
384
+ database_config = config.get("database", {})
385
+ database = database_config.get("type") if isinstance(database_config, dict) else None
386
+
378
387
  # Default project name to current directory
379
388
  if not project_name:
380
389
  project_name = os.path.basename(os.getcwd())
@@ -467,6 +476,9 @@ def deploy(project_name, git_repo, branch, framework, region, size, no_heal):
467
476
  region=region,
468
477
  size_slug=size,
469
478
  is_dockerized=is_dockerized,
479
+ port=port,
480
+ command=command,
481
+ database=database,
470
482
  )
471
483
 
472
484
  if status_result == "FAILED" and not no_heal:
@@ -215,7 +215,7 @@ def init(manual, accept_all):
215
215
  confirmed = Confirm.ask("\nCreate xenfra.yaml with this configuration?", default=True)
216
216
 
217
217
  if confirmed:
218
- generate_xenfra_yaml(analysis)
218
+ generate_xenfra_yaml(analysis, package_manager_override=selected_package_manager, dependency_file_override=selected_dependency_file)
219
219
  console.print("[bold green]xenfra.yaml created successfully![/bold green]")
220
220
  console.print("[dim]Run 'xenfra deploy' to deploy your project.[/dim]")
221
221
  else:
@@ -46,13 +46,15 @@ def read_xenfra_yaml(filename: str = "xenfra.yaml") -> dict:
46
46
  raise IOError(f"Failed to read {filename}: {e}")
47
47
 
48
48
 
49
- def generate_xenfra_yaml(analysis: CodebaseAnalysisResponse, filename: str = "xenfra.yaml") -> str:
49
+ def generate_xenfra_yaml(analysis: CodebaseAnalysisResponse, filename: str = "xenfra.yaml", package_manager_override: str = None, dependency_file_override: str = None) -> str:
50
50
  """
51
51
  Generate xenfra.yaml from AI codebase analysis.
52
52
 
53
53
  Args:
54
54
  analysis: CodebaseAnalysisResponse from Intelligence Service
55
55
  filename: Output filename (default: xenfra.yaml)
56
+ package_manager_override: Optional override for package manager (user selection)
57
+ dependency_file_override: Optional override for dependency file (user selection)
56
58
 
57
59
  Returns:
58
60
  Path to the generated file
@@ -96,11 +98,14 @@ def generate_xenfra_yaml(analysis: CodebaseAnalysisResponse, filename: str = "xe
96
98
  config["resources"]["cpu"] = 4
97
99
  config["resources"]["ram"] = "8GB"
98
100
 
99
- # Add package manager info (for intelligent diagnosis)
100
- if analysis.package_manager:
101
- config["package_manager"] = analysis.package_manager
102
- if analysis.dependency_file:
103
- config["dependency_file"] = analysis.dependency_file
101
+ # Add package manager info (use override if provided, otherwise use analysis)
102
+ package_manager = package_manager_override or analysis.package_manager
103
+ dependency_file = dependency_file_override or analysis.dependency_file
104
+
105
+ if package_manager:
106
+ config["package_manager"] = package_manager
107
+ if dependency_file:
108
+ config["dependency_file"] = dependency_file
104
109
 
105
110
  # Write to file
106
111
  with open(filename, "w") as f:
File without changes
File without changes
File without changes
File without changes