githttp-fs-client 1.9.1 → 1.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -2
- package/dist/index.d.ts +40 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -174,16 +174,21 @@ await client.moveFile("notes", "t_1", "articles", {
|
|
|
174
174
|
|
|
175
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
176
|
|
|
177
|
-
`position` is zero-based, so `0` puts the file first, and it counts against the *
|
|
177
|
+
`position` is zero-based, so `0` puts the file first, and it counts against the *whole parent directory* rather than against the entries the order happens to name: the order is materialized over every entry the directory holds before the move, so `position` means the row the caller was looking at. A position past the end is clamped to the tail rather than rejected. A directory holding no order yet gets one covering it — unlike the implicit upkeep that only ever edits an existing order, asking for a position is explicit, so the first reorder in a directory pins all of its entries, which is what makes the next one land where the caller expects. A request whose result matches the stored order creates no commit.
|
|
178
|
+
|
|
179
|
+
Pass `implicitOrderDefaultIndex` (a number, unset by default) to say where the siblings the order does not name yet are folded in when it is materialized. It is the same number, with the same meaning, as [the `listFiles()` option of that name](#listfilescollectionid-tenantid-options-promisefilelist): unset leaves them behind everything the order names, `0` (or any negative value) lifts them above it, `2` slots them between its second and third entries. A caller reordering inside a rendered listing passes back whatever it rendered with, and the order it gets is the sequence it was showing. It is inert with `position: ORDER_POSITION_UNLISTED`, which materializes nothing.
|
|
180
|
+
|
|
181
|
+
Pass `implicitAllowHiddenFiles: true` to fold hidden (dot-prefixed) siblings into the materialized order as well. It defaults to `false`, which keeps them out — the same judgement `includeHiddenFiles: false` makes on a listing, and the right default for an order the server generates from a directory rather than one the caller dictates entry by entry. A hidden entry the order *already* names is kept regardless: it was pinned deliberately, and positioning an unrelated file is no occasion to unpin it. The flag is **required** (as `true`, else a `400`) when the file being positioned is itself hidden, since pinning a dot-file has to be asked for. Like `implicitOrderDefaultIndex` it is inert with `position: ORDER_POSITION_UNLISTED`, which materializes nothing and only ever unpins — so a hidden entry pinned earlier can always be dropped without the flag.
|
|
178
182
|
|
|
179
183
|
```ts
|
|
180
184
|
await client.reorderFile("notes", "t_1", "articles/hello.md", {
|
|
181
185
|
position: 0,
|
|
186
|
+
implicitOrderDefaultIndex: 0,
|
|
182
187
|
author: { name: "Jane Doe", email: "jane@doe.com" }
|
|
183
188
|
});
|
|
184
189
|
```
|
|
185
190
|
|
|
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.
|
|
191
|
+
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, and the order is *not* materialized (unpinning one entry is no reason to pin every other one). When it was the order's last entry, the order is dropped entirely.
|
|
187
192
|
|
|
188
193
|
```ts
|
|
189
194
|
import { ORDER_POSITION_UNLISTED } from "githttp-fs-client";
|
|
@@ -208,6 +213,8 @@ await client.reorderFile("notes", "t_1", "articles/getting-started", {
|
|
|
208
213
|
|
|
209
214
|
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.
|
|
210
215
|
|
|
216
|
+
Hidden (dot-prefixed) entries stay out of an order unless asked for, since an order is a presentation order and a dot-file is by convention not presented: `writeFileOrder()` rejects one without `allowHiddenFiles: true`, and `reorderFile()` leaves hidden siblings out of the order it materializes without `implicitAllowHiddenFiles: true`. Neither traps them: an order that already names a hidden entry keeps it, and `reorderFile()` can always unpin one.
|
|
217
|
+
|
|
211
218
|
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).
|
|
212
219
|
|
|
213
220
|
#### `getFileOrder(collectionId, tenantId, directory?): Promise<FileOrder>`
|
|
@@ -225,9 +232,12 @@ Replaces a directory's file order, committing the change. The payload holds the
|
|
|
225
232
|
|
|
226
233
|
`order` must hold at least one entry (an empty order is a `400` — that is what `deleteFileOrder()` is for), and each entry must be a leaf name existing in that directory: a nested path, a duplicate, or a name pointing at nothing all reject with a `400`. A trailing slash marking a directory is accepted and normalized. Writing the order the directory already holds creates no commit.
|
|
227
234
|
|
|
235
|
+
A hidden (dot-prefixed) entry rejects with a `400` unless the payload sets `allowHiddenFiles: true`: an order is a presentation order, and a dot-file is by convention not presented, so pinning one has to be asked for. It rejects rather than being silently dropped — the caller sent that name and that position, and storing a different order than the one they wrote would be worse than the error. With the flag on, hidden entries are ordinary entries, subject to every other rule unchanged.
|
|
236
|
+
|
|
228
237
|
```ts
|
|
229
238
|
await client.writeFileOrder("notes", "t_1", "articles", {
|
|
230
239
|
order: ["intro.md", "getting-started/", "advanced.mdx"],
|
|
240
|
+
allowHiddenFiles: false,
|
|
231
241
|
author: { name: "Jane Doe", email: "jane@doe.com" },
|
|
232
242
|
message: "chore: order articles"
|
|
233
243
|
});
|
|
@@ -300,6 +310,41 @@ const batch = await client.batchGetFileContents("notes", "t_1", [
|
|
|
300
310
|
// { files: [{ path, content }, null, { path, content }] }
|
|
301
311
|
```
|
|
302
312
|
|
|
313
|
+
#### `batchReplayHook(collectionId, tenantId, direction, options?): Promise<HookReplay>`
|
|
314
|
+
|
|
315
|
+
Options: `files`, `prefixPath`, `includeHiddenFiles`, `delayMs`.
|
|
316
|
+
|
|
317
|
+
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.
|
|
318
|
+
|
|
319
|
+
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:
|
|
320
|
+
|
|
321
|
+
| `direction` | Replays | Which files | Repairs |
|
|
322
|
+
|-------------|---------|-------------|---------|
|
|
323
|
+
| `"delete"` | `file.deleted` | Everything **outside** the intersection — the mirror holds them, the server does not | Orphaned rows the mirror kept after a missed deletion |
|
|
324
|
+
| `"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 |
|
|
325
|
+
|
|
326
|
+
`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).
|
|
327
|
+
|
|
328
|
+
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.
|
|
329
|
+
|
|
330
|
+
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.
|
|
331
|
+
|
|
332
|
+
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.
|
|
333
|
+
|
|
334
|
+
```ts
|
|
335
|
+
// Repair orphans: the mirror holds these three, drop whichever the server does not
|
|
336
|
+
const orphans = await client.batchReplayHook("notes", "t_1", "delete", {
|
|
337
|
+
files: ["articles/hello.md", "articles/removed.md", "articles/stale.md"]
|
|
338
|
+
});
|
|
339
|
+
// { commit_sha: "a3f9c1d...", files: 2 }
|
|
340
|
+
|
|
341
|
+
// Full re-sync of one folder, throttled to 10 hooks per second
|
|
342
|
+
const resync = await client.batchReplayHook("notes", "t_1", "create", {
|
|
343
|
+
prefixPath: "articles/",
|
|
344
|
+
delayMs: 100
|
|
345
|
+
});
|
|
346
|
+
```
|
|
347
|
+
|
|
303
348
|
### Seek options
|
|
304
349
|
|
|
305
350
|
`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
|
@@ -130,6 +130,8 @@ export interface FileMovePayload {
|
|
|
130
130
|
export interface FileReorderPayload {
|
|
131
131
|
author: CommitAuthor;
|
|
132
132
|
position: number;
|
|
133
|
+
implicitOrderDefaultIndex?: number;
|
|
134
|
+
implicitAllowHiddenFiles?: boolean;
|
|
133
135
|
message?: string;
|
|
134
136
|
allowPrefixPath?: boolean;
|
|
135
137
|
}
|
|
@@ -147,6 +149,7 @@ export interface FileOrderWritePayload {
|
|
|
147
149
|
author: CommitAuthor;
|
|
148
150
|
order: Array<string>;
|
|
149
151
|
message?: string;
|
|
152
|
+
allowHiddenFiles?: boolean;
|
|
150
153
|
}
|
|
151
154
|
/**
|
|
152
155
|
* Types for deleteFileOrder()
|
|
@@ -226,6 +229,20 @@ export interface FileContentBatch {
|
|
|
226
229
|
export interface BatchGetFileContentsOptions {
|
|
227
230
|
seek?: FileSeekOptions;
|
|
228
231
|
}
|
|
232
|
+
/**
|
|
233
|
+
* Types for batchReplayHook()
|
|
234
|
+
*/
|
|
235
|
+
export type HookReplayDirection = "delete" | "create";
|
|
236
|
+
export interface HookReplay {
|
|
237
|
+
commit_sha: string;
|
|
238
|
+
files: number;
|
|
239
|
+
}
|
|
240
|
+
export interface BatchReplayHookOptions {
|
|
241
|
+
files?: Array<string>;
|
|
242
|
+
prefixPath?: string;
|
|
243
|
+
includeHiddenFiles?: boolean;
|
|
244
|
+
delayMs?: number;
|
|
245
|
+
}
|
|
229
246
|
/**
|
|
230
247
|
* Git HTTP FS client, manages files and commits over the Git HTTP FS HTTP API.
|
|
231
248
|
*/
|
|
@@ -267,9 +284,16 @@ export declare class GitHTTPFSClient {
|
|
|
267
284
|
of its parent directory, shifting the entries at and after it down by \
|
|
268
285
|
one (a position past the end of the order is clamped to its tail, and \
|
|
269
286
|
ORDER_POSITION_UNLISTED drops the file from the order instead, leaving \
|
|
270
|
-
the file itself alone).
|
|
271
|
-
the
|
|
272
|
-
|
|
287
|
+
the file itself alone). The order is first materialized over every \
|
|
288
|
+
entry the directory holds, so the position counts against what the \
|
|
289
|
+
caller sees, with 'implicitOrderDefaultIndex' saying where the \
|
|
290
|
+
not-yet-ordered siblings are folded in (same meaning as on \
|
|
291
|
+
listFiles(), and inert with ORDER_POSITION_UNLISTED) and \
|
|
292
|
+
'implicitAllowHiddenFiles' deciding whether hidden siblings are \
|
|
293
|
+
folded in at all (defaults to false, and required when the positioned \
|
|
294
|
+
entry is itself hidden). With 'allowPrefixPath' enabled in the \
|
|
295
|
+
payload, the path may name a directory, which gets positioned among \
|
|
296
|
+
its siblings */
|
|
273
297
|
reorderFile(collectionId: string, tenantId: string, path: string, payload: FileReorderPayload): Promise<void>;
|
|
274
298
|
/** Read the file order stored for a directory (an empty directory means \
|
|
275
299
|
the repository root; rejects with a 404 error when that directory \
|
|
@@ -278,7 +302,8 @@ export declare class GitHTTPFSClient {
|
|
|
278
302
|
/** Replace the file order of a directory (an empty directory means the \
|
|
279
303
|
repository root). The payload holds the 'order' entries (leaf names, \
|
|
280
304
|
which must all exist in that directory), the commit 'author' and an \
|
|
281
|
-
optional 'message'
|
|
305
|
+
optional 'message'. A hidden (dot-prefixed) entry is rejected unless \
|
|
306
|
+
'allowHiddenFiles' is enabled in the payload */
|
|
282
307
|
writeFileOrder(collectionId: string, tenantId: string, directory: string, payload: FileOrderWritePayload): Promise<void>;
|
|
283
308
|
/** Drop the file order of a directory, reverting it to the default \
|
|
284
309
|
listing order (rejects with a 404 error when that directory holds no \
|
|
@@ -302,5 +327,16 @@ export declare class GitHTTPFSClient {
|
|
|
302
327
|
path does not exist; an optional seek window applies to every file, \
|
|
303
328
|
overridable per file with a { path, seek } entry) */
|
|
304
329
|
batchGetFileContents(collectionId: string, tenantId: string, paths: Array<FileContentBatchPath>, options?: BatchGetFileContentsOptions): Promise<FileContentBatch>;
|
|
330
|
+
/** Replay file webhooks, so a downstream mirror that drifted out of sync \
|
|
331
|
+
can converge again (nothing is committed: this only enqueues hook \
|
|
332
|
+
work). The 'files' option holds the paths the mirror currently holds, \
|
|
333
|
+
which the server intersects with what it holds itself, and \
|
|
334
|
+
'direction' picks which side of that intersection is replayed: \
|
|
335
|
+
"delete" fires a 'file.deleted' for everything outside it (the \
|
|
336
|
+
mirror's orphans), "create" a 'file.created' for everything inside it \
|
|
337
|
+
(rows the mirror is missing, or whose content went stale). Omitting \
|
|
338
|
+
'files' defaults it to every file the server holds in scope, which \
|
|
339
|
+
makes "create" a whole-scope re-sync and "delete" a no-op */
|
|
340
|
+
batchReplayHook(collectionId: string, tenantId: string, direction: HookReplayDirection, options?: BatchReplayHookOptions): Promise<HookReplay>;
|
|
305
341
|
}
|
|
306
342
|
//# 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;CACn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;IAED,sBAAsB;IAChB,YAAY,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAInH;IAED;sDACkD;IAC5C,cAAc,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAIvH;IAID;;8DAE0D;IACpD,oBAAoB,CAAC,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,oBAAoB,CAAC,EAAE,OAAO,GAAE,2BAAgC,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAS3K;IAED;;;;;;;;;sEASkE;IAC5D,eAAe,CAAC,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
|
@@ -222,13 +222,22 @@ export class GitHTTPFSClient {
|
|
|
222
222
|
of its parent directory, shifting the entries at and after it down by \
|
|
223
223
|
one (a position past the end of the order is clamped to its tail, and \
|
|
224
224
|
ORDER_POSITION_UNLISTED drops the file from the order instead, leaving \
|
|
225
|
-
the file itself alone).
|
|
226
|
-
the
|
|
227
|
-
|
|
225
|
+
the file itself alone). The order is first materialized over every \
|
|
226
|
+
entry the directory holds, so the position counts against what the \
|
|
227
|
+
caller sees, with 'implicitOrderDefaultIndex' saying where the \
|
|
228
|
+
not-yet-ordered siblings are folded in (same meaning as on \
|
|
229
|
+
listFiles(), and inert with ORDER_POSITION_UNLISTED) and \
|
|
230
|
+
'implicitAllowHiddenFiles' deciding whether hidden siblings are \
|
|
231
|
+
folded in at all (defaults to false, and required when the positioned \
|
|
232
|
+
entry is itself hidden). With 'allowPrefixPath' enabled in the \
|
|
233
|
+
payload, the path may name a directory, which gets positioned among \
|
|
234
|
+
its siblings */
|
|
228
235
|
async reorderFile(collectionId, tenantId, path, payload) {
|
|
229
|
-
const { allowPrefixPath, ...basePayload } = payload;
|
|
236
|
+
const { allowPrefixPath, implicitOrderDefaultIndex, implicitAllowHiddenFiles, ...basePayload } = payload;
|
|
230
237
|
return this.request(`${collectionId}/${tenantId}/files/${path}/reorder`, POST, {
|
|
231
238
|
...basePayload,
|
|
239
|
+
implicit_order_default_index: implicitOrderDefaultIndex,
|
|
240
|
+
implicit_allow_hidden_files: implicitAllowHiddenFiles,
|
|
232
241
|
allow_prefix_path: allowPrefixPath
|
|
233
242
|
});
|
|
234
243
|
}
|
|
@@ -242,9 +251,14 @@ export class GitHTTPFSClient {
|
|
|
242
251
|
/** Replace the file order of a directory (an empty directory means the \
|
|
243
252
|
repository root). The payload holds the 'order' entries (leaf names, \
|
|
244
253
|
which must all exist in that directory), the commit 'author' and an \
|
|
245
|
-
optional 'message'
|
|
254
|
+
optional 'message'. A hidden (dot-prefixed) entry is rejected unless \
|
|
255
|
+
'allowHiddenFiles' is enabled in the payload */
|
|
246
256
|
async writeFileOrder(collectionId, tenantId, directory, payload) {
|
|
247
|
-
|
|
257
|
+
const { allowHiddenFiles, ...basePayload } = payload;
|
|
258
|
+
return this.request(this.orderPath(collectionId, tenantId, directory), PUT, {
|
|
259
|
+
...basePayload,
|
|
260
|
+
allow_hidden_files: allowHiddenFiles
|
|
261
|
+
});
|
|
248
262
|
}
|
|
249
263
|
/** Drop the file order of a directory, reverting it to the default \
|
|
250
264
|
listing order (rejects with a 404 error when that directory holds no \
|
|
@@ -296,5 +310,27 @@ export class GitHTTPFSClient {
|
|
|
296
310
|
seek
|
|
297
311
|
});
|
|
298
312
|
}
|
|
313
|
+
/** Replay file webhooks, so a downstream mirror that drifted out of sync \
|
|
314
|
+
can converge again (nothing is committed: this only enqueues hook \
|
|
315
|
+
work). The 'files' option holds the paths the mirror currently holds, \
|
|
316
|
+
which the server intersects with what it holds itself, and \
|
|
317
|
+
'direction' picks which side of that intersection is replayed: \
|
|
318
|
+
"delete" fires a 'file.deleted' for everything outside it (the \
|
|
319
|
+
mirror's orphans), "create" a 'file.created' for everything inside it \
|
|
320
|
+
(rows the mirror is missing, or whose content went stale). Omitting \
|
|
321
|
+
'files' defaults it to every file the server holds in scope, which \
|
|
322
|
+
makes "create" a whole-scope re-sync and "delete" a no-op */
|
|
323
|
+
async batchReplayHook(collectionId, tenantId, direction, options = {}) {
|
|
324
|
+
const { files, prefixPath, includeHiddenFiles, delayMs } = options;
|
|
325
|
+
return this.request(`${collectionId}/${tenantId}/batch/replay/hook`, POST, {
|
|
326
|
+
direction,
|
|
327
|
+
// Omitted entirely when unset (an empty list is rejected by the \
|
|
328
|
+
// server, where omitting defaults to every file it holds)
|
|
329
|
+
files,
|
|
330
|
+
prefix_path: prefixPath,
|
|
331
|
+
include_hidden_files: includeHiddenFiles,
|
|
332
|
+
delay_ms: delayMs
|
|
333
|
+
});
|
|
334
|
+
}
|
|
299
335
|
}
|
|
300
336
|
//# 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;AA+FH;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,6BAA6B,CAAC;AAE3E;;;;;GAKG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,CAAC;
|
|
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,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,CAAC;AAoL1C,8BAA8B;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,UAAU;YACvB,oBAAoB,EAAE,kBAAkB;YACxC,QAAQ,EAAE,OAAO;SAClB,CACF,CAAC;IACJ,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/crisp-oss/node-githttp-fs-client",
|
|
7
7
|
"license": "MIT",
|