@mcp-fe/event-tracker 0.0.16 → 0.0.17

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 (4) hide show
  1. package/LICENSE +1 -1
  2. package/index.d.ts +1 -1
  3. package/index.js +224 -138
  4. package/package.json +2 -2
package/LICENSE CHANGED
@@ -188,7 +188,7 @@
188
188
  same page as the copyright notice for easier identification within
189
189
  third-party archives.
190
190
 
191
- Copyright 2026 [name of copyright owner]
191
+ Copyright 2026 Michal Kopecky
192
192
 
193
193
  Licensed under the Apache License, Version 2.0 (the "License");
194
194
  you may not use this file except in compliance with the License.
package/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Copyright 2026 MCP-FE Contributors
2
+ * Copyright 2026 Michal Kopecky
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
5
5
  * you may not use this file except in compliance with the License.
package/index.js CHANGED
@@ -1,4 +1,21 @@
1
- class g {
1
+ const m = typeof process < "u" && process.env?.NODE_ENV === "production", f = typeof process < "u" && process.env?.MCP_DEBUG, p = f === "true" || !m && f !== "false", n = {
2
+ log: (...t) => {
3
+ p && console.log(...t);
4
+ },
5
+ debug: (...t) => {
6
+ p && console.debug(...t);
7
+ },
8
+ info: (...t) => {
9
+ console.info(...t);
10
+ },
11
+ error: (...t) => {
12
+ console.error(...t);
13
+ },
14
+ warn: (...t) => {
15
+ p && console.warn(...t);
16
+ }
17
+ };
18
+ class w {
2
19
  // Configurable worker script URLs (defaults kept for backward compatibility)
3
20
  sharedWorkerUrl = "/mcp-shared-worker.js";
4
21
  serviceWorkerUrl = "/mcp-service-worker.js";
@@ -16,25 +33,34 @@ class g {
16
33
  // Initialize and choose worker implementation (prefer SharedWorker)
17
34
  // Accept either a ServiceWorkerRegistration OR WorkerInitOptions to configure URLs
18
35
  async init(e) {
36
+ n.log("[WorkerClient] init() called", {
37
+ hasOptions: !!e,
38
+ currentWorkerType: this.workerType,
39
+ initInProgress: !!this.initPromise,
40
+ timestamp: Date.now()
41
+ });
19
42
  let r;
20
- const i = e;
21
- if (i && typeof i.scope == "string")
22
- r = e;
43
+ const o = e;
44
+ if (o && typeof o.scope == "string")
45
+ r = e, n.log("[WorkerClient] Using explicit ServiceWorker registration");
23
46
  else if (e) {
24
- const o = e;
25
- o.sharedWorkerUrl && (this.sharedWorkerUrl = o.sharedWorkerUrl), o.serviceWorkerUrl && (this.serviceWorkerUrl = o.serviceWorkerUrl), o.backendWsUrl && (this.backendWsUrl = o.backendWsUrl);
47
+ const i = e;
48
+ n.log("[WorkerClient] Using WorkerClientInitOptions:", i), i.sharedWorkerUrl && (this.sharedWorkerUrl = i.sharedWorkerUrl), i.serviceWorkerUrl && (this.serviceWorkerUrl = i.serviceWorkerUrl), i.backendWsUrl && (this.backendWsUrl = i.backendWsUrl);
26
49
  }
27
50
  return this.initPromise ? this.initPromise.then(async () => {
28
51
  r && this.workerType !== "service" && await this.init(r);
29
52
  }) : (this.initPromise = (async () => {
30
53
  try {
31
54
  if (r) {
32
- this.serviceWorkerRegistration = r, this.workerType = "service", console.log(
55
+ this.serviceWorkerRegistration = r, this.workerType = "service", n.info(
33
56
  "[WorkerClient] Using ServiceWorker (explicit registration)"
34
57
  );
35
58
  try {
36
- const n = { type: "INIT", backendUrl: this.backendWsUrl };
37
- this.pendingAuthToken && (n.token = this.pendingAuthToken), this.serviceWorkerRegistration.active ? this.serviceWorkerRegistration.active.postMessage(n) : "serviceWorker" in navigator && navigator.serviceWorker.controller && navigator.serviceWorker.controller.postMessage(n);
59
+ const s = {
60
+ type: "INIT",
61
+ backendUrl: this.backendWsUrl
62
+ };
63
+ this.pendingAuthToken && (s.token = this.pendingAuthToken), this.serviceWorkerRegistration.active ? this.serviceWorkerRegistration.active.postMessage(s) : "serviceWorker" in navigator && navigator.serviceWorker.controller && navigator.serviceWorker.controller.postMessage(s);
38
64
  } catch {
39
65
  }
40
66
  return;
@@ -52,20 +78,20 @@ class g {
52
78
  try {
53
79
  this.sharedWorker = new SharedWorker(this.sharedWorkerUrl, {
54
80
  type: "module"
55
- }), this.sharedWorkerPort = this.sharedWorker.port, this.sharedWorkerPort.start(), await new Promise((r, i) => {
56
- let o = !1;
57
- const n = setTimeout(() => {
58
- if (!o) {
59
- const a = this.sharedWorkerPort;
60
- a && (a.onmessage = null), i(new Error("SharedWorker initialization timeout"));
81
+ }), this.sharedWorkerPort = this.sharedWorker.port, this.sharedWorkerPort.start(), await new Promise((r, o) => {
82
+ let i = !1;
83
+ const s = setTimeout(() => {
84
+ if (!i) {
85
+ const k = this.sharedWorkerPort;
86
+ k && (k.onmessage = null), o(new Error("SharedWorker initialization timeout"));
61
87
  }
62
- }, 2e3), c = this.sharedWorkerPort;
63
- if (!c)
64
- return clearTimeout(n), i(new Error("SharedWorker port not available"));
65
- c.onmessage = (a) => {
88
+ }, 2e3), l = this.sharedWorkerPort;
89
+ if (!l)
90
+ return clearTimeout(s), o(new Error("SharedWorker port not available"));
91
+ l.onmessage = (k) => {
66
92
  try {
67
- const s = a.data;
68
- s && s.type === "CONNECTION_STATUS" && (clearTimeout(n), o = !0, this.workerType = "shared", c.onmessage = null, r());
93
+ const h = k.data;
94
+ h && h.type === "CONNECTION_STATUS" && (clearTimeout(s), i = !0, this.workerType = "shared", l.onmessage = null, r());
69
95
  } catch {
70
96
  }
71
97
  };
@@ -73,19 +99,25 @@ class g {
73
99
  const e = this.sharedWorkerPort;
74
100
  if (e) {
75
101
  try {
76
- const r = { type: "INIT", backendUrl: this.backendWsUrl };
102
+ const r = {
103
+ type: "INIT",
104
+ backendUrl: this.backendWsUrl
105
+ };
77
106
  this.pendingAuthToken && (r.token = this.pendingAuthToken), e.postMessage(r), this.pendingAuthToken = null;
78
107
  } catch (r) {
79
- console.warn("[WorkerClient] Failed to send INIT to SharedWorker port:", r);
108
+ n.warn(
109
+ "[WorkerClient] Failed to send INIT to SharedWorker port:",
110
+ r
111
+ );
80
112
  }
81
113
  e.onmessage = (r) => {
82
114
  try {
83
- const i = r.data;
84
- if (i && i.type === "CONNECTION_STATUS") {
85
- const o = !!i.connected;
86
- this.connectionStatusCallbacks.forEach((n) => {
115
+ const o = r.data;
116
+ if (o && o.type === "CONNECTION_STATUS") {
117
+ const i = !!o.connected;
118
+ this.connectionStatusCallbacks.forEach((s) => {
87
119
  try {
88
- n(o);
120
+ s(i);
89
121
  } catch {
90
122
  }
91
123
  });
@@ -94,9 +126,9 @@ class g {
94
126
  }
95
127
  };
96
128
  }
97
- return console.log("[WorkerClient] Using SharedWorker"), !0;
129
+ return n.info("[WorkerClient] Using SharedWorker"), !0;
98
130
  } catch (e) {
99
- return console.warn(
131
+ return n.warn(
100
132
  "[WorkerClient] SharedWorker not available, falling back to ServiceWorker:",
101
133
  e
102
134
  ), !1;
@@ -107,68 +139,122 @@ class g {
107
139
  try {
108
140
  const e = await navigator.serviceWorker.getRegistration();
109
141
  if (e) {
110
- this.serviceWorkerRegistration = e, this.workerType = "service", console.log(
142
+ this.serviceWorkerRegistration = e, this.workerType = "service", n.info(
111
143
  "[WorkerClient] Using existing ServiceWorker registration"
112
144
  );
113
145
  return;
114
146
  }
115
147
  this.serviceWorkerRegistration = await navigator.serviceWorker.register(
116
148
  this.serviceWorkerUrl
117
- ), this.workerType = "service", console.log("[WorkerClient] Using MCP ServiceWorker (fallback)");
149
+ ), this.workerType = "service", n.info("[WorkerClient] Using MCP ServiceWorker (fallback)");
118
150
  try {
119
- const r = { type: "INIT", backendUrl: this.backendWsUrl };
151
+ const r = {
152
+ type: "INIT",
153
+ backendUrl: this.backendWsUrl
154
+ };
120
155
  this.pendingAuthToken && (r.token = this.pendingAuthToken), this.serviceWorkerRegistration.active ? this.serviceWorkerRegistration.active.postMessage(r) : "serviceWorker" in navigator && navigator.serviceWorker.controller && navigator.serviceWorker.controller.postMessage(r), this.pendingAuthToken = null;
121
156
  } catch {
122
157
  }
123
158
  } catch (e) {
124
- throw console.error(
125
- "[WorkerClient] Failed to register ServiceWorker:",
126
- e
127
- ), e;
159
+ throw n.error("[WorkerClient] Failed to register ServiceWorker:", e), e;
128
160
  }
129
161
  else
130
162
  throw new Error("Neither SharedWorker nor ServiceWorker is supported");
131
163
  }
132
164
  // Low-level request that expects a reply via MessageChannel
133
- async request(e, r, i = 5e3) {
134
- if (this.workerType === "shared" && this.sharedWorkerPort)
135
- return new Promise((o, n) => {
136
- const c = new MessageChannel(), a = setTimeout(() => {
137
- c.port1.onmessage = null, n(new Error("Request timeout"));
138
- }, i);
139
- c.port1.onmessage = (s) => {
140
- clearTimeout(a), s.data && s.data.success ? o(s.data) : s.data && s.data.success === !1 ? n(new Error(s.data.error || "Worker error")) : o(s.data);
165
+ async request(e, r, o = 5e3) {
166
+ if (n.log("[WorkerClient] Request started:", {
167
+ type: e,
168
+ payload: r,
169
+ timeoutMs: o,
170
+ workerType: this.workerType,
171
+ hasSharedWorkerPort: !!this.sharedWorkerPort,
172
+ hasServiceWorkerReg: !!this.serviceWorkerRegistration
173
+ }), this.workerType === "shared" && this.sharedWorkerPort)
174
+ return new Promise((i, s) => {
175
+ const l = new MessageChannel(), k = Math.random().toString(36).substring(7), h = Date.now(), d = setTimeout(() => {
176
+ const a = Date.now() - h;
177
+ n.error("[WorkerClient] Request timeout:", {
178
+ type: e,
179
+ requestId: k,
180
+ elapsed: a,
181
+ timeoutMs: o
182
+ }), l.port1.onmessage = null, s(new Error("Request timeout"));
183
+ }, o);
184
+ l.port1.onmessage = (a) => {
185
+ try {
186
+ const c = Date.now() - h;
187
+ n.log("[WorkerClient] Request response received:", {
188
+ type: e,
189
+ requestId: k,
190
+ elapsed: c,
191
+ success: a.data?.success
192
+ }), clearTimeout(d), a.data && a.data.success ? i(a.data) : a.data && a.data.success === !1 ? s(new Error(a.data.error || "Worker error")) : i(a.data);
193
+ } catch (c) {
194
+ clearTimeout(d), l.port1.onmessage = null, s(
195
+ c instanceof Error ? c : new Error(String(c))
196
+ );
197
+ }
141
198
  };
142
199
  try {
143
- const s = this.sharedWorkerPort;
144
- if (!s)
145
- return clearTimeout(a), n(new Error("SharedWorker port not available"));
146
- s.postMessage({ type: e, ...r || {} }, [c.port2]);
147
- } catch (s) {
148
- clearTimeout(a), n(s instanceof Error ? s : new Error(String(s)));
200
+ const a = this.sharedWorkerPort;
201
+ if (!a)
202
+ return clearTimeout(d), n.error("[WorkerClient] SharedWorker port not available"), s(new Error("SharedWorker port not available"));
203
+ n.log("[WorkerClient] Posting message to SharedWorker:", {
204
+ type: e,
205
+ requestId: k
206
+ }), a.postMessage({ type: e, ...r || {} }, [l.port2]);
207
+ } catch (a) {
208
+ clearTimeout(d), n.error("[WorkerClient] Failed to post message:", a), s(a instanceof Error ? a : new Error(String(a)));
149
209
  }
150
210
  });
151
211
  if (this.workerType === "service" && this.serviceWorkerRegistration) {
152
- const o = this.serviceWorkerRegistration;
153
- if (!o) throw new Error("Service worker registration missing");
154
- if (!o.active && (await navigator.serviceWorker.ready, !o.active))
212
+ const i = this.serviceWorkerRegistration;
213
+ if (!i) throw new Error("Service worker registration missing");
214
+ if (!i.active && (n.log("[WorkerClient] ServiceWorker not active, waiting..."), await navigator.serviceWorker.ready, !i.active))
155
215
  throw new Error("Service worker not active");
156
- return new Promise((n, c) => {
157
- const a = new MessageChannel(), s = setTimeout(() => {
158
- a.port1.onmessage = null, c(new Error("Request timeout"));
159
- }, i);
160
- a.port1.onmessage = (l) => {
161
- clearTimeout(s), l.data && l.data.success ? n(l.data) : l.data && l.data.success === !1 ? c(new Error(l.data.error || "Worker error")) : n(l.data);
216
+ return new Promise((s, l) => {
217
+ const k = new MessageChannel(), h = Math.random().toString(36).substring(7), d = Date.now(), a = setTimeout(() => {
218
+ const c = Date.now() - d;
219
+ n.error("[WorkerClient] ServiceWorker request timeout:", {
220
+ type: e,
221
+ requestId: h,
222
+ elapsed: c,
223
+ timeoutMs: o
224
+ }), k.port1.onmessage = null, l(new Error("Request timeout"));
225
+ }, o);
226
+ k.port1.onmessage = (c) => {
227
+ try {
228
+ const g = Date.now() - d;
229
+ n.log("[WorkerClient] ServiceWorker response received:", {
230
+ type: e,
231
+ requestId: h,
232
+ elapsed: g,
233
+ success: c.data?.success
234
+ }), clearTimeout(a), c.data && c.data.success ? s(c.data) : c.data && c.data.success === !1 ? l(new Error(c.data.error || "Worker error")) : s(c.data);
235
+ } catch (g) {
236
+ clearTimeout(a), k.port1.onmessage = null, l(
237
+ g instanceof Error ? g : new Error(String(g))
238
+ );
239
+ }
162
240
  };
163
241
  try {
164
- const l = o.active;
165
- if (!l)
166
- return clearTimeout(s), c(
242
+ const c = i.active;
243
+ if (!c)
244
+ return clearTimeout(a), n.error(
245
+ "[WorkerClient] ServiceWorker active instance not available"
246
+ ), l(
167
247
  new Error("Service worker active instance not available")
168
248
  );
169
- l.postMessage({ type: e, ...r || {} }, [a.port2]);
170
- } catch (l) {
171
- clearTimeout(s), c(l instanceof Error ? l : new Error(String(l)));
249
+ n.log("[WorkerClient] Posting message to ServiceWorker:", {
250
+ type: e,
251
+ requestId: h
252
+ }), c.postMessage({ type: e, ...r || {} }, [k.port2]);
253
+ } catch (c) {
254
+ clearTimeout(a), n.error(
255
+ "[WorkerClient] Failed to post message to ServiceWorker:",
256
+ c
257
+ ), l(c instanceof Error ? c : new Error(String(c)));
172
258
  }
173
259
  });
174
260
  }
@@ -179,8 +265,8 @@ class g {
179
265
  if (this.workerType === "shared" && this.sharedWorkerPort) {
180
266
  try {
181
267
  this.sharedWorkerPort.postMessage({ type: e, ...r || {} });
182
- } catch (i) {
183
- console.error("[WorkerClient] Failed to post to SharedWorker:", i);
268
+ } catch (o) {
269
+ n.error("[WorkerClient] Failed to post to SharedWorker:", o);
184
270
  }
185
271
  return;
186
272
  }
@@ -190,10 +276,10 @@ class g {
190
276
  type: e,
191
277
  ...r || {}
192
278
  });
193
- } catch (i) {
194
- console.error(
279
+ } catch (o) {
280
+ n.error(
195
281
  "[WorkerClient] Failed to post to ServiceWorker (active):",
196
- i
282
+ o
197
283
  );
198
284
  }
199
285
  return;
@@ -204,17 +290,17 @@ class g {
204
290
  type: e,
205
291
  ...r || {}
206
292
  });
207
- } catch (i) {
208
- console.error(
293
+ } catch (o) {
294
+ n.error(
209
295
  "[WorkerClient] Failed to post to ServiceWorker.controller:",
210
- i
296
+ o
211
297
  );
212
298
  }
213
299
  return;
214
300
  }
215
301
  if (e === "SET_AUTH_TOKEN" && r) {
216
- const i = r.token;
217
- typeof i == "string" && (this.pendingAuthToken = i);
302
+ const o = r.token;
303
+ typeof o == "string" && (this.pendingAuthToken = o);
218
304
  }
219
305
  }
220
306
  sendAuthTokenToServiceWorker(e) {
@@ -225,7 +311,7 @@ class g {
225
311
  token: e
226
312
  });
227
313
  } catch (r) {
228
- console.error(
314
+ n.error(
229
315
  "[WorkerClient] Failed to send auth token to ServiceWorker:",
230
316
  r
231
317
  );
@@ -237,7 +323,7 @@ class g {
237
323
  token: e
238
324
  });
239
325
  } catch (r) {
240
- console.error(
326
+ n.error(
241
327
  "[WorkerClient] Failed to send auth token to ServiceWorker.controller:",
242
328
  r
243
329
  );
@@ -269,7 +355,7 @@ class g {
269
355
  try {
270
356
  this.sharedWorkerPort.postMessage({ type: "SET_AUTH_TOKEN", token: e }), this.pendingAuthToken = null;
271
357
  } catch (r) {
272
- console.error(
358
+ n.error(
273
359
  "[WorkerClient] Failed to set auth token on SharedWorker:",
274
360
  r
275
361
  );
@@ -277,75 +363,75 @@ class g {
277
363
  else this.workerType === "service" && (this.sendAuthTokenToServiceWorker(e), this.pendingAuthToken = null);
278
364
  }
279
365
  }
280
- const W = "user-activity-db", v = 1, k = "user-events";
281
- async function p() {
366
+ const T = "user-activity-db", S = 1, W = "user-events";
367
+ async function y() {
282
368
  return new Promise((t, e) => {
283
- const r = indexedDB.open(W, v);
284
- r.onerror = () => e(r.error), r.onsuccess = () => t(r.result), r.onupgradeneeded = (i) => {
285
- const o = i.target.result;
286
- if (!o.objectStoreNames.contains(k)) {
287
- const n = o.createObjectStore(k, { keyPath: "id" });
288
- n.createIndex("timestamp", "timestamp", { unique: !1 }), n.createIndex("type", "type", { unique: !1 }), n.createIndex("path", "path", { unique: !1 });
369
+ const r = indexedDB.open(T, S);
370
+ r.onerror = () => e(r.error), r.onsuccess = () => t(r.result), r.onupgradeneeded = (o) => {
371
+ const i = o.target.result;
372
+ if (!i.objectStoreNames.contains(W)) {
373
+ const s = i.createObjectStore(W, { keyPath: "id" });
374
+ s.createIndex("timestamp", "timestamp", { unique: !1 }), s.createIndex("type", "type", { unique: !1 }), s.createIndex("path", "path", { unique: !1 });
289
375
  }
290
376
  };
291
377
  });
292
378
  }
293
- async function f(t) {
294
- const o = (await p()).transaction([k], "readonly").objectStore(k).index("timestamp");
295
- return new Promise((n, c) => {
296
- const a = o.getAll();
297
- a.onsuccess = () => {
298
- let s = a.result;
299
- s.sort((l, d) => d.timestamp - l.timestamp), n(s);
300
- }, a.onerror = () => c(a.error);
379
+ async function C(t) {
380
+ const i = (await y()).transaction([W], "readonly").objectStore(W).index("timestamp");
381
+ return new Promise((s, l) => {
382
+ const k = i.getAll();
383
+ k.onsuccess = () => {
384
+ let h = k.result;
385
+ h.sort((d, a) => a.timestamp - d.timestamp), s(h);
386
+ }, k.onerror = () => l(k.error);
301
387
  });
302
388
  }
303
- const h = new g();
304
- async function T(t) {
305
- return h.init(t);
389
+ const u = new w();
390
+ async function E(t) {
391
+ return u.init(t);
306
392
  }
307
- async function u(t) {
393
+ async function v(t) {
308
394
  const e = { ...t, timestamp: Date.now() };
309
- await h.request("STORE_EVENT", { event: e });
395
+ await u.request("STORE_EVENT", { event: e });
310
396
  }
311
- async function m() {
312
- const t = await f();
397
+ async function b() {
398
+ const t = await C();
313
399
  return Array.isArray(t) ? t : [];
314
400
  }
315
- async function w() {
316
- return h.getConnectionStatus();
401
+ async function U() {
402
+ return u.getConnectionStatus();
317
403
  }
318
- function y(t) {
319
- h.setAuthToken(t);
404
+ function N(t) {
405
+ u.setAuthToken(t);
320
406
  }
321
- function S(t) {
322
- h.onConnectionStatus(t);
407
+ function P(t) {
408
+ u.onConnectionStatus(t);
323
409
  }
324
- function C(t) {
325
- h.offConnectionStatus(t);
410
+ function A(t) {
411
+ u.offConnectionStatus(t);
326
412
  }
327
- async function E(t, e, r) {
328
- return u({ type: "navigation", from: t, to: e, path: r || e });
413
+ async function R(t, e, r) {
414
+ return v({ type: "navigation", from: t, to: e, path: r || e });
329
415
  }
330
- async function b(t, e, r) {
331
- const i = t.id || void 0, o = t.className || void 0, n = t.textContent?.trim().substring(0, 100) || void 0, c = t.tagName.toLowerCase();
332
- return u({
416
+ async function I(t, e, r) {
417
+ const o = t.id || void 0, i = t.className || void 0, s = t.textContent?.trim().substring(0, 100) || void 0, l = t.tagName.toLowerCase();
418
+ return v({
333
419
  type: "click",
334
- element: c,
335
- elementId: i,
336
- elementClass: o,
337
- elementText: n,
420
+ element: l,
421
+ elementId: o,
422
+ elementClass: i,
423
+ elementText: s,
338
424
  path: e || window.location.pathname,
339
425
  metadata: r
340
426
  });
341
427
  }
342
- async function A(t, e, r) {
343
- const i = t.id || void 0, o = t.className || void 0, n = t.tagName.toLowerCase();
344
- return u({
428
+ async function M(t, e, r) {
429
+ const o = t.id || void 0, i = t.className || void 0, s = t.tagName.toLowerCase();
430
+ return v({
345
431
  type: "input",
346
- element: n,
347
- elementId: i,
348
- elementClass: o,
432
+ element: s,
433
+ elementId: o,
434
+ elementClass: i,
349
435
  path: r || window.location.pathname,
350
436
  metadata: {
351
437
  valueLength: e?.length || 0,
@@ -353,8 +439,8 @@ async function A(t, e, r) {
353
439
  }
354
440
  });
355
441
  }
356
- async function N(t, e, r) {
357
- return u({
442
+ async function _(t, e, r) {
443
+ return v({
358
444
  type: "custom",
359
445
  path: r || window.location.pathname,
360
446
  metadata: {
@@ -364,15 +450,15 @@ async function N(t, e, r) {
364
450
  });
365
451
  }
366
452
  export {
367
- w as getConnectionStatus,
368
- m as getStoredEvents,
369
- T as initEventTracker,
370
- C as offConnectionStatus,
371
- S as onConnectionStatus,
372
- y as setAuthToken,
373
- b as trackClick,
374
- N as trackCustom,
375
- u as trackEvent,
376
- A as trackInput,
377
- E as trackNavigation
453
+ U as getConnectionStatus,
454
+ b as getStoredEvents,
455
+ E as initEventTracker,
456
+ A as offConnectionStatus,
457
+ P as onConnectionStatus,
458
+ N as setAuthToken,
459
+ I as trackClick,
460
+ _ as trackCustom,
461
+ v as trackEvent,
462
+ M as trackInput,
463
+ R as trackNavigation
378
464
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mcp-fe/event-tracker",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://mcp-fe.ai",
6
6
  "repository": {
@@ -13,7 +13,7 @@
13
13
  "main": "./index.js",
14
14
  "types": "./index.d.ts",
15
15
  "dependencies": {
16
- "@mcp-fe/mcp-worker": "0.0.16"
16
+ "@mcp-fe/mcp-worker": "0.0.17"
17
17
  },
18
18
  "publishConfig": {
19
19
  "access": "public"