@salesforce/lds-runtime-bridge 1.243.0 → 1.245.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.
- package/dist/ldsRuntimeBridge.js +28 -22
- package/package.json +1 -1
package/dist/ldsRuntimeBridge.js
CHANGED
|
@@ -5878,30 +5878,36 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
5878
5878
|
const operationsWithDenormedRecords = [];
|
|
5879
5879
|
for (let i = 0, len = operations.length; i < len; i++) {
|
|
5880
5880
|
const operation = operations[i];
|
|
5881
|
-
if (
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
if (
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
|
|
5881
|
+
if (operation.type === 'setMetadata') {
|
|
5882
|
+
// if setMetadata also contains entry data then it needs to be denormalized.
|
|
5883
|
+
const keys$1 = keys(operation.entries);
|
|
5884
|
+
if (keys$1.length > 0) {
|
|
5885
|
+
const firstKey = keys$1[0];
|
|
5886
|
+
// casted to any to check if data exists
|
|
5887
|
+
const firstEntry = operation.entries[firstKey];
|
|
5888
|
+
// it is not possible for setMetadata to contain entries with both data and no data in the same operation.
|
|
5889
|
+
// this is determined by the plugin supporting update batch calls before it gets to this HOF.
|
|
5890
|
+
// so we only need to check one entry to confirm this for performance
|
|
5891
|
+
if (firstEntry.data !== undefined) {
|
|
5892
|
+
operationsWithDenormedRecords.push({
|
|
5893
|
+
...operation,
|
|
5894
|
+
entries: denormalizeEntries(operation.entries),
|
|
5895
|
+
});
|
|
5896
|
+
}
|
|
5897
|
+
else {
|
|
5898
|
+
operationsWithDenormedRecords.push(operation);
|
|
5899
|
+
}
|
|
5888
5900
|
}
|
|
5889
|
-
|
|
5890
|
-
...operation,
|
|
5891
|
-
entries: denormalizeEntries(operation.entries),
|
|
5892
|
-
});
|
|
5901
|
+
continue;
|
|
5893
5902
|
}
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
operationsWithDenormedRecords.push(operation);
|
|
5898
|
-
continue;
|
|
5899
|
-
}
|
|
5900
|
-
operationsWithDenormedRecords.push({
|
|
5901
|
-
...operation,
|
|
5902
|
-
entries: denormalizeEntries(operation.entries),
|
|
5903
|
-
});
|
|
5903
|
+
if (operation.segment !== DefaultDurableSegment || operation.type === 'evictEntries') {
|
|
5904
|
+
operationsWithDenormedRecords.push(operation);
|
|
5905
|
+
continue;
|
|
5904
5906
|
}
|
|
5907
|
+
operationsWithDenormedRecords.push({
|
|
5908
|
+
...operation,
|
|
5909
|
+
entries: denormalizeEntries(operation.entries),
|
|
5910
|
+
});
|
|
5905
5911
|
}
|
|
5906
5912
|
return durableStore.batchOperations(operationsWithDenormedRecords);
|
|
5907
5913
|
};
|
|
@@ -5992,4 +5998,4 @@ function ldsRuntimeBridge() {
|
|
|
5992
5998
|
}
|
|
5993
5999
|
|
|
5994
6000
|
export { ldsRuntimeBridge as default };
|
|
5995
|
-
// version: 1.
|
|
6001
|
+
// version: 1.245.0-0ea124370
|