githttp-fs-client 1.8.0 → 1.9.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 +85 -4
- package/dist/index.d.ts +72 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +62 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,12 +71,16 @@ 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`.
|
|
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
|
|
|
78
78
|
Pass `includeDateFrom` and/or `includeDateTo` (a `Date`, or an RFC 3339 date-time string) to narrow the listing to files whose git date falls in the half-open window `[from, to)` — `from` inclusive, `to` exclusive. Each bound is independently optional; when both are given, `from` must be strictly before `to` (else `400`). `includeDateType` selects which date is compared: `"updated"` (the default, most recent commit touching the file) or `"created"` (oldest commit introducing it under its current path, renames not followed). Beware that, unlike every other listing mode, a date filter cannot be answered from git trees alone: it walks commit history, so its cost scales with history length (`"created"` always walks to the root of history). The filter is only active — and only paid for — when at least one bound is given.
|
|
79
79
|
|
|
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
|
+
|
|
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
|
+
|
|
80
84
|
```ts
|
|
81
85
|
const list = await client.listFiles("notes", "t_1", {
|
|
82
86
|
page: 1, perPage: 100, prefixPath: "articles/", maximumDepth: 2
|
|
@@ -90,13 +94,15 @@ const recent = await client.listFiles("notes", "t_1", {
|
|
|
90
94
|
});
|
|
91
95
|
```
|
|
92
96
|
|
|
93
|
-
#### `getFileContent(collectionId, tenantId, path, seek?): Promise<
|
|
97
|
+
#### `getFileContent(collectionId, tenantId, path, seek?): Promise<FileContentPositioned>`
|
|
94
98
|
|
|
95
99
|
Reads the content of a file. An optional `seek` object narrows `content` to a line window (see [Seek options](#seek-options)).
|
|
96
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
|
+
|
|
97
103
|
```ts
|
|
98
104
|
const file = await client.getFileContent("notes", "t_1", "articles/hello.md");
|
|
99
|
-
// { path: "articles/hello.md", content: "..." }
|
|
105
|
+
// { path: "articles/hello.md", content: "...", position: 2 }
|
|
100
106
|
```
|
|
101
107
|
|
|
102
108
|
#### `fileExists(collectionId, tenantId, path, options?): Promise<boolean>`
|
|
@@ -164,6 +170,81 @@ await client.moveFile("notes", "t_1", "articles", {
|
|
|
164
170
|
});
|
|
165
171
|
```
|
|
166
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
|
+
|
|
207
|
+
### Order operations
|
|
208
|
+
|
|
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.
|
|
210
|
+
|
|
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).
|
|
212
|
+
|
|
213
|
+
#### `getFileOrder(collectionId, tenantId, directory?): Promise<FileOrder>`
|
|
214
|
+
|
|
215
|
+
Reads the file order stored for a directory. Entries come back in the canonical spelling the server stores: directories with a trailing slash, files without. A directory holding no order rejects with a `404` error — not an empty `order` array — so "unordered" and "ordered as nothing" cannot be confused.
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
const order = await client.getFileOrder("notes", "t_1", "articles");
|
|
219
|
+
// { directory: "articles", order: ["intro.md", "getting-started/", "advanced.mdx"] }
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
#### `writeFileOrder(collectionId, tenantId, directory, payload): Promise<void>`
|
|
223
|
+
|
|
224
|
+
Replaces a directory's file order, committing the change. The payload holds the `order` entries, the commit `author` and an optional `message`.
|
|
225
|
+
|
|
226
|
+
`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
|
+
|
|
228
|
+
```ts
|
|
229
|
+
await client.writeFileOrder("notes", "t_1", "articles", {
|
|
230
|
+
order: ["intro.md", "getting-started/", "advanced.mdx"],
|
|
231
|
+
author: { name: "Jane Doe", email: "jane@doe.com" },
|
|
232
|
+
message: "chore: order articles"
|
|
233
|
+
});
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
#### `deleteFileOrder(collectionId, tenantId, directory, payload): Promise<void>`
|
|
237
|
+
|
|
238
|
+
Drops a directory's file order, reverting it to the default listing order, committing the change. The payload holds the commit `author` and an optional `message`. A directory holding no order rejects with a `404` error.
|
|
239
|
+
|
|
240
|
+
```ts
|
|
241
|
+
await client.deleteFileOrder("notes", "t_1", "articles", {
|
|
242
|
+
author: { name: "Jane Doe", email: "jane@doe.com" }
|
|
243
|
+
});
|
|
244
|
+
```
|
|
245
|
+
|
|
246
|
+
Note that an order stays honest on its own: deleting or moving a file updates the orders naming it, in the very same commit (a rename within one directory keeps its position, a move out drops it).
|
|
247
|
+
|
|
167
248
|
### Commit operations
|
|
168
249
|
|
|
169
250
|
#### `listCommits(collectionId, tenantId, page?, perPage?, filePath?): Promise<CommitList>`
|
|
@@ -208,7 +289,7 @@ await client.rollbackCommit("notes", "t_1", "9b924c1d...", {
|
|
|
208
289
|
|
|
209
290
|
#### `batchGetFileContents(collectionId, tenantId, paths, seek?): Promise<FileContentBatch>`
|
|
210
291
|
|
|
211
|
-
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.
|
|
212
293
|
|
|
213
294
|
```ts
|
|
214
295
|
const batch = await client.batchGetFileContents("notes", "t_1", [
|
package/dist/index.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ export interface ListFilesOptions {
|
|
|
61
61
|
includeDateFrom?: string | Date;
|
|
62
62
|
includeDateTo?: string | Date;
|
|
63
63
|
includeDateType?: ListFilesDateType;
|
|
64
|
+
applyOrderIndex?: boolean;
|
|
65
|
+
implicitOrderDefaultIndex?: number;
|
|
64
66
|
}
|
|
65
67
|
/**
|
|
66
68
|
* Types for getFileContent()
|
|
@@ -69,6 +71,9 @@ export interface FileContent {
|
|
|
69
71
|
content: string;
|
|
70
72
|
path: string;
|
|
71
73
|
}
|
|
74
|
+
export interface FileContentPositioned extends FileContent {
|
|
75
|
+
position: number;
|
|
76
|
+
}
|
|
72
77
|
export interface GetFileContentOptions {
|
|
73
78
|
seek?: FileSeekOptions;
|
|
74
79
|
}
|
|
@@ -76,6 +81,13 @@ export interface GetFileContentOptions {
|
|
|
76
81
|
* Types for seek options (getFileContent() and batchGetFileContents())
|
|
77
82
|
*/
|
|
78
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;
|
|
79
91
|
export interface FileSeekOptions {
|
|
80
92
|
from_line_starts_with?: Array<string>;
|
|
81
93
|
to_line_starts_with?: Array<string> | typeof SEEK_TO_FROM_LINE_STARTS_WITH;
|
|
@@ -112,6 +124,37 @@ export interface FileMovePayload {
|
|
|
112
124
|
message?: string;
|
|
113
125
|
allowPrefixPathRecurse?: boolean;
|
|
114
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Types for reorderFile()
|
|
129
|
+
*/
|
|
130
|
+
export interface FileReorderPayload {
|
|
131
|
+
author: CommitAuthor;
|
|
132
|
+
position: number;
|
|
133
|
+
message?: string;
|
|
134
|
+
allowPrefixPath?: boolean;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Types for getFileOrder()
|
|
138
|
+
*/
|
|
139
|
+
export interface FileOrder {
|
|
140
|
+
directory: string;
|
|
141
|
+
order: Array<string>;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Types for writeFileOrder()
|
|
145
|
+
*/
|
|
146
|
+
export interface FileOrderWritePayload {
|
|
147
|
+
author: CommitAuthor;
|
|
148
|
+
order: Array<string>;
|
|
149
|
+
message?: string;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Types for deleteFileOrder()
|
|
153
|
+
*/
|
|
154
|
+
export interface FileOrderDeletePayload {
|
|
155
|
+
author: CommitAuthor;
|
|
156
|
+
message?: string;
|
|
157
|
+
}
|
|
115
158
|
/**
|
|
116
159
|
* Types shared by listCommits() and getCommitDetail()
|
|
117
160
|
*/
|
|
@@ -203,8 +246,9 @@ export declare class GitHTTPFSClient {
|
|
|
203
246
|
deleteTenant(collectionId: string, tenantId: string): Promise<void>;
|
|
204
247
|
/** List all tracked files (paths) */
|
|
205
248
|
listFiles(collectionId: string, tenantId: string, options?: ListFilesOptions): Promise<FileList>;
|
|
206
|
-
/** Read file content
|
|
207
|
-
|
|
249
|
+
/** Read file content, plus the position the file holds in the file order of \
|
|
250
|
+
its parent directory (optionally narrowed to a line window with seek) */
|
|
251
|
+
getFileContent(collectionId: string, tenantId: string, path: string, options?: GetFileContentOptions): Promise<FileContentPositioned>;
|
|
208
252
|
/** Check if a file exists in HEAD without reading its content (with \
|
|
209
253
|
'checkPrefixPath' enabled, a directory at that path counts as \
|
|
210
254
|
existing too) */
|
|
@@ -219,6 +263,32 @@ export declare class GitHTTPFSClient {
|
|
|
219
263
|
payload, the path may name a directory, whose whole subtree is \
|
|
220
264
|
relocated in a single commit) */
|
|
221
265
|
moveFile(collectionId: string, tenantId: string, path: string, payload: FileMovePayload): Promise<void>;
|
|
266
|
+
/** Give the file the numerical 'position' from the payload in the file order \
|
|
267
|
+
of its parent directory, shifting the entries at and after it down by \
|
|
268
|
+
one (a position past the end of the order is clamped to its tail, and \
|
|
269
|
+
ORDER_POSITION_UNLISTED drops the file from the order instead, leaving \
|
|
270
|
+
the file itself alone). With 'allowPrefixPath' enabled in the payload, \
|
|
271
|
+
the path may name a directory, which gets positioned among its \
|
|
272
|
+
siblings */
|
|
273
|
+
reorderFile(collectionId: string, tenantId: string, path: string, payload: FileReorderPayload): Promise<void>;
|
|
274
|
+
/** Read the file order stored for a directory (an empty directory means \
|
|
275
|
+
the repository root; rejects with a 404 error when that directory \
|
|
276
|
+
holds no order) */
|
|
277
|
+
getFileOrder(collectionId: string, tenantId: string, directory?: string): Promise<FileOrder>;
|
|
278
|
+
/** Replace the file order of a directory (an empty directory means the \
|
|
279
|
+
repository root). The payload holds the 'order' entries (leaf names, \
|
|
280
|
+
which must all exist in that directory), the commit 'author' and an \
|
|
281
|
+
optional 'message' */
|
|
282
|
+
writeFileOrder(collectionId: string, tenantId: string, directory: string, payload: FileOrderWritePayload): Promise<void>;
|
|
283
|
+
/** Drop the file order of a directory, reverting it to the default \
|
|
284
|
+
listing order (rejects with a 404 error when that directory holds no \
|
|
285
|
+
order) */
|
|
286
|
+
deleteFileOrder(collectionId: string, tenantId: string, directory: string, payload: FileOrderDeletePayload): Promise<void>;
|
|
287
|
+
/**
|
|
288
|
+
* Builds an order route path, where the repository root is addressed \
|
|
289
|
+
* without any path segment.
|
|
290
|
+
*/
|
|
291
|
+
private orderPath;
|
|
222
292
|
/** List commits with pagination */
|
|
223
293
|
listCommits(collectionId: string, tenantId: string, options?: ListCommitsOptions): Promise<CommitList>;
|
|
224
294
|
/** Commit detail with per-file diffs and snapshots */
|
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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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 } = 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(),
|
|
@@ -133,11 +140,21 @@ export class GitHTTPFSClient {
|
|
|
133
140
|
// serialized, a string is passed verbatim (already RFC 3339)
|
|
134
141
|
include_date_from: toRFC3339(includeDateFrom),
|
|
135
142
|
include_date_to: toRFC3339(includeDateTo),
|
|
136
|
-
include_date_type: includeDateType
|
|
143
|
+
include_date_type: includeDateType,
|
|
144
|
+
// Every level of the listing gets ordered by the file order stored for \
|
|
145
|
+
// the directory it belongs to (see getFileOrder())
|
|
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
|
|
137
153
|
};
|
|
138
154
|
return this.request(`${collectionId}/${tenantId}/files`, GET, undefined, params);
|
|
139
155
|
}
|
|
140
|
-
/** 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) */
|
|
141
158
|
async getFileContent(collectionId, tenantId, path, options = {}) {
|
|
142
159
|
const { seek } = options;
|
|
143
160
|
// Prefix lists travel as JSON-array strings in query parameters, \
|
|
@@ -201,6 +218,48 @@ export class GitHTTPFSClient {
|
|
|
201
218
|
allow_prefix_path_recurse: allowPrefixPathRecurse
|
|
202
219
|
});
|
|
203
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
|
+
}
|
|
235
|
+
// --- Order Operations ---
|
|
236
|
+
/** Read the file order stored for a directory (an empty directory means \
|
|
237
|
+
the repository root; rejects with a 404 error when that directory \
|
|
238
|
+
holds no order) */
|
|
239
|
+
async getFileOrder(collectionId, tenantId, directory = "") {
|
|
240
|
+
return this.request(this.orderPath(collectionId, tenantId, directory), GET);
|
|
241
|
+
}
|
|
242
|
+
/** Replace the file order of a directory (an empty directory means the \
|
|
243
|
+
repository root). The payload holds the 'order' entries (leaf names, \
|
|
244
|
+
which must all exist in that directory), the commit 'author' and an \
|
|
245
|
+
optional 'message' */
|
|
246
|
+
async writeFileOrder(collectionId, tenantId, directory, payload) {
|
|
247
|
+
return this.request(this.orderPath(collectionId, tenantId, directory), PUT, payload);
|
|
248
|
+
}
|
|
249
|
+
/** Drop the file order of a directory, reverting it to the default \
|
|
250
|
+
listing order (rejects with a 404 error when that directory holds no \
|
|
251
|
+
order) */
|
|
252
|
+
async deleteFileOrder(collectionId, tenantId, directory, payload) {
|
|
253
|
+
return this.request(this.orderPath(collectionId, tenantId, directory), DELETE, payload);
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Builds an order route path, where the repository root is addressed \
|
|
257
|
+
* without any path segment.
|
|
258
|
+
*/
|
|
259
|
+
orderPath(collectionId, tenantId, directory) {
|
|
260
|
+
const basePath = `${collectionId}/${tenantId}/order`;
|
|
261
|
+
return directory ? `${basePath}/${directory}` : basePath;
|
|
262
|
+
}
|
|
204
263
|
// --- Commit Operations ---
|
|
205
264
|
/** List commits with pagination */
|
|
206
265
|
async listCommits(collectionId, tenantId, options = {}) {
|
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,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC,CAAC;AAgK1C,8BAA8B;AAC9B,MAAM,OAAO,GAAG,IAAI,CAAC;AAErB,+BAA+B;AAC/B,MAAM,IAAI,GAAG,MAAM,CAAC;AACpB,MAAM,GAAG,GAAG,KAAK,CAAC;AAClB,MAA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kD;IAClD,KAAK,CAAC,cAAc,CAAC,YAAoB,EAAE,QAAgB,EAAE,GAAW,EAAE,OAA8B;QACtG,OAAO,IAAI,CAAC,OAAO,CACjB,GAAG,YAAY,IAAI,QAAQ,YAAY,GAAG,WAAW,EAAE,IAAI,EAAE,OAAO,CACrE,CAAC;IACJ,CAAC;IAED,2BAA2B;IAE3B;;8DAE0D;IAC1D,KAAK,CAAC,oBAAoB,CAAC,YAAoB,EAAE,QAAgB,EAAE,KAAkC,EAAE,OAAO,GAAgC,EAAE;QAC9I,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC;QAEzB,OAAO,IAAI,CAAC,OAAO,CACjB,GAAG,YAAY,IAAI,QAAQ,mBAAmB,EAAE,IAAI,EAAE;YACpD,KAAK,EAAE,KAAK;YACZ,IAAI;SACL,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.9.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/crisp-oss/node-githttp-fs-client",
|
|
7
7
|
"license": "MIT",
|