baucli 1.0.78__tar.gz → 1.0.79__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.
Files changed (48) hide show
  1. {baucli-1.0.78 → baucli-1.0.79}/PKG-INFO +1 -1
  2. {baucli-1.0.78 → baucli-1.0.79}/baucli/__init__.py +1 -1
  3. {baucli-1.0.78 → baucli-1.0.79}/baucli/cli.py +42 -10
  4. {baucli-1.0.78 → baucli-1.0.79}/baucli.egg-info/PKG-INFO +1 -1
  5. {baucli-1.0.78 → baucli-1.0.79}/setup.py +1 -1
  6. {baucli-1.0.78 → baucli-1.0.79}/MANIFEST.in +0 -0
  7. {baucli-1.0.78 → baucli-1.0.79}/README.md +0 -0
  8. {baucli-1.0.78 → baucli-1.0.79}/baucli/apex_rebuild.py +0 -0
  9. {baucli-1.0.78 → baucli-1.0.79}/baucli/apexlang.py +0 -0
  10. {baucli-1.0.78 → baucli-1.0.79}/baucli/api.py +0 -0
  11. {baucli-1.0.78 → baucli-1.0.79}/baucli/canon.py +0 -0
  12. {baucli-1.0.78 → baucli-1.0.79}/baucli/config.py +0 -0
  13. {baucli-1.0.78 → baucli-1.0.79}/baucli/db/__init__.py +0 -0
  14. {baucli-1.0.78 → baucli-1.0.79}/baucli/db/mssql.py +0 -0
  15. {baucli-1.0.78 → baucli-1.0.79}/baucli/db/mysql.py +0 -0
  16. {baucli-1.0.78 → baucli-1.0.79}/baucli/db/oracle.py +0 -0
  17. {baucli-1.0.78 → baucli-1.0.79}/baucli/db/postgresql.py +0 -0
  18. {baucli-1.0.78 → baucli-1.0.79}/baucli/democrm.py +0 -0
  19. {baucli-1.0.78 → baucli-1.0.79}/baucli/democrm_sql/mssql/crm_data_mssql.sql +0 -0
  20. {baucli-1.0.78 → baucli-1.0.79}/baucli/democrm_sql/mssql/crm_demo_mssql.sql +0 -0
  21. {baucli-1.0.78 → baucli-1.0.79}/baucli/democrm_sql/mysql/crm_data_mysql.sql +0 -0
  22. {baucli-1.0.78 → baucli-1.0.79}/baucli/democrm_sql/mysql/crm_demo_mysql.sql +0 -0
  23. {baucli-1.0.78 → baucli-1.0.79}/baucli/democrm_sql/oracle/crm_demo_oracle.sql +0 -0
  24. {baucli-1.0.78 → baucli-1.0.79}/baucli/democrm_sql/postgresql/crm_data_postgresql.sql +0 -0
  25. {baucli-1.0.78 → baucli-1.0.79}/baucli/democrm_sql/postgresql/crm_demo_postgresql.sql +0 -0
  26. {baucli-1.0.78 → baucli-1.0.79}/baucli/diffenvs.py +0 -0
  27. {baucli-1.0.78 → baucli-1.0.79}/baucli/docmig.py +0 -0
  28. {baucli-1.0.78 → baucli-1.0.79}/baucli/git.py +0 -0
  29. {baucli-1.0.78 → baucli-1.0.79}/baucli/legacy/__init__.py +0 -0
  30. {baucli-1.0.78 → baucli-1.0.79}/baucli/legacy/delphi.py +0 -0
  31. {baucli-1.0.78 → baucli-1.0.79}/baucli/legacy/magic.py +0 -0
  32. {baucli-1.0.78 → baucli-1.0.79}/baucli/mcp_server.py +0 -0
  33. {baucli-1.0.78 → baucli-1.0.79}/baucli/project.py +0 -0
  34. {baucli-1.0.78 → baucli-1.0.79}/baucli/rag_embed.py +0 -0
  35. {baucli-1.0.78 → baucli-1.0.79}/baucli/sample_scan.py +0 -0
  36. {baucli-1.0.78 → baucli-1.0.79}/baucli/scope_scan.py +0 -0
  37. {baucli-1.0.78 → baucli-1.0.79}/baucli/screenshot.py +0 -0
  38. {baucli-1.0.78 → baucli-1.0.79}/baucli/seed_check.py +0 -0
  39. {baucli-1.0.78 → baucli-1.0.79}/baucli/skills.py +0 -0
  40. {baucli-1.0.78 → baucli-1.0.79}/baucli/stress.py +0 -0
  41. {baucli-1.0.78 → baucli-1.0.79}/baucli/sync.py +0 -0
  42. {baucli-1.0.78 → baucli-1.0.79}/baucli.egg-info/SOURCES.txt +0 -0
  43. {baucli-1.0.78 → baucli-1.0.79}/baucli.egg-info/dependency_links.txt +0 -0
  44. {baucli-1.0.78 → baucli-1.0.79}/baucli.egg-info/entry_points.txt +0 -0
  45. {baucli-1.0.78 → baucli-1.0.79}/baucli.egg-info/requires.txt +0 -0
  46. {baucli-1.0.78 → baucli-1.0.79}/baucli.egg-info/top_level.txt +0 -0
  47. {baucli-1.0.78 → baucli-1.0.79}/setup.cfg +0 -0
  48. {baucli-1.0.78 → baucli-1.0.79}/tests/test_canon_multiengine.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: baucli
3
- Version: 1.0.78
3
+ Version: 1.0.79
4
4
  Summary: Extracts verified business-logic and schema context from Oracle, PostgreSQL, MySQL and SQL Server
5
5
  Home-page: https://www.begcloud.com
6
6
  Author: BEG Support
@@ -3,6 +3,6 @@
3
3
  import warnings
4
4
  warnings.filterwarnings("ignore", message="urllib3 v2 only supports OpenSSL")
5
5
 
6
- __version__ = "1.0.78"
6
+ __version__ = "1.0.79"
7
7
  __product__ = "BAUCLI"
8
8
  __author__ = "BEG Support"
@@ -3021,7 +3021,7 @@ def deploy_apply(deploy_ref: str, db_name: str, out_file: str, mark_applied: boo
3021
3021
  _idx = _build_live_ddl_index(extractor, [_meta.get("schema", "")])
3022
3022
  _blocked, _live, _doc = _deploy_ddl_conflict(_meta, _idx)
3023
3023
  if _blocked:
3024
- _print_conflict_block(deploy_ref.upper(), _meta, _live, _doc)
3024
+ _print_conflict_block(deploy_ref.upper(), _meta, _live, _doc, db_name=name)
3025
3025
  _report_deploy_outcome(api, cfg, _meta, "BLOCKED_LOSTUPDATE", "BLOCKED",
3026
3026
  db_name=name, engine=db_config.get("engine"),
3027
3027
  error="LAST_DDL vivo mais novo que o documentado",
@@ -3048,8 +3048,11 @@ def deploy_apply(deploy_ref: str, db_name: str, out_file: str, mark_applied: boo
3048
3048
  extractor._conn, script, (db_config.get("engine") or None))
3049
3049
  if _drift:
3050
3050
  console.print(f" [yellow]BLOQUEADO (drift de código)[/yellow]: {_ddetail}")
3051
- console.print(" Rode [cyan]baucli sync[/cyan] + re-documente, ou "
3052
- "[cyan]--force[/cyan] para sobrescrever.")
3051
+ console.print(
3052
+ " Re-capture, re-documente e gere novo header — ou "
3053
+ "[cyan]--force[/cyan] para sobrescrever:")
3054
+ console.print(
3055
+ f" [cyan]{_sync_cmd_for(name, [('--object', _obj_name or '')])}[/cyan]")
3053
3056
  _rd = dict(_meta or {}); _rd.setdefault("id", deploy_id)
3054
3057
  _rd.setdefault("_kind", kind); _rd.setdefault("name", _obj_name)
3055
3058
  _report_deploy_outcome(api, cfg, _rd, "BLOCKED_DRIFT", "BLOCKED",
@@ -3477,17 +3480,41 @@ def _deploy_ddl_conflict(d: dict, live_idx: dict):
3477
3480
  return (cur_min > doc_min, live, doc)
3478
3481
 
3479
3482
 
3480
- def _print_conflict_block(ref: str, d: dict, live_ddl, doc_ddl):
3483
+
3484
+
3485
+ def _sync_cmd_for(db_name=None, items=None) -> str:
3486
+ """Ready-to-run directed-sync command for blocked deploys.
3487
+
3488
+ items: list of ("--object"|"--table", NAME). Flags are repeatable and
3489
+ combinable (1.0.75+); dedupes preserving order. db_name optional.
3490
+ """
3491
+ seen, parts = set(), []
3492
+ for flag, nm in (items or []):
3493
+ key = (flag, (nm or "").upper())
3494
+ if not nm or key in seen:
3495
+ continue
3496
+ seen.add(key)
3497
+ parts.append(f"{flag} {nm.upper()}")
3498
+ cmd = "baucli sync"
3499
+ if db_name:
3500
+ cmd += f" --db {db_name}"
3501
+ return cmd + (" " + " ".join(parts) if parts else "")
3502
+
3503
+ def _print_conflict_block(ref: str, d: dict, live_ddl, doc_ddl, db_name: str = None):
3481
3504
  """Uniform message when a deploy is blocked to protect in-progress work."""
3482
3505
  console.print(
3483
3506
  f" [red]BLOQUEADO[/red] — {d.get('schema','')}.{d.get('name','')} "
3484
3507
  f"({d.get('type','')}) mudou no banco depois de documentado.")
3485
3508
  console.print(
3486
3509
  f" [dim]DDL vivo: {live_ddl or '?'} > documentado: {doc_ddl or '?'}[/dim]")
3510
+ _flag = "--table" if (d.get("type") or "").upper() in (
3511
+ "TABLE", "VIEW", "MATERIALIZED VIEW") else "--object"
3487
3512
  console.print(
3488
3513
  " [yellow]Não aplicado para não sobrescrever trabalho em andamento.[/yellow] "
3489
- "Rode [cyan]baucli sync[/cyan] (re-captura o fonte atual), re-documente/aprove "
3490
- "e gere um novo header — ou reaplique com [cyan]--force[/cyan] se tiver certeza.")
3514
+ "Re-capture o fonte atual, re-documente/aprove e gere um novo header — "
3515
+ "ou reaplique com [cyan]--force[/cyan] se tiver certeza:")
3516
+ console.print(
3517
+ f" [cyan]{_sync_cmd_for(db_name, [(_flag, d.get('name') or '')])}[/cyan]")
3491
3518
 
3492
3519
 
3493
3520
  @deploy.command("apply-all")
@@ -3741,6 +3768,7 @@ def deploy_apply_all(db_name: str, schema: str, kind: str, status: str,
3741
3768
  live_idx = _build_live_ddl_index(extractor, _docpl_schemas)
3742
3769
 
3743
3770
  applied_objs: list[str] = [] # DOCPL aplicados -> baseline pós-apply
3771
+ blocked_syncs: list[tuple] = [] # (--object|--table, NOME) p/ comando de sync no resumo
3744
3772
  import uuid as _uuid
3745
3773
  _batch_id = "aa-" + _uuid.uuid4().hex[:14] # agrupa este apply-all na trilha de suporte
3746
3774
 
@@ -3755,8 +3783,9 @@ def deploy_apply_all(db_name: str, schema: str, kind: str, status: str,
3755
3783
  if not force:
3756
3784
  _blk, _live, _doc = _deploy_ddl_conflict(d, live_idx)
3757
3785
  if _blk:
3758
- _print_conflict_block(ref, d, _live, _doc)
3786
+ _print_conflict_block(ref, d, _live, _doc, db_name=name)
3759
3787
  blocked_refs.append(ref)
3788
+ blocked_syncs.append(("--table" if dkind == "doctab" else "--object", obj))
3760
3789
  _report_deploy_outcome(api, cfg, d, "BLOCKED_LOSTUPDATE", "BLOCKED",
3761
3790
  db_name=name, engine=db_config.get("engine"),
3762
3791
  error="LAST_DDL vivo mais novo que o documentado",
@@ -3789,6 +3818,7 @@ def deploy_apply_all(db_name: str, schema: str, kind: str, status: str,
3789
3818
  if _drift:
3790
3819
  console.print(f" [yellow]BLOQUEADO (drift de código)[/yellow]: {_ddetail}")
3791
3820
  blocked_refs.append(ref)
3821
+ blocked_syncs.append(("--object", obj))
3792
3822
  _report_deploy_outcome(api, cfg, d, "BLOCKED_DRIFT", "BLOCKED",
3793
3823
  db_name=name, engine=db_config.get("engine"), error=_ddetail,
3794
3824
  deploy_mode="APPLY_ALL", batch_id=_batch_id)
@@ -3840,9 +3870,11 @@ def deploy_apply_all(db_name: str, schema: str, kind: str, status: str,
3840
3870
  _post_apply_context(no_context)
3841
3871
  if blocked_refs:
3842
3872
  console.print(f"[yellow]{len(blocked_refs)} bloqueado(s)[/yellow] "
3843
- f"(mudaram no banco desde a documentação): {', '.join(blocked_refs)}. "
3844
- "Rode [cyan]baucli sync[/cyan] + re-documente, ou use "
3845
- "[cyan]--force[/cyan].")
3873
+ f"(mudaram no banco desde a documentação): {', '.join(blocked_refs)}.")
3874
+ console.print(
3875
+ " Sincronize os bloqueados (re-captura o fonte atual), re-documente/aprove "
3876
+ "e gere novos headers — ou reaplique com [cyan]--force[/cyan]:")
3877
+ console.print(f" [cyan]{_sync_cmd_for(name, blocked_syncs)}[/cyan]")
3846
3878
  if failed_refs:
3847
3879
  console.print(f"[red]{len(failed_refs)} failed[/red] "
3848
3880
  "(marcados FAILED na fila + registrados em BAU_DEPLOY_LOG):")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: baucli
3
- Version: 1.0.78
3
+ Version: 1.0.79
4
4
  Summary: Extracts verified business-logic and schema context from Oracle, PostgreSQL, MySQL and SQL Server
5
5
  Home-page: https://www.begcloud.com
6
6
  Author: BEG Support
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="baucli",
5
- version="1.0.78",
5
+ version="1.0.79",
6
6
  description="Extracts verified business-logic and schema context from Oracle, PostgreSQL, MySQL and SQL Server",
7
7
  long_description=open("README.md").read(),
8
8
  long_description_content_type="text/markdown",
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