redfetch 1.4.2__tar.gz → 1.4.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.
- {redfetch-1.4.2 → redfetch-1.4.3}/.github/workflows/pipeline.yml +3 -3
- {redfetch-1.4.2 → redfetch-1.4.3}/CHANGELOG.md +5 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/PKG-INFO +2 -2
- redfetch-1.4.3/pyapp_launcher.py +99 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/__about__.py +2 -2
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/config.py +6 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/config_firstrun.py +25 -1
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/main.py +3 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/.gitignore +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/AGENTS.md +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/LICENSE +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/README.md +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/pyproject.toml +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/redfetch.ico +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/__init__.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/api.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/auth.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/desktop_shortcut.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/detecteq.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/download.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/listener.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/meta.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/navmesh.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/net.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/post_update.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/processes.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/push.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/runtime_errors.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/settings.toml +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/shortcuts.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/special.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/store.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/sync.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/sync_discovery.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/sync_executor.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/sync_planner.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/sync_remote.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/sync_types.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/terminal_ui.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/terminal_ui.tcss +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/update_status.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/src/redfetch/utils.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/cli_reference.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_autologin_eqpath.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_check.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_close_gating.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_env_selection.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_fetch_sync_info.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_first_run_setup.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_is_special_or_dependency.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_licensed_resources_filtering.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_path_reset.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_process_lock.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_remote_snapshot.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_self_heal_eqpath.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_settings_local_deltas.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_shortcuts.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_staged_extraction.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_sync_pipeline_regressions.py +0 -0
- {redfetch-1.4.2 → redfetch-1.4.3}/tests/test_sync_queue_rules.py +0 -0
|
@@ -107,7 +107,7 @@ jobs:
|
|
|
107
107
|
id: set_env_vars
|
|
108
108
|
shell: pwsh
|
|
109
109
|
run: |
|
|
110
|
-
"
|
|
110
|
+
"PYAPP_EXEC_SCRIPT=$env:GITHUB_WORKSPACE\pyapp_launcher.py" >> $env:GITHUB_ENV
|
|
111
111
|
"PYAPP_PASS_LOCATION=1" >> $env:GITHUB_ENV
|
|
112
112
|
|
|
113
113
|
if ($env:GITHUB_REF -eq 'refs/heads/develop') {
|
|
@@ -165,11 +165,11 @@ jobs:
|
|
|
165
165
|
Remove-Item Env:PYAPP_PROJECT_VERSION -ErrorAction SilentlyContinue
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
-
$env:
|
|
168
|
+
$env:PYAPP_EXEC_SCRIPT = "${{ env.PYAPP_EXEC_SCRIPT }}"
|
|
169
169
|
$env:PYAPP_PASS_LOCATION = "${{ env.PYAPP_PASS_LOCATION }}"
|
|
170
170
|
$env:PYAPP_PIP_EXTRA_ARGS = "${{ env.PYAPP_PIP_EXTRA_ARGS }}"
|
|
171
171
|
|
|
172
|
-
Write-Host "
|
|
172
|
+
Write-Host "PYAPP_EXEC_SCRIPT: $env:PYAPP_EXEC_SCRIPT"
|
|
173
173
|
Write-Host "PYAPP_PASS_LOCATION: $env:PYAPP_PASS_LOCATION"
|
|
174
174
|
Write-Host "PYAPP_PIP_EXTRA_ARGS: $env:PYAPP_PIP_EXTRA_ARGS"
|
|
175
175
|
|
|
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.4.3] - 2026-07-06
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- A failed install will attempt to repair itself, rather than closing immediately.
|
|
12
|
+
|
|
8
13
|
## [1.4.2] - 2026-07-06
|
|
9
14
|
|
|
10
15
|
### Fixed
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: redfetch
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.3
|
|
4
4
|
Summary: Download and publish EverQuest scripts and software using the RedGuides API
|
|
5
5
|
Project-URL: Homepage, https://www.redguides.com
|
|
6
6
|
Project-URL: Documentation, https://www.redguides.com/community/resources/redfetch.3177/
|
|
7
7
|
Project-URL: Repository, https://github.com/RedGuides/redfetch
|
|
8
8
|
Project-URL: Issues, https://github.com/RedGuides/redfetch/issues
|
|
9
9
|
Project-URL: Changelog, https://github.com/RedGuides/redfetch/blob/main/CHANGELOG.md
|
|
10
|
-
Project-URL: Source_archive, https://github.com/RedGuides/redfetch/archive/
|
|
10
|
+
Project-URL: Source_archive, https://github.com/RedGuides/redfetch/archive/9161a88b101d6df6ce9a697736e3fcc57b1c3122.zip
|
|
11
11
|
Author-email: Redbot <ask@redguides.com>
|
|
12
12
|
License-Expression: GPL-3.0-or-later
|
|
13
13
|
License-File: LICENSE
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"""PyApp entry point for redfetch.exe: run the app, and self-heal a broken install.
|
|
2
|
+
|
|
3
|
+
PyApp treats half-installed environments as complete, so if something fails or
|
|
4
|
+
interrupts install, it stays broken unless someone opens a terminal and runs `self restore`.
|
|
5
|
+
This wrapper runs `self restore` automatically.
|
|
6
|
+
|
|
7
|
+
Embedded via PYAPP_EXEC_SCRIPT. Stdlib-only, and must not import redfetch at module
|
|
8
|
+
scope, since redfetch is exactly what may be missing!
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
import sys
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _import_entrypoint():
|
|
15
|
+
from redfetch.main import main
|
|
16
|
+
return main
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Repair runs after we exit, in a detached script: on Windows `self restore` can't
|
|
20
|
+
# delete the install dir while our python.exe is still running from inside it.
|
|
21
|
+
_REPAIR_BAT = r"""@echo off
|
|
22
|
+
title redfetch - finishing setup
|
|
23
|
+
echo.
|
|
24
|
+
echo redfetch setup didn't finish!
|
|
25
|
+
echo Trying to finish it now, this may take a few minutes.
|
|
26
|
+
echo Please don't close this window.
|
|
27
|
+
echo.
|
|
28
|
+
timeout /t 3 /nobreak > nul
|
|
29
|
+
"<EXE>" self restore
|
|
30
|
+
if %errorlevel% neq 0 goto redfetch_failed
|
|
31
|
+
echo.
|
|
32
|
+
echo All set -- starting redfetch...
|
|
33
|
+
set "REDFETCH_SELFHEAL=1"
|
|
34
|
+
"<EXE>"
|
|
35
|
+
goto redfetch_cleanup
|
|
36
|
+
:redfetch_failed
|
|
37
|
+
echo.
|
|
38
|
+
echo Automatic repair didn't complete. You can repair manually by running:
|
|
39
|
+
echo "<EXE>" self restore
|
|
40
|
+
echo.
|
|
41
|
+
pause
|
|
42
|
+
:redfetch_cleanup
|
|
43
|
+
(goto) 2>nul & del "%~f0"
|
|
44
|
+
"""
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def _schedule_repair() -> "int | None":
|
|
48
|
+
"""Schedule `self restore` + relaunch; return 0 if scheduled, else None."""
|
|
49
|
+
import os
|
|
50
|
+
|
|
51
|
+
# PYAPP is always set (to "1" when PASS_LOCATION is off), so require a real path.
|
|
52
|
+
exe = os.environ.get("PYAPP")
|
|
53
|
+
if sys.platform != "win32" or not exe or not os.path.exists(exe):
|
|
54
|
+
return None
|
|
55
|
+
if os.environ.get("REDFETCH_SELFHEAL"): # already tried once this chain
|
|
56
|
+
return None
|
|
57
|
+
|
|
58
|
+
import subprocess
|
|
59
|
+
import tempfile
|
|
60
|
+
|
|
61
|
+
script = _REPAIR_BAT.replace("<EXE>", exe.replace("%", "%%")) # %% so cmd won't expand the path
|
|
62
|
+
path = None
|
|
63
|
+
try:
|
|
64
|
+
fd, path = tempfile.mkstemp(prefix="redfetch-repair-", suffix=".bat")
|
|
65
|
+
with os.fdopen(fd, "w") as handle:
|
|
66
|
+
handle.write(script)
|
|
67
|
+
subprocess.Popen(
|
|
68
|
+
["cmd.exe", "/c", path],
|
|
69
|
+
creationflags=subprocess.CREATE_NEW_CONSOLE,
|
|
70
|
+
close_fds=True,
|
|
71
|
+
)
|
|
72
|
+
except Exception:
|
|
73
|
+
if path:
|
|
74
|
+
try:
|
|
75
|
+
os.unlink(path)
|
|
76
|
+
except OSError:
|
|
77
|
+
pass
|
|
78
|
+
return None
|
|
79
|
+
return 0
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def main() -> int:
|
|
83
|
+
try:
|
|
84
|
+
entrypoint = _import_entrypoint()
|
|
85
|
+
except ImportError:
|
|
86
|
+
code = _schedule_repair()
|
|
87
|
+
if code is None:
|
|
88
|
+
raise
|
|
89
|
+
print("redfetch needs to finish setting up; opening a repair window...",
|
|
90
|
+
file=sys.stderr)
|
|
91
|
+
return code
|
|
92
|
+
|
|
93
|
+
sys.argv[0] = "redfetch" # so typer's --help shows "redfetch", not this script's path
|
|
94
|
+
entrypoint() # errors past here are app logic, not install problems -> don't self-heal
|
|
95
|
+
return 0
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
if __name__ == "__main__":
|
|
99
|
+
raise SystemExit(main())
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '1.4.
|
|
22
|
-
__version_tuple__ = version_tuple = (1, 4,
|
|
21
|
+
__version__ = version = '1.4.3'
|
|
22
|
+
__version_tuple__ = version_tuple = (1, 4, 3)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -493,3 +493,9 @@ def write_env_to_file(new_env):
|
|
|
493
493
|
raise RuntimeError("Configuration has not been initialized. Call initialize_config() first.")
|
|
494
494
|
|
|
495
495
|
env_loader.write(env_file_path, {"REDFETCH_ENV": new_env})
|
|
496
|
+
|
|
497
|
+
# Env changed -> re-shows server/config banner.
|
|
498
|
+
try:
|
|
499
|
+
os.remove(os.path.join(os.path.dirname(env_file_path), ".banner_shown"))
|
|
500
|
+
except OSError:
|
|
501
|
+
pass
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import os
|
|
5
5
|
import platform
|
|
6
6
|
import json
|
|
7
|
+
import time
|
|
7
8
|
|
|
8
9
|
# Third-party
|
|
9
10
|
from platformdirs import user_config_dir
|
|
@@ -21,6 +22,25 @@ from redfetch.detecteq import find_everquest_uninstall_location
|
|
|
21
22
|
|
|
22
23
|
console = Console()
|
|
23
24
|
|
|
25
|
+
# server type and config dir banner
|
|
26
|
+
BANNER_COOLDOWN = 12 * 3600
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _banner_due(config_dir):
|
|
30
|
+
"""True unless the banner was shown within the cooldown window."""
|
|
31
|
+
marker = os.path.join(config_dir, ".banner_shown")
|
|
32
|
+
try:
|
|
33
|
+
return (time.time() - os.path.getmtime(marker)) > BANNER_COOLDOWN
|
|
34
|
+
except OSError:
|
|
35
|
+
return True
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def _mark_banner_shown(config_dir):
|
|
39
|
+
try:
|
|
40
|
+
open(os.path.join(config_dir, ".banner_shown"), "w").close()
|
|
41
|
+
except OSError:
|
|
42
|
+
pass
|
|
43
|
+
|
|
24
44
|
|
|
25
45
|
# zork-like prompt
|
|
26
46
|
class CustomPrompt(PromptBase):
|
|
@@ -260,7 +280,11 @@ def first_run_setup():
|
|
|
260
280
|
if pypi_url_override:
|
|
261
281
|
notice_lines.append(f"[bold yellow]REDFETCH_PYPI_URL:[/bold yellow] {pypi_url_override}")
|
|
262
282
|
|
|
263
|
-
|
|
283
|
+
# Env overrides always spam the status/config banner.
|
|
284
|
+
has_overrides = len(notice_lines) > 2
|
|
285
|
+
if has_overrides or _banner_due(config_dir):
|
|
286
|
+
console.print(Panel("\n".join(notice_lines), expand=False))
|
|
287
|
+
_mark_banner_shown(config_dir)
|
|
264
288
|
return config_dir
|
|
265
289
|
else:
|
|
266
290
|
console.print("[bold red]Environment file (.env) not found. Rerunning setup.[/bold red]")
|
|
@@ -539,6 +539,9 @@ def config_show_command(server: Optional[Env] = typer.Option(None, "--server", "
|
|
|
539
539
|
if not panel_lines:
|
|
540
540
|
panel_lines.append("[dim]No paths are currently configured or opted in for this environment.[/dim]")
|
|
541
541
|
|
|
542
|
+
# Lead with the server type so users always know which env they're on.
|
|
543
|
+
panel_lines.insert(0, f"[bold yellow]Server type:[/bold yellow] {current_env}")
|
|
544
|
+
|
|
542
545
|
console.print(Panel("\n".join(panel_lines), expand=False))
|
|
543
546
|
|
|
544
547
|
# Optional: Show full settings dict with a label
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|