@lpdjs/firestore-repo-service 2.3.1 → 2.3.3
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 +2 -2
- package/dist/{create-servers-BbsqzP1y.d.ts → create-servers-DwLmIAUH.d.ts} +2 -2
- package/dist/{create-servers-Bm58QZze.d.cts → create-servers-E79G_UgN.d.cts} +2 -2
- package/dist/index.cjs +27 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +27 -34
- package/dist/index.js.map +1 -1
- package/dist/{queue-7d2-Y-o-.d.ts → queue-Dgk4HFSS.d.ts} +10 -1
- package/dist/{queue-CC5cnIFv.d.cts → queue-DnTHUopY.d.cts} +10 -1
- package/dist/servers/index.cjs +38 -45
- package/dist/servers/index.cjs.map +1 -1
- package/dist/servers/index.d.cts +3 -3
- package/dist/servers/index.d.ts +3 -3
- package/dist/servers/index.js +38 -45
- package/dist/servers/index.js.map +1 -1
- package/dist/sync/bigquery.cjs +7 -7
- package/dist/sync/bigquery.cjs.map +1 -1
- package/dist/sync/bigquery.d.cts +1 -1
- package/dist/sync/bigquery.d.ts +1 -1
- package/dist/sync/bigquery.js +7 -7
- package/dist/sync/bigquery.js.map +1 -1
- package/dist/sync/index.cjs +44 -51
- package/dist/sync/index.cjs.map +1 -1
- package/dist/sync/index.d.cts +5 -6
- package/dist/sync/index.d.ts +5 -6
- package/dist/sync/index.js +44 -51
- package/dist/sync/index.js.map +1 -1
- package/dist/{types-BTt_FmeC.d.cts → types-BW592RAZ.d.cts} +0 -2
- package/dist/{types-DXoT10nB.d.ts → types-CBwcflkG.d.ts} +0 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SqlAdapter, S as SyncEvent } from './types-
|
|
1
|
+
import { a as SqlAdapter, S as SyncEvent } from './types-CBwcflkG.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Per-repo in-memory batch buffer.
|
|
@@ -29,6 +29,7 @@ interface SyncQueueOptions {
|
|
|
29
29
|
declare class SyncQueue {
|
|
30
30
|
private buffer;
|
|
31
31
|
private flushing;
|
|
32
|
+
private flushPromise;
|
|
32
33
|
private timer;
|
|
33
34
|
private readonly adapter;
|
|
34
35
|
private readonly tableName;
|
|
@@ -43,8 +44,16 @@ declare class SyncQueue {
|
|
|
43
44
|
/**
|
|
44
45
|
* Flush all buffered events to the SQL adapter.
|
|
45
46
|
* Upserts and deletes are batched separately.
|
|
47
|
+
*
|
|
48
|
+
* Concurrent callers (e.g. several PubSub messages handled in parallel
|
|
49
|
+
* inside the same Cloud Function instance with `concurrency > 1`) all
|
|
50
|
+
* await the same in-flight flush and then trigger a follow-up flush if
|
|
51
|
+
* new events were enqueued in the meantime. This guarantees that every
|
|
52
|
+
* caller's event is persisted before its `await flush()` resolves —
|
|
53
|
+
* which is required for safe PubSub ack semantics.
|
|
46
54
|
*/
|
|
47
55
|
flush(): Promise<void>;
|
|
56
|
+
private _doFlush;
|
|
48
57
|
/** Stop the auto-flush timer and flush remaining events. */
|
|
49
58
|
shutdown(): Promise<void>;
|
|
50
59
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as SqlAdapter, S as SyncEvent } from './types-
|
|
1
|
+
import { a as SqlAdapter, S as SyncEvent } from './types-BW592RAZ.cjs';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Per-repo in-memory batch buffer.
|
|
@@ -29,6 +29,7 @@ interface SyncQueueOptions {
|
|
|
29
29
|
declare class SyncQueue {
|
|
30
30
|
private buffer;
|
|
31
31
|
private flushing;
|
|
32
|
+
private flushPromise;
|
|
32
33
|
private timer;
|
|
33
34
|
private readonly adapter;
|
|
34
35
|
private readonly tableName;
|
|
@@ -43,8 +44,16 @@ declare class SyncQueue {
|
|
|
43
44
|
/**
|
|
44
45
|
* Flush all buffered events to the SQL adapter.
|
|
45
46
|
* Upserts and deletes are batched separately.
|
|
47
|
+
*
|
|
48
|
+
* Concurrent callers (e.g. several PubSub messages handled in parallel
|
|
49
|
+
* inside the same Cloud Function instance with `concurrency > 1`) all
|
|
50
|
+
* await the same in-flight flush and then trigger a follow-up flush if
|
|
51
|
+
* new events were enqueued in the meantime. This guarantees that every
|
|
52
|
+
* caller's event is persisted before its `await flush()` resolves —
|
|
53
|
+
* which is required for safe PubSub ack semantics.
|
|
46
54
|
*/
|
|
47
55
|
flush(): Promise<void>;
|
|
56
|
+
private _doFlush;
|
|
48
57
|
/** Stop the auto-flush timer and flush remaining events. */
|
|
49
58
|
shutdown(): Promise<void>;
|
|
50
59
|
}
|