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.
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/PKG-INFO +1 -1
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/git_glimpse_cli.egg-info/PKG-INFO +1 -1
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/glimpsecli/api.py +9 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/glimpsecli/main.py +6 -4
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/pyproject.toml +1 -1
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/LICENSE +0 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/README.md +0 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/git_glimpse_cli.egg-info/SOURCES.txt +0 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/git_glimpse_cli.egg-info/dependency_links.txt +0 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/git_glimpse_cli.egg-info/entry_points.txt +0 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/git_glimpse_cli.egg-info/requires.txt +0 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/git_glimpse_cli.egg-info/top_level.txt +0 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/glimpsecli/__init__.py +0 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/glimpsecli/config.py +0 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/glimpsecli/helpers.py +0 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/glimpsecli/utils.py +0 -0
- {git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/setup.cfg +0 -0
|
@@ -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/
|
|
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(
|
|
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.
|
|
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
|
|
File without changes
|
|
File without changes
|
{git_glimpse_cli-0.1.2 → git_glimpse_cli-0.1.3}/git_glimpse_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|