GitRoot
craft your forge, build your project, grow your community freely
1// SPDX-FileCopyrightText: 2025 Romain Maneschi <romain@gitroot.dev>
2//
3// SPDX-License-Identifier: MIT
4
5import { FS } from "../fs";
6import { Commit } from "./commit";
7import { ForgeConf } from "./forgeconf";
8
9export interface Server {
10 forgeConf(): ForgeConf;
11 worktree(): FS;
12 webcontent(): FS;
13 cache(): FS;
14 modifyContent(filepath: string, content: string): void;
15 modifyWebContent(filepath: string, content: string): void;
16 replaceWebContent(
17 filepath: string,
18 oldContent: string,
19 content: string
20 ): void;
21 modifyCacheContent(filepath: string, content: string): void;
22 commitAllIfNeeded(message: string): void;
23 diffWithParent(
24 hash: string,
25 oldFilepath: string,
26 newFilepath: string
27 ): string;
28 log(message: string): void;
29 logError(message: string, err: string): void;
30 merge(from: string, to: string): void;
31 commits(from: string, to: string): Array<Commit>;
32}