local_repo.ts

Declarations
#

7 declarations

view source

local_repo_load
#

local_repo.ts view source

({ 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

type { 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

local_repo_locate
#

local_repo.ts view source

({ repo_config, repos_dir, }: { repo_config: GitopsRepoConfig; repos_dir: string; }): LocalRepoPath | LocalRepoMissing

__0

type { repo_config: GitopsRepoConfig; repos_dir: string; }

returns

LocalRepoPath | LocalRepoMissing

local_repos_ensure
#

local_repo.ts view source

({ resolved_config, repos_dir, gitops_config, download, log, npm_ops, }: { resolved_config: ResolvedGitopsConfig; repos_dir: string; gitops_config: GitopsConfig; download: boolean; log?: Logger | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...>

__0

type { resolved_config: ResolvedGitopsConfig; repos_dir: string; gitops_config: GitopsConfig; download: boolean; log?: Logger | undefined; npm_ops?: NpmOperations | undefined; }

returns

Promise<LocalRepoPath[]>

local_repos_load
#

local_repo.ts view source

({ local_repo_paths, log, git_ops, npm_ops, }: { local_repo_paths: LocalRepoPath[]; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }): Promise<...>

__0

type { local_repo_paths: LocalRepoPath[]; log?: Logger | undefined; git_ops?: GitOperations | undefined; npm_ops?: NpmOperations | undefined; }

returns

Promise<LocalRepo[]>

LocalRepo
#

local_repo.ts view source

LocalRepo

Fully loaded local repo with Library and extracted dependency data. Does not extend LocalRepoPath - Library is source of truth for name/repo_url/etc.

library

type Library

library_json

type LibraryJson

repo_dir

type string

repo_git_ssh_url

type string

repo_config

dependencies

type Map<string, string>

dev_dependencies

type Map<string, string>

peer_dependencies

type Map<string, string>

LocalRepoMissing
#

local_repo.ts view source

LocalRepoMissing

A repo that is missing from the filesystem (needs cloning).

type

type 'local_repo_missing'

repo_name

type string

repo_url

type string

repo_git_ssh_url

type string

repo_config

LocalRepoPath
#

local_repo.ts view source

LocalRepoPath

A repo that has been located on the filesystem (path exists). Used before loading - just filesystem/git concerns.

type

type 'local_repo_path'

repo_name

type string

repo_dir

type string

repo_url

type string

repo_git_ssh_url

type string

repo_config

Depends on
#

Imported by
#