vega-framework 0.1.31__py3-none-any.whl → 0.1.32__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.
@@ -933,9 +933,9 @@ def _generate_event(project_root: Path, project_name: str, class_name: str, file
933
933
 
934
934
 
935
935
  def _generate_event_handler(project_root: Path, project_name: str, class_name: str, file_name: str):
936
- """Generate an application-level event handler/subscriber."""
936
+ """Generate an application-level event handler/subscriber in events/ for auto-discovery."""
937
937
 
938
- handlers_path = project_root / "application" / "events"
938
+ handlers_path = project_root / "events"
939
939
  handlers_path.mkdir(parents=True, exist_ok=True)
940
940
 
941
941
  init_file = handlers_path / "__init__.py"
@@ -987,5 +987,5 @@ def _generate_event_handler(project_root: Path, project_name: str, class_name: s
987
987
 
988
988
  click.echo("\nNext steps:")
989
989
  click.echo(f" 1. Implement your handler in {handler_file.relative_to(project_root)}")
990
- click.echo(" 2. Ensure the module is imported during application bootstrap (autodiscovery or manual import).")
990
+ click.echo(" 2. Call events.register_all_handlers() during startup so auto-discovery loads it.")
991
991
  click.echo(" 3. Run your workflow and verify the subscriber reacts to the event.")
@@ -64,35 +64,12 @@ def create_fastapi_scaffold(
64
64
  created.append(rel_path)
65
65
  echo(f"+ Created {click.style(str(rel_path), fg='green')}")
66
66
 
67
- if _ensure_fastapi_dependencies(project_root):
68
- echo(f"+ Updated {click.style('pyproject.toml', fg='green')} with FastAPI dependencies")
69
-
70
67
  echo("\n[TIP] FastAPI scaffold ready:")
71
68
  echo(" 1. poetry install # sync dependencies (or poetry update)")
72
69
  echo(" 2. poetry run uvicorn presentation.web.main:app --reload")
73
70
 
74
71
  return created
75
72
 
76
-
77
- def _ensure_fastapi_dependencies(project_root: Path) -> bool:
78
- """Ensure FastAPI dependencies exist in pyproject.toml; return True if modified."""
79
- pyproject_path = project_root / "pyproject.toml"
80
- if not pyproject_path.exists():
81
- return False
82
-
83
- content = pyproject_path.read_text(encoding="utf-8")
84
- lines = content.splitlines(keepends=True)
85
-
86
- changed = False
87
- changed |= _ensure_dependency_line(lines, "fastapi", "^0.111")
88
- changed |= _ensure_dependency_line(lines, "uvicorn", "^0.30")
89
-
90
- if changed:
91
- pyproject_path.write_text("".join(lines), encoding="utf-8")
92
-
93
- return changed
94
-
95
-
96
73
  def _ensure_dependency_line(lines: list[str], name: str, spec: str) -> bool:
97
74
  """Insert dependency assignment into [tool.poetry.dependencies] if missing."""
98
75
  header = "[tool.poetry.dependencies]"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vega-framework
3
- Version: 0.1.31
3
+ Version: 0.1.32
4
4
  Summary: Enterprise-ready Python framework that enforces Clean Architecture for building maintainable and scalable applications.
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -2,14 +2,14 @@ vega/__init__.py,sha256=A05RwOYXooAZUz3GnbJ--ofLXgtRZK9gaSmsLVRdGPY,1811
2
2
  vega/cli/__init__.py,sha256=NCzOOyhKHqLeN1r80ekhMfkQwBdAQXKcKiKoNwYPNiY,304
3
3
  vega/cli/commands/__init__.py,sha256=UH7MdYduBG_YoulgdiWkUCtcgGLzuYRGFzxaqoa0pyg,19
4
4
  vega/cli/commands/add.py,sha256=5Li588W1KWQqCKV0VZSURx4J3I8dQE297c4V_3anf5U,6465
5
- vega/cli/commands/generate.py,sha256=S3qNE40exn1dSub8kM8Vp-Tpn9ByK2UBjaVA6LadAos,38172
5
+ vega/cli/commands/generate.py,sha256=wCvcj1bSIK9MJam8FcT9G2vrQTYv92JFRzPYOipJywA,38172
6
6
  vega/cli/commands/init.py,sha256=Ro35QfCKeo-Nm_rJkRT-DaX0nH7_bGc_ewX5Q1eqpP8,5860
7
7
  vega/cli/commands/migrate.py,sha256=00swKeVhmKr1_1VJhg3GpIMcJ6Jfgz5FUpmJoLf5qSQ,3805
8
8
  vega/cli/commands/update.py,sha256=0zRWkHvQwKGlJL9XF3bi--dThkFapyNOugL6AgGr6Ic,5897
9
9
  vega/cli/commands/web.py,sha256=tkaMzrENiV044JdPtCSRmzX_vVpnumlDeTG6YH3DWo4,3450
10
10
  vega/cli/main.py,sha256=0hSar-MFpu3tp2QDOite4LGVpAhCTojuRZhPDiilEFQ,5476
11
11
  vega/cli/scaffolds/__init__.py,sha256=WFJf2H_4UWL89gDxX8PXKkTVSVOfw7hFfyaPWKokp1g,217
12
- vega/cli/scaffolds/fastapi.py,sha256=a_vZVSfMgyteRURFZAShbtjSRMOSM4YeEIKKvBtAOfo,3788
12
+ vega/cli/scaffolds/fastapi.py,sha256=9VqZD5TIT7iX6za_5h0L1aWqJ0V58pV8CyEiIxw7_w0,3013
13
13
  vega/cli/scaffolds/sqlalchemy.py,sha256=il5JqiA8LSQKnNoOYfAFD82rdYx5l_ZsqsjHnplYohw,6164
14
14
  vega/cli/templates/__init__.py,sha256=1Udc3hlhj3pJYQGk4NVpg0u9us040YarL_adlomJTf4,2018
15
15
  vega/cli/templates/cli/command.py.j2,sha256=Z8K9DRfppsco9uID_uG8EKVyWYD_1x-KYqLZY4BJKzM,1097
@@ -83,8 +83,8 @@ vega/patterns/repository.py,sha256=uYUyLs-O8OqW1Wb9ZqIo8UUcCjZ5UFuHors_F2iDg9A,1
83
83
  vega/patterns/service.py,sha256=buFRgJoeQtZQK22Upb4vh84c1elWKFXWBaB0X4RaruE,1374
84
84
  vega/settings/__init__.py,sha256=Eb8PMUyXAlCAQIcL2W8QhTTUHUbVlkAfXdpTUlADo1I,786
85
85
  vega/settings/base.py,sha256=bL45hyoa3t-hQOvur860eSo7O833sQMsXJJPwbTVbwE,1321
86
- vega_framework-0.1.31.dist-info/METADATA,sha256=dMlyl1DCYbJCpOEG7a8zZzKMs8kZst-xp5vea7EfAbI,11105
87
- vega_framework-0.1.31.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
88
- vega_framework-0.1.31.dist-info/entry_points.txt,sha256=p3gyTmPYjNRLbuiKS-hG3ytWd-ssBweFy6VZ-F9FTNk,42
89
- vega_framework-0.1.31.dist-info/licenses/LICENSE,sha256=wlHh1MBTcs2kSQr99P30mZ61s7uh7Cp9Rk0YiJxots0,1084
90
- vega_framework-0.1.31.dist-info/RECORD,,
86
+ vega_framework-0.1.32.dist-info/METADATA,sha256=Uv1yLcHRVYvX2r7IIKwp1_ie9xvdpi_kqSmUTrRLD0A,11105
87
+ vega_framework-0.1.32.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
88
+ vega_framework-0.1.32.dist-info/entry_points.txt,sha256=p3gyTmPYjNRLbuiKS-hG3ytWd-ssBweFy6VZ-F9FTNk,42
89
+ vega_framework-0.1.32.dist-info/licenses/LICENSE,sha256=wlHh1MBTcs2kSQr99P30mZ61s7uh7Cp9Rk0YiJxots0,1084
90
+ vega_framework-0.1.32.dist-info/RECORD,,