browser-git-ops 0.0.5 → 0.0.7
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 +59 -5
- package/dist/git/abstractAdapter.d.ts +25 -5
- package/dist/git/abstractAdapter.d.ts.map +1 -1
- package/dist/git/githubAdapter.d.ts +14 -9
- package/dist/git/githubAdapter.d.ts.map +1 -1
- package/dist/git/gitlabAdapter.d.ts +23 -8
- package/dist/git/gitlabAdapter.d.ts.map +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1211 -1048
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +1208 -1045
- package/dist/index.mjs.map +3 -3
- package/dist/virtualfs/changeTracker.d.ts +1 -0
- package/dist/virtualfs/changeTracker.d.ts.map +1 -1
- package/dist/virtualfs/conflictManager.d.ts +3 -1
- package/dist/virtualfs/conflictManager.d.ts.map +1 -1
- package/dist/virtualfs/indexedDatabaseStorage.d.ts.map +1 -1
- package/dist/virtualfs/inmemoryStorage.d.ts.map +1 -1
- package/dist/virtualfs/localChangeApplier.d.ts +6 -3
- package/dist/virtualfs/localChangeApplier.d.ts.map +1 -1
- package/dist/virtualfs/localFileManager.d.ts.map +1 -1
- package/dist/virtualfs/metadataManager.d.ts.map +1 -1
- package/dist/virtualfs/opfsStorage.d.ts.map +1 -1
- package/dist/virtualfs/remoteSynchronizer.d.ts +114 -17
- package/dist/virtualfs/remoteSynchronizer.d.ts.map +1 -1
- package/dist/virtualfs/storageBackend.d.ts +16 -16
- package/dist/virtualfs/types.d.ts +5 -4
- package/dist/virtualfs/types.d.ts.map +1 -1
- package/dist/virtualfs/utils/urlParser.d.ts +14 -0
- package/dist/virtualfs/utils/urlParser.d.ts.map +1 -0
- package/dist/virtualfs/virtualfs.d.ts +75 -26
- package/dist/virtualfs/virtualfs.d.ts.map +1 -1
- package/package.json +5 -7
package/README.md
CHANGED
|
@@ -61,7 +61,7 @@ import { VirtualFS, OpfsStorage, GitHubAdapter } from 'browser-git-ops'
|
|
|
61
61
|
|
|
62
62
|
async function example() {
|
|
63
63
|
// 1. Initialize VirtualFS with OPFS backend
|
|
64
|
-
const backend = new OpfsStorage('my-workspace')
|
|
64
|
+
const backend = new OpfsStorage('appname','my-workspace')
|
|
65
65
|
const vfs = new VirtualFS({ backend })
|
|
66
66
|
await vfs.init()
|
|
67
67
|
|
|
@@ -88,8 +88,13 @@ async function example() {
|
|
|
88
88
|
await vfs.writeFile('docs/guide.md', '## Getting Started')
|
|
89
89
|
|
|
90
90
|
// 6. Stat a file (Stats includes gitBlobSha/gitCommitSha when available)
|
|
91
|
+
// 6. Stat a file — returned object implements fs.Stats-like shape
|
|
92
|
+
// When the file is tracked by a configured adapter, the returned
|
|
93
|
+
// stats may include Git-specific identifiers: gitBlobSha, gitCommitSha, gitRef.
|
|
91
94
|
const s = await vfs.stat('README.md')
|
|
92
95
|
console.log('size=', s.size, 'isFile=', s.isFile())
|
|
96
|
+
// Git-specific fields (may be undefined for non-tracked files):
|
|
97
|
+
console.log('gitBlobSha=', s.gitBlobSha, 'gitCommitSha=', s.gitCommitSha, 'gitRef=', s.gitRef)
|
|
93
98
|
|
|
94
99
|
// 7. Delete a file (use unlink instead of deleteFile)
|
|
95
100
|
await vfs.unlink('docs/guide.md')
|
|
@@ -239,7 +244,10 @@ class VirtualFS {
|
|
|
239
244
|
async revertChanges(): Promise<void>
|
|
240
245
|
|
|
241
246
|
// Remote Synchronization
|
|
242
|
-
async setAdapter(
|
|
247
|
+
async setAdapter(meta: { type: 'github' | 'gitlab' | string, opts?: any}): Promise<void>
|
|
248
|
+
async getAdapter(): Promise<{ type: string, opts?: any } | null>
|
|
249
|
+
async getAdapterInstance(): Promise<any | null>
|
|
250
|
+
getAdapterMeta(): { type: string, opts?: any } | null
|
|
243
251
|
async pull(reference?: string, baseSnapshot?: Record<string, string>): Promise<any>
|
|
244
252
|
async push(input: CommitInput): Promise<any>
|
|
245
253
|
|
|
@@ -251,24 +259,70 @@ class VirtualFS {
|
|
|
251
259
|
async getIndex(): Promise<IndexFile>
|
|
252
260
|
async saveIndex(): Promise<void>
|
|
253
261
|
}
|
|
262
|
+
|
|
263
|
+
// Stats-like object returned by `vfs.stat(path)` includes standard fields
|
|
264
|
+
// similar to Node.js `fs.Stats` and may include Git identifiers when available.
|
|
265
|
+
// Example Type (informational):
|
|
266
|
+
// interface FsStatsLike {
|
|
267
|
+
// dev: number; ino: number; mode: number; nlink: number; uid: number; gid: number;
|
|
268
|
+
// size: number; atime: Date; mtime: Date; ctime: Date; birthtime: Date;
|
|
269
|
+
// isFile(): boolean; isDirectory(): boolean;
|
|
270
|
+
// // Git-specific (optional):
|
|
271
|
+
// gitBlobSha?: string; // blob SHA for tracked file
|
|
272
|
+
// gitCommitSha?: string; // latest commit SHA touching this path
|
|
273
|
+
// gitRef?: string; // reference/branch used to derive these values
|
|
274
|
+
// }
|
|
254
275
|
```
|
|
255
276
|
|
|
277
|
+
#### Adapter Retrieval and Management
|
|
278
|
+
|
|
279
|
+
```typescript
|
|
280
|
+
// Get persisted adapter metadata (configuration, not instance)
|
|
281
|
+
async getAdapter(): Promise<{ type: string, opts?: any } | null>
|
|
282
|
+
// Example:
|
|
283
|
+
const meta = await vfs.getAdapter()
|
|
284
|
+
if (meta) {
|
|
285
|
+
console.log('Adapter type:', meta.type)
|
|
286
|
+
console.log('Branch:', meta.opts?.branch)
|
|
287
|
+
console.log('Owner:', meta.opts?.owner) // GitHub case
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
// Get cached adapter metadata synchronously
|
|
291
|
+
getAdapterMeta(): { type: string, opts?: any } | null
|
|
292
|
+
// Example:
|
|
293
|
+
const meta = vfs.getAdapterMeta()
|
|
294
|
+
|
|
295
|
+
// Get or create adapter instance (lazy initialization)
|
|
296
|
+
async getAdapterInstance(): Promise<any | null>
|
|
297
|
+
// Example:
|
|
298
|
+
const adapter = await vfs.getAdapterInstance()
|
|
299
|
+
if (adapter) {
|
|
300
|
+
// adapter.resolveRef, adapter.push, etc. are now available
|
|
301
|
+
}
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Note**:
|
|
305
|
+
- `getAdapter()` and `getAdapterInstance()` serve different purposes
|
|
306
|
+
- `getAdapter()` returns persisted metadata (type and opts)
|
|
307
|
+
- `getAdapterInstance()` creates/retrieves the adapter instance from metadata
|
|
308
|
+
- `getAdapterMeta()` synchronously returns cached metadata (no Promise)
|
|
309
|
+
|
|
256
310
|
### Storage Backends
|
|
257
311
|
|
|
258
312
|
```typescript
|
|
259
313
|
// OPFS Backend
|
|
260
314
|
class OpfsStorage implements StorageBackend {
|
|
261
|
-
constructor(rootName?: string)
|
|
315
|
+
constructor(namespace: string, rootName?: string)
|
|
262
316
|
}
|
|
263
317
|
|
|
264
318
|
// IndexedDB Backend
|
|
265
319
|
class IndexedDatabaseStorage implements StorageBackend {
|
|
266
|
-
constructor(rootName?: string)
|
|
320
|
+
constructor(namespace: string, rootName?: string)
|
|
267
321
|
}
|
|
268
322
|
|
|
269
323
|
// In-Memory Backend (for testing)
|
|
270
324
|
class InMemoryStorage implements StorageBackend {
|
|
271
|
-
constructor()
|
|
325
|
+
constructor(namespace: string, rootName?: string)
|
|
272
326
|
}
|
|
273
327
|
```
|
|
274
328
|
|
|
@@ -58,6 +58,14 @@ export declare class RetryableError extends Error {
|
|
|
58
58
|
*/
|
|
59
59
|
export declare class NonRetryableError extends Error {
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Error indicating that retry attempts were exhausted and no further retries will be made.
|
|
63
|
+
*/
|
|
64
|
+
export declare class RetryExhaustedError extends RetryableError {
|
|
65
|
+
code: string;
|
|
66
|
+
cause?: any;
|
|
67
|
+
constructor(message: string, cause?: any);
|
|
68
|
+
}
|
|
61
69
|
/**
|
|
62
70
|
* Map items with limited concurrency
|
|
63
71
|
* @template T,R
|
|
@@ -66,7 +74,14 @@ export declare class NonRetryableError extends Error {
|
|
|
66
74
|
* @param concurrency concurrency limit
|
|
67
75
|
* @returns Promise resolving to array of mapped results
|
|
68
76
|
*/
|
|
69
|
-
export
|
|
77
|
+
export type MapWithConcurrencyOptions = {
|
|
78
|
+
controller?: AbortController;
|
|
79
|
+
};
|
|
80
|
+
export declare function processOne<T, R>(items: T[], mapper: (_t: T) => Promise<R>, results: R[], index_: number, controller?: AbortController): Promise<void>;
|
|
81
|
+
export declare function queueRunWorker<T, R>(items: T[], mapper: (_t: T) => Promise<R>, results: R[], indexReference: {
|
|
82
|
+
value: number;
|
|
83
|
+
}, controller?: AbortController): Promise<void>;
|
|
84
|
+
export declare function mapWithConcurrency<T, R>(items: T[], mapper: (_t: T) => Promise<R>, concurrency?: number, options?: MapWithConcurrencyOptions): Promise<R[]>;
|
|
70
85
|
/**
|
|
71
86
|
* Abstract base class providing shared utilities for Git adapters
|
|
72
87
|
*/
|
|
@@ -102,17 +117,17 @@ export declare abstract class AbstractGitAdapter {
|
|
|
102
117
|
protected logDebug(..._messages: any[]): void;
|
|
103
118
|
/**
|
|
104
119
|
* Log an informational message if a logger is present.
|
|
105
|
-
* @param
|
|
120
|
+
* @param _messages items to log
|
|
106
121
|
*/
|
|
107
122
|
protected logInfo(..._messages: any[]): void;
|
|
108
123
|
/**
|
|
109
124
|
* Log a warning message if a logger is present.
|
|
110
|
-
* @param
|
|
125
|
+
* @param _messages items to log
|
|
111
126
|
*/
|
|
112
127
|
protected logWarn(..._messages: any[]): void;
|
|
113
128
|
/**
|
|
114
129
|
* Log an error message if a logger is present.
|
|
115
|
-
* @param
|
|
130
|
+
* @param _messages items to log
|
|
116
131
|
*/
|
|
117
132
|
protected logError(..._messages: any[]): void;
|
|
118
133
|
/**
|
|
@@ -123,11 +138,16 @@ export declare abstract class AbstractGitAdapter {
|
|
|
123
138
|
private normalizeHeaders;
|
|
124
139
|
/**
|
|
125
140
|
* Format a fetch request into a minimal object suitable for logging.
|
|
141
|
+
* @param input fetch input (URL or Request)
|
|
142
|
+
* @param init fetch initialization options
|
|
143
|
+
* @param attempts retry attempts count
|
|
144
|
+
* @param baseDelay base delay in milliseconds
|
|
126
145
|
* @returns formatted request log object
|
|
127
146
|
*/
|
|
128
147
|
private formatRequestForLog;
|
|
129
148
|
/**
|
|
130
149
|
* Format a fetch Response into a minimal object suitable for logging.
|
|
150
|
+
* @param response HTTP response object
|
|
131
151
|
* @returns formatted response log object
|
|
132
152
|
*/
|
|
133
153
|
private formatResponseForLog;
|
|
@@ -161,7 +181,7 @@ export declare abstract class AbstractGitAdapter {
|
|
|
161
181
|
* @param concurrency concurrency limit
|
|
162
182
|
* @returns Promise resolving to mapped results
|
|
163
183
|
*/
|
|
164
|
-
protected mapWithConcurrency<T, R>(items: T[], mapper: (_t: T) => Promise<R>, concurrency?: number): Promise<R[]>;
|
|
184
|
+
protected mapWithConcurrency<T, R>(items: T[], mapper: (_t: T) => Promise<R>, concurrency?: number, options?: MapWithConcurrencyOptions): Promise<R[]>;
|
|
165
185
|
}
|
|
166
186
|
export default AbstractGitAdapter;
|
|
167
187
|
//# sourceMappingURL=abstractAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abstractAdapter.d.ts","sourceRoot":"","sources":["../../src/git/abstractAdapter.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,sBAAsB,GAAG,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;AAK5I;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACrB,KAAK,EAAE,CAAC,GAAG,SAAS,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IACpC,IAAI,EAAE,CAAC,GAAG,SAAS,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IACnC,IAAI,EAAE,CAAC,GAAG,SAAS,EAAE,GAAG,EAAE,KAAK,IAAI,CAAA;IACnC,KAAK,EAA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,GAAG,SAAS,EAAE,GAAG,EAAE;IAUrC;;;OAGG;IACH,SAAS,CAAC,OAAO,CAAC,GAAG,SAAS,EAAE,GAAG,EAAE;IAUrC;;;OAGG;IACH,SAAS,CAAC,QAAQ,CAAC,GAAG,SAAS,EAAE,GAAG,EAAE;IAUtC;;;;OAIG;IACH,OAAO,CAAC,gBAAgB;IAqBxB;;;;;;;OAOG;IACH,OAAO,CAAC,mBAAmB;IAQ3B;;;;OAIG;YACW,oBAAoB;IAiBlC;;;;;;;;OAQG;cACa,cAAc,CAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,SAAI,EAAE,SAAS,SAAM;IA2BnG;;;;OAIG;IACH,SAAS,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM;IAI1C;;;;OAIG;IACH,SAAS,CAAC,SAAS,CAAC,OAAO,EAAE,MAAM;IAMnC;;;;;;;OAOG;IACH,SAAS,CAAC,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,EAAE,WAAW,SAAI,EAAE,OAAO,CAAC,EAAE,yBAAyB;CAGnI;AAED,eAAe,kBAAkB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GitAdapter } from './adapter.ts';
|
|
2
2
|
import AbstractGitAdapter, { fetchWithRetry, classifyStatus, getDelayForResponse, processResponseWithDelay, mapWithConcurrency, shaOf } from './abstractAdapter.ts';
|
|
3
|
-
type GHOptions = {
|
|
3
|
+
export type GHOptions = {
|
|
4
4
|
owner: string;
|
|
5
5
|
repo: string;
|
|
6
6
|
token: string;
|
|
@@ -16,12 +16,15 @@ export declare class GitHubAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
16
16
|
private blobCache;
|
|
17
17
|
/**
|
|
18
18
|
* GitHubAdapter を初期化します。
|
|
19
|
-
* @param {GHOptions}
|
|
19
|
+
* @param {GHOptions} options 設定オブジェクト
|
|
20
20
|
*/
|
|
21
21
|
constructor(options: GHOptions);
|
|
22
22
|
/**
|
|
23
23
|
* List commits for a ref (GitHub commits API)
|
|
24
|
-
* @param {
|
|
24
|
+
* @param {Object} query query parameters
|
|
25
|
+
* @param {string} query.ref reference name (branch/tag/SHA)
|
|
26
|
+
* @param {number} [query.perPage] items per page
|
|
27
|
+
* @param {number} [query.page] page number
|
|
25
28
|
* @returns {Promise<import('./adapter').CommitHistoryPage>} ページ情報を返します
|
|
26
29
|
*/
|
|
27
30
|
listCommits(query: {
|
|
@@ -98,7 +101,8 @@ export declare class GitHubAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
98
101
|
private _makeRepoMetadata;
|
|
99
102
|
/**
|
|
100
103
|
* List branches via GitHub API and map to BranchListPage.
|
|
101
|
-
|
|
104
|
+
* @param {import('../virtualfs/types.ts').BranchListQuery} [query] query parameters
|
|
105
|
+
* @returns {Promise<{items:any[],nextPage?:number,lastPage?:number}>}
|
|
102
106
|
*/
|
|
103
107
|
listBranches(query?: import('../virtualfs/types.ts').BranchListQuery): Promise<{
|
|
104
108
|
items: {
|
|
@@ -122,15 +126,15 @@ export declare class GitHubAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
122
126
|
private _mapBranchItems;
|
|
123
127
|
/**
|
|
124
128
|
* 参照を更新します。
|
|
125
|
-
* @param {string}
|
|
129
|
+
* @param {string} reference 参照名(例: heads/main)
|
|
126
130
|
* @param {string} commitSha コミット SHA
|
|
127
131
|
* @param {boolean} force 強制更新フラグ
|
|
128
132
|
*/
|
|
129
133
|
updateRef(reference: string, commitSha: string, force?: boolean): Promise<void>;
|
|
130
134
|
/**
|
|
131
135
|
* 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
|
|
136
|
+
* @param {string} branchName branch name to create
|
|
137
|
+
* @param {string} fromSha commit sha to point the new branch at
|
|
134
138
|
* @returns {Promise<import('../virtualfs/types.ts').CreateBranchResult>} created branch info
|
|
135
139
|
*/
|
|
136
140
|
createBranch(branchName: string, fromSha: string): Promise<import('../virtualfs/types.ts').CreateBranchResult>;
|
|
@@ -149,8 +153,8 @@ export declare class GitHubAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
149
153
|
getCommitTreeSha(commitSha: string): Promise<string>;
|
|
150
154
|
/**
|
|
151
155
|
* 指定 ref の先頭コミット SHA を取得します。
|
|
152
|
-
* @param
|
|
153
|
-
|
|
156
|
+
* @param {string} reference 䉶: `heads/main`
|
|
157
|
+
* @returns {Promise<string>} 参照先のコミット SHA
|
|
154
158
|
*/
|
|
155
159
|
getRef(reference: string): Promise<string>;
|
|
156
160
|
/**
|
|
@@ -235,6 +239,7 @@ export declare class GitHubAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
235
239
|
/**
|
|
236
240
|
* Decode a base64 string into UTF-8 text. Uses global Buffer when available,
|
|
237
241
|
* falls back to atob/TextDecoder for browsers.
|
|
242
|
+
* @param {string} safe base64 string to decode
|
|
238
243
|
* @returns {string} decoded UTF-8 string
|
|
239
244
|
*/
|
|
240
245
|
private _decodeBase64ToString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"githubAdapter.d.ts","sourceRoot":"","sources":["../../src/git/githubAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,kBAAkB,EAAE,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,KAAK,EAAqB,MAAM,sBAAsB,CAAA;AAEtL,
|
|
1
|
+
{"version":3,"file":"githubAdapter.d.ts","sourceRoot":"","sources":["../../src/git/githubAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,kBAAkB,EAAE,EAAE,cAAc,EAAE,cAAc,E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,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,KAAK,EAAE,CAAA;AAEnH,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxE,eAAe,aAAa,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GitAdapter } from './adapter.ts';
|
|
2
2
|
import AbstractGitAdapter from './abstractAdapter.ts';
|
|
3
|
-
type GLOptions = {
|
|
3
|
+
export type GLOptions = {
|
|
4
4
|
projectId: string;
|
|
5
5
|
token: string;
|
|
6
6
|
host?: string;
|
|
@@ -15,12 +15,15 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
15
15
|
private projectMetadata;
|
|
16
16
|
/**
|
|
17
17
|
* GitLabAdapter を初期化します。
|
|
18
|
-
* @param {
|
|
18
|
+
* @param {GLOptions} options 設定オブジェクト
|
|
19
19
|
*/
|
|
20
20
|
constructor(options: GLOptions);
|
|
21
21
|
/**
|
|
22
22
|
* List commits for a ref (GitLab commits API)
|
|
23
|
-
* @param {
|
|
23
|
+
* @param {Object} query query parameters
|
|
24
|
+
* @param {string} query.ref reference name
|
|
25
|
+
* @param {number} [query.perPage] items per page
|
|
26
|
+
* @param {number} [query.page] page number
|
|
24
27
|
* @returns {Promise<import('./adapter').CommitHistoryPage>} ページ情報を返します
|
|
25
28
|
*/
|
|
26
29
|
listCommits(query: {
|
|
@@ -46,6 +49,7 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
46
49
|
private _parseJsonArray;
|
|
47
50
|
/**
|
|
48
51
|
* GitLab のページングヘッダを解析します(x-next-page / x-total-pages)。
|
|
52
|
+
* @param {Response} resp HTTP レスポンス
|
|
49
53
|
* @returns {{nextPage?: number, lastPage?: number}} ページ番号情報
|
|
50
54
|
*/
|
|
51
55
|
private _parsePagingHeaders;
|
|
@@ -78,9 +82,9 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
78
82
|
createCommit(message: string, parentSha: string, _treeSha: string): Promise<any>;
|
|
79
83
|
/**
|
|
80
84
|
* リファレンス更新は不要なため noop 実装です。
|
|
81
|
-
* @param {string}
|
|
85
|
+
* @param {string} _reference ref 名
|
|
82
86
|
* @param {string} _commitSha コミット SHA
|
|
83
|
-
* @param {boolean} [_force]
|
|
87
|
+
* @param {boolean} [_force] 強制フラグ
|
|
84
88
|
* @returns {Promise<void>}
|
|
85
89
|
*/
|
|
86
90
|
updateRef(_reference: string, _commitSha: string, _force?: boolean): Promise<void>;
|
|
@@ -88,7 +92,8 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
88
92
|
* actions を用いて GitLab のコミット API を呼び出します。
|
|
89
93
|
* @param {string} branch ブランチ名
|
|
90
94
|
* @param {string} message コミットメッセージ
|
|
91
|
-
* @param {{type:string,path:string,content?:string}
|
|
95
|
+
* @param {Array<{type:string,path:string,content?:string}>} changes 変更一覧
|
|
96
|
+
* @param {string} [expectedParentSha] 下発コミット SHA
|
|
92
97
|
* @returns {Promise<any>} コミット応答(id など)
|
|
93
98
|
*/
|
|
94
99
|
createCommitWithActions(branch: string, message: string, changes: Array<{
|
|
@@ -109,6 +114,7 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
109
114
|
private _makeProjectMetadata;
|
|
110
115
|
/**
|
|
111
116
|
* List branches via GitLab API and map to BranchListPage.
|
|
117
|
+
* @param {import('../virtualfs/types.ts').BranchListQuery} [query] query parameters
|
|
112
118
|
* @returns {Promise<{items:any[],nextPage?:number,lastPage?:number}>}
|
|
113
119
|
*/
|
|
114
120
|
listBranches(query?: import('../virtualfs/types.ts').BranchListQuery): Promise<{
|
|
@@ -126,11 +132,12 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
126
132
|
}>;
|
|
127
133
|
/**
|
|
128
134
|
* 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
|
|
135
|
+
* @param {string} branchName name of branch to create
|
|
136
|
+
* @param {string} fromSha branch/tag name or SHA to base the new branch on
|
|
131
137
|
* @returns {Promise<import('../virtualfs/types.ts').CreateBranchResult>} created branch info
|
|
132
138
|
*/
|
|
133
139
|
createBranch(branchName: string, fromSha: string): Promise<import('../virtualfs/types.ts').CreateBranchResult>;
|
|
140
|
+
private _extractShaFromCommitResponseText;
|
|
134
141
|
/**
|
|
135
142
|
* Normalize common createBranch error messages into thrown Errors.
|
|
136
143
|
* @param {string} message error message text
|
|
@@ -147,6 +154,7 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
147
154
|
private _mapBranchItems;
|
|
148
155
|
/**
|
|
149
156
|
* Convert change descriptors to GitLab API actions
|
|
157
|
+
* @param {Array<{type:string,path:string,content?:string}>} changes change descriptors
|
|
150
158
|
* @returns {Array<any>} API-compatible actions array
|
|
151
159
|
*/
|
|
152
160
|
private createActions;
|
|
@@ -179,6 +187,9 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
179
187
|
private _waitAttempt;
|
|
180
188
|
/**
|
|
181
189
|
* Prepare JSON body for commit API call.
|
|
190
|
+
* @param {string} branch branch name
|
|
191
|
+
* @param {string} message commit message
|
|
192
|
+
* @param {any[]} actions commit actions
|
|
182
193
|
* @returns {string} JSON body
|
|
183
194
|
*/
|
|
184
195
|
private _prepareCommitBody;
|
|
@@ -192,6 +203,7 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
192
203
|
/**
|
|
193
204
|
* リポジトリのスナップショットを取得します。
|
|
194
205
|
* @param {string} branch ブランチ名 (default: 'main')
|
|
206
|
+
* @param {number} concurrency fetch concurrency level
|
|
195
207
|
* @returns {Promise<{headSha:string,shas:Record<string,string>,fetchContent:(paths:string[])=>Promise<Record<string,string>>}>}
|
|
196
208
|
*/
|
|
197
209
|
fetchSnapshot(branch?: string, concurrency?: number): Promise<any>;
|
|
@@ -201,6 +213,7 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
201
213
|
* @returns {Promise<string>} head SHA or branch
|
|
202
214
|
*/
|
|
203
215
|
private _determineHeadSha;
|
|
216
|
+
private _safeGetBranchHead;
|
|
204
217
|
/**
|
|
205
218
|
* Fetch repository tree and build shas map and fileSet.
|
|
206
219
|
* @param {string} branch branch name
|
|
@@ -236,6 +249,7 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
236
249
|
private _fetchFileRaw;
|
|
237
250
|
/**
|
|
238
251
|
* Build shas map and fileSet from tree entries
|
|
252
|
+
* @param {any[]} files tree file entries
|
|
239
253
|
* @returns {{shas:Record<string,string>,fileSet:Set<string>}}
|
|
240
254
|
*/
|
|
241
255
|
private _buildShasAndFileSet;
|
|
@@ -254,6 +268,7 @@ export declare class GitLabAdapter extends AbstractGitAdapter implements GitAdap
|
|
|
254
268
|
* @returns {Promise<string|null>} resolved sha or null
|
|
255
269
|
*/
|
|
256
270
|
private _runResolvers;
|
|
271
|
+
private _tryRunResolver;
|
|
257
272
|
/**
|
|
258
273
|
* Try to resolve a branch name to its commit SHA.
|
|
259
274
|
* @param {string} reference branch name
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gitlabAdapter.d.ts","sourceRoot":"","sources":["../../src/git/gitlabAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"gitlabAdapter.d.ts","sourceRoot":"","sources":["../../src/git/gitlabAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,kBAA2C,MAAM,sBAAsB,CAAA;AAE9E,MAAM,MAAM,SAAS,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;I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emoryStorage.ts';
|
|
|
5
5
|
export { default as GitHubAdapter } from './git/githubAdapter.ts';
|
|
6
6
|
export { default as GitLabAdapter } from './git/gitlabAdapter.ts';
|
|
7
7
|
export { default } from './virtualfs/virtualfs.ts';
|
|
8
|
+
export type { IndexFile, AdapterMeta, CommitInput, BranchListQuery, BranchListPage, RepositoryMetadata, CreateBranchInput, CreateBranchResult, IndexEntry, BranchInfo, Change as VfsChange, FileState } from './virtualfs/types.ts';
|
|
9
|
+
export type { StorageBackend, StorageBackendConstructor, Segment } from './virtualfs/storageBackend.ts';
|
|
10
|
+
export type { Logger } from './git/abstractAdapter.ts';
|
|
11
|
+
export type { CommitHistoryQuery, CommitHistoryPage, CommitSummary, CommitResult, GitAdapter, Change as GitChange } from './git/adapter.ts';
|
|
12
|
+
export type { GHOptions } from './git/githubAdapter.ts';
|
|
13
|
+
export type { GLOptions } from './git/gitlabAdapter.ts';
|
|
14
|
+
export type { RemoteSnapshotDescriptor } from './virtualfs/virtualfs.ts';
|
|
8
15
|
//# 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,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"}
|
|
1
|
+
{"version":3,"file":"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