@trebired/git-host 0.1.0 → 0.2.0
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/CHANGELOG.md +13 -0
- package/README.md +59 -8
- package/dist/api/handler/action.d.ts +1 -1
- package/dist/api/handler/action.d.ts.map +1 -1
- package/dist/api/handler/action.js +45 -1
- package/dist/api/handler/action.js.map +1 -1
- package/dist/api/handler/route.d.ts +14 -1
- package/dist/api/handler/route.d.ts.map +1 -1
- package/dist/api/handler/route.js +19 -1
- package/dist/api/handler/route.js.map +1 -1
- package/dist/core/create_git_host/branch_methods.d.ts +1 -1
- package/dist/core/create_git_host/branch_methods.d.ts.map +1 -1
- package/dist/core/create_git_host/branch_methods.js +88 -2
- package/dist/core/create_git_host/branch_methods.js.map +1 -1
- package/dist/core/create_git_host/content_methods.d.ts +1 -1
- package/dist/core/create_git_host/content_methods.d.ts.map +1 -1
- package/dist/core/create_git_host/content_methods.js +17 -1
- package/dist/core/create_git_host/content_methods.js.map +1 -1
- package/dist/core/create_git_host/working_tree_methods.d.ts +1 -1
- package/dist/core/create_git_host/working_tree_methods.d.ts.map +1 -1
- package/dist/core/create_git_host/working_tree_methods.js +22 -1
- package/dist/core/create_git_host/working_tree_methods.js.map +1 -1
- package/dist/core/inspect/icon_theme.d.ts +4 -0
- package/dist/core/inspect/icon_theme.d.ts.map +1 -0
- package/dist/core/inspect/icon_theme.js +72 -0
- package/dist/core/inspect/icon_theme.js.map +1 -0
- package/dist/core/inspect.d.ts +25 -2
- package/dist/core/inspect.d.ts.map +1 -1
- package/dist/core/inspect.js +329 -7
- package/dist/core/inspect.js.map +1 -1
- package/dist/core/repository/parsers.d.ts +3 -2
- package/dist/core/repository/parsers.d.ts.map +1 -1
- package/dist/core/repository/parsers.js +24 -1
- package/dist/core/repository/parsers.js.map +1 -1
- package/dist/core/repository.d.ts +5 -3
- package/dist/core/repository.d.ts.map +1 -1
- package/dist/core/repository.js +60 -5
- package/dist/core/repository.js.map +1 -1
- package/dist/core/working_tree/mutate.d.ts +5 -2
- package/dist/core/working_tree/mutate.d.ts.map +1 -1
- package/dist/core/working_tree/mutate.js +108 -1
- package/dist/core/working_tree/mutate.js.map +1 -1
- package/dist/core/working_tree.d.ts +1 -1
- package/dist/core/working_tree.d.ts.map +1 -1
- package/dist/core/working_tree.js +1 -1
- package/dist/core/working_tree.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/react/client/types.d.ts +28 -1
- package/dist/react/client/types.d.ts.map +1 -1
- package/dist/react/client.d.ts.map +1 -1
- package/dist/react/client.js +61 -0
- package/dist/react/client.js.map +1 -1
- package/dist/react/hooks/resources.d.ts +9 -3
- package/dist/react/hooks/resources.d.ts.map +1 -1
- package/dist/react/hooks/resources.js +122 -4
- package/dist/react/hooks/resources.js.map +1 -1
- package/dist/react/hooks/types.d.ts +29 -2
- package/dist/react/hooks/types.d.ts.map +1 -1
- package/dist/react/hooks.d.ts +2 -2
- package/dist/react/hooks.d.ts.map +1 -1
- package/dist/react/hooks.js +1 -1
- package/dist/react/hooks.js.map +1 -1
- package/dist/react/index.d.ts +2 -2
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/index.js.map +1 -1
- package/dist/types/host.d.ts +64 -2
- package/dist/types/host.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/repository.d.ts +101 -1
- package/dist/types/repository.d.ts.map +1 -1
- package/dist/types/transports.d.ts +1 -1
- package/dist/types/transports.d.ts.map +1 -1
- package/package.json +3 -1
package/dist/react/client.js
CHANGED
|
@@ -52,6 +52,7 @@ function createGitApiClient(options) {
|
|
|
52
52
|
query: buildQuery({
|
|
53
53
|
baseRef: input.baseRef,
|
|
54
54
|
headRef: input.headRef,
|
|
55
|
+
path: input.path,
|
|
55
56
|
}),
|
|
56
57
|
signal: input.signal,
|
|
57
58
|
});
|
|
@@ -66,15 +67,23 @@ function createGitApiClient(options) {
|
|
|
66
67
|
headers: input?.headers,
|
|
67
68
|
query: buildQuery({
|
|
68
69
|
limit: input?.limit,
|
|
70
|
+
path: input?.path,
|
|
71
|
+
ref: input?.ref,
|
|
69
72
|
}),
|
|
70
73
|
signal: input?.signal,
|
|
71
74
|
});
|
|
72
75
|
return response.data;
|
|
73
76
|
},
|
|
77
|
+
async listTags(repositoryKey, input) {
|
|
78
|
+
const response = await request(repositoryKey, "tags", input);
|
|
79
|
+
return response.data;
|
|
80
|
+
},
|
|
74
81
|
async listTree(repositoryKey, input) {
|
|
75
82
|
const response = await request(repositoryKey, "tree", {
|
|
76
83
|
headers: input?.headers,
|
|
77
84
|
query: buildQuery({
|
|
85
|
+
icons: input?.icons,
|
|
86
|
+
linguist: input?.linguist,
|
|
78
87
|
path: input?.path,
|
|
79
88
|
recursive: input?.recursive,
|
|
80
89
|
ref: input?.ref,
|
|
@@ -94,10 +103,47 @@ function createGitApiClient(options) {
|
|
|
94
103
|
});
|
|
95
104
|
return response.data;
|
|
96
105
|
},
|
|
106
|
+
async readArchive(repositoryKey, input) {
|
|
107
|
+
const response = await request(repositoryKey, "archive", {
|
|
108
|
+
headers: input?.headers,
|
|
109
|
+
query: buildQuery({
|
|
110
|
+
format: input?.format,
|
|
111
|
+
prefix: input?.prefix,
|
|
112
|
+
ref: input?.ref,
|
|
113
|
+
}),
|
|
114
|
+
signal: input?.signal,
|
|
115
|
+
});
|
|
116
|
+
return response.data;
|
|
117
|
+
},
|
|
118
|
+
async readBlame(repositoryKey, input) {
|
|
119
|
+
const response = await request(repositoryKey, "blame", {
|
|
120
|
+
headers: input.headers,
|
|
121
|
+
query: buildQuery({
|
|
122
|
+
path: input.path,
|
|
123
|
+
ref: input.ref,
|
|
124
|
+
}),
|
|
125
|
+
signal: input.signal,
|
|
126
|
+
});
|
|
127
|
+
return response.data;
|
|
128
|
+
},
|
|
97
129
|
async readCommit(repositoryKey, commitRef, input) {
|
|
98
130
|
const response = await request(repositoryKey, `commits/${encodePathSegment(commitRef)}`, input);
|
|
99
131
|
return response.data;
|
|
100
132
|
},
|
|
133
|
+
async readLinguist(repositoryKey, input) {
|
|
134
|
+
const response = await request(repositoryKey, "linguist", {
|
|
135
|
+
headers: input?.headers,
|
|
136
|
+
query: buildQuery({
|
|
137
|
+
ref: input?.ref,
|
|
138
|
+
}),
|
|
139
|
+
signal: input?.signal,
|
|
140
|
+
});
|
|
141
|
+
return response.data;
|
|
142
|
+
},
|
|
143
|
+
async readTag(repositoryKey, tagName, input) {
|
|
144
|
+
const response = await request(repositoryKey, `tags/${encodePathSegment(tagName)}`, input);
|
|
145
|
+
return response.data;
|
|
146
|
+
},
|
|
101
147
|
async readSummary(repositoryKey, input) {
|
|
102
148
|
const response = await request(repositoryKey, "summary", {
|
|
103
149
|
headers: input?.headers,
|
|
@@ -108,6 +154,21 @@ function createGitApiClient(options) {
|
|
|
108
154
|
});
|
|
109
155
|
return response.data;
|
|
110
156
|
},
|
|
157
|
+
async search(repositoryKey, input) {
|
|
158
|
+
const response = await request(repositoryKey, "search", {
|
|
159
|
+
headers: input.headers,
|
|
160
|
+
query: buildQuery({
|
|
161
|
+
caseSensitive: input.caseSensitive,
|
|
162
|
+
limit: input.limit,
|
|
163
|
+
path: input.path,
|
|
164
|
+
query: input.query,
|
|
165
|
+
ref: input.ref,
|
|
166
|
+
regexp: input.regexp,
|
|
167
|
+
}),
|
|
168
|
+
signal: input.signal,
|
|
169
|
+
});
|
|
170
|
+
return response.data;
|
|
171
|
+
},
|
|
111
172
|
request,
|
|
112
173
|
};
|
|
113
174
|
}
|
package/dist/react/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/react/client.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACzE,O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AAC,aAAa;oBAClC,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,IAAI,EAAE,KAAK,CAAC,IAAI;oBAChB,KAAK,EAAE,KAAK,CAAC,KAAK;oBAClB,GAAG,EAAE,KAAK,CAAC,GAAG;oBACd,MAAM,EAAE,KAAK,CAAC,MAAM;iBACrB,CAAC;gBACF,MAAM,EAAE,KAAK,CAAC,MAAM;aACrB,CAAC,CAAC;YACH,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC;QACD,OAAO;KACR,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import type { GitBlob, GitBranchSummary, GitCommitDetail, GitCommitSummary, GitCompareSummary, GitRepositorySummary, GitTreeEntry } from "../../types.js";
|
|
2
|
-
import type { GitApiQueryOptions, GitApiQueryResult, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitRepositorySummaryOptions, UseGitTreeOptions } from "./types.js";
|
|
1
|
+
import type { GitArchive, GitBlame, GitBlob, GitBranchSummary, GitTagDetail, GitTagSummary, GitCommitDetail, GitCommitSummary, GitCompareSummary, GitRepositoryLinguist, GitRepositorySummary, GitSearchResult, GitTreeEntry } from "../../types.js";
|
|
2
|
+
import type { GitApiQueryOptions, GitApiQueryResult, UseGitArchiveOptions, UseGitBlameOptions, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitLinguistOptions, UseGitRepositorySummaryOptions, UseGitSearchOptions, UseGitTagOptions, UseGitTagsOptions, UseGitTreeOptions } from "./types.js";
|
|
3
3
|
declare function useGitRepositorySummary(repositoryKey: string, options?: UseGitRepositorySummaryOptions): GitApiQueryResult<GitRepositorySummary>;
|
|
4
4
|
declare function useGitBranches(repositoryKey: string, options?: GitApiQueryOptions<GitBranchSummary[]>): GitApiQueryResult<GitBranchSummary[]>;
|
|
5
5
|
declare function useGitCommits(repositoryKey: string, options?: UseGitCommitsOptions): GitApiQueryResult<GitCommitSummary[]>;
|
|
6
6
|
declare function useGitCommit(repositoryKey: string, commitRef: string, options?: GitApiQueryOptions<GitCommitDetail>): GitApiQueryResult<GitCommitDetail>;
|
|
7
|
+
declare function useGitLinguist(repositoryKey: string, options?: UseGitLinguistOptions): GitApiQueryResult<GitRepositoryLinguist>;
|
|
8
|
+
declare function useGitTags(repositoryKey: string, options?: UseGitTagsOptions): GitApiQueryResult<GitTagSummary[]>;
|
|
9
|
+
declare function useGitTag(repositoryKey: string, tagName: string, options?: UseGitTagOptions): GitApiQueryResult<GitTagDetail>;
|
|
7
10
|
declare function useGitTree(repositoryKey: string, options?: UseGitTreeOptions): GitApiQueryResult<GitTreeEntry[]>;
|
|
8
11
|
declare function useGitBlob(repositoryKey: string, options: UseGitBlobOptions): GitApiQueryResult<GitBlob>;
|
|
12
|
+
declare function useGitBlame(repositoryKey: string, options: UseGitBlameOptions): GitApiQueryResult<GitBlame>;
|
|
9
13
|
declare function useGitDiff(repositoryKey: string, options: UseGitDiffOptions): GitApiQueryResult<GitCompareSummary>;
|
|
10
|
-
|
|
14
|
+
declare function useGitSearch(repositoryKey: string, options: UseGitSearchOptions): GitApiQueryResult<GitSearchResult>;
|
|
15
|
+
declare function useGitArchive(repositoryKey: string, options?: UseGitArchiveOptions): GitApiQueryResult<GitArchive>;
|
|
16
|
+
export { useGitArchive, useGitBlame, useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitLinguist, useGitRepositorySummary, useGitSearch, useGitTag, useGitTags, useGitTree, };
|
|
11
17
|
//# sourceMappingURL=resources.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/resources.ts"],"names":[],"mappings":"AAAA,OAAO,KAA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,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,gBAAgB,GACzB,iBAAiB,CAAC,YAAY,CAAC,CAajC;AAED,iBAAS,UAAU,CACjB,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,iBAAiB,GAC1B,iBAAiB,CAAC,YAAY,EAAE,CAAC,CA0BnC;AAED,iBAAS,UAAU,CACjB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,iBAAiB,GACzB,iBAAiB,CAAC,OAAO,CAAC,CAe5B;AAED,iBAAS,WAAW,CAClB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,kBAAkB,GAC1B,iBAAiB,CAAC,QAAQ,CAAC,CAe7B;AAED,iBAAS,UAAU,CACjB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,iBAAiB,GACzB,iBAAiB,CAAC,iBAAiB,CAAC,CAmBtC;AAED,iBAAS,YAAY,CACnB,aAAa,EAAE,MAAM,EACrB,OAAO,EAAE,mBAAmB,GAC3B,iBAAiB,CAAC,eAAe,CAAC,CA4BpC;AAED,iBAAS,aAAa,CACpB,aAAa,EAAE,MAAM,EACrB,OAAO,CAAC,EAAE,oBAAoB,GAC7B,iBAAiB,CAAC,UAAU,CAAC,CAgB/B;AAED,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,GACX,CAAC"}
|
|
@@ -33,11 +33,13 @@ function useGitCommits(repositoryKey, options) {
|
|
|
33
33
|
return useGitApiQuery({
|
|
34
34
|
...options,
|
|
35
35
|
enabled,
|
|
36
|
-
key: ["commits", repositoryKey, options?.limit ?? null],
|
|
36
|
+
key: ["commits", repositoryKey, options?.limit ?? null, options?.ref ?? "", options?.path ?? ""],
|
|
37
37
|
load(client, signal) {
|
|
38
38
|
return client.listCommits(repositoryKey, {
|
|
39
39
|
headers: options?.headers,
|
|
40
40
|
limit: options?.limit,
|
|
41
|
+
path: options?.path,
|
|
42
|
+
ref: options?.ref,
|
|
41
43
|
signal,
|
|
42
44
|
});
|
|
43
45
|
},
|
|
@@ -57,15 +59,68 @@ function useGitCommit(repositoryKey, commitRef, options) {
|
|
|
57
59
|
},
|
|
58
60
|
});
|
|
59
61
|
}
|
|
62
|
+
function useGitLinguist(repositoryKey, options) {
|
|
63
|
+
const enabled = (options?.enabled !== false) && Boolean(repositoryKey);
|
|
64
|
+
return useGitApiQuery({
|
|
65
|
+
...options,
|
|
66
|
+
enabled,
|
|
67
|
+
key: ["linguist", repositoryKey, options?.ref ?? ""],
|
|
68
|
+
load(client, signal) {
|
|
69
|
+
return client.readLinguist(repositoryKey, {
|
|
70
|
+
headers: options?.headers,
|
|
71
|
+
ref: options?.ref,
|
|
72
|
+
signal,
|
|
73
|
+
});
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
function useGitTags(repositoryKey, options) {
|
|
78
|
+
const enabled = (options?.enabled !== false) && Boolean(repositoryKey);
|
|
79
|
+
return useGitApiQuery({
|
|
80
|
+
...options,
|
|
81
|
+
enabled,
|
|
82
|
+
key: ["tags", repositoryKey],
|
|
83
|
+
load(client, signal) {
|
|
84
|
+
return client.listTags(repositoryKey, {
|
|
85
|
+
headers: options?.headers,
|
|
86
|
+
signal,
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function useGitTag(repositoryKey, tagName, options) {
|
|
92
|
+
const enabled = (options?.enabled !== false) && Boolean(repositoryKey) && Boolean(tagName);
|
|
93
|
+
return useGitApiQuery({
|
|
94
|
+
...options,
|
|
95
|
+
enabled,
|
|
96
|
+
key: ["tag", repositoryKey, tagName],
|
|
97
|
+
load(client, signal) {
|
|
98
|
+
return client.readTag(repositoryKey, tagName, {
|
|
99
|
+
headers: options?.headers,
|
|
100
|
+
signal,
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
}
|
|
60
105
|
function useGitTree(repositoryKey, options) {
|
|
61
106
|
const enabled = (options?.enabled !== false) && Boolean(repositoryKey);
|
|
62
107
|
return useGitApiQuery({
|
|
63
108
|
...options,
|
|
64
109
|
enabled,
|
|
65
|
-
key: [
|
|
110
|
+
key: [
|
|
111
|
+
"tree",
|
|
112
|
+
repositoryKey,
|
|
113
|
+
options?.path ?? "",
|
|
114
|
+
options?.ref ?? "",
|
|
115
|
+
options?.recursive === true,
|
|
116
|
+
options?.linguist === true,
|
|
117
|
+
options?.icons === true,
|
|
118
|
+
],
|
|
66
119
|
load(client, signal) {
|
|
67
120
|
return client.listTree(repositoryKey, {
|
|
68
121
|
headers: options?.headers,
|
|
122
|
+
icons: options?.icons,
|
|
123
|
+
linguist: options?.linguist,
|
|
69
124
|
path: options?.path,
|
|
70
125
|
recursive: options?.recursive,
|
|
71
126
|
ref: options?.ref,
|
|
@@ -90,6 +145,22 @@ function useGitBlob(repositoryKey, options) {
|
|
|
90
145
|
},
|
|
91
146
|
});
|
|
92
147
|
}
|
|
148
|
+
function useGitBlame(repositoryKey, options) {
|
|
149
|
+
const enabled = (options.enabled !== false) && Boolean(repositoryKey) && Boolean(options.path);
|
|
150
|
+
return useGitApiQuery({
|
|
151
|
+
...options,
|
|
152
|
+
enabled,
|
|
153
|
+
key: ["blame", repositoryKey, options.path, options.ref ?? ""],
|
|
154
|
+
load(client, signal) {
|
|
155
|
+
return client.readBlame(repositoryKey, {
|
|
156
|
+
headers: options.headers,
|
|
157
|
+
path: options.path,
|
|
158
|
+
ref: options.ref,
|
|
159
|
+
signal,
|
|
160
|
+
});
|
|
161
|
+
},
|
|
162
|
+
});
|
|
163
|
+
}
|
|
93
164
|
function useGitDiff(repositoryKey, options) {
|
|
94
165
|
const enabled = (options.enabled !== false)
|
|
95
166
|
&& Boolean(repositoryKey)
|
|
@@ -98,16 +169,63 @@ function useGitDiff(repositoryKey, options) {
|
|
|
98
169
|
return useGitApiQuery({
|
|
99
170
|
...options,
|
|
100
171
|
enabled,
|
|
101
|
-
key: ["diff", repositoryKey, options.baseRef, options.headRef],
|
|
172
|
+
key: ["diff", repositoryKey, options.baseRef, options.headRef, options.path ?? ""],
|
|
102
173
|
load(client, signal) {
|
|
103
174
|
return client.diff(repositoryKey, {
|
|
104
175
|
baseRef: options.baseRef,
|
|
105
176
|
headRef: options.headRef,
|
|
106
177
|
headers: options.headers,
|
|
178
|
+
path: options.path,
|
|
179
|
+
signal,
|
|
180
|
+
});
|
|
181
|
+
},
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function useGitSearch(repositoryKey, options) {
|
|
185
|
+
const enabled = (options.enabled !== false) && Boolean(repositoryKey) && Boolean(options.query);
|
|
186
|
+
return useGitApiQuery({
|
|
187
|
+
...options,
|
|
188
|
+
enabled,
|
|
189
|
+
key: [
|
|
190
|
+
"search",
|
|
191
|
+
repositoryKey,
|
|
192
|
+
options.query,
|
|
193
|
+
options.ref ?? "",
|
|
194
|
+
options.path ?? "",
|
|
195
|
+
options.caseSensitive === true,
|
|
196
|
+
options.regexp === true,
|
|
197
|
+
options.limit ?? null,
|
|
198
|
+
],
|
|
199
|
+
load(client, signal) {
|
|
200
|
+
return client.search(repositoryKey, {
|
|
201
|
+
caseSensitive: options.caseSensitive,
|
|
202
|
+
headers: options.headers,
|
|
203
|
+
limit: options.limit,
|
|
204
|
+
path: options.path,
|
|
205
|
+
query: options.query,
|
|
206
|
+
ref: options.ref,
|
|
207
|
+
regexp: options.regexp,
|
|
208
|
+
signal,
|
|
209
|
+
});
|
|
210
|
+
},
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
function useGitArchive(repositoryKey, options) {
|
|
214
|
+
const enabled = (options?.enabled !== false) && Boolean(repositoryKey);
|
|
215
|
+
return useGitApiQuery({
|
|
216
|
+
...options,
|
|
217
|
+
enabled,
|
|
218
|
+
key: ["archive", repositoryKey, options?.ref ?? "", options?.format ?? "tar", options?.prefix ?? ""],
|
|
219
|
+
load(client, signal) {
|
|
220
|
+
return client.readArchive(repositoryKey, {
|
|
221
|
+
format: options?.format,
|
|
222
|
+
headers: options?.headers,
|
|
223
|
+
prefix: options?.prefix,
|
|
224
|
+
ref: options?.ref,
|
|
107
225
|
signal,
|
|
108
226
|
});
|
|
109
227
|
},
|
|
110
228
|
});
|
|
111
229
|
}
|
|
112
|
-
export { useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitRepositorySummary, useGitTree, };
|
|
230
|
+
export { useGitArchive, useGitBlame, useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitLinguist, useGitRepositorySummary, useGitSearch, useGitTag, useGitTags, useGitTree, };
|
|
113
231
|
//# sourceMappingURL=resources.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../src/react/hooks/resources.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resources.js","sourceRoot":"","sources":["../../../src/react/hooks/resources.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAiB5C,SAAS,uBAAuB,CAC9B,aAAqB,EACrB,OAAwC;IAExC,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,OAAO,KAAK,KAAK,CAAC,IAAI,OAAO,CAAC,aAAa,CAAC,CAAC;IACvE,OAAO,cAAc,CAAC;QACpB,GAAG,OAAO;QACV,OAAO;QACP,GAAG,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,WAAW,IAAI,IAAI,CAAC;QAC7D,IAAI,CAAC,MAAM,EAAE,MAAM;YACjB,OAAO,MAAM,CAAC,WAAW,CAAC,aAAa,EAAE;gBACvC,WAAW,EAAE,OAAO,EAAE,WAAW;gBACjC,OAAO,EAAE,OAAO,EAAE,OAAO;gBACzB,MAAM;aACP,CAAC,CAAC;QACL,CAAC;KACF,CAA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;AAED,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,GACX,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import type { GitBlob, GitBranchSummary, GitCommitDetail, GitCommitSummary, GitCompareSummary, GitRepositorySummary, GitTreeEntry } from "../../types.js";
|
|
2
|
+
import type { GitArchive, GitBlame, GitBlob, GitBranchSummary, GitTagDetail, GitTagSummary, GitCommitDetail, GitCommitSummary, GitCompareSummary, GitRepositoryLinguist, GitRepositorySummary, GitSearchResult, GitTreeEntry } from "../../types.js";
|
|
3
3
|
import type { GitApiClient, GitApiClientHeaders } from "../client.js";
|
|
4
4
|
type GitApiClientProviderProps = {
|
|
5
5
|
children?: ReactNode;
|
|
@@ -22,12 +22,25 @@ type UseGitRepositorySummaryOptions = GitApiQueryOptions<GitRepositorySummary> &
|
|
|
22
22
|
};
|
|
23
23
|
type UseGitCommitsOptions = GitApiQueryOptions<GitCommitSummary[]> & {
|
|
24
24
|
limit?: number;
|
|
25
|
+
path?: string;
|
|
26
|
+
ref?: string;
|
|
27
|
+
};
|
|
28
|
+
type UseGitLinguistOptions = GitApiQueryOptions<GitRepositoryLinguist> & {
|
|
29
|
+
ref?: string;
|
|
25
30
|
};
|
|
31
|
+
type UseGitTagsOptions = GitApiQueryOptions<GitTagSummary[]>;
|
|
32
|
+
type UseGitTagOptions = GitApiQueryOptions<GitTagDetail>;
|
|
26
33
|
type UseGitTreeOptions = GitApiQueryOptions<GitTreeEntry[]> & {
|
|
34
|
+
icons?: boolean;
|
|
35
|
+
linguist?: boolean;
|
|
27
36
|
path?: string;
|
|
28
37
|
recursive?: boolean;
|
|
29
38
|
ref?: string;
|
|
30
39
|
};
|
|
40
|
+
type UseGitBlameOptions = GitApiQueryOptions<GitBlame> & {
|
|
41
|
+
path: string;
|
|
42
|
+
ref?: string;
|
|
43
|
+
};
|
|
31
44
|
type UseGitBlobOptions = GitApiQueryOptions<GitBlob> & {
|
|
32
45
|
path: string;
|
|
33
46
|
ref?: string;
|
|
@@ -35,6 +48,20 @@ type UseGitBlobOptions = GitApiQueryOptions<GitBlob> & {
|
|
|
35
48
|
type UseGitDiffOptions = GitApiQueryOptions<GitCompareSummary> & {
|
|
36
49
|
baseRef: string;
|
|
37
50
|
headRef: string;
|
|
51
|
+
path?: string;
|
|
52
|
+
};
|
|
53
|
+
type UseGitSearchOptions = GitApiQueryOptions<GitSearchResult> & {
|
|
54
|
+
caseSensitive?: boolean;
|
|
55
|
+
limit?: number;
|
|
56
|
+
path?: string;
|
|
57
|
+
query: string;
|
|
58
|
+
ref?: string;
|
|
59
|
+
regexp?: boolean;
|
|
60
|
+
};
|
|
61
|
+
type UseGitArchiveOptions = GitApiQueryOptions<GitArchive> & {
|
|
62
|
+
format?: "tar" | "zip";
|
|
63
|
+
prefix?: string;
|
|
64
|
+
ref?: string;
|
|
38
65
|
};
|
|
39
|
-
export type { GitApiClientProviderProps, GitApiQueryOptions, GitApiQueryResult, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitRepositorySummaryOptions, UseGitTreeOptions, GitBranchSummary, GitCommitDetail, GitRepositorySummary, GitCommitSummary, GitTreeEntry, GitBlob, GitCompareSummary, };
|
|
66
|
+
export type { GitApiClientProviderProps, GitArchive, GitApiQueryOptions, GitApiQueryResult, UseGitArchiveOptions, UseGitBlameOptions, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitLinguistOptions, UseGitRepositorySummaryOptions, UseGitSearchOptions, UseGitTagOptions, UseGitTagsOptions, UseGitTreeOptions, GitBlame, GitBranchSummary, GitCommitDetail, GitRepositoryLinguist, GitRepositorySummary, GitCommitSummary, GitTagDetail, GitTagSummary, GitTreeEntry, GitBlob, GitCompareSummary, GitSearchResult, };
|
|
40
67
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EACV,OAAO,EACP,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,YAAY,EACb,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,YAAY,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEtE,KAAK,yBAAyB,GAAG;IAC/B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF,KAAK,kBAAkB,CAAC,KAAK,IAAI;IAC/B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,WAAW,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,KAAK,iBAAiB,CAAC,KAAK,IAAI;IAC9B,IAAI,EAAE,KAAK,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB,CAAC;AAEF,KAAK,8BAA8B,GAAG,kBAAkB,CAAC,oBAAoB,CAAC,GAAG;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,KAAK,oBAAoB,GAAG,kBAAkB,CAAC,gBAAgB,EAAE,CAAC,GAAG;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE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E,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,YAAY,EACV,yBAAyB,EACzB,UAAU,EACV,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,8BAA8B,EAC9B,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,EACjB,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,YAAY,EACZ,OAAO,EACP,iBAAiB,EACjB,eAAe,GAChB,CAAC"}
|
package/dist/react/hooks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { GitApiClientProvider, useGitApiClient, useGitApiQuery } from "./hooks/query.js";
|
|
2
|
-
export { useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitRepositorySummary, useGitTree, } from "./hooks/resources.js";
|
|
3
|
-
export type { GitApiClientProviderProps, GitApiQueryOptions, GitApiQueryResult, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitRepositorySummaryOptions, UseGitTreeOptions, } from "./hooks/types.js";
|
|
2
|
+
export { useGitArchive, useGitBlame, useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitLinguist, useGitRepositorySummary, useGitSearch, useGitTag, useGitTags, useGitTree, } from "./hooks/resources.js";
|
|
3
|
+
export type { GitApiClientProviderProps, GitApiQueryOptions, GitApiQueryResult, UseGitArchiveOptions, UseGitBlameOptions, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitLinguistOptions, UseGitRepositorySummaryOptions, UseGitSearchOptions, UseGitTagOptions, UseGitTagsOptions, UseGitTreeOptions, } from "./hooks/types.js";
|
|
4
4
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/react/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,8BAA8B,EAC9B,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/react/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC;AAE9B,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,8BAA8B,EAC9B,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC"}
|
package/dist/react/hooks.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { GitApiClientProvider, useGitApiClient, useGitApiQuery } from "./hooks/query.js";
|
|
2
|
-
export { useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitRepositorySummary, useGitTree, } from "./hooks/resources.js";
|
|
2
|
+
export { useGitArchive, useGitBlame, useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitLinguist, useGitRepositorySummary, useGitSearch, useGitTag, useGitTags, useGitTree, } from "./hooks/resources.js";
|
|
3
3
|
//# sourceMappingURL=hooks.js.map
|
package/dist/react/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/react/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EACL,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,UAAU,GACX,MAAM,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"hooks.js","sourceRoot":"","sources":["../../src/react/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACzF,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,GACX,MAAM,sBAAsB,CAAC"}
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { GitApiClientError, createGitApiClient } from "./client.js";
|
|
2
|
-
export { GitApiClientProvider, useGitApiClient, useGitApiQuery, useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitRepositorySummary, useGitTree, } from "./hooks.js";
|
|
2
|
+
export { GitApiClientProvider, useGitApiClient, useGitApiQuery, useGitArchive, useGitBlame, useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitLinguist, useGitRepositorySummary, useGitSearch, useGitTag, useGitTags, useGitTree, } from "./hooks.js";
|
|
3
3
|
export type { CreateGitApiClientOptions, GitApiClient, GitApiClientFetch, GitApiClientHeaders, GitApiClientRequestOptions, GitApiFailureResponse, GitApiHeaderResolver, GitApiResponse, GitApiSuccessResponse, } from "./client.js";
|
|
4
|
-
export type { GitApiClientProviderProps, GitApiQueryOptions, GitApiQueryResult, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitRepositorySummaryOptions, UseGitTreeOptions, } from "./hooks.js";
|
|
4
|
+
export type { GitApiClientProviderProps, GitApiQueryOptions, GitApiQueryResult, UseGitArchiveOptions, UseGitBlameOptions, UseGitBlobOptions, UseGitCommitsOptions, UseGitDiffOptions, UseGitLinguistOptions, UseGitRepositorySummaryOptions, UseGitSearchOptions, UseGitTagOptions, UseGitTagsOptions, UseGitTreeOptions, } from "./hooks.js";
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,UAAU,GACX,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,yBAAyB,EACzB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,8BAA8B,EAC9B,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,aAAa,EACb,WAAW,EACX,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,GACX,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,yBAAyB,EACzB,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACnB,0BAA0B,EAC1B,qBAAqB,EACrB,oBAAoB,EACpB,cAAc,EACd,qBAAqB,GACtB,MAAM,aAAa,CAAC;AACrB,YAAY,EACV,yBAAyB,EACzB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACrB,8BAA8B,EAC9B,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
|
package/dist/react/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { GitApiClientError, createGitApiClient } from "./client.js";
|
|
2
|
-
export { GitApiClientProvider, useGitApiClient, useGitApiQuery, useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitRepositorySummary, useGitTree, } from "./hooks.js";
|
|
2
|
+
export { GitApiClientProvider, useGitApiClient, useGitApiQuery, useGitArchive, useGitBlame, useGitBlob, useGitBranches, useGitCommit, useGitCommits, useGitDiff, useGitLinguist, useGitRepositorySummary, useGitSearch, useGitTag, useGitTags, useGitTree, } from "./hooks.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/react/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,uBAAuB,EACvB,UAAU,GACX,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,aAAa,EACb,WAAW,EACX,UAAU,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,UAAU,EACV,cAAc,EACd,uBAAuB,EACvB,YAAY,EACZ,SAAS,EACT,UAAU,EACV,UAAU,GACX,MAAM,YAAY,CAAC"}
|
package/dist/types/host.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { GitActor, GitHostLogger, MaybePromise } from "./common.js";
|
|
2
|
-
import type { GitBlob, GitBranchSummary, GitCommitDetail, GitCommitSummary, GitCompareSummary, GitFileContent, GitRepositoryHandle, GitRepositorySummary, GitTreeEntry, GitWorkingTree } from "./repository.js";
|
|
2
|
+
import type { GitArchive, GitArchiveFormat, GitBlame, GitBlob, GitBranchSummary, GitTagDetail, GitTagSummary, GitCommitDetail, GitCommitSummary, GitCompareSummary, GitFileContent, GitRepositoryHandle, GitRepositoryLinguist, GitRepositorySummary, GitSearchResult, GitTreeEntry, GitWorkingTree } from "./repository.js";
|
|
3
3
|
type BuildGitEnvOptions = {
|
|
4
4
|
actor?: GitActor | null;
|
|
5
5
|
extraEnv?: Record<string, string>;
|
|
@@ -36,6 +36,8 @@ type ReadSummaryOptions = {
|
|
|
36
36
|
};
|
|
37
37
|
type ListCommitsOptions = {
|
|
38
38
|
limit?: number;
|
|
39
|
+
path?: string;
|
|
40
|
+
ref?: string;
|
|
39
41
|
};
|
|
40
42
|
type CreateBranchInput = {
|
|
41
43
|
checkout?: boolean;
|
|
@@ -53,6 +55,15 @@ type DeleteBranchInput = {
|
|
|
53
55
|
force?: boolean;
|
|
54
56
|
name?: string;
|
|
55
57
|
};
|
|
58
|
+
type CreateTagInput = {
|
|
59
|
+
actor?: GitActor;
|
|
60
|
+
message?: string;
|
|
61
|
+
name?: string;
|
|
62
|
+
ref?: string;
|
|
63
|
+
};
|
|
64
|
+
type DeleteTagInput = {
|
|
65
|
+
name?: string;
|
|
66
|
+
};
|
|
56
67
|
type StagePathsInput = {
|
|
57
68
|
paths?: string | string[];
|
|
58
69
|
};
|
|
@@ -70,11 +81,50 @@ type CommitInput = {
|
|
|
70
81
|
type ContinueOperationInput = {
|
|
71
82
|
actor?: GitActor;
|
|
72
83
|
};
|
|
84
|
+
type MergeInput = {
|
|
85
|
+
actor?: GitActor;
|
|
86
|
+
ffOnly?: boolean;
|
|
87
|
+
noCommit?: boolean;
|
|
88
|
+
ref?: string;
|
|
89
|
+
};
|
|
90
|
+
type RebaseInput = {
|
|
91
|
+
actor?: GitActor;
|
|
92
|
+
onto?: string;
|
|
93
|
+
ref?: string;
|
|
94
|
+
};
|
|
95
|
+
type CherryPickInput = {
|
|
96
|
+
actor?: GitActor;
|
|
97
|
+
mainline?: number;
|
|
98
|
+
noCommit?: boolean;
|
|
99
|
+
refs?: string | string[];
|
|
100
|
+
};
|
|
73
101
|
type ListTreeOptions = {
|
|
102
|
+
icons?: boolean;
|
|
103
|
+
linguist?: boolean;
|
|
74
104
|
path?: string;
|
|
75
105
|
recursive?: boolean;
|
|
76
106
|
ref?: string;
|
|
77
107
|
};
|
|
108
|
+
type ReadLinguistOptions = {
|
|
109
|
+
ref?: string;
|
|
110
|
+
};
|
|
111
|
+
type ReadBlameOptions = {
|
|
112
|
+
path?: string;
|
|
113
|
+
ref?: string;
|
|
114
|
+
};
|
|
115
|
+
type SearchRepositoryOptions = {
|
|
116
|
+
caseSensitive?: boolean;
|
|
117
|
+
limit?: number;
|
|
118
|
+
path?: string;
|
|
119
|
+
query?: string;
|
|
120
|
+
ref?: string;
|
|
121
|
+
regexp?: boolean;
|
|
122
|
+
};
|
|
123
|
+
type ReadArchiveOptions = {
|
|
124
|
+
format?: GitArchiveFormat;
|
|
125
|
+
prefix?: string;
|
|
126
|
+
ref?: string;
|
|
127
|
+
};
|
|
78
128
|
type ReadBlobOptions = {
|
|
79
129
|
path?: string;
|
|
80
130
|
ref?: string;
|
|
@@ -85,6 +135,7 @@ type ReadWorkingTreeFileOptions = {
|
|
|
85
135
|
type DiffOptions = {
|
|
86
136
|
baseRef?: string;
|
|
87
137
|
headRef?: string;
|
|
138
|
+
path?: string;
|
|
88
139
|
};
|
|
89
140
|
type FetchOptions = GitRemoteTransportOptions & {
|
|
90
141
|
prune?: boolean;
|
|
@@ -109,27 +160,38 @@ type PushOptions = GitRemoteTransportOptions & {
|
|
|
109
160
|
};
|
|
110
161
|
type GitHost = {
|
|
111
162
|
abortOperation(repositoryId: string): Promise<GitRepositorySummary>;
|
|
163
|
+
cherryPick(repositoryId: string, input: CherryPickInput): Promise<GitRepositorySummary>;
|
|
112
164
|
checkoutBranch(repositoryId: string, input: CheckoutBranchInput): Promise<GitRepositorySummary>;
|
|
113
165
|
checkoutRef(repositoryId: string, input: CheckoutRefInput): Promise<GitRepositorySummary>;
|
|
114
166
|
commit(repositoryId: string, input: CommitInput): Promise<GitRepositorySummary>;
|
|
115
167
|
continueOperation(repositoryId: string, input?: ContinueOperationInput): Promise<GitRepositorySummary>;
|
|
116
168
|
createBranch(repositoryId: string, input: CreateBranchInput): Promise<GitRepositorySummary>;
|
|
169
|
+
createTag(repositoryId: string, input: CreateTagInput): Promise<GitTagDetail>;
|
|
117
170
|
deleteBranch(repositoryId: string, input: DeleteBranchInput): Promise<GitRepositorySummary>;
|
|
171
|
+
deleteTag(repositoryId: string, input: DeleteTagInput): Promise<void>;
|
|
118
172
|
discardPaths(repositoryId: string, input?: DiscardPathsInput): Promise<GitRepositorySummary>;
|
|
119
173
|
diff(repositoryId: string, options: DiffOptions): Promise<GitCompareSummary>;
|
|
120
174
|
ensureRepository(repositoryId: string, options?: EnsureRepositoryOptions): Promise<GitRepositorySummary>;
|
|
121
175
|
fetch(repositoryId: string, options?: FetchOptions): Promise<GitRepositorySummary>;
|
|
122
176
|
listBranches(repositoryId: string): Promise<GitBranchSummary[]>;
|
|
123
177
|
listCommits(repositoryId: string, options?: ListCommitsOptions): Promise<GitCommitSummary[]>;
|
|
178
|
+
listTags(repositoryId: string): Promise<GitTagSummary[]>;
|
|
124
179
|
listTree(repositoryId: string, options?: ListTreeOptions): Promise<GitTreeEntry[]>;
|
|
180
|
+
merge(repositoryId: string, input: MergeInput): Promise<GitRepositorySummary>;
|
|
125
181
|
pull(repositoryId: string, options?: PullOptions): Promise<GitRepositorySummary>;
|
|
126
182
|
push(repositoryId: string, options?: PushOptions): Promise<GitRepositorySummary>;
|
|
183
|
+
readArchive(repositoryId: string, options?: ReadArchiveOptions): Promise<GitArchive>;
|
|
184
|
+
readBlame(repositoryId: string, options: ReadBlameOptions): Promise<GitBlame>;
|
|
127
185
|
readBlob(repositoryId: string, options: ReadBlobOptions): Promise<GitBlob>;
|
|
128
186
|
readCommit(repositoryId: string, commitRef: string): Promise<GitCommitDetail>;
|
|
187
|
+
readLinguist(repositoryId: string, options?: ReadLinguistOptions): Promise<GitRepositoryLinguist>;
|
|
188
|
+
readTag(repositoryId: string, tagName: string): Promise<GitTagDetail>;
|
|
129
189
|
readStagedFile(repositoryId: string, options: ReadWorkingTreeFileOptions): Promise<GitFileContent>;
|
|
130
190
|
readSummary(repositoryId: string, options?: ReadSummaryOptions): Promise<GitRepositorySummary>;
|
|
131
191
|
readUnstagedFile(repositoryId: string, options: ReadWorkingTreeFileOptions): Promise<GitFileContent>;
|
|
132
192
|
readWorkingTree(repositoryId: string): Promise<GitWorkingTree>;
|
|
193
|
+
rebase(repositoryId: string, input: RebaseInput): Promise<GitRepositorySummary>;
|
|
194
|
+
search(repositoryId: string, options: SearchRepositoryOptions): Promise<GitSearchResult>;
|
|
133
195
|
stagePaths(repositoryId: string, input?: StagePathsInput): Promise<GitRepositorySummary>;
|
|
134
196
|
unstagePaths(repositoryId: string, input?: UnstagePathsInput): Promise<GitRepositorySummary>;
|
|
135
197
|
withRepositoryLock<T>(repositoryId: string, operation: () => Promise<T>): Promise<T>;
|
|
@@ -138,5 +200,5 @@ type ResolveRepositoryPathOptions = {
|
|
|
138
200
|
repositoryPath: string;
|
|
139
201
|
rootDir: string;
|
|
140
202
|
};
|
|
141
|
-
export type { BuildGitEnvOptions, CheckoutBranchInput, CheckoutRefInput, CommitInput, ContinueOperationInput, CreateBranchInput, CreateGitHostOptions, DeleteBranchInput, DiffOptions, DiscardPathsInput, EnsureRepositoryOptions, FetchOptions, GitHost, GitRemoteCredentials, GitRemoteTransportOptions, ListCommitsOptions, ListTreeOptions, PullOptions, PushOptions, ReadBlobOptions, ReadSummaryOptions, ReadWorkingTreeFileOptions, ResolveRepositoryPathOptions, StagePathsInput, UnstagePathsInput, };
|
|
203
|
+
export type { BuildGitEnvOptions, CherryPickInput, CheckoutBranchInput, CheckoutRefInput, CommitInput, ContinueOperationInput, CreateBranchInput, CreateGitHostOptions, CreateTagInput, DeleteBranchInput, DeleteTagInput, DiffOptions, DiscardPathsInput, EnsureRepositoryOptions, FetchOptions, GitHost, GitRemoteCredentials, GitRemoteTransportOptions, ListCommitsOptions, ListTreeOptions, MergeInput, PullOptions, PushOptions, ReadArchiveOptions, ReadBlameOptions, ReadBlobOptions, ReadLinguistOptions, ReadSummaryOptions, ReadWorkingTreeFileOptions, RebaseInput, ResolveRepositoryPathOptions, SearchRepositoryOptions, StagePathsInput, UnstagePathsInput, };
|
|
142
204
|
//# sourceMappingURL=host.d.ts.map
|