@entropic-bond/firebase 1.13.30 → 1.13.32
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.
|
@@ -47412,15 +47412,8 @@ var $ = class e {
|
|
|
47412
47412
|
Dl($.instance.firestore(), e, t);
|
|
47413
47413
|
}
|
|
47414
47414
|
}
|
|
47415
|
-
findById(e, t) {
|
|
47416
|
-
|
|
47417
|
-
return new Promise(async (r) => {
|
|
47418
|
-
try {
|
|
47419
|
-
r((await Eg(Ml(n, t, e))).data());
|
|
47420
|
-
} catch (e) {
|
|
47421
|
-
return console.log(e), null;
|
|
47422
|
-
}
|
|
47423
|
-
});
|
|
47415
|
+
async findById(e, t) {
|
|
47416
|
+
return (await Eg(Ml($.instance.firestore(), t, e))).data();
|
|
47424
47417
|
}
|
|
47425
47418
|
save(e) {
|
|
47426
47419
|
let t = $.instance.firestore(), n = Mg(t);
|
|
@@ -47460,12 +47453,21 @@ var $ = class e {
|
|
|
47460
47453
|
});
|
|
47461
47454
|
}
|
|
47462
47455
|
onDocumentChange(e, t, n) {
|
|
47463
|
-
|
|
47464
|
-
|
|
47465
|
-
|
|
47456
|
+
let r = $.instance.firestore(), i;
|
|
47457
|
+
return kg(Ml(r, e, t), (t) => {
|
|
47458
|
+
let r = t.exists();
|
|
47459
|
+
if (i === void 0 && !r) {
|
|
47460
|
+
i = r;
|
|
47461
|
+
return;
|
|
47462
|
+
}
|
|
47463
|
+
i = r, n({
|
|
47464
|
+
type: r ? "update" : "delete",
|
|
47466
47465
|
before: void 0,
|
|
47467
47466
|
after: t.data(),
|
|
47468
|
-
params:
|
|
47467
|
+
params: {
|
|
47468
|
+
...t.metadata,
|
|
47469
|
+
exists: r
|
|
47470
|
+
},
|
|
47469
47471
|
collectionPath: e
|
|
47470
47472
|
});
|
|
47471
47473
|
});
|