UNPKG

qraft

Version:

A powerful CLI tool to qraft structured project setups from GitHub template repositories

67 lines 2.02 kB
import { BoxManifest } from '../types'; import { ManifestManager } from './manifestManager'; export interface CreateBoxOptions { branch?: string; commitMessage?: string; createPR?: boolean; prTitle?: string; prDescription?: string; } export interface CreateBoxResult { success: boolean; message: string; boxPath: string; commitSha?: string; prUrl?: string; prNumber?: number; nextSteps: string[]; } export interface FileToUpload { path: string; content: string | Buffer; encoding?: 'utf-8' | 'base64'; } export declare class RepositoryManager { private readonly githubToken?; private readonly permissionChecker; private readonly repositoryForker; private readonly pullRequestCreator; private readonly manifestManager; private readonly boxRegistryManager; constructor(githubToken?: string | undefined); /** * Create a new box in a GitHub repository */ createBox(owner: string, repo: string, boxName: string, localPath: string, manifest: BoxManifest, remotePath?: string, options?: CreateBoxOptions): Promise<CreateBoxResult>; /** * Create box in a specific repository (with write access) */ private createBoxInRepository; /** * Collect all files from local directory */ private collectFiles; /** * Check if a file is a text file */ private isTextFile; /** * Calculate total size of files */ private calculateTotalSize; /** * Store local manifest copy after box creation * @param localPath Local path where the box was created from * @param manifest Box manifest * @param registry Registry identifier (owner/repo) * @param boxName Box name * @returns Promise<void> */ private storeLocalManifestCopy; /** * Get manifest manager instance * @returns ManifestManager Manifest manager instance */ getManifestManager(): ManifestManager; } //# sourceMappingURL=repositoryManager.d.ts.map