dexie-cloud-addon 4.0.1-beta.40 → 4.0.1-beta.41
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/modern/dexie-cloud-addon.js +6 -3
- package/dist/modern/dexie-cloud-addon.js.map +1 -1
- package/dist/modern/dexie-cloud-addon.min.js +1 -1
- package/dist/modern/dexie-cloud-addon.min.js.map +1 -1
- package/dist/modern/service-worker.js +5 -2
- package/dist/modern/service-worker.js.map +1 -1
- package/dist/modern/service-worker.min.js +1 -1
- package/dist/modern/service-worker.min.js.map +1 -1
- package/dist/types/types/TXExpandos.d.ts +1 -0
- package/dist/umd/dexie-cloud-addon.js +6 -3
- package/dist/umd/dexie-cloud-addon.js.map +1 -1
- package/dist/umd/dexie-cloud-addon.min.js +1 -1
- package/dist/umd/dexie-cloud-addon.min.js.map +1 -1
- package/dist/umd/service-worker.js +5 -2
- package/dist/umd/service-worker.js.map +1 -1
- package/dist/umd/service-worker.min.js +1 -1
- package/dist/umd/service-worker.min.js.map +1 -1
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* ==========================================================================
|
|
10
10
|
*
|
|
11
|
-
* Version 4.0.1-beta.
|
|
11
|
+
* Version 4.0.1-beta.41, Sat Jul 01 2023
|
|
12
12
|
*
|
|
13
13
|
* https://dexie.org
|
|
14
14
|
*
|
|
@@ -4637,6 +4637,7 @@ function createMutationTrackingMiddleware({ currentUserObservable, db }) {
|
|
|
4637
4637
|
if (mode === 'readwrite') {
|
|
4638
4638
|
// Give each transaction a globally unique id.
|
|
4639
4639
|
tx.txid = randomString(16);
|
|
4640
|
+
tx.opCount = 0;
|
|
4640
4641
|
// Introduce the concept of current user that lasts through the entire transaction.
|
|
4641
4642
|
// This is important because the tracked mutations must be connected to the user.
|
|
4642
4643
|
tx.currentUser = currentUserObservable.value;
|
|
@@ -4743,6 +4744,7 @@ function createMutationTrackingMiddleware({ currentUserObservable, db }) {
|
|
|
4743
4744
|
trans.mutationsAdded = true;
|
|
4744
4745
|
const { txid, currentUser: { userId } } = trans;
|
|
4745
4746
|
const { type } = req;
|
|
4747
|
+
const opNo = ++trans.opCount;
|
|
4746
4748
|
return table.mutate(req).then((res) => {
|
|
4747
4749
|
const { numFailures: hasFailures, failures } = res;
|
|
4748
4750
|
let keys = type === 'delete' ? req.keys : res.results;
|
|
@@ -4757,6 +4759,7 @@ function createMutationTrackingMiddleware({ currentUserObservable, db }) {
|
|
|
4757
4759
|
? {
|
|
4758
4760
|
type: 'delete',
|
|
4759
4761
|
ts,
|
|
4762
|
+
opNo,
|
|
4760
4763
|
keys,
|
|
4761
4764
|
criteria: req.criteria,
|
|
4762
4765
|
txid,
|
|
@@ -6079,7 +6082,7 @@ function dexieCloud(dexie) {
|
|
|
6079
6082
|
});
|
|
6080
6083
|
const syncComplete = new Subject();
|
|
6081
6084
|
dexie.cloud = {
|
|
6082
|
-
version: '4.0.1-beta.
|
|
6085
|
+
version: '4.0.1-beta.41',
|
|
6083
6086
|
options: Object.assign({}, DEFAULT_OPTIONS),
|
|
6084
6087
|
schema: null,
|
|
6085
6088
|
get currentUserId() {
|
|
@@ -6340,7 +6343,7 @@ function dexieCloud(dexie) {
|
|
|
6340
6343
|
});
|
|
6341
6344
|
}
|
|
6342
6345
|
}
|
|
6343
|
-
dexieCloud.version = '4.0.1-beta.
|
|
6346
|
+
dexieCloud.version = '4.0.1-beta.41';
|
|
6344
6347
|
Dexie.Cloud = dexieCloud;
|
|
6345
6348
|
|
|
6346
6349
|
export { dexieCloud as default, dexieCloud, getTiedObjectId, getTiedRealmId };
|