githttp-fs-client 1.9.0 → 1.10.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/README.md +78 -5
- package/dist/index.d.ts +56 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +53 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ await client.deleteTenant("notes", "t_1");
|
|
|
71
71
|
|
|
72
72
|
#### `listFiles(collectionId, tenantId, options?): Promise<FileList>`
|
|
73
73
|
|
|
74
|
-
Options: `page`, `perPage`, `prefixPath`, `maximumDepth`, `includeHiddenFiles`, `fileNameStartsWith`, `includeDateFrom`, `includeDateTo`, `includeDateType`, `applyOrderIndex`.
|
|
74
|
+
Options: `page`, `perPage`, `prefixPath`, `maximumDepth`, `includeHiddenFiles`, `fileNameStartsWith`, `includeDateFrom`, `includeDateTo`, `includeDateType`, `applyOrderIndex`, `implicitOrderDefaultIndex`.
|
|
75
75
|
|
|
76
76
|
Lists all tracked files as a paginated tree of file and directory entries. Defaults to `page = 1` and `perPage = 100`. Pass `prefixPath` to list only files under a folder, and `maximumDepth` to limit how deep the tree goes. Hidden entries (dot-prefixed files and directories) are excluded by default; pass `includeHiddenFiles = true` to include them. Pass `fileNameStartsWith` to narrow the listing to files *and directories* whose leaf name begins with a given prefix, compared case-insensitively (a matched directory brings its whole subtree along). It accepts either a single prefix (a string) or an array of prefixes, in which case an entry matches if its leaf name begins with *any* of them. An empty string, an empty array, or an empty prefix are all rejected with a `400`.
|
|
77
77
|
|
|
@@ -79,6 +79,8 @@ Pass `includeDateFrom` and/or `includeDateTo` (a `Date`, or an RFC 3339 date-tim
|
|
|
79
79
|
|
|
80
80
|
Pass `applyOrderIndex: true` to order every level of the listing by the file order stored for the directory it belongs to (see [Order operations](#order-operations)). Ordered entries come first, in their stored order, with files and directories interleaved freely; everything the stored order does not name follows in the ordinary order (directories first, then alphabetical). It defaults to `false`, and composes with every other option. Beware that this is the only listing mode which reads file contents (one small order index per listed directory).
|
|
81
81
|
|
|
82
|
+
Pass `implicitOrderDefaultIndex` (a number, unset by default) to choose where those unnamed entries land instead: it is the position they are all treated as holding, so `0` (or any negative value, e.g. `-1`) lifts every unordered entry *above* the whole stored order, while `2` slots them between its second and third entries. Unordered entries keep their ordinary relative order among themselves either way, and a directory holding no order at all is left untouched. It is only read when `applyOrderIndex` is `true`.
|
|
83
|
+
|
|
82
84
|
```ts
|
|
83
85
|
const list = await client.listFiles("notes", "t_1", {
|
|
84
86
|
page: 1, perPage: 100, prefixPath: "articles/", maximumDepth: 2
|
|
@@ -92,13 +94,15 @@ const recent = await client.listFiles("notes", "t_1", {
|
|
|
92
94
|
});
|
|
93
95
|
```
|
|
94
96
|
|
|
95
|
-
#### `getFileContent(collectionId, tenantId, path, seek?): Promise<
|
|
97
|
+
#### `getFileContent(collectionId, tenantId, path, seek?): Promise<FileContentPositioned>`
|
|
96
98
|
|
|
97
99
|
Reads the content of a file. An optional `seek` object narrows `content` to a line window (see [Seek options](#seek-options)).
|
|
98
100
|
|
|
101
|
+
The returned `position` is the zero-based position the file holds in the file order of its parent directory (see [Order operations](#order-operations)), so one read is enough to place a file among its siblings. It is `ORDER_POSITION_UNLISTED` (`-1`) when that order does not name the file, or when the directory holds no order at all — which is also the value `reorderFile()` takes to drop a file from an order, so what is read back can be sent back.
|
|
102
|
+
|
|
99
103
|
```ts
|
|
100
104
|
const file = await client.getFileContent("notes", "t_1", "articles/hello.md");
|
|
101
|
-
// { path: "articles/hello.md", content: "..." }
|
|
105
|
+
// { path: "articles/hello.md", content: "...", position: 2 }
|
|
102
106
|
```
|
|
103
107
|
|
|
104
108
|
#### `fileExists(collectionId, tenantId, path, options?): Promise<boolean>`
|
|
@@ -166,11 +170,45 @@ await client.moveFile("notes", "t_1", "articles", {
|
|
|
166
170
|
});
|
|
167
171
|
```
|
|
168
172
|
|
|
173
|
+
#### `reorderFile(collectionId, tenantId, path, payload): Promise<void>`
|
|
174
|
+
|
|
175
|
+
Moves a single file to the payload's numerical `position` in the file order of its parent directory, committing the change. The payload also holds the commit `author` and an optional `message`. Where `writeFileOrder()` replaces a whole directory's order at once, this is the incremental spelling: the file is dropped from wherever it currently sits and re-inserted at `position`, shifting the entries at and after it down by one.
|
|
176
|
+
|
|
177
|
+
`position` is zero-based, so `0` puts the file first, and it counts against the *other* entries of the order. Since an order may be sparse, a position past its end is clamped to its tail rather than rejected. A directory holding no order yet gets one naming just this file — unlike the implicit upkeep that only ever edits an existing order, asking for a position is explicit. Reordering a file to the position it already holds creates no commit.
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
await client.reorderFile("notes", "t_1", "articles/hello.md", {
|
|
181
|
+
position: 0,
|
|
182
|
+
author: { name: "Jane Doe", email: "jane@doe.com" }
|
|
183
|
+
});
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
Pass `position: ORDER_POSITION_UNLISTED` (`-1`, the only accepted negative value, and the value `getFileContent()` reports for an unordered file) for the inverse operation: the file is dropped from the order and left implicitly ordered again, the file itself untouched. When it was the order's last entry, the order is dropped entirely.
|
|
187
|
+
|
|
188
|
+
```ts
|
|
189
|
+
import { ORDER_POSITION_UNLISTED } from "githttp-fs-client";
|
|
190
|
+
|
|
191
|
+
await client.reorderFile("notes", "t_1", "articles/hello.md", {
|
|
192
|
+
position: ORDER_POSITION_UNLISTED,
|
|
193
|
+
author: { name: "Jane Doe", email: "jane@doe.com" }
|
|
194
|
+
});
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Set `allowPrefixPath: true` to let the path name a directory instead, positioning **that directory itself** among its siblings (an order interleaves files and directories freely). Nothing recurses — hence no `_recurse` suffix, unlike on `deleteFile()` and `moveFile()`: the directory's contents are untouched, and orders stored inside it keep ordering their own directory. Like its siblings the flag only permits: a path resolving to a file behaves identically with it on, while a directory path without it is simply "not a file" and rejects with a `404`.
|
|
198
|
+
|
|
199
|
+
```ts
|
|
200
|
+
await client.reorderFile("notes", "t_1", "articles/getting-started", {
|
|
201
|
+
position: 1,
|
|
202
|
+
author: { name: "Jane Doe", email: "jane@doe.com" },
|
|
203
|
+
allowPrefixPath: true
|
|
204
|
+
});
|
|
205
|
+
```
|
|
206
|
+
|
|
169
207
|
### Order operations
|
|
170
208
|
|
|
171
209
|
A directory may pin the presentation order of its own entries. The order is stored per directory, holds leaf names only (a directory entry carrying a trailing slash, a file none), and may be sparse: entries it does not name simply follow in the ordinary listing order. It is a resource of its own, never a file — it never shows up in `listFiles()`, `countFiles()` or `getFileContent()`, whatever `includeHiddenFiles` says. Pass `applyOrderIndex: true` to `listFiles()` to have it applied.
|
|
172
210
|
|
|
173
|
-
Every method takes the directory as a repo-relative path, with an empty string (or, on `getFileOrder()`, no argument at all) meaning the repository root.
|
|
211
|
+
Every method takes the directory as a repo-relative path, with an empty string (or, on `getFileOrder()`, no argument at all) meaning the repository root. These methods address a whole directory's order at once; to move a single entry within one, see [`reorderFile()`](#reorderfilecollectionid-tenantid-path-payload-promisevoid).
|
|
174
212
|
|
|
175
213
|
#### `getFileOrder(collectionId, tenantId, directory?): Promise<FileOrder>`
|
|
176
214
|
|
|
@@ -251,7 +289,7 @@ await client.rollbackCommit("notes", "t_1", "9b924c1d...", {
|
|
|
251
289
|
|
|
252
290
|
#### `batchGetFileContents(collectionId, tenantId, paths, seek?): Promise<FileContentBatch>`
|
|
253
291
|
|
|
254
|
-
Reads several files in one request. The returned `files` array is index-aligned with `paths`: each slot is either a `{ path, content }` object, or `null` when that path does not exist. An optional `seek` object applies the same line window to every file (see [Seek options](#seek-options)). Each entry of `paths` is either a bare path string, or a `{ path, seek? }` object whose `seek` replaces the shared one for that file (no field-by-field merge).
|
|
292
|
+
Reads several files in one request. The returned `files` array is index-aligned with `paths`: each slot is either a `{ path, content }` object, or `null` when that path does not exist. An optional `seek` object applies the same line window to every file (see [Seek options](#seek-options)). Each entry of `paths` is either a bare path string, or a `{ path, seek? }` object whose `seek` replaces the shared one for that file (no field-by-field merge). Unlike `getFileContent()`, the slots carry no `position`: a batch spans arbitrary directories, so ordering information would cost one order read per distinct parent — when order matters, `listFiles()` with `applyOrderIndex: true` answers it for a whole tree in one pass.
|
|
255
293
|
|
|
256
294
|
```ts
|
|
257
295
|
const batch = await client.batchGetFileContents("notes", "t_1", [
|
|
@@ -262,6 +300,41 @@ const batch = await client.batchGetFileContents("notes", "t_1", [
|
|
|
262
300
|
// { files: [{ path, content }, null, { path, content }] }
|
|
263
301
|
```
|
|
264
302
|
|
|
303
|
+
#### `batchReplayHook(collectionId, tenantId, direction, options?): Promise<HookReplay>`
|
|
304
|
+
|
|
305
|
+
Options: `files`, `prefixPath`, `includeHiddenFiles`, `delayMs`.
|
|
306
|
+
|
|
307
|
+
Replays file webhooks, so a downstream mirror that drifted out of sync can converge again. Webhook delivery is only durable in memory, so a receiver that was down past its retry budget (or that mis-applied an event) ends up holding a state the server never agreed to. This repairs it **in place**, rather than by wiping and re-pushing everything. Nothing is committed: no commit is created and no file is touched, the call only enqueues hook work.
|
|
308
|
+
|
|
309
|
+
Pass `files` as the list of paths the **mirror** currently holds — never a list of things to act on. The server intersects it with what it holds itself, and `direction` picks which side of that intersection gets replayed:
|
|
310
|
+
|
|
311
|
+
| `direction` | Replays | Which files | Repairs |
|
|
312
|
+
|-------------|---------|-------------|---------|
|
|
313
|
+
| `"delete"` | `file.deleted` | Everything **outside** the intersection — the mirror holds them, the server does not | Orphaned rows the mirror kept after a missed deletion |
|
|
314
|
+
| `"create"` | `file.created` | Everything **inside** it — the server holds them, so the mirror should too | Rows the mirror is missing, or whose content went stale |
|
|
315
|
+
|
|
316
|
+
`files` is optional, and omitting it defaults it to every file the server holds in scope. The two directions then fall out differently: `"create"` covers the whole scope (the common "push everything you have at me" re-sync), while `"delete"` replays nothing at all, since the server cannot be missing what it just listed. Passing an empty array is a `400` — leave the option out instead. Paths are repo-root-relative, must be unique, and must not name an order index (a `400`, since orders are a separate resource that never leaves through the file routes).
|
|
317
|
+
|
|
318
|
+
Pass `prefixPath` to scope the server-side snapshot to one folder, with the same semantics as `listFiles()`. Paths in `files` stay repo-root-relative, so it acts as a guard rail rather than a join: an entry that does not sit under it is a `400`. `includeHiddenFiles` (default `false`) is only meaningful **when `files` is omitted**, where it shapes the default set exactly as on `listFiles()` — when `files` is given, the snapshot always includes hidden files, or a hidden file would fall outside the intersection and replay a deletion for a file that is still there.
|
|
319
|
+
|
|
320
|
+
Pass `delayMs` to pause that many milliseconds *between* consecutive deliveries (never after the last one), capped at `60000`. It is a throttle to spare a receiver from a sustained burst, not an ordering device: delivery is already strictly sequential per repository. Its cost is that a replay holds that repository's hook queue for `delayMs × files`, so every commit accepted after it waits behind it — to go slower, replay in several `prefixPath`-scoped passes rather than raising the delay.
|
|
321
|
+
|
|
322
|
+
The returned `files` is how many files the batch affected, and `commit_sha` is the HEAD the snapshot was computed against (no commit was created). The call returns as soon as the job is enqueued, so it means "scheduled", not "delivered". Replayed payloads carry an extra `"replayed": true` field and keep their ordinary event name, so an existing receiver handler runs again unmodified — which means a `"create"` receiver must treat `file.created` as insert-or-replace rather than a bare insert. The server rejects the call with a `400` when it has no webhook receiver configured at all.
|
|
323
|
+
|
|
324
|
+
```ts
|
|
325
|
+
// Repair orphans: the mirror holds these three, drop whichever the server does not
|
|
326
|
+
const orphans = await client.batchReplayHook("notes", "t_1", "delete", {
|
|
327
|
+
files: ["articles/hello.md", "articles/removed.md", "articles/stale.md"]
|
|
328
|
+
});
|
|
329
|
+
// { commit_sha: "a3f9c1d...", files: 2 }
|
|
330
|
+
|
|
331
|
+
// Full re-sync of one folder, throttled to 10 hooks per second
|
|
332
|
+
const resync = await client.batchReplayHook("notes", "t_1", "create", {
|
|
333
|
+
prefixPath: "articles/",
|
|
334
|
+
delayMs: 100
|
|
335
|
+
});
|
|
336
|
+
```
|
|
337
|
+
|
|
265
338
|
### Seek options
|
|
266
339
|
|
|
267
340
|
`getFileContent()` and `batchGetFileContents()` accept an optional `seek` object, which narrows the returned `content` to a line window instead of the whole file. All fields are optional and combinable:
|
package/dist/index.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export interface ListFilesOptions {
|
|
|
62
62
|
includeDateTo?: string | Date;
|
|
63
63
|
includeDateType?: ListFilesDateType;
|
|
64
64
|
applyOrderIndex?: boolean;
|
|
65
|
+
implicitOrderDefaultIndex?: number;
|
|
65
66
|
}
|
|
66
67
|
/**
|
|
67
68
|
* Types for getFileContent()
|
|
@@ -70,6 +71,9 @@ export interface FileContent {
|
|
|
70
71
|
content: string;
|
|
71
72
|
path: string;
|
|
72
73
|
}
|
|
74
|
+
export interface FileContentPositioned extends FileContent {
|
|
75
|
+
position: number;
|
|
76
|
+
}
|
|
73
77
|
export interface GetFileContentOptions {
|
|
74
78
|
seek?: FileSeekOptions;
|
|
75
79
|
}
|
|
@@ -77,6 +81,13 @@ export interface GetFileContentOptions {
|
|
|
77
81
|
* Types for seek options (getFileContent() and batchGetFileContents())
|
|
78
82
|
*/
|
|
79
83
|
export declare const SEEK_TO_FROM_LINE_STARTS_WITH = "$seek_from_line_starts_with";
|
|
84
|
+
/**
|
|
85
|
+
* Position of an entry that the file order index of its parent directory does \
|
|
86
|
+
* not name (or whose directory holds no order at all). Reported by \
|
|
87
|
+
* getFileContent(), and accepted by reorderFile() to drop an entry from the \
|
|
88
|
+
* index again.
|
|
89
|
+
*/
|
|
90
|
+
export declare const ORDER_POSITION_UNLISTED = -1;
|
|
80
91
|
export interface FileSeekOptions {
|
|
81
92
|
from_line_starts_with?: Array<string>;
|
|
82
93
|
to_line_starts_with?: Array<string> | typeof SEEK_TO_FROM_LINE_STARTS_WITH;
|
|
@@ -113,6 +124,15 @@ export interface FileMovePayload {
|
|
|
113
124
|
message?: string;
|
|
114
125
|
allowPrefixPathRecurse?: boolean;
|
|
115
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Types for reorderFile()
|
|
129
|
+
*/
|
|
130
|
+
export interface FileReorderPayload {
|
|
131
|
+
author: CommitAuthor;
|
|
132
|
+
position: number;
|
|
133
|
+
message?: string;
|
|
134
|
+
allowPrefixPath?: boolean;
|
|
135
|
+
}
|
|
116
136
|
/**
|
|
117
137
|
* Types for getFileOrder()
|
|
118
138
|
*/
|
|
@@ -206,6 +226,20 @@ export interface FileContentBatch {
|
|
|
206
226
|
export interface BatchGetFileContentsOptions {
|
|
207
227
|
seek?: FileSeekOptions;
|
|
208
228
|
}
|
|
229
|
+
/**
|
|
230
|
+
* Types for batchReplayHook()
|
|
231
|
+
*/
|
|
232
|
+
export type HookReplayDirection = "delete" | "create";
|
|
233
|
+
export interface HookReplay {
|
|
234
|
+
commit_sha: string;
|
|
235
|
+
files: number;
|
|
236
|
+
}
|
|
237
|
+
export interface BatchReplayHookOptions {
|
|
238
|
+
files?: Array<string>;
|
|
239
|
+
prefixPath?: string;
|
|
240
|
+
includeHiddenFiles?: boolean;
|
|
241
|
+
delayMs?: number;
|
|
242
|
+
}
|
|
209
243
|
/**
|
|
210
244
|
* Git HTTP FS client, manages files and commits over the Git HTTP FS HTTP API.
|
|
211
245
|
*/
|
|
@@ -226,8 +260,9 @@ export declare class GitHTTPFSClient {
|
|
|
226
260
|
deleteTenant(collectionId: string, tenantId: string): Promise<void>;
|
|
227
261
|
/** List all tracked files (paths) */
|
|
228
262
|
listFiles(collectionId: string, tenantId: string, options?: ListFilesOptions): Promise<FileList>;
|
|
229
|
-
/** Read file content
|
|
230
|
-
|
|
263
|
+
/** Read file content, plus the position the file holds in the file order of \
|
|
264
|
+
its parent directory (optionally narrowed to a line window with seek) */
|
|
265
|
+
getFileContent(collectionId: string, tenantId: string, path: string, options?: GetFileContentOptions): Promise<FileContentPositioned>;
|
|
231
266
|
/** Check if a file exists in HEAD without reading its content (with \
|
|
232
267
|
'checkPrefixPath' enabled, a directory at that path counts as \
|
|
233
268
|
existing too) */
|
|
@@ -242,6 +277,14 @@ export declare class GitHTTPFSClient {
|
|
|
242
277
|
payload, the path may name a directory, whose whole subtree is \
|
|
243
278
|
relocated in a single commit) */
|
|
244
279
|
moveFile(collectionId: string, tenantId: string, path: string, payload: FileMovePayload): Promise<void>;
|
|
280
|
+
/** Give the file the numerical 'position' from the payload in the file order \
|
|
281
|
+
of its parent directory, shifting the entries at and after it down by \
|
|
282
|
+
one (a position past the end of the order is clamped to its tail, and \
|
|
283
|
+
ORDER_POSITION_UNLISTED drops the file from the order instead, leaving \
|
|
284
|
+
the file itself alone). With 'allowPrefixPath' enabled in the payload, \
|
|
285
|
+
the path may name a directory, which gets positioned among its \
|
|
286
|
+
siblings */
|
|
287
|
+
reorderFile(collectionId: string, tenantId: string, path: string, payload: FileReorderPayload): Promise<void>;
|
|
245
288
|
/** Read the file order stored for a directory (an empty directory means \
|
|
246
289
|
the repository root; rejects with a 404 error when that directory \
|
|
247
290
|
holds no order) */
|
|
@@ -273,5 +316,16 @@ export declare class GitHTTPFSClient {
|
|
|
273
316
|
path does not exist; an optional seek window applies to every file, \
|
|
274
317
|
overridable per file with a { path, seek } entry) */
|
|
275
318
|
batchGetFileContents(collectionId: string, tenantId: string, paths: Array<FileContentBatchPath>, options?: BatchGetFileContentsOptions): Promise<FileContentBatch>;
|
|
319
|
+
/** Replay file webhooks, so a downstream mirror that drifted out of sync \
|
|
320
|
+
can converge again (nothing is committed: this only enqueues hook \
|
|
321
|
+
work). The 'files' option holds the paths the mirror currently holds, \
|
|
322
|
+
which the server intersects with what it holds itself, and \
|
|
323
|
+
'direction' picks which side of that intersection is replayed: \
|
|
324
|
+
"delete" fires a 'file.deleted' for everything outside it (the \
|
|
325
|
+
mirror's orphans), "create" a 'file.created' for everything inside it \
|
|
326
|
+
(rows the mirror is missing, or whose content went stale). Omitting \
|
|
327
|
+
'files' defaults it to every file the server holds in scope, which \
|
|
328
|
+
makes "create" a whole-scope re-sync and "delete" a no-op */
|
|
329
|
+
batchReplayHook(collectionId: string, tenantId: string, direction: HookReplayDirection, options?: BatchReplayHookOptions): Promise<HookReplay>;
|
|
276
330
|
}
|
|
277
331
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,iBAAiB;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,sBAAsB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC9B,IAAI,EAAE,WAAW,CAAC;CACnB;AAED,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,uBAAuB,CAAC;AAExE,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,CAAC;AA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AAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,mBAAmB,EAAE,OAAO,GAAE,sBAA2B,GAAG,OAAO,CAAC,UAAU,CAAC,CAgBvJ;CACF"}
|
package/dist/index.js
CHANGED
|
@@ -8,6 +8,13 @@
|
|
|
8
8
|
* Types for seek options (getFileContent() and batchGetFileContents())
|
|
9
9
|
*/
|
|
10
10
|
export const SEEK_TO_FROM_LINE_STARTS_WITH = "$seek_from_line_starts_with";
|
|
11
|
+
/**
|
|
12
|
+
* Position of an entry that the file order index of its parent directory does \
|
|
13
|
+
* not name (or whose directory holds no order at all). Reported by \
|
|
14
|
+
* getFileContent(), and accepted by reorderFile() to drop an entry from the \
|
|
15
|
+
* index again.
|
|
16
|
+
*/
|
|
17
|
+
export const ORDER_POSITION_UNLISTED = -1;
|
|
11
18
|
/** Defines the API version */
|
|
12
19
|
const VERSION = "v1";
|
|
13
20
|
/** Defines all HTTP methods */
|
|
@@ -115,7 +122,7 @@ export class GitHTTPFSClient {
|
|
|
115
122
|
}
|
|
116
123
|
/** List all tracked files (paths) */
|
|
117
124
|
async listFiles(collectionId, tenantId, options = {}) {
|
|
118
|
-
const { page = 1, perPage = 100, prefixPath, maximumDepth, includeHiddenFiles, fileNameStartsWith, includeDateFrom, includeDateTo, includeDateType, applyOrderIndex } = options;
|
|
125
|
+
const { page = 1, perPage = 100, prefixPath, maximumDepth, includeHiddenFiles, fileNameStartsWith, includeDateFrom, includeDateTo, includeDateType, applyOrderIndex, implicitOrderDefaultIndex } = options;
|
|
119
126
|
const params = {
|
|
120
127
|
page: page.toString(),
|
|
121
128
|
per_page: perPage.toString(),
|
|
@@ -136,11 +143,18 @@ export class GitHTTPFSClient {
|
|
|
136
143
|
include_date_type: includeDateType,
|
|
137
144
|
// Every level of the listing gets ordered by the file order stored for \
|
|
138
145
|
// the directory it belongs to (see getFileOrder())
|
|
139
|
-
apply_order_index: applyOrderIndex !== undefined ? applyOrderIndex.toString() : undefined
|
|
146
|
+
apply_order_index: applyOrderIndex !== undefined ? applyOrderIndex.toString() : undefined,
|
|
147
|
+
// Entries that no file order names are treated as holding this index, \
|
|
148
|
+
// which lifts them out of the tail they land in by default (only read \
|
|
149
|
+
// when the order index is applied)
|
|
150
|
+
implicit_order_default_index: implicitOrderDefaultIndex !== undefined
|
|
151
|
+
? implicitOrderDefaultIndex.toString()
|
|
152
|
+
: undefined
|
|
140
153
|
};
|
|
141
154
|
return this.request(`${collectionId}/${tenantId}/files`, GET, undefined, params);
|
|
142
155
|
}
|
|
143
|
-
/** Read file content
|
|
156
|
+
/** Read file content, plus the position the file holds in the file order of \
|
|
157
|
+
its parent directory (optionally narrowed to a line window with seek) */
|
|
144
158
|
async getFileContent(collectionId, tenantId, path, options = {}) {
|
|
145
159
|
const { seek } = options;
|
|
146
160
|
// Prefix lists travel as JSON-array strings in query parameters, \
|
|
@@ -204,6 +218,20 @@ export class GitHTTPFSClient {
|
|
|
204
218
|
allow_prefix_path_recurse: allowPrefixPathRecurse
|
|
205
219
|
});
|
|
206
220
|
}
|
|
221
|
+
/** Give the file the numerical 'position' from the payload in the file order \
|
|
222
|
+
of its parent directory, shifting the entries at and after it down by \
|
|
223
|
+
one (a position past the end of the order is clamped to its tail, and \
|
|
224
|
+
ORDER_POSITION_UNLISTED drops the file from the order instead, leaving \
|
|
225
|
+
the file itself alone). With 'allowPrefixPath' enabled in the payload, \
|
|
226
|
+
the path may name a directory, which gets positioned among its \
|
|
227
|
+
siblings */
|
|
228
|
+
async reorderFile(collectionId, tenantId, path, payload) {
|
|
229
|
+
const { allowPrefixPath, ...basePayload } = payload;
|
|
230
|
+
return this.request(`${collectionId}/${tenantId}/files/${path}/reorder`, POST, {
|
|
231
|
+
...basePayload,
|
|
232
|
+
allow_prefix_path: allowPrefixPath
|
|
233
|
+
});
|
|
234
|
+
}
|
|
207
235
|
// --- Order Operations ---
|
|
208
236
|
/** Read the file order stored for a directory (an empty directory means \
|
|
209
237
|
the repository root; rejects with a 404 error when that directory \
|
|
@@ -268,5 +296,27 @@ export class GitHTTPFSClient {
|
|
|
268
296
|
seek
|
|
269
297
|
});
|
|
270
298
|
}
|
|
299
|
+
/** Replay file webhooks, so a downstream mirror that drifted out of sync \
|
|
300
|
+
can converge again (nothing is committed: this only enqueues hook \
|
|
301
|
+
work). The 'files' option holds the paths the mirror currently holds, \
|
|
302
|
+
which the server intersects with what it holds itself, and \
|
|
303
|
+
'direction' picks which side of that intersection is replayed: \
|
|
304
|
+
"delete" fires a 'file.deleted' for everything outside it (the \
|
|
305
|
+
mirror's orphans), "create" a 'file.created' for everything inside it \
|
|
306
|
+
(rows the mirror is missing, or whose content went stale). Omitting \
|
|
307
|
+
'files' defaults it to every file the server holds in scope, which \
|
|
308
|
+
makes "create" a whole-scope re-sync and "delete" a no-op */
|
|
309
|
+
async batchReplayHook(collectionId, tenantId, direction, options = {}) {
|
|
310
|
+
const { files, prefixPath, includeHiddenFiles, delayMs } = options;
|
|
311
|
+
return this.request(`${collectionId}/${tenantId}/batch/replay/hook`, POST, {
|
|
312
|
+
direction,
|
|
313
|
+
// Omitted entirely when unset (an empty list is rejected by the \
|
|
314
|
+
// server, where omitting defaults to every file it holds)
|
|
315
|
+
files,
|
|
316
|
+
prefix_path: prefixPath,
|
|
317
|
+
include_hidden_files: includeHiddenFiles,
|
|
318
|
+
delay_ms: delayMs
|
|
319
|
+
});
|
|
320
|
+
}
|
|
271
321
|
}
|
|
272
322
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA+FH;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,6BAA6B,CAAC;AAE3E;;;;;GAKG;AACH,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
1
1
|
{
|
|
2
2
|
"name": "githttp-fs-client",
|
|
3
3
|
"description": "Git HTTP FS client for Node. Used in pair with Git HTTP FS, a git-backed content management database served over HTTP.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.10.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/crisp-oss/node-githttp-fs-client",
|
|
7
7
|
"license": "MIT",
|