//#region src/copy-from-github.d.ts type FetchStrategyName = 'gh-api' | 'git' | 'https'; interface CopyFromGithubOptions { sourceSpec: string; destination: string; refOverride: string | undefined; force: boolean; dryRun: boolean; verbose: boolean; } interface CopyFromGithubResult { strategy: FetchStrategyName; written: string[]; owner: string; repo: string; repoPath: string; ref: string | undefined; } declare function copyFromGithub(opts: CopyFromGithubOptions): Promise; //#endregion //#region src/logger.d.ts interface Logger { verbose: (msg: string) => void; info: (msg: string) => void; } declare function createLogger(verboseEnabled: boolean): Logger; //#endregion //#region src/safe-write.d.ts declare function assertSafeUnderDest(destRoot: string, relativePath: string): string; interface WritePlan { relativePath: string; content: Buffer; mode?: number; } declare function applyWritePlan(destRoot: string, plans: WritePlan[], opts: { force: boolean; dryRun: boolean; log: Logger; }): Promise; //#endregion //#region src/strategy-result.d.ts type FailureKind = 'not-found' | 'auth' | 'missing-tool' | 'generic'; type StrategyName = 'gh-api' | 'git' | 'https'; interface StrategyFailure { strategy: StrategyName; kind: FailureKind; message: string; } type StrategyResult = { ok: true; plans: WritePlan[]; } | { ok: false; failure: StrategyFailure; }; declare function okPlans(plans: WritePlan[]): StrategyResult; declare function strategyFail(strategy: StrategyName, kind: FailureKind, message: string): StrategyResult; declare function failureKindFromMessage(msg: string): FailureKind; declare function isEnoent(e: unknown): boolean; declare function selectBestFailure(failures: StrategyFailure[]): StrategyFailure; interface AggregateFailureContext { owner: string; repo: string; repoPath: string; ref: string | undefined; } declare function formatAllStrategiesFailed(best: StrategyFailure, ctx: AggregateFailureContext): string; declare class CopyFromGithubError extends Error { readonly code: string; readonly exitCode: 2; constructor(best: StrategyFailure, formattedMessage: string); } //#endregion //#region src/parse-source-spec.d.ts interface ParsedSourceSpec { owner: string; repo: string; repoPath: string; refFromHash: string | undefined; } declare function parseSourceSpec(raw: string): ParsedSourceSpec; declare function encodeRepoContentPath(repoPath: string): string; //#endregion export { CopyFromGithubError, type CopyFromGithubOptions, type CopyFromGithubResult, type FetchStrategyName, type ParsedSourceSpec, copyFromGithub, parseSourceSpec }; //# sourceMappingURL=main.d.cts.map