@luvio/environments 0.72.0 → 0.73.0
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.
|
@@ -853,28 +853,6 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
853
853
|
}
|
|
854
854
|
return environment.wrapNormalizedGraphNode(normalized, ingestStagingStore);
|
|
855
855
|
};
|
|
856
|
-
const resolveSnapshot = function (snapshot, refresh) {
|
|
857
|
-
validateNotDisposed();
|
|
858
|
-
// if the snapshot is already pending then no need to kick off another
|
|
859
|
-
// revive, just wait for the pending refresh to broadcast
|
|
860
|
-
if (snapshot.state === 'Pending') {
|
|
861
|
-
return environment.resolvePendingSnapshot(snapshot);
|
|
862
|
-
}
|
|
863
|
-
const { resolve, config } = refresh;
|
|
864
|
-
const refreshFunc = () => resolve(config);
|
|
865
|
-
// if the snapshot is unfulfilled we can do an L2 lookup
|
|
866
|
-
if (snapshot.state === 'Unfulfilled') {
|
|
867
|
-
return reviveSnapshot(environment, durableStore, snapshot, durableStoreErrorHandler, () => environment.storeLookup(snapshot.select, environment.createSnapshot, snapshot.refresh)).then((durableSnapshot) => {
|
|
868
|
-
if (environment.snapshotAvailable(durableSnapshot)) {
|
|
869
|
-
// L2 cache hit
|
|
870
|
-
return durableSnapshot;
|
|
871
|
-
}
|
|
872
|
-
// else have to hit network
|
|
873
|
-
return refreshFunc();
|
|
874
|
-
});
|
|
875
|
-
}
|
|
876
|
-
return refreshFunc();
|
|
877
|
-
};
|
|
878
856
|
const rebuildSnapshot = function (snapshot, records, storeMetadataMap, redirects, onAsyncRebuild) {
|
|
879
857
|
validateNotDisposed();
|
|
880
858
|
// try rebuilding from memory
|
|
@@ -1048,7 +1026,6 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
1048
1026
|
storeEvict: { value: storeEvict },
|
|
1049
1027
|
wrapNormalizedGraphNode: { value: wrapNormalizedGraphNode },
|
|
1050
1028
|
getNode: { value: getNode },
|
|
1051
|
-
resolveSnapshot: { value: resolveSnapshot },
|
|
1052
1029
|
rebuildSnapshot: { value: rebuildSnapshot },
|
|
1053
1030
|
withContext: { value: withContext },
|
|
1054
1031
|
storeSetTTLOverride: { value: storeSetTTLOverride },
|
|
@@ -857,28 +857,6 @@
|
|
|
857
857
|
}
|
|
858
858
|
return environment.wrapNormalizedGraphNode(normalized, ingestStagingStore);
|
|
859
859
|
};
|
|
860
|
-
const resolveSnapshot = function (snapshot, refresh) {
|
|
861
|
-
validateNotDisposed();
|
|
862
|
-
// if the snapshot is already pending then no need to kick off another
|
|
863
|
-
// revive, just wait for the pending refresh to broadcast
|
|
864
|
-
if (snapshot.state === 'Pending') {
|
|
865
|
-
return environment.resolvePendingSnapshot(snapshot);
|
|
866
|
-
}
|
|
867
|
-
const { resolve, config } = refresh;
|
|
868
|
-
const refreshFunc = () => resolve(config);
|
|
869
|
-
// if the snapshot is unfulfilled we can do an L2 lookup
|
|
870
|
-
if (snapshot.state === 'Unfulfilled') {
|
|
871
|
-
return reviveSnapshot(environment, durableStore, snapshot, durableStoreErrorHandler, () => environment.storeLookup(snapshot.select, environment.createSnapshot, snapshot.refresh)).then((durableSnapshot) => {
|
|
872
|
-
if (environment.snapshotAvailable(durableSnapshot)) {
|
|
873
|
-
// L2 cache hit
|
|
874
|
-
return durableSnapshot;
|
|
875
|
-
}
|
|
876
|
-
// else have to hit network
|
|
877
|
-
return refreshFunc();
|
|
878
|
-
});
|
|
879
|
-
}
|
|
880
|
-
return refreshFunc();
|
|
881
|
-
};
|
|
882
860
|
const rebuildSnapshot = function (snapshot, records, storeMetadataMap, redirects, onAsyncRebuild) {
|
|
883
861
|
validateNotDisposed();
|
|
884
862
|
// try rebuilding from memory
|
|
@@ -1052,7 +1030,6 @@
|
|
|
1052
1030
|
storeEvict: { value: storeEvict },
|
|
1053
1031
|
wrapNormalizedGraphNode: { value: wrapNormalizedGraphNode },
|
|
1054
1032
|
getNode: { value: getNode },
|
|
1055
|
-
resolveSnapshot: { value: resolveSnapshot },
|
|
1056
1033
|
rebuildSnapshot: { value: rebuildSnapshot },
|
|
1057
1034
|
withContext: { value: withContext },
|
|
1058
1035
|
storeSetTTLOverride: { value: storeSetTTLOverride },
|
|
@@ -900,30 +900,6 @@
|
|
|
900
900
|
}
|
|
901
901
|
return environment.wrapNormalizedGraphNode(normalized, ingestStagingStore);
|
|
902
902
|
};
|
|
903
|
-
var resolveSnapshot = function (snapshot, refresh) {
|
|
904
|
-
validateNotDisposed();
|
|
905
|
-
// if the snapshot is already pending then no need to kick off another
|
|
906
|
-
// revive, just wait for the pending refresh to broadcast
|
|
907
|
-
if (snapshot.state === 'Pending') {
|
|
908
|
-
return environment.resolvePendingSnapshot(snapshot);
|
|
909
|
-
}
|
|
910
|
-
var resolve = refresh.resolve, config = refresh.config;
|
|
911
|
-
var refreshFunc = function () { return resolve(config); };
|
|
912
|
-
// if the snapshot is unfulfilled we can do an L2 lookup
|
|
913
|
-
if (snapshot.state === 'Unfulfilled') {
|
|
914
|
-
return reviveSnapshot(environment, durableStore, snapshot, durableStoreErrorHandler, function () {
|
|
915
|
-
return environment.storeLookup(snapshot.select, environment.createSnapshot, snapshot.refresh);
|
|
916
|
-
}).then(function (durableSnapshot) {
|
|
917
|
-
if (environment.snapshotAvailable(durableSnapshot)) {
|
|
918
|
-
// L2 cache hit
|
|
919
|
-
return durableSnapshot;
|
|
920
|
-
}
|
|
921
|
-
// else have to hit network
|
|
922
|
-
return refreshFunc();
|
|
923
|
-
});
|
|
924
|
-
}
|
|
925
|
-
return refreshFunc();
|
|
926
|
-
};
|
|
927
903
|
var rebuildSnapshot = function (snapshot, records, storeMetadataMap, redirects, onAsyncRebuild) {
|
|
928
904
|
validateNotDisposed();
|
|
929
905
|
// try rebuilding from memory
|
|
@@ -1102,7 +1078,6 @@
|
|
|
1102
1078
|
storeEvict: { value: storeEvict },
|
|
1103
1079
|
wrapNormalizedGraphNode: { value: wrapNormalizedGraphNode },
|
|
1104
1080
|
getNode: { value: getNode },
|
|
1105
|
-
resolveSnapshot: { value: resolveSnapshot },
|
|
1106
1081
|
rebuildSnapshot: { value: rebuildSnapshot },
|
|
1107
1082
|
withContext: { value: withContext },
|
|
1108
1083
|
storeSetTTLOverride: { value: storeSetTTLOverride },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luvio/environments",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.73.0",
|
|
4
4
|
"description": "Luvio Environments",
|
|
5
5
|
"main": "dist/umd/es2018/environments.js",
|
|
6
6
|
"module": "dist/es/es2018/environments.js",
|
|
@@ -26,6 +26,6 @@
|
|
|
26
26
|
"dist/"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@luvio/engine": "0.
|
|
29
|
+
"@luvio/engine": "0.73.0"
|
|
30
30
|
}
|
|
31
31
|
}
|