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 { SimpleGitOptions } from '../types';
import { SimpleGitPlugin } from './simple-git-plugin';
export declare function abortPlugin(signal: SimpleGitOptions['abort']): (SimpleGitPlugin<"spawn.before"> | SimpleGitPlugin<"spawn.after">)[] | undefined;

View file

@ -0,0 +1,3 @@
import type { SimpleGitPlugin } from './simple-git-plugin';
import type { SimpleGitPluginConfig } from '../types';
export declare function blockUnsafeOperationsPlugin({ allowUnsafeProtocolOverride, allowUnsafePack, }?: SimpleGitPluginConfig['unsafe']): SimpleGitPlugin<'spawn.args'>;

View file

@ -0,0 +1,2 @@
import { SimpleGitPlugin } from './simple-git-plugin';
export declare function commandConfigPrefixingPlugin(configuration: string[]): SimpleGitPlugin<'spawn.args'>;

View file

@ -0,0 +1,3 @@
import { SimpleGitPluginConfig } from '../types';
import { SimpleGitPlugin } from './simple-git-plugin';
export declare function completionDetectionPlugin({ onClose, onExit, }?: SimpleGitPluginConfig['completion']): SimpleGitPlugin<'spawn.after'>;

View file

@ -0,0 +1,3 @@
import type { SimpleGitOptions } from '../types';
import { PluginStore } from './plugin-store';
export declare function customBinaryPlugin(plugins: PluginStore, input?: SimpleGitOptions['binary'], allowUnsafe?: boolean): void;

View file

@ -0,0 +1,7 @@
import { GitExecutorResult, SimpleGitPluginConfig } from '../types';
import { SimpleGitPlugin } from './simple-git-plugin';
type TaskResult = Omit<GitExecutorResult, 'rejection'>;
declare function isTaskError(result: TaskResult): boolean;
export declare function errorDetectionHandler(overwrite?: boolean, isError?: typeof isTaskError, errorMessage?: (result: TaskResult) => Buffer | Error): (error: Buffer | Error | undefined, result: TaskResult) => Error | Buffer<ArrayBufferLike> | undefined;
export declare function errorDetectionPlugin(config: SimpleGitPluginConfig['errors']): SimpleGitPlugin<'task.error'>;
export {};

View file

@ -0,0 +1,11 @@
export * from './abort-plugin';
export * from './block-unsafe-operations-plugin';
export * from './command-config-prefixing-plugin';
export * from './completion-detection.plugin';
export * from './custom-binary.plugin';
export * from './error-detection.plugin';
export * from './plugin-store';
export * from './progress-monitor-plugin';
export * from './simple-git-plugin';
export * from './spawn-options-plugin';
export * from './timout-plugin';

View file

@ -0,0 +1,11 @@
import type { SimpleGitPlugin, SimpleGitPluginType, SimpleGitPluginTypes } from './simple-git-plugin';
import type { SimpleGitPluginConfig } from '../types';
export declare class PluginStore {
private plugins;
private events;
on<K extends keyof SimpleGitPluginConfig>(type: K, listener: (data: SimpleGitPluginConfig[K]) => void): void;
reconfigure<K extends keyof SimpleGitPluginConfig>(type: K, data: SimpleGitPluginConfig[K]): void;
append<T extends SimpleGitPluginType>(type: T, action: SimpleGitPlugin<T>['action']): () => boolean;
add<T extends SimpleGitPluginType>(plugin: void | SimpleGitPlugin<T> | SimpleGitPlugin<T>[]): () => void;
exec<T extends SimpleGitPluginType>(type: T, data: SimpleGitPluginTypes[T]['data'], context: SimpleGitPluginTypes[T]['context']): typeof data;
}

View file

@ -0,0 +1,3 @@
import { SimpleGitOptions } from '../types';
import { SimpleGitPlugin } from './simple-git-plugin';
export declare function progressMonitorPlugin(progress: Exclude<SimpleGitOptions['progress'], void>): (SimpleGitPlugin<"spawn.after"> | SimpleGitPlugin<"spawn.args">)[];

View file

@ -0,0 +1,46 @@
import { ChildProcess, SpawnOptions } from 'child_process';
import { GitExecutorResult } from '../types';
type SimpleGitTaskPluginContext = {
readonly method: string;
readonly commands: string[];
};
export interface SimpleGitPluginTypes {
'spawn.args': {
data: string[];
context: SimpleGitTaskPluginContext & {};
};
'spawn.binary': {
data: string;
context: SimpleGitTaskPluginContext & {};
};
'spawn.options': {
data: Partial<SpawnOptions>;
context: SimpleGitTaskPluginContext & {};
};
'spawn.before': {
data: void;
context: SimpleGitTaskPluginContext & {
kill(reason: Error): void;
};
};
'spawn.after': {
data: void;
context: SimpleGitTaskPluginContext & {
spawned: ChildProcess;
close(exitCode: number, reason?: Error): void;
kill(reason: Error): void;
};
};
'task.error': {
data: {
error?: Error;
};
context: SimpleGitTaskPluginContext & GitExecutorResult;
};
}
export type SimpleGitPluginType = keyof SimpleGitPluginTypes;
export interface SimpleGitPlugin<T extends SimpleGitPluginType> {
action(data: SimpleGitPluginTypes[T]['data'], context: SimpleGitPluginTypes[T]['context']): typeof data;
type: T;
}
export {};

View file

@ -0,0 +1,3 @@
import { SpawnOptions } from 'child_process';
import { SimpleGitPlugin } from './simple-git-plugin';
export declare function spawnOptionsPlugin(spawnOptions: Partial<SpawnOptions>): SimpleGitPlugin<'spawn.options'>;

View file

@ -0,0 +1,2 @@
import { SimpleGitPlugin } from './simple-git-plugin';
export declare function suffixPathsPlugin(): SimpleGitPlugin<'spawn.args'>;

View file

@ -0,0 +1,3 @@
import type { SimpleGitPlugin } from './simple-git-plugin';
import type { SimpleGitOptions } from '../types';
export declare function timeoutPlugin({ block, stdErr, stdOut, }: Exclude<SimpleGitOptions['timeout'], undefined>): SimpleGitPlugin<'spawn.after'> | void;