acumatica-cli 0.15.2__tar.gz → 0.15.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.
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/PKG-INFO +1 -1
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/pyproject.toml +1 -1
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/cli.py +52 -3
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/README.md +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/__init__.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/bootstrap.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/bootstrap_plugin.cs +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/bootstrap_project.xml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/client.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/config.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/extract.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/firstlogin.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/models.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/output.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/run.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/seed.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/seed_catalog.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/state.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/target.py +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/README.md +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/baseline/10-subaccounts.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/baseline/20-accounts.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/baseline/40-ledger.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/baseline/50-gl-preferences.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/baseline/60-ledger-company.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/baseline/90-uoms.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/bootstrap/company.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/bootstrap/credit-terms.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/bootstrap/features.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/10-reason-codes.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/20-in-preferences.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/30-availability-rules.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/40-posting-classes.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/50-warehouse.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/51-warehouse-locations.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/52-warehouse-defaults.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/53-tax-categories.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/54-item-classes.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/56-so-preferences.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/57-po-preferences.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/58-order-types.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/60-ar-preferences.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/61-ap-preferences.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/62-ca-preferences.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/63-cash-account.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/64-payment-methods.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/65-statement-cycles.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/70-vendor-classes.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/71-customer-classes.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/75-vendors.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/76-customers.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/80-stock-items-parts.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/82-stock-items-kits.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/master/85-kit-specifications.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/setup/10-financial-year.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/setup/20-master-calendar.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/setup/30-open-periods.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/config/views/10-trial-balance.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/env +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/gitignore +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/scenario/10-seed-capital.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/scenario/20-buy.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/scenario/30-build.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/scenario/40-sell.yaml +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/target +0 -0
- {acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/tenant.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "acumatica-cli"
|
|
3
|
-
version = "0.15.
|
|
3
|
+
version = "0.15.3"
|
|
4
4
|
description = "Acumatica ERP Config-as-Code: tenant provisioning, baseline config, and reference data"
|
|
5
5
|
authors = [{ name = "Konstantin Borovik", email = "kb@lab5.ca" }]
|
|
6
6
|
license = "PolyForm-Noncommercial-1.0.0"
|
|
@@ -155,18 +155,67 @@ def pass_instance[**P, R](f: Callable[Concatenate[Instance, P], R]) -> Callable[
|
|
|
155
155
|
return new_func
|
|
156
156
|
|
|
157
157
|
|
|
158
|
+
def _transport_target(
|
|
159
|
+
exc: httpx.TransportError, *, target: str | None = None
|
|
160
|
+
) -> str | None:
|
|
161
|
+
"""Prefer explicit target (e.g. Instance.base_url); else request URL."""
|
|
162
|
+
if target:
|
|
163
|
+
return target
|
|
164
|
+
request = getattr(exc, "request", None)
|
|
165
|
+
if request is not None:
|
|
166
|
+
return str(request.url)
|
|
167
|
+
return None
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
def _format_transport_error(
|
|
171
|
+
exc: httpx.TransportError, *, target: str | None = None
|
|
172
|
+
) -> str:
|
|
173
|
+
"""Friendly one-line body for connect/timeout/TLS (V9 / T123).
|
|
174
|
+
|
|
175
|
+
Never surface raw httpx/OS dumps (e.g. ``[Errno 61] Connection refused``).
|
|
176
|
+
"""
|
|
177
|
+
raw = str(exc).lower()
|
|
178
|
+
if "ssl" in raw or "certificate" in raw or "tls" in raw:
|
|
179
|
+
kind = "TLS error"
|
|
180
|
+
elif isinstance(exc, httpx.TimeoutException):
|
|
181
|
+
kind = "request timed out"
|
|
182
|
+
elif isinstance(exc, httpx.ConnectError):
|
|
183
|
+
kind = "cannot connect"
|
|
184
|
+
elif isinstance(exc, httpx.NetworkError):
|
|
185
|
+
kind = "network error"
|
|
186
|
+
else:
|
|
187
|
+
kind = "transport error"
|
|
188
|
+
where = _transport_target(exc, target=target)
|
|
189
|
+
hint = "check ACU_BASE_URL / network / instance up"
|
|
190
|
+
if where:
|
|
191
|
+
return f"{kind} to {where} ({hint})"
|
|
192
|
+
return f"{kind} ({hint})"
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
def _format_failure(exc: BaseException, *, target: str | None = None) -> str:
|
|
196
|
+
"""Map expected failures to one greppable error line body (V9).
|
|
197
|
+
|
|
198
|
+
Transport/network class → friendly rewrite; other RuntimeError / HTTPError
|
|
199
|
+
keep ``str(exc)`` (server ``exceptionMessage`` path unchanged).
|
|
200
|
+
"""
|
|
201
|
+
if isinstance(exc, httpx.TransportError):
|
|
202
|
+
return _format_transport_error(exc, target=target)
|
|
203
|
+
return str(exc)
|
|
204
|
+
|
|
205
|
+
|
|
158
206
|
def main() -> None:
|
|
159
207
|
"""Entry point: run the CLI, mapping expected failures to one-line errors.
|
|
160
208
|
|
|
161
209
|
RuntimeError (SSH/ac.exe, REST, first-login) and httpx transport errors
|
|
162
210
|
print `x message` and exit 1; ACU_DEBUG=1 re-raises for the traceback.
|
|
211
|
+
Transport/network failures use a friendly rewrite (V9), not raw dumps.
|
|
163
212
|
"""
|
|
164
213
|
try:
|
|
165
214
|
cli()
|
|
166
215
|
except (RuntimeError, httpx.HTTPError) as exc:
|
|
167
216
|
if os.environ.get("ACU_DEBUG"):
|
|
168
217
|
raise
|
|
169
|
-
output.error(
|
|
218
|
+
output.error(_format_failure(exc))
|
|
170
219
|
raise SystemExit(1) from exc
|
|
171
220
|
|
|
172
221
|
|
|
@@ -546,7 +595,7 @@ def _probe_rest(inst: Instance, claimed_erp: str | None) -> bool:
|
|
|
546
595
|
output.data(f"ok rest ({inst.base_url}, tenant {inst.tenant})")
|
|
547
596
|
return _probe_entity_root(client, inst, claimed_erp)
|
|
548
597
|
except (RuntimeError, httpx.HTTPError) as exc:
|
|
549
|
-
output.data(f"fail rest: {exc}")
|
|
598
|
+
output.data(f"fail rest: {_format_failure(exc, target=inst.base_url)}")
|
|
550
599
|
return False
|
|
551
600
|
|
|
552
601
|
|
|
@@ -558,7 +607,7 @@ def _probe_entity_root(
|
|
|
558
607
|
try:
|
|
559
608
|
endpoints, live_build = client.entity_root()
|
|
560
609
|
except (RuntimeError, httpx.HTTPError) as exc:
|
|
561
|
-
output.data(f"fail endpoints: {exc}")
|
|
610
|
+
output.data(f"fail endpoints: {_format_failure(exc, target=inst.base_url)}")
|
|
562
611
|
endpoints, live_build = [], None
|
|
563
612
|
ok = False
|
|
564
613
|
else:
|
|
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
|
|
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
|
{acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/scenario/20-buy.yaml
RENAMED
|
File without changes
|
{acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/scenario/30-build.yaml
RENAMED
|
File without changes
|
{acumatica_cli-0.15.2 → acumatica_cli-0.15.3}/src/acumatica_cli/templates/scenario/40-sell.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|