git-glimpse-cli 0.1.2__tar.gz → 0.1.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-glimpse-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: CLI tool to manage and update shared GitHub repos with GitGlimpse.
5
5
  Author-email: sutaC <contact@sutac.pl>
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: git-glimpse-cli
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: CLI tool to manage and update shared GitHub repos with GitGlimpse.
5
5
  Author-email: sutaC <contact@sutac.pl>
6
6
  License-Expression: MIT
@@ -2,10 +2,19 @@ from rich.progress import Progress, SpinnerColumn, TextColumn
2
2
  from glimpsecli import config, helpers
3
3
  from contextlib import nullcontext
4
4
  from json import JSONDecodeError
5
+ from typing import TypedDict
5
6
  from rich import print
6
7
  import typer
7
8
  import httpx
8
9
 
10
+ # --- Responses
11
+ class StatusResponse(TypedDict):
12
+ status: str
13
+ timestamp: str
14
+ code: str | None
15
+ size: str
16
+
17
+ # --- Regests
9
18
  def request_api(
10
19
  endpoint: str,
11
20
  method: str = "GET",
@@ -179,11 +179,13 @@ def status():
179
179
  """Display status info of current repository."""
180
180
  token = helpers.fget_token()
181
181
  repo_id = helpers.fget_repo_id()
182
- response = api.request_api(f"/cli/repos/build/{repo_id}/status", token=token)
183
- data = response.json()
184
- build_status = data.get("status", "")
182
+ response = api.request_api(f"/cli/repos/status/{repo_id}", token=token)
183
+ data: api.StatusResponse = response.json()
185
184
  print(f"Repository id: [dark_cyan]{repo_id}[/dark_cyan]")
186
- print(f"Build status: {utils.enrich_status(build_status)}")
185
+ print(f"Build status: {utils.enrich_status(data.get('status'))}")
186
+ if data.get("code"): print(f"Build code: [dark_red]{data['code']}[/dark_red]")
187
+ print(f"Build timestamp: [not bold dark_blue]{data.get('timestamp', '?')}[/not bold dark_blue]")
188
+ print(f"Build size: [not bold dark_blue]{data.get('size', '?')}[/not bold dark_blue]")
187
189
  print(f"Repository details: {config.get_api_url()}/repos/details/{repo_id}")
188
190
 
189
191
  # --- remove
@@ -7,7 +7,7 @@ name = "git-glimpse-cli"
7
7
  authors = [
8
8
  { name="sutaC", email="contact@sutac.pl" },
9
9
  ]
10
- version = "0.1.2"
10
+ version = "0.1.3"
11
11
  description = "CLI tool to manage and update shared GitHub repos with GitGlimpse."
12
12
  readme = "README.md"
13
13
  requires-python = ">=3.10"
File without changes