cookiesync-cli 0.1.0__tar.gz → 0.1.2__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.
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/PKG-INFO +1 -1
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cli.py +1 -1
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/daemon/engine.py +12 -2
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/helper.py +8 -2
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/pyproject.toml +1 -1
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/LICENSE +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/README.md +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/__init__.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/__main__.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/__init__.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/backend.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/browsers.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/consent.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/crypto.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/domains.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/getcookie.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/merge.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/models.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/pipeline.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/serialize.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/cookie/stores.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/daemon/__init__.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/daemon/backend_ssh.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/daemon/cache.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/daemon/rpc.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/daemon/server.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/daemon/session.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/daemon/sync.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/daemon/wire.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/paths.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/py.typed +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/registry.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/service.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/state.py +0 -0
- {cookiesync_cli-0.1.0 → cookiesync_cli-0.1.2}/cookiesync/transport.py +0 -0
|
@@ -32,6 +32,7 @@ from dataclasses import dataclass, field
|
|
|
32
32
|
from typing import TYPE_CHECKING, NewType, Protocol
|
|
33
33
|
|
|
34
34
|
import anyio
|
|
35
|
+
from loguru import logger
|
|
35
36
|
|
|
36
37
|
from cookiesync.cookie import REGISTRY
|
|
37
38
|
from cookiesync.cookie.browsers import BrowserName
|
|
@@ -101,10 +102,19 @@ async def cookies_mtime(endpoint: BrowserEndpoint) -> float:
|
|
|
101
102
|
|
|
102
103
|
|
|
103
104
|
async def watch_endpoint(endpoint: BrowserEndpoint) -> AsyncIterator[object]:
|
|
104
|
-
"""Yield once per ``watchfiles`` change batch on an endpoint's profile directory.
|
|
105
|
+
"""Yield once per ``watchfiles`` change batch on an endpoint's profile directory.
|
|
106
|
+
|
|
107
|
+
A local endpoint whose profile directory does not exist yet — e.g. a registered sync
|
|
108
|
+
target this host has not created — has nothing to watch. Log and return rather than let
|
|
109
|
+
``watchfiles`` raise ``FileNotFoundError`` and tear the whole daemon down.
|
|
110
|
+
"""
|
|
105
111
|
from watchfiles import awatch
|
|
106
112
|
|
|
107
|
-
|
|
113
|
+
directory = watch_dir(endpoint)
|
|
114
|
+
if not await anyio.Path(str(directory)).exists():
|
|
115
|
+
logger.warning("not watching {}: profile dir {} does not exist", endpoint.id, directory)
|
|
116
|
+
return
|
|
117
|
+
async for changes in awatch(directory):
|
|
108
118
|
yield changes
|
|
109
119
|
|
|
110
120
|
|
|
@@ -50,7 +50,9 @@ async def developer_id_signed(app_path: Path) -> bool:
|
|
|
50
50
|
returns ``False``.
|
|
51
51
|
"""
|
|
52
52
|
result = await anyio.run_process(
|
|
53
|
-
|
|
53
|
+
# -R takes the requirement inline via `-R=<req>`; as a separate argv (`-R`, `<req>`)
|
|
54
|
+
# codesign reads it as a requirement *file* path and fails "invalid requirement".
|
|
55
|
+
[CODESIGN, "--verify", "--strict", f"-R={DEVELOPER_ID_REQUIREMENT}", str(app_path)],
|
|
54
56
|
check=False,
|
|
55
57
|
)
|
|
56
58
|
return result.returncode == 0
|
|
@@ -76,7 +78,11 @@ async def supports_contract() -> bool:
|
|
|
76
78
|
[str(paths.helper_binary()), "vault-status", PROBE_VAULT],
|
|
77
79
|
check=False,
|
|
78
80
|
)
|
|
79
|
-
|
|
81
|
+
# vault-status prints the contract line then exits 2 ("unavailable") for a vault that
|
|
82
|
+
# doesn't exist — our probe vault never does — so the contract line on stdout, not the
|
|
83
|
+
# exit code, is the capability signal. A helper lacking the subcommand prints usage to
|
|
84
|
+
# stderr and emits no such line.
|
|
85
|
+
return CONTRACT_LINE.search(result.stdout) is not None
|
|
80
86
|
|
|
81
87
|
|
|
82
88
|
async def install_helper() -> Path:
|
|
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
|