@salesforce/lds-worker-api 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.
@@ -1371,4 +1371,4 @@ if (process.env.NODE_ENV !== 'production') {
1371
1371
  }
1372
1372
 
1373
1373
  export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, importLuvioAdapterModule, importOneStoreAdapterModule, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
1374
- // version: 1.426.1-37e68ccef8
1374
+ // version: 1.428.0-dev1-c95a813572
@@ -0,0 +1 @@
1
+ export declare const entityFetchedMetadataSchema: {};
@@ -4274,7 +4274,7 @@ function withDefaultLuvio(callback) {
4274
4274
  }
4275
4275
  callbacks.push(callback);
4276
4276
  }
4277
- // version: 1.426.1-37e68ccef8
4277
+ // version: 1.428.0-dev1-c95a813572
4278
4278
 
4279
4279
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
4280
4280
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -5318,7 +5318,7 @@ function createGraphQLWireAdapterConstructor(luvio, adapter, metadata, astResolv
5318
5318
  const { apiFamily, name } = metadata;
5319
5319
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
5320
5320
  }
5321
- // version: 1.426.1-37e68ccef8
5321
+ // version: 1.428.0-dev1-c95a813572
5322
5322
 
5323
5323
  function isSupportedEntity(_objectApiName) {
5324
5324
  return true;
@@ -32610,7 +32610,7 @@ withDefaultLuvio((luvio) => {
32610
32610
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
32611
32611
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
32612
32612
  });
32613
- // version: 1.426.1-9fe18ee3ae
32613
+ // version: 1.428.0-dev1-52205c6c54
32614
32614
 
32615
32615
  var allowUpdatesForNonCachedRecords = {
32616
32616
  isOpen: function (e) {
@@ -94470,14 +94470,15 @@ class CacheControlCommand extends BaseCommand {
94470
94470
  return "query";
94471
94471
  }
94472
94472
  /**
94473
- * Subscribes to cache update and invalidation events for reactive updates
94473
+ * Subscribes to cache update, invalidation, and eviction events for reactive updates
94474
94474
  *
94475
94475
  * This method sets up subscriptions to listen for changes that affect the data returned
94476
94476
  * by this Command.
94477
94477
  *
94478
- * By default, it subscribes to two types of events on the PubSub service:
94478
+ * By default, it subscribes to three types of events on the PubSub service:
94479
94479
  * - 'cacheUpdate': Triggers a rebuild with the original instantiation time
94480
- * - 'cacheInvalidation': Triggers a full refresh without time constraints
94480
+ * - 'cacheInvalidation': Triggers a full refresh without time constraints (data marked stale)
94481
+ * - 'cacheEviction': Triggers a full refresh without time constraints (data removed from cache)
94481
94482
  *
94482
94483
  * This method can be extended by subclasses to add additional subscriptions.
94483
94484
  *
@@ -94502,7 +94503,13 @@ class CacheControlCommand extends BaseCommand {
94502
94503
  callback: () => this.rerun().then(() => void 0),
94503
94504
  keys: this.keysUsed
94504
94505
  });
94505
- this.unsubscribers.push(rebuildUnsubscribe, refreshUnsubscribe);
94506
+ const evictionUnsubscribe = pubSub.subscribe({
94507
+ type: "cacheEviction",
94508
+ predicate: (event) => setOverlaps(event.data, this.keysUsed),
94509
+ callback: () => this.rerun().then(() => void 0),
94510
+ keys: this.keysUsed
94511
+ });
94512
+ this.unsubscribers.push(rebuildUnsubscribe, refreshUnsubscribe, evictionUnsubscribe);
94506
94513
  }
94507
94514
  /**
94508
94515
  * Unsubscribes from all stored subscriptions
@@ -96184,7 +96191,7 @@ function buildServiceDescriptor$b(luvio) {
96184
96191
  },
96185
96192
  };
96186
96193
  }
96187
- // version: 1.426.1-9fe18ee3ae
96194
+ // version: 1.428.0-dev1-52205c6c54
96188
96195
 
96189
96196
  /**
96190
96197
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -96210,7 +96217,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
96210
96217
  },
96211
96218
  };
96212
96219
  }
96213
- // version: 1.426.1-9fe18ee3ae
96220
+ // version: 1.428.0-dev1-52205c6c54
96214
96221
 
96215
96222
  /*!
96216
96223
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -98867,7 +98874,7 @@ register$1({
98867
98874
  id: '@salesforce/lds-network-adapter',
98868
98875
  instrument: instrument$2,
98869
98876
  });
98870
- // version: 1.426.1-37e68ccef8
98877
+ // version: 1.428.0-dev1-c95a813572
98871
98878
 
98872
98879
  const { create: create$2, keys: keys$2 } = Object;
98873
98880
  const { stringify, parse } = JSON;
@@ -106189,8 +106196,7 @@ function buildCommandClass(baseClass) {
106189
106196
  try {
106190
106197
  const luvioService = this.services.luvio;
106191
106198
  const luvioInstance = luvioService.luvio;
106192
- // Create a Luvio reader and get the latest snapshot
106193
- this.latestLuvioSnapshot = luvioInstance.storeLookup({
106199
+ const selector = {
106194
106200
  recordId: 'onestore-graphql',
106195
106201
  node: {
106196
106202
  kind: 'Fragment',
@@ -106208,7 +106214,17 @@ function buildCommandClass(baseClass) {
106208
106214
  },
106209
106215
  },
106210
106216
  variables: {},
106211
- });
106217
+ };
106218
+ // Wire SnapshotRefresh so Luvio's notifyStoreUpdateAvailable → updateAvailable
106219
+ // invokes refresh.resolve for subscribed snapshots (hasOverlappingIds).
106220
+ const snapshotRefresh = {
106221
+ config: this.config,
106222
+ resolve: async (_config) => {
106223
+ await this.refresh();
106224
+ return luvioInstance.storeLookup(selector, snapshotRefresh);
106225
+ },
106226
+ };
106227
+ this.latestLuvioSnapshot = luvioInstance.storeLookup(selector, snapshotRefresh);
106212
106228
  }
106213
106229
  catch (error) {
106214
106230
  return resolvedPromiseLike(err(error));
@@ -106320,7 +106336,6 @@ function buildCommandClass(baseClass) {
106320
106336
  const luvioService = this.services.luvio;
106321
106337
  const luvioInstance = luvioService.luvio;
106322
106338
  const unsubscribeFromLuvioSnapshot = luvioInstance.storeSubscribe(this.latestLuvioSnapshot, (_) => {
106323
- // If any records used change at the top level, refresh all the data
106324
106339
  if (this.usedRecordsChanged()) {
106325
106340
  this.refresh();
106326
106341
  }
@@ -106850,7 +106865,7 @@ function registerCallback(cb) {
106850
106865
  cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
106851
106866
  }
106852
106867
  }
106853
- // version: 1.426.1-9fe18ee3ae
106868
+ // version: 1.428.0-dev1-52205c6c54
106854
106869
 
106855
106870
  function createFragmentMap(documentNode) {
106856
106871
  const fragments = {};
@@ -136087,7 +136102,7 @@ register$1({
136087
136102
  configuration: { ...configurationForGraphQLAdapters$1 },
136088
136103
  instrument: instrument$1,
136089
136104
  });
136090
- // version: 1.426.1-9fe18ee3ae
136105
+ // version: 1.428.0-dev1-52205c6c54
136091
136106
 
136092
136107
  // On core the unstable adapters are re-exported with different names,
136093
136108
  // we want to match them here.
@@ -136239,7 +136254,7 @@ withDefaultLuvio((luvio) => {
136239
136254
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
136240
136255
  graphQLImperative = ldsAdapter;
136241
136256
  });
136242
- // version: 1.426.1-9fe18ee3ae
136257
+ // version: 1.428.0-dev1-52205c6c54
136243
136258
 
136244
136259
  var gqlApi = /*#__PURE__*/Object.freeze({
136245
136260
  __proto__: null,
@@ -137038,7 +137053,7 @@ const callbacks$1 = [];
137038
137053
  function register(r) {
137039
137054
  callbacks$1.forEach((callback) => callback(r));
137040
137055
  }
137041
- // version: 1.426.1-37e68ccef8
137056
+ // version: 1.428.0-dev1-c95a813572
137042
137057
 
137043
137058
  /**
137044
137059
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -138354,4 +138369,4 @@ const { luvio } = getRuntime();
138354
138369
  setDefaultLuvio({ luvio });
138355
138370
 
138356
138371
  export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, importLuvioAdapterModule, importOneStoreAdapterModule, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
138357
- // version: 1.426.1-37e68ccef8
138372
+ // version: 1.428.0-dev1-c95a813572
@@ -0,0 +1 @@
1
+ export declare const entityFetchedMetadataSchema: {};
@@ -4280,7 +4280,7 @@
4280
4280
  }
4281
4281
  callbacks.push(callback);
4282
4282
  }
4283
- // version: 1.426.1-37e68ccef8
4283
+ // version: 1.428.0-dev1-c95a813572
4284
4284
 
4285
4285
  // TODO [TD-0081508]: once that TD is fulfilled we can probably change this file
4286
4286
  function instrumentAdapter$1(createFunction, _metadata) {
@@ -5324,7 +5324,7 @@
5324
5324
  const { apiFamily, name } = metadata;
5325
5325
  return createGraphQLWireAdapterConstructor$1(adapter, `${apiFamily}.${name}`, luvio, astResolver);
5326
5326
  }
5327
- // version: 1.426.1-37e68ccef8
5327
+ // version: 1.428.0-dev1-c95a813572
5328
5328
 
5329
5329
  function isSupportedEntity(_objectApiName) {
5330
5330
  return true;
@@ -32616,7 +32616,7 @@
32616
32616
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
32617
32617
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
32618
32618
  });
32619
- // version: 1.426.1-9fe18ee3ae
32619
+ // version: 1.428.0-dev1-52205c6c54
32620
32620
 
32621
32621
  var allowUpdatesForNonCachedRecords = {
32622
32622
  isOpen: function (e) {
@@ -94476,14 +94476,15 @@
94476
94476
  return "query";
94477
94477
  }
94478
94478
  /**
94479
- * Subscribes to cache update and invalidation events for reactive updates
94479
+ * Subscribes to cache update, invalidation, and eviction events for reactive updates
94480
94480
  *
94481
94481
  * This method sets up subscriptions to listen for changes that affect the data returned
94482
94482
  * by this Command.
94483
94483
  *
94484
- * By default, it subscribes to two types of events on the PubSub service:
94484
+ * By default, it subscribes to three types of events on the PubSub service:
94485
94485
  * - 'cacheUpdate': Triggers a rebuild with the original instantiation time
94486
- * - 'cacheInvalidation': Triggers a full refresh without time constraints
94486
+ * - 'cacheInvalidation': Triggers a full refresh without time constraints (data marked stale)
94487
+ * - 'cacheEviction': Triggers a full refresh without time constraints (data removed from cache)
94487
94488
  *
94488
94489
  * This method can be extended by subclasses to add additional subscriptions.
94489
94490
  *
@@ -94508,7 +94509,13 @@
94508
94509
  callback: () => this.rerun().then(() => void 0),
94509
94510
  keys: this.keysUsed
94510
94511
  });
94511
- this.unsubscribers.push(rebuildUnsubscribe, refreshUnsubscribe);
94512
+ const evictionUnsubscribe = pubSub.subscribe({
94513
+ type: "cacheEviction",
94514
+ predicate: (event) => setOverlaps(event.data, this.keysUsed),
94515
+ callback: () => this.rerun().then(() => void 0),
94516
+ keys: this.keysUsed
94517
+ });
94518
+ this.unsubscribers.push(rebuildUnsubscribe, refreshUnsubscribe, evictionUnsubscribe);
94512
94519
  }
94513
94520
  /**
94514
94521
  * Unsubscribes from all stored subscriptions
@@ -96190,7 +96197,7 @@
96190
96197
  },
96191
96198
  };
96192
96199
  }
96193
- // version: 1.426.1-9fe18ee3ae
96200
+ // version: 1.428.0-dev1-52205c6c54
96194
96201
 
96195
96202
  /**
96196
96203
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -96216,7 +96223,7 @@
96216
96223
  },
96217
96224
  };
96218
96225
  }
96219
- // version: 1.426.1-9fe18ee3ae
96226
+ // version: 1.428.0-dev1-52205c6c54
96220
96227
 
96221
96228
  /*!
96222
96229
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -98873,7 +98880,7 @@
98873
98880
  id: '@salesforce/lds-network-adapter',
98874
98881
  instrument: instrument$2,
98875
98882
  });
98876
- // version: 1.426.1-37e68ccef8
98883
+ // version: 1.428.0-dev1-c95a813572
98877
98884
 
98878
98885
  const { create: create$2, keys: keys$2 } = Object;
98879
98886
  const { stringify, parse } = JSON;
@@ -106195,8 +106202,7 @@
106195
106202
  try {
106196
106203
  const luvioService = this.services.luvio;
106197
106204
  const luvioInstance = luvioService.luvio;
106198
- // Create a Luvio reader and get the latest snapshot
106199
- this.latestLuvioSnapshot = luvioInstance.storeLookup({
106205
+ const selector = {
106200
106206
  recordId: 'onestore-graphql',
106201
106207
  node: {
106202
106208
  kind: 'Fragment',
@@ -106214,7 +106220,17 @@
106214
106220
  },
106215
106221
  },
106216
106222
  variables: {},
106217
- });
106223
+ };
106224
+ // Wire SnapshotRefresh so Luvio's notifyStoreUpdateAvailable → updateAvailable
106225
+ // invokes refresh.resolve for subscribed snapshots (hasOverlappingIds).
106226
+ const snapshotRefresh = {
106227
+ config: this.config,
106228
+ resolve: async (_config) => {
106229
+ await this.refresh();
106230
+ return luvioInstance.storeLookup(selector, snapshotRefresh);
106231
+ },
106232
+ };
106233
+ this.latestLuvioSnapshot = luvioInstance.storeLookup(selector, snapshotRefresh);
106218
106234
  }
106219
106235
  catch (error) {
106220
106236
  return resolvedPromiseLike(err(error));
@@ -106326,7 +106342,6 @@
106326
106342
  const luvioService = this.services.luvio;
106327
106343
  const luvioInstance = luvioService.luvio;
106328
106344
  const unsubscribeFromLuvioSnapshot = luvioInstance.storeSubscribe(this.latestLuvioSnapshot, (_) => {
106329
- // If any records used change at the top level, refresh all the data
106330
106345
  if (this.usedRecordsChanged()) {
106331
106346
  this.refresh();
106332
106347
  }
@@ -106856,7 +106871,7 @@
106856
106871
  cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
106857
106872
  }
106858
106873
  }
106859
- // version: 1.426.1-9fe18ee3ae
106874
+ // version: 1.428.0-dev1-52205c6c54
106860
106875
 
106861
106876
  function createFragmentMap(documentNode) {
106862
106877
  const fragments = {};
@@ -136093,7 +136108,7 @@
136093
136108
  configuration: { ...configurationForGraphQLAdapters$1 },
136094
136109
  instrument: instrument$1,
136095
136110
  });
136096
- // version: 1.426.1-9fe18ee3ae
136111
+ // version: 1.428.0-dev1-52205c6c54
136097
136112
 
136098
136113
  // On core the unstable adapters are re-exported with different names,
136099
136114
  // we want to match them here.
@@ -136245,7 +136260,7 @@
136245
136260
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
136246
136261
  graphQLImperative = ldsAdapter;
136247
136262
  });
136248
- // version: 1.426.1-9fe18ee3ae
136263
+ // version: 1.428.0-dev1-52205c6c54
136249
136264
 
136250
136265
  var gqlApi = /*#__PURE__*/Object.freeze({
136251
136266
  __proto__: null,
@@ -137044,7 +137059,7 @@
137044
137059
  function register(r) {
137045
137060
  callbacks$1.forEach((callback) => callback(r));
137046
137061
  }
137047
- // version: 1.426.1-37e68ccef8
137062
+ // version: 1.428.0-dev1-c95a813572
137048
137063
 
137049
137064
  /**
137050
137065
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -138381,4 +138396,4 @@
138381
138396
  exports.subscribeToAdapter = subscribeToAdapter;
138382
138397
 
138383
138398
  }));
138384
- // version: 1.426.1-37e68ccef8
138399
+ // version: 1.428.0-dev1-c95a813572
@@ -0,0 +1 @@
1
+ export declare const entityFetchedMetadataSchema: {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-worker-api",
3
- "version": "1.426.1",
3
+ "version": "1.428.0-dev1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "",
6
6
  "main": "dist/standalone/es/lds-worker-api.js",
@@ -35,14 +35,14 @@
35
35
  },
36
36
  "devDependencies": {
37
37
  "@oat-sa/rollup-plugin-wildcard-external": "^1.0.0",
38
- "@salesforce/lds-adapters-graphql": "^1.426.1",
39
- "@salesforce/lds-adapters-uiapi": "^1.426.1",
40
- "@salesforce/lds-default-luvio": "^1.426.1",
41
- "@salesforce/lds-drafts": "^1.426.1",
42
- "@salesforce/lds-graphql-parser": "^1.426.1",
43
- "@salesforce/lds-luvio-engine": "^1.426.1",
44
- "@salesforce/lds-runtime-mobile": "^1.426.1",
45
- "@salesforce/nimbus-plugin-lds": "^1.426.1",
38
+ "@salesforce/lds-adapters-graphql": "^1.428.0-dev1",
39
+ "@salesforce/lds-adapters-uiapi": "^1.428.0-dev1",
40
+ "@salesforce/lds-default-luvio": "^1.428.0-dev1",
41
+ "@salesforce/lds-drafts": "^1.428.0-dev1",
42
+ "@salesforce/lds-graphql-parser": "^1.428.0-dev1",
43
+ "@salesforce/lds-luvio-engine": "^1.428.0-dev1",
44
+ "@salesforce/lds-runtime-mobile": "^1.428.0-dev1",
45
+ "@salesforce/nimbus-plugin-lds": "^1.428.0-dev1",
46
46
  "ajv": "^8.11.0",
47
47
  "glob": "^7.1.5",
48
48
  "nimbus-types": "^2.0.0-alpha1",