ezlogs-nextjs 0.2.0 → 0.3.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.
Files changed (51) hide show
  1. package/README.md +53 -16
  2. package/bin/install-triggers.cjs +73 -11
  3. package/dist/actors/index.cjs +5 -37
  4. package/dist/actors/index.js +2 -34
  5. package/dist/chunk-C5OSM557.js +39 -0
  6. package/dist/chunk-CE3R7DVB.js +1127 -0
  7. package/dist/chunk-CU45I2WR.js +498 -0
  8. package/dist/chunk-DKRNNI4I.js +180 -0
  9. package/dist/chunk-SIAA4J6H.js +17 -0
  10. package/dist/chunk-UQHEW6ER.js +119 -0
  11. package/dist/chunk-UWHYJH4M.cjs +126 -0
  12. package/dist/chunk-V5YNKKTG.cjs +42 -0
  13. package/dist/chunk-WASXTDLW.cjs +1151 -0
  14. package/dist/chunk-Y5NSHKWQ.cjs +182 -0
  15. package/dist/chunk-YX2XPLOA.cjs +508 -0
  16. package/dist/chunk-ZDSQYCYV.cjs +21 -0
  17. package/dist/db/drizzle.cjs +6 -713
  18. package/dist/db/drizzle.js +5 -712
  19. package/dist/db/prisma.cjs +52 -763
  20. package/dist/db/prisma.d.cts +3 -1
  21. package/dist/db/prisma.d.ts +3 -1
  22. package/dist/db/prisma.js +38 -749
  23. package/dist/db/supabase.cjs +21 -728
  24. package/dist/db/supabase.js +14 -721
  25. package/dist/index.cjs +204 -2181
  26. package/dist/index.js +107 -2090
  27. package/dist/jobs/bullmq.cjs +61 -552
  28. package/dist/jobs/bullmq.d.cts +8 -3
  29. package/dist/jobs/bullmq.d.ts +8 -3
  30. package/dist/jobs/bullmq.js +58 -549
  31. package/dist/jobs/inngest.cjs +23 -561
  32. package/dist/jobs/inngest.d.cts +7 -5
  33. package/dist/jobs/inngest.d.ts +7 -5
  34. package/dist/jobs/inngest.js +19 -557
  35. package/dist/jobs/supabase-queues.cjs +17 -603
  36. package/dist/jobs/supabase-queues.js +12 -598
  37. package/dist/jobs/trigger.cjs +18 -587
  38. package/dist/jobs/trigger.js +16 -585
  39. package/dist/jobs/upstash-workflow.cjs +62 -584
  40. package/dist/jobs/upstash-workflow.d.cts +17 -2
  41. package/dist/jobs/upstash-workflow.d.ts +17 -2
  42. package/dist/jobs/upstash-workflow.js +59 -582
  43. package/dist/nextjs-plugin/index.cjs +1 -1
  44. package/dist/nextjs-plugin/index.js +1 -1
  45. package/dist/nextjs-plugin/loader.cjs +21 -25
  46. package/dist/nextjs-plugin/loader.js +1 -5
  47. package/dist/triggers/index.cjs +40 -1234
  48. package/dist/triggers/index.d.cts +7 -2
  49. package/dist/triggers/index.d.ts +7 -2
  50. package/dist/triggers/index.js +6 -1221
  51. package/package.json +4 -1
@@ -148,10 +148,13 @@ interface AuditRow {
148
148
  * If the reader role may not DELETE, falls back to a plain SELECT
149
149
  * (rows then stay until the customer cleans them up) and warns once.
150
150
  *
151
+ * `since` limits the claim to rows written at or after that moment
152
+ * (a job claims only what it wrote, never the enqueuing request's rows).
153
+ *
151
154
  * Errors are caught and returned as `[]` — a failed audit read must
152
155
  * never break the host request.
153
156
  */
154
- declare function readAuditRows(exec: SqlExecutor, correlationId: string): Promise<AuditRow[]>;
157
+ declare function readAuditRows(exec: SqlExecutor, correlationId: string, since?: Date | null): Promise<AuditRow[]>;
155
158
  /**
156
159
  * Drain rows no request will claim: untagged rows, and tagged rows
157
160
  * older than ORPHAN_AGE. Each is emitted under its stored correlation
@@ -199,7 +202,9 @@ declare function emitAuditRows(rows: ReadonlyArray<AuditRow>): void;
199
202
  * before they push the HTTP event itself, so DB events arrive
200
203
  * grouped under the same correlation as the HTTP card.
201
204
  */
202
- declare function flushAuditLog(exec: SqlExecutor | null | undefined): Promise<void>;
205
+ declare function flushAuditLog(exec: SqlExecutor | null | undefined, options?: {
206
+ since?: Date | null;
207
+ }): Promise<void>;
203
208
 
204
209
  interface PgQueryConfig {
205
210
  text?: string;
@@ -148,10 +148,13 @@ interface AuditRow {
148
148
  * If the reader role may not DELETE, falls back to a plain SELECT
149
149
  * (rows then stay until the customer cleans them up) and warns once.
150
150
  *
151
+ * `since` limits the claim to rows written at or after that moment
152
+ * (a job claims only what it wrote, never the enqueuing request's rows).
153
+ *
151
154
  * Errors are caught and returned as `[]` — a failed audit read must
152
155
  * never break the host request.
153
156
  */
154
- declare function readAuditRows(exec: SqlExecutor, correlationId: string): Promise<AuditRow[]>;
157
+ declare function readAuditRows(exec: SqlExecutor, correlationId: string, since?: Date | null): Promise<AuditRow[]>;
155
158
  /**
156
159
  * Drain rows no request will claim: untagged rows, and tagged rows
157
160
  * older than ORPHAN_AGE. Each is emitted under its stored correlation
@@ -199,7 +202,9 @@ declare function emitAuditRows(rows: ReadonlyArray<AuditRow>): void;
199
202
  * before they push the HTTP event itself, so DB events arrive
200
203
  * grouped under the same correlation as the HTTP card.
201
204
  */
202
- declare function flushAuditLog(exec: SqlExecutor | null | undefined): Promise<void>;
205
+ declare function flushAuditLog(exec: SqlExecutor | null | undefined, options?: {
206
+ since?: Date | null;
207
+ }): Promise<void>;
203
208
 
204
209
  interface PgQueryConfig {
205
210
  text?: string;