({ local_repo_path, log: _log, git_ops, npm_ops, }: { local_repo_path: LocalRepoPath; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...> Loads repo data with automatic syncing and dependency management.
Workflow:
1. Records current commit hash (for detecting changes)
2. Switches to target branch if needed (requires clean workspace)
3. Pulls latest changes from remote (skipped for local-only repos)
4. Validates workspace is clean after pull
5. Auto-installs dependencies if package.json changed
6. Imports library_json from src/routes/library.ts
7. Creates Library and extracts dependency maps
This ensures repos are always in sync with their configured branch before being used by gitops commands.
__0
{ local_repo_path: LocalRepoPath; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }returns
Promise<LocalRepo> throws
if- workspace dirty, branch switch fails, install fails, or `library.ts` missing