@luvio/environments 0.136.3 → 0.136.4
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.
|
@@ -561,10 +561,10 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
561
561
|
};
|
|
562
562
|
const storeBroadcast = function (_rebuildSnapshot, _snapshotDataAvailable) {
|
|
563
563
|
validateNotDisposed();
|
|
564
|
-
//
|
|
565
|
-
//
|
|
566
|
-
//
|
|
567
|
-
return
|
|
564
|
+
// publishing to L2 is essentially "broadcasting" because the onChanged
|
|
565
|
+
// handler will fire which will revive records to the main L1 store and
|
|
566
|
+
// call the base storeBroadcast
|
|
567
|
+
return publishChangesToDurableStore();
|
|
568
568
|
};
|
|
569
569
|
const publishChangesToDurableStore = function () {
|
|
570
570
|
validateNotDisposed();
|
|
@@ -785,7 +785,6 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
785
785
|
// we don't need to prime metadata
|
|
786
786
|
() => { });
|
|
787
787
|
snapshotFromMemoryIngest = await ingestAndBroadcastFunc();
|
|
788
|
-
await publishChangesToDurableStore();
|
|
789
788
|
})();
|
|
790
789
|
for (const key of keysToReviveAsArray) {
|
|
791
790
|
// we are overwriting the previous promise at this key, but that
|
|
@@ -813,7 +812,6 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
813
812
|
// so all we have to do is ingest then write to L2
|
|
814
813
|
ingestStagingStore = buildIngestStagingStore(environment);
|
|
815
814
|
snapshotFromMemoryIngest = await ingestAndBroadcastFunc();
|
|
816
|
-
await publishChangesToDurableStore();
|
|
817
815
|
}
|
|
818
816
|
if (snapshotFromMemoryIngest === undefined) {
|
|
819
817
|
return undefined;
|
|
@@ -826,12 +824,10 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
826
824
|
const result = await reviveSnapshot(environment, durableStore, snapshotFromMemoryIngest, durableStoreErrorHandler, () => environment.storeLookup(select, environment.createSnapshot, refresh));
|
|
827
825
|
return result.snapshot;
|
|
828
826
|
};
|
|
829
|
-
const handleErrorResponse = function (ingestAndBroadcastFunc) {
|
|
827
|
+
const handleErrorResponse = async function (ingestAndBroadcastFunc) {
|
|
830
828
|
validateNotDisposed();
|
|
831
|
-
|
|
832
|
-
return
|
|
833
|
-
return snapshotFromMemoryIngest;
|
|
834
|
-
});
|
|
829
|
+
ingestStagingStore = buildIngestStagingStore(environment);
|
|
830
|
+
return ingestAndBroadcastFunc();
|
|
835
831
|
};
|
|
836
832
|
const getNotifyChangeStoreEntries = function (keys) {
|
|
837
833
|
validateNotDisposed();
|
|
@@ -565,10 +565,10 @@
|
|
|
565
565
|
};
|
|
566
566
|
const storeBroadcast = function (_rebuildSnapshot, _snapshotDataAvailable) {
|
|
567
567
|
validateNotDisposed();
|
|
568
|
-
//
|
|
569
|
-
//
|
|
570
|
-
//
|
|
571
|
-
return
|
|
568
|
+
// publishing to L2 is essentially "broadcasting" because the onChanged
|
|
569
|
+
// handler will fire which will revive records to the main L1 store and
|
|
570
|
+
// call the base storeBroadcast
|
|
571
|
+
return publishChangesToDurableStore();
|
|
572
572
|
};
|
|
573
573
|
const publishChangesToDurableStore = function () {
|
|
574
574
|
validateNotDisposed();
|
|
@@ -789,7 +789,6 @@
|
|
|
789
789
|
// we don't need to prime metadata
|
|
790
790
|
() => { });
|
|
791
791
|
snapshotFromMemoryIngest = await ingestAndBroadcastFunc();
|
|
792
|
-
await publishChangesToDurableStore();
|
|
793
792
|
})();
|
|
794
793
|
for (const key of keysToReviveAsArray) {
|
|
795
794
|
// we are overwriting the previous promise at this key, but that
|
|
@@ -817,7 +816,6 @@
|
|
|
817
816
|
// so all we have to do is ingest then write to L2
|
|
818
817
|
ingestStagingStore = buildIngestStagingStore(environment);
|
|
819
818
|
snapshotFromMemoryIngest = await ingestAndBroadcastFunc();
|
|
820
|
-
await publishChangesToDurableStore();
|
|
821
819
|
}
|
|
822
820
|
if (snapshotFromMemoryIngest === undefined) {
|
|
823
821
|
return undefined;
|
|
@@ -830,12 +828,10 @@
|
|
|
830
828
|
const result = await reviveSnapshot(environment, durableStore, snapshotFromMemoryIngest, durableStoreErrorHandler, () => environment.storeLookup(select, environment.createSnapshot, refresh));
|
|
831
829
|
return result.snapshot;
|
|
832
830
|
};
|
|
833
|
-
const handleErrorResponse = function (ingestAndBroadcastFunc) {
|
|
831
|
+
const handleErrorResponse = async function (ingestAndBroadcastFunc) {
|
|
834
832
|
validateNotDisposed();
|
|
835
|
-
|
|
836
|
-
return
|
|
837
|
-
return snapshotFromMemoryIngest;
|
|
838
|
-
});
|
|
833
|
+
ingestStagingStore = buildIngestStagingStore(environment);
|
|
834
|
+
return ingestAndBroadcastFunc();
|
|
839
835
|
};
|
|
840
836
|
const getNotifyChangeStoreEntries = function (keys) {
|
|
841
837
|
validateNotDisposed();
|
|
@@ -682,10 +682,10 @@
|
|
|
682
682
|
};
|
|
683
683
|
var storeBroadcast = function (_rebuildSnapshot, _snapshotDataAvailable) {
|
|
684
684
|
validateNotDisposed();
|
|
685
|
-
//
|
|
686
|
-
//
|
|
687
|
-
//
|
|
688
|
-
return
|
|
685
|
+
// publishing to L2 is essentially "broadcasting" because the onChanged
|
|
686
|
+
// handler will fire which will revive records to the main L1 store and
|
|
687
|
+
// call the base storeBroadcast
|
|
688
|
+
return publishChangesToDurableStore();
|
|
689
689
|
};
|
|
690
690
|
var publishChangesToDurableStore = function () {
|
|
691
691
|
validateNotDisposed();
|
|
@@ -927,9 +927,6 @@
|
|
|
927
927
|
return [4 /*yield*/, ingestAndBroadcastFunc()];
|
|
928
928
|
case 3:
|
|
929
929
|
snapshotFromMemoryIngest = _a.sent();
|
|
930
|
-
return [4 /*yield*/, publishChangesToDurableStore()];
|
|
931
|
-
case 4:
|
|
932
|
-
_a.sent();
|
|
933
930
|
return [2 /*return*/];
|
|
934
931
|
}
|
|
935
932
|
});
|
|
@@ -959,7 +956,7 @@
|
|
|
959
956
|
}
|
|
960
957
|
}
|
|
961
958
|
return [7 /*endfinally*/];
|
|
962
|
-
case 4: return [3 /*break*/,
|
|
959
|
+
case 4: return [3 /*break*/, 7];
|
|
963
960
|
case 5:
|
|
964
961
|
// we aren't doing any merging so we don't have to synchronize, the
|
|
965
962
|
// underlying DurableStore implementation takes care of R/W sync
|
|
@@ -968,11 +965,8 @@
|
|
|
968
965
|
return [4 /*yield*/, ingestAndBroadcastFunc()];
|
|
969
966
|
case 6:
|
|
970
967
|
snapshotFromMemoryIngest = _d.sent();
|
|
971
|
-
|
|
968
|
+
_d.label = 7;
|
|
972
969
|
case 7:
|
|
973
|
-
_d.sent();
|
|
974
|
-
_d.label = 8;
|
|
975
|
-
case 8:
|
|
976
970
|
if (snapshotFromMemoryIngest === undefined) {
|
|
977
971
|
return [2 /*return*/, undefined];
|
|
978
972
|
}
|
|
@@ -981,7 +975,7 @@
|
|
|
981
975
|
}
|
|
982
976
|
_c = snapshotFromMemoryIngest, select = _c.select, refresh = _c.refresh;
|
|
983
977
|
return [4 /*yield*/, reviveSnapshot(environment, durableStore, snapshotFromMemoryIngest, durableStoreErrorHandler, function () { return environment.storeLookup(select, environment.createSnapshot, refresh); })];
|
|
984
|
-
case
|
|
978
|
+
case 8:
|
|
985
979
|
result = _d.sent();
|
|
986
980
|
return [2 /*return*/, result.snapshot];
|
|
987
981
|
}
|
|
@@ -989,10 +983,12 @@
|
|
|
989
983
|
});
|
|
990
984
|
};
|
|
991
985
|
var handleErrorResponse = function (ingestAndBroadcastFunc) {
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
986
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
987
|
+
return __generator(this, function (_a) {
|
|
988
|
+
validateNotDisposed();
|
|
989
|
+
ingestStagingStore = buildIngestStagingStore(environment);
|
|
990
|
+
return [2 /*return*/, ingestAndBroadcastFunc()];
|
|
991
|
+
});
|
|
996
992
|
});
|
|
997
993
|
};
|
|
998
994
|
var getNotifyChangeStoreEntries = function (keys) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luvio/environments",
|
|
3
|
-
"version": "0.136.
|
|
3
|
+
"version": "0.136.4",
|
|
4
4
|
"description": "Luvio Environments",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"watch": "yarn build --watch"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@luvio/engine": "^0.136.
|
|
26
|
+
"@luvio/engine": "^0.136.4"
|
|
27
27
|
},
|
|
28
28
|
"volta": {
|
|
29
29
|
"extends": "../../../package.json"
|