codedthemes-cli 0.1.12__tar.gz → 0.1.13__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.
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/PKG-INFO +1 -1
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes/cli.py +15 -19
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes/repo_utils.py +4 -3
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes_cli.egg-info/PKG-INFO +1 -1
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/pyproject.toml +1 -1
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/README.md +0 -0
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes/__init__.py +0 -0
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes/config.py +0 -0
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes/mcp_client.py +0 -0
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes/patch_utils.py +0 -0
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes/sync_manager.py +0 -0
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes_cli.egg-info/SOURCES.txt +0 -0
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes_cli.egg-info/dependency_links.txt +0 -0
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes_cli.egg-info/entry_points.txt +0 -0
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes_cli.egg-info/requires.txt +0 -0
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes_cli.egg-info/top_level.txt +0 -0
- {codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/setup.cfg +0 -0
|
@@ -29,6 +29,7 @@ def handle_login(server_url: str = None):
|
|
|
29
29
|
choice = input("Switch account? (y/N): ").strip().lower()
|
|
30
30
|
if choice not in ['y', 'yes']:
|
|
31
31
|
print("Login cancelled.")
|
|
32
|
+
print("Please enter your credentials to log in.")
|
|
32
33
|
return
|
|
33
34
|
except:
|
|
34
35
|
pass
|
|
@@ -62,28 +63,23 @@ def handle_login(server_url: str = None):
|
|
|
62
63
|
"device_name": device_name
|
|
63
64
|
})
|
|
64
65
|
|
|
65
|
-
if
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
elif "message" in result and "Login failed" in result["message"]:
|
|
70
|
-
print(f"✖ {result['message']}")
|
|
66
|
+
if result.get("status") == "success":
|
|
67
|
+
token = result.get("access_token")
|
|
68
|
+
if not token:
|
|
69
|
+
print("✖ Login failed: No access token returned. Please check your credentials.")
|
|
71
70
|
sys.exit(1)
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
72
|
+
# LAZY CONFIG: Only save if login succeeded
|
|
73
|
+
save_config({
|
|
74
|
+
"access_token": token,
|
|
75
|
+
"server_url": client.server_url,
|
|
76
|
+
"device_id": device_id
|
|
77
|
+
})
|
|
78
|
+
print(f"✔ {result.get('message')}")
|
|
79
|
+
print("\n🚀 Next Step: Run 'codedthemes init' to initialize your repository and sync it with the cloud.")
|
|
80
|
+
else:
|
|
81
|
+
print(f"✖ {result.get('message', 'Login failed')}")
|
|
78
82
|
sys.exit(1)
|
|
79
|
-
|
|
80
|
-
save_config({
|
|
81
|
-
"server_url": client.server_url,
|
|
82
|
-
"access_token": token
|
|
83
|
-
})
|
|
84
|
-
|
|
85
|
-
print("✔ Login successful.")
|
|
86
|
-
print("\n🚀 Next Step: Run 'codedthemes init' to initialize your repository and sync it with the cloud.")
|
|
87
83
|
except Exception as e:
|
|
88
84
|
err_msg = str(e)
|
|
89
85
|
if "timed out" in err_msg.lower():
|
|
@@ -105,7 +105,7 @@ def _is_gitignored(rel_path, patterns):
|
|
|
105
105
|
def detect_repo_root(start_path=None):
|
|
106
106
|
"""
|
|
107
107
|
Traverses up from start_path to find a repository root containing
|
|
108
|
-
|
|
108
|
+
ai.json, or .git. Stricter than previous versions to avoid false positives.
|
|
109
109
|
"""
|
|
110
110
|
if not start_path:
|
|
111
111
|
start_path = os.getcwd()
|
|
@@ -113,11 +113,12 @@ def detect_repo_root(start_path=None):
|
|
|
113
113
|
current = Path(start_path).resolve()
|
|
114
114
|
|
|
115
115
|
while current != current.parent:
|
|
116
|
-
if any((current / f).exists() for f in ["
|
|
116
|
+
if any((current / f).exists() for f in ["ai.json", ".git"]):
|
|
117
117
|
return current
|
|
118
118
|
current = current.parent
|
|
119
119
|
|
|
120
|
-
raise Exception("No repository root found.")
|
|
120
|
+
raise Exception("No repository root found. Please run this command inside a Git repository or one initialized with 'codedthemes init'.")
|
|
121
|
+
|
|
121
122
|
|
|
122
123
|
|
|
123
124
|
def zip_repo(repo_root):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{codedthemes_cli-0.1.12 → codedthemes_cli-0.1.13}/codedthemes_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|