ezlogs-nextjs 0.1.0 → 0.1.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.
- package/LICENSE +1 -1
- package/README.md +98 -688
- package/bin/install-triggers.cjs +1 -1
- package/dist/actors/index.d.cts +1 -1
- package/dist/actors/index.d.ts +1 -1
- package/dist/{configuration-D9x9Gvds.d.cts → configuration-aUYgA8-h.d.cts} +20 -3
- package/dist/{configuration-D9x9Gvds.d.ts → configuration-aUYgA8-h.d.ts} +20 -3
- package/dist/db/drizzle.cjs +17 -6
- package/dist/db/drizzle.js +17 -6
- package/dist/db/prisma.cjs +17 -6
- package/dist/db/prisma.js +17 -6
- package/dist/db/supabase.cjs +17 -6
- package/dist/db/supabase.js +17 -6
- package/dist/index.cjs +459 -222
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +459 -222
- package/dist/jobs/bullmq.cjs +6 -5
- package/dist/jobs/bullmq.d.cts +16 -8
- package/dist/jobs/bullmq.d.ts +16 -8
- package/dist/jobs/bullmq.js +6 -5
- package/dist/jobs/inngest.cjs +16 -6
- package/dist/jobs/inngest.js +16 -6
- package/dist/jobs/supabase-queues.cjs +16 -6
- package/dist/jobs/supabase-queues.js +16 -6
- package/dist/jobs/trigger.cjs +16 -6
- package/dist/jobs/trigger.js +16 -6
- package/dist/jobs/upstash-workflow.cjs +16 -6
- package/dist/jobs/upstash-workflow.js +16 -6
- package/dist/nextjs-plugin/index.cjs +18 -0
- package/dist/nextjs-plugin/index.js +18 -0
- package/dist/nextjs-plugin/loader.cjs +44 -34
- package/dist/nextjs-plugin/loader.d.cts +10 -0
- package/dist/nextjs-plugin/loader.d.ts +10 -0
- package/dist/nextjs-plugin/loader.js +44 -34
- package/dist/triggers/index.cjs +43 -8
- package/dist/triggers/index.d.cts +7 -0
- package/dist/triggers/index.d.ts +7 -0
- package/dist/triggers/index.js +43 -8
- package/package.json +3 -4
- package/sql/postgres/00_install.sql +1 -1
package/bin/install-triggers.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
// CLI shim for `npx ezlogs
|
|
2
|
+
// CLI shim for `npx @ezlogs/nextjs install-triggers`.
|
|
3
3
|
//
|
|
4
4
|
// Lazy-imports the dist CJS bundle + `pg` so we don't load either when
|
|
5
5
|
// the customer is just installing the package. `pg` is a devDependency
|
package/dist/actors/index.d.cts
CHANGED
package/dist/actors/index.d.ts
CHANGED
|
@@ -17,11 +17,19 @@ type LogLevel = "debug" | "info" | "warn" | "error" | "silent";
|
|
|
17
17
|
* not configurable.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
+
/** Categories of who/what performed an action. Mirrors the Ruby
|
|
21
|
+
* `Event#actor_kind` enum. Defaults to "human" on the server when
|
|
22
|
+
* absent. */
|
|
23
|
+
type ActorKind = "human" | "agent" | "system" | "hybrid";
|
|
20
24
|
interface ActorContext {
|
|
21
25
|
/** Stable identifier for the user (e.g. `user.id`). REQUIRED. */
|
|
22
26
|
id: string;
|
|
23
27
|
/** Human-readable label (e.g. `user.email`). Optional. */
|
|
24
28
|
label?: string;
|
|
29
|
+
/** Category of actor. Optional — the server stamps `human` when
|
|
30
|
+
* absent. Auto-detection from the User-Agent fills this when the
|
|
31
|
+
* request looks like it came from an LLM client. */
|
|
32
|
+
kind?: ActorKind;
|
|
25
33
|
}
|
|
26
34
|
/**
|
|
27
35
|
* Minimal request-shape contract for `actorFromRequest`. We don't import
|
|
@@ -53,7 +61,7 @@ type DisplayNameMap = Record<string, DisplayNameResolver>;
|
|
|
53
61
|
/**
|
|
54
62
|
* Classifier for Server Action failure return values.
|
|
55
63
|
*
|
|
56
|
-
* Many Next.js codebases (next-safe-action templates, the
|
|
64
|
+
* Many Next.js codebases (Velory, next-safe-action templates, the
|
|
57
65
|
* Vercel App Router examples, tRPC) catch errors inside the action and
|
|
58
66
|
* return `{ success: false, error: "..." }` instead of throwing. The
|
|
59
67
|
* HTTP response is 200, so the agent can't tell the action failed
|
|
@@ -72,8 +80,7 @@ type ServerActionErrorClassifier = (result: unknown) => boolean | {
|
|
|
72
80
|
errorMessage: string;
|
|
73
81
|
} | null | undefined;
|
|
74
82
|
interface InitOptions {
|
|
75
|
-
|
|
76
|
-
serverUrl?: string;
|
|
83
|
+
serverUrl: string;
|
|
77
84
|
projectToken: string;
|
|
78
85
|
captureHttp?: boolean;
|
|
79
86
|
captureDb?: boolean;
|
|
@@ -98,6 +105,16 @@ interface InitOptions {
|
|
|
98
105
|
isServerActionError?: ServerActionErrorClassifier;
|
|
99
106
|
/** Patch globalThis.fetch to inject X-Correlation-ID. Default true. */
|
|
100
107
|
patchGlobalFetch?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Suppress the "serverUrl is not HTTPS" warning when intentionally
|
|
110
|
+
* pointing the agent at a non-HTTPS endpoint (a local relay, a
|
|
111
|
+
* staging proxy on a private network, …). HTTPS is otherwise
|
|
112
|
+
* enforced by warning at init time so a typo in production
|
|
113
|
+
* (`http://app.ezlogs.io`) doesn't silently ship events in
|
|
114
|
+
* cleartext. localhost / 127.0.0.1 / [::1] / *.local are exempt
|
|
115
|
+
* by default — those are dev environments. Default false.
|
|
116
|
+
*/
|
|
117
|
+
allowInsecureTransport?: boolean;
|
|
101
118
|
/**
|
|
102
119
|
* When true (default), the HTTP capturer extracts the current actor
|
|
103
120
|
* from the most-recently-constructed Supabase client by calling
|
|
@@ -17,11 +17,19 @@ type LogLevel = "debug" | "info" | "warn" | "error" | "silent";
|
|
|
17
17
|
* not configurable.
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
+
/** Categories of who/what performed an action. Mirrors the Ruby
|
|
21
|
+
* `Event#actor_kind` enum. Defaults to "human" on the server when
|
|
22
|
+
* absent. */
|
|
23
|
+
type ActorKind = "human" | "agent" | "system" | "hybrid";
|
|
20
24
|
interface ActorContext {
|
|
21
25
|
/** Stable identifier for the user (e.g. `user.id`). REQUIRED. */
|
|
22
26
|
id: string;
|
|
23
27
|
/** Human-readable label (e.g. `user.email`). Optional. */
|
|
24
28
|
label?: string;
|
|
29
|
+
/** Category of actor. Optional — the server stamps `human` when
|
|
30
|
+
* absent. Auto-detection from the User-Agent fills this when the
|
|
31
|
+
* request looks like it came from an LLM client. */
|
|
32
|
+
kind?: ActorKind;
|
|
25
33
|
}
|
|
26
34
|
/**
|
|
27
35
|
* Minimal request-shape contract for `actorFromRequest`. We don't import
|
|
@@ -53,7 +61,7 @@ type DisplayNameMap = Record<string, DisplayNameResolver>;
|
|
|
53
61
|
/**
|
|
54
62
|
* Classifier for Server Action failure return values.
|
|
55
63
|
*
|
|
56
|
-
* Many Next.js codebases (next-safe-action templates, the
|
|
64
|
+
* Many Next.js codebases (Velory, next-safe-action templates, the
|
|
57
65
|
* Vercel App Router examples, tRPC) catch errors inside the action and
|
|
58
66
|
* return `{ success: false, error: "..." }` instead of throwing. The
|
|
59
67
|
* HTTP response is 200, so the agent can't tell the action failed
|
|
@@ -72,8 +80,7 @@ type ServerActionErrorClassifier = (result: unknown) => boolean | {
|
|
|
72
80
|
errorMessage: string;
|
|
73
81
|
} | null | undefined;
|
|
74
82
|
interface InitOptions {
|
|
75
|
-
|
|
76
|
-
serverUrl?: string;
|
|
83
|
+
serverUrl: string;
|
|
77
84
|
projectToken: string;
|
|
78
85
|
captureHttp?: boolean;
|
|
79
86
|
captureDb?: boolean;
|
|
@@ -98,6 +105,16 @@ interface InitOptions {
|
|
|
98
105
|
isServerActionError?: ServerActionErrorClassifier;
|
|
99
106
|
/** Patch globalThis.fetch to inject X-Correlation-ID. Default true. */
|
|
100
107
|
patchGlobalFetch?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Suppress the "serverUrl is not HTTPS" warning when intentionally
|
|
110
|
+
* pointing the agent at a non-HTTPS endpoint (a local relay, a
|
|
111
|
+
* staging proxy on a private network, …). HTTPS is otherwise
|
|
112
|
+
* enforced by warning at init time so a typo in production
|
|
113
|
+
* (`http://app.ezlogs.io`) doesn't silently ship events in
|
|
114
|
+
* cleartext. localhost / 127.0.0.1 / [::1] / *.local are exempt
|
|
115
|
+
* by default — those are dev environments. Default false.
|
|
116
|
+
*/
|
|
117
|
+
allowInsecureTransport?: boolean;
|
|
101
118
|
/**
|
|
102
119
|
* When true (default), the HTTP capturer extracts the current actor
|
|
103
120
|
* from the most-recently-constructed Supabase client by calling
|
package/dist/db/drizzle.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('crypto');
|
|
4
|
-
|
|
5
3
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
6
4
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
7
5
|
}) : x)(function(x) {
|
|
@@ -90,9 +88,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
90
88
|
]);
|
|
91
89
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
92
90
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
93
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
94
91
|
var Configuration = class {
|
|
95
|
-
serverUrl =
|
|
92
|
+
serverUrl = null;
|
|
96
93
|
projectToken = null;
|
|
97
94
|
captureHttp = true;
|
|
98
95
|
captureDb = true;
|
|
@@ -104,6 +101,7 @@ var Configuration = class {
|
|
|
104
101
|
logLevel = "warn";
|
|
105
102
|
patchGlobalFetch = true;
|
|
106
103
|
actorFromSupabase = true;
|
|
104
|
+
allowInsecureTransport = false;
|
|
107
105
|
excludedPaths = [];
|
|
108
106
|
excludedTables = [];
|
|
109
107
|
excludedJobClasses = [];
|
|
@@ -131,7 +129,7 @@ var Configuration = class {
|
|
|
131
129
|
*/
|
|
132
130
|
triggerTrackedTables = null;
|
|
133
131
|
apply(options) {
|
|
134
|
-
|
|
132
|
+
this.serverUrl = options.serverUrl;
|
|
135
133
|
this.projectToken = options.projectToken;
|
|
136
134
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
137
135
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -156,6 +154,9 @@ var Configuration = class {
|
|
|
156
154
|
if (options.patchGlobalFetch !== void 0) {
|
|
157
155
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
158
156
|
}
|
|
157
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
158
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
159
|
+
}
|
|
159
160
|
if (options.actorFromSupabase !== void 0) {
|
|
160
161
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
161
162
|
}
|
|
@@ -514,7 +515,17 @@ var DB_SENSITIVE_PATTERNS = Object.freeze([
|
|
|
514
515
|
"credit_card",
|
|
515
516
|
"ssn",
|
|
516
517
|
"social_security",
|
|
517
|
-
"encrypted"
|
|
518
|
+
"encrypted",
|
|
519
|
+
"private_key",
|
|
520
|
+
"public_key",
|
|
521
|
+
"signing_key",
|
|
522
|
+
"pem",
|
|
523
|
+
"cipher",
|
|
524
|
+
"nonce",
|
|
525
|
+
"salt",
|
|
526
|
+
"digest",
|
|
527
|
+
"signature",
|
|
528
|
+
"hmac"
|
|
518
529
|
]);
|
|
519
530
|
function emitDbEvent(input) {
|
|
520
531
|
try {
|
package/dist/db/drizzle.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import 'crypto';
|
|
2
|
-
|
|
3
1
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
2
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
3
|
}) : x)(function(x) {
|
|
@@ -88,9 +86,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
88
86
|
]);
|
|
89
87
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
90
88
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
91
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
92
89
|
var Configuration = class {
|
|
93
|
-
serverUrl =
|
|
90
|
+
serverUrl = null;
|
|
94
91
|
projectToken = null;
|
|
95
92
|
captureHttp = true;
|
|
96
93
|
captureDb = true;
|
|
@@ -102,6 +99,7 @@ var Configuration = class {
|
|
|
102
99
|
logLevel = "warn";
|
|
103
100
|
patchGlobalFetch = true;
|
|
104
101
|
actorFromSupabase = true;
|
|
102
|
+
allowInsecureTransport = false;
|
|
105
103
|
excludedPaths = [];
|
|
106
104
|
excludedTables = [];
|
|
107
105
|
excludedJobClasses = [];
|
|
@@ -129,7 +127,7 @@ var Configuration = class {
|
|
|
129
127
|
*/
|
|
130
128
|
triggerTrackedTables = null;
|
|
131
129
|
apply(options) {
|
|
132
|
-
|
|
130
|
+
this.serverUrl = options.serverUrl;
|
|
133
131
|
this.projectToken = options.projectToken;
|
|
134
132
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
135
133
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -154,6 +152,9 @@ var Configuration = class {
|
|
|
154
152
|
if (options.patchGlobalFetch !== void 0) {
|
|
155
153
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
156
154
|
}
|
|
155
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
156
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
157
|
+
}
|
|
157
158
|
if (options.actorFromSupabase !== void 0) {
|
|
158
159
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
159
160
|
}
|
|
@@ -512,7 +513,17 @@ var DB_SENSITIVE_PATTERNS = Object.freeze([
|
|
|
512
513
|
"credit_card",
|
|
513
514
|
"ssn",
|
|
514
515
|
"social_security",
|
|
515
|
-
"encrypted"
|
|
516
|
+
"encrypted",
|
|
517
|
+
"private_key",
|
|
518
|
+
"public_key",
|
|
519
|
+
"signing_key",
|
|
520
|
+
"pem",
|
|
521
|
+
"cipher",
|
|
522
|
+
"nonce",
|
|
523
|
+
"salt",
|
|
524
|
+
"digest",
|
|
525
|
+
"signature",
|
|
526
|
+
"hmac"
|
|
516
527
|
]);
|
|
517
528
|
function emitDbEvent(input) {
|
|
518
529
|
try {
|
package/dist/db/prisma.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('crypto');
|
|
4
|
-
|
|
5
3
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
6
4
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
7
5
|
}) : x)(function(x) {
|
|
@@ -90,9 +88,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
90
88
|
]);
|
|
91
89
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
92
90
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
93
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
94
91
|
var Configuration = class {
|
|
95
|
-
serverUrl =
|
|
92
|
+
serverUrl = null;
|
|
96
93
|
projectToken = null;
|
|
97
94
|
captureHttp = true;
|
|
98
95
|
captureDb = true;
|
|
@@ -104,6 +101,7 @@ var Configuration = class {
|
|
|
104
101
|
logLevel = "warn";
|
|
105
102
|
patchGlobalFetch = true;
|
|
106
103
|
actorFromSupabase = true;
|
|
104
|
+
allowInsecureTransport = false;
|
|
107
105
|
excludedPaths = [];
|
|
108
106
|
excludedTables = [];
|
|
109
107
|
excludedJobClasses = [];
|
|
@@ -131,7 +129,7 @@ var Configuration = class {
|
|
|
131
129
|
*/
|
|
132
130
|
triggerTrackedTables = null;
|
|
133
131
|
apply(options) {
|
|
134
|
-
|
|
132
|
+
this.serverUrl = options.serverUrl;
|
|
135
133
|
this.projectToken = options.projectToken;
|
|
136
134
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
137
135
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -156,6 +154,9 @@ var Configuration = class {
|
|
|
156
154
|
if (options.patchGlobalFetch !== void 0) {
|
|
157
155
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
158
156
|
}
|
|
157
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
158
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
159
|
+
}
|
|
159
160
|
if (options.actorFromSupabase !== void 0) {
|
|
160
161
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
161
162
|
}
|
|
@@ -514,7 +515,17 @@ var DB_SENSITIVE_PATTERNS = Object.freeze([
|
|
|
514
515
|
"credit_card",
|
|
515
516
|
"ssn",
|
|
516
517
|
"social_security",
|
|
517
|
-
"encrypted"
|
|
518
|
+
"encrypted",
|
|
519
|
+
"private_key",
|
|
520
|
+
"public_key",
|
|
521
|
+
"signing_key",
|
|
522
|
+
"pem",
|
|
523
|
+
"cipher",
|
|
524
|
+
"nonce",
|
|
525
|
+
"salt",
|
|
526
|
+
"digest",
|
|
527
|
+
"signature",
|
|
528
|
+
"hmac"
|
|
518
529
|
]);
|
|
519
530
|
function emitDbEvent(input) {
|
|
520
531
|
try {
|
package/dist/db/prisma.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import 'crypto';
|
|
2
|
-
|
|
3
1
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
2
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
3
|
}) : x)(function(x) {
|
|
@@ -88,9 +86,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
88
86
|
]);
|
|
89
87
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
90
88
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
91
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
92
89
|
var Configuration = class {
|
|
93
|
-
serverUrl =
|
|
90
|
+
serverUrl = null;
|
|
94
91
|
projectToken = null;
|
|
95
92
|
captureHttp = true;
|
|
96
93
|
captureDb = true;
|
|
@@ -102,6 +99,7 @@ var Configuration = class {
|
|
|
102
99
|
logLevel = "warn";
|
|
103
100
|
patchGlobalFetch = true;
|
|
104
101
|
actorFromSupabase = true;
|
|
102
|
+
allowInsecureTransport = false;
|
|
105
103
|
excludedPaths = [];
|
|
106
104
|
excludedTables = [];
|
|
107
105
|
excludedJobClasses = [];
|
|
@@ -129,7 +127,7 @@ var Configuration = class {
|
|
|
129
127
|
*/
|
|
130
128
|
triggerTrackedTables = null;
|
|
131
129
|
apply(options) {
|
|
132
|
-
|
|
130
|
+
this.serverUrl = options.serverUrl;
|
|
133
131
|
this.projectToken = options.projectToken;
|
|
134
132
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
135
133
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -154,6 +152,9 @@ var Configuration = class {
|
|
|
154
152
|
if (options.patchGlobalFetch !== void 0) {
|
|
155
153
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
156
154
|
}
|
|
155
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
156
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
157
|
+
}
|
|
157
158
|
if (options.actorFromSupabase !== void 0) {
|
|
158
159
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
159
160
|
}
|
|
@@ -512,7 +513,17 @@ var DB_SENSITIVE_PATTERNS = Object.freeze([
|
|
|
512
513
|
"credit_card",
|
|
513
514
|
"ssn",
|
|
514
515
|
"social_security",
|
|
515
|
-
"encrypted"
|
|
516
|
+
"encrypted",
|
|
517
|
+
"private_key",
|
|
518
|
+
"public_key",
|
|
519
|
+
"signing_key",
|
|
520
|
+
"pem",
|
|
521
|
+
"cipher",
|
|
522
|
+
"nonce",
|
|
523
|
+
"salt",
|
|
524
|
+
"digest",
|
|
525
|
+
"signature",
|
|
526
|
+
"hmac"
|
|
516
527
|
]);
|
|
517
528
|
function emitDbEvent(input) {
|
|
518
529
|
try {
|
package/dist/db/supabase.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('crypto');
|
|
4
|
-
|
|
5
3
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
6
4
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
7
5
|
}) : x)(function(x) {
|
|
@@ -90,9 +88,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
90
88
|
]);
|
|
91
89
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
92
90
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
93
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
94
91
|
var Configuration = class {
|
|
95
|
-
serverUrl =
|
|
92
|
+
serverUrl = null;
|
|
96
93
|
projectToken = null;
|
|
97
94
|
captureHttp = true;
|
|
98
95
|
captureDb = true;
|
|
@@ -104,6 +101,7 @@ var Configuration = class {
|
|
|
104
101
|
logLevel = "warn";
|
|
105
102
|
patchGlobalFetch = true;
|
|
106
103
|
actorFromSupabase = true;
|
|
104
|
+
allowInsecureTransport = false;
|
|
107
105
|
excludedPaths = [];
|
|
108
106
|
excludedTables = [];
|
|
109
107
|
excludedJobClasses = [];
|
|
@@ -131,7 +129,7 @@ var Configuration = class {
|
|
|
131
129
|
*/
|
|
132
130
|
triggerTrackedTables = null;
|
|
133
131
|
apply(options) {
|
|
134
|
-
|
|
132
|
+
this.serverUrl = options.serverUrl;
|
|
135
133
|
this.projectToken = options.projectToken;
|
|
136
134
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
137
135
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -156,6 +154,9 @@ var Configuration = class {
|
|
|
156
154
|
if (options.patchGlobalFetch !== void 0) {
|
|
157
155
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
158
156
|
}
|
|
157
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
158
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
159
|
+
}
|
|
159
160
|
if (options.actorFromSupabase !== void 0) {
|
|
160
161
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
161
162
|
}
|
|
@@ -514,7 +515,17 @@ var DB_SENSITIVE_PATTERNS = Object.freeze([
|
|
|
514
515
|
"credit_card",
|
|
515
516
|
"ssn",
|
|
516
517
|
"social_security",
|
|
517
|
-
"encrypted"
|
|
518
|
+
"encrypted",
|
|
519
|
+
"private_key",
|
|
520
|
+
"public_key",
|
|
521
|
+
"signing_key",
|
|
522
|
+
"pem",
|
|
523
|
+
"cipher",
|
|
524
|
+
"nonce",
|
|
525
|
+
"salt",
|
|
526
|
+
"digest",
|
|
527
|
+
"signature",
|
|
528
|
+
"hmac"
|
|
518
529
|
]);
|
|
519
530
|
function emitDbEvent(input) {
|
|
520
531
|
try {
|
package/dist/db/supabase.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import 'crypto';
|
|
2
|
-
|
|
3
1
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
4
2
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
5
3
|
}) : x)(function(x) {
|
|
@@ -88,9 +86,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
88
86
|
]);
|
|
89
87
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
90
88
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
91
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
92
89
|
var Configuration = class {
|
|
93
|
-
serverUrl =
|
|
90
|
+
serverUrl = null;
|
|
94
91
|
projectToken = null;
|
|
95
92
|
captureHttp = true;
|
|
96
93
|
captureDb = true;
|
|
@@ -102,6 +99,7 @@ var Configuration = class {
|
|
|
102
99
|
logLevel = "warn";
|
|
103
100
|
patchGlobalFetch = true;
|
|
104
101
|
actorFromSupabase = true;
|
|
102
|
+
allowInsecureTransport = false;
|
|
105
103
|
excludedPaths = [];
|
|
106
104
|
excludedTables = [];
|
|
107
105
|
excludedJobClasses = [];
|
|
@@ -129,7 +127,7 @@ var Configuration = class {
|
|
|
129
127
|
*/
|
|
130
128
|
triggerTrackedTables = null;
|
|
131
129
|
apply(options) {
|
|
132
|
-
|
|
130
|
+
this.serverUrl = options.serverUrl;
|
|
133
131
|
this.projectToken = options.projectToken;
|
|
134
132
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
135
133
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -154,6 +152,9 @@ var Configuration = class {
|
|
|
154
152
|
if (options.patchGlobalFetch !== void 0) {
|
|
155
153
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
156
154
|
}
|
|
155
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
156
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
157
|
+
}
|
|
157
158
|
if (options.actorFromSupabase !== void 0) {
|
|
158
159
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
159
160
|
}
|
|
@@ -512,7 +513,17 @@ var DB_SENSITIVE_PATTERNS = Object.freeze([
|
|
|
512
513
|
"credit_card",
|
|
513
514
|
"ssn",
|
|
514
515
|
"social_security",
|
|
515
|
-
"encrypted"
|
|
516
|
+
"encrypted",
|
|
517
|
+
"private_key",
|
|
518
|
+
"public_key",
|
|
519
|
+
"signing_key",
|
|
520
|
+
"pem",
|
|
521
|
+
"cipher",
|
|
522
|
+
"nonce",
|
|
523
|
+
"salt",
|
|
524
|
+
"digest",
|
|
525
|
+
"signature",
|
|
526
|
+
"hmac"
|
|
516
527
|
]);
|
|
517
528
|
function emitDbEvent(input) {
|
|
518
529
|
try {
|