@salesforce/lds-runtime-aura 1.336.0 → 1.338.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.
@@ -1059,7 +1059,60 @@ class DefaultRecordableCache {
1059
1059
  return this.baseCache.toKeySet(keys);
1060
1060
  }
1061
1061
  record() {
1062
- return this.baseCache.record();
1062
+ return new DefaultRecordableCache(this);
1063
+ }
1064
+ filter(predicate) {
1065
+ return new DefaultFilteredCache(this, predicate);
1066
+ }
1067
+ }
1068
+ /**
1069
+ A utility class for filtering cache entries based on a given predicate.
1070
+ */
1071
+ class DefaultFilteredCache {
1072
+ constructor(baseCache, predicate) {
1073
+ this.baseCache = baseCache;
1074
+ this.predicate = predicate;
1075
+ }
1076
+ delete(key) {
1077
+ this.baseCache.delete(key);
1078
+ }
1079
+ get(key) {
1080
+ const result = this.baseCache.get(key);
1081
+ // if we're chaining filtered caches together, then it's possible the result will be undefined here
1082
+ if (result && this.predicate(key, result)) {
1083
+ return result;
1084
+ }
1085
+ return undefined;
1086
+ }
1087
+ set(key, value) {
1088
+ this.baseCache.set(key, value);
1089
+ }
1090
+ length() {
1091
+ return this.getFilteredKeys().length;
1092
+ }
1093
+ keys() {
1094
+ return this.getFilteredKeys();
1095
+ }
1096
+ toKeySet(keys) {
1097
+ return this.baseCache.toKeySet(keys);
1098
+ }
1099
+ record() {
1100
+ return new DefaultRecordableCache(this);
1101
+ }
1102
+ filter(predicate) {
1103
+ return new DefaultFilteredCache(this, predicate);
1104
+ }
1105
+ getFilteredKeys() {
1106
+ const filteredKeySet = new KeySetImpl();
1107
+ this.baseCache
1108
+ .keys()
1109
+ .elements()
1110
+ .forEach((key) => {
1111
+ if (this.get(key)) {
1112
+ filteredKeySet.add(key);
1113
+ }
1114
+ });
1115
+ return filteredKeySet;
1063
1116
  }
1064
1117
  }
1065
1118
 
@@ -1108,6 +1161,9 @@ class DefaultCache {
1108
1161
  record() {
1109
1162
  return new DefaultRecordableCache(this);
1110
1163
  }
1164
+ filter(predicate) {
1165
+ return new DefaultFilteredCache(this, predicate);
1166
+ }
1111
1167
  }
1112
1168
 
1113
1169
  function buildServiceDescriptor$2() {
@@ -4654,7 +4710,7 @@ function getEnvironmentSetting(name) {
4654
4710
  }
4655
4711
  return undefined;
4656
4712
  }
4657
- // version: 1.336.0-1b35a3afd9
4713
+ // version: 1.338.0-08547ecb90
4658
4714
 
4659
4715
  const forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
4660
4716
  //TODO: Some duplication here that can be most likely moved to a util class
@@ -5342,4 +5398,4 @@ function ldsEngineCreator() {
5342
5398
  }
5343
5399
 
5344
5400
  export { LexRequestStrategy, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, registerRequestStrategy, saveRequestAsPrediction, unregisterRequestStrategy, whenPredictionsReady };
5345
- // version: 1.336.0-7d2c781c74
5401
+ // version: 1.338.0-e95df32d00
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.336.0",
3
+ "version": "1.338.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -34,35 +34,35 @@
34
34
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-aura"
35
35
  },
36
36
  "devDependencies": {
37
- "@luvio/service-provisioner": "5.25.0",
38
- "@salesforce/lds-adapters-apex": "^1.336.0",
39
- "@salesforce/lds-adapters-uiapi": "^1.336.0",
37
+ "@luvio/service-provisioner": "5.26.0",
38
+ "@salesforce/lds-adapters-apex": "^1.338.0",
39
+ "@salesforce/lds-adapters-uiapi": "^1.338.0",
40
40
  "@salesforce/lds-adapters-uiapi-lex": "^1.302.0",
41
- "@salesforce/lds-ads-bridge": "^1.336.0",
42
- "@salesforce/lds-aura-storage": "^1.336.0",
43
- "@salesforce/lds-bindings": "^1.336.0",
44
- "@salesforce/lds-instrumentation": "^1.336.0",
45
- "@salesforce/lds-network-aura": "^1.336.0",
46
- "@salesforce/lds-network-fetch": "^1.336.0",
41
+ "@salesforce/lds-ads-bridge": "^1.338.0",
42
+ "@salesforce/lds-aura-storage": "^1.338.0",
43
+ "@salesforce/lds-bindings": "^1.338.0",
44
+ "@salesforce/lds-instrumentation": "^1.338.0",
45
+ "@salesforce/lds-network-aura": "^1.338.0",
46
+ "@salesforce/lds-network-fetch": "^1.338.0",
47
47
  "jwt-encode": "1.0.1"
48
48
  },
49
49
  "dependencies": {
50
- "@luvio/command-aura-network": "5.25.0",
51
- "@luvio/command-aura-resource-cache-control": "5.25.0",
52
- "@luvio/command-fetch-network": "5.25.0",
53
- "@luvio/command-network": "5.25.0",
54
- "@luvio/command-sse": "5.25.0",
55
- "@luvio/command-streaming": "5.25.0",
50
+ "@luvio/command-aura-network": "5.26.0",
51
+ "@luvio/command-aura-resource-cache-control": "5.26.0",
52
+ "@luvio/command-fetch-network": "5.26.0",
53
+ "@luvio/command-network": "5.26.0",
54
+ "@luvio/command-sse": "5.26.0",
55
+ "@luvio/command-streaming": "5.26.0",
56
56
  "@luvio/network-adapter-composable": "0.156.5",
57
57
  "@luvio/network-adapter-fetch": "0.156.5",
58
- "@luvio/service-aura-network": "5.25.0",
59
- "@luvio/service-cache": "5.25.0",
60
- "@luvio/service-cache-control": "5.25.0",
61
- "@luvio/service-fetch-network": "5.25.0",
62
- "@luvio/service-instrument-command": "5.25.0",
63
- "@luvio/service-store": "5.25.0",
64
- "@luvio/utils": "5.25.0",
65
- "@salesforce/lds-adapters-uiapi-lex": "^1.336.0"
58
+ "@luvio/service-aura-network": "5.26.0",
59
+ "@luvio/service-cache": "5.26.0",
60
+ "@luvio/service-cache-control": "5.26.0",
61
+ "@luvio/service-fetch-network": "5.26.0",
62
+ "@luvio/service-instrument-command": "5.26.0",
63
+ "@luvio/service-store": "5.26.0",
64
+ "@luvio/utils": "5.26.0",
65
+ "@salesforce/lds-adapters-uiapi-lex": "^1.338.0"
66
66
  },
67
67
  "luvioBundlesize": [
68
68
  {