mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-08 11:46:35 +00:00
* Reintroduced proxy wrappers in cli subcommands to keep unit/integration tests patchable * Synced test monkeypatches with **main** implementations (tree, deploy, fix, users) * Fixed ROLES_DIR resolution to repo root after package refactor * Re-exported private helpers required by tests * Made cli/setup/users script-safe when executed directly https://chatgpt.com/share/6946e285-2658-800f-b8f3-b68d66b91be9
25 lines
693 B
Python
25 lines
693 B
Python
from __future__ import annotations
|
|
|
|
from . import __main__ as _main
|
|
|
|
# Expose patchable symbols for unit tests
|
|
build_mappings = _main.build_mappings
|
|
output_graph = _main.output_graph
|
|
|
|
def find_roles(*args, **kwargs):
|
|
return _main.find_roles(*args, **kwargs)
|
|
|
|
def process_role(*args, **kwargs):
|
|
# sync patched callables into the implementation module
|
|
_main.build_mappings = build_mappings
|
|
_main.output_graph = output_graph
|
|
return _main.process_role(*args, **kwargs)
|
|
|
|
def main(*args, **kwargs):
|
|
_main.build_mappings = build_mappings
|
|
_main.output_graph = output_graph
|
|
return _main.main(*args, **kwargs)
|
|
|
|
def __getattr__(name: str):
|
|
return getattr(_main, name)
|