@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
package/dist/git.d.ts
ADDED
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
import type { History } from "@statewalker/vcs-core";
|
|
2
|
+
import type { Checkout, WorkingCopy, Worktree } from "@statewalker/vcs-working-tree";
|
|
3
|
+
import { AddCommand, BlameCommand, CheckoutCommand, CherryPickCommand, CleanCommand, CloneCommand, CommitCommand, CreateBranchCommand, DeleteBranchCommand, DeleteTagCommand, DescribeCommand, DiffCommand, FetchCommand, GarbageCollectCommand, InitCommand, ListBranchCommand, ListTagCommand, LogCommand, LsRemoteCommand, MergeCommand, PackRefsCommand, PullCommand, PushCommand, RebaseCommand, ReflogCommand, RemoteAddCommand, RemoteListCommand, RemoteRemoveCommand, RemoteSetUrlCommand, RenameBranchCommand, ResetCommand, RevertCommand, RmCommand, StashApplyCommand, StashCreateCommand, StashDropCommand, StashListCommand, StatusCommand, TagCommand } from "./commands/index.js";
|
|
4
|
+
/**
|
|
5
|
+
* Main entry point for high-level Git operations.
|
|
6
|
+
*
|
|
7
|
+
* The Git class is a facade that wraps a WorkingCopy and provides
|
|
8
|
+
* factory methods for all Git commands.
|
|
9
|
+
*
|
|
10
|
+
* Based on JGit's Git class.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```typescript
|
|
14
|
+
* // Create a WorkingCopy
|
|
15
|
+
* const workingCopy = await createWorkingCopy({ files, workDir: "/repo" });
|
|
16
|
+
*
|
|
17
|
+
* // Create Git facade
|
|
18
|
+
* const git = Git.fromWorkingCopy(workingCopy);
|
|
19
|
+
*
|
|
20
|
+
* // Use commands
|
|
21
|
+
* await git.commit().setMessage("Initial commit").call();
|
|
22
|
+
* const branches = await git.branchList().call();
|
|
23
|
+
*
|
|
24
|
+
* // Access components for advanced usage
|
|
25
|
+
* const history = git.history;
|
|
26
|
+
* const checkout = git.checkout;
|
|
27
|
+
*
|
|
28
|
+
* // Clean up
|
|
29
|
+
* git.close();
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare class Git implements Disposable {
|
|
33
|
+
private readonly _workingCopy;
|
|
34
|
+
private closed;
|
|
35
|
+
private constructor();
|
|
36
|
+
/**
|
|
37
|
+
* Create a Git facade from a WorkingCopy.
|
|
38
|
+
*
|
|
39
|
+
* This is the recommended way to create a Git instance. The WorkingCopy
|
|
40
|
+
* provides access to all components: History, Checkout, and Worktree.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```typescript
|
|
44
|
+
* const workingCopy = await createWorkingCopy({ files, workDir: "/repo" });
|
|
45
|
+
* const git = Git.fromWorkingCopy(workingCopy);
|
|
46
|
+
*
|
|
47
|
+
* // Use commands
|
|
48
|
+
* await git.add().addFilepattern(".").call();
|
|
49
|
+
* await git.commit().setMessage("Initial commit").call();
|
|
50
|
+
*
|
|
51
|
+
* // Access components
|
|
52
|
+
* const history = git.history;
|
|
53
|
+
* const checkout = git.checkout;
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @param workingCopy The WorkingCopy to wrap
|
|
57
|
+
* @returns A Git instance wrapping the working copy
|
|
58
|
+
*/
|
|
59
|
+
static fromWorkingCopy(workingCopy: WorkingCopy): Git;
|
|
60
|
+
/**
|
|
61
|
+
* Create an InitCommand for initializing a new Git repository.
|
|
62
|
+
*
|
|
63
|
+
* This static factory method provides convenient access to repository
|
|
64
|
+
* initialization without needing to import InitCommand directly.
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```typescript
|
|
68
|
+
* // Initialize in-memory repository
|
|
69
|
+
* const result = await Git.init().call();
|
|
70
|
+
* const git = result.git;
|
|
71
|
+
*
|
|
72
|
+
* // Initialize file-based repository with worktree support
|
|
73
|
+
* const result = await Git.init()
|
|
74
|
+
* .setFilesApi(files)
|
|
75
|
+
* .setWorktree(true)
|
|
76
|
+
* .call();
|
|
77
|
+
*
|
|
78
|
+
* // Now git.add() works
|
|
79
|
+
* await result.git.add().addFilepattern(".").call();
|
|
80
|
+
*
|
|
81
|
+
* // Initialize with custom staging for native git compatibility
|
|
82
|
+
* import { FileStagingStore } from "@statewalker/vcs-store-files";
|
|
83
|
+
* const staging = new FileStagingStore(files, ".git/index");
|
|
84
|
+
*
|
|
85
|
+
* const result = await Git.init()
|
|
86
|
+
* .setFilesApi(files)
|
|
87
|
+
* .setStagingStore(staging)
|
|
88
|
+
* .setWorktree(true)
|
|
89
|
+
* .call();
|
|
90
|
+
* ```
|
|
91
|
+
*
|
|
92
|
+
* @returns A new InitCommand instance
|
|
93
|
+
*/
|
|
94
|
+
static init(): InitCommand;
|
|
95
|
+
/**
|
|
96
|
+
* Create an AddCommand for staging files from working tree.
|
|
97
|
+
*
|
|
98
|
+
* Requires a WorkingCopy with worktree interface.
|
|
99
|
+
*
|
|
100
|
+
* @example
|
|
101
|
+
* ```typescript
|
|
102
|
+
* // Add specific files
|
|
103
|
+
* await git.add()
|
|
104
|
+
* .addFilepattern("src/")
|
|
105
|
+
* .addFilepattern("lib/")
|
|
106
|
+
* .call();
|
|
107
|
+
*
|
|
108
|
+
* // Update only tracked files (git add -u)
|
|
109
|
+
* await git.add()
|
|
110
|
+
* .addFilepattern(".")
|
|
111
|
+
* .setUpdate(true)
|
|
112
|
+
* .call();
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
add(): AddCommand;
|
|
116
|
+
/**
|
|
117
|
+
* Create a BlameCommand for annotating file lines with authorship.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```typescript
|
|
121
|
+
* const result = await git.blame()
|
|
122
|
+
* .setFilePath("src/main.ts")
|
|
123
|
+
* .call();
|
|
124
|
+
*
|
|
125
|
+
* for (const entry of result.entries) {
|
|
126
|
+
* console.log(`${entry.commit.author.name}: lines ${entry.resultStart}-${entry.resultStart + entry.lineCount - 1}`);
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
blame(): BlameCommand;
|
|
131
|
+
/**
|
|
132
|
+
* Create a CheckoutCommand for switching branches or restoring files.
|
|
133
|
+
*
|
|
134
|
+
* @example
|
|
135
|
+
* ```typescript
|
|
136
|
+
* // Checkout existing branch
|
|
137
|
+
* await git.checkout().setName("feature").call();
|
|
138
|
+
*
|
|
139
|
+
* // Create and checkout new branch
|
|
140
|
+
* await git.checkout()
|
|
141
|
+
* .setCreateBranch(true)
|
|
142
|
+
* .setName("newbranch")
|
|
143
|
+
* .call();
|
|
144
|
+
*
|
|
145
|
+
* // Checkout paths from commit
|
|
146
|
+
* await git.checkout()
|
|
147
|
+
* .setStartPoint("HEAD~1")
|
|
148
|
+
* .addPath("file.txt")
|
|
149
|
+
* .call();
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
checkout(): CheckoutCommand;
|
|
153
|
+
/**
|
|
154
|
+
* Create a CommitCommand for creating commits.
|
|
155
|
+
*
|
|
156
|
+
* @example
|
|
157
|
+
* ```typescript
|
|
158
|
+
* await git.commit()
|
|
159
|
+
* .setMessage("Add feature")
|
|
160
|
+
* .setAuthor("John", "john@example.com")
|
|
161
|
+
* .call();
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
commit(): CommitCommand;
|
|
165
|
+
/**
|
|
166
|
+
* Create a LogCommand for viewing commit history.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```typescript
|
|
170
|
+
* for await (const commit of await git.log().call()) {
|
|
171
|
+
* console.log(commit.message);
|
|
172
|
+
* }
|
|
173
|
+
* ```
|
|
174
|
+
*/
|
|
175
|
+
log(): LogCommand;
|
|
176
|
+
/**
|
|
177
|
+
* Create a ReflogCommand for viewing reflog entries.
|
|
178
|
+
*
|
|
179
|
+
* @example
|
|
180
|
+
* ```typescript
|
|
181
|
+
* // Get HEAD reflog
|
|
182
|
+
* const entries = await git.reflog().call();
|
|
183
|
+
*
|
|
184
|
+
* // Get reflog for specific branch
|
|
185
|
+
* const branchEntries = await git.reflog()
|
|
186
|
+
* .setRef("refs/heads/main")
|
|
187
|
+
* .call();
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
reflog(): ReflogCommand;
|
|
191
|
+
/**
|
|
192
|
+
* Create a CreateBranchCommand for creating branches.
|
|
193
|
+
*
|
|
194
|
+
* @example
|
|
195
|
+
* ```typescript
|
|
196
|
+
* await git.branchCreate().setName("feature").call();
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
branchCreate(): CreateBranchCommand;
|
|
200
|
+
/**
|
|
201
|
+
* Create a DeleteBranchCommand for deleting branches.
|
|
202
|
+
*
|
|
203
|
+
* @example
|
|
204
|
+
* ```typescript
|
|
205
|
+
* await git.branchDelete().setBranchNames("feature").call();
|
|
206
|
+
* ```
|
|
207
|
+
*/
|
|
208
|
+
branchDelete(): DeleteBranchCommand;
|
|
209
|
+
/**
|
|
210
|
+
* Create a ListBranchCommand for listing branches.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* ```typescript
|
|
214
|
+
* const branches = await git.branchList().call();
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
branchList(): ListBranchCommand;
|
|
218
|
+
/**
|
|
219
|
+
* Create a RenameBranchCommand for renaming branches.
|
|
220
|
+
*
|
|
221
|
+
* @example
|
|
222
|
+
* ```typescript
|
|
223
|
+
* await git.branchRename()
|
|
224
|
+
* .setOldName("old")
|
|
225
|
+
* .setNewName("new")
|
|
226
|
+
* .call();
|
|
227
|
+
* ```
|
|
228
|
+
*/
|
|
229
|
+
branchRename(): RenameBranchCommand;
|
|
230
|
+
/**
|
|
231
|
+
* Create a TagCommand for creating tags.
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* ```typescript
|
|
235
|
+
* await git.tag().setName("v1.0.0").call();
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
tag(): TagCommand;
|
|
239
|
+
/**
|
|
240
|
+
* Create a DeleteTagCommand for deleting tags.
|
|
241
|
+
*
|
|
242
|
+
* @example
|
|
243
|
+
* ```typescript
|
|
244
|
+
* await git.tagDelete().setTags("v1.0.0").call();
|
|
245
|
+
* ```
|
|
246
|
+
*/
|
|
247
|
+
tagDelete(): DeleteTagCommand;
|
|
248
|
+
/**
|
|
249
|
+
* Create a ListTagCommand for listing tags.
|
|
250
|
+
*
|
|
251
|
+
* @example
|
|
252
|
+
* ```typescript
|
|
253
|
+
* const tags = await git.tagList().call();
|
|
254
|
+
* ```
|
|
255
|
+
*/
|
|
256
|
+
tagList(): ListTagCommand;
|
|
257
|
+
/**
|
|
258
|
+
* Create a ResetCommand for resetting HEAD.
|
|
259
|
+
*
|
|
260
|
+
* @example
|
|
261
|
+
* ```typescript
|
|
262
|
+
* await git.reset().setRef("HEAD~1").call();
|
|
263
|
+
* ```
|
|
264
|
+
*/
|
|
265
|
+
reset(): ResetCommand;
|
|
266
|
+
/**
|
|
267
|
+
* Create a MergeCommand for merging branches.
|
|
268
|
+
*
|
|
269
|
+
* @example
|
|
270
|
+
* ```typescript
|
|
271
|
+
* await git.merge().include("feature").call();
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
merge(): MergeCommand;
|
|
275
|
+
/**
|
|
276
|
+
* Create a CherryPickCommand for cherry-picking commits.
|
|
277
|
+
*
|
|
278
|
+
* @example
|
|
279
|
+
* ```typescript
|
|
280
|
+
* await git.cherryPick().include(commitId).call();
|
|
281
|
+
* ```
|
|
282
|
+
*/
|
|
283
|
+
cherryPick(): CherryPickCommand;
|
|
284
|
+
/**
|
|
285
|
+
* Create a RevertCommand for reverting commits.
|
|
286
|
+
*
|
|
287
|
+
* @example
|
|
288
|
+
* ```typescript
|
|
289
|
+
* await git.revert().include(commitId).call();
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
revert(): RevertCommand;
|
|
293
|
+
/**
|
|
294
|
+
* Create an RmCommand for removing files from the index.
|
|
295
|
+
*
|
|
296
|
+
* @example
|
|
297
|
+
* ```typescript
|
|
298
|
+
* // Remove file from index (and working tree if not cached)
|
|
299
|
+
* await git.rm()
|
|
300
|
+
* .addFilepattern("file.txt")
|
|
301
|
+
* .call();
|
|
302
|
+
*
|
|
303
|
+
* // Remove from index only (keep in working tree)
|
|
304
|
+
* await git.rm()
|
|
305
|
+
* .addFilepattern("file.txt")
|
|
306
|
+
* .setCached(true)
|
|
307
|
+
* .call();
|
|
308
|
+
* ```
|
|
309
|
+
*/
|
|
310
|
+
rm(): RmCommand;
|
|
311
|
+
/**
|
|
312
|
+
* Create a DescribeCommand for describing commits with tags.
|
|
313
|
+
*
|
|
314
|
+
* @example
|
|
315
|
+
* ```typescript
|
|
316
|
+
* // Describe HEAD
|
|
317
|
+
* const result = await git.describe().call();
|
|
318
|
+
* console.log(result.description); // e.g., "v1.0.0-5-gabcdef0"
|
|
319
|
+
*
|
|
320
|
+
* // Describe with all tags including lightweight
|
|
321
|
+
* const result = await git.describe().setTags(true).call();
|
|
322
|
+
*
|
|
323
|
+
* // Always output something
|
|
324
|
+
* const result = await git.describe().setAlways(true).call();
|
|
325
|
+
* ```
|
|
326
|
+
*/
|
|
327
|
+
describe(): DescribeCommand;
|
|
328
|
+
/**
|
|
329
|
+
* Create a GarbageCollectCommand for repository maintenance.
|
|
330
|
+
*
|
|
331
|
+
* @example
|
|
332
|
+
* ```typescript
|
|
333
|
+
* // Basic garbage collection
|
|
334
|
+
* const result = await git.gc().call();
|
|
335
|
+
*
|
|
336
|
+
* // Aggressive GC with repacking
|
|
337
|
+
* const result = await git.gc()
|
|
338
|
+
* .setAggressive(true)
|
|
339
|
+
* .call();
|
|
340
|
+
* ```
|
|
341
|
+
*/
|
|
342
|
+
gc(): GarbageCollectCommand;
|
|
343
|
+
/**
|
|
344
|
+
* Create a PackRefsCommand for packing loose refs.
|
|
345
|
+
*
|
|
346
|
+
* @example
|
|
347
|
+
* ```typescript
|
|
348
|
+
* // Pack all refs
|
|
349
|
+
* const result = await git.packRefs()
|
|
350
|
+
* .setAll(true)
|
|
351
|
+
* .call();
|
|
352
|
+
* ```
|
|
353
|
+
*/
|
|
354
|
+
packRefs(): PackRefsCommand;
|
|
355
|
+
/**
|
|
356
|
+
* Create a CleanCommand for removing untracked files.
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
* ```typescript
|
|
360
|
+
* // Preview what would be cleaned (dry run)
|
|
361
|
+
* const result = await git.clean()
|
|
362
|
+
* .setDryRun(true)
|
|
363
|
+
* .call();
|
|
364
|
+
* ```
|
|
365
|
+
*/
|
|
366
|
+
clean(): CleanCommand;
|
|
367
|
+
/**
|
|
368
|
+
* Create a StatusCommand for showing staging area status.
|
|
369
|
+
*
|
|
370
|
+
* @example
|
|
371
|
+
* ```typescript
|
|
372
|
+
* const status = await git.status().call();
|
|
373
|
+
* if (status.isClean()) {
|
|
374
|
+
* console.log("Nothing to commit");
|
|
375
|
+
* }
|
|
376
|
+
* ```
|
|
377
|
+
*/
|
|
378
|
+
status(): StatusCommand;
|
|
379
|
+
/**
|
|
380
|
+
* Create a DiffCommand for comparing trees/commits.
|
|
381
|
+
*
|
|
382
|
+
* @example
|
|
383
|
+
* ```typescript
|
|
384
|
+
* const entries = await git.diff()
|
|
385
|
+
* .setOldTree("main")
|
|
386
|
+
* .setNewTree("feature")
|
|
387
|
+
* .call();
|
|
388
|
+
* ```
|
|
389
|
+
*/
|
|
390
|
+
diff(): DiffCommand;
|
|
391
|
+
/**
|
|
392
|
+
* Create a FetchCommand for fetching from remotes.
|
|
393
|
+
*
|
|
394
|
+
* @example
|
|
395
|
+
* ```typescript
|
|
396
|
+
* await git.fetch()
|
|
397
|
+
* .setRemote("origin")
|
|
398
|
+
* .call();
|
|
399
|
+
* ```
|
|
400
|
+
*/
|
|
401
|
+
fetch(): FetchCommand;
|
|
402
|
+
/**
|
|
403
|
+
* Create a PushCommand for pushing to remotes.
|
|
404
|
+
*
|
|
405
|
+
* @example
|
|
406
|
+
* ```typescript
|
|
407
|
+
* await git.push()
|
|
408
|
+
* .setRemote("origin")
|
|
409
|
+
* .call();
|
|
410
|
+
* ```
|
|
411
|
+
*/
|
|
412
|
+
push(): PushCommand;
|
|
413
|
+
/**
|
|
414
|
+
* Create a PullCommand for pulling from remotes.
|
|
415
|
+
*
|
|
416
|
+
* @example
|
|
417
|
+
* ```typescript
|
|
418
|
+
* await git.pull()
|
|
419
|
+
* .setRemote("origin")
|
|
420
|
+
* .call();
|
|
421
|
+
* ```
|
|
422
|
+
*/
|
|
423
|
+
pull(): PullCommand;
|
|
424
|
+
/**
|
|
425
|
+
* Create a CloneCommand for cloning repositories.
|
|
426
|
+
*
|
|
427
|
+
* @example
|
|
428
|
+
* ```typescript
|
|
429
|
+
* await git.clone()
|
|
430
|
+
* .setURI("https://github.com/user/repo")
|
|
431
|
+
* .call();
|
|
432
|
+
* ```
|
|
433
|
+
*/
|
|
434
|
+
clone(): CloneCommand;
|
|
435
|
+
/**
|
|
436
|
+
* Create an LsRemoteCommand for listing remote refs.
|
|
437
|
+
*
|
|
438
|
+
* @example
|
|
439
|
+
* ```typescript
|
|
440
|
+
* const refs = await git.lsRemote()
|
|
441
|
+
* .setRemote("https://github.com/user/repo")
|
|
442
|
+
* .call();
|
|
443
|
+
* ```
|
|
444
|
+
*/
|
|
445
|
+
lsRemote(): LsRemoteCommand;
|
|
446
|
+
/**
|
|
447
|
+
* Create a RemoteAddCommand for adding remotes.
|
|
448
|
+
*
|
|
449
|
+
* @example
|
|
450
|
+
* ```typescript
|
|
451
|
+
* await git.remoteAdd()
|
|
452
|
+
* .setName("upstream")
|
|
453
|
+
* .setUri("https://github.com/user/repo")
|
|
454
|
+
* .call();
|
|
455
|
+
* ```
|
|
456
|
+
*/
|
|
457
|
+
remoteAdd(): RemoteAddCommand;
|
|
458
|
+
/**
|
|
459
|
+
* Create a RemoteRemoveCommand for removing remotes.
|
|
460
|
+
*
|
|
461
|
+
* @example
|
|
462
|
+
* ```typescript
|
|
463
|
+
* await git.remoteRemove()
|
|
464
|
+
* .setRemoteName("upstream")
|
|
465
|
+
* .call();
|
|
466
|
+
* ```
|
|
467
|
+
*/
|
|
468
|
+
remoteRemove(): RemoteRemoveCommand;
|
|
469
|
+
/**
|
|
470
|
+
* Create a RemoteListCommand for listing remotes.
|
|
471
|
+
*
|
|
472
|
+
* @example
|
|
473
|
+
* ```typescript
|
|
474
|
+
* const remotes = await git.remoteList().call();
|
|
475
|
+
* ```
|
|
476
|
+
*/
|
|
477
|
+
remoteList(): RemoteListCommand;
|
|
478
|
+
/**
|
|
479
|
+
* Create a RemoteSetUrlCommand for changing remote URLs.
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* ```typescript
|
|
483
|
+
* await git.remoteSetUrl()
|
|
484
|
+
* .setRemoteName("origin")
|
|
485
|
+
* .setRemoteUri("https://github.com/user/repo")
|
|
486
|
+
* .call();
|
|
487
|
+
* ```
|
|
488
|
+
*/
|
|
489
|
+
remoteSetUrl(): RemoteSetUrlCommand;
|
|
490
|
+
/**
|
|
491
|
+
* Create a RebaseCommand for rebasing commits.
|
|
492
|
+
*
|
|
493
|
+
* @example
|
|
494
|
+
* ```typescript
|
|
495
|
+
* // Rebase current branch onto main
|
|
496
|
+
* const result = await git.rebase()
|
|
497
|
+
* .setUpstream(mainCommitId)
|
|
498
|
+
* .call();
|
|
499
|
+
*
|
|
500
|
+
* // Abort rebase in progress
|
|
501
|
+
* const result = await git.rebase()
|
|
502
|
+
* .setOperation(RebaseOperation.ABORT)
|
|
503
|
+
* .call();
|
|
504
|
+
* ```
|
|
505
|
+
*/
|
|
506
|
+
rebase(): RebaseCommand;
|
|
507
|
+
/**
|
|
508
|
+
* Create a StashCreateCommand for stashing changes.
|
|
509
|
+
*
|
|
510
|
+
* @example
|
|
511
|
+
* ```typescript
|
|
512
|
+
* const stashCommit = await git.stashCreate()
|
|
513
|
+
* .setWorkingTreeProvider(provider)
|
|
514
|
+
* .setMessage("WIP: feature work")
|
|
515
|
+
* .call();
|
|
516
|
+
* ```
|
|
517
|
+
*/
|
|
518
|
+
stashCreate(): StashCreateCommand;
|
|
519
|
+
/**
|
|
520
|
+
* Create a StashApplyCommand for applying stashed changes.
|
|
521
|
+
*
|
|
522
|
+
* @example
|
|
523
|
+
* ```typescript
|
|
524
|
+
* // Apply most recent stash
|
|
525
|
+
* const result = await git.stashApply().call();
|
|
526
|
+
*
|
|
527
|
+
* // Apply specific stash
|
|
528
|
+
* const result = await git.stashApply()
|
|
529
|
+
* .setStashRef("stash@{2}")
|
|
530
|
+
* .call();
|
|
531
|
+
* ```
|
|
532
|
+
*/
|
|
533
|
+
stashApply(): StashApplyCommand;
|
|
534
|
+
/**
|
|
535
|
+
* Create a StashDropCommand for dropping stashes.
|
|
536
|
+
*
|
|
537
|
+
* @example
|
|
538
|
+
* ```typescript
|
|
539
|
+
* // Drop most recent stash
|
|
540
|
+
* await git.stashDrop().call();
|
|
541
|
+
*
|
|
542
|
+
* // Drop all stashes
|
|
543
|
+
* await git.stashDrop().setAll(true).call();
|
|
544
|
+
* ```
|
|
545
|
+
*/
|
|
546
|
+
stashDrop(): StashDropCommand;
|
|
547
|
+
/**
|
|
548
|
+
* Create a StashListCommand for listing stashes.
|
|
549
|
+
*
|
|
550
|
+
* @example
|
|
551
|
+
* ```typescript
|
|
552
|
+
* const stashes = await git.stashList().call();
|
|
553
|
+
* for (const stash of stashes) {
|
|
554
|
+
* console.log(`stash@{${stash.index}}: ${stash.message}`);
|
|
555
|
+
* }
|
|
556
|
+
* ```
|
|
557
|
+
*/
|
|
558
|
+
stashList(): StashListCommand;
|
|
559
|
+
/**
|
|
560
|
+
* Get the underlying WorkingCopy.
|
|
561
|
+
*
|
|
562
|
+
* @example
|
|
563
|
+
* ```typescript
|
|
564
|
+
* const git = Git.fromWorkingCopy(workingCopy);
|
|
565
|
+
* const wc = git.workingCopy;
|
|
566
|
+
*
|
|
567
|
+
* // Access full WorkingCopy API
|
|
568
|
+
* const status = await wc.getStatus();
|
|
569
|
+
* const branch = await wc.getCurrentBranch();
|
|
570
|
+
* ```
|
|
571
|
+
*/
|
|
572
|
+
get workingCopy(): WorkingCopy;
|
|
573
|
+
/**
|
|
574
|
+
* Get the History interface for accessing repository objects.
|
|
575
|
+
*
|
|
576
|
+
* Provides access to blobs, trees, commits, tags, and refs.
|
|
577
|
+
* Returns undefined if WorkingCopy doesn't have history.
|
|
578
|
+
*
|
|
579
|
+
* @example
|
|
580
|
+
* ```typescript
|
|
581
|
+
* const history = git.history;
|
|
582
|
+
* if (history) {
|
|
583
|
+
* const commit = await history.commits.load(commitId);
|
|
584
|
+
* const tree = await history.trees.load(commit.tree);
|
|
585
|
+
* }
|
|
586
|
+
* ```
|
|
587
|
+
*/
|
|
588
|
+
get history(): History | undefined;
|
|
589
|
+
/**
|
|
590
|
+
* Get the Checkout interface for managing local state.
|
|
591
|
+
*
|
|
592
|
+
* Provides access to staging area, HEAD, and in-progress operations.
|
|
593
|
+
* Returns undefined if WorkingCopy doesn't have checkout.
|
|
594
|
+
*
|
|
595
|
+
* Note: Named `checkoutState` to avoid conflict with `checkout()` command method.
|
|
596
|
+
*
|
|
597
|
+
* @example
|
|
598
|
+
* ```typescript
|
|
599
|
+
* const checkoutState = git.checkoutState;
|
|
600
|
+
* if (checkoutState) {
|
|
601
|
+
* const staging = checkoutState.staging;
|
|
602
|
+
* const head = await checkoutState.getHeadCommit();
|
|
603
|
+
* }
|
|
604
|
+
* ```
|
|
605
|
+
*/
|
|
606
|
+
get checkoutState(): Checkout | undefined;
|
|
607
|
+
/**
|
|
608
|
+
* Get the Worktree interface for filesystem operations.
|
|
609
|
+
*
|
|
610
|
+
* Provides access to working directory read/write operations.
|
|
611
|
+
* Returns undefined if WorkingCopy doesn't have worktree.
|
|
612
|
+
*
|
|
613
|
+
* @example
|
|
614
|
+
* ```typescript
|
|
615
|
+
* const worktree = git.worktree;
|
|
616
|
+
* if (worktree) {
|
|
617
|
+
* for await (const entry of worktree.walk()) {
|
|
618
|
+
* console.log(entry.path);
|
|
619
|
+
* }
|
|
620
|
+
* }
|
|
621
|
+
* ```
|
|
622
|
+
*/
|
|
623
|
+
get worktree(): Worktree | undefined;
|
|
624
|
+
/**
|
|
625
|
+
* Close the Git instance.
|
|
626
|
+
*
|
|
627
|
+
* After calling this method, no more commands can be created.
|
|
628
|
+
* This does NOT close the underlying store.
|
|
629
|
+
*/
|
|
630
|
+
close(): void;
|
|
631
|
+
/**
|
|
632
|
+
* Disposable interface implementation.
|
|
633
|
+
*/
|
|
634
|
+
[Symbol.dispose](): void;
|
|
635
|
+
private checkClosed;
|
|
636
|
+
}
|
|
637
|
+
//# sourceMappingURL=git.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../src/git.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAErF,OAAO,EACL,UAAU,EACV,YAAY,EACZ,eAAe,EACf,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,eAAe,EACf,WAAW,EACX,YAAY,EACZ,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,eAAe,EACf,YAAY,EACZ,eAAe,EACf,WAAW,EACX,WAAW,EACX,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,UAAU,EACX,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,GAAI,YAAW,UAAU;IACpC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAC3C,OAAO,CAAC,MAAM,CAAS;IAEvB,OAAO,eAEN;IAID;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,MAAM,CAAC,eAAe,CAAC,WAAW,EAAE,WAAW,GAAG,GAAG,CAEpD;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,MAAM,CAAC,IAAI,IAAI,WAAW,CAEzB;IAID;;;;;;;;;;;;;;;;;;;OAmBG;IACH,GAAG,IAAI,UAAU,CAGhB;IAID;;;;;;;;;;;;;OAaG;IACH,KAAK,IAAI,YAAY,CAGpB;IAID;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,QAAQ,IAAI,eAAe,CAG1B;IAID;;;;;;;;;;OAUG;IACH,MAAM,IAAI,aAAa,CAGtB;IAID;;;;;;;;;OASG;IACH,GAAG,IAAI,UAAU,CAGhB;IAED;;;;;;;;;;;;;OAaG;IACH,MAAM,IAAI,aAAa,CAGtB;IAID;;;;;;;OAOG;IACH,YAAY,IAAI,mBAAmB,CAGlC;IAED;;;;;;;OAOG;IACH,YAAY,IAAI,mBAAmB,CAGlC;IAED;;;;;;;OAOG;IACH,UAAU,IAAI,iBAAiB,CAG9B;IAED;;;;;;;;;;OAUG;IACH,YAAY,IAAI,mBAAmB,CAGlC;IAID;;;;;;;OAOG;IACH,GAAG,IAAI,UAAU,CAGhB;IAED;;;;;;;OAOG;IACH,SAAS,IAAI,gBAAgB,CAG5B;IAED;;;;;;;OAOG;IACH,OAAO,IAAI,cAAc,CAGxB;IAID;;;;;;;OAOG;IACH,KAAK,IAAI,YAAY,CAGpB;IAID;;;;;;;OAOG;IACH,KAAK,IAAI,YAAY,CAGpB;IAID;;;;;;;OAOG;IACH,UAAU,IAAI,iBAAiB,CAG9B;IAID;;;;;;;OAOG;IACH,MAAM,IAAI,aAAa,CAGtB;IAID;;;;;;;;;;;;;;;;OAgBG;IACH,EAAE,IAAI,SAAS,CAGd;IAID;;;;;;;;;;;;;;;OAeG;IACH,QAAQ,IAAI,eAAe,CAG1B;IAID;;;;;;;;;;;;;OAaG;IACH,EAAE,IAAI,qBAAqB,CAG1B;IAED;;;;;;;;;;OAUG;IACH,QAAQ,IAAI,eAAe,CAG1B;IAED;;;;;;;;;;OAUG;IACH,KAAK,IAAI,YAAY,CAGpB;IAID;;;;;;;;;;OAUG;IACH,MAAM,IAAI,aAAa,CAGtB;IAID;;;;;;;;;;OAUG;IACH,IAAI,IAAI,WAAW,CAGlB;IAID;;;;;;;;;OASG;IACH,KAAK,IAAI,YAAY,CAGpB;IAED;;;;;;;;;OASG;IACH,IAAI,IAAI,WAAW,CAGlB;IAED;;;;;;;;;OASG;IACH,IAAI,IAAI,WAAW,CAGlB;IAED;;;;;;;;;OASG;IACH,KAAK,IAAI,YAAY,CAGpB;IAED;;;;;;;;;OASG;IACH,QAAQ,IAAI,eAAe,CAG1B;IAID;;;;;;;;;;OAUG;IACH,SAAS,IAAI,gBAAgB,CAG5B;IAED;;;;;;;;;OASG;IACH,YAAY,IAAI,mBAAmB,CAGlC;IAED;;;;;;;OAOG;IACH,UAAU,IAAI,iBAAiB,CAG9B;IAED;;;;;;;;;;OAUG;IACH,YAAY,IAAI,mBAAmB,CAGlC;IAID;;;;;;;;;;;;;;;OAeG;IACH,MAAM,IAAI,aAAa,CAGtB;IAID;;;;;;;;;;OAUG;IACH,WAAW,IAAI,kBAAkB,CAGhC;IAED;;;;;;;;;;;;;OAaG;IACH,UAAU,IAAI,iBAAiB,CAG9B;IAED;;;;;;;;;;;OAWG;IACH,SAAS,IAAI,gBAAgB,CAG5B;IAED;;;;;;;;;;OAUG;IACH,SAAS,IAAI,gBAAgB,CAG5B;IAID;;;;;;;;;;;;OAYG;IACH,IAAI,WAAW,IAAI,WAAW,CAE7B;IAED;;;;;;;;;;;;;;OAcG;IACH,IAAI,OAAO,IAAI,OAAO,GAAG,SAAS,CAEjC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,IAAI,aAAa,IAAI,QAAQ,GAAG,SAAS,CAExC;IAED;;;;;;;;;;;;;;;OAeG;IACH,IAAI,QAAQ,IAAI,QAAQ,GAAG,SAAS,CAEnC;IAID;;;;;OAKG;IACH,KAAK,IAAI,IAAI,CAEZ;IAED;;OAEG;IACH,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,IAAI,CAEvB;IAID,OAAO,CAAC,WAAW;CAKpB"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./commands/index.js";
|
|
2
|
+
export * from "./errors/index.js";
|
|
3
|
+
export { Git } from "./git.js";
|
|
4
|
+
export { GitCommand } from "./git-command.js";
|
|
5
|
+
export * from "./results/index.js";
|
|
6
|
+
export { TransportCommand } from "./transport-command.js";
|
|
7
|
+
export * from "./types.js";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,qBAAqB,CAAC;AAMpC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAE/B,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,cAAc,oBAAoB,CAAC;AACnC,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAE1D,cAAc,YAAY,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { AuthenticationError, CannotDeleteCurrentBranchError, CommitNotFoundError, DetachedHeadError, EmptyCommitError, GitApiError, IncompatibleOptionsError, InvalidArgumentError, InvalidMainlineParentError, InvalidMergeHeadsError, InvalidRefNameError, InvalidRemoteError, InvalidStashIndexError, InvalidTagNameError, MergeConflictError, MergeFailureReason, MissingArgumentError, MultipleParentsNotAllowedError, NoFilepatternError, NoHeadError, NoMergeBaseError, NoMessageError, NoRebaseInProgressError, NonFastForwardError, NotADirectoryError, NotFastForwardError, NotImplementedError, NotMergedError, PathNotFoundInTreeError, PathNotInIndexError, PushRejectedException, RefAlreadyExistsError, RefNotFoundError, RemoteAlreadyExistsError, RemoteNotFoundError, StashApplyFailedError, StashNotFoundError, StoreNotAvailableError, TransportError, UnmergedPathsError, UpstreamRequiredError } from "./errors/index.js";
|
|
2
|
+
import { A as DiffCommand, B as CheckoutCommand, C as MergeCommand, D as InitCommand, E as RevFilter, F as FetchCommand, G as ListBranchCommand, H as CheckoutStatus, I as TagOption, J as ResetMode, K as RenameBranchCommand, L as TransportCommand, M as DescribeCommand, N as CommitCommand, O as Git, P as CloneCommand, R as CleanCommand, S as PackRefsCommand, T as LogCommand, U as CreateBranchCommand, V as CheckoutStage, W as DeleteBranchCommand, X as AddCommand, Y as BlameCommand, Z as GitCommand, _ as ReflogCommand, a as StashDropCommand, b as PushCommand, c as STASH_REF, d as RevertCommand, f as ResetCommand, g as RemoteSetUrlCommand, h as RemoteRemoveCommand, i as StatusCommand, j as formatDiffEntry, k as GarbageCollectCommand, l as StashListCommand, m as RemoteListCommand, n as ListTagCommand, o as StashCreateCommand, p as RemoteAddCommand, q as ListBranchMode, r as TagCommand, s as StashApplyCommand, t as DeleteTagCommand, u as RmCommand, v as RebaseCommand, w as LsRemoteCommand, x as PullCommand, y as RebaseOperation, z as CherryPickCommand } from "./commands-COO4tJhv.js";
|
|
3
|
+
import { C as isMergeSuccessful, S as MergeStrategy, _ as getSuccessfulUpdates, a as RebaseStatus, b as FastForwardMode, c as getFailedUpdates, d as createAddEntry, f as createCopyEntry, g as RefUpdateStatus, h as createRenameEntry, i as RebaseAction, l as isPushSuccessful, m as createModifyEntry, n as StashApplyStatus, o as isRebaseSuccessful, p as createDeleteEntry, r as RevertStatus, s as PushStatus, t as StatusImpl, u as ChangeType, v as hasUpdates, w as CherryPickStatus, x as MergeStatus, y as ContentMergeStrategy } from "./status-result-BwAyxq6R.js";
|
|
4
|
+
import { DiffFormatter, isPullSuccessful } from "./results/index.js";
|
|
5
|
+
export { AddCommand, AuthenticationError, BlameCommand, CannotDeleteCurrentBranchError, ChangeType, CheckoutCommand, CheckoutStage, CheckoutStatus, CherryPickCommand, CherryPickStatus, CleanCommand, CloneCommand, CommitCommand, CommitNotFoundError, ContentMergeStrategy, CreateBranchCommand, DeleteBranchCommand, DeleteTagCommand, DescribeCommand, DetachedHeadError, DiffCommand, DiffFormatter, EmptyCommitError, FastForwardMode, FetchCommand, GarbageCollectCommand, Git, GitApiError, GitCommand, IncompatibleOptionsError, InitCommand, InvalidArgumentError, InvalidMainlineParentError, InvalidMergeHeadsError, InvalidRefNameError, InvalidRemoteError, InvalidStashIndexError, InvalidTagNameError, ListBranchCommand, ListBranchMode, ListTagCommand, LogCommand, LsRemoteCommand, MergeCommand, MergeConflictError, MergeFailureReason, MergeStatus, MergeStrategy, MissingArgumentError, MultipleParentsNotAllowedError, NoFilepatternError, NoHeadError, NoMergeBaseError, NoMessageError, NoRebaseInProgressError, NonFastForwardError, NotADirectoryError, NotFastForwardError, NotImplementedError, NotMergedError, PackRefsCommand, PathNotFoundInTreeError, PathNotInIndexError, PullCommand, PushCommand, PushRejectedException, PushStatus, RebaseAction, RebaseCommand, RebaseOperation, RebaseStatus, RefAlreadyExistsError, RefNotFoundError, RefUpdateStatus, ReflogCommand, RemoteAddCommand, RemoteAlreadyExistsError, RemoteListCommand, RemoteNotFoundError, RemoteRemoveCommand, RemoteSetUrlCommand, RenameBranchCommand, ResetCommand, ResetMode, RevFilter, RevertCommand, RevertStatus, RmCommand, STASH_REF, StashApplyCommand, StashApplyFailedError, StashApplyStatus, StashCreateCommand, StashDropCommand, StashListCommand, StashNotFoundError, StatusCommand, StatusImpl, StoreNotAvailableError, TagCommand, TagOption, TransportCommand, TransportError, UnmergedPathsError, UpstreamRequiredError, createAddEntry, createCopyEntry, createDeleteEntry, createModifyEntry, createRenameEntry, formatDiffEntry, getFailedUpdates, getSuccessfulUpdates, hasUpdates, isMergeSuccessful, isPullSuccessful, isPushSuccessful, isRebaseSuccessful };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pack-import/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { History } from "@statewalker/vcs-core";
|
|
2
|
+
/**
|
|
3
|
+
* Unpack pack data into a history's object stores.
|
|
4
|
+
*
|
|
5
|
+
* Uses the history's own {@link SerializationApi} when it exposes one
|
|
6
|
+
* (a `HistoryWithOperations`), otherwise builds a default one over its
|
|
7
|
+
* object stores — `WorkingCopy.history` is typed as a plain `History`,
|
|
8
|
+
* so `serialization` is not statically available.
|
|
9
|
+
*/
|
|
10
|
+
export declare function importPackIntoHistory(history: History, packData: Uint8Array): Promise<void>;
|
|
11
|
+
//# sourceMappingURL=pack-import.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pack-import.d.ts","sourceRoot":"","sources":["../../src/pack-import/pack-import.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAyB,MAAM,uBAAuB,CAAC;AAK5E;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC,CAUjG"}
|