@salesforce/lds-runtime-webruntime 1.426.1 → 1.428.0-dev1

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.
@@ -811,14 +811,15 @@ class CacheControlCommand extends BaseCommand {
811
811
  return "query";
812
812
  }
813
813
  /**
814
- * Subscribes to cache update and invalidation events for reactive updates
814
+ * Subscribes to cache update, invalidation, and eviction events for reactive updates
815
815
  *
816
816
  * This method sets up subscriptions to listen for changes that affect the data returned
817
817
  * by this Command.
818
818
  *
819
- * By default, it subscribes to two types of events on the PubSub service:
819
+ * By default, it subscribes to three types of events on the PubSub service:
820
820
  * - 'cacheUpdate': Triggers a rebuild with the original instantiation time
821
- * - 'cacheInvalidation': Triggers a full refresh without time constraints
821
+ * - 'cacheInvalidation': Triggers a full refresh without time constraints (data marked stale)
822
+ * - 'cacheEviction': Triggers a full refresh without time constraints (data removed from cache)
822
823
  *
823
824
  * This method can be extended by subclasses to add additional subscriptions.
824
825
  *
@@ -843,7 +844,13 @@ class CacheControlCommand extends BaseCommand {
843
844
  callback: () => this.rerun().then(() => void 0),
844
845
  keys: this.keysUsed
845
846
  });
846
- this.unsubscribers.push(rebuildUnsubscribe, refreshUnsubscribe);
847
+ const evictionUnsubscribe = pubSub.subscribe({
848
+ type: "cacheEviction",
849
+ predicate: (event) => setOverlaps(event.data, this.keysUsed),
850
+ callback: () => this.rerun().then(() => void 0),
851
+ keys: this.keysUsed
852
+ });
853
+ this.unsubscribers.push(rebuildUnsubscribe, refreshUnsubscribe, evictionUnsubscribe);
847
854
  }
848
855
  /**
849
856
  * Unsubscribes from all stored subscriptions
@@ -2703,6 +2710,9 @@ function buildUpdate(update, existing) {
2703
2710
  );
2704
2711
  return updatedCacheControl !== void 0 ? { type: "metadata", metadata: updatedCacheControl } : { type: "no-op" };
2705
2712
  }
2713
+ case "evict": {
2714
+ return { type: "delete" };
2715
+ }
2706
2716
  default:
2707
2717
  throw new Error(`Invalid update operation: ${update.type}`);
2708
2718
  }
@@ -2775,6 +2785,13 @@ class InMemoryCacheInclusionPolicy extends CacheInclusionPolicyService {
2775
2785
  });
2776
2786
  yield key;
2777
2787
  break;
2788
+ case "delete":
2789
+ this.write({
2790
+ l1: cache,
2791
+ writeToL1: (l1) => resolvedPromiseLike(ok(l1.delete(key)))
2792
+ });
2793
+ yield key;
2794
+ break;
2778
2795
  }
2779
2796
  }
2780
2797
  }
@@ -3314,7 +3331,7 @@ function buildServiceDescriptor$9(luvio) {
3314
3331
  },
3315
3332
  };
3316
3333
  }
3317
- // version: 1.426.1-9fe18ee3ae
3334
+ // version: 1.428.0-dev1-52205c6c54
3318
3335
 
3319
3336
  /**
3320
3337
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3340,7 +3357,7 @@ function buildServiceDescriptor$8(notifyRecordUpdateAvailable, getNormalizedLuvi
3340
3357
  },
3341
3358
  };
3342
3359
  }
3343
- // version: 1.426.1-9fe18ee3ae
3360
+ // version: 1.428.0-dev1-52205c6c54
3344
3361
 
3345
3362
  /*!
3346
3363
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -5196,4 +5213,4 @@ withDefaultLuvio((luvio) => {
5196
5213
  ];
5197
5214
  setServices(services);
5198
5215
  });
5199
- // version: 1.426.1-37e68ccef8
5216
+ // version: 1.428.0-dev1-c95a813572
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-webruntime",
3
- "version": "1.426.1",
3
+ "version": "1.428.0-dev1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Webruntime runtime",
6
6
  "main": "dist/ldsWebruntimeOneStoreInit.js",
@@ -35,38 +35,38 @@
35
35
  "ready": "yarn build && jest --collectCoverage && yarn test:size && yarn release:corejar"
36
36
  },
37
37
  "devDependencies": {
38
- "@conduit-client/service-provisioner": "3.17.3",
39
- "@conduit-client/tools-core": "3.17.3",
38
+ "@conduit-client/service-provisioner": "3.18.0",
39
+ "@conduit-client/tools-core": "3.18.0",
40
40
  "jwt-encode": "1.0.1"
41
41
  },
42
42
  "dependencies": {
43
- "@conduit-client/command-aura-network": "3.17.3",
44
- "@conduit-client/command-aura-normalized-cache-control": "3.17.3",
45
- "@conduit-client/command-aura-resource-cache-control": "3.17.3",
46
- "@conduit-client/command-fetch-network": "3.17.3",
47
- "@conduit-client/command-http-normalized-cache-control": "3.17.3",
48
- "@conduit-client/command-ndjson": "3.17.3",
49
- "@conduit-client/command-network": "3.17.3",
50
- "@conduit-client/command-sse": "3.17.3",
51
- "@conduit-client/command-streaming": "3.17.3",
52
- "@conduit-client/jwt-manager": "3.17.3",
53
- "@conduit-client/service-aura-network": "3.17.3",
54
- "@conduit-client/service-bindings-imperative": "3.17.3",
55
- "@conduit-client/service-bindings-lwc": "3.17.3",
56
- "@conduit-client/service-cache": "3.17.3",
57
- "@conduit-client/service-cache-control": "3.17.3",
58
- "@conduit-client/service-cache-inclusion-policy": "3.17.3",
59
- "@conduit-client/service-fetch-network": "3.17.3",
60
- "@conduit-client/service-instrument-command": "3.17.3",
61
- "@conduit-client/service-pubsub": "3.17.3",
62
- "@conduit-client/service-store": "3.17.3",
63
- "@conduit-client/utils": "3.17.3",
43
+ "@conduit-client/command-aura-network": "3.18.0",
44
+ "@conduit-client/command-aura-normalized-cache-control": "3.18.0",
45
+ "@conduit-client/command-aura-resource-cache-control": "3.18.0",
46
+ "@conduit-client/command-fetch-network": "3.18.0",
47
+ "@conduit-client/command-http-normalized-cache-control": "3.18.0",
48
+ "@conduit-client/command-ndjson": "3.18.0",
49
+ "@conduit-client/command-network": "3.18.0",
50
+ "@conduit-client/command-sse": "3.18.0",
51
+ "@conduit-client/command-streaming": "3.18.0",
52
+ "@conduit-client/jwt-manager": "3.18.0",
53
+ "@conduit-client/service-aura-network": "3.18.0",
54
+ "@conduit-client/service-bindings-imperative": "3.18.0",
55
+ "@conduit-client/service-bindings-lwc": "3.18.0",
56
+ "@conduit-client/service-cache": "3.18.0",
57
+ "@conduit-client/service-cache-control": "3.18.0",
58
+ "@conduit-client/service-cache-inclusion-policy": "3.18.0",
59
+ "@conduit-client/service-fetch-network": "3.18.0",
60
+ "@conduit-client/service-instrument-command": "3.18.0",
61
+ "@conduit-client/service-pubsub": "3.18.0",
62
+ "@conduit-client/service-store": "3.18.0",
63
+ "@conduit-client/utils": "3.18.0",
64
64
  "@luvio/network-adapter-composable": "0.160.3",
65
65
  "@luvio/network-adapter-fetch": "0.160.3",
66
66
  "@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
67
- "@salesforce/lds-default-luvio": "^1.426.1",
68
- "@salesforce/lds-luvio-service": "^1.426.1",
69
- "@salesforce/lds-luvio-uiapi-records-service": "^1.426.1"
67
+ "@salesforce/lds-default-luvio": "^1.428.0-dev1",
68
+ "@salesforce/lds-luvio-service": "^1.428.0-dev1",
69
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.428.0-dev1"
70
70
  },
71
71
  "luvioBundlesize": [
72
72
  {