Skip to content

Commit 1680050

Browse files
chkp-ronizclaude
andcommitted
fix: replace non-ASCII characters with ASCII equivalents
Replace U+2192 (->), U+2014 (--), U+2013 (--), U+2026 (...), and box-drawing chars with printable ASCII to comply with the project's cp1252-safe encoding policy. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
1 parent 3ded022 commit 1680050

5 files changed

Lines changed: 22 additions & 22 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
### Added
1212

13-
- `RegistryConfig` dataclass in `apm_cli.deps.registry_proxy` registry-agnostic abstraction over VCS proxies; reads canonical `PROXY_REGISTRY_URL` / `PROXY_REGISTRY_TOKEN` / `PROXY_REGISTRY_ONLY` env vars with deprecated fallback to `ARTIFACTORY_*` aliases
14-
- `InstalledPackage` dataclass in `apm_cli.deps.installed_package` replaces the ad hoc positional tuple used to accumulate install results before lockfile generation; `LockFile.from_installed_packages()` accepts both the new dataclass and legacy tuples
15-
- `LockedDependency.registry_prefix` field in `apm.lock.yaml` stores the URL path prefix (e.g. `artifactory/github`) separately from the pure FQDN `host`; enables correct auth token routing and air-gapped re-installs through the same proxy
16-
- `PROXY_REGISTRY_ONLY` / `PROXY_REGISTRY_URL` / `PROXY_REGISTRY_TOKEN` canonical generic registry env vars replacing the deprecated `ARTIFACTORY_*` equivalents (deprecated aliases still work with a `DeprecationWarning`)
13+
- `RegistryConfig` dataclass in `apm_cli.deps.registry_proxy` -- registry-agnostic abstraction over VCS proxies; reads canonical `PROXY_REGISTRY_URL` / `PROXY_REGISTRY_TOKEN` / `PROXY_REGISTRY_ONLY` env vars with deprecated fallback to `ARTIFACTORY_*` aliases
14+
- `InstalledPackage` dataclass in `apm_cli.deps.installed_package` -- replaces the ad hoc positional tuple used to accumulate install results before lockfile generation; `LockFile.from_installed_packages()` accepts both the new dataclass and legacy tuples
15+
- `LockedDependency.registry_prefix` field in `apm.lock.yaml` -- stores the URL path prefix (e.g. `artifactory/github`) separately from the pure FQDN `host`; enables correct auth token routing and air-gapped re-installs through the same proxy
16+
- `PROXY_REGISTRY_ONLY` / `PROXY_REGISTRY_URL` / `PROXY_REGISTRY_TOKEN` -- canonical generic registry env vars replacing the deprecated `ARTIFACTORY_*` equivalents (deprecated aliases still work with a `DeprecationWarning`)
1717
- Post-download `content_hash` verification: fresh downloads are now verified against the lockfile's recorded SHA-256 hash; a mismatch aborts the install with a supply-chain warning instead of silently accepting different content
1818
- `RegistryConfig.find_missing_hashes()` warns at startup when registry-proxy lockfile entries lack a `content_hash`, prompting `--update` to populate them for tamper detection
1919

docs/src/content/docs/getting-started/authentication.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,12 +165,12 @@ Air-gapped environments route all VCS traffic through a JFrog Artifactory proxy.
165165
|----------|---------|
166166
| `PROXY_REGISTRY_URL` | Full proxy base URL, e.g. `https://art.example.com/artifactory/github` |
167167
| `PROXY_REGISTRY_TOKEN` | Bearer token for the proxy |
168-
| `PROXY_REGISTRY_ONLY` | Set to `1` to block all direct VCS access only proxy downloads allowed |
168+
| `PROXY_REGISTRY_ONLY` | Set to `1` to block all direct VCS access -- only proxy downloads allowed |
169169

170170
```bash
171171
export PROXY_REGISTRY_URL=https://art.example.com/artifactory/github
172172
export PROXY_REGISTRY_TOKEN=your_bearer_token
173-
export PROXY_REGISTRY_ONLY=1 # optional enforces proxy-only mode
173+
export PROXY_REGISTRY_ONLY=1 # optional -- enforces proxy-only mode
174174
175175
apm install
176176
```
@@ -184,7 +184,7 @@ After a successful proxy install, `apm.lock.yaml` records the proxy host and pat
184184
```yaml
185185
dependencies:
186186
- repo_url: owner/repo
187-
host: art.example.com # pure FQDN no path
187+
host: art.example.com # pure FQDN -- no path
188188
registry_prefix: artifactory/github # path prefix
189189
resolved_commit: abc123def456
190190
```

src/apm_cli/deps/installed_package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class InstalledPackage:
3333
The exact commit SHA that was installed, or ``None`` for local / Artifactory
3434
packages where no commit is available.
3535
depth:
36-
Dependency tree depth (1 = direct, 2 = transitive, ).
36+
Dependency tree depth (1 = direct, 2 = transitive, ...).
3737
resolved_by:
3838
``repo_url`` of the parent that introduced this dependency, or ``None``
3939
for direct dependencies.

src/apm_cli/deps/registry_proxy.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
77
Environment variables (canonical)::
88
9-
PROXY_REGISTRY_URL Full proxy base URL, e.g.
9+
PROXY_REGISTRY_URL -- Full proxy base URL, e.g.
1010
``https://art.example.com/artifactory/github``
11-
PROXY_REGISTRY_TOKEN Bearer token for the proxy.
12-
PROXY_REGISTRY_ONLY Set to ``1``/``true``/``yes`` to block all
11+
PROXY_REGISTRY_TOKEN -- Bearer token for the proxy.
12+
PROXY_REGISTRY_ONLY -- Set to ``1``/``true``/``yes`` to block all
1313
direct VCS downloads.
1414
1515
Deprecated aliases (still functional, emit ``DeprecationWarning``)::
1616
17-
ARTIFACTORY_BASE_URL PROXY_REGISTRY_URL
18-
ARTIFACTORY_APM_TOKEN PROXY_REGISTRY_TOKEN
19-
ARTIFACTORY_ONLY PROXY_REGISTRY_ONLY
17+
ARTIFACTORY_BASE_URL -> PROXY_REGISTRY_URL
18+
ARTIFACTORY_APM_TOKEN -> PROXY_REGISTRY_TOKEN
19+
ARTIFACTORY_ONLY -> PROXY_REGISTRY_ONLY
2020
"""
2121

2222
from __future__ import annotations
@@ -60,7 +60,7 @@ class RegistryConfig:
6060
token:
6161
Optional Bearer token for authenticating against the proxy.
6262
enforce_only:
63-
When ``True``, direct VCS downloads are blocked only the proxy
63+
When ``True``, direct VCS downloads are blocked -- only the proxy
6464
may serve packages.
6565
"""
6666

@@ -194,7 +194,7 @@ def is_enforce_only() -> bool:
194194
195195
Checks ``PROXY_REGISTRY_ONLY`` first; falls back to the deprecated
196196
``ARTIFACTORY_ONLY``. Does **not** require a full :class:`RegistryConfig`
197-
to be available callers that only need the flag (e.g.
197+
to be available -- callers that only need the flag (e.g.
198198
:class:`~apm_cli.deps.github_downloader.GitHubPackageDownloader`) can
199199
use this without constructing the full config.
200200
"""

tests/unit/test_artifactory_support.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ def test_proxy_registry_only_raises_same_as_artifactory_only(self):
851851
dl.download_package("microsoft/some-package", Path("/tmp/test-pkg"))
852852

853853

854-
# ── RegistryConfig: FQDN / prefix split and generic registry ──
854+
# -- RegistryConfig: FQDN / prefix split and generic registry --
855855

856856

857857
class TestRegistryConfig:
@@ -926,7 +926,7 @@ def test_deprecated_artifactory_base_url_alias(self):
926926
assert any(issubclass(warning.category, DeprecationWarning) for warning in w)
927927

928928
def test_registry_config_lockfile_round_trip(self):
929-
"""host and registry_prefix survive YAML write read round trip."""
929+
"""host and registry_prefix survive YAML write -> read round trip."""
930930
from apm_cli.deps.lockfile import LockedDependency, LockFile
931931
from apm_cli.deps.registry_proxy import RegistryConfig
932932

@@ -951,7 +951,7 @@ def test_registry_config_lockfile_round_trip(self):
951951
assert dep2.registry_prefix == "artifactory/github"
952952

953953

954-
# ── drift.py: build_download_ref with registry_prefix ──
954+
# -- drift.py: build_download_ref with registry_prefix --
955955

956956

957957
class TestBuildDownloadRefRegistryPrefix:
@@ -1036,14 +1036,14 @@ def test_update_refs_bypasses_lockfile_host(self):
10361036
assert ref is dep # --update returns original dep_ref unchanged
10371037

10381038

1039-
# ── RegistryConfig.validate_lockfile_deps: conflict detection ──
1039+
# -- RegistryConfig.validate_lockfile_deps: conflict detection --
10401040

10411041

10421042
class TestRegistryOnlyConflictDetection:
10431043
"""Test validate_lockfile_deps uses classify_host for accurate conflict detection."""
10441044

10451045
def test_github_com_dep_is_a_conflict(self):
1046-
"""github.com host is a direct VCS source conflict when enforce_only=True."""
1046+
"""github.com host is a direct VCS source -> conflict when enforce_only=True."""
10471047
from apm_cli.deps.lockfile import LockedDependency, LockFile
10481048
from apm_cli.deps.registry_proxy import RegistryConfig
10491049

@@ -1123,7 +1123,7 @@ def test_enforce_only_false_returns_no_conflicts(self):
11231123
assert cfg.validate_lockfile_deps([locked]) == []
11241124

11251125

1126-
# ── RegistryConfig.find_missing_hashes: supply chain integrity ──
1126+
# -- RegistryConfig.find_missing_hashes: supply chain integrity --
11271127

11281128

11291129
class TestFindMissingHashes:

0 commit comments

Comments
 (0)