@elaraai/e3-cloud-files 1.0.94 → 1.0.97

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.
Files changed (49) hide show
  1. package/README.md +129 -23
  2. package/dist/src/authoring.d.ts +61 -24
  3. package/dist/src/authoring.d.ts.map +1 -1
  4. package/dist/src/authoring.js +92 -48
  5. package/dist/src/authoring.js.map +1 -1
  6. package/dist/src/check/index.d.ts +3 -4
  7. package/dist/src/check/index.d.ts.map +1 -1
  8. package/dist/src/check/index.js +3 -4
  9. package/dist/src/check/index.js.map +1 -1
  10. package/dist/src/check.d.ts +44 -9
  11. package/dist/src/check.d.ts.map +1 -1
  12. package/dist/src/check.js +130 -53
  13. package/dist/src/check.js.map +1 -1
  14. package/dist/src/compat.d.ts +384 -0
  15. package/dist/src/compat.d.ts.map +1 -0
  16. package/dist/src/compat.js +258 -0
  17. package/dist/src/compat.js.map +1 -0
  18. package/dist/src/index.d.ts +12 -9
  19. package/dist/src/index.d.ts.map +1 -1
  20. package/dist/src/index.js +12 -9
  21. package/dist/src/index.js.map +1 -1
  22. package/dist/src/s3/index.d.ts.map +1 -1
  23. package/dist/src/s3/index.js +34 -12
  24. package/dist/src/s3/index.js.map +1 -1
  25. package/dist/src/storage/index.d.ts +72 -3
  26. package/dist/src/storage/index.d.ts.map +1 -1
  27. package/dist/src/storage/index.js +258 -13
  28. package/dist/src/storage/index.js.map +1 -1
  29. package/dist/src/sync/engine.d.ts +282 -49
  30. package/dist/src/sync/engine.d.ts.map +1 -1
  31. package/dist/src/sync/engine.js +599 -110
  32. package/dist/src/sync/engine.js.map +1 -1
  33. package/dist/src/sync/index.d.ts +3 -2
  34. package/dist/src/sync/index.d.ts.map +1 -1
  35. package/dist/src/sync/index.js +3 -2
  36. package/dist/src/sync/index.js.map +1 -1
  37. package/dist/src/sync/memory.d.ts +67 -12
  38. package/dist/src/sync/memory.d.ts.map +1 -1
  39. package/dist/src/sync/memory.js +248 -18
  40. package/dist/src/sync/memory.js.map +1 -1
  41. package/dist/src/sync/push.d.ts +56 -0
  42. package/dist/src/sync/push.d.ts.map +1 -0
  43. package/dist/src/sync/push.js +205 -0
  44. package/dist/src/sync/push.js.map +1 -0
  45. package/dist/test/typed.examples.d.ts +49 -0
  46. package/dist/test/typed.examples.d.ts.map +1 -0
  47. package/dist/test/typed.examples.js +58 -0
  48. package/dist/test/typed.examples.js.map +1 -0
  49. package/package.json +10 -6
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/storage/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,uBAAuB,EACvB,mBAAmB,GAGpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,gBAAgB,EAAwB,MAAM,yBAAyB,CAAC;AAGjH,0CAA0C;AAC1C,SAAS,SAAS,CAAC,KAAa;IAC9B,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,QAAQ,CAAC,EAAE,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,WAAW,GAAG,UAAU,CAAC,UAAU,CAAC,CAAC;AAC3C,MAAM,YAAY,GAAG,eAAe,CAAC,eAAe,CAAC,CAAC;AAEtD,iCAAiC;AACjC,SAAS,OAAO,CAAC,OAAgD;IAC/D,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAwB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,C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AAM,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC;wBACjC,IAAI,OAAO,MAAM,KAAK,QAAQ;4BAAE,OAAO,MAAM,CAAC;wBAC9C,MAAM,GAAG,MAAM,CAAC;wBAChB,SAAS;oBACX,CAAC;oBACD,MAAM,MAAM,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;oBAChC,IAAI,MAAM,KAAK,IAAI;wBAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,CAAC;oBAC1D,MAAM,GAAG,CAAC;gBACZ,CAAC;YACH,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -2,7 +2,63 @@
2
2
  * Copyright (c) 2025 Elara AI Pty Ltd
3
3
  * Licensed under BSL 1.1. See LICENSE for details.
4
4
  */
5
- import { type FilesBinding, type FilesLedgerValue, type FilesListingRow, type FilesManifest, type FilesMapping, type FilesProblem, type FilesSyncReport } from '@elaraai/e3-cloud-types';
5
+ /**
6
+ * The sync: what a source's files fill, brought up to date.
7
+ *
8
+ * One algorithm for a local repository and a deployed workspace alike: what
9
+ * reads a bucket, what writes a workspace's inputs and records, and what
10
+ * remembers the files each target took are given to it ({@link FilesReader},
11
+ * {@link FilesWriter}, {@link FilesLedger}), so both behave the same.
12
+ *
13
+ * For each mapping: list the source, compare each file with what the target
14
+ * took last (its ETag and size), read what is new or changed, write the
15
+ * target, and remember what it took and the value it wrote or the commit it
16
+ * made. A file the same as before is never read again, so a sync with
17
+ * nothing new reads nothing; a target whose files are as they were is not
18
+ * written. A file over its limit is refused, named in the report, and never
19
+ * truncated; so is a file its reader cannot read (archived, changed since it
20
+ * was listed, or closed to the reader's access: {@link FilesUnreadableError}),
21
+ * the sync going on with the rest, and the next sync trying it again. A
22
+ * target is remembered only once it is written, so a sync that stops part
23
+ * way takes the rest next time.
24
+ *
25
+ * A `file` or `latest` mapping with a type takes its file in as the beast2
26
+ * value it holds: the file's header is read first, through a ranged read,
27
+ * and a file of another type, or no beast2, is refused before any other
28
+ * byte of it is read; then the writer takes the file in from a stream of its
29
+ * bytes ({@link FilesWriter.takeTyped}: never held whole, a collection by
30
+ * pieces), which may outlast a round and resume in the next, the file it was
31
+ * taking remembered by its key and ETag so no other file is resumed as it.
32
+ * A record's mapping seeds the record ({@link FilesWriter.seed}: its file is
33
+ * the record's first state, or its state again while nothing has mutated it
34
+ * since, or when the sync is asked to reset it); a mutation's feeds it
35
+ * ({@link FilesWriter.feed}): every new file under its prefix, in key order,
36
+ * each applied once, by the file's hash, and never again under another name.
37
+ *
38
+ * A folder's new and changed files are taken in batches of at most 256 MiB
39
+ * ({@link FOLDER_BATCH_BYTES}): each batch is read, written and remembered
40
+ * before the next is read, so a sync holds one batch of files, however large
41
+ * the folder. A sync can stop between targets, between a folder's batches,
42
+ * between a feed's files and within a typed intake when asked
43
+ * ({@link syncFilesRound}, a cloud round handing over), and the next takes
44
+ * the rest.
45
+ *
46
+ * What a target took is trusted only while its mapping and its source's
47
+ * binding are those it was taken under ({@link LedgerState}'s `under`) and,
48
+ * for an input, while the input still holds the value the sync wrote: a
49
+ * deploy that resets the workspace's inputs, anyone setting one by hand, a
50
+ * changed declaration or a source bound elsewhere, and the next sync takes
51
+ * all of its files again, even when a sync under the old declarations wrote
52
+ * its ledger after the change. A record's or mutation's ledger stays
53
+ * trusted as the record moves on: the record itself says what a seed may do.
54
+ *
55
+ * Mappings that share a source and a prefix list it once a round; a glob that
56
+ * matches only the prefix's own folder lists that folder alone.
57
+ *
58
+ * @packageDocumentation
59
+ */
60
+ import { type EastTypeValue } from '@elaraai/east';
61
+ import { type FilesBinding, type FilesLedgerValue, type FilesListingRow, type FilesManifest, type FilesMapping, type FilesProblem, type FilesRefusalReason, type FilesSyncReport, type FilesTaken, type FilesTarget } from '@elaraai/e3-cloud-types';
6
62
  /** A file of a source, as a listing gives it. */
7
63
  export interface FilesObject {
8
64
  /** Its key, relative to where the workspace binds the source */
@@ -19,39 +75,153 @@ export interface FilesListOptions {
19
75
  /** Only the files in the prefix's own folder, none in a folder under it */
20
76
  readonly topFolderOnly?: boolean;
21
77
  }
78
+ /** How a reader opens a file's bytes. */
79
+ export interface FilesOpenOptions {
80
+ /** The byte to start at: a typed intake resumed where its staging stood */
81
+ readonly start?: number;
82
+ }
22
83
  /** Reads one bound source: a bucket, under the prefix the binding names. */
23
84
  export interface FilesReader {
24
- /** Every file under a prefix (relative to the binding), in key order */
25
- list(prefix: string, options?: FilesListOptions): AsyncIterable<FilesObject>;
26
- /** One file's listing, or `null` when there is none */
85
+ /** The files under a prefix, in key order; a prefix's own folder alone when asked */
86
+ list(prefix: string, options?: FilesListOptions): AsyncIterable<FilesObject> | Iterable<FilesObject>;
87
+ /** One file, or null when there is none at the key */
27
88
  stat(key: string): Promise<FilesObject | null>;
28
89
  /**
29
- * One file's bytes, as its listing gave it: a file that changed since, or
30
- * that the reader cannot read, is refused with a {@link FilesUnreadableError}
90
+ * A file's bytes, whole, at the version its listing gave.
91
+ *
92
+ * @throws {FilesUnreadableError} When the file cannot be read: archived, changed since it was listed, gone, or closed to the reader
31
93
  */
32
- read(file: FilesObject): Promise<Uint8Array>;
94
+ read(object: FilesObject): Promise<Uint8Array>;
95
+ /**
96
+ * A range of a file's bytes, `[start, end)`: a typed file's header, read
97
+ * before any other byte of it.
98
+ *
99
+ * @throws {FilesUnreadableError} As `read`
100
+ */
101
+ readRange(object: FilesObject, start: number, end: number): Promise<Uint8Array>;
102
+ /**
103
+ * A file's bytes as a stream, from a byte on, for a typed file taken in
104
+ * without being held whole.
105
+ *
106
+ * @throws {FilesUnreadableError} As `read`
107
+ */
108
+ open(object: FilesObject, options?: FilesOpenOptions): Promise<AsyncIterable<Uint8Array>>;
33
109
  }
34
110
  /**
35
- * A file a reader cannot read, which a sync refuses and names in its report,
36
- * going on with the rest; the next sync tries it again. A reader throws it
37
- * for what is the file's own, never for its source as a whole: a file
38
- * archived, changed or gone since it was listed, or closed to the reader's
39
- * access. Any other error ends the round, which is tried again.
111
+ * Thrown by a reader for a file it cannot read, which the sync refuses and
112
+ * goes on past: archived, changed since it was listed, gone, or closed to
113
+ * the reader's access. Anything else a reader throws stops the sync.
40
114
  */
41
115
  export declare class FilesUnreadableError extends Error {
116
+ /** The file's key */
42
117
  readonly key: string;
118
+ /** Why, as the refusal says it */
43
119
  readonly reason: string;
44
- /**
45
- * @param key - The file's key, relative to the binding
46
- * @param reason - Why, completing "'<key>' …"
47
- */
48
120
  constructor(key: string, reason: string);
49
121
  }
50
- /** Writes one workspace's inputs. Each write answers the value it set: its hash. */
122
+ /**
123
+ * A typed intake under way across rounds: the file it takes (its key and
124
+ * ETag, so no other file is resumed as it), its SHA-256 once its bytes are
125
+ * placed in the store, else where its staging stood (the writer's own
126
+ * progress, as text).
127
+ */
128
+ export interface TypedIntakeProgress {
129
+ readonly key: string;
130
+ readonly etag: string;
131
+ readonly sha256: string | null;
132
+ readonly staging: string | null;
133
+ }
134
+ /** What a typed intake is given. */
135
+ export interface TypedIntakeOptions {
136
+ /** The file's SHA-256, where the caller knows it (a push) */
137
+ readonly sha256?: string;
138
+ /** The intake of this same file an earlier round left under way, to resume */
139
+ readonly resume?: TypedIntakeProgress;
140
+ /** Stops the intake where it can resume: a round's deadline */
141
+ readonly signal?: AbortSignal;
142
+ }
143
+ /**
144
+ * What a typed intake did: took the file; stopped at the round's deadline,
145
+ * where the next round resumes it (`taking`), or before anything was kept,
146
+ * so the next round starts the file again (`taking` null); or refused it.
147
+ */
148
+ export type TypedIntakeResult = {
149
+ readonly status: 'taken';
150
+ readonly hash: string;
151
+ readonly sha256: string;
152
+ readonly taken: FilesTaken;
153
+ } | {
154
+ readonly status: 'yielded';
155
+ readonly taking: TypedIntakeProgress | null;
156
+ } | {
157
+ readonly status: 'refused';
158
+ readonly reason: FilesRefusalReason;
159
+ };
160
+ /**
161
+ * A record, as a seed reads it: pending (no state yet, its file its genesis),
162
+ * or its head commit, with how many commits have been made since its last
163
+ * seed (`$init` or `$seed`); null when its history was not walked to a seed.
164
+ */
165
+ export type RecordSeedState = {
166
+ readonly pending: true;
167
+ } | {
168
+ readonly pending: false;
169
+ readonly head: string;
170
+ readonly sinceSeed: number | null;
171
+ };
172
+ /** What a seed is given. */
173
+ export interface SeedOptions {
174
+ /** Whether the record is pending, so the file is its genesis (`$init`); else its state again (`$seed`) */
175
+ readonly genesis: boolean;
176
+ /** The file's SHA-256, where the caller knows it */
177
+ readonly sha256?: string;
178
+ readonly signal?: AbortSignal;
179
+ }
180
+ /** What a seed did. */
181
+ export type SeedResult = {
182
+ readonly status: 'committed';
183
+ readonly commit: string;
184
+ readonly rows: bigint | null;
185
+ readonly sha256: string;
186
+ } | {
187
+ readonly status: 'refused';
188
+ readonly reason: FilesRefusalReason;
189
+ };
190
+ /** What a feed is given. */
191
+ export interface FeedOptions {
192
+ /** The file's SHA-256, where the caller knows it: the feed's idempotency key */
193
+ readonly sha256?: string;
194
+ /** The SHA-256 of every file the mutation has applied already: one of them is applied again under no name */
195
+ readonly applied?: ReadonlySet<string>;
196
+ readonly signal?: AbortSignal;
197
+ }
198
+ /**
199
+ * What a feed did: committed through the mutation; applied before, so
200
+ * nothing more; waits (for the record's first state, or for a round the
201
+ * deadline or a busy record cut short: tried again by the next sync); or
202
+ * was refused by the mutation, which the file's bytes must change to be
203
+ * tried again.
204
+ */
205
+ export type FeedResult = {
206
+ readonly status: 'committed';
207
+ readonly commit: string;
208
+ readonly sha256: string;
209
+ } | {
210
+ readonly status: 'applied';
211
+ readonly sha256: string;
212
+ } | {
213
+ readonly status: 'waiting';
214
+ readonly reason: string;
215
+ } | {
216
+ readonly status: 'refused';
217
+ readonly reason: FilesRefusalReason;
218
+ readonly sha256: string;
219
+ };
220
+ /** Writes one workspace's inputs and records, as a sync fills them. */
51
221
  export interface FilesWriter {
52
222
  /** The value an input holds now, its hash; `null` while it is unassigned */
53
223
  current(input: string): Promise<string | null>;
54
- /** Sets a `file` or `latest` input to a file's bytes */
224
+ /** Sets a `file` or `latest` input with no type to a file's bytes */
55
225
  setFile(input: string, bytes: Uint8Array): Promise<string>;
56
226
  /**
57
227
  * Updates a `folder` input: each file in `set` added or replaced, each path
@@ -61,6 +231,18 @@ export interface FilesWriter {
61
231
  updateFolder(input: string, changes: FolderChanges): Promise<string>;
62
232
  /** Sets a `listing` input */
63
233
  setListing(input: string, rows: ReadonlyMap<string, FilesListingRow>): Promise<string>;
234
+ /**
235
+ * Takes a typed file in as an input's value, from a stream of its bytes:
236
+ * never held whole, a collection by pieces. The file's header has been
237
+ * checked against `type` already.
238
+ */
239
+ takeTyped(input: string, file: FilesObject, type: EastTypeValue, source: FilesReader, options: TypedIntakeOptions): Promise<TypedIntakeResult>;
240
+ /** A record, as a seed reads it; absent where records cannot be seeded */
241
+ recordState?(record: string): Promise<RecordSeedState>;
242
+ /** Seeds a record from a typed file: its first state, or its state again */
243
+ seed?(record: string, file: FilesObject, type: EastTypeValue, source: FilesReader, options: SeedOptions): Promise<SeedResult>;
244
+ /** Feeds a record's mutation a typed file's value, once */
245
+ feed?(record: string, mutation: string, file: FilesObject, type: EastTypeValue, source: FilesReader, options: FeedOptions): Promise<FeedResult>;
64
246
  }
65
247
  /** What a sync changes in a `folder` input. */
66
248
  export interface FolderChanges {
@@ -71,55 +253,76 @@ export interface FolderChanges {
71
253
  /** Whether the folder is `set` alone, whatever the input holds now */
72
254
  readonly fresh: boolean;
73
255
  }
74
- /** What an input took of one file. */
256
+ /** What a target took of one file. */
75
257
  export interface LedgerEntry {
76
258
  readonly etag: string;
77
259
  readonly size: number;
260
+ /** The file's SHA-256, where the sync hashed it */
261
+ readonly sha256?: string;
262
+ /** When the file was last written, as its listing said */
263
+ readonly modified?: Date;
78
264
  }
79
- /** What an input took last: each file, the value the sync wrote, and what it was taken under. */
265
+ /** What a target took last: each file, the value the sync wrote or the commit it made, and what it was taken under. */
80
266
  export interface LedgerState {
81
- /** Each file it took, by key */
267
+ /** Each file it took, by key; a feed's, every file applied */
82
268
  readonly entries: ReadonlyMap<string, LedgerEntry>;
83
- /** The value the sync wrote, its hash; `null` before its first sync */
269
+ /** The value the sync wrote, its hash: an input's; `null` before its first sync */
84
270
  readonly value: string | null;
85
271
  /**
86
272
  * The mapping's shape and its source's binding it was taken under, as one
87
273
  * text ({@link takenUnder}); `null` before its first sync
88
274
  */
89
275
  readonly under: string | null;
276
+ /** The commit the sync made: a record's seed, a mutation's last feed; `null` for an input, or before any */
277
+ readonly commit: string | null;
278
+ /** The SHA-256 of a feed the mutation refused, not tried again until the file changes */
279
+ readonly tried: string | null;
280
+ /** A typed intake under way across rounds */
281
+ readonly taking: TypedIntakeProgress | null;
90
282
  }
91
- /** What an input took before its first sync: nothing. */
283
+ /** What a target took before its first sync: nothing. */
92
284
  export declare const NO_LEDGER: LedgerState;
93
285
  /**
94
- * What an input took, as a store keeps it (e3-cloud-types' `FilesLedgerType`).
286
+ * What a target took, as a store keeps it (e3-cloud-types' `FilesLedgerType`).
95
287
  *
96
288
  * @param state - What it took
97
289
  * @returns Its East value
98
290
  */
99
291
  export declare function ledgerValueOf(state: LedgerState): FilesLedgerValue;
100
292
  /**
101
- * What an input took, from what a store keeps.
293
+ * What a target took, from what a store keeps.
102
294
  *
103
295
  * @param value - Its East value
104
296
  * @returns What it took
105
297
  */
106
298
  export declare function ledgerStateOf(value: FilesLedgerValue): LedgerState;
107
299
  /**
108
- * What an input's files are taken under: its mapping's shape and where its
300
+ * The key a target's ledger is kept under: an input's name, as the first
301
+ * version kept it; a record's under `records/`; a mutation's under
302
+ * `mutations/{record}/{mutation}` (two segments: a name may hold a dot).
303
+ *
304
+ * @param target - The target
305
+ * @returns Its ledger's key
306
+ */
307
+ export declare function ledgerKeyOf(target: FilesTarget): string;
308
+ /**
309
+ * What a target's files are taken under: its mapping's shape and where its
109
310
  * source is bound, as one text. A ledger taken under another is not trusted:
110
- * its keys may name other files, and its paths another folder's.
311
+ * its keys may name other files, and its paths another folder's. A shape
312
+ * that names no type prints as the first version printed it, so a ledger it
313
+ * wrote stays trusted.
111
314
  *
112
315
  * @param mapping - The mapping
113
316
  * @param binding - Its source's binding
114
317
  * @returns The text
115
318
  */
116
319
  export declare function takenUnder(mapping: FilesMapping, binding: FilesBinding): string;
117
- /** Remembers, for each input, what it took last. */
320
+ /** Remembers, for each target, what it took last. */
118
321
  export interface FilesLedger {
119
- /** What an input took last; nothing before its first sync */
120
- read(input: string): Promise<LedgerState>;
121
- /** Remembers what an input took */
122
- write(input: string, state: LedgerState): Promise<void>;
322
+ /** What a target took last, by its ledger's key ({@link ledgerKeyOf}); nothing before its first sync */
323
+ read(key: string): Promise<LedgerState>;
324
+ /** Remembers what a target took */
325
+ write(key: string, state: LedgerState): Promise<void>;
123
326
  }
124
327
  /** What a sync is given. */
125
328
  export interface SyncOptions {
@@ -129,33 +332,37 @@ export interface SyncOptions {
129
332
  readonly bindings: readonly FilesBinding[];
130
333
  /** Reads a bound source */
131
334
  readonly reader: (binding: FilesBinding) => FilesReader;
132
- /** Writes the workspace's inputs */
335
+ /** Writes the workspace's inputs and records */
133
336
  readonly writer: FilesWriter;
134
- /** Remembers what each input took */
337
+ /** Remembers what each target took */
135
338
  readonly ledger: FilesLedger;
136
339
  /** List what a sync would take, and take nothing */
137
340
  readonly dryRun?: boolean;
138
- /** Only these inputs; every mapping when absent */
139
- readonly inputs?: readonly string[];
341
+ /** Only these targets; every mapping when absent */
342
+ readonly targets?: readonly FilesTarget[];
343
+ /** Records whose file is taken as their state again, whatever has mutated them since their seed */
344
+ readonly reset?: readonly string[];
140
345
  /** The time, for the report */
141
346
  readonly now?: () => Date;
142
347
  /** The most bytes of a folder's files held before they are written: {@link FOLDER_BATCH_BYTES} when absent */
143
348
  readonly batchBytes?: number;
349
+ /** Stops a typed intake, a seed or a feed where it can resume: a round's deadline */
350
+ readonly signal?: AbortSignal;
144
351
  }
145
352
  /** What one round of a sync is given: a sync's options, and when to stop. */
146
353
  export interface SyncRoundOptions extends SyncOptions {
147
354
  /**
148
- * Asked between inputs and between a folder's batches, once the round has
149
- * written something: `true` stops the round there, every input as it was
150
- * last written and remembered
355
+ * Asked between targets, between a folder's batches and between a feed's
356
+ * files, once the round has written something: `true` stops the round
357
+ * there, every target as it was last written and remembered
151
358
  */
152
359
  readonly shouldYield?: () => boolean;
153
360
  }
154
361
  /** What a round did, and whether it stopped before the end. */
155
362
  export interface FilesSyncRound {
156
- /** What it did: each input it reached, with what it took */
363
+ /** What it did: each target it reached, with what it took */
157
364
  readonly report: FilesSyncReport;
158
- /** Whether it stopped when asked, with inputs or a folder's files left for the next */
365
+ /** Whether it stopped when asked, with targets, a folder's files, a feed's files or an intake left for the next */
159
366
  readonly yielded: boolean;
160
367
  }
161
368
  /** The most bytes of a folder's files a sync holds before it writes them, when not told: 256 MiB. */
@@ -166,26 +373,52 @@ export declare class FilesSyncError extends Error {
166
373
  constructor(problems: readonly FilesProblem[]);
167
374
  }
168
375
  /**
169
- * Brings each mapping's input up to date with its source's files, stopping
170
- * when asked between inputs or between a folder's batches: one round of a
171
- * sync that hands over, as the platform's do. What it stopped before, the
172
- * next round takes.
376
+ * The root type a beast2 file's header declares, read through its head:
377
+ * 64 KiB, then wider only for a wide type section, never the file. Refused
378
+ * as no beast2 when the header is malformed, or wider than any type section
379
+ * is. What the sync and a push's reading of a file on disk share.
380
+ *
381
+ * @param size - The file's size
382
+ * @param readHead - Reads the file's first bytes, as many as asked
383
+ * @returns The declared root type, or why the file is no beast2
384
+ */
385
+ export declare function beast2HeaderTypeOf(size: number, readHead: (bytes: number) => Promise<Uint8Array>): Promise<{
386
+ type: EastTypeValue;
387
+ } | {
388
+ reason: FilesRefusalReason;
389
+ }>;
390
+ /**
391
+ * Whether a type is a collection's: an Array, Set or Dict root, which beast2
392
+ * stores in segments and e3 takes in by pieces, of any size.
393
+ *
394
+ * @param type - The type
395
+ * @returns Whether it is a collection
396
+ */
397
+ export declare function isCollectionType(type: EastTypeValue): boolean;
398
+ /**
399
+ * Brings each mapping's target up to date with its source's files, stopping
400
+ * when asked between targets, between a folder's batches, between a feed's
401
+ * files or within a typed intake: one round of a sync that hands over, as
402
+ * the platform's do. What it stopped before, the next round takes. Records
403
+ * are seeded before mutations are fed, so a record seeded and fed in one
404
+ * sync takes both, in that order.
173
405
  *
174
406
  * @param options - The declarations, the bindings, what reads, writes and remembers, and when to stop
175
- * @returns What it did, per input it reached, and whether it stopped before the end
407
+ * @returns What it did, per target it reached, and whether it stopped before the end
176
408
  * @throws {FilesSyncError} When a mapping's source is not bound, before
177
409
  * anything is read
178
- * @throws {Error} When an input named is not one a declaration fills
410
+ * @throws {Error} When a target named is not one a declaration fills
179
411
  */
180
412
  export declare function syncFilesRound(options: SyncRoundOptions): Promise<FilesSyncRound>;
181
413
  /**
182
- * Brings each mapping's input up to date with its source's files, to the end.
414
+ * Brings each mapping's target up to date with its source's files, to the
415
+ * end.
183
416
  *
184
417
  * @param options - The declarations, the bindings, and what reads, writes and remembers
185
418
  * @returns What it did, per mapping
186
419
  * @throws {FilesSyncError} When a mapping's source is not bound, before
187
420
  * anything is read
188
- * @throws {Error} When an input named is not one a declaration fills
421
+ * @throws {Error} When a target named is not one a declaration fills
189
422
  */
190
423
  export declare function syncFiles(options: SyncOptions): Promise<FilesSyncReport>;
191
424
  //# sourceMappingURL=engine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../../src/sync/engine.ts"],"names":[],"mappings":"AAAA;;;GAGG;AA0CH,OAAO,EAEL,KAAK,YAAY,EAAE,KAAK,gBAAgB,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EACrG,KAAK,YAAY,EAAqB,KAAK,eAAe,EAC3D,MAAM,yBAAyB,CAAC;AAGjC,iDAAiD;AACjD,MAAM,WAAW,WAAW;IAC1B,gEAAgE;IAChE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,wBAAwB;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,+BAA+B;IAC/B,QAAQ,CAAC,QAAQ,EAA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