@grifhinz/logics-manager 2.8.0 → 2.9.0

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.
@@ -410,26 +410,26 @@ def main(argv: list[str] | None = None) -> int:
410
410
  autofix_structure=parsed.autofix_structure,
411
411
  governance_profile=parsed.governance_profile,
412
412
  )
413
- output = render_audit(
414
- repo_root,
415
- stale_days=parsed.stale_days,
416
- skip_ac_traceability=parsed.skip_ac_traceability,
417
- skip_gates=parsed.skip_gates,
418
- legacy_cutoff_version=parsed.legacy_cutoff_version,
419
- output_format=parsed.format,
420
- group_by_doc=parsed.group_by_doc,
421
- autofix_ac_traceability=parsed.autofix_ac_traceability,
422
- paths=parsed.paths,
423
- refs=parsed.refs,
424
- since_version=parsed.since_version,
425
- token_hygiene=parsed.token_hygiene,
426
- autofix_structure=parsed.autofix_structure,
427
- governance_profile=parsed.governance_profile,
428
- )
429
413
  except ConfigError as exc:
430
414
  raise SystemExit(str(exc)) from exc
415
+ output = json.dumps(payload, indent=2, sort_keys=True) if parsed.format == "json" else render_audit(
416
+ repo_root,
417
+ stale_days=parsed.stale_days,
418
+ skip_ac_traceability=parsed.skip_ac_traceability,
419
+ skip_gates=parsed.skip_gates,
420
+ legacy_cutoff_version=parsed.legacy_cutoff_version,
421
+ output_format=parsed.format,
422
+ group_by_doc=parsed.group_by_doc,
423
+ autofix_ac_traceability=parsed.autofix_ac_traceability,
424
+ paths=parsed.paths,
425
+ refs=parsed.refs,
426
+ since_version=parsed.since_version,
427
+ token_hygiene=parsed.token_hygiene,
428
+ autofix_structure=parsed.autofix_structure,
429
+ governance_profile=parsed.governance_profile,
430
+ )
431
431
  print(output)
432
- return 0
432
+ return 0 if payload["ok"] else 1
433
433
  if command == "index":
434
434
  parser = argparse.ArgumentParser(prog="logics-manager index", add_help=False)
435
435
  parser.add_argument("--out", default="logics/INDEX.md")