@lpdjs/firestore-repo-service 3.0.19 → 3.0.21
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 +1 -1
- package/dist/{create-servers-DydjOOOS.d.cts → create-servers-TfGVAXBQ.d.cts} +3 -3
- package/dist/{create-servers-bMJVVjPj.d.ts → create-servers-z-dCkmv2.d.ts} +3 -3
- package/dist/{effects-BYvL8JUK.d.ts → effects-DLBSYKuA.d.ts} +1 -1
- package/dist/{effects-DcM19dy4.d.cts → effects-DsI4cSpI.d.cts} +1 -1
- package/dist/index.cjs +108 -102
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -7
- package/dist/index.d.ts +11 -7
- package/dist/index.js +108 -102
- package/dist/index.js.map +1 -1
- package/dist/llms-full.txt +5 -5
- package/dist/llms.txt +1 -1
- package/dist/queue-Bh7O8NnJ.d.ts +117 -0
- package/dist/queue-CEg5KSo1.d.cts +117 -0
- package/dist/servers/admin/index.cjs +51 -51
- package/dist/servers/admin/index.cjs.map +1 -1
- package/dist/servers/admin/index.d.cts +9 -1
- package/dist/servers/admin/index.d.ts +9 -1
- package/dist/servers/admin/index.js +51 -51
- package/dist/servers/admin/index.js.map +1 -1
- package/dist/servers/crud/index.cjs +1 -1
- package/dist/servers/crud/index.cjs.map +1 -1
- package/dist/servers/crud/index.d.cts +4 -4
- package/dist/servers/crud/index.d.ts +4 -4
- package/dist/servers/crud/index.js +1 -1
- package/dist/servers/crud/index.js.map +1 -1
- package/dist/servers/index.cjs +115 -109
- package/dist/servers/index.cjs.map +1 -1
- package/dist/servers/index.d.cts +6 -6
- package/dist/servers/index.d.ts +6 -6
- package/dist/servers/index.js +115 -109
- package/dist/servers/index.js.map +1 -1
- package/dist/sync/index.cjs +67 -61
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +2 -2
- package/dist/sync/index.d.ts +2 -2
- package/dist/sync/index.js +67 -61
- package/dist/sync/index.js.map +1 -1
- package/dist/{types-5Q7JDDba.d.ts → types-6jjeTvcm.d.ts} +7 -2
- package/dist/{types-BYPdlGSL.d.cts → types-BLHo_PdM.d.cts} +7 -2
- package/package.json +1 -1
- package/dist/queue-NFod6hTT.d.ts +0 -62
- package/dist/queue-zw2B7GPx.d.cts +0 -62
|
@@ -26,7 +26,7 @@ interface PaginationResult<T> {
|
|
|
26
26
|
pageSize: number;
|
|
27
27
|
/** Total count of items matching the query (when withTotal is true) */
|
|
28
28
|
totalCount?: number;
|
|
29
|
-
/** Whether totalCount is exact (true) or estimated
|
|
29
|
+
/** Whether totalCount is exact (true) or estimated via branch-sum fallback (false) */
|
|
30
30
|
totalCountIsExact?: boolean;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -191,6 +191,11 @@ interface SystemBackfillOptions {
|
|
|
191
191
|
onSuccess?: (path: string) => void;
|
|
192
192
|
/** Max attempts per document for retryable errors. Default `5`. */
|
|
193
193
|
maxAttempts?: number;
|
|
194
|
+
/**
|
|
195
|
+
* Flush BulkWriter after this many queued writes to keep memory bounded on
|
|
196
|
+
* large collections. Default `500`.
|
|
197
|
+
*/
|
|
198
|
+
flushThreshold?: number;
|
|
194
199
|
}
|
|
195
200
|
|
|
196
201
|
/**
|
|
@@ -1343,7 +1348,7 @@ interface ListResponseData<T = unknown> {
|
|
|
1343
1348
|
hasPrevPage: boolean;
|
|
1344
1349
|
/** Total count of items matching the query (when withTotal is true) */
|
|
1345
1350
|
totalCount?: number;
|
|
1346
|
-
/** Whether totalCount is exact (true) or estimated
|
|
1351
|
+
/** Whether totalCount is exact (true) or estimated via branch-sum fallback (false) */
|
|
1347
1352
|
totalCountIsExact?: boolean;
|
|
1348
1353
|
}
|
|
1349
1354
|
/**
|
|
@@ -26,7 +26,7 @@ interface PaginationResult<T> {
|
|
|
26
26
|
pageSize: number;
|
|
27
27
|
/** Total count of items matching the query (when withTotal is true) */
|
|
28
28
|
totalCount?: number;
|
|
29
|
-
/** Whether totalCount is exact (true) or estimated
|
|
29
|
+
/** Whether totalCount is exact (true) or estimated via branch-sum fallback (false) */
|
|
30
30
|
totalCountIsExact?: boolean;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -191,6 +191,11 @@ interface SystemBackfillOptions {
|
|
|
191
191
|
onSuccess?: (path: string) => void;
|
|
192
192
|
/** Max attempts per document for retryable errors. Default `5`. */
|
|
193
193
|
maxAttempts?: number;
|
|
194
|
+
/**
|
|
195
|
+
* Flush BulkWriter after this many queued writes to keep memory bounded on
|
|
196
|
+
* large collections. Default `500`.
|
|
197
|
+
*/
|
|
198
|
+
flushThreshold?: number;
|
|
194
199
|
}
|
|
195
200
|
|
|
196
201
|
/**
|
|
@@ -1343,7 +1348,7 @@ interface ListResponseData<T = unknown> {
|
|
|
1343
1348
|
hasPrevPage: boolean;
|
|
1344
1349
|
/** Total count of items matching the query (when withTotal is true) */
|
|
1345
1350
|
totalCount?: number;
|
|
1346
|
-
/** Whether totalCount is exact (true) or estimated
|
|
1351
|
+
/** Whether totalCount is exact (true) or estimated via branch-sum fallback (false) */
|
|
1347
1352
|
totalCountIsExact?: boolean;
|
|
1348
1353
|
}
|
|
1349
1354
|
/**
|
package/package.json
CHANGED
package/dist/queue-NFod6hTT.d.ts
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { a as SyncAdapter, S as SyncEvent } from './types-B_FrzmO4.js';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Per-repo in-memory batch buffer.
|
|
5
|
-
*
|
|
6
|
-
* Accumulates {@link SyncEvent}s and flushes them in batches to a
|
|
7
|
-
* {@link SqlAdapter}. On flush failure the events are re-published
|
|
8
|
-
* to PubSub for retry (if a PubSub re-publisher is provided).
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
interface SyncQueueOptions {
|
|
12
|
-
/** Target adapter to flush data to */
|
|
13
|
-
adapter: SyncAdapter;
|
|
14
|
-
/** SQL table name or Search index UID */
|
|
15
|
-
tableName: string;
|
|
16
|
-
/** Primary key column/field name */
|
|
17
|
-
primaryKey: string;
|
|
18
|
-
/** Max rows per flush (default: 100) */
|
|
19
|
-
batchSize?: number;
|
|
20
|
-
/** Auto-flush interval in ms (default: 5_000). 0 = manual only. */
|
|
21
|
-
flushIntervalMs?: number;
|
|
22
|
-
/** Called on flush failure with the failed events. Typically re-publishes to PubSub. */
|
|
23
|
-
onFlushError?: (events: SyncEvent[], error: unknown) => Promise<void>;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* In-memory buffer that batches sync events per-repo and flushes them
|
|
27
|
-
* to a target adapter.
|
|
28
|
-
*/
|
|
29
|
-
declare class SyncQueue {
|
|
30
|
-
private buffer;
|
|
31
|
-
private flushing;
|
|
32
|
-
private flushPromise;
|
|
33
|
-
private timer;
|
|
34
|
-
private readonly adapter;
|
|
35
|
-
private readonly tableName;
|
|
36
|
-
private readonly primaryKey;
|
|
37
|
-
private readonly batchSize;
|
|
38
|
-
private readonly onFlushError?;
|
|
39
|
-
constructor(opts: SyncQueueOptions);
|
|
40
|
-
/** Number of events waiting in the buffer. */
|
|
41
|
-
get size(): number;
|
|
42
|
-
/** Push one or more events into the buffer. Triggers auto-flush if batchSize reached. */
|
|
43
|
-
enqueue(...events: SyncEvent[]): void;
|
|
44
|
-
/**
|
|
45
|
-
* Flush all buffered events to the target adapter.
|
|
46
|
-
* Upserts and deletes are batched separately.
|
|
47
|
-
*/
|
|
48
|
-
flush(): Promise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* Drain the buffer to empty.
|
|
51
|
-
*/
|
|
52
|
-
private _drain;
|
|
53
|
-
/**
|
|
54
|
-
* Flush a single batch (up to `batchSize` events) to the adapter.
|
|
55
|
-
*/
|
|
56
|
-
private _doFlush;
|
|
57
|
-
/** Stop the auto-flush timer and flush remaining events. */
|
|
58
|
-
shutdown(): Promise<void>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export { SyncQueue as S };
|
|
62
|
-
export type { SyncQueueOptions as a };
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { a as SyncAdapter, S as SyncEvent } from './types-D78FPJeF.cjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Per-repo in-memory batch buffer.
|
|
5
|
-
*
|
|
6
|
-
* Accumulates {@link SyncEvent}s and flushes them in batches to a
|
|
7
|
-
* {@link SqlAdapter}. On flush failure the events are re-published
|
|
8
|
-
* to PubSub for retry (if a PubSub re-publisher is provided).
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
interface SyncQueueOptions {
|
|
12
|
-
/** Target adapter to flush data to */
|
|
13
|
-
adapter: SyncAdapter;
|
|
14
|
-
/** SQL table name or Search index UID */
|
|
15
|
-
tableName: string;
|
|
16
|
-
/** Primary key column/field name */
|
|
17
|
-
primaryKey: string;
|
|
18
|
-
/** Max rows per flush (default: 100) */
|
|
19
|
-
batchSize?: number;
|
|
20
|
-
/** Auto-flush interval in ms (default: 5_000). 0 = manual only. */
|
|
21
|
-
flushIntervalMs?: number;
|
|
22
|
-
/** Called on flush failure with the failed events. Typically re-publishes to PubSub. */
|
|
23
|
-
onFlushError?: (events: SyncEvent[], error: unknown) => Promise<void>;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* In-memory buffer that batches sync events per-repo and flushes them
|
|
27
|
-
* to a target adapter.
|
|
28
|
-
*/
|
|
29
|
-
declare class SyncQueue {
|
|
30
|
-
private buffer;
|
|
31
|
-
private flushing;
|
|
32
|
-
private flushPromise;
|
|
33
|
-
private timer;
|
|
34
|
-
private readonly adapter;
|
|
35
|
-
private readonly tableName;
|
|
36
|
-
private readonly primaryKey;
|
|
37
|
-
private readonly batchSize;
|
|
38
|
-
private readonly onFlushError?;
|
|
39
|
-
constructor(opts: SyncQueueOptions);
|
|
40
|
-
/** Number of events waiting in the buffer. */
|
|
41
|
-
get size(): number;
|
|
42
|
-
/** Push one or more events into the buffer. Triggers auto-flush if batchSize reached. */
|
|
43
|
-
enqueue(...events: SyncEvent[]): void;
|
|
44
|
-
/**
|
|
45
|
-
* Flush all buffered events to the target adapter.
|
|
46
|
-
* Upserts and deletes are batched separately.
|
|
47
|
-
*/
|
|
48
|
-
flush(): Promise<void>;
|
|
49
|
-
/**
|
|
50
|
-
* Drain the buffer to empty.
|
|
51
|
-
*/
|
|
52
|
-
private _drain;
|
|
53
|
-
/**
|
|
54
|
-
* Flush a single batch (up to `batchSize` events) to the adapter.
|
|
55
|
-
*/
|
|
56
|
-
private _doFlush;
|
|
57
|
-
/** Stop the auto-flush timer and flush remaining events. */
|
|
58
|
-
shutdown(): Promise<void>;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export { SyncQueue as S };
|
|
62
|
-
export type { SyncQueueOptions as a };
|