chatup 0.2.2__tar.gz → 0.2.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.
- {chatup-0.2.2/src/chatup.egg-info → chatup-0.2.3}/PKG-INFO +6 -6
- {chatup-0.2.2 → chatup-0.2.3}/README.md +4 -4
- {chatup-0.2.2 → chatup-0.2.3}/pyproject.toml +1 -1
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/__init__.py +1 -1
- chatup-0.2.3/src/chatup/chrome_for_testing.py +126 -0
- chatup-0.2.3/src/chatup/chromedriver.py +147 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/cli.py +4 -0
- chatup-0.2.3/src/chatup/commands/__init__.py +1 -0
- chatup-0.2.3/src/chatup/commands/chrome_for_testing.py +442 -0
- chatup-0.2.3/src/chatup/commands/chromedriver.py +475 -0
- chatup-0.2.3/src/chatup/runtime/__init__.py +5 -0
- chatup-0.2.3/src/chatup/runtime/_managed_artifact.py +178 -0
- chatup-0.2.2/src/chatup/runtime/browser.py → chatup-0.2.3/src/chatup/runtime/chrome_for_testing.py +275 -185
- chatup-0.2.3/src/chatup/runtime/chromedriver.py +747 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/elements.py +2 -97
- {chatup-0.2.2 → chatup-0.2.3/src/chatup.egg-info}/PKG-INFO +6 -6
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup.egg-info/SOURCES.txt +11 -4
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup.egg-info/requires.txt +1 -1
- chatup-0.2.3/tests/test_browser_backend_cli.py +47 -0
- chatup-0.2.3/tests/test_chrome_for_testing.py +570 -0
- chatup-0.2.3/tests/test_chromedriver.py +602 -0
- {chatup-0.2.2 → chatup-0.2.3}/tests/test_cli_tree_docs.py +30 -4
- {chatup-0.2.2 → chatup-0.2.3}/tests/test_pyproject_metadata.py +1 -1
- {chatup-0.2.2 → chatup-0.2.3}/tests/test_setup_cli.py +4 -1
- {chatup-0.2.2 → chatup-0.2.3}/tests/test_version.py +2 -2
- chatup-0.2.2/src/chatup/chrome.py +0 -21
- chatup-0.2.2/src/chatup/runtime/__init__.py +0 -27
- chatup-0.2.2/src/chatup/setup/chrome.py +0 -127
- chatup-0.2.2/tests/test_chrome_runtime.py +0 -345
- {chatup-0.2.2 → chatup-0.2.3}/LICENSE +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/setup.cfg +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/const.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/interaction/__init__.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/interaction/command_schema.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/interaction/policy.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/interaction/warnings.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/__init__.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/assets/hermes/install.sh +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/assets/nvm.sh +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/cc_connect.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/claude.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/cli.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/codex.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/crs.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/docker.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/frp.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/gitea.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/hermes.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/lark_cli.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/mode_prompt.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/mysql.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/nginx.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/nodejs.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/opencode.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/shell_rc.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/uv.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace/__init__.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace/cli.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace/core.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace/options.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace/render.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace/templates/default/en/AGENTS.md +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace/templates/default/en/discussion/README.md +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace/templates/default/en/projects/README.md +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace/templates/default/zh/AGENTS.md +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace/templates/default/zh/discussion/README.md +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace/templates/default/zh/projects/README.md +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/workspace.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/setup/zsh.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/utils/__init__.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/utils/custom_logger.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup/utils/pathing.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup.egg-info/dependency_links.txt +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup.egg-info/entry_points.txt +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/src/chatup.egg-info/top_level.txt +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/tests/test_crs_setup.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/tests/test_publish_workflow.py +0 -0
- {chatup-0.2.2 → chatup-0.2.3}/tests/test_workspace_setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: chatup
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: ChatArch setup CLI extracted from ChatTool
|
|
5
5
|
Author-email: rexwzh <1073853456@qq.com>
|
|
6
6
|
License-Expression: MIT
|
|
@@ -14,7 +14,7 @@ Requires-Python: >=3.10
|
|
|
14
14
|
Description-Content-Type: text/markdown
|
|
15
15
|
License-File: LICENSE
|
|
16
16
|
Requires-Dist: click>=8.0
|
|
17
|
-
Requires-Dist: chatstyle<0.2.0,>=0.1.
|
|
17
|
+
Requires-Dist: chatstyle<0.2.0,>=0.1.1
|
|
18
18
|
Requires-Dist: chatenv<0.3.0,>=0.2.0
|
|
19
19
|
Requires-Dist: colorama
|
|
20
20
|
Provides-Extra: docs
|
|
@@ -37,7 +37,7 @@ ChatUp 是 ChatArch 的独立环境与工具安装 CLI。它承接原来 `chatto
|
|
|
37
37
|
| 场景 | 文档 |
|
|
38
38
|
| --- | --- |
|
|
39
39
|
| 从空机器验证 ChatUp、Python runtime 和 workspace | `docs/quickstart.md` |
|
|
40
|
-
| 查看完整一级 CLI 树与
|
|
40
|
+
| 查看完整一级 CLI 树与 CFT/ChromeDriver 独立 contract | `docs/cli-tree.md` |
|
|
41
41
|
| 查看命令分组、参数边界和服务默认路径 | `docs/commands.md` |
|
|
42
42
|
| 校对哪些 ChatArch setup 流程已经有一等命令 | `docs/capability-map.md` |
|
|
43
43
|
| 理解 `chatup workspace` 创建的目录和项目记录约定 | `docs/workspace.md` |
|
|
@@ -49,7 +49,7 @@ ChatUp 是 ChatArch 的独立环境与工具安装 CLI。它承接原来 `chatto
|
|
|
49
49
|
chatup --help
|
|
50
50
|
chatup doctor
|
|
51
51
|
chatup uv
|
|
52
|
-
chatup chrome
|
|
52
|
+
chatup chrome-for-testing install --channel stable -I
|
|
53
53
|
chatup workspace default ~/Playground
|
|
54
54
|
```
|
|
55
55
|
|
|
@@ -67,12 +67,12 @@ chatup crs --install-dir ~/.chatarch/crs/local --port 12392 --redis-port 6379
|
|
|
67
67
|
|
|
68
68
|
| 能力组 | 命令 |
|
|
69
69
|
| --- | --- |
|
|
70
|
-
| 基础运行环境 | `doctor`、`uv`、`nodejs`、`docker`、`zsh`、`chrome`、`frp` |
|
|
70
|
+
| 基础运行环境 | `doctor`、`uv`、`nodejs`、`docker`、`zsh`、`chrome-for-testing`、`chromedriver`、`frp` |
|
|
71
71
|
| 工作区脚手架 | `workspace` |
|
|
72
72
|
| 本地服务安装 | `gitea`、`mysql`、`nginx`、`crs` |
|
|
73
73
|
| Agent 工具链 | `cc-connect`、`claude`、`codex`、`opencode`、`hermes`、`lark-cli` |
|
|
74
74
|
|
|
75
|
-
所有新增安装项默认目录都收敛到 `~/.chatarch/...`,例如 `~/.chatarch/chrome`、`~/.chatarch/chattea`、`~/.chatarch/chatdata`、`~/.chatarch/nginx` 和 `~/.chatarch/crs/local`。更完整的能力边界见 `docs/capability-map.md`。
|
|
75
|
+
所有新增安装项默认目录都收敛到 `~/.chatarch/...`,例如 `~/.chatarch/chrome-for-testing`、`~/.chatarch/chromedriver`、`~/.chatarch/chattea`、`~/.chatarch/chatdata`、`~/.chatarch/nginx` 和 `~/.chatarch/crs/local`。更完整的能力边界见 `docs/capability-map.md`。
|
|
76
76
|
|
|
77
77
|
## 开发
|
|
78
78
|
|
|
@@ -11,7 +11,7 @@ ChatUp 是 ChatArch 的独立环境与工具安装 CLI。它承接原来 `chatto
|
|
|
11
11
|
| 场景 | 文档 |
|
|
12
12
|
| --- | --- |
|
|
13
13
|
| 从空机器验证 ChatUp、Python runtime 和 workspace | `docs/quickstart.md` |
|
|
14
|
-
| 查看完整一级 CLI 树与
|
|
14
|
+
| 查看完整一级 CLI 树与 CFT/ChromeDriver 独立 contract | `docs/cli-tree.md` |
|
|
15
15
|
| 查看命令分组、参数边界和服务默认路径 | `docs/commands.md` |
|
|
16
16
|
| 校对哪些 ChatArch setup 流程已经有一等命令 | `docs/capability-map.md` |
|
|
17
17
|
| 理解 `chatup workspace` 创建的目录和项目记录约定 | `docs/workspace.md` |
|
|
@@ -23,7 +23,7 @@ ChatUp 是 ChatArch 的独立环境与工具安装 CLI。它承接原来 `chatto
|
|
|
23
23
|
chatup --help
|
|
24
24
|
chatup doctor
|
|
25
25
|
chatup uv
|
|
26
|
-
chatup chrome
|
|
26
|
+
chatup chrome-for-testing install --channel stable -I
|
|
27
27
|
chatup workspace default ~/Playground
|
|
28
28
|
```
|
|
29
29
|
|
|
@@ -41,12 +41,12 @@ chatup crs --install-dir ~/.chatarch/crs/local --port 12392 --redis-port 6379
|
|
|
41
41
|
|
|
42
42
|
| 能力组 | 命令 |
|
|
43
43
|
| --- | --- |
|
|
44
|
-
| 基础运行环境 | `doctor`、`uv`、`nodejs`、`docker`、`zsh`、`chrome`、`frp` |
|
|
44
|
+
| 基础运行环境 | `doctor`、`uv`、`nodejs`、`docker`、`zsh`、`chrome-for-testing`、`chromedriver`、`frp` |
|
|
45
45
|
| 工作区脚手架 | `workspace` |
|
|
46
46
|
| 本地服务安装 | `gitea`、`mysql`、`nginx`、`crs` |
|
|
47
47
|
| Agent 工具链 | `cc-connect`、`claude`、`codex`、`opencode`、`hermes`、`lark-cli` |
|
|
48
48
|
|
|
49
|
-
所有新增安装项默认目录都收敛到 `~/.chatarch/...`,例如 `~/.chatarch/chrome`、`~/.chatarch/chattea`、`~/.chatarch/chatdata`、`~/.chatarch/nginx` 和 `~/.chatarch/crs/local`。更完整的能力边界见 `docs/capability-map.md`。
|
|
49
|
+
所有新增安装项默认目录都收敛到 `~/.chatarch/...`,例如 `~/.chatarch/chrome-for-testing`、`~/.chatarch/chromedriver`、`~/.chatarch/chattea`、`~/.chatarch/chatdata`、`~/.chatarch/nginx` 和 `~/.chatarch/crs/local`。更完整的能力边界见 `docs/capability-map.md`。
|
|
50
50
|
|
|
51
51
|
## 开发
|
|
52
52
|
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"""Public API for ChatArch-managed Google Chrome for Testing."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from chatup.runtime.chrome_for_testing import (
|
|
9
|
+
DEFAULT_CHROME_FOR_TESTING_HOME,
|
|
10
|
+
SUPPORTED_CFT_PLATFORMS,
|
|
11
|
+
ChromeForTestingError,
|
|
12
|
+
ChromeForTestingInstallation,
|
|
13
|
+
doctor_chrome_for_testing,
|
|
14
|
+
ensure_chrome_for_testing,
|
|
15
|
+
garbage_collect_chrome_for_testing,
|
|
16
|
+
install_chrome_for_testing,
|
|
17
|
+
list_chrome_for_testing,
|
|
18
|
+
remove_chrome_for_testing,
|
|
19
|
+
resolve_chrome_for_testing,
|
|
20
|
+
)
|
|
21
|
+
|
|
22
|
+
DEFAULT_HOME = DEFAULT_CHROME_FOR_TESTING_HOME
|
|
23
|
+
SUPPORTED_PLATFORMS = SUPPORTED_CFT_PLATFORMS
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def install(
|
|
27
|
+
version: str = "stable",
|
|
28
|
+
*,
|
|
29
|
+
home: Path | str | None = None,
|
|
30
|
+
platform: str | None = None,
|
|
31
|
+
expected_sha256: str | None = None,
|
|
32
|
+
force: bool = False,
|
|
33
|
+
) -> ChromeForTestingInstallation:
|
|
34
|
+
return install_chrome_for_testing(
|
|
35
|
+
version,
|
|
36
|
+
home=home,
|
|
37
|
+
cft_platform=platform,
|
|
38
|
+
expected_sha256=expected_sha256,
|
|
39
|
+
force=force,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def ensure(
|
|
44
|
+
version: str,
|
|
45
|
+
*,
|
|
46
|
+
home: Path | str | None = None,
|
|
47
|
+
platform: str | None = None,
|
|
48
|
+
expected_sha256: str | None = None,
|
|
49
|
+
) -> ChromeForTestingInstallation:
|
|
50
|
+
return ensure_chrome_for_testing(
|
|
51
|
+
version,
|
|
52
|
+
home=home,
|
|
53
|
+
cft_platform=platform,
|
|
54
|
+
expected_sha256=expected_sha256,
|
|
55
|
+
)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def resolve(
|
|
59
|
+
version: str,
|
|
60
|
+
*,
|
|
61
|
+
home: Path | str | None = None,
|
|
62
|
+
platform: str | None = None,
|
|
63
|
+
) -> ChromeForTestingInstallation:
|
|
64
|
+
return resolve_chrome_for_testing(
|
|
65
|
+
version,
|
|
66
|
+
home=home,
|
|
67
|
+
cft_platform=platform,
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
def list_installations(
|
|
72
|
+
*,
|
|
73
|
+
home: Path | str | None = None,
|
|
74
|
+
) -> list[ChromeForTestingInstallation]:
|
|
75
|
+
return list_chrome_for_testing(home=home)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def doctor(
|
|
79
|
+
installation: ChromeForTestingInstallation,
|
|
80
|
+
*,
|
|
81
|
+
execute: bool = True,
|
|
82
|
+
) -> dict[str, Any]:
|
|
83
|
+
return doctor_chrome_for_testing(installation, execute=execute)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def remove(
|
|
87
|
+
version: str,
|
|
88
|
+
*,
|
|
89
|
+
home: Path | str | None = None,
|
|
90
|
+
platform: str | None = None,
|
|
91
|
+
) -> ChromeForTestingInstallation:
|
|
92
|
+
return remove_chrome_for_testing(
|
|
93
|
+
version,
|
|
94
|
+
home=home,
|
|
95
|
+
cft_platform=platform,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
def gc(
|
|
100
|
+
*,
|
|
101
|
+
home: Path | str | None = None,
|
|
102
|
+
dry_run: bool = True,
|
|
103
|
+
yes: bool = False,
|
|
104
|
+
minimum_age_seconds: int = 24 * 60 * 60,
|
|
105
|
+
) -> dict[str, Any]:
|
|
106
|
+
return garbage_collect_chrome_for_testing(
|
|
107
|
+
home=home,
|
|
108
|
+
dry_run=dry_run,
|
|
109
|
+
yes=yes,
|
|
110
|
+
minimum_age_seconds=minimum_age_seconds,
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
__all__ = [
|
|
115
|
+
"DEFAULT_HOME",
|
|
116
|
+
"SUPPORTED_PLATFORMS",
|
|
117
|
+
"ChromeForTestingError",
|
|
118
|
+
"ChromeForTestingInstallation",
|
|
119
|
+
"doctor",
|
|
120
|
+
"ensure",
|
|
121
|
+
"gc",
|
|
122
|
+
"install",
|
|
123
|
+
"list_installations",
|
|
124
|
+
"remove",
|
|
125
|
+
"resolve",
|
|
126
|
+
]
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"""Public API for ChatArch-managed ChromeDriver installations."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from typing import Any
|
|
7
|
+
|
|
8
|
+
from chatup.runtime.chromedriver import (
|
|
9
|
+
DEFAULT_CHROMEDRIVER_HOME,
|
|
10
|
+
SUPPORTED_CHROMEDRIVER_PLATFORMS,
|
|
11
|
+
ChromeDriverError,
|
|
12
|
+
ChromeDriverInstallation,
|
|
13
|
+
doctor_chromedriver,
|
|
14
|
+
ensure_chromedriver,
|
|
15
|
+
garbage_collect_chromedriver,
|
|
16
|
+
install_chromedriver,
|
|
17
|
+
list_chromedrivers,
|
|
18
|
+
read_browser_version,
|
|
19
|
+
remove_chromedriver,
|
|
20
|
+
resolve_chromedriver,
|
|
21
|
+
resolve_chromedriver_for_browser_version,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
DEFAULT_HOME = DEFAULT_CHROMEDRIVER_HOME
|
|
25
|
+
SUPPORTED_PLATFORMS = SUPPORTED_CHROMEDRIVER_PLATFORMS
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def install(
|
|
29
|
+
version: str | None = None,
|
|
30
|
+
*,
|
|
31
|
+
match_browser: Path | str | None = None,
|
|
32
|
+
match_cft_version: str | None = None,
|
|
33
|
+
home: Path | str | None = None,
|
|
34
|
+
platform: str | None = None,
|
|
35
|
+
expected_sha256: str | None = None,
|
|
36
|
+
force: bool = False,
|
|
37
|
+
) -> ChromeDriverInstallation:
|
|
38
|
+
return install_chromedriver(
|
|
39
|
+
version,
|
|
40
|
+
match_browser=match_browser,
|
|
41
|
+
match_cft_version=match_cft_version,
|
|
42
|
+
home=home,
|
|
43
|
+
driver_platform=platform,
|
|
44
|
+
expected_sha256=expected_sha256,
|
|
45
|
+
force=force,
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def ensure(
|
|
50
|
+
version: str,
|
|
51
|
+
*,
|
|
52
|
+
home: Path | str | None = None,
|
|
53
|
+
platform: str | None = None,
|
|
54
|
+
expected_sha256: str | None = None,
|
|
55
|
+
) -> ChromeDriverInstallation:
|
|
56
|
+
return ensure_chromedriver(
|
|
57
|
+
version,
|
|
58
|
+
home=home,
|
|
59
|
+
driver_platform=platform,
|
|
60
|
+
expected_sha256=expected_sha256,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def resolve(
|
|
65
|
+
version: str,
|
|
66
|
+
*,
|
|
67
|
+
home: Path | str | None = None,
|
|
68
|
+
platform: str | None = None,
|
|
69
|
+
) -> ChromeDriverInstallation:
|
|
70
|
+
return resolve_chromedriver(
|
|
71
|
+
version,
|
|
72
|
+
home=home,
|
|
73
|
+
driver_platform=platform,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def resolve_for_browser_version(
|
|
78
|
+
browser_version: str,
|
|
79
|
+
*,
|
|
80
|
+
platform: str | None = None,
|
|
81
|
+
) -> tuple[str, str, str]:
|
|
82
|
+
"""Resolve the official compatible ChromeDriver artifact for a browser."""
|
|
83
|
+
|
|
84
|
+
return resolve_chromedriver_for_browser_version(
|
|
85
|
+
browser_version,
|
|
86
|
+
driver_platform=platform,
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
def list_installations(
|
|
91
|
+
*,
|
|
92
|
+
home: Path | str | None = None,
|
|
93
|
+
) -> list[ChromeDriverInstallation]:
|
|
94
|
+
return list_chromedrivers(home=home)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def doctor(
|
|
98
|
+
installation: ChromeDriverInstallation,
|
|
99
|
+
*,
|
|
100
|
+
execute: bool = True,
|
|
101
|
+
) -> dict[str, Any]:
|
|
102
|
+
return doctor_chromedriver(installation, execute=execute)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
def remove(
|
|
106
|
+
version: str,
|
|
107
|
+
*,
|
|
108
|
+
home: Path | str | None = None,
|
|
109
|
+
platform: str | None = None,
|
|
110
|
+
) -> ChromeDriverInstallation:
|
|
111
|
+
return remove_chromedriver(
|
|
112
|
+
version,
|
|
113
|
+
home=home,
|
|
114
|
+
driver_platform=platform,
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def gc(
|
|
119
|
+
*,
|
|
120
|
+
home: Path | str | None = None,
|
|
121
|
+
dry_run: bool = True,
|
|
122
|
+
yes: bool = False,
|
|
123
|
+
minimum_age_seconds: int = 24 * 60 * 60,
|
|
124
|
+
) -> dict[str, Any]:
|
|
125
|
+
return garbage_collect_chromedriver(
|
|
126
|
+
home=home,
|
|
127
|
+
dry_run=dry_run,
|
|
128
|
+
yes=yes,
|
|
129
|
+
minimum_age_seconds=minimum_age_seconds,
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
__all__ = [
|
|
134
|
+
"DEFAULT_HOME",
|
|
135
|
+
"SUPPORTED_PLATFORMS",
|
|
136
|
+
"ChromeDriverError",
|
|
137
|
+
"ChromeDriverInstallation",
|
|
138
|
+
"doctor",
|
|
139
|
+
"ensure",
|
|
140
|
+
"gc",
|
|
141
|
+
"install",
|
|
142
|
+
"list_installations",
|
|
143
|
+
"read_browser_version",
|
|
144
|
+
"remove",
|
|
145
|
+
"resolve",
|
|
146
|
+
"resolve_for_browser_version",
|
|
147
|
+
]
|
|
@@ -3,6 +3,8 @@ from __future__ import annotations
|
|
|
3
3
|
import click
|
|
4
4
|
|
|
5
5
|
from chatup import __version__
|
|
6
|
+
from chatup.commands.chrome_for_testing import cli as chrome_for_testing_cli
|
|
7
|
+
from chatup.commands.chromedriver import cli as chromedriver_cli
|
|
6
8
|
from chatup.setup.cli import register_setup_commands
|
|
7
9
|
|
|
8
10
|
|
|
@@ -19,6 +21,8 @@ def doctor() -> None:
|
|
|
19
21
|
|
|
20
22
|
|
|
21
23
|
register_setup_commands(main)
|
|
24
|
+
main.add_command(chrome_for_testing_cli)
|
|
25
|
+
main.add_command(chromedriver_cli)
|
|
22
26
|
|
|
23
27
|
|
|
24
28
|
if __name__ == "__main__":
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Click command groups for ChatUp backends."""
|