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.
Files changed (42) hide show
  1. package/README.md +13 -8
  2. package/dist/actors/index.d.cts +1 -1
  3. package/dist/actors/index.d.ts +1 -1
  4. package/dist/{chunk-B7SH6V7M.js → chunk-GI6BM4MR.js} +2 -1
  5. package/dist/{chunk-VROC3BO3.cjs → chunk-GMHOUAKD.cjs} +12 -12
  6. package/dist/{chunk-2X6IZ2JX.js → chunk-MHBS5FEP.js} +2 -2
  7. package/dist/{chunk-ULFJOPQ2.cjs → chunk-MMLQXSSD.cjs} +2 -1
  8. package/dist/{chunk-SH5NGIX3.js → chunk-NINIAL7M.js} +1 -1
  9. package/dist/{chunk-LMG2SNTF.cjs → chunk-NX4EL7BY.cjs} +4 -4
  10. package/dist/{chunk-ZSFJ3UQV.cjs → chunk-PS4U2GFJ.cjs} +5 -5
  11. package/dist/{chunk-GILAKFP7.cjs → chunk-R6IWVTX3.cjs} +21 -21
  12. package/dist/{chunk-KCCKURJW.js → chunk-U22T7QYY.js} +3 -3
  13. package/dist/{chunk-DLUZRHHW.js → chunk-YMIGZYFH.js} +1 -1
  14. package/dist/{chunk-OJKWSUMK.cjs → chunk-YXZZNZG6.cjs} +9 -9
  15. package/dist/{chunk-H4K5QDXE.js → chunk-Z2TM3LGG.js} +1 -1
  16. package/dist/{configuration-Pshqvpkk.d.cts → configuration-CJ5yKVlP.d.cts} +2 -1
  17. package/dist/{configuration-Pshqvpkk.d.ts → configuration-CJ5yKVlP.d.ts} +2 -1
  18. package/dist/db/drizzle.cjs +3 -3
  19. package/dist/db/drizzle.js +2 -2
  20. package/dist/db/postgres-js.cjs +4 -4
  21. package/dist/db/postgres-js.js +2 -2
  22. package/dist/db/prisma.cjs +12 -12
  23. package/dist/db/prisma.js +2 -2
  24. package/dist/db/supabase.cjs +11 -11
  25. package/dist/db/supabase.js +2 -2
  26. package/dist/index.cjs +100 -101
  27. package/dist/index.d.cts +2 -2
  28. package/dist/index.d.ts +2 -2
  29. package/dist/index.js +6 -7
  30. package/dist/jobs/bullmq.cjs +16 -16
  31. package/dist/jobs/bullmq.js +4 -4
  32. package/dist/jobs/inngest.cjs +17 -17
  33. package/dist/jobs/inngest.js +4 -4
  34. package/dist/jobs/supabase-queues.cjs +9 -9
  35. package/dist/jobs/supabase-queues.js +4 -4
  36. package/dist/jobs/trigger.cjs +7 -7
  37. package/dist/jobs/trigger.js +4 -4
  38. package/dist/jobs/upstash-workflow.cjs +15 -15
  39. package/dist/jobs/upstash-workflow.js +4 -4
  40. package/dist/triggers/index.cjs +16 -16
  41. package/dist/triggers/index.js +5 -5
  42. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkLMG2SNTF_cjs = require('./chunk-LMG2SNTF.cjs');
4
- var chunkVROC3BO3_cjs = require('./chunk-VROC3BO3.cjs');
5
- var chunkOJKWSUMK_cjs = require('./chunk-OJKWSUMK.cjs');
6
- var chunkULFJOPQ2_cjs = require('./chunk-ULFJOPQ2.cjs');
3
+ var chunkNX4EL7BY_cjs = require('./chunk-NX4EL7BY.cjs');
4
+ var chunkGMHOUAKD_cjs = require('./chunk-GMHOUAKD.cjs');
5
+ var chunkYXZZNZG6_cjs = require('./chunk-YXZZNZG6.cjs');
6
+ var chunkMMLQXSSD_cjs = require('./chunk-MMLQXSSD.cjs');
7
7
  var chunkTWTG5ILJ_cjs = require('./chunk-TWTG5ILJ.cjs');
8
8
  require('./chunk-ZDSQYCYV.cjs');
9
9
 
@@ -12,7 +12,7 @@ var REQUEST_TIMEOUT_MS = 1e4;
12
12
  var transport = {
13
13
  async send(events) {
14
14
  if (!events || events.length === 0) return "success";
15
- const config = chunkULFJOPQ2_cjs.configuration();
15
+ const config = chunkMMLQXSSD_cjs.configuration();
16
16
  const serverUrl = config.serverUrl;
17
17
  if (!serverUrl) {
18
18
  chunkTWTG5ILJ_cjs.logger.error("Transport: serverUrl not configured");
@@ -104,7 +104,7 @@ function applyJitter(base) {
104
104
  }
105
105
  function retryAttempts() {
106
106
  try {
107
- const value = chunkULFJOPQ2_cjs.configuration().retryAttempts;
107
+ const value = chunkMMLQXSSD_cjs.configuration().retryAttempts;
108
108
  if (typeof value !== "number" || !Number.isInteger(value) || value < 0) {
109
109
  return 3;
110
110
  }
@@ -161,12 +161,12 @@ async function tick() {
161
161
  if (s.inFlight) return;
162
162
  s.inFlight = true;
163
163
  try {
164
- const events = chunkOJKWSUMK_cjs.drainEvents();
164
+ const events = chunkYXZZNZG6_cjs.drainEvents();
165
165
  if (events.length > 0) await retrySender.send(events);
166
- const reader = chunkULFJOPQ2_cjs.configuration().databaseReader;
166
+ const reader = chunkMMLQXSSD_cjs.configuration().databaseReader;
167
167
  if (!reader) return;
168
- await chunkVROC3BO3_cjs.maintainAuditLogAfterRequests(reader);
169
- const swept = chunkOJKWSUMK_cjs.drainEvents();
168
+ await chunkGMHOUAKD_cjs.maintainAuditLogAfterRequests(reader);
169
+ const swept = chunkYXZZNZG6_cjs.drainEvents();
170
170
  if (swept.length > 0) await retrySender.send(swept);
171
171
  } catch (error) {
172
172
  chunkTWTG5ILJ_cjs.logger.error(`FlushScheduler tick failed: ${describeError3(error)}`);
@@ -176,7 +176,7 @@ async function tick() {
176
176
  }
177
177
  function sendInterval() {
178
178
  try {
179
- const value = chunkULFJOPQ2_cjs.configuration().sendInterval;
179
+ const value = chunkMMLQXSSD_cjs.configuration().sendInterval;
180
180
  if (typeof value !== "number" || !Number.isFinite(value) || value <= 0) {
181
181
  return 5e3;
182
182
  }
@@ -199,7 +199,7 @@ function patchGlobalFetch() {
199
199
  if (typeof globalThis.fetch !== "function") return;
200
200
  originalFetch = globalThis.fetch;
201
201
  const wrapped = (input, init) => {
202
- const id = chunkULFJOPQ2_cjs.current();
202
+ const id = chunkMMLQXSSD_cjs.current();
203
203
  if (!id) return originalFetch.call(globalThis, input, init);
204
204
  try {
205
205
  const enriched = injectHeader(input, init, id);
@@ -335,7 +335,7 @@ function buildHttpSourceData(input) {
335
335
  source.graphql_variables = input.graphql.graphql_variables;
336
336
  }
337
337
  } else {
338
- const params = chunkOJKWSUMK_cjs.sanitizeRequestParams(input.rawParams, input.excludedVariableKeys);
338
+ const params = chunkYXZZNZG6_cjs.sanitizeRequestParams(input.rawParams, input.excludedVariableKeys);
339
339
  if (params !== null) source.request_params = params;
340
340
  }
341
341
  return compact(source);
@@ -485,7 +485,7 @@ function determineOutcome(statusCode, exception, graphqlResponseErrors, response
485
485
  }
486
486
  var MAX_SPECIFIC_ERROR_LENGTH = 200;
487
487
  function capErrorText(text) {
488
- const out = chunkOJKWSUMK_cjs.scrubSecretsInText(text, { emails: true });
488
+ const out = chunkYXZZNZG6_cjs.scrubSecretsInText(text, { emails: true });
489
489
  return out.length <= MAX_SPECIFIC_ERROR_LENGTH ? out : `${out.slice(0, MAX_SPECIFIC_ERROR_LENGTH - 1)}\u2026`;
490
490
  }
491
491
  var GENERIC_ERROR_TEXT = /^(?:validation(?: error| failed)?|invalid (?:input|request|data|body|payload|params|parameters|arguments)|bad request|unprocessable(?: entity| content)?|error|failed|request failed)[.!]?$/i;
@@ -523,9 +523,9 @@ function fieldMessage(path, message, userPatterns) {
523
523
  const text = message?.replace(/\s+/g, " ").trim().replace(/received\s+("[^"]*"|'[^']*'|`[^`]*`)/gi, "received [FILTERED]");
524
524
  if (!text) return null;
525
525
  const keys = path.filter((k) => k !== null && k !== "");
526
- if (keys.some((k) => chunkOJKWSUMK_cjs.isSensitiveKey(k, userPatterns))) return null;
526
+ if (keys.some((k) => chunkYXZZNZG6_cjs.isSensitiveKey(k, userPatterns))) return null;
527
527
  if (keys.length > 0) return `${keys.join(".")}: ${text}`;
528
- return text.split(/[^A-Za-z0-9_]+/).some((w) => w !== "" && chunkOJKWSUMK_cjs.isSensitiveKey(w, userPatterns)) ? null : text;
528
+ return text.split(/[^A-Za-z0-9_]+/).some((w) => w !== "" && chunkYXZZNZG6_cjs.isSensitiveKey(w, userPatterns)) ? null : text;
529
529
  }
530
530
  function pathKey(segment) {
531
531
  if (typeof segment === "string") return segment;
@@ -706,7 +706,7 @@ function parseGraphqlBody(body, excludedOperations, excludedVariableKeys) {
706
706
  return { metadata: "skip" };
707
707
  }
708
708
  const operationType = inferOperationTypeFromQuery(queryString) ?? inferOperationTypeFromName(operationName);
709
- const sanitizedVariables = chunkOJKWSUMK_cjs.sanitizeRequestParams(obj.variables, excludedVariableKeys);
709
+ const sanitizedVariables = chunkYXZZNZG6_cjs.sanitizeRequestParams(obj.variables, excludedVariableKeys);
710
710
  return {
711
711
  metadata: {
712
712
  graphql_operation: operationName ?? "anonymous",
@@ -764,7 +764,7 @@ function captureRoute(handler, context = {}) {
764
764
  return handler(...invokeArgs);
765
765
  };
766
766
  try {
767
- if (!chunkULFJOPQ2_cjs.configuration().captureHttp) {
767
+ if (!chunkMMLQXSSD_cjs.configuration().captureHttp) {
768
768
  return Promise.resolve(runHandler(...args));
769
769
  }
770
770
  const request = args[0];
@@ -774,8 +774,8 @@ function captureRoute(handler, context = {}) {
774
774
  const snapshot = await snapshotRequest(request);
775
775
  if (snapshot === null) return Promise.resolve(runHandler(...args));
776
776
  snapshot.rawParams = mergeRouteParams(snapshot.rawParams, await readRouteParams(args[1]));
777
- const correlationId = chunkULFJOPQ2_cjs.resolveCorrelation(request.headers ?? null);
778
- return await chunkULFJOPQ2_cjs.runWithCorrelation(
777
+ const correlationId = chunkMMLQXSSD_cjs.resolveCorrelation(request.headers ?? null);
778
+ return await chunkMMLQXSSD_cjs.runWithCorrelation(
779
779
  correlationId,
780
780
  () => runWithActorAndAuditScope(async () => {
781
781
  await maybeRunActorHook(request);
@@ -788,7 +788,7 @@ function captureRoute(handler, context = {}) {
788
788
  let followed = false;
789
789
  let handlerMs = null;
790
790
  const finish = async () => {
791
- await chunkULFJOPQ2_cjs.maybeExtractSupabaseActor();
791
+ await chunkMMLQXSSD_cjs.maybeExtractSupabaseActor();
792
792
  await emitEvent({
793
793
  snapshot,
794
794
  context,
@@ -803,7 +803,7 @@ function captureRoute(handler, context = {}) {
803
803
  await flushScheduler.flushNow().catch(() => {
804
804
  });
805
805
  }
806
- chunkULFJOPQ2_cjs.endCorrelationScope();
806
+ chunkMMLQXSSD_cjs.endCorrelationScope();
807
807
  };
808
808
  try {
809
809
  response = await Promise.resolve(runHandler(...args));
@@ -814,7 +814,7 @@ function captureRoute(handler, context = {}) {
814
814
  }
815
815
  const trpcRoute = isTrpcRoute(snapshot.rawParams, context.routeModulePath ?? null);
816
816
  responseErrorMessage = await readResponseErrorMessage(response, trpcRoute);
817
- const trpcStream = responseErrorMessage === null && trpcRoute ? trpcStreamErrorScanner(chunkULFJOPQ2_cjs.configuration().excludedGraphqlVariableKeys) : null;
817
+ const trpcStream = responseErrorMessage === null && trpcRoute ? trpcStreamErrorScanner(chunkMMLQXSSD_cjs.configuration().excludedGraphqlVariableKeys) : null;
818
818
  const followedResponse = followBody(
819
819
  response,
820
820
  snapshot.method,
@@ -862,12 +862,12 @@ function withMiddlewareCapture(middleware) {
862
862
  return middleware(req, ...mRest);
863
863
  };
864
864
  try {
865
- const correlationId = chunkULFJOPQ2_cjs.resolveCorrelation(request.headers);
865
+ const correlationId = chunkMMLQXSSD_cjs.resolveCorrelation(request.headers);
866
866
  try {
867
867
  request.headers.set(CORRELATION_HEADER, correlationId);
868
868
  } catch {
869
869
  }
870
- return await chunkULFJOPQ2_cjs.runWithCorrelation(
870
+ return await chunkMMLQXSSD_cjs.runWithCorrelation(
871
871
  correlationId,
872
872
  () => runWithActorAndAuditScope(async () => {
873
873
  const startMs = Date.now();
@@ -882,7 +882,7 @@ function withMiddlewareCapture(middleware) {
882
882
  try {
883
883
  if (shouldEmitPageNavigation(request)) {
884
884
  await maybeRunActorHook(request);
885
- await chunkULFJOPQ2_cjs.maybeExtractSupabaseActor();
885
+ await chunkMMLQXSSD_cjs.maybeExtractSupabaseActor();
886
886
  await emitPageNavigationEvent({
887
887
  request,
888
888
  statusCode: typeof response?.status === "number" ? response.status : null,
@@ -894,7 +894,7 @@ function withMiddlewareCapture(middleware) {
894
894
  chunkTWTG5ILJ_cjs.logger.debug(`page navigation capture failed: ${describeError5(error)}`);
895
895
  }
896
896
  return response;
897
- }).finally(chunkULFJOPQ2_cjs.endCorrelationScope)
897
+ }).finally(chunkMMLQXSSD_cjs.endCorrelationScope)
898
898
  );
899
899
  } catch (preCaptureError) {
900
900
  if (middlewareInvoked) throw preCaptureError;
@@ -955,25 +955,25 @@ async function emitPageNavigationEvent(input) {
955
955
  userAgent,
956
956
  remoteIp,
957
957
  contentType: null,
958
- excludedVariableKeys: chunkULFJOPQ2_cjs.configuration().excludedGraphqlVariableKeys
958
+ excludedVariableKeys: chunkMMLQXSSD_cjs.configuration().excludedGraphqlVariableKeys
959
959
  });
960
960
  const { outcome, error_message } = determineOutcome(
961
961
  input.statusCode,
962
962
  null,
963
963
  null
964
964
  );
965
- const event = chunkOJKWSUMK_cjs.build({
965
+ const event = chunkYXZZNZG6_cjs.build({
966
966
  source_type: "http_request",
967
967
  source_data: sourceData,
968
968
  outcome,
969
- correlation_id: chunkULFJOPQ2_cjs.current(),
969
+ correlation_id: chunkMMLQXSSD_cjs.current(),
970
970
  resource_ids: [],
971
- context: chunkULFJOPQ2_cjs.getCurrentActor() ? { actor: chunkULFJOPQ2_cjs.getCurrentActor() } : null,
971
+ context: chunkMMLQXSSD_cjs.getCurrentActor() ? { actor: chunkMMLQXSSD_cjs.getCurrentActor() } : null,
972
972
  duration_ms: input.durationMs,
973
973
  error_message,
974
974
  timestamp: input.startedAt
975
975
  });
976
- chunkOJKWSUMK_cjs.pushEvent(event);
976
+ chunkYXZZNZG6_cjs.pushEvent(event);
977
977
  } catch (error) {
978
978
  chunkTWTG5ILJ_cjs.logger.error(`page navigation emit failed: ${describeError5(error)}`);
979
979
  }
@@ -998,7 +998,7 @@ function capturePagesApi(handler, context = {}) {
998
998
  return handler(...invokeArgs);
999
999
  };
1000
1000
  try {
1001
- if (!chunkULFJOPQ2_cjs.configuration().captureHttp) {
1001
+ if (!chunkMMLQXSSD_cjs.configuration().captureHttp) {
1002
1002
  return Promise.resolve(runHandler(...args));
1003
1003
  }
1004
1004
  const req = args[0];
@@ -1006,10 +1006,10 @@ function capturePagesApi(handler, context = {}) {
1006
1006
  if (!req || !res) return Promise.resolve(runHandler(...args));
1007
1007
  const snapshot = snapshotPagesRequest(req);
1008
1008
  if (snapshot === null) return Promise.resolve(runHandler(...args));
1009
- const correlationId = chunkULFJOPQ2_cjs.resolveCorrelation({
1009
+ const correlationId = chunkMMLQXSSD_cjs.resolveCorrelation({
1010
1010
  get: (name) => readPagesHeader(req, name)
1011
1011
  });
1012
- return await chunkULFJOPQ2_cjs.runWithCorrelation(
1012
+ return await chunkMMLQXSSD_cjs.runWithCorrelation(
1013
1013
  correlationId,
1014
1014
  () => runWithActorAndAuditScope(async () => {
1015
1015
  await maybeRunActorHookFromPages(req);
@@ -1022,7 +1022,7 @@ function capturePagesApi(handler, context = {}) {
1022
1022
  exception = e instanceof Error ? e : new Error(String(e));
1023
1023
  throw e;
1024
1024
  } finally {
1025
- await chunkULFJOPQ2_cjs.maybeExtractSupabaseActor();
1025
+ await chunkMMLQXSSD_cjs.maybeExtractSupabaseActor();
1026
1026
  await emitEvent({
1027
1027
  snapshot,
1028
1028
  context,
@@ -1035,7 +1035,7 @@ function capturePagesApi(handler, context = {}) {
1035
1035
  if (isServerless()) {
1036
1036
  await flushScheduler.flushNow().catch(() => void 0);
1037
1037
  }
1038
- chunkULFJOPQ2_cjs.endCorrelationScope();
1038
+ chunkMMLQXSSD_cjs.endCorrelationScope();
1039
1039
  }
1040
1040
  })
1041
1041
  );
@@ -1056,12 +1056,12 @@ function captureServerAction(action, actionName) {
1056
1056
  return action(...invokeArgs);
1057
1057
  };
1058
1058
  try {
1059
- if (!chunkULFJOPQ2_cjs.configuration().captureHttp) {
1059
+ if (!chunkMMLQXSSD_cjs.configuration().captureHttp) {
1060
1060
  return Promise.resolve(runAction(...args));
1061
1061
  }
1062
1062
  const headersAdapter = await readNextHeadersAsAdapter();
1063
- const correlationId = chunkULFJOPQ2_cjs.resolveCorrelation(headersAdapter);
1064
- return await chunkULFJOPQ2_cjs.runWithCorrelation(
1063
+ const correlationId = chunkMMLQXSSD_cjs.resolveCorrelation(headersAdapter);
1064
+ return await chunkMMLQXSSD_cjs.runWithCorrelation(
1065
1065
  correlationId,
1066
1066
  () => runWithActorAndAuditScope(async () => {
1067
1067
  const startMs = Date.now();
@@ -1070,7 +1070,7 @@ function captureServerAction(action, actionName) {
1070
1070
  await maybeRunActorHookFromServerAction();
1071
1071
  try {
1072
1072
  const result = await Promise.resolve(runAction(...args));
1073
- await chunkULFJOPQ2_cjs.maybeExtractSupabaseActor();
1073
+ await chunkMMLQXSSD_cjs.maybeExtractSupabaseActor();
1074
1074
  const failure = classifyServerActionResult(result);
1075
1075
  await emitServerActionEvent({
1076
1076
  actionName,
@@ -1086,7 +1086,7 @@ function captureServerAction(action, actionName) {
1086
1086
  return result;
1087
1087
  } catch (e) {
1088
1088
  if (isNextControlFlowError(e)) {
1089
- await chunkULFJOPQ2_cjs.maybeExtractSupabaseActor();
1089
+ await chunkMMLQXSSD_cjs.maybeExtractSupabaseActor();
1090
1090
  const controlStatus = nextControlFlowStatus(e) ?? 200;
1091
1091
  await emitServerActionEvent({
1092
1092
  actionName,
@@ -1102,7 +1102,7 @@ function captureServerAction(action, actionName) {
1102
1102
  throw e;
1103
1103
  }
1104
1104
  exception = e instanceof Error ? e : new Error(String(e));
1105
- await chunkULFJOPQ2_cjs.maybeExtractSupabaseActor();
1105
+ await chunkMMLQXSSD_cjs.maybeExtractSupabaseActor();
1106
1106
  await emitServerActionEvent({
1107
1107
  actionName,
1108
1108
  statusCode: 500,
@@ -1116,7 +1116,7 @@ function captureServerAction(action, actionName) {
1116
1116
  if (isServerless()) {
1117
1117
  await flushScheduler.flushNow().catch(() => void 0);
1118
1118
  }
1119
- chunkULFJOPQ2_cjs.endCorrelationScope();
1119
+ chunkMMLQXSSD_cjs.endCorrelationScope();
1120
1120
  }
1121
1121
  })
1122
1122
  );
@@ -1144,7 +1144,7 @@ async function __ezlogs_run_inline_server_action(actionName, body) {
1144
1144
  return wrapped();
1145
1145
  }
1146
1146
  function classifyServerActionResult(result) {
1147
- const classifier = chunkULFJOPQ2_cjs.configuration().isServerActionError;
1147
+ const classifier = chunkMMLQXSSD_cjs.configuration().isServerActionError;
1148
1148
  if (classifier) {
1149
1149
  try {
1150
1150
  const verdict = classifier(result);
@@ -1220,7 +1220,7 @@ function hasErrorEntries(errors, depth = 0) {
1220
1220
  return Object.values(errors).some((v) => hasErrorEntries(v, depth + 1));
1221
1221
  }
1222
1222
  function formStateErrorMessage(r) {
1223
- const patterns = chunkULFJOPQ2_cjs.configuration().excludedGraphqlVariableKeys;
1223
+ const patterns = chunkMMLQXSSD_cjs.configuration().excludedGraphqlVariableKeys;
1224
1224
  const specific = Array.isArray(r.errors) ? specificErrorMessage({ errors: r.errors }, patterns) ?? specificErrorMessage({ formErrors: r.errors }, patterns) : specificErrorMessage({ fieldErrors: r.errors }, patterns);
1225
1225
  if (specific) return capErrorText(specific);
1226
1226
  if (typeof r.message === "string" && r.message.trim().length > 0) {
@@ -1248,7 +1248,7 @@ function defaultErrorMessage(result) {
1248
1248
  }
1249
1249
  var MAX_ERROR_MESSAGE_LENGTH = 200;
1250
1250
  function specificOrOwn(result, error) {
1251
- const specific = isGenericErrorText(error) ? specificErrorMessage(result, chunkULFJOPQ2_cjs.configuration().excludedGraphqlVariableKeys) : null;
1251
+ const specific = isGenericErrorText(error) ? specificErrorMessage(result, chunkMMLQXSSD_cjs.configuration().excludedGraphqlVariableKeys) : null;
1252
1252
  return capErrorText(specific ?? error);
1253
1253
  }
1254
1254
  function truncate(value) {
@@ -1266,7 +1266,7 @@ function isZodErrorLike(value) {
1266
1266
  return Array.isArray(issues) && issues.length > 0;
1267
1267
  }
1268
1268
  function formatZodIssues(issues) {
1269
- const patterns = chunkULFJOPQ2_cjs.configuration().excludedGraphqlVariableKeys;
1269
+ const patterns = chunkMMLQXSSD_cjs.configuration().excludedGraphqlVariableKeys;
1270
1270
  const messages = [];
1271
1271
  for (const issue of issues) {
1272
1272
  const m = issueMessage(issue, patterns);
@@ -1355,7 +1355,7 @@ function redirectPath(target, requestHost) {
1355
1355
  const url = new URL(target, "http://ezlogs.internal");
1356
1356
  if (absolute && (!requestHost || url.host.toLowerCase() !== requestHost.toLowerCase())) return null;
1357
1357
  const path = url.pathname.split("/").map((seg) => /^[A-Za-z0-9_-]{20,}$/.test(seg) && !UUID.test(seg) ? "[FILTERED]" : seg).join("/");
1358
- return path ? chunkOJKWSUMK_cjs.scrubSecretsInText(path, { emails: true }) : null;
1358
+ return path ? chunkYXZZNZG6_cjs.scrubSecretsInText(path, { emails: true }) : null;
1359
1359
  } catch {
1360
1360
  return null;
1361
1361
  }
@@ -1369,9 +1369,9 @@ async function emitServerActionEvent(input) {
1369
1369
  const fromPage = referer ?? nextUrl ?? null;
1370
1370
  const argParams = extractServerActionArgs(input.args, input.actionName);
1371
1371
  const combined = argParams !== null || fromPage !== null ? { ...argParams ?? {}, ...fromPage !== null ? { from_page: fromPage } : {} } : null;
1372
- const requestParams = chunkOJKWSUMK_cjs.maskAuthParams(
1372
+ const requestParams = chunkYXZZNZG6_cjs.maskAuthParams(
1373
1373
  combined,
1374
- chunkOJKWSUMK_cjs.isAuthActionName(input.actionName) || chunkOJKWSUMK_cjs.isAuthPath(pathOf(fromPage))
1374
+ chunkYXZZNZG6_cjs.isAuthActionName(input.actionName) || chunkYXZZNZG6_cjs.isAuthPath(pathOf(fromPage))
1375
1375
  );
1376
1376
  const syntheticUrl = new URL(
1377
1377
  `http://localhost/__server-action/${encodeURIComponent(input.actionName)}`
@@ -1386,7 +1386,7 @@ async function emitServerActionEvent(input) {
1386
1386
  userAgent,
1387
1387
  remoteIp: extractRemoteIp(await readNextHeadersAsAdapter()),
1388
1388
  contentType: null,
1389
- excludedVariableKeys: chunkULFJOPQ2_cjs.configuration().excludedGraphqlVariableKeys
1389
+ excludedVariableKeys: chunkMMLQXSSD_cjs.configuration().excludedGraphqlVariableKeys
1390
1390
  });
1391
1391
  if (input.redirectTo) {
1392
1392
  const host = await readNextHeader("x-forwarded-host") ?? await readNextHeader("host");
@@ -1398,18 +1398,18 @@ async function emitServerActionEvent(input) {
1398
1398
  input.exception,
1399
1399
  null
1400
1400
  );
1401
- const event = chunkOJKWSUMK_cjs.build({
1401
+ const event = chunkYXZZNZG6_cjs.build({
1402
1402
  source_type: "http_request",
1403
1403
  source_data: sourceData,
1404
1404
  outcome,
1405
- correlation_id: chunkULFJOPQ2_cjs.current(),
1405
+ correlation_id: chunkMMLQXSSD_cjs.current(),
1406
1406
  resource_ids: [],
1407
- context: chunkULFJOPQ2_cjs.getCurrentActor() ? { actor: chunkULFJOPQ2_cjs.getCurrentActor() } : null,
1407
+ context: chunkMMLQXSSD_cjs.getCurrentActor() ? { actor: chunkMMLQXSSD_cjs.getCurrentActor() } : null,
1408
1408
  duration_ms: input.durationMs,
1409
1409
  error_message,
1410
1410
  timestamp: input.startedAt
1411
1411
  });
1412
- chunkOJKWSUMK_cjs.pushEvent(event);
1412
+ chunkYXZZNZG6_cjs.pushEvent(event);
1413
1413
  } catch (error) {
1414
1414
  chunkTWTG5ILJ_cjs.logger.error(`server-action capture emit failed: ${describeError5(error)}`);
1415
1415
  }
@@ -1492,7 +1492,7 @@ function actionWords(name) {
1492
1492
  return name.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/([a-zA-Z])(\d)/g, "$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean);
1493
1493
  }
1494
1494
  function looksLikeCardNumber(digits, paymentAction) {
1495
- if (digits.length < 13 || digits.length > 19 || !chunkOJKWSUMK_cjs.passesLuhn(digits)) return false;
1495
+ if (digits.length < 13 || digits.length > 19 || !chunkYXZZNZG6_cjs.passesLuhn(digits)) return false;
1496
1496
  return paymentAction || digits.length === 15 || digits.length === 16;
1497
1497
  }
1498
1498
  function maskPositional(value, flags) {
@@ -1580,7 +1580,7 @@ function serializeArgValue(value) {
1580
1580
  return void 0;
1581
1581
  }
1582
1582
  async function captureHttpEvent(input) {
1583
- if (!chunkULFJOPQ2_cjs.configuration().captureHttp) return;
1583
+ if (!chunkMMLQXSSD_cjs.configuration().captureHttp) return;
1584
1584
  const snapshot = await snapshotRequest(input.request);
1585
1585
  if (snapshot === null) return;
1586
1586
  let graphqlErrorMessage = null;
@@ -1646,7 +1646,7 @@ async function snapshotRequest(request) {
1646
1646
  return { method, url, userAgent, remoteIp, contentType, rawParams, graphqlBody, serverActionId };
1647
1647
  }
1648
1648
  async function maybeRunActorHook(request) {
1649
- const hook = chunkULFJOPQ2_cjs.configuration().actorFromRequest;
1649
+ const hook = chunkMMLQXSSD_cjs.configuration().actorFromRequest;
1650
1650
  let hookResult = null;
1651
1651
  if (hook) {
1652
1652
  try {
@@ -1659,7 +1659,7 @@ async function maybeRunActorHook(request) {
1659
1659
  applyActorFromHookAndUa(hookResult, userAgent);
1660
1660
  }
1661
1661
  async function maybeRunActorHookFromPages(req) {
1662
- const hook = chunkULFJOPQ2_cjs.configuration().actorFromRequest;
1662
+ const hook = chunkMMLQXSSD_cjs.configuration().actorFromRequest;
1663
1663
  let hookResult = null;
1664
1664
  if (hook) {
1665
1665
  try {
@@ -1673,7 +1673,7 @@ async function maybeRunActorHookFromPages(req) {
1673
1673
  applyActorFromHookAndUa(hookResult, userAgent);
1674
1674
  }
1675
1675
  async function maybeRunActorHookFromServerAction() {
1676
- const hook = chunkULFJOPQ2_cjs.configuration().actorFromRequest;
1676
+ const hook = chunkMMLQXSSD_cjs.configuration().actorFromRequest;
1677
1677
  const headers = await loadNextHeaders();
1678
1678
  if (!hook && !headers) {
1679
1679
  chunkTWTG5ILJ_cjs.logger.debug("actorFromRequest (server action): no hook + no next/headers");
@@ -1818,7 +1818,7 @@ function readPagesHeader(req, name) {
1818
1818
  async function emitEvent(input) {
1819
1819
  try {
1820
1820
  await flushTriggerAuditLog();
1821
- const config = chunkULFJOPQ2_cjs.configuration();
1821
+ const config = chunkMMLQXSSD_cjs.configuration();
1822
1822
  let graphql = null;
1823
1823
  if (input.snapshot.graphqlBody !== null) {
1824
1824
  const parsed = parseGraphqlBody(
@@ -1834,9 +1834,9 @@ async function emitEvent(input) {
1834
1834
  method: input.snapshot.method,
1835
1835
  url: input.snapshot.url,
1836
1836
  statusCode: input.statusCode,
1837
- rawParams: chunkOJKWSUMK_cjs.maskAuthParams(
1837
+ rawParams: chunkYXZZNZG6_cjs.maskAuthParams(
1838
1838
  unwrapTrpcParams(input.snapshot.rawParams, input.snapshot.url, input.context.routeModulePath ?? null),
1839
- chunkOJKWSUMK_cjs.isAuthPath(input.snapshot.url.pathname)
1839
+ chunkYXZZNZG6_cjs.isAuthPath(input.snapshot.url.pathname)
1840
1840
  ),
1841
1841
  routeModulePath: input.context.routeModulePath ?? null,
1842
1842
  serverActionName,
@@ -1854,20 +1854,20 @@ async function emitEvent(input) {
1854
1854
  input.responseErrorMessage ?? null
1855
1855
  );
1856
1856
  const contextValue = buildContext();
1857
- const event = chunkOJKWSUMK_cjs.build({
1857
+ const event = chunkYXZZNZG6_cjs.build({
1858
1858
  source_type: "http_request",
1859
1859
  source_data: sourceData,
1860
1860
  outcome,
1861
- correlation_id: chunkULFJOPQ2_cjs.current(),
1861
+ correlation_id: chunkMMLQXSSD_cjs.current(),
1862
1862
  resource_ids: [],
1863
1863
  context: contextValue,
1864
1864
  duration_ms: input.durationMs,
1865
1865
  error_message,
1866
1866
  timestamp: input.startedAt
1867
1867
  });
1868
- chunkOJKWSUMK_cjs.pushEvent(event);
1868
+ chunkYXZZNZG6_cjs.pushEvent(event);
1869
1869
  } catch (error) {
1870
- const cid = chunkULFJOPQ2_cjs.current();
1870
+ const cid = chunkMMLQXSSD_cjs.current();
1871
1871
  const cidLabel = cid ? ` (correlation_id=${cid})` : "";
1872
1872
  chunkTWTG5ILJ_cjs.logger.error(`http capture emit failed${cidLabel}: ${describeError5(error)}`);
1873
1873
  }
@@ -1875,7 +1875,7 @@ async function emitEvent(input) {
1875
1875
  function followBody(response, method, onDone, onChunk) {
1876
1876
  try {
1877
1877
  if (!response.body || method === "HEAD" || response.bodyUsed) return null;
1878
- const capture = chunkULFJOPQ2_cjs.makeAsyncContextCapture();
1878
+ const capture = chunkMMLQXSSD_cjs.makeAsyncContextCapture();
1879
1879
  if (!capture) return null;
1880
1880
  const keepAlive = isServerless() ? platformWaitUntil() : null;
1881
1881
  if (isServerless() && !keepAlive) return null;
@@ -1941,23 +1941,23 @@ function platformWaitUntil() {
1941
1941
  return null;
1942
1942
  }
1943
1943
  function buildContext() {
1944
- const currentActor = chunkULFJOPQ2_cjs.getCurrentActor();
1944
+ const currentActor = chunkMMLQXSSD_cjs.getCurrentActor();
1945
1945
  if (!currentActor) return null;
1946
1946
  return { actor: currentActor };
1947
1947
  }
1948
1948
  async function flushTriggerAuditLog() {
1949
- const reader = chunkULFJOPQ2_cjs.configuration().databaseReader;
1949
+ const reader = chunkMMLQXSSD_cjs.configuration().databaseReader;
1950
1950
  if (!reader) return;
1951
- await chunkVROC3BO3_cjs.flushAuditLog(reader);
1951
+ await chunkGMHOUAKD_cjs.flushAuditLog(reader);
1952
1952
  }
1953
1953
  function runWithActorAndAuditScope(callback) {
1954
- if (chunkULFJOPQ2_cjs.configuration().databaseReader == null) {
1955
- return chunkULFJOPQ2_cjs.runWithActorScope(callback);
1954
+ if (chunkMMLQXSSD_cjs.configuration().databaseReader == null) {
1955
+ return chunkMMLQXSSD_cjs.runWithActorScope(callback);
1956
1956
  }
1957
- return chunkULFJOPQ2_cjs.runWithActorScope(() => chunkVROC3BO3_cjs.runWithEmittedAuditIdsScope(callback));
1957
+ return chunkMMLQXSSD_cjs.runWithActorScope(() => chunkGMHOUAKD_cjs.runWithEmittedAuditIdsScope(callback));
1958
1958
  }
1959
1959
  function isExcludedPath(path, method) {
1960
- const config = chunkULFJOPQ2_cjs.configuration();
1960
+ const config = chunkMMLQXSSD_cjs.configuration();
1961
1961
  const normalizedMethod = (method ?? "").toUpperCase();
1962
1962
  for (const pattern of config.allExcludedPaths()) {
1963
1963
  if (typeof pattern === "string") {
@@ -1969,7 +1969,7 @@ function isExcludedPath(path, method) {
1969
1969
  return true;
1970
1970
  }
1971
1971
  }
1972
- if (hasExcludedExtension(path, chunkULFJOPQ2_cjs.DEFAULT_EXCLUDED_EXTENSIONS)) return true;
1972
+ if (hasExcludedExtension(path, chunkMMLQXSSD_cjs.DEFAULT_EXCLUDED_EXTENSIONS)) return true;
1973
1973
  return false;
1974
1974
  }
1975
1975
  function extractRemoteIp(headers) {
@@ -2015,7 +2015,7 @@ async function readResponseErrorMessage(response, trpcRoute = false) {
2015
2015
  const text = await response.clone().text();
2016
2016
  if (!text || text.length > MAX_ERROR_BODY_LENGTH) return null;
2017
2017
  const parsed = safeJsonParse2(text);
2018
- const trpc = trpcErrorMessage(parsed, chunkULFJOPQ2_cjs.configuration().excludedGraphqlVariableKeys);
2018
+ const trpc = trpcErrorMessage(parsed, chunkMMLQXSSD_cjs.configuration().excludedGraphqlVariableKeys);
2019
2019
  if (trpc) return trpc;
2020
2020
  if (response.status === 207) return null;
2021
2021
  const body = parsed;
@@ -2024,9 +2024,9 @@ async function readResponseErrorMessage(response, trpcRoute = false) {
2024
2024
  const raw = [body.error, body.message, nested?.message].find(
2025
2025
  (v) => typeof v === "string" && v.trim().length > 0
2026
2026
  );
2027
- const specific = !raw || isGenericErrorText(raw) ? specificErrorMessage(body, chunkULFJOPQ2_cjs.configuration().excludedGraphqlVariableKeys) : null;
2027
+ const specific = !raw || isGenericErrorText(raw) ? specificErrorMessage(body, chunkMMLQXSSD_cjs.configuration().excludedGraphqlVariableKeys) : null;
2028
2028
  if (specific) return capErrorText(specific);
2029
- return raw ? truncate(chunkOJKWSUMK_cjs.scrubSecretsInText(raw.trim(), { emails: true })) : null;
2029
+ return raw ? truncate(chunkYXZZNZG6_cjs.scrubSecretsInText(raw.trim(), { emails: true })) : null;
2030
2030
  } catch {
2031
2031
  return null;
2032
2032
  }
@@ -2050,23 +2050,23 @@ function applyActorFromHookAndUa(hookResult, userAgent) {
2050
2050
  const uaMatch = classifyUserAgent(userAgent);
2051
2051
  if (hookResult != null && typeof hookResult === "object" && !Array.isArray(hookResult)) {
2052
2052
  if (uaMatch === null) {
2053
- chunkULFJOPQ2_cjs.setActor(hookResult);
2053
+ chunkMMLQXSSD_cjs.setActor(hookResult);
2054
2054
  return;
2055
2055
  }
2056
2056
  const hookObj = hookResult;
2057
2057
  const existingKind = hookObj.kind;
2058
2058
  if (typeof existingKind === "string" && existingKind.length > 0) {
2059
- chunkULFJOPQ2_cjs.setActor(hookObj);
2059
+ chunkMMLQXSSD_cjs.setActor(hookObj);
2060
2060
  return;
2061
2061
  }
2062
- chunkULFJOPQ2_cjs.setActor({ ...hookObj, kind: uaMatch.kind });
2062
+ chunkMMLQXSSD_cjs.setActor({ ...hookObj, kind: uaMatch.kind });
2063
2063
  return;
2064
2064
  }
2065
2065
  if (uaMatch !== null) {
2066
- chunkULFJOPQ2_cjs.setActor(synthesizeAgentActor(uaMatch));
2066
+ chunkMMLQXSSD_cjs.setActor(synthesizeAgentActor(uaMatch));
2067
2067
  return;
2068
2068
  }
2069
- chunkULFJOPQ2_cjs.setActor(null);
2069
+ chunkMMLQXSSD_cjs.setActor(null);
2070
2070
  }
2071
2071
  function synthesizeAgentActor(detection) {
2072
2072
  return {
@@ -2098,8 +2098,7 @@ function announceStartup(serverUrl, projectToken) {
2098
2098
  if (g[STARTUP_ANNOUNCED_KEY]) return;
2099
2099
  g[STARTUP_ANNOUNCED_KEY] = true;
2100
2100
  if (!serverUrl || !projectToken) {
2101
- const missing = [!serverUrl && "serverUrl", !projectToken && "projectToken"].filter(Boolean).join(" and ");
2102
- chunkTWTG5ILJ_cjs.logger.warn(`not capturing: ${missing} missing in ezlogs.init() (check EZLOGS_SERVER_URL / EZLOGS_PROJECT_TOKEN)`);
2101
+ chunkTWTG5ILJ_cjs.logger.warn("not capturing: projectToken missing in ezlogs.init() (check EZLOGS_PROJECT_TOKEN)");
2103
2102
  return;
2104
2103
  }
2105
2104
  let host = serverUrl;
@@ -2115,7 +2114,7 @@ function _resetStartupAnnouncementForTests() {
2115
2114
  }
2116
2115
  var ezlogs = {
2117
2116
  init(options) {
2118
- const config = chunkULFJOPQ2_cjs.configuration();
2117
+ const config = chunkMMLQXSSD_cjs.configuration();
2119
2118
  config.apply(options);
2120
2119
  if (options.logLevel) chunkTWTG5ILJ_cjs.setLogLevel(options.logLevel);
2121
2120
  warnIfInsecureServerUrl(config.serverUrl, config.allowInsecureTransport);
@@ -2134,7 +2133,7 @@ var ezlogs = {
2134
2133
  }
2135
2134
  });
2136
2135
  } else if (options.patchDatabaseClient) {
2137
- chunkLMG2SNTF_cjs.patchPgClient(
2136
+ chunkNX4EL7BY_cjs.patchPgClient(
2138
2137
  options.patchDatabaseClient
2139
2138
  );
2140
2139
  }
@@ -2181,7 +2180,7 @@ function detectDatabaseUrlFromEnv() {
2181
2180
  return null;
2182
2181
  }
2183
2182
  async function autoWireTriggerPathFromDatabaseUrl(options) {
2184
- const config = chunkULFJOPQ2_cjs.configuration();
2183
+ const config = chunkMMLQXSSD_cjs.configuration();
2185
2184
  let pg;
2186
2185
  try {
2187
2186
  const dynImport = new Function(
@@ -2200,7 +2199,7 @@ async function autoWireTriggerPathFromDatabaseUrl(options) {
2200
2199
  max: 4
2201
2200
  });
2202
2201
  const reader = (sql, params) => pool.query(sql, params);
2203
- if (await chunkVROC3BO3_cjs.auditLogInstalled(reader) === false) {
2202
+ if (await chunkGMHOUAKD_cjs.auditLogInstalled(reader) === false) {
2204
2203
  warnAuditLogMissing();
2205
2204
  void pool.end?.().catch(() => {
2206
2205
  });
@@ -2209,21 +2208,21 @@ async function autoWireTriggerPathFromDatabaseUrl(options) {
2209
2208
  if (config.databaseReader === null) {
2210
2209
  config.databaseReader = reader;
2211
2210
  }
2212
- chunkLMG2SNTF_cjs.patchPgClient(pg);
2213
- void chunkVROC3BO3_cjs.checkAuditLogAccess(reader);
2211
+ chunkNX4EL7BY_cjs.patchPgClient(pg);
2212
+ void chunkGMHOUAKD_cjs.checkAuditLogAccess(reader);
2214
2213
  runTriggerTrackedTablesDetection();
2215
2214
  }
2216
2215
  function applyDatabaseReaderDefaults() {
2217
- const config = chunkULFJOPQ2_cjs.configuration();
2216
+ const config = chunkMMLQXSSD_cjs.configuration();
2218
2217
  const reader = config.databaseReader;
2219
2218
  if (!reader) return;
2220
- chunkVROC3BO3_cjs.auditLogInstalled(reader).then((installed) => {
2219
+ chunkGMHOUAKD_cjs.auditLogInstalled(reader).then((installed) => {
2221
2220
  if (installed === false && config.databaseReader === reader) {
2222
2221
  config.databaseReader = null;
2223
2222
  warnAuditLogMissing();
2224
2223
  return;
2225
2224
  }
2226
- if (installed === true) void chunkVROC3BO3_cjs.checkAuditLogAccess(reader);
2225
+ if (installed === true) void chunkGMHOUAKD_cjs.checkAuditLogAccess(reader);
2227
2226
  runTriggerTrackedTablesDetection();
2228
2227
  }).catch(() => {
2229
2228
  });
@@ -2234,10 +2233,10 @@ function warnAuditLogMissing() {
2234
2233
  );
2235
2234
  }
2236
2235
  function runTriggerTrackedTablesDetection() {
2237
- const config = chunkULFJOPQ2_cjs.configuration();
2236
+ const config = chunkMMLQXSSD_cjs.configuration();
2238
2237
  if (!config.databaseReader) return;
2239
2238
  if (config.triggerTrackedTables !== null) return;
2240
- chunkVROC3BO3_cjs.detectTriggerTrackedTables(config.databaseReader).then((tables) => {
2239
+ chunkGMHOUAKD_cjs.detectTriggerTrackedTables(config.databaseReader).then((tables) => {
2241
2240
  if (tables === null) {
2242
2241
  chunkTWTG5ILJ_cjs.logger.debug(
2243
2242
  "trigger-tracked-table detection failed; falling back to suppress-all on `databaseReader` paths. Untracked tables will not appear in the dashboard until detection succeeds or the table is added with `SELECT ezlogs_track('table_name')`."
@@ -2277,16 +2276,16 @@ function warnIfInsecureServerUrl(serverUrl, allowInsecure) {
2277
2276
  );
2278
2277
  }
2279
2278
  function _internalsForTests() {
2280
- return { buffer: chunkOJKWSUMK_cjs.buffer_exports, flushScheduler };
2279
+ return { buffer: chunkYXZZNZG6_cjs.buffer_exports, flushScheduler };
2281
2280
  }
2282
2281
 
2283
2282
  Object.defineProperty(exports, "ArgError", {
2284
2283
  enumerable: true,
2285
- get: function () { return chunkOJKWSUMK_cjs.ArgError; }
2284
+ get: function () { return chunkYXZZNZG6_cjs.ArgError; }
2286
2285
  });
2287
2286
  Object.defineProperty(exports, "buildEvent", {
2288
2287
  enumerable: true,
2289
- get: function () { return chunkOJKWSUMK_cjs.build; }
2288
+ get: function () { return chunkYXZZNZG6_cjs.build; }
2290
2289
  });
2291
2290
  exports.__ezlogs_run_inline_server_action = __ezlogs_run_inline_server_action;
2292
2291
  exports._detectDatabaseUrlFromEnvForTests = _detectDatabaseUrlFromEnvForTests;