confpub-cli 1.4.2__tar.gz → 1.4.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.
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/PKG-INFO +1 -1
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/__init__.py +1 -1
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/config.py +30 -1
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/confluence.py +9 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/.github/workflows/publish.yml +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/.gitignore +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/CLAUDE.md +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/LICENSE +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/PRD.md +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/README.md +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/applier.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/assets.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/cli.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/converter.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/envelope.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/errors.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/guide.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/lockfile.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/manifest.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/output.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/planner.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/publish.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/puller.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/py.typed +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/reverse_converter.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/validator.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub/verifier.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/confpub.lock +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/pyproject.toml +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/__init__.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/conftest.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_applier.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_assets.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_config.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_confluence.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_converter.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_envelope.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_errors.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_guide.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_integration.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_lockfile.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_manifest.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_output.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_planner.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_publish.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_puller.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_reverse_converter.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_validator.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/tests/test_verifier.py +0 -0
- {confpub_cli-1.4.2 → confpub_cli-1.4.3}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: confpub-cli
|
|
3
|
-
Version: 1.4.
|
|
3
|
+
Version: 1.4.3
|
|
4
4
|
Summary: Agent-first CLI to publish Markdown to Confluence
|
|
5
5
|
Project-URL: Homepage, https://github.com/ThomasRohde/confpub-cli
|
|
6
6
|
Project-URL: Repository, https://github.com/ThomasRohde/confpub-cli.git
|
|
@@ -22,6 +22,7 @@ CONFIG_FILE = CONFIG_DIR / "config.json"
|
|
|
22
22
|
ENV_URL = "CONFPUB_URL"
|
|
23
23
|
ENV_TOKEN = "CONFPUB_TOKEN"
|
|
24
24
|
ENV_USER = "CONFPUB_USER"
|
|
25
|
+
ENV_SSL_VERIFY = "CONFPUB_SSL_VERIFY"
|
|
25
26
|
|
|
26
27
|
|
|
27
28
|
class ConfigModel(BaseModel):
|
|
@@ -30,6 +31,7 @@ class ConfigModel(BaseModel):
|
|
|
30
31
|
base_url: Optional[str] = None
|
|
31
32
|
user: Optional[str] = None
|
|
32
33
|
token: Optional[str] = None
|
|
34
|
+
ssl_verify: Optional[str] = None
|
|
33
35
|
|
|
34
36
|
|
|
35
37
|
class ResolvedConfig:
|
|
@@ -41,11 +43,13 @@ class ResolvedConfig:
|
|
|
41
43
|
user: str | None = None,
|
|
42
44
|
token: str | None = None,
|
|
43
45
|
token_source: str | None = None,
|
|
46
|
+
ssl_verify: bool | str = False,
|
|
44
47
|
) -> None:
|
|
45
48
|
self.base_url = base_url
|
|
46
49
|
self.user = user
|
|
47
50
|
self.token = token
|
|
48
51
|
self.token_source = token_source
|
|
52
|
+
self.ssl_verify = ssl_verify
|
|
49
53
|
|
|
50
54
|
@property
|
|
51
55
|
def is_cloud(self) -> bool:
|
|
@@ -128,10 +132,28 @@ def _try_keyring(service: str, username: str) -> str | None:
|
|
|
128
132
|
return None
|
|
129
133
|
|
|
130
134
|
|
|
135
|
+
def _resolve_ssl_verify(raw: str | None) -> bool | str:
|
|
136
|
+
"""Parse an ssl_verify value into bool or CA-bundle path.
|
|
137
|
+
|
|
138
|
+
Accepts "true"/"false" (case-insensitive) or a filesystem path.
|
|
139
|
+
Returns False (default) when *raw* is None or empty.
|
|
140
|
+
"""
|
|
141
|
+
if not raw:
|
|
142
|
+
return False
|
|
143
|
+
lower = raw.strip().lower()
|
|
144
|
+
if lower == "true":
|
|
145
|
+
return True
|
|
146
|
+
if lower == "false":
|
|
147
|
+
return False
|
|
148
|
+
# Treat as CA bundle path
|
|
149
|
+
return raw.strip()
|
|
150
|
+
|
|
151
|
+
|
|
131
152
|
def load_config(
|
|
132
153
|
cli_url: str | None = None,
|
|
133
154
|
cli_user: str | None = None,
|
|
134
155
|
cli_token: str | None = None,
|
|
156
|
+
cli_ssl_verify: str | None = None,
|
|
135
157
|
) -> ResolvedConfig:
|
|
136
158
|
"""Resolve config using precedence: CLI → env → file → keychain."""
|
|
137
159
|
file_cfg = _load_config_file()
|
|
@@ -143,6 +165,10 @@ def load_config(
|
|
|
143
165
|
# Token
|
|
144
166
|
token = cli_token or os.environ.get(ENV_TOKEN) or file_cfg.token
|
|
145
167
|
|
|
168
|
+
# SSL verification
|
|
169
|
+
ssl_raw = cli_ssl_verify or os.environ.get(ENV_SSL_VERIFY) or file_cfg.ssl_verify
|
|
170
|
+
ssl_verify = _resolve_ssl_verify(ssl_raw)
|
|
171
|
+
|
|
146
172
|
# Determine source
|
|
147
173
|
token_source = None
|
|
148
174
|
if cli_token:
|
|
@@ -164,6 +190,7 @@ def load_config(
|
|
|
164
190
|
user=user,
|
|
165
191
|
token=token,
|
|
166
192
|
token_source=token_source,
|
|
193
|
+
ssl_verify=ssl_verify,
|
|
167
194
|
)
|
|
168
195
|
|
|
169
196
|
|
|
@@ -178,11 +205,13 @@ def set_config_value(key: str, value: str) -> None:
|
|
|
178
205
|
cfg.user = value
|
|
179
206
|
elif key == "token":
|
|
180
207
|
cfg.token = value
|
|
208
|
+
elif key == "ssl_verify":
|
|
209
|
+
cfg.ssl_verify = value
|
|
181
210
|
else:
|
|
182
211
|
from confpub.errors import ERR_VALIDATION_REQUIRED, validation_error
|
|
183
212
|
raise validation_error(
|
|
184
213
|
ERR_VALIDATION_REQUIRED,
|
|
185
|
-
f"Unknown config key: {key}. Valid keys: base_url, user, token",
|
|
214
|
+
f"Unknown config key: {key}. Valid keys: base_url, user, token, ssl_verify",
|
|
186
215
|
)
|
|
187
216
|
|
|
188
217
|
CONFIG_FILE.write_text(json.dumps(cfg.model_dump(exclude_none=True), indent=2), encoding="utf-8")
|
|
@@ -48,6 +48,15 @@ class ConfluenceClient:
|
|
|
48
48
|
kwargs["cloud"] = True
|
|
49
49
|
else:
|
|
50
50
|
kwargs["token"] = config.token
|
|
51
|
+
|
|
52
|
+
kwargs["verify_ssl"] = config.ssl_verify
|
|
53
|
+
|
|
54
|
+
# Suppress noisy per-request InsecureRequestWarning when SSL
|
|
55
|
+
# verification is disabled (common in corporate environments).
|
|
56
|
+
if not config.ssl_verify:
|
|
57
|
+
import urllib3
|
|
58
|
+
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|
59
|
+
|
|
51
60
|
return Confluence(**kwargs)
|
|
52
61
|
|
|
53
62
|
def _handle_error(self, exc: Exception, context: str = "") -> None:
|
|
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
|
|
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
|