browser-git-ops 0.0.2 → 0.0.5
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/README.md +291 -92
- package/dist/git/abstractAdapter.d.ts +167 -0
- package/dist/git/abstractAdapter.d.ts.map +1 -0
- package/dist/git/adapter.d.ts +23 -1
- package/dist/git/adapter.d.ts.map +1 -1
- package/dist/git/githubAdapter.d.ts +282 -35
- package/dist/git/githubAdapter.d.ts.map +1 -1
- package/dist/git/gitlabAdapter.d.ts +220 -34
- package/dist/git/gitlabAdapter.d.ts.map +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6199 -792
- package/dist/index.js.map +4 -4
- package/dist/index.mjs +6199 -792
- package/dist/index.mjs.map +4 -4
- package/dist/virtualfs/changeTracker.d.ts +66 -0
- package/dist/virtualfs/changeTracker.d.ts.map +1 -0
- package/dist/virtualfs/conflictManager.d.ts +69 -0
- package/dist/virtualfs/conflictManager.d.ts.map +1 -0
- package/dist/virtualfs/hashUtils.d.ts +13 -0
- package/dist/virtualfs/hashUtils.d.ts.map +1 -0
- package/dist/virtualfs/indexManager.d.ts +57 -0
- package/dist/virtualfs/indexManager.d.ts.map +1 -0
- package/dist/virtualfs/indexedDatabaseStorage.d.ts +7 -0
- package/dist/virtualfs/indexedDatabaseStorage.d.ts.map +1 -0
- package/dist/virtualfs/inmemoryStorage.d.ts +8 -0
- package/dist/virtualfs/inmemoryStorage.d.ts.map +1 -0
- package/dist/virtualfs/localChangeApplier.d.ts +21 -0
- package/dist/virtualfs/localChangeApplier.d.ts.map +1 -0
- package/dist/virtualfs/localFileManager.d.ts +58 -0
- package/dist/virtualfs/localFileManager.d.ts.map +1 -0
- package/dist/virtualfs/metadataManager.d.ts +14 -0
- package/dist/virtualfs/metadataManager.d.ts.map +1 -0
- package/dist/virtualfs/opfsStorage.d.ts +2 -63
- package/dist/virtualfs/opfsStorage.d.ts.map +1 -1
- package/dist/virtualfs/remoteSynchronizer.d.ts +192 -0
- package/dist/virtualfs/remoteSynchronizer.d.ts.map +1 -0
- package/dist/virtualfs/storageBackend.d.ts +57 -4
- package/dist/virtualfs/storageBackend.d.ts.map +1 -1
- package/dist/virtualfs/types.d.ts +37 -0
- package/dist/virtualfs/types.d.ts.map +1 -1
- package/dist/virtualfs/virtualfs.d.ts +454 -87
- package/dist/virtualfs/virtualfs.d.ts.map +1 -1
- package/package.json +30 -13
- package/dist/virtualfs/indexedDbStorage.d.ts +0 -62
- package/dist/virtualfs/indexedDbStorage.d.ts.map +0 -1
|
@@ -1,50 +1,297 @@
|
|
|
1
|
-
import { GitAdapter } from './adapter';
|
|
1
|
+
import { GitAdapter } from './adapter.ts';
|
|
2
|
+
import AbstractGitAdapter, { fetchWithRetry, classifyStatus, getDelayForResponse, processResponseWithDelay, mapWithConcurrency, shaOf } from './abstractAdapter.ts';
|
|
2
3
|
type GHOptions = {
|
|
3
4
|
owner: string;
|
|
4
5
|
repo: string;
|
|
5
6
|
token: string;
|
|
7
|
+
host?: string;
|
|
6
8
|
};
|
|
7
9
|
/**
|
|
8
|
-
*
|
|
10
|
+
* GitHub 向けの `GitAdapter` 実装。
|
|
11
|
+
* GitHub API をラップしてリポジトリ操作(コミット作成、ブランチ一覧、ファイル取得等)を提供します。
|
|
9
12
|
*/
|
|
10
|
-
export declare class
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* リトライ不可能なエラー。
|
|
14
|
-
*/
|
|
15
|
-
export declare class NonRetryableError extends Error {
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* fetch を再試行付きで実行するユーティリティ。
|
|
19
|
-
* 5xx や 429 はリトライ対象、それ以外は NonRetryableError を投げる。
|
|
20
|
-
* @param input RequestInfo
|
|
21
|
-
* @param init RequestInit
|
|
22
|
-
* @param attempts 試行回数
|
|
23
|
-
* @param baseDelay ベースの遅延(ms)
|
|
24
|
-
*/
|
|
25
|
-
declare function fetchWithRetry(input: RequestInfo, init: RequestInit, attempts?: number, baseDelay?: number): Promise<Response>;
|
|
26
|
-
declare function classifyStatus(status: number): boolean;
|
|
27
|
-
declare function getDelayForResponse(res: Response | null, i: number, baseDelay: number): number;
|
|
28
|
-
declare function processResponseWithDelay(res: Response, i: number, baseDelay: number): Promise<Response>;
|
|
29
|
-
/**
|
|
30
|
-
* 非同期マップを並列実行するユーティリティ
|
|
31
|
-
* @param items 入力配列
|
|
32
|
-
* @param mapper マッピング関数
|
|
33
|
-
* @param concurrency 同時実行数
|
|
34
|
-
*/
|
|
35
|
-
declare function mapWithConcurrency<T, R>(items: T[], mapper: (_t: T) => Promise<R>, concurrency?: number): Promise<R[]>;
|
|
36
|
-
export declare class GitHubAdapter implements GitAdapter {
|
|
37
|
-
private opts;
|
|
38
|
-
private baseUrl;
|
|
39
|
-
private headers;
|
|
13
|
+
export declare class GitHubAdapter extends AbstractGitAdapter implements GitAdapter {
|
|
40
14
|
private _fetchWithRetry;
|
|
15
|
+
private repoMetadata;
|
|
41
16
|
private blobCache;
|
|
42
|
-
|
|
17
|
+
/**
|
|
18
|
+
* GitHubAdapter を初期化します。
|
|
19
|
+
* @param {GHOptions} opts 設定オブジェクト
|
|
20
|
+
*/
|
|
21
|
+
constructor(options: GHOptions);
|
|
22
|
+
/**
|
|
23
|
+
* List commits for a ref (GitHub commits API)
|
|
24
|
+
* @param {{ref:string,perPage?:number,page?:number}} query
|
|
25
|
+
* @returns {Promise<import('./adapter').CommitHistoryPage>} ページ情報を返します
|
|
26
|
+
*/
|
|
27
|
+
listCommits(query: {
|
|
28
|
+
ref: string;
|
|
29
|
+
perPage?: number;
|
|
30
|
+
page?: number;
|
|
31
|
+
}): Promise<{
|
|
32
|
+
items: {
|
|
33
|
+
sha: any;
|
|
34
|
+
message: any;
|
|
35
|
+
author: any;
|
|
36
|
+
date: any;
|
|
37
|
+
parents: any;
|
|
38
|
+
}[];
|
|
39
|
+
nextPage: number | undefined;
|
|
40
|
+
lastPage: number | undefined;
|
|
41
|
+
}>;
|
|
42
|
+
/**
|
|
43
|
+
* 応答テキストを JSON 配列として解析します(失敗時は空配列を返す)。
|
|
44
|
+
* @param {string} text 応答テキスト
|
|
45
|
+
* @returns {any[]}
|
|
46
|
+
*/
|
|
47
|
+
private _parseJsonArray;
|
|
48
|
+
/**
|
|
49
|
+
* GitHub の Link ヘッダを解析して next/last ページを返します。
|
|
50
|
+
* @param {string|undefined} linkHdr Link ヘッダ文字列
|
|
51
|
+
* @returns {{nextPage?: number, lastPage?: number}} ページ番号情報
|
|
52
|
+
*/
|
|
53
|
+
private _parseLinkHeaderString;
|
|
54
|
+
/**
|
|
55
|
+
* Map a raw GitHub commit object to CommitSummary shape used by the adapter.
|
|
56
|
+
* @param {any} c Raw commit object
|
|
57
|
+
* @returns {import('./adapter').CommitSummary}
|
|
58
|
+
*/
|
|
59
|
+
private _mapGithubCommitToSummary;
|
|
60
|
+
/**
|
|
61
|
+
* ブロブを作成またはキャッシュから取得します。
|
|
62
|
+
* @param {any[]} changes 変更一覧(create/update を含む)
|
|
63
|
+
* @param {number} [concurrency=5] 同時実行数
|
|
64
|
+
* @returns {Promise<Record<string,string>>} パス→blobSha のマップ
|
|
65
|
+
*/
|
|
43
66
|
createBlobs(changes: any[], concurrency?: number): Promise<Record<string, string>>;
|
|
67
|
+
/**
|
|
68
|
+
* Create a blob for a change or return cached blobSha.
|
|
69
|
+
* @param {any} ch change entry
|
|
70
|
+
* @returns {Promise<{path:string,sha:string}>}
|
|
71
|
+
*/
|
|
72
|
+
private _createBlobForChange;
|
|
73
|
+
/**
|
|
74
|
+
* 互換用のツリー作成。
|
|
75
|
+
* @param {any[]} changes 変更一覧
|
|
76
|
+
* @param {string} [baseTreeSha] ベースツリー
|
|
77
|
+
* @returns {Promise<string>} 作成されたツリーの sha
|
|
78
|
+
*/
|
|
44
79
|
createTree(changes: any[], baseTreeSha?: string): Promise<string>;
|
|
80
|
+
/**
|
|
81
|
+
* コミットを作成します。
|
|
82
|
+
* @param {string} message コミットメッセージ
|
|
83
|
+
* @param {string} parentSha 親コミット SHA
|
|
84
|
+
* @param {string} treeSha ツリー SHA
|
|
85
|
+
* @returns {Promise<string>} 新規コミット SHA
|
|
86
|
+
*/
|
|
45
87
|
createCommit(message: string, parentSha: string, treeSha: string): Promise<string>;
|
|
46
|
-
|
|
88
|
+
/**
|
|
89
|
+
* Retrieve repository metadata (default branch, name, id) and cache it.
|
|
90
|
+
* @returns {Promise<import('../virtualfs/types.ts').RepositoryMetadata>} repository metadata
|
|
91
|
+
*/
|
|
92
|
+
getRepositoryMetadata(): Promise<import('../virtualfs/types.ts').RepositoryMetadata>;
|
|
93
|
+
/**
|
|
94
|
+
* Build repository metadata object from API response body.
|
|
95
|
+
* @param data API response body
|
|
96
|
+
* @returns {import('../virtualfs/types.ts').RepositoryMetadata}
|
|
97
|
+
*/
|
|
98
|
+
private _makeRepoMetadata;
|
|
99
|
+
/**
|
|
100
|
+
* List branches via GitHub API and map to BranchListPage.
|
|
101
|
+
* @returns {Promise<{items:any[],nextPage?:number,lastPage?:number}>}
|
|
102
|
+
*/
|
|
103
|
+
listBranches(query?: import('../virtualfs/types.ts').BranchListQuery): Promise<{
|
|
104
|
+
items: {
|
|
105
|
+
name: any;
|
|
106
|
+
commit: {
|
|
107
|
+
sha: any;
|
|
108
|
+
url: any;
|
|
109
|
+
};
|
|
110
|
+
protected: boolean;
|
|
111
|
+
isDefault: boolean;
|
|
112
|
+
}[];
|
|
113
|
+
nextPage: number | undefined;
|
|
114
|
+
lastPage: number | undefined;
|
|
115
|
+
}>;
|
|
116
|
+
/**
|
|
117
|
+
* Map raw branch objects returned by API to adapter Branch item shape.
|
|
118
|
+
* @param {any[]} parsed raw branch array
|
|
119
|
+
* @param {any} repoMeta repository metadata
|
|
120
|
+
* @returns {any[]}
|
|
121
|
+
*/
|
|
122
|
+
private _mapBranchItems;
|
|
123
|
+
/**
|
|
124
|
+
* 参照を更新します。
|
|
125
|
+
* @param {string} ref 参照名(例: heads/main)
|
|
126
|
+
* @param {string} commitSha コミット SHA
|
|
127
|
+
* @param {boolean} force 強制更新フラグ
|
|
128
|
+
*/
|
|
129
|
+
updateRef(reference: string, commitSha: string, force?: boolean): Promise<void>;
|
|
130
|
+
/**
|
|
131
|
+
* Create a branch (ref) on the remote repository.
|
|
132
|
+
* @param branchName branch name to create
|
|
133
|
+
* @param fromSha commit sha to point the new branch at
|
|
134
|
+
* @returns {Promise<import('../virtualfs/types.ts').CreateBranchResult>} created branch info
|
|
135
|
+
*/
|
|
136
|
+
createBranch(branchName: string, fromSha: string): Promise<import('../virtualfs/types.ts').CreateBranchResult>;
|
|
137
|
+
/**
|
|
138
|
+
* Normalize common createBranch error messages into thrown NonRetryableError/Error.
|
|
139
|
+
* @param {string} message error message text
|
|
140
|
+
* @param {string} branchName branch attempted
|
|
141
|
+
* @returns {never}
|
|
142
|
+
*/
|
|
143
|
+
private _handleCreateBranchError;
|
|
144
|
+
/**
|
|
145
|
+
* 指定コミットの tree SHA を取得します。
|
|
146
|
+
* @param commitSha コミット SHA
|
|
147
|
+
* @returns {Promise<string>} tree の SHA
|
|
148
|
+
*/
|
|
149
|
+
getCommitTreeSha(commitSha: string): Promise<string>;
|
|
150
|
+
/**
|
|
151
|
+
* 指定 ref の先頭コミット SHA を取得します。
|
|
152
|
+
* @param ref 例: `heads/main`
|
|
153
|
+
* @returns {Promise<string>} 参照先のコミット SHA
|
|
154
|
+
*/
|
|
155
|
+
getRef(reference: string): Promise<string>;
|
|
156
|
+
/**
|
|
157
|
+
* Fetch a ref URL and extract a SHA if present.
|
|
158
|
+
* @param {string} url API URL to fetch
|
|
159
|
+
* @returns {Promise<string|null>} sha string when found, otherwise null
|
|
160
|
+
*/
|
|
161
|
+
private _getRefShaFromUrl;
|
|
162
|
+
/**
|
|
163
|
+
* Determine the head SHA for a branch; fallback to branch name if unavailable.
|
|
164
|
+
* @param {string} branch branch name
|
|
165
|
+
* @returns {Promise<string>} head SHA or branch
|
|
166
|
+
*/
|
|
167
|
+
private _determineHeadSha;
|
|
168
|
+
/**
|
|
169
|
+
* Get commit SHA from the branches API for a branch name.
|
|
170
|
+
* @param {string} branch branch name
|
|
171
|
+
* @returns {Promise<string|null>} commit SHA or null when not found
|
|
172
|
+
*/
|
|
173
|
+
private _getBranchCommitSha;
|
|
174
|
+
/**
|
|
175
|
+
* Get commit SHA from the commits endpoint for a given reference.
|
|
176
|
+
* @param {string} reference commit-ish reference
|
|
177
|
+
* @returns {Promise<string|null>} commit SHA or null when not found
|
|
178
|
+
*/
|
|
179
|
+
private _getCommitEndpointSha;
|
|
180
|
+
/**
|
|
181
|
+
* tree を取得します(必要なら再帰取得)。
|
|
182
|
+
* @param treeSha tree の SHA
|
|
183
|
+
* @param recursive 再帰フラグ
|
|
184
|
+
* @returns {Promise<any[]>} tree の配列
|
|
185
|
+
*/
|
|
186
|
+
getTree(treeSha: string, recursive?: boolean): Promise<any[]>;
|
|
187
|
+
/**
|
|
188
|
+
* blob を取得してデコードして返します。
|
|
189
|
+
* @param blobSha blob の SHA
|
|
190
|
+
* @returns {Promise<{content:string,encoding:string}>} デコード済みコンテンツとエンコーディング
|
|
191
|
+
*/
|
|
192
|
+
getBlob(blobSha: string): Promise<{
|
|
193
|
+
content: any;
|
|
194
|
+
encoding: any;
|
|
195
|
+
}>;
|
|
196
|
+
/**
|
|
197
|
+
* Resolve a commit-ish (branch, tag, or SHA) to a commit SHA.
|
|
198
|
+
* Resolution order: branch -> tag -> commit endpoint -> treat as SHA
|
|
199
|
+
* Throws if resolution fails.
|
|
200
|
+
* @param {string} reference commit-ish to resolve
|
|
201
|
+
* @returns {Promise<string>} resolved commit SHA
|
|
202
|
+
*/
|
|
203
|
+
resolveRef(reference: string): Promise<string>;
|
|
204
|
+
/**
|
|
205
|
+
* Run resolver functions in order and return the first non-null result.
|
|
206
|
+
* @param {string} reference commit-ish to resolve
|
|
207
|
+
* @param {Array<(_reference: string) => Promise<string | null>>} resolvers resolver functions
|
|
208
|
+
* @returns {Promise<string|null>} resolved sha or null
|
|
209
|
+
*/
|
|
210
|
+
private _runResolvers;
|
|
211
|
+
/**
|
|
212
|
+
* Try to resolve a branch name to a commit SHA.
|
|
213
|
+
* @param {string} reference branch name
|
|
214
|
+
* @returns {Promise<string|null>}
|
|
215
|
+
*/
|
|
216
|
+
private _tryResolveByBranch;
|
|
217
|
+
/**
|
|
218
|
+
* Try to resolve a tag name to a commit SHA.
|
|
219
|
+
* @param {string} reference tag name
|
|
220
|
+
* @returns {Promise<string|null>}
|
|
221
|
+
*/
|
|
222
|
+
private _tryResolveByTag;
|
|
223
|
+
/**
|
|
224
|
+
* Try to resolve via commits endpoint (may accept SHA or other forms).
|
|
225
|
+
* @param {string} reference commit-ish
|
|
226
|
+
* @returns {Promise<string|null>}
|
|
227
|
+
*/
|
|
228
|
+
private _tryResolveByCommitEndpoint;
|
|
229
|
+
/**
|
|
230
|
+
* Fetch a blob's content; return null content on failure.
|
|
231
|
+
* @param {any} f blob metadata
|
|
232
|
+
* @returns {Promise<{path:string,content:string|null}>}
|
|
233
|
+
*/
|
|
234
|
+
private _fetchBlobContentOrNull;
|
|
235
|
+
/**
|
|
236
|
+
* Decode a base64 string into UTF-8 text. Uses global Buffer when available,
|
|
237
|
+
* falls back to atob/TextDecoder for browsers.
|
|
238
|
+
* @returns {string} decoded UTF-8 string
|
|
239
|
+
*/
|
|
240
|
+
private _decodeBase64ToString;
|
|
241
|
+
/**
|
|
242
|
+
* Fetch repository snapshot: headSha, shas map and a fetchContent helper.
|
|
243
|
+
* @param {string} branch branch name
|
|
244
|
+
* @param {number} concurrency fetch concurrency
|
|
245
|
+
* @returns {Promise<{headSha:string,shas:Record<string,string>,fetchContent:Function,snapshot:Record<string,string>}>}
|
|
246
|
+
*/
|
|
247
|
+
fetchSnapshot(branch?: string, concurrency?: number): Promise<any>;
|
|
248
|
+
/**
|
|
249
|
+
* Bound helper used to construct the `fetchContent` function returned by `fetchSnapshot`.
|
|
250
|
+
* @param {Map<string, any>} fileMap file metadata map
|
|
251
|
+
* @param {Map<string,string>} contentCache cache map
|
|
252
|
+
* @param {Record<string,string>} snapshot snapshot map to populate
|
|
253
|
+
* @param {number} concurrency concurrency level
|
|
254
|
+
* @param {string[]} paths requested paths
|
|
255
|
+
* @returns {Promise<Record<string,string>>}
|
|
256
|
+
*/
|
|
257
|
+
private _fetchSnapshotForFileMap;
|
|
258
|
+
/**
|
|
259
|
+
* Build file map and shas from a head SHA by fetching the tree.
|
|
260
|
+
* @param {string} headSha head commit SHA
|
|
261
|
+
* @returns {Promise<{shas:Record<string,string>,fileMap:Map<string,any>}>}
|
|
262
|
+
*/
|
|
263
|
+
private _buildFileMapFromHead;
|
|
264
|
+
/**
|
|
265
|
+
* Fetch contents for given paths from a file map with caching and concurrency.
|
|
266
|
+
* @param {Map<string, any>} fileMap map of file metadata
|
|
267
|
+
* @param {Map<string,string>} contentCache cache map
|
|
268
|
+
* @param {Record<string,string>} snapshot output snapshot
|
|
269
|
+
* @param {string[]} paths requested paths
|
|
270
|
+
* @param {number} concurrency concurrency level
|
|
271
|
+
* @returns {Promise<Record<string,string>>}
|
|
272
|
+
*/
|
|
273
|
+
private _fetchContentFromMap;
|
|
274
|
+
/**
|
|
275
|
+
* Mapper used by _fetchContentFromMap when fetching multiple files.
|
|
276
|
+
* @param {Map<string, any>} fileMap file metadata map
|
|
277
|
+
* @param {Map<string,string>} contentCache cache map
|
|
278
|
+
* @param {Record<string,string>} snapshot snapshot map to populate
|
|
279
|
+
* @param {Record<string,string>} out output map to collect results
|
|
280
|
+
* @param {string} p requested path
|
|
281
|
+
* @returns {Promise<null>}
|
|
282
|
+
*/
|
|
283
|
+
private _mapperForFetch;
|
|
284
|
+
/**
|
|
285
|
+
* Fetch single path content, update cache and snapshot.
|
|
286
|
+
* @param {Map<string, any>} fileMap file map
|
|
287
|
+
* @param {Map<string,string>} contentCache cache map
|
|
288
|
+
* @param {Record<string,string>} snapshot snapshot map
|
|
289
|
+
* @param {string} p path to fetch
|
|
290
|
+
* @returns {Promise<string|null>}
|
|
291
|
+
*/
|
|
292
|
+
private _fetchContentForPath;
|
|
47
293
|
}
|
|
48
|
-
export { fetchWithRetry, classifyStatus, getDelayForResponse, processResponseWithDelay, mapWithConcurrency };
|
|
294
|
+
export { fetchWithRetry, classifyStatus, getDelayForResponse, processResponseWithDelay, mapWithConcurrency, shaOf };
|
|
295
|
+
export { RetryableError, NonRetryableError } from './abstractAdapter.ts';
|
|
49
296
|
export default GitHubAdapter;
|
|
50
297
|
//# sourceMappingURL=githubAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"githubAdapter.d.ts","sourceRoot":"","sources":["../../src/git/githubAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"githubAdapter.d.ts","sourceRoot":"","sources":["../../src/git/githubAdapter.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,30 +1,60 @@
|
|
|
1
|
-
import { GitAdapter } from './adapter';
|
|
2
|
-
|
|
1
|
+
import { GitAdapter } from './adapter.ts';
|
|
2
|
+
import AbstractGitAdapter from './abstractAdapter.ts';
|
|
3
|
+
type GLOptions = {
|
|
3
4
|
projectId: string;
|
|
4
5
|
token: string;
|
|
5
6
|
host?: string;
|
|
6
7
|
};
|
|
7
8
|
/**
|
|
8
|
-
*
|
|
9
|
+
* GitLab 向けの GitAdapter 実装です。
|
|
10
|
+
* GitLab の API をラップして、リポジトリスナップショットの取得や
|
|
11
|
+
* commits API の呼び出しをサポートします。
|
|
9
12
|
*/
|
|
10
|
-
export declare class GitLabAdapter implements GitAdapter {
|
|
11
|
-
private opts;
|
|
12
|
-
private baseUrl;
|
|
13
|
-
private headers;
|
|
13
|
+
export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdapter {
|
|
14
14
|
private pendingActions;
|
|
15
|
-
private
|
|
16
|
-
private baseBackoff;
|
|
15
|
+
private projectMetadata;
|
|
17
16
|
/**
|
|
18
17
|
* GitLabAdapter を初期化します。
|
|
19
18
|
* @param {GLOpts} opts 設定オブジェクト
|
|
20
19
|
*/
|
|
21
|
-
constructor(
|
|
20
|
+
constructor(options: GLOptions);
|
|
22
21
|
/**
|
|
23
|
-
*
|
|
24
|
-
* @param {string}
|
|
25
|
-
* @returns {
|
|
22
|
+
* List commits for a ref (GitLab commits API)
|
|
23
|
+
* @param {{ref:string,perPage?:number,page?:number}} query
|
|
24
|
+
* @returns {Promise<import('./adapter').CommitHistoryPage>} ページ情報を返します
|
|
26
25
|
*/
|
|
27
|
-
|
|
26
|
+
listCommits(query: {
|
|
27
|
+
ref: string;
|
|
28
|
+
perPage?: number;
|
|
29
|
+
page?: number;
|
|
30
|
+
}): Promise<{
|
|
31
|
+
items: {
|
|
32
|
+
sha: any;
|
|
33
|
+
message: any;
|
|
34
|
+
author: any;
|
|
35
|
+
date: any;
|
|
36
|
+
parents: any;
|
|
37
|
+
}[];
|
|
38
|
+
nextPage: number | undefined;
|
|
39
|
+
lastPage: number | undefined;
|
|
40
|
+
}>;
|
|
41
|
+
/**
|
|
42
|
+
* 応答テキストを JSON 配列として解析します(失敗時は空配列を返す)。
|
|
43
|
+
* @param {string} text 応答テキスト
|
|
44
|
+
* @returns {any[]}
|
|
45
|
+
*/
|
|
46
|
+
private _parseJsonArray;
|
|
47
|
+
/**
|
|
48
|
+
* GitLab のページングヘッダを解析します(x-next-page / x-total-pages)。
|
|
49
|
+
* @returns {{nextPage?: number, lastPage?: number}} ページ番号情報
|
|
50
|
+
*/
|
|
51
|
+
private _parsePagingHeaders;
|
|
52
|
+
/**
|
|
53
|
+
* Map a raw GitLab commit object to CommitSummary.
|
|
54
|
+
* @param {any} c Raw commit object
|
|
55
|
+
* @returns {import('./adapter').CommitSummary}
|
|
56
|
+
*/
|
|
57
|
+
private _mapGitLabCommitToSummary;
|
|
28
58
|
/**
|
|
29
59
|
* 変更一覧から blob sha のマップを作成します(疑似実装)。
|
|
30
60
|
* @param {any[]} changes 変更一覧
|
|
@@ -46,6 +76,14 @@ export declare class GitLabAdapter implements GitAdapter {
|
|
|
46
76
|
* @returns {Promise<string>} 新規コミット SHA または parentSha
|
|
47
77
|
*/
|
|
48
78
|
createCommit(message: string, parentSha: string, _treeSha: string): Promise<any>;
|
|
79
|
+
/**
|
|
80
|
+
* リファレンス更新は不要なため noop 実装です。
|
|
81
|
+
* @param {string} _ref ref 名
|
|
82
|
+
* @param {string} _commitSha コミット SHA
|
|
83
|
+
* @param {boolean} [_force]
|
|
84
|
+
* @returns {Promise<void>}
|
|
85
|
+
*/
|
|
86
|
+
updateRef(_reference: string, _commitSha: string, _force?: boolean): Promise<void>;
|
|
49
87
|
/**
|
|
50
88
|
* actions を用いて GitLab のコミット API を呼び出します。
|
|
51
89
|
* @param {string} branch ブランチ名
|
|
@@ -57,35 +95,183 @@ export declare class GitLabAdapter implements GitAdapter {
|
|
|
57
95
|
type: string;
|
|
58
96
|
path: string;
|
|
59
97
|
content?: string;
|
|
60
|
-
}
|
|
98
|
+
}>, expectedParentSha?: string): Promise<any>;
|
|
61
99
|
/**
|
|
62
|
-
*
|
|
63
|
-
* @
|
|
64
|
-
* @param {RequestInit} opts fetch オプション
|
|
65
|
-
* @param {number} [retries] 最大リトライ回数
|
|
66
|
-
* @returns {Promise<Response>} レスポンス
|
|
100
|
+
* Retrieve project metadata (default branch, name, id) and cache it.
|
|
101
|
+
* @returns {Promise<import('../virtualfs/types.ts').RepositoryMetadata>} repository metadata
|
|
67
102
|
*/
|
|
68
|
-
|
|
103
|
+
getRepositoryMetadata(): Promise<import('../virtualfs/types.ts').RepositoryMetadata>;
|
|
69
104
|
/**
|
|
70
|
-
*
|
|
71
|
-
* @param
|
|
72
|
-
* @returns {
|
|
105
|
+
* Build project metadata from API response.
|
|
106
|
+
* @param data API response body
|
|
107
|
+
* @returns {import('../virtualfs/types.ts').RepositoryMetadata}
|
|
73
108
|
*/
|
|
74
|
-
private
|
|
109
|
+
private _makeProjectMetadata;
|
|
75
110
|
/**
|
|
76
|
-
*
|
|
77
|
-
* @
|
|
78
|
-
* @returns {number} ミリ秒
|
|
111
|
+
* List branches via GitLab API and map to BranchListPage.
|
|
112
|
+
* @returns {Promise<{items:any[],nextPage?:number,lastPage?:number}>}
|
|
79
113
|
*/
|
|
80
|
-
|
|
114
|
+
listBranches(query?: import('../virtualfs/types.ts').BranchListQuery): Promise<{
|
|
115
|
+
items: {
|
|
116
|
+
name: any;
|
|
117
|
+
commit: {
|
|
118
|
+
sha: any;
|
|
119
|
+
url: any;
|
|
120
|
+
};
|
|
121
|
+
protected: boolean;
|
|
122
|
+
isDefault: boolean;
|
|
123
|
+
}[];
|
|
124
|
+
nextPage: number | undefined;
|
|
125
|
+
lastPage: number | undefined;
|
|
126
|
+
}>;
|
|
81
127
|
/**
|
|
82
|
-
*
|
|
83
|
-
* @param
|
|
84
|
-
* @param
|
|
85
|
-
* @
|
|
128
|
+
* Create a branch in GitLab: POST /projects/{projectId}/repository/branches
|
|
129
|
+
* @param branchName name of branch to create
|
|
130
|
+
* @param fromSha branch/tag name or SHA to base the new branch on
|
|
131
|
+
* @returns {Promise<import('../virtualfs/types.ts').CreateBranchResult>} created branch info
|
|
132
|
+
*/
|
|
133
|
+
createBranch(branchName: string, fromSha: string): Promise<import('../virtualfs/types.ts').CreateBranchResult>;
|
|
134
|
+
/**
|
|
135
|
+
* Normalize common createBranch error messages into thrown Errors.
|
|
136
|
+
* @param {string} message error message text
|
|
137
|
+
* @param {string} branchName branch name attempted
|
|
138
|
+
* @returns {never}
|
|
139
|
+
*/
|
|
140
|
+
private _handleCreateBranchError;
|
|
141
|
+
/**
|
|
142
|
+
* Map raw GitLab branch objects to adapter Branch item shape.
|
|
143
|
+
* @param {any[]} parsed raw branch array
|
|
144
|
+
* @param {any} repoMeta repository metadata
|
|
145
|
+
* @returns {any[]}
|
|
146
|
+
*/
|
|
147
|
+
private _mapBranchItems;
|
|
148
|
+
/**
|
|
149
|
+
* Convert change descriptors to GitLab API actions
|
|
150
|
+
* @returns {Array<any>} API-compatible actions array
|
|
151
|
+
*/
|
|
152
|
+
private createActions;
|
|
153
|
+
/**
|
|
154
|
+
* Verify that remote branch head matches expected parent SHA.
|
|
155
|
+
* Throws when non-fast-forward detected.
|
|
156
|
+
* @param {string} expectedParentSha expected parent SHA
|
|
157
|
+
* @param {string} branch branch name
|
|
86
158
|
* @returns {Promise<void>}
|
|
87
159
|
*/
|
|
88
|
-
|
|
160
|
+
private verifyParent;
|
|
161
|
+
/**
|
|
162
|
+
* Parse and validate commit API response text
|
|
163
|
+
* @param {string} text 応答テキスト
|
|
164
|
+
* @returns {any} parsed commit id/object
|
|
165
|
+
*/
|
|
166
|
+
private parseCommitResponse;
|
|
167
|
+
/**
|
|
168
|
+
* Post commit request and return parsed commit response.
|
|
169
|
+
* @param {string} url endpoint URL
|
|
170
|
+
* @param {string} body request body
|
|
171
|
+
* @returns {Promise<any>} parsed commit response
|
|
172
|
+
*/
|
|
173
|
+
private postCommit;
|
|
174
|
+
/**
|
|
175
|
+
* Wait helper for retry backoff.
|
|
176
|
+
* @param {number} attempt attempt number
|
|
177
|
+
* @returns {Promise<void>}
|
|
178
|
+
*/
|
|
179
|
+
private _waitAttempt;
|
|
180
|
+
/**
|
|
181
|
+
* Prepare JSON body for commit API call.
|
|
182
|
+
* @returns {string} JSON body
|
|
183
|
+
*/
|
|
184
|
+
private _prepareCommitBody;
|
|
185
|
+
/**
|
|
186
|
+
* Optionally verify parent SHA; rethrow errors after logging.
|
|
187
|
+
* @param {string} expectedParentSha expected SHA
|
|
188
|
+
* @param {string} branch branch name
|
|
189
|
+
* @returns {Promise<void>}
|
|
190
|
+
*/
|
|
191
|
+
private _maybeVerifyParent;
|
|
192
|
+
/**
|
|
193
|
+
* リポジトリのスナップショットを取得します。
|
|
194
|
+
* @param {string} branch ブランチ名 (default: 'main')
|
|
195
|
+
* @returns {Promise<{headSha:string,shas:Record<string,string>,fetchContent:(paths:string[])=>Promise<Record<string,string>>}>}
|
|
196
|
+
*/
|
|
197
|
+
fetchSnapshot(branch?: string, concurrency?: number): Promise<any>;
|
|
198
|
+
/**
|
|
199
|
+
* Determine the head SHA for a branch; fallback to branch name if unavailable.
|
|
200
|
+
* @param {string} branch branch name
|
|
201
|
+
* @returns {Promise<string>} head SHA or branch
|
|
202
|
+
*/
|
|
203
|
+
private _determineHeadSha;
|
|
204
|
+
/**
|
|
205
|
+
* Fetch repository tree and build shas map and fileSet.
|
|
206
|
+
* @param {string} branch branch name
|
|
207
|
+
* @returns {Promise<{shas:Record<string,string>,fileSet:Set<string>}>}
|
|
208
|
+
*/
|
|
209
|
+
private _fetchTreeAndBuildShas;
|
|
210
|
+
/**
|
|
211
|
+
* Fetch contents for requested paths from a FileSet with caching.
|
|
212
|
+
* @param {Set<string>} fileSet set of available files
|
|
213
|
+
* @param {Map<string,string>} cache content cache
|
|
214
|
+
* @param {Record<string,string>} snapshot snapshot output
|
|
215
|
+
* @param {string[]} paths requested paths
|
|
216
|
+
* @param {string} branch branch name
|
|
217
|
+
* @param {number} concurrency concurrency level
|
|
218
|
+
* @returns {Promise<Record<string,string>>}
|
|
219
|
+
*/
|
|
220
|
+
private _fetchContentFromFileSet;
|
|
221
|
+
/**
|
|
222
|
+
* Fetch the content for a single file path, updating cache and snapshot.
|
|
223
|
+
* @param {Map<string,string>} cache cache map
|
|
224
|
+
* @param {Record<string,string>} snapshot snapshot map
|
|
225
|
+
* @param {string} p file path
|
|
226
|
+
* @param {string} branch branch
|
|
227
|
+
* @returns {Promise<string|null>} file content or null
|
|
228
|
+
*/
|
|
229
|
+
private _fetchFileContentForPath;
|
|
230
|
+
/**
|
|
231
|
+
* Fetch raw file content from GitLab; return null on failure.
|
|
232
|
+
* @param {string} path file path
|
|
233
|
+
* @param {string} branch branch name
|
|
234
|
+
* @returns {Promise<string|null>} file content or null
|
|
235
|
+
*/
|
|
236
|
+
private _fetchFileRaw;
|
|
237
|
+
/**
|
|
238
|
+
* Build shas map and fileSet from tree entries
|
|
239
|
+
* @returns {{shas:Record<string,string>,fileSet:Set<string>}}
|
|
240
|
+
*/
|
|
241
|
+
private _buildShasAndFileSet;
|
|
242
|
+
/**
|
|
243
|
+
* Resolve a commit-ish (branch, tag, or SHA) to a commit SHA.
|
|
244
|
+
* Resolution order: branch -> tag -> commits endpoint -> treat as SHA
|
|
245
|
+
* Throws if not resolvable.
|
|
246
|
+
* @param {string} reference commit-ish to resolve
|
|
247
|
+
* @returns {Promise<string>} resolved commit SHA
|
|
248
|
+
*/
|
|
249
|
+
resolveRef(reference: string): Promise<string>;
|
|
250
|
+
/**
|
|
251
|
+
* Run resolver functions in order and return the first non-null result.
|
|
252
|
+
* @param {string} reference commit-ish to resolve
|
|
253
|
+
* @param {Array<(_reference: string) => Promise<string | null>>} resolvers resolver functions
|
|
254
|
+
* @returns {Promise<string|null>} resolved sha or null
|
|
255
|
+
*/
|
|
256
|
+
private _runResolvers;
|
|
257
|
+
/**
|
|
258
|
+
* Try to resolve a branch name to its commit SHA.
|
|
259
|
+
* @param {string} reference branch name
|
|
260
|
+
* @returns {Promise<string|null>} resolved sha or null
|
|
261
|
+
*/
|
|
262
|
+
private _tryResolveBranch;
|
|
263
|
+
/**
|
|
264
|
+
* Try to resolve a tag name to a commit SHA.
|
|
265
|
+
* @param {string} reference tag name
|
|
266
|
+
* @returns {Promise<string|null>} resolved SHA or null
|
|
267
|
+
*/
|
|
268
|
+
private _tryResolveTag;
|
|
269
|
+
/**
|
|
270
|
+
* Try to resolve a commit via commits endpoint.
|
|
271
|
+
* @param {string} reference commit-ish
|
|
272
|
+
* @returns {Promise<string|null>} resolved SHA or null
|
|
273
|
+
*/
|
|
274
|
+
private _tryResolveCommit;
|
|
89
275
|
}
|
|
90
276
|
export default GitLabAdapter;
|
|
91
277
|
//# sourceMappingURL=gitlabAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitlabAdapter.d.ts","sourceRoot":"","sources":["../../src/git/gitlabAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"gitlabAdapter.d.ts","sourceRoot":"","sources":["../../src/git/gitlabAdapter.ts"],"names":[],"mappings":"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"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { default as VirtualFS } from './virtualfs/virtualfs';
|
|
2
|
-
export { default as
|
|
3
|
-
export { default as OpfsStorage } from './virtualfs/opfsStorage';
|
|
4
|
-
export { default as
|
|
5
|
-
export { default as
|
|
6
|
-
export { default } from './
|
|
1
|
+
export { default as VirtualFS } from './virtualfs/virtualfs.ts';
|
|
2
|
+
export { default as IndexedDatabaseStorage } from './virtualfs/indexedDatabaseStorage.ts';
|
|
3
|
+
export { default as OpfsStorage } from './virtualfs/opfsStorage.ts';
|
|
4
|
+
export { default as InMemoryStorage } from './virtualfs/inmemoryStorage.ts';
|
|
5
|
+
export { default as GitHubAdapter } from './git/githubAdapter.ts';
|
|
6
|
+
export { default as GitLabAdapter } from './git/gitlabAdapter.ts';
|
|
7
|
+
export { default } from './virtualfs/virtualfs.ts';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,0BAA0B,CAAA;AAC/D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,uCAAuC,CAAA;AACzF,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gCAAgC,CAAA;AAC3E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA"}
|