Website Structure

This commit is contained in:
supalerk-ar66 2026-01-13 10:46:40 +07:00
parent 62812f2090
commit 71f0676a62
22365 changed files with 4265753 additions and 791 deletions

View file

@ -0,0 +1,3 @@
import { OptionFlags, Options, StringTask } from '../types';
export type ApplyOptions = Options & OptionFlags<'--stat' | '--numstat' | '--summary' | '--check' | '--index' | '--intent-to-add' | '--3way' | '--apply' | '--no-add' | '-R' | '--reverse' | '--allow-binary-replacement' | '--binary' | '--reject' | '-z' | '--inaccurate-eof' | '--recount' | '--cached' | '--ignore-space-change' | '--ignore-whitespace' | '--verbose' | '--unsafe-paths'> & OptionFlags<'--whitespace', 'nowarn' | 'warn' | 'fix' | 'error' | 'error-all'> & OptionFlags<'--build-fake-ancestor' | '--exclude' | '--include' | '--directory', string> & OptionFlags<'-p' | '-C', number>;
export declare function applyPatchTask(patches: string[], customArgs: string[]): StringTask<string>;

View file

@ -0,0 +1,7 @@
import { BranchMultiDeleteResult, BranchSingleDeleteResult, BranchSummary } from '../../../typings';
import { StringTask } from '../types';
export declare function containsDeleteBranchCommand(commands: string[]): boolean;
export declare function branchTask(customArgs: string[]): StringTask<BranchSummary | BranchSingleDeleteResult>;
export declare function branchLocalTask(): StringTask<BranchSummary>;
export declare function deleteBranchesTask(branches: string[], forceDelete?: boolean): StringTask<BranchMultiDeleteResult>;
export declare function deleteBranchTask(branch: string, forceDelete?: boolean): StringTask<BranchSingleDeleteResult>;

View file

@ -0,0 +1,2 @@
import { SimpleGitExecutor } from '../types';
export declare function changeWorkingDirectoryTask(directory: string, root?: SimpleGitExecutor): import("./task").EmptyTask;

View file

@ -0,0 +1,2 @@
import { StringTask } from '../types';
export declare function checkIgnoreTask(paths: string[]): StringTask<string[]>;

View file

@ -0,0 +1,9 @@
import { Maybe, StringTask } from '../types';
export declare enum CheckRepoActions {
BARE = "bare",
IN_TREE = "tree",
IS_REPO_ROOT = "root"
}
export declare function checkIsRepoTask(action: Maybe<CheckRepoActions>): StringTask<boolean>;
export declare function checkIsRepoRootTask(): StringTask<boolean>;
export declare function checkIsBareRepoTask(): StringTask<boolean>;

View file

@ -0,0 +1,2 @@
import type { SimpleGit } from '../../../typings';
export default function (): Pick<SimpleGit, 'checkout' | 'checkoutBranch' | 'checkoutLocalBranch'>;

View file

@ -0,0 +1,25 @@
import { CleanSummary } from '../../../typings';
import { StringTask } from '../types';
export declare const CONFIG_ERROR_INTERACTIVE_MODE = "Git clean interactive mode is not supported";
export declare const CONFIG_ERROR_MODE_REQUIRED = "Git clean mode parameter (\"n\" or \"f\") is required";
export declare const CONFIG_ERROR_UNKNOWN_OPTION = "Git clean unknown option found in: ";
/**
* All supported option switches available for use in a `git.clean` operation
*/
export declare enum CleanOptions {
DRY_RUN = "n",
FORCE = "f",
IGNORED_INCLUDED = "x",
IGNORED_ONLY = "X",
EXCLUDING = "e",
QUIET = "q",
RECURSIVE = "d"
}
/**
* The two modes `git.clean` can run in - one of these must be supplied in order
* for the command to not throw a `TaskConfigurationError`
*/
export type CleanMode = CleanOptions.FORCE | CleanOptions.DRY_RUN;
export declare function cleanWithOptionsTask(mode: CleanMode | string, customArgs: string[]): import("./task").EmptyTask | StringTask<CleanSummary>;
export declare function cleanTask(mode: CleanMode, customArgs: string[]): StringTask<CleanSummary>;
export declare function isCleanOptionsArray(input: string[]): input is CleanOptions[];

View file

@ -0,0 +1,5 @@
import { EmptyTask } from './task';
import { OptionFlags, Options, StringTask } from '../types';
export type CloneOptions = Options & OptionFlags<'--bare' | '--dissociate' | '--mirror' | '--no-checkout' | '--no-remote-submodules' | '--no-shallow-submodules' | '--no-single-branch' | '--no-tags' | '--remote-submodules' | '--single-branch' | '--shallow-submodules' | '--verbose'> & OptionFlags<'--depth' | '-j' | '--jobs', number> & OptionFlags<'--branch' | '--origin' | '--recurse-submodules' | '--separate-git-dir' | '--shallow-exclude' | '--shallow-since' | '--template', string>;
export declare function cloneTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): StringTask<string> | EmptyTask;
export declare function cloneMirrorTask(repo: string | undefined, directory: string | undefined, customArgs: string[]): EmptyTask | StringTask<string>;

View file

@ -0,0 +1,4 @@
import type { CommitResult, SimpleGit } from '../../../typings';
import type { StringTask } from '../types';
export declare function commitTask(message: string[], files: string[], customArgs: string[]): StringTask<CommitResult>;
export default function (): Pick<SimpleGit, 'commit'>;

View file

@ -0,0 +1,8 @@
import type { SimpleGit } from '../../../typings';
export declare enum GitConfigScope {
system = "system",
global = "global",
local = "local",
worktree = "worktree"
}
export default function (): Pick<SimpleGit, 'addConfig' | 'getConfig' | 'listConfig'>;

View file

@ -0,0 +1,12 @@
import type { SimpleGit } from '../../../typings';
export interface CountObjectsResult {
count: number;
size: number;
inPack: number;
packs: number;
sizePack: number;
prunePackable: number;
garbage: number;
sizeGarbage: number;
}
export default function (): Pick<SimpleGit, 'countObjects'>;

View file

@ -0,0 +1,12 @@
export declare enum DiffNameStatus {
ADDED = "A",
COPIED = "C",
DELETED = "D",
MODIFIED = "M",
RENAMED = "R",
CHANGED = "T",
UNMERGED = "U",
UNKNOWN = "X",
BROKEN = "B"
}
export declare function isDiffNameStatus(input: string): input is DiffNameStatus;

View file

@ -0,0 +1,5 @@
import { StringTask } from '../types';
import { DiffResult } from '../../../typings';
import { EmptyTask } from './task';
export declare function diffSummaryTask(customArgs: string[]): StringTask<DiffResult> | EmptyTask;
export declare function validateLogFormatConfig(customArgs: unknown[]): EmptyTask | void;

View file

@ -0,0 +1,4 @@
import { FetchResult } from '../../../typings';
import { StringTask } from '../types';
import { EmptyTask } from './task';
export declare function fetchTask(remote: string, branch: string, customArgs: string[]): StringTask<FetchResult> | EmptyTask;

View file

@ -0,0 +1,2 @@
import { SimpleGit } from '../../../typings';
export default function (): Pick<SimpleGit, 'firstCommit'>;

View file

@ -0,0 +1,12 @@
import { SimpleGit } from '../../../typings';
export interface GitGrepQuery extends Iterable<string> {
/** Adds one or more terms to be grouped as an "and" to any other terms */
and(...and: string[]): this;
/** Adds one or more search terms - git.grep will "or" this to other terms */
param(...param: string[]): this;
}
/**
* Creates a new builder for a `git.grep` query with optional params
*/
export declare function grepQueryBuilder(...params: string[]): GitGrepQuery;
export default function (): Pick<SimpleGit, 'grep'>;

View file

@ -0,0 +1,5 @@
import { StringTask } from '../types';
/**
* Task used by `git.hashObject`
*/
export declare function hashObjectTask(filePath: string, write: boolean): StringTask<string>;

View file

@ -0,0 +1,3 @@
import { InitResult } from '../../../typings';
import { StringTask } from '../types';
export declare function initTask(bare: boolean | undefined, path: string, customArgs: string[]): StringTask<InitResult>;

View file

@ -0,0 +1,32 @@
import type { LogResult, Options, SimpleGit } from '../../../typings';
import { StringTask } from '../types';
export interface DefaultLogFields {
hash: string;
date: string;
message: string;
refs: string;
body: string;
author_name: string;
author_email: string;
}
export type LogOptions<T = DefaultLogFields> = {
file?: string;
format?: T;
from?: string;
mailMap?: boolean;
maxCount?: number;
multiLine?: boolean;
splitter?: string;
strictDate?: boolean;
symmetric?: boolean;
to?: string;
};
interface ParsedLogOptions {
fields: string[];
splitter: string;
commands: string[];
}
export declare function parseLogOptions<T extends Options>(opt?: Options | LogOptions<T>, customArgs?: string[]): ParsedLogOptions;
export declare function logTask<T>(splitter: string, fields: string[], customArgs: string[]): StringTask<LogResult<T>>;
export default function (): Pick<SimpleGit, 'log'>;
export {};

View file

@ -0,0 +1,4 @@
import { MergeResult } from '../../../typings';
import { StringTask } from '../types';
import { EmptyTask } from './task';
export declare function mergeTask(customArgs: string[]): EmptyTask | StringTask<MergeResult>;

View file

@ -0,0 +1,3 @@
import { MoveResult } from '../../../typings';
import { StringTask } from '../types';
export declare function moveTask(from: string | string[], to: string): StringTask<MoveResult>;

View file

@ -0,0 +1,3 @@
import { PullResult } from '../../../typings';
import { Maybe, StringTask } from '../types';
export declare function pullTask(remote: Maybe<string>, branch: Maybe<string>, customArgs: string[]): StringTask<PullResult>;

View file

@ -0,0 +1,9 @@
import { PushResult } from '../../../typings';
import { StringTask } from '../types';
type PushRef = {
remote?: string;
branch?: string;
};
export declare function pushTagsTask(ref: PushRef | undefined, customArgs: string[]): StringTask<PushResult>;
export declare function pushTask(ref: PushRef | undefined, customArgs: string[]): StringTask<PushResult>;
export {};

View file

@ -0,0 +1,8 @@
import { type RemoteWithoutRefs, type RemoteWithRefs } from '../responses/GetRemoteSummary';
import type { StringTask } from '../types';
export declare function addRemoteTask(remoteName: string, remoteRepo: string, customArgs: string[]): StringTask<string>;
export declare function getRemotesTask(verbose: true): StringTask<RemoteWithRefs[]>;
export declare function getRemotesTask(verbose: false): StringTask<RemoteWithoutRefs[]>;
export declare function listRemotesTask(customArgs: string[]): StringTask<string>;
export declare function remoteTask(customArgs: string[]): StringTask<string>;
export declare function removeRemoteTask(remoteName: string): StringTask<string>;

View file

@ -0,0 +1,11 @@
import type { Maybe, OptionFlags, Options } from '../types';
export declare enum ResetMode {
MIXED = "mixed",
SOFT = "soft",
HARD = "hard",
MERGE = "merge",
KEEP = "keep"
}
export type ResetOptions = Options & OptionFlags<'-q' | '--quiet' | '--no-quiet' | '--pathspec-from-nul'> & OptionFlags<'--pathspec-from-file', string>;
export declare function resetTask(mode: Maybe<ResetMode>, customArgs: string[]): import("../types").StringTask<string>;
export declare function getResetMode(mode: ResetMode | unknown): Maybe<ResetMode>;

View file

@ -0,0 +1,2 @@
import { SimpleGit } from '../../../typings';
export default function (): Pick<SimpleGit, 'showBuffer' | 'show'>;

View file

@ -0,0 +1,4 @@
import { LogOptions, LogResult } from '../../../typings';
import type { StringTask } from '../types';
import type { EmptyTask } from './task';
export declare function stashListTask(opt: LogOptions | undefined, customArgs: string[]): EmptyTask | StringTask<LogResult>;

View file

@ -0,0 +1,3 @@
import { StatusResult } from '../../../typings';
import { StringTask } from '../types';
export declare function statusTask(customArgs: string[]): StringTask<StatusResult>;

View file

@ -0,0 +1,5 @@
import { StringTask } from '../types';
export declare function addSubModuleTask(repo: string, path: string): StringTask<string>;
export declare function initSubModuleTask(customArgs: string[]): StringTask<string>;
export declare function subModuleTask(customArgs: string[]): StringTask<string>;
export declare function updateSubModuleTask(customArgs: string[]): StringTask<string>;

View file

@ -0,0 +1,18 @@
import { TagResult } from '../../../typings';
import { StringTask } from '../types';
/**
* Task used by `git.tags`
*/
export declare function tagListTask(customArgs?: string[]): StringTask<TagResult>;
/**
* Task used by `git.addTag`
*/
export declare function addTagTask(name: string): StringTask<{
name: string;
}>;
/**
* Task used by `git.addTag`
*/
export declare function addAnnotatedTagTask(name: string, tagMessage: string): StringTask<{
name: string;
}>;

View file

@ -0,0 +1,14 @@
import type { BufferTask, EmptyTaskParser, SimpleGitTask, StringTask } from '../types';
export declare const EMPTY_COMMANDS: [];
export type EmptyTask = {
commands: typeof EMPTY_COMMANDS;
format: 'empty';
parser: EmptyTaskParser;
onError?: undefined;
};
export declare function adhocExecTask(parser: EmptyTaskParser): EmptyTask;
export declare function configurationErrorTask(error: Error | string): EmptyTask;
export declare function straightThroughStringTask(commands: string[], trimmed?: boolean): StringTask<string>;
export declare function straightThroughBufferTask(commands: string[]): BufferTask<Buffer>;
export declare function isBufferTask<R>(task: SimpleGitTask<R>): task is BufferTask<R>;
export declare function isEmptyTask<R>(task: SimpleGitTask<R>): task is EmptyTask;

View file

@ -0,0 +1,9 @@
import type { SimpleGit } from '../../../typings';
export interface VersionResult {
major: number;
minor: number;
patch: number | string;
agent: string;
installed: boolean;
}
export default function (): Pick<SimpleGit, 'version'>;