ezlogs-nextjs 0.1.0 → 0.1.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/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 +271 -76
- package/dist/db/prisma.d.cts +38 -1
- package/dist/db/prisma.d.ts +38 -1
- package/dist/db/prisma.js +270 -77
- 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/dist/jobs/bullmq.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) {
|
|
@@ -280,9 +278,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
280
278
|
]);
|
|
281
279
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
282
280
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
283
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
284
281
|
var Configuration = class {
|
|
285
|
-
serverUrl =
|
|
282
|
+
serverUrl = null;
|
|
286
283
|
projectToken = null;
|
|
287
284
|
captureHttp = true;
|
|
288
285
|
captureDb = true;
|
|
@@ -294,6 +291,7 @@ var Configuration = class {
|
|
|
294
291
|
logLevel = "warn";
|
|
295
292
|
patchGlobalFetch = true;
|
|
296
293
|
actorFromSupabase = true;
|
|
294
|
+
allowInsecureTransport = false;
|
|
297
295
|
excludedPaths = [];
|
|
298
296
|
excludedTables = [];
|
|
299
297
|
excludedJobClasses = [];
|
|
@@ -321,7 +319,7 @@ var Configuration = class {
|
|
|
321
319
|
*/
|
|
322
320
|
triggerTrackedTables = null;
|
|
323
321
|
apply(options) {
|
|
324
|
-
|
|
322
|
+
this.serverUrl = options.serverUrl;
|
|
325
323
|
this.projectToken = options.projectToken;
|
|
326
324
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
327
325
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -346,6 +344,9 @@ var Configuration = class {
|
|
|
346
344
|
if (options.patchGlobalFetch !== void 0) {
|
|
347
345
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
348
346
|
}
|
|
347
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
348
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
349
|
+
}
|
|
349
350
|
if (options.actorFromSupabase !== void 0) {
|
|
350
351
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
351
352
|
}
|
package/dist/jobs/bullmq.d.cts
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
interface BullQueueLike {
|
|
2
|
-
add:
|
|
3
|
-
addBulk?:
|
|
4
|
-
name: string;
|
|
5
|
-
data: unknown;
|
|
6
|
-
opts?: unknown;
|
|
7
|
-
}>) => Promise<unknown>;
|
|
2
|
+
add: Function;
|
|
3
|
+
addBulk?: Function;
|
|
8
4
|
name?: string;
|
|
9
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* BullMQ's real Worker type is strictly typed (`on<U extends keyof
|
|
8
|
+
* WorkerListener<…>>`), so a generic `(event: string, listener: …) => …`
|
|
9
|
+
* structural type fails the `T extends BullWorkerLike` constraint
|
|
10
|
+
* with a contravariance error: TypeScript can't prove the typed
|
|
11
|
+
* worker's `on` is assignable to the looser shape, even though
|
|
12
|
+
* we only call it with valid event names.
|
|
13
|
+
*
|
|
14
|
+
* We accept `on` as `Function` instead — looser than `unknown` but
|
|
15
|
+
* still typed enough to read. The wrap's internal calls cast to the
|
|
16
|
+
* right shape on the way in.
|
|
17
|
+
*/
|
|
10
18
|
interface BullWorkerLike {
|
|
11
|
-
on:
|
|
12
|
-
off?:
|
|
19
|
+
on: Function;
|
|
20
|
+
off?: Function;
|
|
13
21
|
name?: string;
|
|
14
22
|
}
|
|
15
23
|
/**
|
package/dist/jobs/bullmq.d.ts
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
interface BullQueueLike {
|
|
2
|
-
add:
|
|
3
|
-
addBulk?:
|
|
4
|
-
name: string;
|
|
5
|
-
data: unknown;
|
|
6
|
-
opts?: unknown;
|
|
7
|
-
}>) => Promise<unknown>;
|
|
2
|
+
add: Function;
|
|
3
|
+
addBulk?: Function;
|
|
8
4
|
name?: string;
|
|
9
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* BullMQ's real Worker type is strictly typed (`on<U extends keyof
|
|
8
|
+
* WorkerListener<…>>`), so a generic `(event: string, listener: …) => …`
|
|
9
|
+
* structural type fails the `T extends BullWorkerLike` constraint
|
|
10
|
+
* with a contravariance error: TypeScript can't prove the typed
|
|
11
|
+
* worker's `on` is assignable to the looser shape, even though
|
|
12
|
+
* we only call it with valid event names.
|
|
13
|
+
*
|
|
14
|
+
* We accept `on` as `Function` instead — looser than `unknown` but
|
|
15
|
+
* still typed enough to read. The wrap's internal calls cast to the
|
|
16
|
+
* right shape on the way in.
|
|
17
|
+
*/
|
|
10
18
|
interface BullWorkerLike {
|
|
11
|
-
on:
|
|
12
|
-
off?:
|
|
19
|
+
on: Function;
|
|
20
|
+
off?: Function;
|
|
13
21
|
name?: string;
|
|
14
22
|
}
|
|
15
23
|
/**
|
package/dist/jobs/bullmq.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) {
|
|
@@ -278,9 +276,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
278
276
|
]);
|
|
279
277
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
280
278
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
281
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
282
279
|
var Configuration = class {
|
|
283
|
-
serverUrl =
|
|
280
|
+
serverUrl = null;
|
|
284
281
|
projectToken = null;
|
|
285
282
|
captureHttp = true;
|
|
286
283
|
captureDb = true;
|
|
@@ -292,6 +289,7 @@ var Configuration = class {
|
|
|
292
289
|
logLevel = "warn";
|
|
293
290
|
patchGlobalFetch = true;
|
|
294
291
|
actorFromSupabase = true;
|
|
292
|
+
allowInsecureTransport = false;
|
|
295
293
|
excludedPaths = [];
|
|
296
294
|
excludedTables = [];
|
|
297
295
|
excludedJobClasses = [];
|
|
@@ -319,7 +317,7 @@ var Configuration = class {
|
|
|
319
317
|
*/
|
|
320
318
|
triggerTrackedTables = null;
|
|
321
319
|
apply(options) {
|
|
322
|
-
|
|
320
|
+
this.serverUrl = options.serverUrl;
|
|
323
321
|
this.projectToken = options.projectToken;
|
|
324
322
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
325
323
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -344,6 +342,9 @@ var Configuration = class {
|
|
|
344
342
|
if (options.patchGlobalFetch !== void 0) {
|
|
345
343
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
346
344
|
}
|
|
345
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
346
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
347
|
+
}
|
|
347
348
|
if (options.actorFromSupabase !== void 0) {
|
|
348
349
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
349
350
|
}
|
package/dist/jobs/inngest.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var crypto = 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) {
|
|
@@ -280,9 +278,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
280
278
|
]);
|
|
281
279
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
282
280
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
283
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
284
281
|
var Configuration = class {
|
|
285
|
-
serverUrl =
|
|
282
|
+
serverUrl = null;
|
|
286
283
|
projectToken = null;
|
|
287
284
|
captureHttp = true;
|
|
288
285
|
captureDb = true;
|
|
@@ -294,6 +291,7 @@ var Configuration = class {
|
|
|
294
291
|
logLevel = "warn";
|
|
295
292
|
patchGlobalFetch = true;
|
|
296
293
|
actorFromSupabase = true;
|
|
294
|
+
allowInsecureTransport = false;
|
|
297
295
|
excludedPaths = [];
|
|
298
296
|
excludedTables = [];
|
|
299
297
|
excludedJobClasses = [];
|
|
@@ -321,7 +319,7 @@ var Configuration = class {
|
|
|
321
319
|
*/
|
|
322
320
|
triggerTrackedTables = null;
|
|
323
321
|
apply(options) {
|
|
324
|
-
|
|
322
|
+
this.serverUrl = options.serverUrl;
|
|
325
323
|
this.projectToken = options.projectToken;
|
|
326
324
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
327
325
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -346,6 +344,9 @@ var Configuration = class {
|
|
|
346
344
|
if (options.patchGlobalFetch !== void 0) {
|
|
347
345
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
348
346
|
}
|
|
347
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
348
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
349
|
+
}
|
|
349
350
|
if (options.actorFromSupabase !== void 0) {
|
|
350
351
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
351
352
|
}
|
|
@@ -490,9 +491,18 @@ var storage = createScopedStorage(
|
|
|
490
491
|
);
|
|
491
492
|
function generate() {
|
|
492
493
|
const ts = Date.now();
|
|
493
|
-
const hex =
|
|
494
|
+
const hex = randomHexBytes(4);
|
|
494
495
|
return `ezl_${ts}_${hex}`;
|
|
495
496
|
}
|
|
497
|
+
function randomHexBytes(byteCount) {
|
|
498
|
+
const buf = new Uint8Array(byteCount);
|
|
499
|
+
globalThis.crypto.getRandomValues(buf);
|
|
500
|
+
let out = "";
|
|
501
|
+
for (let i = 0; i < buf.length; i++) {
|
|
502
|
+
out += buf[i].toString(16).padStart(2, "0");
|
|
503
|
+
}
|
|
504
|
+
return out;
|
|
505
|
+
}
|
|
496
506
|
function current() {
|
|
497
507
|
return storage.read();
|
|
498
508
|
}
|
package/dist/jobs/inngest.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { randomBytes } from '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) {
|
|
@@ -278,9 +276,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
278
276
|
]);
|
|
279
277
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
280
278
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
281
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
282
279
|
var Configuration = class {
|
|
283
|
-
serverUrl =
|
|
280
|
+
serverUrl = null;
|
|
284
281
|
projectToken = null;
|
|
285
282
|
captureHttp = true;
|
|
286
283
|
captureDb = true;
|
|
@@ -292,6 +289,7 @@ var Configuration = class {
|
|
|
292
289
|
logLevel = "warn";
|
|
293
290
|
patchGlobalFetch = true;
|
|
294
291
|
actorFromSupabase = true;
|
|
292
|
+
allowInsecureTransport = false;
|
|
295
293
|
excludedPaths = [];
|
|
296
294
|
excludedTables = [];
|
|
297
295
|
excludedJobClasses = [];
|
|
@@ -319,7 +317,7 @@ var Configuration = class {
|
|
|
319
317
|
*/
|
|
320
318
|
triggerTrackedTables = null;
|
|
321
319
|
apply(options) {
|
|
322
|
-
|
|
320
|
+
this.serverUrl = options.serverUrl;
|
|
323
321
|
this.projectToken = options.projectToken;
|
|
324
322
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
325
323
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -344,6 +342,9 @@ var Configuration = class {
|
|
|
344
342
|
if (options.patchGlobalFetch !== void 0) {
|
|
345
343
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
346
344
|
}
|
|
345
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
346
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
347
|
+
}
|
|
347
348
|
if (options.actorFromSupabase !== void 0) {
|
|
348
349
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
349
350
|
}
|
|
@@ -488,9 +489,18 @@ var storage = createScopedStorage(
|
|
|
488
489
|
);
|
|
489
490
|
function generate() {
|
|
490
491
|
const ts = Date.now();
|
|
491
|
-
const hex =
|
|
492
|
+
const hex = randomHexBytes(4);
|
|
492
493
|
return `ezl_${ts}_${hex}`;
|
|
493
494
|
}
|
|
495
|
+
function randomHexBytes(byteCount) {
|
|
496
|
+
const buf = new Uint8Array(byteCount);
|
|
497
|
+
globalThis.crypto.getRandomValues(buf);
|
|
498
|
+
let out = "";
|
|
499
|
+
for (let i = 0; i < buf.length; i++) {
|
|
500
|
+
out += buf[i].toString(16).padStart(2, "0");
|
|
501
|
+
}
|
|
502
|
+
return out;
|
|
503
|
+
}
|
|
494
504
|
function current() {
|
|
495
505
|
return storage.read();
|
|
496
506
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var crypto = 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) {
|
|
@@ -280,9 +278,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
280
278
|
]);
|
|
281
279
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
282
280
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
283
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
284
281
|
var Configuration = class {
|
|
285
|
-
serverUrl =
|
|
282
|
+
serverUrl = null;
|
|
286
283
|
projectToken = null;
|
|
287
284
|
captureHttp = true;
|
|
288
285
|
captureDb = true;
|
|
@@ -294,6 +291,7 @@ var Configuration = class {
|
|
|
294
291
|
logLevel = "warn";
|
|
295
292
|
patchGlobalFetch = true;
|
|
296
293
|
actorFromSupabase = true;
|
|
294
|
+
allowInsecureTransport = false;
|
|
297
295
|
excludedPaths = [];
|
|
298
296
|
excludedTables = [];
|
|
299
297
|
excludedJobClasses = [];
|
|
@@ -321,7 +319,7 @@ var Configuration = class {
|
|
|
321
319
|
*/
|
|
322
320
|
triggerTrackedTables = null;
|
|
323
321
|
apply(options) {
|
|
324
|
-
|
|
322
|
+
this.serverUrl = options.serverUrl;
|
|
325
323
|
this.projectToken = options.projectToken;
|
|
326
324
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
327
325
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -346,6 +344,9 @@ var Configuration = class {
|
|
|
346
344
|
if (options.patchGlobalFetch !== void 0) {
|
|
347
345
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
348
346
|
}
|
|
347
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
348
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
349
|
+
}
|
|
349
350
|
if (options.actorFromSupabase !== void 0) {
|
|
350
351
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
351
352
|
}
|
|
@@ -490,9 +491,18 @@ var storage = createScopedStorage(
|
|
|
490
491
|
);
|
|
491
492
|
function generate() {
|
|
492
493
|
const ts = Date.now();
|
|
493
|
-
const hex =
|
|
494
|
+
const hex = randomHexBytes(4);
|
|
494
495
|
return `ezl_${ts}_${hex}`;
|
|
495
496
|
}
|
|
497
|
+
function randomHexBytes(byteCount) {
|
|
498
|
+
const buf = new Uint8Array(byteCount);
|
|
499
|
+
globalThis.crypto.getRandomValues(buf);
|
|
500
|
+
let out = "";
|
|
501
|
+
for (let i = 0; i < buf.length; i++) {
|
|
502
|
+
out += buf[i].toString(16).padStart(2, "0");
|
|
503
|
+
}
|
|
504
|
+
return out;
|
|
505
|
+
}
|
|
496
506
|
function current() {
|
|
497
507
|
return storage.read();
|
|
498
508
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { randomBytes } from '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) {
|
|
@@ -278,9 +276,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
278
276
|
]);
|
|
279
277
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
280
278
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
281
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
282
279
|
var Configuration = class {
|
|
283
|
-
serverUrl =
|
|
280
|
+
serverUrl = null;
|
|
284
281
|
projectToken = null;
|
|
285
282
|
captureHttp = true;
|
|
286
283
|
captureDb = true;
|
|
@@ -292,6 +289,7 @@ var Configuration = class {
|
|
|
292
289
|
logLevel = "warn";
|
|
293
290
|
patchGlobalFetch = true;
|
|
294
291
|
actorFromSupabase = true;
|
|
292
|
+
allowInsecureTransport = false;
|
|
295
293
|
excludedPaths = [];
|
|
296
294
|
excludedTables = [];
|
|
297
295
|
excludedJobClasses = [];
|
|
@@ -319,7 +317,7 @@ var Configuration = class {
|
|
|
319
317
|
*/
|
|
320
318
|
triggerTrackedTables = null;
|
|
321
319
|
apply(options) {
|
|
322
|
-
|
|
320
|
+
this.serverUrl = options.serverUrl;
|
|
323
321
|
this.projectToken = options.projectToken;
|
|
324
322
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
325
323
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -344,6 +342,9 @@ var Configuration = class {
|
|
|
344
342
|
if (options.patchGlobalFetch !== void 0) {
|
|
345
343
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
346
344
|
}
|
|
345
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
346
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
347
|
+
}
|
|
347
348
|
if (options.actorFromSupabase !== void 0) {
|
|
348
349
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
349
350
|
}
|
|
@@ -488,9 +489,18 @@ var storage = createScopedStorage(
|
|
|
488
489
|
);
|
|
489
490
|
function generate() {
|
|
490
491
|
const ts = Date.now();
|
|
491
|
-
const hex =
|
|
492
|
+
const hex = randomHexBytes(4);
|
|
492
493
|
return `ezl_${ts}_${hex}`;
|
|
493
494
|
}
|
|
495
|
+
function randomHexBytes(byteCount) {
|
|
496
|
+
const buf = new Uint8Array(byteCount);
|
|
497
|
+
globalThis.crypto.getRandomValues(buf);
|
|
498
|
+
let out = "";
|
|
499
|
+
for (let i = 0; i < buf.length; i++) {
|
|
500
|
+
out += buf[i].toString(16).padStart(2, "0");
|
|
501
|
+
}
|
|
502
|
+
return out;
|
|
503
|
+
}
|
|
494
504
|
function current() {
|
|
495
505
|
return storage.read();
|
|
496
506
|
}
|
package/dist/jobs/trigger.cjs
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var crypto = 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) {
|
|
@@ -280,9 +278,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
280
278
|
]);
|
|
281
279
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
282
280
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
283
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
284
281
|
var Configuration = class {
|
|
285
|
-
serverUrl =
|
|
282
|
+
serverUrl = null;
|
|
286
283
|
projectToken = null;
|
|
287
284
|
captureHttp = true;
|
|
288
285
|
captureDb = true;
|
|
@@ -294,6 +291,7 @@ var Configuration = class {
|
|
|
294
291
|
logLevel = "warn";
|
|
295
292
|
patchGlobalFetch = true;
|
|
296
293
|
actorFromSupabase = true;
|
|
294
|
+
allowInsecureTransport = false;
|
|
297
295
|
excludedPaths = [];
|
|
298
296
|
excludedTables = [];
|
|
299
297
|
excludedJobClasses = [];
|
|
@@ -321,7 +319,7 @@ var Configuration = class {
|
|
|
321
319
|
*/
|
|
322
320
|
triggerTrackedTables = null;
|
|
323
321
|
apply(options) {
|
|
324
|
-
|
|
322
|
+
this.serverUrl = options.serverUrl;
|
|
325
323
|
this.projectToken = options.projectToken;
|
|
326
324
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
327
325
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -346,6 +344,9 @@ var Configuration = class {
|
|
|
346
344
|
if (options.patchGlobalFetch !== void 0) {
|
|
347
345
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
348
346
|
}
|
|
347
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
348
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
349
|
+
}
|
|
349
350
|
if (options.actorFromSupabase !== void 0) {
|
|
350
351
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
351
352
|
}
|
|
@@ -490,9 +491,18 @@ var storage = createScopedStorage(
|
|
|
490
491
|
);
|
|
491
492
|
function generate() {
|
|
492
493
|
const ts = Date.now();
|
|
493
|
-
const hex =
|
|
494
|
+
const hex = randomHexBytes(4);
|
|
494
495
|
return `ezl_${ts}_${hex}`;
|
|
495
496
|
}
|
|
497
|
+
function randomHexBytes(byteCount) {
|
|
498
|
+
const buf = new Uint8Array(byteCount);
|
|
499
|
+
globalThis.crypto.getRandomValues(buf);
|
|
500
|
+
let out = "";
|
|
501
|
+
for (let i = 0; i < buf.length; i++) {
|
|
502
|
+
out += buf[i].toString(16).padStart(2, "0");
|
|
503
|
+
}
|
|
504
|
+
return out;
|
|
505
|
+
}
|
|
496
506
|
function current() {
|
|
497
507
|
return storage.read();
|
|
498
508
|
}
|
package/dist/jobs/trigger.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { randomBytes } from '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) {
|
|
@@ -278,9 +276,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
278
276
|
]);
|
|
279
277
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
280
278
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
281
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
282
279
|
var Configuration = class {
|
|
283
|
-
serverUrl =
|
|
280
|
+
serverUrl = null;
|
|
284
281
|
projectToken = null;
|
|
285
282
|
captureHttp = true;
|
|
286
283
|
captureDb = true;
|
|
@@ -292,6 +289,7 @@ var Configuration = class {
|
|
|
292
289
|
logLevel = "warn";
|
|
293
290
|
patchGlobalFetch = true;
|
|
294
291
|
actorFromSupabase = true;
|
|
292
|
+
allowInsecureTransport = false;
|
|
295
293
|
excludedPaths = [];
|
|
296
294
|
excludedTables = [];
|
|
297
295
|
excludedJobClasses = [];
|
|
@@ -319,7 +317,7 @@ var Configuration = class {
|
|
|
319
317
|
*/
|
|
320
318
|
triggerTrackedTables = null;
|
|
321
319
|
apply(options) {
|
|
322
|
-
|
|
320
|
+
this.serverUrl = options.serverUrl;
|
|
323
321
|
this.projectToken = options.projectToken;
|
|
324
322
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
325
323
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -344,6 +342,9 @@ var Configuration = class {
|
|
|
344
342
|
if (options.patchGlobalFetch !== void 0) {
|
|
345
343
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
346
344
|
}
|
|
345
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
346
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
347
|
+
}
|
|
347
348
|
if (options.actorFromSupabase !== void 0) {
|
|
348
349
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
349
350
|
}
|
|
@@ -488,9 +489,18 @@ var storage = createScopedStorage(
|
|
|
488
489
|
);
|
|
489
490
|
function generate() {
|
|
490
491
|
const ts = Date.now();
|
|
491
|
-
const hex =
|
|
492
|
+
const hex = randomHexBytes(4);
|
|
492
493
|
return `ezl_${ts}_${hex}`;
|
|
493
494
|
}
|
|
495
|
+
function randomHexBytes(byteCount) {
|
|
496
|
+
const buf = new Uint8Array(byteCount);
|
|
497
|
+
globalThis.crypto.getRandomValues(buf);
|
|
498
|
+
let out = "";
|
|
499
|
+
for (let i = 0; i < buf.length; i++) {
|
|
500
|
+
out += buf[i].toString(16).padStart(2, "0");
|
|
501
|
+
}
|
|
502
|
+
return out;
|
|
503
|
+
}
|
|
494
504
|
function current() {
|
|
495
505
|
return storage.read();
|
|
496
506
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var crypto = 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) {
|
|
@@ -280,9 +278,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
280
278
|
]);
|
|
281
279
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
282
280
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
283
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
284
281
|
var Configuration = class {
|
|
285
|
-
serverUrl =
|
|
282
|
+
serverUrl = null;
|
|
286
283
|
projectToken = null;
|
|
287
284
|
captureHttp = true;
|
|
288
285
|
captureDb = true;
|
|
@@ -294,6 +291,7 @@ var Configuration = class {
|
|
|
294
291
|
logLevel = "warn";
|
|
295
292
|
patchGlobalFetch = true;
|
|
296
293
|
actorFromSupabase = true;
|
|
294
|
+
allowInsecureTransport = false;
|
|
297
295
|
excludedPaths = [];
|
|
298
296
|
excludedTables = [];
|
|
299
297
|
excludedJobClasses = [];
|
|
@@ -321,7 +319,7 @@ var Configuration = class {
|
|
|
321
319
|
*/
|
|
322
320
|
triggerTrackedTables = null;
|
|
323
321
|
apply(options) {
|
|
324
|
-
|
|
322
|
+
this.serverUrl = options.serverUrl;
|
|
325
323
|
this.projectToken = options.projectToken;
|
|
326
324
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
327
325
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -346,6 +344,9 @@ var Configuration = class {
|
|
|
346
344
|
if (options.patchGlobalFetch !== void 0) {
|
|
347
345
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
348
346
|
}
|
|
347
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
348
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
349
|
+
}
|
|
349
350
|
if (options.actorFromSupabase !== void 0) {
|
|
350
351
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
351
352
|
}
|
|
@@ -490,9 +491,18 @@ var storage = createScopedStorage(
|
|
|
490
491
|
);
|
|
491
492
|
function generate() {
|
|
492
493
|
const ts = Date.now();
|
|
493
|
-
const hex =
|
|
494
|
+
const hex = randomHexBytes(4);
|
|
494
495
|
return `ezl_${ts}_${hex}`;
|
|
495
496
|
}
|
|
497
|
+
function randomHexBytes(byteCount) {
|
|
498
|
+
const buf = new Uint8Array(byteCount);
|
|
499
|
+
globalThis.crypto.getRandomValues(buf);
|
|
500
|
+
let out = "";
|
|
501
|
+
for (let i = 0; i < buf.length; i++) {
|
|
502
|
+
out += buf[i].toString(16).padStart(2, "0");
|
|
503
|
+
}
|
|
504
|
+
return out;
|
|
505
|
+
}
|
|
496
506
|
function current() {
|
|
497
507
|
return storage.read();
|
|
498
508
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { randomBytes } from '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) {
|
|
@@ -278,9 +276,8 @@ var DEFAULT_EXCLUDED_TABLES = Object.freeze([
|
|
|
278
276
|
]);
|
|
279
277
|
var DEFAULT_EXCLUDED_JOB_CLASSES = Object.freeze([]);
|
|
280
278
|
var DEFAULT_EXCLUDED_GRAPHQL_OPERATIONS = Object.freeze(["IntrospectionQuery", "__*"]);
|
|
281
|
-
var DEFAULT_SERVER_URL = "https://app.ezlogs.io";
|
|
282
279
|
var Configuration = class {
|
|
283
|
-
serverUrl =
|
|
280
|
+
serverUrl = null;
|
|
284
281
|
projectToken = null;
|
|
285
282
|
captureHttp = true;
|
|
286
283
|
captureDb = true;
|
|
@@ -292,6 +289,7 @@ var Configuration = class {
|
|
|
292
289
|
logLevel = "warn";
|
|
293
290
|
patchGlobalFetch = true;
|
|
294
291
|
actorFromSupabase = true;
|
|
292
|
+
allowInsecureTransport = false;
|
|
295
293
|
excludedPaths = [];
|
|
296
294
|
excludedTables = [];
|
|
297
295
|
excludedJobClasses = [];
|
|
@@ -319,7 +317,7 @@ var Configuration = class {
|
|
|
319
317
|
*/
|
|
320
318
|
triggerTrackedTables = null;
|
|
321
319
|
apply(options) {
|
|
322
|
-
|
|
320
|
+
this.serverUrl = options.serverUrl;
|
|
323
321
|
this.projectToken = options.projectToken;
|
|
324
322
|
if (options.captureHttp !== void 0) this.captureHttp = options.captureHttp;
|
|
325
323
|
if (options.captureDb !== void 0) this.captureDb = options.captureDb;
|
|
@@ -344,6 +342,9 @@ var Configuration = class {
|
|
|
344
342
|
if (options.patchGlobalFetch !== void 0) {
|
|
345
343
|
this.patchGlobalFetch = options.patchGlobalFetch;
|
|
346
344
|
}
|
|
345
|
+
if (options.allowInsecureTransport !== void 0) {
|
|
346
|
+
this.allowInsecureTransport = options.allowInsecureTransport;
|
|
347
|
+
}
|
|
347
348
|
if (options.actorFromSupabase !== void 0) {
|
|
348
349
|
this.actorFromSupabase = options.actorFromSupabase;
|
|
349
350
|
}
|
|
@@ -488,9 +489,18 @@ var storage = createScopedStorage(
|
|
|
488
489
|
);
|
|
489
490
|
function generate() {
|
|
490
491
|
const ts = Date.now();
|
|
491
|
-
const hex =
|
|
492
|
+
const hex = randomHexBytes(4);
|
|
492
493
|
return `ezl_${ts}_${hex}`;
|
|
493
494
|
}
|
|
495
|
+
function randomHexBytes(byteCount) {
|
|
496
|
+
const buf = new Uint8Array(byteCount);
|
|
497
|
+
globalThis.crypto.getRandomValues(buf);
|
|
498
|
+
let out = "";
|
|
499
|
+
for (let i = 0; i < buf.length; i++) {
|
|
500
|
+
out += buf[i].toString(16).padStart(2, "0");
|
|
501
|
+
}
|
|
502
|
+
return out;
|
|
503
|
+
}
|
|
494
504
|
function current() {
|
|
495
505
|
return storage.read();
|
|
496
506
|
}
|