pocketshell 0.3.22__tar.gz → 0.3.23__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.
- {pocketshell-0.3.22 → pocketshell-0.3.23}/PKG-INFO +1 -1
- {pocketshell-0.3.22 → pocketshell-0.3.23}/pyproject.toml +1 -1
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/env.py +13 -16
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/repos.py +0 -7
- {pocketshell-0.3.22 → pocketshell-0.3.23}/.gitignore +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/README.md +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/__init__.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/__main__.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/agent_log.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/cli.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/daemon.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/hooks.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/jobs.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/logs.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/qr_share.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/sessions.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/src/pocketshell/usage.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/__init__.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/test_agent_log.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/test_cli.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/test_daemon.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/test_env.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/test_hooks.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/test_jobs.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/test_logs.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/test_qr_share.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/test_repos.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/test_sessions.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/tests/test_usage.py +0 -0
- {pocketshell-0.3.22 → pocketshell-0.3.23}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pocketshell
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.23
|
|
4
4
|
Summary: Unified server-side Python utility for the PocketShell Android client.
|
|
5
5
|
Project-URL: Homepage, https://github.com/alexeygrigorev/pocketshell
|
|
6
6
|
Project-URL: Issues, https://github.com/alexeygrigorev/pocketshell/issues
|
|
@@ -8,7 +8,7 @@ name = "pocketshell"
|
|
|
8
8
|
# scripts/check-pypi-version.sh enforces this; .github/workflows/build.yml
|
|
9
9
|
# runs that check before publishing to PyPI. See
|
|
10
10
|
# tools/pocketshell/README.md ("Release flow") for the bump procedure.
|
|
11
|
-
version = "0.3.
|
|
11
|
+
version = "0.3.23"
|
|
12
12
|
description = "Unified server-side Python utility for the PocketShell Android client."
|
|
13
13
|
readme = "README.md"
|
|
14
14
|
requires-python = ">=3.11"
|
|
@@ -465,18 +465,15 @@ def render_export(directory: Path) -> str:
|
|
|
465
465
|
# ---------------------------------------------------------------------------
|
|
466
466
|
|
|
467
467
|
|
|
468
|
-
def _resolve_dir(ctx: click.Context, directory: str
|
|
469
|
-
"""Expand ``directory`` and
|
|
468
|
+
def _resolve_dir(ctx: click.Context, directory: str) -> Path:
|
|
469
|
+
"""Expand ``directory`` and require it to be an existing folder.
|
|
470
470
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
471
|
+
Exits with code 2 if the folder is missing. A fresh ``.env`` / ``.envrc``
|
|
472
|
+
is created inside an already-existing folder, so the directory itself must
|
|
473
|
+
be present for both read and write paths.
|
|
474
474
|
"""
|
|
475
475
|
path = Path(os.path.expanduser(directory))
|
|
476
|
-
if
|
|
477
|
-
click.echo(f"pocketshell env: directory does not exist: {path}", err=True)
|
|
478
|
-
ctx.exit(2)
|
|
479
|
-
if not must_exist and not path.is_dir():
|
|
476
|
+
if not path.is_dir():
|
|
480
477
|
click.echo(f"pocketshell env: directory does not exist: {path}", err=True)
|
|
481
478
|
ctx.exit(2)
|
|
482
479
|
return path
|
|
@@ -514,7 +511,7 @@ def env_list(ctx: click.Context, directory: str, json_output: bool) -> None:
|
|
|
514
511
|
|
|
515
512
|
Never prints values (write-only default, D24).
|
|
516
513
|
"""
|
|
517
|
-
path = _resolve_dir(ctx, directory
|
|
514
|
+
path = _resolve_dir(ctx, directory)
|
|
518
515
|
keys = list_keys(path)
|
|
519
516
|
if json_output:
|
|
520
517
|
payload = [
|
|
@@ -558,7 +555,7 @@ def env_get(
|
|
|
558
555
|
Missing keys are simply absent from the output; only a hard error
|
|
559
556
|
(e.g. missing directory) is non-zero.
|
|
560
557
|
"""
|
|
561
|
-
path = _resolve_dir(ctx, directory
|
|
558
|
+
path = _resolve_dir(ctx, directory)
|
|
562
559
|
values = get_values(path, list(keys))
|
|
563
560
|
if json_output:
|
|
564
561
|
click.echo(json.dumps(values, indent=2, sort_keys=True))
|
|
@@ -589,7 +586,7 @@ def env_set(ctx: click.Context, directory: str, file_name: str) -> None:
|
|
|
589
586
|
`ps`/scrollback. Comments, ordering, and untouched keys are
|
|
590
587
|
preserved (surgical rewrite).
|
|
591
588
|
"""
|
|
592
|
-
path = _resolve_dir(ctx, directory
|
|
589
|
+
path = _resolve_dir(ctx, directory)
|
|
593
590
|
raw = sys.stdin.read()
|
|
594
591
|
if not raw.strip():
|
|
595
592
|
click.echo("pocketshell env set: no JSON on stdin", err=True)
|
|
@@ -627,7 +624,7 @@ def env_set(ctx: click.Context, directory: str, file_name: str) -> None:
|
|
|
627
624
|
@click.pass_context
|
|
628
625
|
def env_unset(ctx: click.Context, directory: str, keys: tuple[str, ...]) -> None:
|
|
629
626
|
"""Delete the named key(s) from both files, leaving the rest intact."""
|
|
630
|
-
path = _resolve_dir(ctx, directory
|
|
627
|
+
path = _resolve_dir(ctx, directory)
|
|
631
628
|
unset_keys(path, list(keys))
|
|
632
629
|
|
|
633
630
|
|
|
@@ -662,8 +659,8 @@ def env_copy(
|
|
|
662
659
|
file_name: str,
|
|
663
660
|
) -> None:
|
|
664
661
|
"""Copy named keys' values from source folder into the destination."""
|
|
665
|
-
src = _resolve_dir(ctx, src_dir
|
|
666
|
-
dst = _resolve_dir(ctx, dst_dir
|
|
662
|
+
src = _resolve_dir(ctx, src_dir)
|
|
663
|
+
dst = _resolve_dir(ctx, dst_dir)
|
|
667
664
|
copy_keys(src, dst, list(keys), dst_file=file_name)
|
|
668
665
|
|
|
669
666
|
|
|
@@ -675,7 +672,7 @@ def env_copy(
|
|
|
675
672
|
@click.pass_context
|
|
676
673
|
def env_export(ctx: click.Context, directory: str) -> None:
|
|
677
674
|
"""Emit an `eval`-safe `export KEY=value` block merging both files."""
|
|
678
|
-
path = _resolve_dir(ctx, directory
|
|
675
|
+
path = _resolve_dir(ctx, directory)
|
|
679
676
|
rendered = render_export(path)
|
|
680
677
|
if rendered:
|
|
681
678
|
sys.stdout.write(rendered)
|
|
@@ -1533,10 +1533,3 @@ def daemon_handler_open(params: dict[str, Any]) -> dict[str, Any]:
|
|
|
1533
1533
|
"path": repo.local.path,
|
|
1534
1534
|
"full_name": repo.full_name,
|
|
1535
1535
|
}
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
# Back-compat re-export so any in-tree caller that imports
|
|
1539
|
-
# ``daemon_handler`` (the original single-handler name) keeps working
|
|
1540
|
-
# until the next refactor moves them over. The daemon module itself
|
|
1541
|
-
# uses the explicit ``daemon_handler_local`` name.
|
|
1542
|
-
daemon_handler = daemon_handler_local
|
|
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
|