steve-cli 0.3.5__tar.gz → 0.3.7__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.
- {steve_cli-0.3.5 → steve_cli-0.3.7}/PKG-INFO +1 -1
- {steve_cli-0.3.5 → steve_cli-0.3.7}/pyproject.toml +1 -1
- {steve_cli-0.3.5 → steve_cli-0.3.7}/steve_cli/cli.py +19 -3
- {steve_cli-0.3.5 → steve_cli-0.3.7}/steve_cli.egg-info/PKG-INFO +1 -1
- {steve_cli-0.3.5 → steve_cli-0.3.7}/README.md +0 -0
- {steve_cli-0.3.5 → steve_cli-0.3.7}/setup.cfg +0 -0
- {steve_cli-0.3.5 → steve_cli-0.3.7}/steve_cli/__init__.py +0 -0
- {steve_cli-0.3.5 → steve_cli-0.3.7}/steve_cli/storage.py +0 -0
- {steve_cli-0.3.5 → steve_cli-0.3.7}/steve_cli.egg-info/SOURCES.txt +0 -0
- {steve_cli-0.3.5 → steve_cli-0.3.7}/steve_cli.egg-info/dependency_links.txt +0 -0
- {steve_cli-0.3.5 → steve_cli-0.3.7}/steve_cli.egg-info/entry_points.txt +0 -0
- {steve_cli-0.3.5 → steve_cli-0.3.7}/steve_cli.egg-info/requires.txt +0 -0
- {steve_cli-0.3.5 → steve_cli-0.3.7}/steve_cli.egg-info/top_level.txt +0 -0
|
@@ -178,6 +178,7 @@ def jobs_run(job_name: str, jobs_file: Optional[Path]):
|
|
|
178
178
|
|
|
179
179
|
APPS_DIR = Path.home() / ".steve" / "apps"
|
|
180
180
|
AUTH_PROXY_INTERNAL_URL = "http://auth-proxy-service"
|
|
181
|
+
APP_NAME_PREFIX = "term-"
|
|
181
182
|
|
|
182
183
|
|
|
183
184
|
class AppsConfig:
|
|
@@ -227,6 +228,10 @@ def _pid_file(app_name: str) -> Path:
|
|
|
227
228
|
return APPS_DIR / f"{app_name}.pid"
|
|
228
229
|
|
|
229
230
|
|
|
231
|
+
def _url_file(app_name: str) -> Path:
|
|
232
|
+
return APPS_DIR / f"{app_name}.url"
|
|
233
|
+
|
|
234
|
+
|
|
230
235
|
def _get_running_pid(app_name: str) -> Optional[int]:
|
|
231
236
|
pf = _pid_file(app_name)
|
|
232
237
|
if not pf.exists():
|
|
@@ -314,6 +319,10 @@ def apps_list(apps_file: Optional[Path]):
|
|
|
314
319
|
if command:
|
|
315
320
|
click.echo(f" Command: {click.style(' '.join(command), fg='cyan')}")
|
|
316
321
|
click.echo(f" Port: {click.style(str(port), fg='magenta')}")
|
|
322
|
+
if pid:
|
|
323
|
+
uf = _url_file(name)
|
|
324
|
+
url = uf.read_text().strip() if uf.exists() else f'http://localhost:{port}'
|
|
325
|
+
click.echo(f" URL: {click.style(url, fg='cyan')}")
|
|
317
326
|
if env_vars:
|
|
318
327
|
click.echo(f" Environment: {click.style(f'{len(env_vars)} variables', fg='green')}")
|
|
319
328
|
click.echo()
|
|
@@ -342,6 +351,9 @@ def apps_start(app_name: str, apps_file: Optional[Path]):
|
|
|
342
351
|
existing_pid = _get_running_pid(app_name)
|
|
343
352
|
if existing_pid:
|
|
344
353
|
click.echo(f"⚠️ App '{app_name}' is already running (PID {existing_pid})")
|
|
354
|
+
uf = _url_file(app_name)
|
|
355
|
+
if uf.exists():
|
|
356
|
+
click.echo(f"🌐 Access at: {click.style(uf.read_text().strip(), fg='cyan')}")
|
|
345
357
|
return
|
|
346
358
|
|
|
347
359
|
command = app_def.get('command', [])
|
|
@@ -383,7 +395,7 @@ def apps_start(app_name: str, apps_file: Optional[Path]):
|
|
|
383
395
|
|
|
384
396
|
_pid_file(app_name).write_text(str(proc.pid))
|
|
385
397
|
|
|
386
|
-
result = _register_app(session_name, app_name, port)
|
|
398
|
+
result = _register_app(session_name, f"{APP_NAME_PREFIX}{app_name}", port)
|
|
387
399
|
|
|
388
400
|
if result:
|
|
389
401
|
click.echo(f"✅ App started (PID {proc.pid}) and registered with auth-proxy")
|
|
@@ -395,7 +407,10 @@ def apps_start(app_name: str, apps_file: Optional[Path]):
|
|
|
395
407
|
if public_url:
|
|
396
408
|
click.echo(f"🌐 Access at: {click.style(public_url, fg='cyan')}")
|
|
397
409
|
else:
|
|
398
|
-
|
|
410
|
+
public_url = f'http://localhost:{port}'
|
|
411
|
+
click.echo(f"🌐 Access at (local): {click.style(public_url, fg='yellow')}")
|
|
412
|
+
|
|
413
|
+
_url_file(app_name).write_text(public_url)
|
|
399
414
|
|
|
400
415
|
click.echo(f"📄 Logs: {click.style(str(log_file), fg='yellow')}")
|
|
401
416
|
|
|
@@ -420,9 +435,10 @@ def apps_stop(app_name: str, apps_file: Optional[Path]):
|
|
|
420
435
|
click.echo(f"❌ Failed to stop process: {e}", err=True)
|
|
421
436
|
|
|
422
437
|
_pid_file(app_name).unlink(missing_ok=True)
|
|
438
|
+
_url_file(app_name).unlink(missing_ok=True)
|
|
423
439
|
|
|
424
440
|
if session_name:
|
|
425
|
-
_deregister_app(session_name, app_name)
|
|
441
|
+
_deregister_app(session_name, f"{APP_NAME_PREFIX}{app_name}")
|
|
426
442
|
click.echo(f"🔌 Deregistered from auth-proxy")
|
|
427
443
|
|
|
428
444
|
|
|
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
|