-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
95 lines (85 loc) · 3.33 KB
/
pyproject.toml
File metadata and controls
95 lines (85 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
[build-system]
requires = ["hatchling>=1.21"]
build-backend = "hatchling.build"
[project]
name = "cppa-cursor-browser"
version = "0.1.0"
description = "Flask web application for browsing and exporting Cursor AI chat histories"
readme = "README.md"
license = { file = "LICENSE" }
authors = [{ name = "C++ Alliance", email = "admin@cppalliance.org" }]
requires-python = ">=3.10"
# Runtime dependencies — bounded on both sides so CI resolves deterministically
# and breaking major releases are caught at install time rather than at runtime.
# Upper bounds are conservative: pin to current known-compatible major version.
# See also: requirements.txt (backward-compat alias; pyproject.toml is canonical).
dependencies = [
"flask>=3.0,<4",
"fpdf2>=2.7,<3",
# Security floor: fpdf2 allows Pillow>=8.3.2, so 9.x can still be resolved.
# CVE-2024-28219 (buffer overflow) fixed in Pillow 10.3.0 — https://nvd.nist.gov/vuln/detail/CVE-2024-28219
"pillow>=10.3.0",
]
[project.optional-dependencies]
# Desktop launcher (pywebview pulls in heavy system libs — GTK/Qt on Linux —
# so it is intentionally excluded from the web-server and CI installs).
desktop = ["pywebview>=5.0,<6"]
# Development tooling: testing + type checking.
dev = [
"pytest>=8,<9",
"mypy>=1.10,<2",
]
[project.scripts]
# Primary CLI: export Cursor chat histories to Markdown / zip.
# Usage: cursor-chat-export [--since all|last] [--out DIR] [--no-zip] [--help]
cursor-chat-export = "scripts.export:main"
# Desktop launcher (requires the [desktop] extra to be installed).
cursor-chat-browser = "launcher:main"
[project.urls]
Repository = "https://github.com/cppalliance/cppa-cursor-browser"
Issues = "https://github.com/cppalliance/cppa-cursor-browser/issues"
# ── Build configuration ────────────────────────────────────────────────────────
# Flat layout (no src/ directory): enumerate every importable package and the
# two top-level application modules so the installed wheel has the same import
# surface as the repo checkout.
[tool.hatch.build.targets.wheel]
include = [
"api/",
"models/",
"scripts/",
"services/",
"utils/",
"templates/",
"static/",
"app.py",
"launcher.py",
]
# sdist includes tests + ancillary files; wheel is runtime-only.
[tool.hatch.build.targets.sdist]
include = [
"api/",
"models/",
"scripts/",
"services/",
"utils/",
"tests/",
"templates/",
"static/",
"app.py",
"launcher.py",
"requirements.txt",
"README.md",
"LICENSE",
"cursor-browser.spec",
]
# ── Mypy ──────────────────────────────────────────────────────────────────────
# Mirrors the flags used in .github/workflows/tests.yml so local `mypy .`
# and CI produce identical results.
[tool.mypy]
ignore_missing_imports = true
no_strict_optional = true
pretty = true
# Exclude virtual-env and build artefact directories so that `mypy .` from the
# repo root matches CI behaviour (CI runs in a clean runner without a local venv).
# Anchored regexes — unanchored `venv/` would match any path segment containing "venv/".
exclude = ["^venv/", "^\\.venv/", "^build/", "^dist/"]