edmaxlabs-core 2.6.6 → 2.6.7

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.cjs CHANGED
@@ -1364,18 +1364,6 @@ var Database = class {
1364
1364
  // src/database/Realtime.ts
1365
1365
  var import_socket = require("socket.io-client");
1366
1366
 
1367
- // src/utils/uuid.ts
1368
- function generateUUID() {
1369
- if (typeof crypto !== "undefined" && crypto.randomUUID) {
1370
- return crypto.randomUUID();
1371
- }
1372
- return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (c) => {
1373
- const r = Math.random() * 16 | 0;
1374
- const v = c === "x" ? r : r & 3 | 8;
1375
- return v.toString(16);
1376
- });
1377
- }
1378
-
1379
1367
  // src/utils/documentNomalizer.ts
1380
1368
  function normalizePayload(payload) {
1381
1369
  const raw = payload?.document ?? payload?.data ?? payload;
@@ -1451,9 +1439,9 @@ var Realtime = class {
1451
1439
  */
1452
1440
  subscribeToCollectionRaw(collection, callback, filter = {}) {
1453
1441
  this.connect();
1454
- const lid = `col_${collection}_${generateUUID()}`;
1442
+ const lid = collection;
1455
1443
  const handlers = [];
1456
- this.socket.emit("subscribe", { collection, filter, lid });
1444
+ this.socket.emit("subscribe", { collection, filter });
1457
1445
  this.events.forEach((event) => {
1458
1446
  const channel = `${lid}-${event}`;
1459
1447
  const fn = (payload) => {
@@ -1477,10 +1465,10 @@ var Realtime = class {
1477
1465
  */
1478
1466
  subscribeToDocumentRaw(collection, id, callback) {
1479
1467
  this.connect();
1480
- const lid = `doc_${collection}_${id}_${generateUUID()}`;
1468
+ const lid = collection;
1481
1469
  const filter = { _id: id };
1482
1470
  const handlers = [];
1483
- this.socket.emit("subscribe", { collection, filter, lid });
1471
+ this.socket.emit("subscribe", { collection, filter });
1484
1472
  this.events.forEach((event) => {
1485
1473
  const channel = `${lid}-${event}`;
1486
1474
  const fn = (payload) => {