@salesforce/lds-worker-api 1.410.0 → 1.411.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.
@@ -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.410.0-19e0e5d352
1374
+ // version: 1.411.0-193e3a20c1
@@ -4274,7 +4274,7 @@ function withDefaultLuvio(callback) {
4274
4274
  }
4275
4275
  callbacks.push(callback);
4276
4276
  }
4277
- // version: 1.410.0-19e0e5d352
4277
+ // version: 1.411.0-193e3a20c1
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.410.0-19e0e5d352
5321
+ // version: 1.411.0-193e3a20c1
5322
5322
 
5323
5323
  /**
5324
5324
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -35473,7 +35473,7 @@ withDefaultLuvio((luvio) => {
35473
35473
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
35474
35474
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
35475
35475
  });
35476
- // version: 1.410.0-7c228ee347
35476
+ // version: 1.411.0-8fa163ef05
35477
35477
 
35478
35478
  var allowUpdatesForNonCachedRecords = {
35479
35479
  isOpen: function (e) {
@@ -96581,7 +96581,12 @@ class AuraNetworkCommand extends NetworkCommand$1 {
96581
96581
  this.coerceAuraErrors
96582
96582
  );
96583
96583
  } else if (this.shouldUseFetch()) {
96584
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
96584
+ const params = this.fetchParams;
96585
+ try {
96586
+ return this.convertFetchResponseToData(this.services.fetch(...params));
96587
+ } catch (reason) {
96588
+ return resolvedPromiseLike$2(err$1(toError(reason)));
96589
+ }
96585
96590
  }
96586
96591
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
96587
96592
  }
@@ -97179,7 +97184,12 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
97179
97184
  (errs) => this.coerceAuraErrors(errs)
97180
97185
  );
97181
97186
  } else if (this.shouldUseFetch()) {
97182
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97187
+ const params = this.fetchParams;
97188
+ try {
97189
+ return this.convertFetchResponseToData(this.services.fetch(...params));
97190
+ } catch (reason) {
97191
+ return resolvedPromiseLike$2(err$1(toError(reason)));
97192
+ }
97183
97193
  }
97184
97194
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
97185
97195
  }
@@ -97318,7 +97328,12 @@ class AuraCacheControlCommand extends CacheControlCommand {
97318
97328
  (errs) => this.coerceAuraErrors(errs)
97319
97329
  );
97320
97330
  } else if (this.shouldUseFetch()) {
97321
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97331
+ const params = this.fetchParams;
97332
+ try {
97333
+ return this.convertFetchResponseToData(this.services.fetch(...params));
97334
+ } catch (reason) {
97335
+ return resolvedPromiseLike$2(err$1(toError(reason)));
97336
+ }
97322
97337
  }
97323
97338
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
97324
97339
  }
@@ -97538,7 +97553,11 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
97538
97553
  this.services = services;
97539
97554
  }
97540
97555
  fetch() {
97541
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97556
+ try {
97557
+ return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97558
+ } catch (reason) {
97559
+ return resolvedPromiseLike$2(err$1(toError(reason)));
97560
+ }
97542
97561
  }
97543
97562
  async coerceError(errorResponse) {
97544
97563
  return toError(errorResponse.statusText);
@@ -97602,7 +97621,11 @@ class HttpCacheControlCommand extends CacheControlCommand {
97602
97621
  return this.fetch();
97603
97622
  }
97604
97623
  fetch() {
97605
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97624
+ try {
97625
+ return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97626
+ } catch (reason) {
97627
+ return resolvedPromiseLike$2(err$1(toError(reason)));
97628
+ }
97606
97629
  }
97607
97630
  async coerceError(errorResponse) {
97608
97631
  return toError(errorResponse.statusText);
@@ -98079,9 +98102,13 @@ class OnlyIfCachedCacheControlStrategy extends CacheControlStrategy {
98079
98102
  }
98080
98103
  get expiredChecks() {
98081
98104
  return [
98082
- (cacheControlMetadata) => cacheControlMetadata.type === "no-store"
98105
+ ...super.expiredChecks,
98106
+ (cacheControlMetadata) => cacheControlMetadata.type === "no-cache"
98083
98107
  ];
98084
98108
  }
98109
+ // Note: If we add support for `stale-while-revalidate` in the future, we may
98110
+ // need to further override expiredChecks to allow stale entries that are within the
98111
+ // stale-while-revalidate window to be returned for only-if-cached requests.
98085
98112
  collectCacheHitInstrumentation(startTime, instrumentationAttributes) {
98086
98113
  if (this.services.instrumentation) {
98087
98114
  const meter = this.services.instrumentation.metrics.getMeter("onestore");
@@ -98603,7 +98630,7 @@ function buildServiceDescriptor$b(luvio) {
98603
98630
  },
98604
98631
  };
98605
98632
  }
98606
- // version: 1.410.0-7c228ee347
98633
+ // version: 1.411.0-8fa163ef05
98607
98634
 
98608
98635
  /**
98609
98636
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -98629,7 +98656,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
98629
98656
  },
98630
98657
  };
98631
98658
  }
98632
- // version: 1.410.0-7c228ee347
98659
+ // version: 1.411.0-8fa163ef05
98633
98660
 
98634
98661
  /*!
98635
98662
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -98840,11 +98867,26 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
98840
98867
  return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
98841
98868
  });
98842
98869
  } else if (this.shouldUseFetch()) {
98843
- return this.convertFetchResponseToData(
98844
- this.services.fetch(...this.originalFetchParams)
98845
- ).then((result) => {
98846
- return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
98847
- });
98870
+ const params = this.originalFetchParams;
98871
+ try {
98872
+ return this.convertFetchResponseToData(this.services.fetch(...params)).then(
98873
+ (result) => {
98874
+ return buildSubscribableResult$1(
98875
+ result,
98876
+ this.buildSubscribe(),
98877
+ () => this.refresh()
98878
+ );
98879
+ }
98880
+ );
98881
+ } catch (reason) {
98882
+ return resolvedPromiseLike$2(
98883
+ buildSubscribableResult$1(
98884
+ err$1(toError(reason)),
98885
+ this.buildSubscribe(),
98886
+ () => this.refresh()
98887
+ )
98888
+ );
98889
+ }
98848
98890
  }
98849
98891
  return resolvedPromiseLike$2(
98850
98892
  buildSubscribableResult$1(
@@ -101199,7 +101241,7 @@ register$1({
101199
101241
  id: '@salesforce/lds-network-adapter',
101200
101242
  instrument: instrument$2,
101201
101243
  });
101202
- // version: 1.410.0-19e0e5d352
101244
+ // version: 1.411.0-193e3a20c1
101203
101245
 
101204
101246
  const { create: create$3, keys: keys$3 } = Object;
101205
101247
  const { stringify, parse } = JSON;
@@ -115012,7 +115054,7 @@ function registerCallback(cb) {
115012
115054
  cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
115013
115055
  }
115014
115056
  }
115015
- // version: 1.410.0-7c228ee347
115057
+ // version: 1.411.0-8fa163ef05
115016
115058
 
115017
115059
  function createFragmentMap(documentNode) {
115018
115060
  const fragments = {};
@@ -144237,7 +144279,7 @@ register$1({
144237
144279
  configuration: { ...configurationForGraphQLAdapters$1 },
144238
144280
  instrument: instrument$1,
144239
144281
  });
144240
- // version: 1.410.0-7c228ee347
144282
+ // version: 1.411.0-8fa163ef05
144241
144283
 
144242
144284
  // On core the unstable adapters are re-exported with different names,
144243
144285
  // we want to match them here.
@@ -144389,7 +144431,7 @@ withDefaultLuvio((luvio) => {
144389
144431
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
144390
144432
  graphQLImperative = ldsAdapter;
144391
144433
  });
144392
- // version: 1.410.0-7c228ee347
144434
+ // version: 1.411.0-8fa163ef05
144393
144435
 
144394
144436
  var gqlApi = /*#__PURE__*/Object.freeze({
144395
144437
  __proto__: null,
@@ -145188,7 +145230,7 @@ const callbacks$1 = [];
145188
145230
  function register(r) {
145189
145231
  callbacks$1.forEach((callback) => callback(r));
145190
145232
  }
145191
- // version: 1.410.0-19e0e5d352
145233
+ // version: 1.411.0-193e3a20c1
145192
145234
 
145193
145235
  /**
145194
145236
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -146504,4 +146546,4 @@ const { luvio } = getRuntime();
146504
146546
  setDefaultLuvio({ luvio });
146505
146547
 
146506
146548
  export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, importLuvioAdapterModule, importOneStoreAdapterModule, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
146507
- // version: 1.410.0-19e0e5d352
146549
+ // version: 1.411.0-193e3a20c1
@@ -4280,7 +4280,7 @@
4280
4280
  }
4281
4281
  callbacks.push(callback);
4282
4282
  }
4283
- // version: 1.410.0-19e0e5d352
4283
+ // version: 1.411.0-193e3a20c1
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.410.0-19e0e5d352
5327
+ // version: 1.411.0-193e3a20c1
5328
5328
 
5329
5329
  /**
5330
5330
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -35479,7 +35479,7 @@
35479
35479
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
35480
35480
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
35481
35481
  });
35482
- // version: 1.410.0-7c228ee347
35482
+ // version: 1.411.0-8fa163ef05
35483
35483
 
35484
35484
  var allowUpdatesForNonCachedRecords = {
35485
35485
  isOpen: function (e) {
@@ -96587,7 +96587,12 @@
96587
96587
  this.coerceAuraErrors
96588
96588
  );
96589
96589
  } else if (this.shouldUseFetch()) {
96590
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
96590
+ const params = this.fetchParams;
96591
+ try {
96592
+ return this.convertFetchResponseToData(this.services.fetch(...params));
96593
+ } catch (reason) {
96594
+ return resolvedPromiseLike$2(err$1(toError(reason)));
96595
+ }
96591
96596
  }
96592
96597
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
96593
96598
  }
@@ -97185,7 +97190,12 @@
97185
97190
  (errs) => this.coerceAuraErrors(errs)
97186
97191
  );
97187
97192
  } else if (this.shouldUseFetch()) {
97188
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97193
+ const params = this.fetchParams;
97194
+ try {
97195
+ return this.convertFetchResponseToData(this.services.fetch(...params));
97196
+ } catch (reason) {
97197
+ return resolvedPromiseLike$2(err$1(toError(reason)));
97198
+ }
97189
97199
  }
97190
97200
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
97191
97201
  }
@@ -97324,7 +97334,12 @@
97324
97334
  (errs) => this.coerceAuraErrors(errs)
97325
97335
  );
97326
97336
  } else if (this.shouldUseFetch()) {
97327
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97337
+ const params = this.fetchParams;
97338
+ try {
97339
+ return this.convertFetchResponseToData(this.services.fetch(...params));
97340
+ } catch (reason) {
97341
+ return resolvedPromiseLike$2(err$1(toError(reason)));
97342
+ }
97328
97343
  }
97329
97344
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
97330
97345
  }
@@ -97544,7 +97559,11 @@
97544
97559
  this.services = services;
97545
97560
  }
97546
97561
  fetch() {
97547
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97562
+ try {
97563
+ return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97564
+ } catch (reason) {
97565
+ return resolvedPromiseLike$2(err$1(toError(reason)));
97566
+ }
97548
97567
  }
97549
97568
  async coerceError(errorResponse) {
97550
97569
  return toError(errorResponse.statusText);
@@ -97608,7 +97627,11 @@
97608
97627
  return this.fetch();
97609
97628
  }
97610
97629
  fetch() {
97611
- return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97630
+ try {
97631
+ return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
97632
+ } catch (reason) {
97633
+ return resolvedPromiseLike$2(err$1(toError(reason)));
97634
+ }
97612
97635
  }
97613
97636
  async coerceError(errorResponse) {
97614
97637
  return toError(errorResponse.statusText);
@@ -98085,9 +98108,13 @@
98085
98108
  }
98086
98109
  get expiredChecks() {
98087
98110
  return [
98088
- (cacheControlMetadata) => cacheControlMetadata.type === "no-store"
98111
+ ...super.expiredChecks,
98112
+ (cacheControlMetadata) => cacheControlMetadata.type === "no-cache"
98089
98113
  ];
98090
98114
  }
98115
+ // Note: If we add support for `stale-while-revalidate` in the future, we may
98116
+ // need to further override expiredChecks to allow stale entries that are within the
98117
+ // stale-while-revalidate window to be returned for only-if-cached requests.
98091
98118
  collectCacheHitInstrumentation(startTime, instrumentationAttributes) {
98092
98119
  if (this.services.instrumentation) {
98093
98120
  const meter = this.services.instrumentation.metrics.getMeter("onestore");
@@ -98609,7 +98636,7 @@
98609
98636
  },
98610
98637
  };
98611
98638
  }
98612
- // version: 1.410.0-7c228ee347
98639
+ // version: 1.411.0-8fa163ef05
98613
98640
 
98614
98641
  /**
98615
98642
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -98635,7 +98662,7 @@
98635
98662
  },
98636
98663
  };
98637
98664
  }
98638
- // version: 1.410.0-7c228ee347
98665
+ // version: 1.411.0-8fa163ef05
98639
98666
 
98640
98667
  /*!
98641
98668
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -98846,11 +98873,26 @@
98846
98873
  return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
98847
98874
  });
98848
98875
  } else if (this.shouldUseFetch()) {
98849
- return this.convertFetchResponseToData(
98850
- this.services.fetch(...this.originalFetchParams)
98851
- ).then((result) => {
98852
- return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
98853
- });
98876
+ const params = this.originalFetchParams;
98877
+ try {
98878
+ return this.convertFetchResponseToData(this.services.fetch(...params)).then(
98879
+ (result) => {
98880
+ return buildSubscribableResult$1(
98881
+ result,
98882
+ this.buildSubscribe(),
98883
+ () => this.refresh()
98884
+ );
98885
+ }
98886
+ );
98887
+ } catch (reason) {
98888
+ return resolvedPromiseLike$2(
98889
+ buildSubscribableResult$1(
98890
+ err$1(toError(reason)),
98891
+ this.buildSubscribe(),
98892
+ () => this.refresh()
98893
+ )
98894
+ );
98895
+ }
98854
98896
  }
98855
98897
  return resolvedPromiseLike$2(
98856
98898
  buildSubscribableResult$1(
@@ -101205,7 +101247,7 @@
101205
101247
  id: '@salesforce/lds-network-adapter',
101206
101248
  instrument: instrument$2,
101207
101249
  });
101208
- // version: 1.410.0-19e0e5d352
101250
+ // version: 1.411.0-193e3a20c1
101209
101251
 
101210
101252
  const { create: create$3, keys: keys$3 } = Object;
101211
101253
  const { stringify, parse } = JSON;
@@ -115018,7 +115060,7 @@ keys: keys$2,
115018
115060
  cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
115019
115061
  }
115020
115062
  }
115021
- // version: 1.410.0-7c228ee347
115063
+ // version: 1.411.0-8fa163ef05
115022
115064
 
115023
115065
  function createFragmentMap(documentNode) {
115024
115066
  const fragments = {};
@@ -144243,7 +144285,7 @@ keys: keys$2,
144243
144285
  configuration: { ...configurationForGraphQLAdapters$1 },
144244
144286
  instrument: instrument$1,
144245
144287
  });
144246
- // version: 1.410.0-7c228ee347
144288
+ // version: 1.411.0-8fa163ef05
144247
144289
 
144248
144290
  // On core the unstable adapters are re-exported with different names,
144249
144291
  // we want to match them here.
@@ -144395,7 +144437,7 @@ keys: keys$2,
144395
144437
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
144396
144438
  graphQLImperative = ldsAdapter;
144397
144439
  });
144398
- // version: 1.410.0-7c228ee347
144440
+ // version: 1.411.0-8fa163ef05
144399
144441
 
144400
144442
  var gqlApi = /*#__PURE__*/Object.freeze({
144401
144443
  __proto__: null,
@@ -145194,7 +145236,7 @@ keys: keys$2,
145194
145236
  function register(r) {
145195
145237
  callbacks$1.forEach((callback) => callback(r));
145196
145238
  }
145197
- // version: 1.410.0-19e0e5d352
145239
+ // version: 1.411.0-193e3a20c1
145198
145240
 
145199
145241
  /**
145200
145242
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -146531,4 +146573,4 @@ keys: keys$2,
146531
146573
  exports.subscribeToAdapter = subscribeToAdapter;
146532
146574
 
146533
146575
  }));
146534
- // version: 1.410.0-19e0e5d352
146576
+ // version: 1.411.0-193e3a20c1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-worker-api",
3
- "version": "1.410.0",
3
+ "version": "1.411.0",
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.410.0",
39
- "@salesforce/lds-adapters-uiapi": "^1.410.0",
40
- "@salesforce/lds-default-luvio": "^1.410.0",
41
- "@salesforce/lds-drafts": "^1.410.0",
42
- "@salesforce/lds-graphql-parser": "^1.410.0",
43
- "@salesforce/lds-luvio-engine": "^1.410.0",
44
- "@salesforce/lds-runtime-mobile": "^1.410.0",
45
- "@salesforce/nimbus-plugin-lds": "^1.410.0",
38
+ "@salesforce/lds-adapters-graphql": "^1.411.0",
39
+ "@salesforce/lds-adapters-uiapi": "^1.411.0",
40
+ "@salesforce/lds-default-luvio": "^1.411.0",
41
+ "@salesforce/lds-drafts": "^1.411.0",
42
+ "@salesforce/lds-graphql-parser": "^1.411.0",
43
+ "@salesforce/lds-luvio-engine": "^1.411.0",
44
+ "@salesforce/lds-runtime-mobile": "^1.411.0",
45
+ "@salesforce/nimbus-plugin-lds": "^1.411.0",
46
46
  "ajv": "^8.11.0",
47
47
  "glob": "^7.1.5",
48
48
  "nimbus-types": "^2.0.0-alpha1",