Skip to content

Commit 37246fe

Browse files
v0.1.2: fix web UI download (use httpx with redirects), bump version
1 parent 8dee01d commit 37246fe

5 files changed

Lines changed: 14 additions & 9 deletions

File tree

packages/cli/src/repowise/cli/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
AI-generated documentation.
77
"""
88

9-
__version__ = "0.1.1"
9+
__version__ = "0.1.2"

packages/cli/src/repowise/cli/commands/serve_cmd.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,24 @@ def _find_local_web() -> Path | None:
5858

5959
def _download_web(version: str) -> bool:
6060
"""Download pre-built web frontend from GitHub releases."""
61-
import urllib.request
62-
import urllib.error
61+
import httpx
6362

6463
tag = f"v{version}"
6564
url = f"https://github.com/{_GITHUB_REPO}/releases/download/{tag}/repowise-web.tar.gz"
6665

67-
console.print(f"[dim]Downloading web UI from {url}...[/dim]")
66+
console.print(f"[dim]Downloading web UI ({url})...[/dim]")
6867
try:
68+
tmp_path = None
6969
with tempfile.NamedTemporaryFile(suffix=".tar.gz", delete=False) as tmp:
70-
urllib.request.urlretrieve(url, tmp.name)
7170
tmp_path = tmp.name
72-
except (urllib.error.URLError, urllib.error.HTTPError) as exc:
71+
with httpx.stream("GET", url, follow_redirects=True, timeout=120) as resp:
72+
resp.raise_for_status()
73+
for chunk in resp.iter_bytes(chunk_size=65536):
74+
tmp.write(chunk)
75+
except (httpx.HTTPStatusError, httpx.RequestError) as exc:
7376
console.print(f"[yellow]Could not download web UI: {exc}[/yellow]")
77+
if tmp_path:
78+
os.unlink(tmp_path)
7479
return False
7580

7681
try:

packages/core/src/repowise/core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
Namespace package: repowise.core is part of the repowise namespace.
77
"""
88

9-
__version__ = "0.1.1"
9+
__version__ = "0.1.2"

packages/server/src/repowise/server/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
- Background job scheduler (APScheduler)
88
"""
99

10-
__version__ = "0.1.1"
10+
__version__ = "0.1.2"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"
77

88
[project]
99
name = "repowise"
10-
version = "0.1.1"
10+
version = "0.1.2"
1111
description = "Codebase intelligence for developers and AI — generates and maintains a structured wiki for any codebase"
1212
readme = "README.md"
1313
requires-python = ">=3.11"

0 commit comments

Comments
 (0)