@lpdjs/firestore-repo-service 2.4.3 → 2.6.2-beta.0

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 (76) hide show
  1. package/README.md +92 -50
  2. package/dist/{create-servers-B9dTUhvR.d.cts → create-servers-B4GrBqdA.d.cts} +6 -6
  3. package/dist/{create-servers-BFhdPPeo.d.ts → create-servers-CVudVM8e.d.ts} +6 -6
  4. package/dist/{firebase-auth-D1APf9PA.d.cts → firebase-auth-Dpvrd8MP.d.cts} +13 -0
  5. package/dist/{firebase-auth-D1APf9PA.d.ts → firebase-auth-Dpvrd8MP.d.ts} +13 -0
  6. package/dist/history/index.cjs +1 -1
  7. package/dist/history/index.cjs.map +1 -1
  8. package/dist/history/index.d.cts +10 -4
  9. package/dist/history/index.d.ts +10 -4
  10. package/dist/history/index.js +1 -1
  11. package/dist/history/index.js.map +1 -1
  12. package/dist/{index-BxurOEz1.d.ts → index-DzO9MfNI.d.cts} +9 -2
  13. package/dist/{index-BmagC7uw.d.cts → index-oFhGCBrY.d.ts} +9 -2
  14. package/dist/index.cjs +84 -84
  15. package/dist/index.cjs.map +1 -1
  16. package/dist/index.d.cts +9 -9
  17. package/dist/index.d.ts +9 -9
  18. package/dist/index.js +84 -84
  19. package/dist/index.js.map +1 -1
  20. package/dist/{openapi-ML_1hTx2.d.cts → openapi-B2w5tVRR.d.cts} +1 -1
  21. package/dist/{openapi-DIoQV_yQ.d.ts → openapi-DB8bXZB-.d.ts} +1 -1
  22. package/dist/{queue-xMOZxY0M.d.cts → queue-B8YUTnBT.d.cts} +20 -5
  23. package/dist/{queue-CVchaGAh.d.ts → queue-DYmbVDu5.d.ts} +20 -5
  24. package/dist/{read-BSyLao3I.d.cts → read-CTWZjxyh.d.cts} +1 -1
  25. package/dist/{read-BSyLao3I.d.ts → read-CTWZjxyh.d.ts} +1 -1
  26. package/dist/servers/admin/index.cjs +48 -48
  27. package/dist/servers/admin/index.cjs.map +1 -1
  28. package/dist/servers/admin/index.d.cts +4 -4
  29. package/dist/servers/admin/index.d.ts +4 -4
  30. package/dist/servers/admin/index.js +48 -48
  31. package/dist/servers/admin/index.js.map +1 -1
  32. package/dist/servers/auth/index.cjs +25 -12
  33. package/dist/servers/auth/index.cjs.map +1 -1
  34. package/dist/servers/auth/index.d.cts +1 -1
  35. package/dist/servers/auth/index.d.ts +1 -1
  36. package/dist/servers/auth/index.js +25 -12
  37. package/dist/servers/auth/index.js.map +1 -1
  38. package/dist/servers/crud/index.cjs +2 -2
  39. package/dist/servers/crud/index.cjs.map +1 -1
  40. package/dist/servers/crud/index.d.cts +6 -6
  41. package/dist/servers/crud/index.d.ts +6 -6
  42. package/dist/servers/crud/index.js +2 -2
  43. package/dist/servers/crud/index.js.map +1 -1
  44. package/dist/servers/hono/cli.cjs +142 -53
  45. package/dist/servers/hono/cli.cjs.map +1 -1
  46. package/dist/servers/hono/cli.js +142 -53
  47. package/dist/servers/hono/cli.js.map +1 -1
  48. package/dist/servers/hono/index.cjs +5 -5
  49. package/dist/servers/hono/index.cjs.map +1 -1
  50. package/dist/servers/hono/index.d.cts +241 -24
  51. package/dist/servers/hono/index.d.ts +241 -24
  52. package/dist/servers/hono/index.js +5 -5
  53. package/dist/servers/hono/index.js.map +1 -1
  54. package/dist/servers/index.cjs +98 -98
  55. package/dist/servers/index.cjs.map +1 -1
  56. package/dist/servers/index.d.cts +9 -9
  57. package/dist/servers/index.d.ts +9 -9
  58. package/dist/servers/index.js +98 -98
  59. package/dist/servers/index.js.map +1 -1
  60. package/dist/sync/bigquery.cjs +3 -3
  61. package/dist/sync/bigquery.cjs.map +1 -1
  62. package/dist/sync/bigquery.d.cts +18 -2
  63. package/dist/sync/bigquery.d.ts +18 -2
  64. package/dist/sync/bigquery.js +3 -3
  65. package/dist/sync/bigquery.js.map +1 -1
  66. package/dist/sync/index.cjs +37 -37
  67. package/dist/sync/index.cjs.map +1 -1
  68. package/dist/sync/index.d.cts +5 -5
  69. package/dist/sync/index.d.ts +5 -5
  70. package/dist/sync/index.js +37 -37
  71. package/dist/sync/index.js.map +1 -1
  72. package/dist/{types-5vgXdUM2.d.ts → types-BHZ-Gk-s.d.ts} +71 -4
  73. package/dist/{types-ChzVPw4k.d.ts → types-FLGn8CAI.d.ts} +15 -1
  74. package/dist/{types-BtdC0Qhu.d.cts → types-GvexCqrq.d.cts} +71 -4
  75. package/dist/{types-BgIGWlR1.d.cts → types-wcX7xfdo.d.cts} +15 -1
  76. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { d as CrudRepoRegistry, O as OpenAPISpecOptions } from './types-BtdC0Qhu.cjs';
1
+ import { d as CrudRepoRegistry, O as OpenAPISpecOptions } from './types-GvexCqrq.cjs';
2
2
 
3
3
  /**
4
4
  * OpenAPI 3.1 specification generator for the CRUD server.
@@ -1,4 +1,4 @@
1
- import { d as CrudRepoRegistry, O as OpenAPISpecOptions } from './types-5vgXdUM2.js';
1
+ import { d as CrudRepoRegistry, O as OpenAPISpecOptions } from './types-BHZ-Gk-s.js';
2
2
 
3
3
  /**
4
4
  * OpenAPI 3.1 specification generator for the CRUD server.
@@ -1,4 +1,4 @@
1
- import { a as SqlAdapter, S as SyncEvent } from './types-BgIGWlR1.cjs';
1
+ import { a as SqlAdapter, S as SyncEvent } from './types-wcX7xfdo.cjs';
2
2
 
3
3
  /**
4
4
  * Per-repo in-memory batch buffer.
@@ -47,12 +47,27 @@ declare class SyncQueue {
47
47
  *
48
48
  * Concurrent callers (e.g. several PubSub messages handled in parallel
49
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.
50
+ * await the same in-flight drain cycle. A drain cycle empties the buffer
51
+ * completely (see {@link _drain}), so by the time `await flush()` resolves
52
+ * every event that was buffered when the call started has been persisted
53
+ * (or handed to `onFlushError`) — which is required for safe PubSub
54
+ * at-least-once ack semantics.
54
55
  */
55
56
  flush(): Promise<void>;
57
+ /**
58
+ * Drain the buffer to empty. A single {@link _doFlush} only removes up to
59
+ * `batchSize` events, so loop until nothing remains. Without this loop,
60
+ * bursts larger than `batchSize` would leave events buffered after
61
+ * `flush()` resolved — and a container shutdown before the next interval
62
+ * would lose them permanently (breaking at-least-once).
63
+ */
64
+ private _drain;
65
+ /**
66
+ * Flush a single batch (up to `batchSize` events) to the adapter.
67
+ * @returns `true` when the batch was processed (or routed to the error
68
+ * handler) and the loop may continue; `false` when the batch was
69
+ * re-buffered after a failure with no `onFlushError` handler.
70
+ */
56
71
  private _doFlush;
57
72
  /** Stop the auto-flush timer and flush remaining events. */
58
73
  shutdown(): Promise<void>;
@@ -1,4 +1,4 @@
1
- import { a as SqlAdapter, S as SyncEvent } from './types-ChzVPw4k.js';
1
+ import { a as SqlAdapter, S as SyncEvent } from './types-FLGn8CAI.js';
2
2
 
3
3
  /**
4
4
  * Per-repo in-memory batch buffer.
@@ -47,12 +47,27 @@ declare class SyncQueue {
47
47
  *
48
48
  * Concurrent callers (e.g. several PubSub messages handled in parallel
49
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.
50
+ * await the same in-flight drain cycle. A drain cycle empties the buffer
51
+ * completely (see {@link _drain}), so by the time `await flush()` resolves
52
+ * every event that was buffered when the call started has been persisted
53
+ * (or handed to `onFlushError`) — which is required for safe PubSub
54
+ * at-least-once ack semantics.
54
55
  */
55
56
  flush(): Promise<void>;
57
+ /**
58
+ * Drain the buffer to empty. A single {@link _doFlush} only removes up to
59
+ * `batchSize` events, so loop until nothing remains. Without this loop,
60
+ * bursts larger than `batchSize` would leave events buffered after
61
+ * `flush()` resolved — and a container shutdown before the next interval
62
+ * would lose them permanently (breaking at-least-once).
63
+ */
64
+ private _drain;
65
+ /**
66
+ * Flush a single batch (up to `batchSize` events) to the adapter.
67
+ * @returns `true` when the batch was processed (or routed to the error
68
+ * handler) and the loop may continue; `false` when the batch was
69
+ * re-buffered after a failure with no `onFlushError` handler.
70
+ */
56
71
  private _doFlush;
57
72
  /** Stop the auto-flush timer and flush remaining events. */
58
73
  shutdown(): Promise<void>;
@@ -357,4 +357,4 @@ interface HistoryMethods<T, PathArgs extends readonly unknown[] = [string]> {
357
357
  ]): Promise<HistoryEntry<T> | null>;
358
358
  }
359
359
 
360
- export { type HistoryTriggersConfig as H, type V2HistoryDoc as V, type HistoryConfigForModel as a, type HistoryMethods as b, type HistoryOperation as c, type HistoryFieldChange as d, type HistoryMeta as e, type HistoryValueType as f, type V1HistoryDoc as g, type HistoryEntry as h, createHistoryMethods as i, type HistoryConfigBase as j, type HistoryFirestoreTriggersDep as k, type HistoryListOptions as l, type HistoryRawListOptions as m, type HistoryTriggerRepoOverride as n };
360
+ export { type HistoryTriggersConfig as H, type V2HistoryDoc as V, type HistoryOperation as a, type HistoryFieldChange as b, type HistoryMeta as c, type HistoryConfigForModel as d, type HistoryValueType as e, type V1HistoryDoc as f, type HistoryEntry as g, createHistoryMethods as h, type HistoryMethods as i, type HistoryConfigBase as j, type HistoryFirestoreTriggersDep as k, type HistoryListOptions as l, type HistoryRawListOptions as m, type HistoryTriggerRepoOverride as n };
@@ -357,4 +357,4 @@ interface HistoryMethods<T, PathArgs extends readonly unknown[] = [string]> {
357
357
  ]): Promise<HistoryEntry<T> | null>;
358
358
  }
359
359
 
360
- export { type HistoryTriggersConfig as H, type V2HistoryDoc as V, type HistoryConfigForModel as a, type HistoryMethods as b, type HistoryOperation as c, type HistoryFieldChange as d, type HistoryMeta as e, type HistoryValueType as f, type V1HistoryDoc as g, type HistoryEntry as h, createHistoryMethods as i, type HistoryConfigBase as j, type HistoryFirestoreTriggersDep as k, type HistoryListOptions as l, type HistoryRawListOptions as m, type HistoryTriggerRepoOverride as n };
360
+ export { type HistoryTriggersConfig as H, type V2HistoryDoc as V, type HistoryOperation as a, type HistoryFieldChange as b, type HistoryMeta as c, type HistoryConfigForModel as d, type HistoryValueType as e, type V1HistoryDoc as f, type HistoryEntry as g, createHistoryMethods as h, type HistoryMethods as i, type HistoryConfigBase as j, type HistoryFirestoreTriggersDep as k, type HistoryListOptions as l, type HistoryRawListOptions as m, type HistoryTriggerRepoOverride as n };