import type { ApiClient } from './api-client'; import type { ProjectConfigResponse } from './types'; /** * Run a `git` subcommand with the auth env merged on top of process.env. * * Collapses the `execFileAsync('git', args, { [cwd,] env: { ...process.env, ...env }, timeout })` * idiom that was duplicated across clone/checkout/fetch/reset calls. Centralising * it guarantees every git invocation gets the same env-merge and an explicit * timeout, so a new call site cannot accidentally drop the auth env or run * without a timeout. */ export declare function runGit(args: string[], options: { env: Record; timeout: number; cwd?: string; }): Promise; export interface RepoSyncResult { repositoryId: string; repositoryCode: string; repositoryName: string; status: 'cloned' | 'updated' | 'skipped'; error?: string; } /** * プロジェクト設定に含まれるリポジトリを同期(クローンまたは更新)する */ export declare function syncRepositories(client: ApiClient, repositories: NonNullable, reposDir: string, prefix: string): Promise; export declare function buildCloneUrl(url: string, authMethod: string, authSecret: string): string; /** * リポジトリコードを指定して単体同期する。 * overrideBranch を指定した場合は ProjectConfig のブランチを上書きする。 */ export declare function syncRepositoryByCode(client: ApiClient, repositories: NonNullable, repositoryCode: string, overrideBranch: string | undefined, reposDir: string, prefix: string): Promise; export { normalizePemKey } from './utils/pem-key'; export declare function buildAuthEnv(authMethod: string, authSecret: string, tenantCode: string | undefined, repositoryUrl: string): { env: Record; cleanup: () => void; }; //# sourceMappingURL=repo-sync.d.ts.map