xenfra 0.4.1__py3-none-any.whl → 0.4.2__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/commands/deployments.py +13 -1
- xenfra/commands/intelligence.py +1 -1
- xenfra/utils/config.py +11 -6
- {xenfra-0.4.1.dist-info → xenfra-0.4.2.dist-info}/METADATA +1 -1
- {xenfra-0.4.1.dist-info → xenfra-0.4.2.dist-info}/RECORD +7 -7
- {xenfra-0.4.1.dist-info → xenfra-0.4.2.dist-info}/WHEEL +1 -1
- {xenfra-0.4.1.dist-info → xenfra-0.4.2.dist-info}/entry_points.txt +0 -0
xenfra/commands/deployments.py
CHANGED
|
@@ -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:
|
xenfra/commands/intelligence.py
CHANGED
|
@@ -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:
|
xenfra/utils/config.py
CHANGED
|
@@ -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 (
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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:
|
|
@@ -2,19 +2,19 @@ xenfra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
2
2
|
xenfra/commands/__init__.py,sha256=kTTwVnTvoxikyPUhQiyTAbnw4PYafktuE1----TqQoA,43
|
|
3
3
|
xenfra/commands/auth.py,sha256=ecReVCGl7Ys2d77mv_e4mCbs4ug6FLIb3S9dl2FUhr4,4178
|
|
4
4
|
xenfra/commands/auth_device.py,sha256=caD2UdveEZtAFjgjmnA-l5bjbbPONFjXJXgeJN7mhbk,6710
|
|
5
|
-
xenfra/commands/deployments.py,sha256=
|
|
6
|
-
xenfra/commands/intelligence.py,sha256=
|
|
5
|
+
xenfra/commands/deployments.py,sha256=tnsEu98hC6KSt5dNM9ogscCDHSgzPI4F0K5fTvoi4iI,40060
|
|
6
|
+
xenfra/commands/intelligence.py,sha256=95R12QnRq_uz42iUQ_4xKqIvN3nw2SAKd1H4AdLS6OI,17598
|
|
7
7
|
xenfra/commands/projects.py,sha256=SAxF_pOr95K6uz35U-zENptKndKxJNZn6bcD45PHcpI,6696
|
|
8
8
|
xenfra/commands/security_cmd.py,sha256=EI5sjX2lcMxgMH-LCFmPVkc9YqadOrcoSgTiKknkVRY,7327
|
|
9
9
|
xenfra/main.py,sha256=2EPPuIdxjhW-I-e-Mc0i2ayeLaSJdmzddNThkXq7B7c,2033
|
|
10
10
|
xenfra/utils/__init__.py,sha256=4ZRYkrb--vzoXjBHG8zRxz2jCXNGtAoKNtkyu2WRI2A,45
|
|
11
11
|
xenfra/utils/auth.py,sha256=9JbFnv0-rdlJF-4hKD2uWd9h9ehqC1iIHee1O5e-3RM,13769
|
|
12
12
|
xenfra/utils/codebase.py,sha256=GMrqhOJWX8q5ZXSLI9P3hJZBpufXMQA3Z4fKh2XSTNo,5949
|
|
13
|
-
xenfra/utils/config.py,sha256=
|
|
13
|
+
xenfra/utils/config.py,sha256=Wcr1l7-0I46qGBPrgoG8SlvBKUEplksM8AaP6sTyT5I,15187
|
|
14
14
|
xenfra/utils/errors.py,sha256=6G91YzzDDNkKHANTgfAMiOiMElEyi57wo6-FzRa4VuQ,4211
|
|
15
15
|
xenfra/utils/security.py,sha256=EA8CIPLt8Y-QP5uZ7c5NuC6ZLRV1aZS8NapS9ix_vok,11479
|
|
16
16
|
xenfra/utils/validation.py,sha256=cvuL_AEFJ2oCoP0abCqoOIABOwz79Gkf-jh_dcFIQlM,6912
|
|
17
|
-
xenfra-0.4.
|
|
18
|
-
xenfra-0.4.
|
|
19
|
-
xenfra-0.4.
|
|
20
|
-
xenfra-0.4.
|
|
17
|
+
xenfra-0.4.2.dist-info/WHEEL,sha256=eycQt0QpYmJMLKpE3X9iDk8R04v2ZF0x82ogq-zP6bQ,79
|
|
18
|
+
xenfra-0.4.2.dist-info/entry_points.txt,sha256=a_2cGhYK__X6eW05Ba8uB6RIM_61c2sHtXsPY8N0mic,45
|
|
19
|
+
xenfra-0.4.2.dist-info/METADATA,sha256=KyQ8sRc__QMkmIg9_AYiArqXUgVEeD7hJx8L1ea2rsQ,3898
|
|
20
|
+
xenfra-0.4.2.dist-info/RECORD,,
|
|
File without changes
|