plugin-git-manager 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.d.ts +3 -0
- package/client.js +1 -0
- package/dist/client/100.e08d760e0b01997c.js +10 -0
- package/dist/client/components/CommitHistory.d.ts +2 -0
- package/dist/client/components/FileExplorer.d.ts +2 -0
- package/dist/client/components/GitManagerSettings.d.ts +2 -0
- package/dist/client/components/GitOperations.d.ts +2 -0
- package/dist/client/components/RepositoryConfig.d.ts +2 -0
- package/dist/client/context/GitManagerContext.d.ts +24 -0
- package/dist/client/index.d.ts +5 -0
- package/dist/client/index.js +10 -0
- package/dist/client/locale.d.ts +2 -0
- package/dist/externalVersion.js +18 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +48 -0
- package/dist/locale/en-US.json +45 -0
- package/dist/locale/vi-VN.json +45 -0
- package/dist/node_modules/simple-git/dist/cjs/index.js +7399 -0
- package/dist/node_modules/simple-git/dist/esm/index.js +4745 -0
- package/dist/node_modules/simple-git/dist/esm/package.json +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/api.d.ts +13 -0
- package/dist/node_modules/simple-git/dist/src/lib/args/log-format.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/errors/git-construct-error.d.ts +15 -0
- package/dist/node_modules/simple-git/dist/src/lib/errors/git-error.d.ts +30 -0
- package/dist/node_modules/simple-git/dist/src/lib/errors/git-plugin-error.d.ts +7 -0
- package/dist/node_modules/simple-git/dist/src/lib/errors/git-response-error.d.ts +32 -0
- package/dist/node_modules/simple-git/dist/src/lib/errors/task-configuration-error.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/git-factory.d.ts +15 -0
- package/dist/node_modules/simple-git/dist/src/lib/git-logger.d.ts +21 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-branch-delete.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-branch.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-commit.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-diff-summary.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-fetch.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-list-log-summary.d.ts +6 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-merge.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-move.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-pull.d.ts +6 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-push.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-remote-messages.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/parsers/parse-remote-objects.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/abort-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/block-unsafe-operations-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/command-config-prefixing-plugin.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/completion-detection.plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/custom-binary.plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/error-detection.plugin.d.ts +7 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/index.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/plugin-store.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/progress-monitor-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/simple-git-plugin.d.ts +48 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/spawn-options-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/suffix-paths.plugin.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/plugins/timout-plugin.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/BranchDeleteSummary.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/BranchSummary.d.ts +14 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/CheckIgnore.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/CleanSummary.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/ConfigList.d.ts +13 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/DiffSummary.d.ts +10 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/FileStatusSummary.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/GetRemoteSummary.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/InitSummary.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/MergeSummary.d.ts +16 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/PullSummary.d.ts +25 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/StatusSummary.d.ts +19 -0
- package/dist/node_modules/simple-git/dist/src/lib/responses/TagList.d.ts +7 -0
- package/dist/node_modules/simple-git/dist/src/lib/runners/git-executor-chain.d.ts +25 -0
- package/dist/node_modules/simple-git/dist/src/lib/runners/git-executor.d.ts +14 -0
- package/dist/node_modules/simple-git/dist/src/lib/runners/promise-wrapped.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/runners/scheduler.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/runners/tasks-pending-queue.d.ts +23 -0
- package/dist/node_modules/simple-git/dist/src/lib/simple-git-api.d.ts +20 -0
- package/dist/node_modules/simple-git/dist/src/lib/task-callback.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/apply-patch.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/branch.d.ts +7 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/change-working-directory.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/check-ignore.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/check-is-repo.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/checkout.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/clean.d.ts +25 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/clone.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/commit.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/config.d.ts +8 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/count-objects.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/diff-name-status.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/diff.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/fetch.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/first-commit.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/grep.d.ts +12 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/hash-object.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/init.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/log.d.ts +32 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/merge.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/move.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/pull.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/push.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/remote.d.ts +8 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/reset.d.ts +11 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/show.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/stash-list.d.ts +4 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/status.d.ts +3 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/sub-module.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/tag.d.ts +18 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/task.d.ts +14 -0
- package/dist/node_modules/simple-git/dist/src/lib/tasks/version.d.ts +9 -0
- package/dist/node_modules/simple-git/dist/src/lib/types/handlers.d.ts +21 -0
- package/dist/node_modules/simple-git/dist/src/lib/types/index.d.ts +136 -0
- package/dist/node_modules/simple-git/dist/src/lib/types/tasks.d.ts +19 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/argument-filters.d.ts +14 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/exit-codes.d.ts +10 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/git-output-streams.d.ts +7 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/index.d.ts +8 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/line-parser.d.ts +15 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/simple-git-options.d.ts +2 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/task-options.d.ts +13 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/task-parser.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/src/lib/utils/util.d.ts +47 -0
- package/dist/node_modules/simple-git/dist/typings/errors.d.ts +5 -0
- package/dist/node_modules/simple-git/dist/typings/index.d.ts +14 -0
- package/dist/node_modules/simple-git/dist/typings/response.d.ts +556 -0
- package/dist/node_modules/simple-git/dist/typings/simple-git.d.ts +1033 -0
- package/dist/node_modules/simple-git/dist/typings/types.d.ts +22 -0
- package/dist/node_modules/simple-git/node_modules/debug/package.json +64 -0
- package/dist/node_modules/simple-git/node_modules/debug/src/browser.js +272 -0
- package/dist/node_modules/simple-git/node_modules/debug/src/common.js +292 -0
- package/dist/node_modules/simple-git/node_modules/debug/src/index.js +10 -0
- package/dist/node_modules/simple-git/node_modules/debug/src/node.js +263 -0
- package/dist/node_modules/simple-git/package.json +1 -0
- package/dist/node_modules/simple-git/promise.js +17 -0
- package/dist/server/actions/git-actions.d.ts +13 -0
- package/dist/server/actions/git-actions.js +354 -0
- package/dist/server/collections/gitRepositories.d.ts +2 -0
- package/dist/server/collections/gitRepositories.js +75 -0
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.js +48 -0
- package/dist/server/plugin.d.ts +6 -0
- package/dist/server/plugin.js +120 -0
- package/package.json +32 -0
- package/server.d.ts +2 -0
- package/server.js +1 -0
- package/src/client/components/CommitHistory.tsx +326 -0
- package/src/client/components/FileExplorer.tsx +329 -0
- package/src/client/components/GitManagerSettings.tsx +123 -0
- package/src/client/components/GitOperations.tsx +195 -0
- package/src/client/components/RepositoryConfig.tsx +188 -0
- package/src/client/context/GitManagerContext.tsx +84 -0
- package/src/client/index.tsx +19 -0
- package/src/client/locale.ts +9 -0
- package/src/index.ts +2 -0
- package/src/locale/en-US.json +45 -0
- package/src/locale/vi-VN.json +45 -0
- package/src/server/actions/git-actions.ts +346 -0
- package/src/server/collections/gitRepositories.ts +45 -0
- package/src/server/index.ts +2 -0
- package/src/server/plugin.ts +81 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { MaybeArray, TaskParser, TaskResponseFormat } from '../types';
|
|
2
|
+
import { GitOutputStreams } from './git-output-streams';
|
|
3
|
+
import { LineParser } from './line-parser';
|
|
4
|
+
export declare function callTaskParser<INPUT extends TaskResponseFormat, RESPONSE>(parser: TaskParser<INPUT, RESPONSE>, streams: GitOutputStreams<INPUT>): RESPONSE;
|
|
5
|
+
export declare function parseStringResponse<T>(result: T, parsers: LineParser<T>[], texts: MaybeArray<string>, trim?: boolean): T;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Maybe } from '../types';
|
|
2
|
+
type Callable = (...args: unknown[]) => unknown;
|
|
3
|
+
export declare const NULL = "\0";
|
|
4
|
+
export declare const NOOP: Callable;
|
|
5
|
+
/**
|
|
6
|
+
* Returns either the source argument when it is a `Function`, or the default
|
|
7
|
+
* `NOOP` function constant
|
|
8
|
+
*/
|
|
9
|
+
export declare function asFunction<T>(source: T | unknown): Callable;
|
|
10
|
+
/**
|
|
11
|
+
* Determines whether the supplied argument is both a function, and is not
|
|
12
|
+
* the `NOOP` function.
|
|
13
|
+
*/
|
|
14
|
+
export declare function isUserFunction<T extends Function>(source: T | unknown): source is T;
|
|
15
|
+
export declare function splitOn(input: string, char: string): [string, string];
|
|
16
|
+
export declare function first<T extends unknown[]>(input: T, offset?: number): Maybe<T[number]>;
|
|
17
|
+
export declare function first<T extends IArguments>(input: T, offset?: number): Maybe<unknown>;
|
|
18
|
+
export declare function last<T extends unknown[]>(input: T, offset?: number): Maybe<T[number]>;
|
|
19
|
+
export declare function last<T extends IArguments>(input: T, offset?: number): Maybe<unknown>;
|
|
20
|
+
export declare function last<T>(input: T, offset?: number): Maybe<unknown>;
|
|
21
|
+
export declare function toLinesWithContent(input?: string, trimmed?: boolean, separator?: string): string[];
|
|
22
|
+
type LineWithContentCallback<T = void> = (line: string) => T;
|
|
23
|
+
export declare function forEachLineWithContent<T>(input: string, callback: LineWithContentCallback<T>): T[];
|
|
24
|
+
export declare function folderExists(path: string): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Adds `item` into the `target` `Array` or `Set` when it is not already present and returns the `item`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function append<T>(target: T[] | Set<T>, item: T): typeof item;
|
|
29
|
+
/**
|
|
30
|
+
* Adds `item` into the `target` `Array` when it is not already present and returns the `target`.
|
|
31
|
+
*/
|
|
32
|
+
export declare function including<T>(target: T[], item: T): typeof target;
|
|
33
|
+
export declare function remove<T>(target: Set<T> | T[], item: T): T;
|
|
34
|
+
export declare const objectToString: (input: unknown) => string;
|
|
35
|
+
export declare function asArray<T>(source: T | T[]): T[];
|
|
36
|
+
export declare function asCamelCase(str: string): string;
|
|
37
|
+
export declare function asStringArray<T>(source: T | T[]): string[];
|
|
38
|
+
export declare function asNumber(source: string | null | undefined, onNaN?: number): number;
|
|
39
|
+
export declare function prefixedArray<T>(input: T[], prefix: T): T[];
|
|
40
|
+
export declare function bufferToString(input: Buffer | Buffer[]): string;
|
|
41
|
+
/**
|
|
42
|
+
* Get a new object from a source object with only the listed properties.
|
|
43
|
+
*/
|
|
44
|
+
export declare function pick<T, K extends keyof T>(source: T, properties: readonly K[]): Partial<Pick<T, K>>;
|
|
45
|
+
export declare function delay(duration?: number): Promise<void>;
|
|
46
|
+
export declare function orVoid<T>(input: T | false): T | undefined;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from '../src/lib/errors/git-error';
|
|
2
|
+
export * from '../src/lib/errors/git-construct-error';
|
|
3
|
+
export * from '../src/lib/errors/git-plugin-error';
|
|
4
|
+
export * from '../src/lib/errors/git-response-error';
|
|
5
|
+
export * from '../src/lib/errors/task-configuration-error';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SimpleGitFactory } from './simple-git';
|
|
2
|
+
|
|
3
|
+
export { pathspec } from '@simple-git/args-pathspec';
|
|
4
|
+
|
|
5
|
+
export * from './simple-git';
|
|
6
|
+
export * from './errors';
|
|
7
|
+
export * from './response';
|
|
8
|
+
export * from './types';
|
|
9
|
+
|
|
10
|
+
export declare const gitP: SimpleGitFactory;
|
|
11
|
+
|
|
12
|
+
export declare const simpleGit: SimpleGitFactory;
|
|
13
|
+
|
|
14
|
+
export default simpleGit;
|
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
import type { DiffNameStatus } from '../src/lib/tasks/diff-name-status';
|
|
2
|
+
import type { DefaultLogFields } from '../src/lib/tasks/log';
|
|
3
|
+
|
|
4
|
+
export interface BranchSummaryBranch {
|
|
5
|
+
current: boolean;
|
|
6
|
+
name: string;
|
|
7
|
+
commit: string;
|
|
8
|
+
label: string;
|
|
9
|
+
linkedWorkTree: boolean;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface BranchSummary {
|
|
13
|
+
detached: boolean;
|
|
14
|
+
current: string;
|
|
15
|
+
all: string[];
|
|
16
|
+
branches: {
|
|
17
|
+
[key: string]: BranchSummaryBranch;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Represents the successful deletion of a single branch
|
|
23
|
+
*/
|
|
24
|
+
export interface BranchSingleDeleteSuccess {
|
|
25
|
+
branch: string;
|
|
26
|
+
hash: string;
|
|
27
|
+
success: true;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Represents the failure to delete a single branch
|
|
32
|
+
*/
|
|
33
|
+
export interface BranchSingleDeleteFailure {
|
|
34
|
+
branch: string;
|
|
35
|
+
hash: null;
|
|
36
|
+
success: false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type BranchSingleDeleteResult = BranchSingleDeleteFailure | BranchSingleDeleteSuccess;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Represents the status of having deleted a batch of branches
|
|
43
|
+
*/
|
|
44
|
+
export interface BranchMultiDeleteResult {
|
|
45
|
+
/**
|
|
46
|
+
* All branches included in the response
|
|
47
|
+
*/
|
|
48
|
+
all: BranchSingleDeleteResult[];
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Branches mapped by their branch name
|
|
52
|
+
*/
|
|
53
|
+
branches: { [branchName: string]: BranchSingleDeleteResult };
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Array of responses that are in error
|
|
57
|
+
*/
|
|
58
|
+
errors: BranchSingleDeleteResult[];
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Flag showing whether all branches were deleted successfully
|
|
62
|
+
*/
|
|
63
|
+
readonly success: boolean;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface CleanSummary {
|
|
67
|
+
readonly dryRun: boolean;
|
|
68
|
+
paths: string[];
|
|
69
|
+
files: string[];
|
|
70
|
+
folders: string[];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface CommitResult {
|
|
74
|
+
author: null | {
|
|
75
|
+
email: string;
|
|
76
|
+
name: string;
|
|
77
|
+
};
|
|
78
|
+
branch: string;
|
|
79
|
+
commit: string;
|
|
80
|
+
root: boolean;
|
|
81
|
+
summary: {
|
|
82
|
+
changes: number;
|
|
83
|
+
insertions: number;
|
|
84
|
+
deletions: number;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/** Represents the response to using `git.getConfig` */
|
|
89
|
+
export interface ConfigGetResult {
|
|
90
|
+
/** The key that was searched for */
|
|
91
|
+
key: string;
|
|
92
|
+
|
|
93
|
+
/** The single value seen by `git` for this key (equivalent to `git config --get key`) */
|
|
94
|
+
value: string | null;
|
|
95
|
+
|
|
96
|
+
/** All possible values for this key no matter the scope (equivalent to `git config --get-all key`) */
|
|
97
|
+
values: string[];
|
|
98
|
+
|
|
99
|
+
/** The file paths from which configuration was read */
|
|
100
|
+
paths: string[];
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* The full hierarchy of values the property can have had across the
|
|
104
|
+
* various scopes that were searched (keys in this Map are the strings
|
|
105
|
+
* also found in the `paths` array).
|
|
106
|
+
*/
|
|
107
|
+
scopes: Map<string, string[]>;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Represents the current git configuration, as defined by the output from `git log`
|
|
112
|
+
*/
|
|
113
|
+
export interface ConfigListSummary {
|
|
114
|
+
/**
|
|
115
|
+
* All configuration settings, where local/user settings override user/global settings
|
|
116
|
+
* the overridden value will appear in this object.
|
|
117
|
+
*/
|
|
118
|
+
readonly all: ConfigValues;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* The file paths configuration was read from
|
|
122
|
+
*/
|
|
123
|
+
files: string[];
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* The `ConfigValues` for each of the `files`, use this object to determine
|
|
127
|
+
* local repo, user and global settings.
|
|
128
|
+
*/
|
|
129
|
+
values: { [fileName: string]: ConfigValues };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Represents the map of configuration settings
|
|
134
|
+
*/
|
|
135
|
+
export interface ConfigValues {
|
|
136
|
+
[key: string]: string | string[];
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export interface DiffResultTextFile {
|
|
140
|
+
file: string;
|
|
141
|
+
changes: number;
|
|
142
|
+
insertions: number;
|
|
143
|
+
deletions: number;
|
|
144
|
+
binary: false;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface DiffResultBinaryFile {
|
|
148
|
+
file: string;
|
|
149
|
+
before: number;
|
|
150
|
+
after: number;
|
|
151
|
+
binary: true;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
/** `--name-status` argument needed */
|
|
155
|
+
export interface DiffResultNameStatusFile extends DiffResultTextFile {
|
|
156
|
+
status?: DiffNameStatus;
|
|
157
|
+
from?: string;
|
|
158
|
+
similarity: number;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export interface DiffResult {
|
|
162
|
+
/** The total number of files changed as reported in the summary line */
|
|
163
|
+
changed: number;
|
|
164
|
+
|
|
165
|
+
/** When present in the diff, lists the details of each file changed */
|
|
166
|
+
files: Array<DiffResultTextFile | DiffResultBinaryFile | DiffResultNameStatusFile>;
|
|
167
|
+
|
|
168
|
+
/** The number of files changed with insertions */
|
|
169
|
+
insertions: number;
|
|
170
|
+
|
|
171
|
+
/** The number of files changed with deletions */
|
|
172
|
+
deletions: number;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface FetchResult {
|
|
176
|
+
raw: string;
|
|
177
|
+
remote: string | null;
|
|
178
|
+
branches: {
|
|
179
|
+
name: string;
|
|
180
|
+
tracking: string;
|
|
181
|
+
}[];
|
|
182
|
+
tags: {
|
|
183
|
+
name: string;
|
|
184
|
+
tracking: string;
|
|
185
|
+
}[];
|
|
186
|
+
updated: {
|
|
187
|
+
name: string;
|
|
188
|
+
tracking: string;
|
|
189
|
+
to: string;
|
|
190
|
+
from: string;
|
|
191
|
+
}[];
|
|
192
|
+
deleted: {
|
|
193
|
+
tracking: string;
|
|
194
|
+
}[];
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** Represents the response to git.grep */
|
|
198
|
+
export interface GrepResult {
|
|
199
|
+
paths: Set<string>;
|
|
200
|
+
results: Record<
|
|
201
|
+
string,
|
|
202
|
+
Array<{
|
|
203
|
+
line: number;
|
|
204
|
+
path: string;
|
|
205
|
+
preview: string;
|
|
206
|
+
}>
|
|
207
|
+
>;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* The `InitResult` is returned when (re)initialising a git repo.
|
|
212
|
+
*/
|
|
213
|
+
export interface InitResult {
|
|
214
|
+
/**
|
|
215
|
+
* Boolean representing whether the `--bare` option was used
|
|
216
|
+
*/
|
|
217
|
+
readonly bare: boolean;
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* Boolean representing whether the repo already existed (re-initialised rather than initialised)
|
|
221
|
+
*/
|
|
222
|
+
readonly existing: boolean;
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* The path used when initialising
|
|
226
|
+
*/
|
|
227
|
+
readonly path: string;
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* The git configuration directory - for a bare repo this is the same as `path`, in non-bare repos
|
|
231
|
+
* this will usually be a sub-directory with the name `.git` (or value of the `$GIT_DIR` environment
|
|
232
|
+
* variable).
|
|
233
|
+
*/
|
|
234
|
+
readonly gitDir: string;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* A parsed response summary for calls to `git mv`
|
|
239
|
+
*/
|
|
240
|
+
export interface MoveResult {
|
|
241
|
+
/**
|
|
242
|
+
* Array of files moved
|
|
243
|
+
*/
|
|
244
|
+
moves: Array<{ from: string; to: string }>;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
export interface PullDetailFileChanges {
|
|
248
|
+
[fileName: string]: number;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
export interface PullDetailSummary {
|
|
252
|
+
changes: number;
|
|
253
|
+
insertions: number;
|
|
254
|
+
deletions: number;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface PullDetail {
|
|
258
|
+
/** Array of all files that are referenced in the pull */
|
|
259
|
+
files: string[];
|
|
260
|
+
|
|
261
|
+
/** Map of file names to the number of insertions in that file */
|
|
262
|
+
insertions: PullDetailFileChanges;
|
|
263
|
+
|
|
264
|
+
/** Map of file names to the number of deletions in that file */
|
|
265
|
+
deletions: PullDetailFileChanges;
|
|
266
|
+
|
|
267
|
+
summary: PullDetailSummary;
|
|
268
|
+
|
|
269
|
+
/** Array of file names that have been created */
|
|
270
|
+
created: string[];
|
|
271
|
+
|
|
272
|
+
/** Array of file names that have been deleted */
|
|
273
|
+
deleted: string[];
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
export interface PullResult extends PullDetail, RemoteMessageResult {}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* Wrapped with the `GitResponseError` as the exception thrown from a `git.pull` task
|
|
280
|
+
* to provide additional detail as to what failed.
|
|
281
|
+
*/
|
|
282
|
+
export interface PullFailedResult {
|
|
283
|
+
remote: string;
|
|
284
|
+
hash: {
|
|
285
|
+
local: string;
|
|
286
|
+
remote: string;
|
|
287
|
+
};
|
|
288
|
+
branch: {
|
|
289
|
+
local: string;
|
|
290
|
+
remote: string;
|
|
291
|
+
};
|
|
292
|
+
message: string;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* Represents file name changes in a StatusResult
|
|
297
|
+
*/
|
|
298
|
+
export interface StatusResultRenamed {
|
|
299
|
+
from: string;
|
|
300
|
+
to: string;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
export interface FileStatusResult {
|
|
304
|
+
/** Original location of the file, when the file has been moved */
|
|
305
|
+
from?: string;
|
|
306
|
+
|
|
307
|
+
/** Path of the file */
|
|
308
|
+
path: string;
|
|
309
|
+
|
|
310
|
+
/** First digit of the status code of the file, e.g. 'M' = modified.
|
|
311
|
+
Represents the status of the index if no merge conflicts, otherwise represents
|
|
312
|
+
status of one side of the merge. */
|
|
313
|
+
index: string;
|
|
314
|
+
|
|
315
|
+
/** Second digit of the status code of the file. Represents status of the working directory
|
|
316
|
+
if no merge conflicts, otherwise represents status of other side of a merge.
|
|
317
|
+
See https://git-scm.com/docs/git-status#_short_format for full documentation of possible
|
|
318
|
+
values and their meanings. */
|
|
319
|
+
working_dir: string;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* The StatusResult is returned for calls to `git.status()`, represents the state of the
|
|
324
|
+
* working directory.
|
|
325
|
+
*/
|
|
326
|
+
export interface StatusResult {
|
|
327
|
+
not_added: string[];
|
|
328
|
+
conflicted: string[];
|
|
329
|
+
created: string[];
|
|
330
|
+
deleted: string[];
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Ignored files are not listed by default, add `--ignored` to the task options in order to see
|
|
334
|
+
* this array of ignored files/paths.
|
|
335
|
+
*
|
|
336
|
+
* Note: ignored files will not be added to the `files` array, and will not be included in the
|
|
337
|
+
* `isClean()` calculation.
|
|
338
|
+
*/
|
|
339
|
+
ignored?: string[];
|
|
340
|
+
modified: string[];
|
|
341
|
+
renamed: StatusResultRenamed[];
|
|
342
|
+
staged: string[];
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* All files represented as an array of objects containing the `path` and status in `index` and
|
|
346
|
+
* in the `working_dir`.
|
|
347
|
+
*/
|
|
348
|
+
files: FileStatusResult[];
|
|
349
|
+
|
|
350
|
+
/**
|
|
351
|
+
* Number of commits ahead of the tracked branch
|
|
352
|
+
*/
|
|
353
|
+
ahead: number;
|
|
354
|
+
|
|
355
|
+
/**
|
|
356
|
+
*Number of commits behind the tracked branch
|
|
357
|
+
*/
|
|
358
|
+
behind: number;
|
|
359
|
+
|
|
360
|
+
/**
|
|
361
|
+
* Name of the current branch
|
|
362
|
+
*/
|
|
363
|
+
current: string | null;
|
|
364
|
+
|
|
365
|
+
/**
|
|
366
|
+
* Name of the branch being tracked
|
|
367
|
+
*/
|
|
368
|
+
tracking: string | null;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Detached status of the working copy, for more detail of what the working branch
|
|
372
|
+
* is detached from use `git.branch()`
|
|
373
|
+
*/
|
|
374
|
+
detached: boolean;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* Gets whether this represents a clean working branch.
|
|
378
|
+
*/
|
|
379
|
+
isClean(): boolean;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Response retrieved when using the `git.tags` method
|
|
384
|
+
*/
|
|
385
|
+
export interface TagResult {
|
|
386
|
+
/**
|
|
387
|
+
* All tag names
|
|
388
|
+
*/
|
|
389
|
+
all: string[];
|
|
390
|
+
|
|
391
|
+
/**
|
|
392
|
+
* The semver latest tag name or `undefined` when no tags are named in the response
|
|
393
|
+
*/
|
|
394
|
+
latest: string | undefined;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* The ListLogLine represents a single entry in the `git.log`, the properties on the object
|
|
399
|
+
* are mixed in depending on the names used in the format (see `DefaultLogFields`), but some
|
|
400
|
+
* properties are dependent on the command used.
|
|
401
|
+
*/
|
|
402
|
+
export interface ListLogLine {
|
|
403
|
+
/**
|
|
404
|
+
* When using a `--stat=4096` or `--shortstat` options in the `git.log` or `git.stashList`,
|
|
405
|
+
* each entry in the `ListLogSummary` will also have a `diff` property representing as much
|
|
406
|
+
* detail as was given in the response.
|
|
407
|
+
*/
|
|
408
|
+
diff?: DiffResult;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
export interface LogResult<T = DefaultLogFields> {
|
|
412
|
+
all: ReadonlyArray<T & ListLogLine>;
|
|
413
|
+
total: number;
|
|
414
|
+
latest: (T & ListLogLine) | null;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Where the file was deleted, if there is a modify/delete conflict
|
|
419
|
+
*/
|
|
420
|
+
export interface MergeConflictDeletion {
|
|
421
|
+
deleteRef: string;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/**
|
|
425
|
+
* Represents a single file with conflicts in the MergeSummary
|
|
426
|
+
*/
|
|
427
|
+
export interface MergeConflict {
|
|
428
|
+
/**
|
|
429
|
+
* Type of conflict
|
|
430
|
+
*/
|
|
431
|
+
reason: string;
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* Path to file
|
|
435
|
+
*/
|
|
436
|
+
file: string | null;
|
|
437
|
+
|
|
438
|
+
/**
|
|
439
|
+
* Additional detail for the specific type of conflict
|
|
440
|
+
*/
|
|
441
|
+
meta?: MergeConflictDeletion;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export type MergeResultStatus = 'success' | string;
|
|
445
|
+
|
|
446
|
+
export interface MergeDetail {
|
|
447
|
+
conflicts: MergeConflict[];
|
|
448
|
+
merges: string[];
|
|
449
|
+
result: MergeResultStatus;
|
|
450
|
+
readonly failed: boolean;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export type MergeResult = PullResult & MergeDetail;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
*
|
|
457
|
+
*/
|
|
458
|
+
export interface PushResultPushedItem {
|
|
459
|
+
local: string;
|
|
460
|
+
remote: string;
|
|
461
|
+
|
|
462
|
+
readonly deleted: boolean;
|
|
463
|
+
readonly tag: boolean;
|
|
464
|
+
readonly branch: boolean;
|
|
465
|
+
readonly new: boolean;
|
|
466
|
+
readonly alreadyUpdated: boolean;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
export interface RemoteMessagesObjectEnumeration {
|
|
470
|
+
enumerating: number;
|
|
471
|
+
counting: number;
|
|
472
|
+
compressing: number;
|
|
473
|
+
total: {
|
|
474
|
+
count: number;
|
|
475
|
+
delta: number;
|
|
476
|
+
};
|
|
477
|
+
reused: {
|
|
478
|
+
count: number;
|
|
479
|
+
delta: number;
|
|
480
|
+
};
|
|
481
|
+
packReused: number;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export interface RemoteMessages {
|
|
485
|
+
all: string[];
|
|
486
|
+
objects?: RemoteMessagesObjectEnumeration;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
export interface PushResultRemoteMessages extends RemoteMessages {
|
|
490
|
+
pullRequestUrl?: string;
|
|
491
|
+
vulnerabilities?: {
|
|
492
|
+
count: number;
|
|
493
|
+
summary: string;
|
|
494
|
+
url: string;
|
|
495
|
+
};
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
export interface RemoteMessageResult<T extends RemoteMessages = RemoteMessages> {
|
|
499
|
+
remoteMessages: T;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
export interface PushResultBranchUpdate {
|
|
503
|
+
head: {
|
|
504
|
+
local: string;
|
|
505
|
+
remote: string;
|
|
506
|
+
};
|
|
507
|
+
hash: {
|
|
508
|
+
from: string;
|
|
509
|
+
to: string;
|
|
510
|
+
};
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export interface PushDetail {
|
|
514
|
+
repo?: string;
|
|
515
|
+
ref?: {
|
|
516
|
+
local: string;
|
|
517
|
+
};
|
|
518
|
+
pushed: PushResultPushedItem[];
|
|
519
|
+
branch?: {
|
|
520
|
+
local: string;
|
|
521
|
+
remote: string;
|
|
522
|
+
remoteName: string;
|
|
523
|
+
};
|
|
524
|
+
update?: PushResultBranchUpdate;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
export interface PushResult extends PushDetail, RemoteMessageResult<PushResultRemoteMessages> {}
|
|
528
|
+
|
|
529
|
+
/**
|
|
530
|
+
* @deprecated
|
|
531
|
+
* For consistent naming, please use `CommitResult` instead of `CommitSummary`
|
|
532
|
+
*/
|
|
533
|
+
export type CommitSummary = CommitResult;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* @deprecated
|
|
537
|
+
* For consistent naming, please use `MergeResult` instead of `MergeSummary`
|
|
538
|
+
*/
|
|
539
|
+
export type MergeSummary = MergeResult;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* @deprecated to aid consistent naming, please use `BranchSingleDeleteResult` instead of `BranchDeletionSummary`.
|
|
543
|
+
*/
|
|
544
|
+
export type BranchDeletionSummary = BranchSingleDeleteResult;
|
|
545
|
+
|
|
546
|
+
/**
|
|
547
|
+
* @deprecated to aid consistent naming, please use `BranchMultiDeleteResult` instead of `BranchDeletionBatchSummary`.
|
|
548
|
+
*/
|
|
549
|
+
export type BranchDeletionBatchSummary = BranchMultiDeleteResult;
|
|
550
|
+
|
|
551
|
+
export type MoveSummary = MoveResult;
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* @deprecated to aid consistent naming, please use `LogResult` instead of `ListLogSummary`.
|
|
555
|
+
*/
|
|
556
|
+
export type ListLogSummary<T = DefaultLogFields> = LogResult<T>;
|