edmaxlabs-core 2.6.6 → 2.6.8

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/dist/index.mjs CHANGED
@@ -837,7 +837,6 @@ var Query = class {
837
837
  return [];
838
838
  }
839
839
  const snapshots = res.documents.map((d) => {
840
- delete d.token;
841
840
  d.id = d.id ?? d._id;
842
841
  delete d._id;
843
842
  return DocumentSnapshot.fromMap(d);
@@ -1086,7 +1085,6 @@ var CollectionRef = class {
1086
1085
  return [];
1087
1086
  }
1088
1087
  return res.documents.map((d) => {
1089
- delete d.token;
1090
1088
  d.id = d.id ?? d._id;
1091
1089
  delete d._id;
1092
1090
  return DocumentSnapshot.fromMap(d);
@@ -1332,18 +1330,6 @@ var Database = class {
1332
1330
  // src/database/Realtime.ts
1333
1331
  import { io } from "socket.io-client";
1334
1332
 
1335
- // src/utils/uuid.ts
1336
- function generateUUID() {
1337
- if (typeof crypto !== "undefined" && crypto.randomUUID) {
1338
- return crypto.randomUUID();
1339
- }
1340
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
1341
- const r = Math.random() * 16 | 0;
1342
- const v = c === "x" ? r : r & 3 | 8;
1343
- return v.toString(16);
1344
- });
1345
- }
1346
-
1347
1333
  // src/utils/documentNomalizer.ts
1348
1334
  function normalizePayload(payload) {
1349
1335
  const raw = payload?.document ?? payload?.data ?? payload;
@@ -1419,9 +1405,9 @@ var Realtime = class {
1419
1405
  */
1420
1406
  subscribeToCollectionRaw(collection, callback, filter = {}) {
1421
1407
  this.connect();
1422
- const lid = `col_${collection}_${generateUUID()}`;
1408
+ const lid = collection;
1423
1409
  const handlers = [];
1424
- this.socket.emit("subscribe", { collection, filter, lid });
1410
+ this.socket.emit("subscribe", { collection, filter });
1425
1411
  this.events.forEach((event) => {
1426
1412
  const channel = `${lid}-${event}`;
1427
1413
  const fn = (payload) => {
@@ -1445,10 +1431,10 @@ var Realtime = class {
1445
1431
  */
1446
1432
  subscribeToDocumentRaw(collection, id, callback) {
1447
1433
  this.connect();
1448
- const lid = `doc_${collection}_${id}_${generateUUID()}`;
1434
+ const lid = collection;
1449
1435
  const filter = { _id: id };
1450
1436
  const handlers = [];
1451
- this.socket.emit("subscribe", { collection, filter, lid });
1437
+ this.socket.emit("subscribe", { collection, filter });
1452
1438
  this.events.forEach((event) => {
1453
1439
  const channel = `${lid}-${event}`;
1454
1440
  const fn = (payload) => {