stackforge-cli 0.1.0__py3-none-any.whl → 0.1.1__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 +23 -22
- {stackforge_cli-0.1.0.dist-info → stackforge_cli-0.1.1.dist-info}/METADATA +2 -1
- {stackforge_cli-0.1.0.dist-info → stackforge_cli-0.1.1.dist-info}/RECORD +6 -6
- {stackforge_cli-0.1.0.dist-info → stackforge_cli-0.1.1.dist-info}/WHEEL +0 -0
- {stackforge_cli-0.1.0.dist-info → stackforge_cli-0.1.1.dist-info}/entry_points.txt +0 -0
- {stackforge_cli-0.1.0.dist-info → stackforge_cli-0.1.1.dist-info}/top_level.txt +0 -0
stackforge/scaffold.py
CHANGED
|
@@ -1,26 +1,28 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
from stackforge.engines.dotnet.scaffolder import scaffold_folders
|
|
3
|
+
from colorama import init, Fore, Style
|
|
3
4
|
import re
|
|
4
5
|
|
|
6
|
+
init(autoreset=True)
|
|
5
7
|
|
|
6
8
|
def is_valid_project_name(name: str) -> bool:
|
|
7
9
|
return bool(re.match(r'^[A-Za-z][A-Za-z0-9]*$', name))
|
|
8
10
|
|
|
9
11
|
|
|
10
12
|
def select_framework() -> str:
|
|
11
|
-
print(" Select a framework
|
|
12
|
-
print(" 1. .NET Clean Architecture (CQRS)")
|
|
13
|
-
print(" 2. Django [coming soon]")
|
|
14
|
-
print(" 3. FastAPI [coming soon]")
|
|
15
|
-
print(" 4. Flask [coming soon]")
|
|
16
|
-
print(" 5. exit")
|
|
17
|
-
|
|
18
|
-
choice = input("\n Choice [n]: ").strip() or "1"
|
|
13
|
+
print(f" {Fore.CYAN}Select a framework:{Style.RESET_ALL}\n")
|
|
14
|
+
print(f" {Fore.GREEN}1.{Style.RESET_ALL} .NET Clean Architecture (CQRS)")
|
|
15
|
+
print(f" {Fore.YELLOW}2.{Style.RESET_ALL} Django [coming soon]")
|
|
16
|
+
print(f" {Fore.YELLOW}3.{Style.RESET_ALL} FastAPI [coming soon]")
|
|
17
|
+
print(f" {Fore.YELLOW}4.{Style.RESET_ALL} Flask [coming soon]")
|
|
18
|
+
print(f" {Fore.RED}5.{Style.RESET_ALL} exit")
|
|
19
|
+
|
|
20
|
+
choice = input(f"\n {Fore.CYAN}Choice [n]:{Style.RESET_ALL} ").strip() or "1"
|
|
19
21
|
return choice
|
|
20
22
|
|
|
21
23
|
|
|
22
24
|
def main():
|
|
23
|
-
print(r"""
|
|
25
|
+
print(Fore.CYAN + r"""
|
|
24
26
|
_____ _ _ ______
|
|
25
27
|
/ ____| | | | | ____|
|
|
26
28
|
| (___ | |_ __ _ ___| | _| |__ ___ _ __ __ _ ___
|
|
@@ -29,36 +31,35 @@ def main():
|
|
|
29
31
|
|_____/ \__\__,_|\___|_|\_\_| \___/|_| \__, |\___|
|
|
30
32
|
__/ |
|
|
31
33
|
|___/
|
|
32
|
-
.NET Clean Architecture Scaffolder
|
|
33
|
-
""")
|
|
34
|
+
""" + Style.RESET_ALL + f" {Fore.WHITE}.NET Clean Architecture Scaffolder{Style.RESET_ALL}\n")
|
|
34
35
|
|
|
35
36
|
while True:
|
|
36
37
|
framework = select_framework()
|
|
37
38
|
|
|
38
39
|
if framework == "5":
|
|
39
|
-
print("\n Exiting...")
|
|
40
|
+
print(f"\n {Fore.YELLOW}Exiting...{Style.RESET_ALL}")
|
|
40
41
|
break
|
|
41
42
|
|
|
42
43
|
if framework != "1":
|
|
43
|
-
print("\n [!] This framework is under development. Stay tuned
|
|
44
|
+
print(f"\n {Fore.YELLOW}[!] This framework is under development. Stay tuned!{Style.RESET_ALL}\n")
|
|
44
45
|
continue
|
|
45
46
|
|
|
46
|
-
project_name = input("\n Enter project name (PascalCase, no spaces): ").strip()
|
|
47
|
+
project_name = input(f"\n {Fore.CYAN}Enter project name (PascalCase, no spaces):{Style.RESET_ALL} ").strip()
|
|
47
48
|
|
|
48
49
|
if not project_name:
|
|
49
|
-
print(" [!] Project name cannot be empty
|
|
50
|
+
print(f" {Fore.RED}[!] Project name cannot be empty.{Style.RESET_ALL}\n")
|
|
50
51
|
continue
|
|
51
52
|
|
|
52
53
|
if not is_valid_project_name(project_name):
|
|
53
|
-
print(" [!] Project name must start with a letter and contain only letters and numbers.")
|
|
54
|
-
print(" Example: RaiderXpress, MyApi, StackForge\n")
|
|
54
|
+
print(f" {Fore.RED}[!] Project name must start with a letter and contain only letters and numbers.")
|
|
55
|
+
print(f" Example: RaiderXpress, MyApi, StackForge{Style.RESET_ALL}\n")
|
|
55
56
|
continue
|
|
56
57
|
|
|
57
58
|
base_path = Path.home() / "stackforge" / project_name
|
|
58
59
|
|
|
59
60
|
if base_path.exists():
|
|
60
|
-
print(f"\n [!] Project '{project_name}' already exists in the stackforge workspace.")
|
|
61
|
-
print(f" Path: {base_path}")
|
|
61
|
+
print(f"\n {Fore.RED}[!] Project '{project_name}' already exists in the stackforge workspace.")
|
|
62
|
+
print(f" Path: {base_path}{Style.RESET_ALL}")
|
|
62
63
|
print(" Choose a different project name or delete the existing one.\n")
|
|
63
64
|
continue
|
|
64
65
|
|
|
@@ -66,10 +67,10 @@ def main():
|
|
|
66
67
|
scaffold_folders(base_path, project_name)
|
|
67
68
|
|
|
68
69
|
print(f"""
|
|
69
|
-
✔ Project '{project_name}' created successfully!
|
|
70
|
-
✔ Location: {base_path}
|
|
70
|
+
{Fore.GREEN}✔ Project '{project_name}' created successfully!
|
|
71
|
+
✔ Location: {base_path}{Style.RESET_ALL}
|
|
71
72
|
|
|
72
|
-
Next steps:
|
|
73
|
+
{Fore.CYAN}Next steps:{Style.RESET_ALL}
|
|
73
74
|
1. Open the project in Visual Studio or VS Code
|
|
74
75
|
2. Run: docker-compose up --build
|
|
75
76
|
3. Visit: http://localhost:5000/swagger
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: stackforge-cli
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: A CLI scaffolder for .NET Clean Architecture projects
|
|
5
5
|
License: MIT
|
|
6
6
|
Keywords: scaffolder,dotnet,clean-architecture,cli
|
|
@@ -10,6 +10,7 @@ Classifier: Operating System :: OS Independent
|
|
|
10
10
|
Classifier: Environment :: Console
|
|
11
11
|
Requires-Python: >=3.10
|
|
12
12
|
Description-Content-Type: text/markdown
|
|
13
|
+
Requires-Dist: colorama>=0.4.6
|
|
13
14
|
|
|
14
15
|
# StackForge
|
|
15
16
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
stackforge/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
stackforge/scaffold.py,sha256=
|
|
2
|
+
stackforge/scaffold.py,sha256=M4NR0_-kN09AfAtiXiqnNCxFYfrpVeYGx7UzjAdce-g,3261
|
|
3
3
|
stackforge/engines/dotnet/__init__.py,sha256=bxCYj7mEmcLZZ06vgUPe8l9_PAp_dTDYLbaVK7sotQM,592
|
|
4
4
|
stackforge/engines/dotnet/api_generator.py,sha256=06dPkqhqadIV2xNrlrMzNNvf9n2iG2zro8lzZ6jk-uw,9783
|
|
5
5
|
stackforge/engines/dotnet/config_generator.py,sha256=cEKpUJ9t6gRNk9TnWQ1LXrxUk1WYLxDw_DH8T-X7gvA,2030
|
|
@@ -9,8 +9,8 @@ stackforge/engines/dotnet/git_generator.py,sha256=_fRnGnMLitw5GPxt1yKVCwCDequpMF
|
|
|
9
9
|
stackforge/engines/dotnet/layers_generator.py,sha256=EM5agcRcZAL_9s980sEP1iECuE518O-L6NndFtH3U2o,18132
|
|
10
10
|
stackforge/engines/dotnet/program_generator.py,sha256=bCjTI8-aY9kLOOVZASF9U8HIEkVgOhtAndkV0Sq8V10,6037
|
|
11
11
|
stackforge/engines/dotnet/scaffolder.py,sha256=Tco9MnM-qEBkTps472inZ62rTAcnecwpUBvAofE56gY,2289
|
|
12
|
-
stackforge_cli-0.1.
|
|
13
|
-
stackforge_cli-0.1.
|
|
14
|
-
stackforge_cli-0.1.
|
|
15
|
-
stackforge_cli-0.1.
|
|
16
|
-
stackforge_cli-0.1.
|
|
12
|
+
stackforge_cli-0.1.1.dist-info/METADATA,sha256=epE-WLMVrdm6pe6wfW6DvjSYFLSQYYGbNEGv3P_sa6s,1247
|
|
13
|
+
stackforge_cli-0.1.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
14
|
+
stackforge_cli-0.1.1.dist-info/entry_points.txt,sha256=r6YqYMrqMdXBiKTqSNdbEjwuzhCSksAlAmdhnqIOvJE,56
|
|
15
|
+
stackforge_cli-0.1.1.dist-info/top_level.txt,sha256=rLeEUKSWLyFKeW9uVuvTDIxq05hOic0cG7Xy3XlSYI8,11
|
|
16
|
+
stackforge_cli-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|