stackforge-cli 0.1.2__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.
stackforge/scaffold.py CHANGED
@@ -6,15 +6,22 @@ from stackforge import ui
6
6
  import sys
7
7
 
8
8
 
9
+ FRAMEWORK_CHOICES = frozenset({"dotnet", "django", "fastapi", "flask", "exit"})
10
+
11
+
9
12
  def select_framework() -> str:
10
13
  ui.info("\n Select a framework:\n")
11
- ui.menu_option("1", ".NET Clean Architecture (CQRS)")
12
- ui.menu_option("2", "Django [coming soon]", style=ui.Fore.YELLOW)
13
- ui.menu_option("3", "FastAPI [coming soon]", style=ui.Fore.YELLOW)
14
- ui.menu_option("4", "Flask [coming soon]", style=ui.Fore.YELLOW)
15
- ui.menu_option("5", "exit", style=ui.Fore.RED)
16
-
17
- choice = ui.prompt("\n Choice [1]:") or "1"
14
+ ui.menu_item("dotnet", ".NET Clean Architecture (CQRS)")
15
+ ui.menu_item("django", "Django [coming soon]", style=ui.Fore.YELLOW)
16
+ ui.menu_item("fastapi", "FastAPI [coming soon]", style=ui.Fore.YELLOW)
17
+ ui.menu_item("flask", "Flask [coming soon]", style=ui.Fore.YELLOW)
18
+ ui.menu_item("exit", "Exit", style=ui.Fore.RED)
19
+
20
+ choice = ui.prompt("\n Framework [dotnet]:").lower() or "dotnet"
21
+ if choice not in FRAMEWORK_CHOICES:
22
+ ui.error(f"Unknown framework '{choice}'.")
23
+ ui.step("Options: dotnet, django, fastapi, flask, exit\n")
24
+ return ""
18
25
  return choice
19
26
 
20
27
 
@@ -30,11 +37,14 @@ def main():
30
37
  while True:
31
38
  framework = select_framework()
32
39
 
33
- if framework == "5":
40
+ if not framework:
41
+ continue
42
+
43
+ if framework == "exit":
34
44
  ui.warn("\n Exiting...")
35
45
  break
36
46
 
37
- if framework != "1":
47
+ if framework != "dotnet":
38
48
  ui.warn("\n This framework is under development. Stay tuned!\n")
39
49
  continue
40
50
 
stackforge/ui.py CHANGED
@@ -4,7 +4,7 @@ init(autoreset=True)
4
4
 
5
5
  __all__ = [
6
6
  "BANNER", "banner", "section", "step", "file_created", "success",
7
- "warn", "error", "info", "prompt", "menu_option", "done", "muted",
7
+ "warn", "error", "info", "prompt", "menu_item", "done", "muted",
8
8
  "Fore", "Style",
9
9
  ]
10
10
 
@@ -60,8 +60,8 @@ def prompt(label: str) -> str:
60
60
  return input(f" {Style.BRIGHT}{Fore.CYAN}{label}{Style.RESET_ALL} ").strip()
61
61
 
62
62
 
63
- def menu_option(number: str, label: str, *, style: str = Fore.GREEN) -> None:
64
- print(f" {style}{number}.{Style.RESET_ALL} {label}")
63
+ def menu_item(key: str, label: str, *, style: str = Fore.GREEN) -> None:
64
+ print(f" {style}{key:<10}{Style.RESET_ALL} {label}")
65
65
 
66
66
 
67
67
  def done() -> None:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: stackforge-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: A CLI scaffolder for .NET Clean Architecture projects
5
5
  License: MIT
6
6
  Keywords: scaffolder,dotnet,clean-architecture,cli
@@ -1,7 +1,7 @@
1
1
  stackforge/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  stackforge/project_name.py,sha256=opPJncCuWnysCpS9wLSk_uzC4BJ6ow2eG4sTr0AIdlc,885
3
- stackforge/scaffold.py,sha256=nKLkYUvSVY_W9w2VjJG3SWaFZFlEYUpUs4geQwi61Q4,2923
4
- stackforge/ui.py,sha256=K-47CSFIjYdT2oyjWWHdSc69SgfFGy0q69ksG6UVuRc,2160
3
+ stackforge/scaffold.py,sha256=PtYtVZnvmqeS7OZ8UA1Y9Wgxp4UNHhAaGVXV8d5dZ2w,3281
4
+ stackforge/ui.py,sha256=dhkBpMOD7teElktEaZrHVIQG3ef4Ztj6138W1z6_8Kw,2153
5
5
  stackforge/version.py,sha256=bz93n0b69WPdYgJW5tCvL3fLU2E9RStCkJtgue7_7S0,1484
6
6
  stackforge/engines/dotnet/__init__.py,sha256=I6S1SzyFstXO182w9qnKzlGQF0ffOfrg5Tkt9QAHRLw,618
7
7
  stackforge/engines/dotnet/api_generator.py,sha256=gTXDiSNbeIL07KQahQ5BxrrqZhqqaSjGVffn0SISWa8,9814
@@ -12,8 +12,8 @@ stackforge/engines/dotnet/git_generator.py,sha256=c7Q8y8PvZHR33_veAklv200tHw46Z3
12
12
  stackforge/engines/dotnet/layers_generator.py,sha256=HoXztxUR4StmMktKzCmbJjj5MjuUvw3NNSQOjA3LulQ,18175
13
13
  stackforge/engines/dotnet/program_generator.py,sha256=kvKkaQTLtSu_SGV4lfkdo-mX3z-fLKwRWG8ZvhZ053Q,6072
14
14
  stackforge/engines/dotnet/scaffolder.py,sha256=eU02zDIQ5TSZaosQo15cIYmRMn2knzzNLRH5iG8OYRI,2387
15
- stackforge_cli-0.1.2.dist-info/METADATA,sha256=sYTVyqdndDXLCg98gKqaPfLagsH7rc3gStk4RMTWdns,3179
16
- stackforge_cli-0.1.2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
17
- stackforge_cli-0.1.2.dist-info/entry_points.txt,sha256=r6YqYMrqMdXBiKTqSNdbEjwuzhCSksAlAmdhnqIOvJE,56
18
- stackforge_cli-0.1.2.dist-info/top_level.txt,sha256=rLeEUKSWLyFKeW9uVuvTDIxq05hOic0cG7Xy3XlSYI8,11
19
- stackforge_cli-0.1.2.dist-info/RECORD,,
15
+ stackforge_cli-0.1.3.dist-info/METADATA,sha256=AVN5oXSPfboAz_Fn10eGv4KUlj_I-wWjRmLOXqASWfk,3179
16
+ stackforge_cli-0.1.3.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
17
+ stackforge_cli-0.1.3.dist-info/entry_points.txt,sha256=r6YqYMrqMdXBiKTqSNdbEjwuzhCSksAlAmdhnqIOvJE,56
18
+ stackforge_cli-0.1.3.dist-info/top_level.txt,sha256=rLeEUKSWLyFKeW9uVuvTDIxq05hOic0cG7Xy3XlSYI8,11
19
+ stackforge_cli-0.1.3.dist-info/RECORD,,