@statewalker/vcs-commands 0.1.1
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/LICENSE +21 -0
- package/README.md +591 -0
- package/dist/commands/add-command.d.ts +170 -0
- package/dist/commands/add-command.d.ts.map +1 -0
- package/dist/commands/blame-command.d.ts +267 -0
- package/dist/commands/blame-command.d.ts.map +1 -0
- package/dist/commands/branch-command.d.ts +211 -0
- package/dist/commands/branch-command.d.ts.map +1 -0
- package/dist/commands/checkout-command.d.ts +261 -0
- package/dist/commands/checkout-command.d.ts.map +1 -0
- package/dist/commands/cherry-pick-command.d.ts +128 -0
- package/dist/commands/cherry-pick-command.d.ts.map +1 -0
- package/dist/commands/clean-command.d.ts +91 -0
- package/dist/commands/clean-command.d.ts.map +1 -0
- package/dist/commands/clone-command.d.ts +233 -0
- package/dist/commands/clone-command.d.ts.map +1 -0
- package/dist/commands/commit-command.d.ts +199 -0
- package/dist/commands/commit-command.d.ts.map +1 -0
- package/dist/commands/describe-command.d.ts +175 -0
- package/dist/commands/describe-command.d.ts.map +1 -0
- package/dist/commands/diff-command.d.ts +96 -0
- package/dist/commands/diff-command.d.ts.map +1 -0
- package/dist/commands/fetch-command.d.ts +266 -0
- package/dist/commands/fetch-command.d.ts.map +1 -0
- package/dist/commands/gc-command.d.ts +83 -0
- package/dist/commands/gc-command.d.ts.map +1 -0
- package/dist/commands/index.d.ts +32 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +2 -0
- package/dist/commands/init-command.d.ts +175 -0
- package/dist/commands/init-command.d.ts.map +1 -0
- package/dist/commands/log-command.d.ts +246 -0
- package/dist/commands/log-command.d.ts.map +1 -0
- package/dist/commands/ls-remote-command.d.ts +122 -0
- package/dist/commands/ls-remote-command.d.ts.map +1 -0
- package/dist/commands/merge-command.d.ts +169 -0
- package/dist/commands/merge-command.d.ts.map +1 -0
- package/dist/commands/pack-refs-command.d.ts +57 -0
- package/dist/commands/pack-refs-command.d.ts.map +1 -0
- package/dist/commands/pull-command.d.ts +111 -0
- package/dist/commands/pull-command.d.ts.map +1 -0
- package/dist/commands/push-command.d.ts +220 -0
- package/dist/commands/push-command.d.ts.map +1 -0
- package/dist/commands/rebase-command.d.ts +186 -0
- package/dist/commands/rebase-command.d.ts.map +1 -0
- package/dist/commands/reflog-command.d.ts +45 -0
- package/dist/commands/reflog-command.d.ts.map +1 -0
- package/dist/commands/remote-command.d.ts +205 -0
- package/dist/commands/remote-command.d.ts.map +1 -0
- package/dist/commands/reset-command.d.ts +114 -0
- package/dist/commands/reset-command.d.ts.map +1 -0
- package/dist/commands/revert-command.d.ts +129 -0
- package/dist/commands/revert-command.d.ts.map +1 -0
- package/dist/commands/rm-command.d.ts +72 -0
- package/dist/commands/rm-command.d.ts.map +1 -0
- package/dist/commands/stash-apply-command.d.ts +132 -0
- package/dist/commands/stash-apply-command.d.ts.map +1 -0
- package/dist/commands/stash-create-command.d.ts +137 -0
- package/dist/commands/stash-create-command.d.ts.map +1 -0
- package/dist/commands/stash-drop-command.d.ts +63 -0
- package/dist/commands/stash-drop-command.d.ts.map +1 -0
- package/dist/commands/stash-list-command.d.ts +42 -0
- package/dist/commands/stash-list-command.d.ts.map +1 -0
- package/dist/commands/status-command.d.ts +55 -0
- package/dist/commands/status-command.d.ts.map +1 -0
- package/dist/commands/tag-command.d.ts +155 -0
- package/dist/commands/tag-command.d.ts.map +1 -0
- package/dist/commands/tree-restore.d.ts +51 -0
- package/dist/commands/tree-restore.d.ts.map +1 -0
- package/dist/commands-COO4tJhv.js +10274 -0
- package/dist/core-commands/add.command.d.ts +71 -0
- package/dist/core-commands/add.command.d.ts.map +1 -0
- package/dist/core-commands/add.command.impl.d.ts +53 -0
- package/dist/core-commands/add.command.impl.d.ts.map +1 -0
- package/dist/core-commands/checkout.command.d.ts +103 -0
- package/dist/core-commands/checkout.command.d.ts.map +1 -0
- package/dist/core-commands/checkout.command.impl.d.ts +114 -0
- package/dist/core-commands/checkout.command.impl.d.ts.map +1 -0
- package/dist/core-commands/index.d.ts +6 -0
- package/dist/core-commands/index.d.ts.map +1 -0
- package/dist/errors/add-errors.d.ts +16 -0
- package/dist/errors/add-errors.d.ts.map +1 -0
- package/dist/errors/checkout-errors.d.ts +24 -0
- package/dist/errors/checkout-errors.d.ts.map +1 -0
- package/dist/errors/command-errors.d.ts +38 -0
- package/dist/errors/command-errors.d.ts.map +1 -0
- package/dist/errors/commit-errors.d.ts +27 -0
- package/dist/errors/commit-errors.d.ts.map +1 -0
- package/dist/errors/git-api-error.d.ts +9 -0
- package/dist/errors/git-api-error.d.ts.map +1 -0
- package/dist/errors/index.d.ts +13 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +509 -0
- package/dist/errors/merge-errors.d.ts +63 -0
- package/dist/errors/merge-errors.d.ts.map +1 -0
- package/dist/errors/rebase-errors.d.ts +21 -0
- package/dist/errors/rebase-errors.d.ts.map +1 -0
- package/dist/errors/ref-errors.d.ts +63 -0
- package/dist/errors/ref-errors.d.ts.map +1 -0
- package/dist/errors/remote-errors.d.ts +16 -0
- package/dist/errors/remote-errors.d.ts.map +1 -0
- package/dist/errors/stash-errors.d.ts +24 -0
- package/dist/errors/stash-errors.d.ts.map +1 -0
- package/dist/errors/tag-errors.d.ts +11 -0
- package/dist/errors/tag-errors.d.ts.map +1 -0
- package/dist/errors/transport-errors.d.ts +42 -0
- package/dist/errors/transport-errors.d.ts.map +1 -0
- package/dist/git-command.d.ts +139 -0
- package/dist/git-command.d.ts.map +1 -0
- package/dist/git.d.ts +637 -0
- package/dist/git.d.ts.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/pack-import/index.d.ts +8 -0
- package/dist/pack-import/index.d.ts.map +1 -0
- package/dist/pack-import/pack-import.d.ts +11 -0
- package/dist/pack-import/pack-import.d.ts.map +1 -0
- package/dist/remote-config/index.d.ts +7 -0
- package/dist/remote-config/index.d.ts.map +1 -0
- package/dist/remote-config/remote-config-store.d.ts +93 -0
- package/dist/remote-config/remote-config-store.d.ts.map +1 -0
- package/dist/rename/index.d.ts +5 -0
- package/dist/rename/index.d.ts.map +1 -0
- package/dist/rename/similarity-index.d.ts +64 -0
- package/dist/rename/similarity-index.d.ts.map +1 -0
- package/dist/results/cherry-pick-result.d.ts +33 -0
- package/dist/results/cherry-pick-result.d.ts.map +1 -0
- package/dist/results/clone-result.d.ts +24 -0
- package/dist/results/clone-result.d.ts.map +1 -0
- package/dist/results/diff-entry.d.ts +77 -0
- package/dist/results/diff-entry.d.ts.map +1 -0
- package/dist/results/diff-formatter.d.ts +149 -0
- package/dist/results/diff-formatter.d.ts.map +1 -0
- package/dist/results/fetch-result.d.ts +78 -0
- package/dist/results/fetch-result.d.ts.map +1 -0
- package/dist/results/index.d.ts +14 -0
- package/dist/results/index.d.ts.map +1 -0
- package/dist/results/index.js +247 -0
- package/dist/results/init-result.d.ts +23 -0
- package/dist/results/init-result.d.ts.map +1 -0
- package/dist/results/merge-result.d.ts +117 -0
- package/dist/results/merge-result.d.ts.map +1 -0
- package/dist/results/pull-result.d.ts +24 -0
- package/dist/results/pull-result.d.ts.map +1 -0
- package/dist/results/push-result.d.ts +71 -0
- package/dist/results/push-result.d.ts.map +1 -0
- package/dist/results/rebase-result.d.ts +108 -0
- package/dist/results/rebase-result.d.ts.map +1 -0
- package/dist/results/revert-result.d.ts +33 -0
- package/dist/results/revert-result.d.ts.map +1 -0
- package/dist/results/stash-result.d.ts +48 -0
- package/dist/results/stash-result.d.ts.map +1 -0
- package/dist/results/status-result.d.ts +48 -0
- package/dist/results/status-result.d.ts.map +1 -0
- package/dist/status-result-BwAyxq6R.js +409 -0
- package/dist/transport-command.d.ts +83 -0
- package/dist/transport-command.d.ts.map +1 -0
- package/dist/tree-merge/index.d.ts +8 -0
- package/dist/tree-merge/index.d.ts.map +1 -0
- package/dist/tree-merge/tree-merge.d.ts +41 -0
- package/dist/tree-merge/tree-merge.d.ts.map +1 -0
- package/dist/types.d.ts +64 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { GitApiError } from "./git-api-error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Thrown when a stash index is invalid.
|
|
4
|
+
*/
|
|
5
|
+
export declare class InvalidStashIndexError extends GitApiError {
|
|
6
|
+
readonly index: number;
|
|
7
|
+
constructor(index: number, message?: string);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Thrown when a stash reference cannot be found.
|
|
11
|
+
*/
|
|
12
|
+
export declare class StashNotFoundError extends GitApiError {
|
|
13
|
+
readonly stashRef: string;
|
|
14
|
+
constructor(stashRef: string, message?: string);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Thrown when applying a stash fails due to conflicts or other issues.
|
|
18
|
+
*/
|
|
19
|
+
export declare class StashApplyFailedError extends GitApiError {
|
|
20
|
+
readonly stashRef: string;
|
|
21
|
+
readonly conflicts?: string[];
|
|
22
|
+
constructor(stashRef: string, conflicts?: string[], message?: string);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=stash-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stash-errors.d.ts","sourceRoot":"","sources":["../../src/errors/stash-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,WAAW;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAEvB,YAAY,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI1C;CACF;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B,YAAY,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI7C;CACF;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,WAAW;IACpD,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAE9B,YAAY,QAAQ,EAAE,MAAM,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,MAAM,EAKnE;CACF"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GitApiError } from "./git-api-error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Thrown when a tag name is invalid.
|
|
4
|
+
*
|
|
5
|
+
* Based on JGit's InvalidTagNameException.
|
|
6
|
+
*/
|
|
7
|
+
export declare class InvalidTagNameError extends GitApiError {
|
|
8
|
+
readonly tagName: string;
|
|
9
|
+
constructor(tagName: string, message?: string);
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=tag-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tag-errors.d.ts","sourceRoot":"","sources":["../../src/errors/tag-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,WAAW;IAClD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IAEzB,YAAY,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI5C;CACF"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { GitApiError } from "./git-api-error.js";
|
|
2
|
+
/**
|
|
3
|
+
* Error thrown when a remote cannot be resolved.
|
|
4
|
+
*
|
|
5
|
+
* Based on JGit's InvalidRemoteException.
|
|
6
|
+
*/
|
|
7
|
+
export declare class InvalidRemoteError extends GitApiError {
|
|
8
|
+
readonly remote: string;
|
|
9
|
+
constructor(remote: string, message?: string);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Error thrown when a transport operation fails.
|
|
13
|
+
*
|
|
14
|
+
* Based on JGit's TransportException.
|
|
15
|
+
*/
|
|
16
|
+
export declare class TransportError extends GitApiError {
|
|
17
|
+
readonly uri?: string;
|
|
18
|
+
constructor(message: string, uri?: string);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Error thrown when authentication fails.
|
|
22
|
+
*/
|
|
23
|
+
export declare class AuthenticationError extends TransportError {
|
|
24
|
+
constructor(uri: string, message?: string);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Error thrown when a push is rejected.
|
|
28
|
+
*
|
|
29
|
+
* Based on JGit's RejectedCommandException.
|
|
30
|
+
*/
|
|
31
|
+
export declare class PushRejectedException extends TransportError {
|
|
32
|
+
readonly refName: string;
|
|
33
|
+
readonly reason: string;
|
|
34
|
+
constructor(refName: string, reason: string, uri?: string);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Error thrown when push is not allowed (non-fast-forward without force).
|
|
38
|
+
*/
|
|
39
|
+
export declare class NonFastForwardError extends PushRejectedException {
|
|
40
|
+
constructor(refName: string, uri?: string);
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=transport-errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport-errors.d.ts","sourceRoot":"","sources":["../../src/errors/transport-errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEjD;;;;GAIG;AACH,qBAAa,kBAAmB,SAAQ,WAAW;IACjD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAI3C;CACF;AAED;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,WAAW;IAC7C,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAEtB,YAAY,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAIxC;CACF;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc;IACrD,YAAY,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAGxC;CACF;AAED;;;;GAIG;AACH,qBAAa,qBAAsB,SAAQ,cAAc;IACvD,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,YAAY,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAKxD;CACF;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,qBAAqB;IAC5D,YAAY,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,EAGxC;CACF"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { Blobs, Commit, Commits, ObjectId, Ref, Refs, SymbolicRef, Tag, Tags, Tree, TreeEntry, Trees } from "@statewalker/vcs-core";
|
|
2
|
+
import type { Staging, WorkingCopy, Worktree } from "@statewalker/vcs-working-tree";
|
|
3
|
+
/**
|
|
4
|
+
* Extended Trees interface with legacy method names for command compatibility.
|
|
5
|
+
*/
|
|
6
|
+
export interface CommandTrees extends Trees {
|
|
7
|
+
/** Load tree entries - alias for load() */
|
|
8
|
+
loadTree(id: ObjectId): AsyncIterable<TreeEntry>;
|
|
9
|
+
/** Store tree - alias for store() */
|
|
10
|
+
storeTree(entries: Tree): Promise<ObjectId>;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Extended Refs interface with legacy method names for command compatibility.
|
|
14
|
+
*/
|
|
15
|
+
export interface CommandRefs extends Refs {
|
|
16
|
+
/** Delete a reference - alias for remove() */
|
|
17
|
+
delete(name: string): Promise<boolean>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Extended Tags interface with legacy method names for command compatibility.
|
|
21
|
+
*/
|
|
22
|
+
export interface CommandTags extends Tags {
|
|
23
|
+
/** Store tag - alias for store() */
|
|
24
|
+
storeTag(tag: Tag): Promise<ObjectId>;
|
|
25
|
+
/** Load tag - alias for load() */
|
|
26
|
+
loadTag(id: ObjectId): Promise<Tag | undefined>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Extended Commits interface with legacy method names for command compatibility.
|
|
30
|
+
*/
|
|
31
|
+
export interface CommandCommits extends Commits {
|
|
32
|
+
/** Load commit - alias for legacy loadCommit() */
|
|
33
|
+
load(id: ObjectId): Promise<Commit | undefined>;
|
|
34
|
+
/** Store commit - alias for legacy storeCommit() */
|
|
35
|
+
store(commit: Commit): Promise<ObjectId>;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Abstract base class for all Git commands.
|
|
39
|
+
*
|
|
40
|
+
* Implements the Command pattern with single-use semantics.
|
|
41
|
+
* Each command instance can only be called once.
|
|
42
|
+
*
|
|
43
|
+
* Commands are constructed with a WorkingCopy that provides access to all repository components.
|
|
44
|
+
*
|
|
45
|
+
* Based on JGit's GitCommand<T> class.
|
|
46
|
+
*
|
|
47
|
+
* @typeParam T - The return type of the command's call() method
|
|
48
|
+
*/
|
|
49
|
+
export declare abstract class GitCommand<T> {
|
|
50
|
+
protected readonly _workingCopy: WorkingCopy;
|
|
51
|
+
private callable;
|
|
52
|
+
constructor(workingCopy: WorkingCopy);
|
|
53
|
+
/**
|
|
54
|
+
* Access blob storage.
|
|
55
|
+
*/
|
|
56
|
+
protected get blobs(): Blobs;
|
|
57
|
+
/**
|
|
58
|
+
* Access tree storage.
|
|
59
|
+
*/
|
|
60
|
+
protected get trees(): CommandTrees;
|
|
61
|
+
/**
|
|
62
|
+
* Access commit storage.
|
|
63
|
+
*/
|
|
64
|
+
protected get commits(): CommandCommits;
|
|
65
|
+
/**
|
|
66
|
+
* Access tag storage.
|
|
67
|
+
* Named tagsStore to avoid conflict with command properties.
|
|
68
|
+
*/
|
|
69
|
+
protected get tagsStore(): CommandTags | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Access refs storage.
|
|
72
|
+
* Named refsStore to avoid conflict with command properties.
|
|
73
|
+
*/
|
|
74
|
+
protected get refsStore(): CommandRefs;
|
|
75
|
+
/**
|
|
76
|
+
* Access staging area.
|
|
77
|
+
* Supports both new architecture (checkout.staging) and legacy/init (staging directly).
|
|
78
|
+
*/
|
|
79
|
+
protected get staging(): Staging;
|
|
80
|
+
/**
|
|
81
|
+
* Access worktree interface.
|
|
82
|
+
*/
|
|
83
|
+
protected get worktreeAccess(): Worktree | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Get the WorkingCopy.
|
|
86
|
+
*/
|
|
87
|
+
protected get workingCopy(): WorkingCopy;
|
|
88
|
+
/**
|
|
89
|
+
* Execute the command.
|
|
90
|
+
* Can only be called once per instance.
|
|
91
|
+
*/
|
|
92
|
+
abstract call(): Promise<T>;
|
|
93
|
+
/**
|
|
94
|
+
* Verify the command hasn't been called yet.
|
|
95
|
+
* @throws Error if command was already executed
|
|
96
|
+
*/
|
|
97
|
+
protected checkCallable(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Mark command as no longer callable.
|
|
100
|
+
*/
|
|
101
|
+
protected setCallable(value: boolean): void;
|
|
102
|
+
/**
|
|
103
|
+
* Resolve HEAD to its target commit.
|
|
104
|
+
*
|
|
105
|
+
* @returns ObjectId of the commit HEAD points to
|
|
106
|
+
* @throws NoHeadError if HEAD doesn't exist or cannot be resolved
|
|
107
|
+
*/
|
|
108
|
+
protected resolveHead(): Promise<ObjectId>;
|
|
109
|
+
/**
|
|
110
|
+
* Get the current branch name (if HEAD is not detached).
|
|
111
|
+
*
|
|
112
|
+
* @returns Branch name (e.g., "refs/heads/main") or undefined if detached
|
|
113
|
+
*/
|
|
114
|
+
protected getCurrentBranch(): Promise<string | undefined>;
|
|
115
|
+
/**
|
|
116
|
+
* Resolve a ref name to its ObjectId.
|
|
117
|
+
*
|
|
118
|
+
* @param refName Ref name, commit ID, or commit-ish
|
|
119
|
+
* @returns ObjectId of the resolved ref
|
|
120
|
+
* @throws RefNotFoundError if ref cannot be resolved
|
|
121
|
+
*/
|
|
122
|
+
protected resolveRef(refName: string): Promise<ObjectId>;
|
|
123
|
+
/**
|
|
124
|
+
* Resolve a relative ref like HEAD~1 or HEAD^2.
|
|
125
|
+
*/
|
|
126
|
+
private resolveRelativeRef;
|
|
127
|
+
/**
|
|
128
|
+
* Peel an object ID to a commit (follows tag objects).
|
|
129
|
+
*/
|
|
130
|
+
private peelToCommit;
|
|
131
|
+
/**
|
|
132
|
+
* Get a ref by name.
|
|
133
|
+
*
|
|
134
|
+
* @param refName Full ref name
|
|
135
|
+
* @returns Ref object or undefined
|
|
136
|
+
*/
|
|
137
|
+
protected getRef(refName: string): Promise<Ref | SymbolicRef | undefined>;
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=git-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git-command.d.ts","sourceRoot":"","sources":["../src/git-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,KAAK,EACL,MAAM,EACN,OAAO,EACP,QAAQ,EACR,GAAG,EACH,IAAI,EACJ,WAAW,EACX,GAAG,EACH,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,KAAK,EACN,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAKpF;;GAEG;AACH,MAAM,WAAW,YAAa,SAAQ,KAAK;IACzC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,EAAE,QAAQ,GAAG,aAAa,CAAC,SAAS,CAAC,CAAC;IACjD,qCAAqC;IACrC,SAAS,CAAC,OAAO,EAAE,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,IAAI;IACvC,8CAA8C;IAC9C,MAAM,CAAC,IAAI,EAAE,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