mirror of
https://github.com/dredx/prole.git
synced 2026-09-23 10:13:58 +00:00
- Add build-context helper to copy Docker context safely (ignore runtime data, keep symlinks) - Update UI and core actions to use ~/.prole/build and shared copy helper - Add/adjust tests and scripts; introduce knoe ops helpers and update manifests Co-authored-by: Junie <junie@jetbrains.com>
29 lines
747 B
Python
29 lines
747 B
Python
"""UI-agnostic installer engine."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import Iterable
|
|
|
|
from .milestone import Milestone
|
|
from .runner import InstallerRunner
|
|
from .state import InstallerState
|
|
|
|
|
|
class InstallerCore:
|
|
"""Convenience wrapper around the runner and milestones."""
|
|
|
|
def __init__(
|
|
self, milestones: Iterable[Milestone], state: InstallerState | None = None
|
|
):
|
|
self.runner = InstallerRunner(milestones, state=state)
|
|
|
|
@property
|
|
def state(self) -> InstallerState:
|
|
return self.runner.state
|
|
|
|
def on(self, event: str, callback) -> None:
|
|
self.runner.on(event, callback)
|
|
|
|
def run(self, start_id: str | None = None) -> bool:
|
|
return self.runner.run(start_id=start_id)
|