cookey 0.4.0__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.
- cookey-0.4.0/PKG-INFO +18 -0
- cookey-0.4.0/cookey.egg-info/PKG-INFO +18 -0
- cookey-0.4.0/cookey.egg-info/SOURCES.txt +14 -0
- cookey-0.4.0/cookey.egg-info/dependency_links.txt +1 -0
- cookey-0.4.0/cookey.egg-info/entry_points.txt +2 -0
- cookey-0.4.0/cookey.egg-info/top_level.txt +1 -0
- cookey-0.4.0/cookey_cli/__init__.py +3 -0
- cookey-0.4.0/cookey_cli/__main__.py +5 -0
- cookey-0.4.0/cookey_cli/_version.py +1 -0
- cookey-0.4.0/cookey_cli/bin/cookey-darwin-arm64 +0 -0
- cookey-0.4.0/cookey_cli/bin/cookey-darwin-x64 +0 -0
- cookey-0.4.0/cookey_cli/bin/cookey-linux-arm64 +0 -0
- cookey-0.4.0/cookey_cli/bin/cookey-linux-x64 +0 -0
- cookey-0.4.0/cookey_cli/launcher.py +83 -0
- cookey-0.4.0/pyproject.toml +38 -0
- cookey-0.4.0/setup.cfg +4 -0
cookey-0.4.0/PKG-INFO
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cookey
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Cookey CLI — capture authenticated mobile browser sessions as Playwright storageState JSON
|
|
5
|
+
Author: Lakr233
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Lakr233/Cookey
|
|
8
|
+
Project-URL: Repository, https://github.com/Lakr233/Cookey
|
|
9
|
+
Keywords: cookey,cli,playwright,session,automation
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
16
|
+
Classifier: Topic :: Utilities
|
|
17
|
+
Requires-Python: >=3.9
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: cookey
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: Cookey CLI — capture authenticated mobile browser sessions as Playwright storageState JSON
|
|
5
|
+
Author: Lakr233
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Lakr233/Cookey
|
|
8
|
+
Project-URL: Repository, https://github.com/Lakr233/Cookey
|
|
9
|
+
Keywords: cookey,cli,playwright,session,automation
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Operating System :: MacOS
|
|
13
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
16
|
+
Classifier: Topic :: Utilities
|
|
17
|
+
Requires-Python: >=3.9
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
pyproject.toml
|
|
2
|
+
cookey.egg-info/PKG-INFO
|
|
3
|
+
cookey.egg-info/SOURCES.txt
|
|
4
|
+
cookey.egg-info/dependency_links.txt
|
|
5
|
+
cookey.egg-info/entry_points.txt
|
|
6
|
+
cookey.egg-info/top_level.txt
|
|
7
|
+
cookey_cli/__init__.py
|
|
8
|
+
cookey_cli/__main__.py
|
|
9
|
+
cookey_cli/_version.py
|
|
10
|
+
cookey_cli/launcher.py
|
|
11
|
+
cookey_cli/bin/cookey-darwin-arm64
|
|
12
|
+
cookey_cli/bin/cookey-darwin-x64
|
|
13
|
+
cookey_cli/bin/cookey-linux-arm64
|
|
14
|
+
cookey_cli/bin/cookey-linux-x64
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
cookey_cli
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.4.0"
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import platform
|
|
5
|
+
import stat
|
|
6
|
+
import subprocess
|
|
7
|
+
import sys
|
|
8
|
+
from importlib import resources
|
|
9
|
+
|
|
10
|
+
TARGETS = {
|
|
11
|
+
"darwin-x64": {
|
|
12
|
+
"platform": "darwin",
|
|
13
|
+
"arch": "x64",
|
|
14
|
+
"binary_name": "cookey-darwin-x64",
|
|
15
|
+
},
|
|
16
|
+
"darwin-arm64": {
|
|
17
|
+
"platform": "darwin",
|
|
18
|
+
"arch": "arm64",
|
|
19
|
+
"binary_name": "cookey-darwin-arm64",
|
|
20
|
+
},
|
|
21
|
+
"linux-x64": {
|
|
22
|
+
"platform": "linux",
|
|
23
|
+
"arch": "x64",
|
|
24
|
+
"binary_name": "cookey-linux-x64",
|
|
25
|
+
},
|
|
26
|
+
"linux-arm64": {
|
|
27
|
+
"platform": "linux",
|
|
28
|
+
"arch": "arm64",
|
|
29
|
+
"binary_name": "cookey-linux-arm64",
|
|
30
|
+
},
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def format_target(runtime_platform: str, runtime_arch: str) -> str:
|
|
35
|
+
return f"{runtime_platform}-{runtime_arch}"
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def detect_target() -> dict[str, str]:
|
|
39
|
+
runtime_platform = sys.platform
|
|
40
|
+
machine = platform.machine().lower()
|
|
41
|
+
|
|
42
|
+
if runtime_platform == "darwin":
|
|
43
|
+
runtime_arch = "arm64" if machine in {"arm64", "aarch64"} else "x64"
|
|
44
|
+
elif runtime_platform == "linux":
|
|
45
|
+
if machine in {"x86_64", "amd64"}:
|
|
46
|
+
runtime_arch = "x64"
|
|
47
|
+
elif machine in {"aarch64", "arm64"}:
|
|
48
|
+
runtime_arch = "arm64"
|
|
49
|
+
else:
|
|
50
|
+
runtime_arch = machine
|
|
51
|
+
else:
|
|
52
|
+
runtime_arch = machine
|
|
53
|
+
|
|
54
|
+
key = format_target(runtime_platform, runtime_arch)
|
|
55
|
+
target = TARGETS.get(key)
|
|
56
|
+
if not target:
|
|
57
|
+
supported = ", ".join(sorted(TARGETS))
|
|
58
|
+
raise RuntimeError(f"Unsupported platform {key}. Supported targets: {supported}")
|
|
59
|
+
return target
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def resolve_binary_path() -> str:
|
|
63
|
+
target = detect_target()
|
|
64
|
+
binary = resources.files("cookey_cli").joinpath("bin", target["binary_name"])
|
|
65
|
+
if not binary.is_file():
|
|
66
|
+
raise RuntimeError(
|
|
67
|
+
f"Missing embedded binary {target['binary_name']} for "
|
|
68
|
+
f"{format_target(target['platform'], target['arch'])}."
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
path = os.fspath(binary)
|
|
72
|
+
mode = os.stat(path).st_mode
|
|
73
|
+
if not mode & stat.S_IXUSR:
|
|
74
|
+
os.chmod(path, mode | stat.S_IXUSR)
|
|
75
|
+
return path
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def main(argv: list[str] | None = None) -> int:
|
|
79
|
+
binary_path = resolve_binary_path()
|
|
80
|
+
completed = subprocess.run([binary_path, *(argv if argv is not None else sys.argv[1:])])
|
|
81
|
+
if completed.returncode < 0:
|
|
82
|
+
os.kill(os.getpid(), -completed.returncode)
|
|
83
|
+
return completed.returncode
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=69", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "cookey"
|
|
7
|
+
version = "0.4.0"
|
|
8
|
+
description = "Cookey CLI — capture authenticated mobile browser sessions as Playwright storageState JSON"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
keywords = ["cookey", "cli", "playwright", "session", "automation"]
|
|
13
|
+
authors = [{ name = "Lakr233" }]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 3 - Alpha",
|
|
16
|
+
"Environment :: Console",
|
|
17
|
+
"Operating System :: MacOS",
|
|
18
|
+
"Operating System :: POSIX :: Linux",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Topic :: Utilities",
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
[project.urls]
|
|
25
|
+
Homepage = "https://github.com/Lakr233/Cookey"
|
|
26
|
+
Repository = "https://github.com/Lakr233/Cookey"
|
|
27
|
+
|
|
28
|
+
[project.scripts]
|
|
29
|
+
cookey = "cookey_cli.__main__:main"
|
|
30
|
+
|
|
31
|
+
[tool.setuptools]
|
|
32
|
+
include-package-data = true
|
|
33
|
+
|
|
34
|
+
[tool.setuptools.packages.find]
|
|
35
|
+
include = ["cookey_cli*"]
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.package-data]
|
|
38
|
+
"cookey_cli" = ["bin/*"]
|
cookey-0.4.0/setup.cfg
ADDED