codedthemes-cli 0.1.11__tar.gz → 0.1.12__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.11 → codedthemes_cli-0.1.12}/PKG-INFO +1 -1
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes/cli.py +24 -1
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes_cli.egg-info/PKG-INFO +1 -1
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/pyproject.toml +1 -1
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/README.md +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes/__init__.py +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes/config.py +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes/mcp_client.py +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes/patch_utils.py +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes/repo_utils.py +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes/sync_manager.py +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes_cli.egg-info/SOURCES.txt +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes_cli.egg-info/dependency_links.txt +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes_cli.egg-info/entry_points.txt +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes_cli.egg-info/requires.txt +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/codedthemes_cli.egg-info/top_level.txt +0 -0
- {codedthemes_cli-0.1.11 → codedthemes_cli-0.1.12}/setup.cfg +0 -0
|
@@ -36,7 +36,18 @@ def handle_login(server_url: str = None):
|
|
|
36
36
|
email = input("Email: ").strip()
|
|
37
37
|
license_key = input("License key: ").strip()
|
|
38
38
|
|
|
39
|
+
# Idempotent check: Are we already logged in as this user?
|
|
40
|
+
if existing_token:
|
|
41
|
+
try:
|
|
42
|
+
decoded = jwt.decode(existing_token, options={"verify_signature": False})
|
|
43
|
+
if decoded.get("email") == email:
|
|
44
|
+
print(f"✔ Already logged in as {email}. Nothing changed.")
|
|
45
|
+
return
|
|
46
|
+
except:
|
|
47
|
+
pass
|
|
48
|
+
|
|
39
49
|
device_id = get_device_id()
|
|
50
|
+
|
|
40
51
|
device_name = socket.gethostname()
|
|
41
52
|
|
|
42
53
|
client = MCPClient()
|
|
@@ -216,14 +227,26 @@ def handle_apply(query: str):
|
|
|
216
227
|
if workspace_id:
|
|
217
228
|
try:
|
|
218
229
|
check = client.call("check_workspace", {"workspace_id": workspace_id})
|
|
230
|
+
if isinstance(check, dict) and check.get("status") == "error" and check.get("message") == "WORKSPACE_EVICTED":
|
|
231
|
+
print("\n⚠ Your workspace is inactive.")
|
|
232
|
+
print("It was unloaded from the server due to 30 minutes of inactivity.")
|
|
233
|
+
print("\nRun '\033[1mcodedthemes init\033[0m' to restore your workspace.\n")
|
|
234
|
+
sys.exit(0)
|
|
235
|
+
|
|
219
236
|
if isinstance(check, dict) and check.get("status") == "ok":
|
|
220
237
|
# print(f"✔ Using active workspace: {workspace_id}")
|
|
221
238
|
pass
|
|
222
239
|
else:
|
|
223
240
|
workspace_id = None
|
|
224
|
-
except:
|
|
241
|
+
except Exception as e:
|
|
242
|
+
if "WORKSPACE_EVICTED" in str(e):
|
|
243
|
+
print("\n⚠ Your workspace is inactive.")
|
|
244
|
+
print("It was unloaded from the server due to 30 minutes of inactivity.")
|
|
245
|
+
print("\nRun '\033[1mcodedthemes init\033[0m' to restore your workspace.\n")
|
|
246
|
+
sys.exit(0)
|
|
225
247
|
workspace_id = None
|
|
226
248
|
|
|
249
|
+
|
|
227
250
|
if not workspace_id:
|
|
228
251
|
print("📦 Zipping and uploading repository (this may take a moment)...")
|
|
229
252
|
upload_result = client.upload_workspace(repo_abs_path, user_email)
|
|
File without changes
|
|
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.11 → codedthemes_cli-0.1.12}/codedthemes_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|