gitops_task_helpers.ts

Declarations
#

Shared initialization logic for all gitops tasks.

Provides get_gitops_ready() which orchestrates: - Config loading and normalization - Repo resolution (local path discovery) - Branch switching and syncing - Dependency installation

Used by: gitops_sync.task.ts, gitops_analyze.task.ts, gitops_plan.task.ts, gitops_publish.task.ts, and gitops_validate.task.ts.

Accepts git_ops and npm_ops parameters to support testing via operations pattern (see operations.ts for dependency injection details).

5 declarations

view source

get_gitops_ready
#

gitops_task_helpers.ts view source

(options: GetGitopsReadyOptions): Promise<{ config_path: string; repos_dir: string; gitops_config: GitopsConfig; local_repos: LocalRepo[]; }>

Central initialization function for all gitops tasks.

Initialization sequence: 1. Loads and normalizes config from gitops.config.ts 2. Resolves local repo paths (creates missing with --download) 3. Switches branches and pulls latest changes 4. Auto-installs deps if package.json changed during pull

Priority for path resolution: - dir argument (explicit override) - Config repos_dir setting - DEFAULT_REPOS_DIR constant

options

returns

Promise<{ config_path: string; repos_dir: string; gitops_config: GitopsConfig; local_repos: LocalRepo[]; }>

initialized config and fully loaded repos ready for operations

throws

  • if - config loading or repo resolution fails

GetGitopsReadyOptions
#

import_gitops_config
#

resolve_gitops_paths
#

ResolveGitopsPathsOptions
#

Depends on
#

Imported by
#