ezlogs-nextjs 0.4.1 → 0.4.2
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 +13 -8
- package/dist/actors/index.d.cts +1 -1
- package/dist/actors/index.d.ts +1 -1
- package/dist/{chunk-B7SH6V7M.js → chunk-GI6BM4MR.js} +2 -1
- package/dist/{chunk-VROC3BO3.cjs → chunk-GMHOUAKD.cjs} +12 -12
- package/dist/{chunk-2X6IZ2JX.js → chunk-MHBS5FEP.js} +2 -2
- package/dist/{chunk-ULFJOPQ2.cjs → chunk-MMLQXSSD.cjs} +2 -1
- package/dist/{chunk-SH5NGIX3.js → chunk-NINIAL7M.js} +1 -1
- package/dist/{chunk-LMG2SNTF.cjs → chunk-NX4EL7BY.cjs} +4 -4
- package/dist/{chunk-ZSFJ3UQV.cjs → chunk-PS4U2GFJ.cjs} +5 -5
- package/dist/{chunk-GILAKFP7.cjs → chunk-R6IWVTX3.cjs} +21 -21
- package/dist/{chunk-KCCKURJW.js → chunk-U22T7QYY.js} +3 -3
- package/dist/{chunk-DLUZRHHW.js → chunk-YMIGZYFH.js} +1 -1
- package/dist/{chunk-OJKWSUMK.cjs → chunk-YXZZNZG6.cjs} +9 -9
- package/dist/{chunk-H4K5QDXE.js → chunk-Z2TM3LGG.js} +1 -1
- package/dist/{configuration-Pshqvpkk.d.cts → configuration-CJ5yKVlP.d.cts} +2 -1
- package/dist/{configuration-Pshqvpkk.d.ts → configuration-CJ5yKVlP.d.ts} +2 -1
- package/dist/db/drizzle.cjs +3 -3
- package/dist/db/drizzle.js +2 -2
- package/dist/db/postgres-js.cjs +4 -4
- package/dist/db/postgres-js.js +2 -2
- package/dist/db/prisma.cjs +12 -12
- package/dist/db/prisma.js +2 -2
- package/dist/db/supabase.cjs +11 -11
- package/dist/db/supabase.js +2 -2
- package/dist/index.cjs +100 -101
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +6 -7
- package/dist/jobs/bullmq.cjs +16 -16
- package/dist/jobs/bullmq.js +4 -4
- package/dist/jobs/inngest.cjs +17 -17
- package/dist/jobs/inngest.js +4 -4
- package/dist/jobs/supabase-queues.cjs +9 -9
- package/dist/jobs/supabase-queues.js +4 -4
- package/dist/jobs/trigger.cjs +7 -7
- package/dist/jobs/trigger.js +4 -4
- package/dist/jobs/upstash-workflow.cjs +15 -15
- package/dist/jobs/upstash-workflow.js +4 -4
- package/dist/triggers/index.cjs +16 -16
- package/dist/triggers/index.js +5 -5
- package/package.json +1 -1
package/dist/db/supabase.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkYXZZNZG6_cjs = require('../chunk-YXZZNZG6.cjs');
|
|
4
|
+
var chunkMMLQXSSD_cjs = require('../chunk-MMLQXSSD.cjs');
|
|
5
5
|
var chunkTWTG5ILJ_cjs = require('../chunk-TWTG5ILJ.cjs');
|
|
6
6
|
require('../chunk-ZDSQYCYV.cjs');
|
|
7
7
|
|
|
8
8
|
// src/db/supabase.ts
|
|
9
9
|
function triggerPathWillCapture(table) {
|
|
10
|
-
const config =
|
|
10
|
+
const config = chunkMMLQXSSD_cjs.configuration();
|
|
11
11
|
if (!config.databaseReader) return false;
|
|
12
12
|
const tracked = config.triggerTrackedTables;
|
|
13
13
|
if (tracked === null) return false;
|
|
@@ -64,7 +64,7 @@ function wrapSupabase(client) {
|
|
|
64
64
|
var GLOBAL_CLIENT_KEY = /* @__PURE__ */ Symbol.for("ezlogs-nextjs:supabase-current-client");
|
|
65
65
|
function registerActorSource(client) {
|
|
66
66
|
try {
|
|
67
|
-
const slot =
|
|
67
|
+
const slot = chunkMMLQXSSD_cjs.currentActorSource();
|
|
68
68
|
if (slot) {
|
|
69
69
|
slot.client = client;
|
|
70
70
|
slot.tried = false;
|
|
@@ -76,7 +76,7 @@ function registerActorSource(client) {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
async function tryExtractSupabaseActor() {
|
|
79
|
-
const slot =
|
|
79
|
+
const slot = chunkMMLQXSSD_cjs.currentActorSource();
|
|
80
80
|
const client = slot ? slot.client : globalThis[GLOBAL_CLIENT_KEY];
|
|
81
81
|
if (!client || typeof client.auth?.getUser !== "function") return null;
|
|
82
82
|
try {
|
|
@@ -255,7 +255,7 @@ function emitFromMutation(ctx, values, result, filters, beforeRow) {
|
|
|
255
255
|
return;
|
|
256
256
|
}
|
|
257
257
|
if (!isPlainObject(values)) {
|
|
258
|
-
|
|
258
|
+
chunkYXZZNZG6_cjs.emitDbEvent({
|
|
259
259
|
modelClass: ctx.table,
|
|
260
260
|
operation: ctx.operation,
|
|
261
261
|
resourceId: idFromFilters(filters)
|
|
@@ -269,9 +269,9 @@ function emitFromMutation(ctx, values, result, filters, beforeRow) {
|
|
|
269
269
|
function emitOneRow(ctx, values, resultRow, filters, beforeRow) {
|
|
270
270
|
const resourceId = resultRow?.id ?? values.id ?? idFromFilters(filters) ?? null;
|
|
271
271
|
const merged = beforeRow ?? resultRow ?? values;
|
|
272
|
-
const displayName =
|
|
272
|
+
const displayName = chunkYXZZNZG6_cjs.resolveDisplayName(ctx.table, merged);
|
|
273
273
|
if (ctx.operation === "create") {
|
|
274
|
-
|
|
274
|
+
chunkYXZZNZG6_cjs.emitDbEvent({
|
|
275
275
|
modelClass: ctx.table,
|
|
276
276
|
operation: "create",
|
|
277
277
|
resourceId,
|
|
@@ -283,7 +283,7 @@ function emitOneRow(ctx, values, resultRow, filters, beforeRow) {
|
|
|
283
283
|
}
|
|
284
284
|
if (ctx.operation === "update") {
|
|
285
285
|
const changes = buildUpdateChanges(values, beforeRow);
|
|
286
|
-
|
|
286
|
+
chunkYXZZNZG6_cjs.emitDbEvent({
|
|
287
287
|
modelClass: ctx.table,
|
|
288
288
|
operation: "update",
|
|
289
289
|
resourceId,
|
|
@@ -297,8 +297,8 @@ function emitFromDelete(table, result, filters, beforeRow) {
|
|
|
297
297
|
const resultRow = pickFirstResultRow(result);
|
|
298
298
|
const resourceId = resultRow?.id ?? beforeRow?.id ?? idFromFilters(filters) ?? null;
|
|
299
299
|
const richestRow = resultRow ?? beforeRow;
|
|
300
|
-
const displayName = richestRow ?
|
|
301
|
-
|
|
300
|
+
const displayName = richestRow ? chunkYXZZNZG6_cjs.resolveDisplayName(table, richestRow) : null;
|
|
301
|
+
chunkYXZZNZG6_cjs.emitDbEvent({
|
|
302
302
|
modelClass: table,
|
|
303
303
|
operation: "destroy",
|
|
304
304
|
resourceId,
|
package/dist/db/supabase.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { emitDbEvent, resolveDisplayName } from '../chunk-
|
|
2
|
-
import { currentActorSource, configuration } from '../chunk-
|
|
1
|
+
import { emitDbEvent, resolveDisplayName } from '../chunk-NINIAL7M.js';
|
|
2
|
+
import { currentActorSource, configuration } from '../chunk-GI6BM4MR.js';
|
|
3
3
|
import { logger } from '../chunk-FCFVIRQF.js';
|
|
4
4
|
import '../chunk-SIAA4J6H.js';
|
|
5
5
|
|