@salesforce/lds-worker-api 1.409.0 → 1.410.1

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.409.0-19a3d9bdf5
1374
+ // version: 1.410.1-f2ce00a20c
@@ -4274,7 +4274,7 @@ function withDefaultLuvio(callback) {
4274
4274
  }
4275
4275
  callbacks.push(callback);
4276
4276
  }
4277
- // version: 1.409.0-19a3d9bdf5
4277
+ // version: 1.410.1-f2ce00a20c
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.409.0-19a3d9bdf5
5321
+ // version: 1.410.1-f2ce00a20c
5322
5322
 
5323
5323
  /**
5324
5324
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -25678,6 +25678,18 @@ function typeCheckConfig$u(untrustedConfig) {
25678
25678
  untrustedConfig_fields_object[key] = untrustedConfig_fields_prop;
25679
25679
  }
25680
25680
  }
25681
+ if (ArrayIsArray$1$1(untrustedConfig_fields_prop)) {
25682
+ const untrustedConfig_fields_prop_array = [];
25683
+ for (let i = 0, arrayLength = untrustedConfig_fields_prop.length; i < arrayLength; i++) {
25684
+ const untrustedConfig_fields_prop_item = untrustedConfig_fields_prop[i];
25685
+ if (typeof untrustedConfig_fields_prop_item === 'string') {
25686
+ untrustedConfig_fields_prop_array.push(untrustedConfig_fields_prop_item);
25687
+ }
25688
+ }
25689
+ if (untrustedConfig_fields_object !== undefined) {
25690
+ untrustedConfig_fields_object[key] = untrustedConfig_fields_prop_array;
25691
+ }
25692
+ }
25681
25693
  }
25682
25694
  if (untrustedConfig_fields_object !== undefined && Object.keys(untrustedConfig_fields_object).length >= 0) {
25683
25695
  config.fields = untrustedConfig_fields_object;
@@ -32183,12 +32195,29 @@ function validate$7$1(obj, path = 'RecordInputRepresentation') {
32183
32195
  if (obj_fields_prop_union3_error != null) {
32184
32196
  obj_fields_prop_union3 = obj_fields_prop_union3_error.message;
32185
32197
  }
32186
- if (obj_fields_prop_union0 && obj_fields_prop_union1 && obj_fields_prop_union2 && obj_fields_prop_union3) {
32198
+ let obj_fields_prop_union4 = null;
32199
+ const obj_fields_prop_union4_error = (() => {
32200
+ if (!ArrayIsArray$3(obj_fields_prop)) {
32201
+ return new TypeError('Expected "array" but received "' + typeof obj_fields_prop + '" (at "' + path_fields_prop + '")');
32202
+ }
32203
+ for (let i = 0; i < obj_fields_prop.length; i++) {
32204
+ const obj_fields_prop_item = obj_fields_prop[i];
32205
+ const path_fields_prop_item = path_fields_prop + '[' + i + ']';
32206
+ if (typeof obj_fields_prop_item !== 'string') {
32207
+ return new TypeError('Expected "string" but received "' + typeof obj_fields_prop_item + '" (at "' + path_fields_prop_item + '")');
32208
+ }
32209
+ }
32210
+ })();
32211
+ if (obj_fields_prop_union4_error != null) {
32212
+ obj_fields_prop_union4 = obj_fields_prop_union4_error.message;
32213
+ }
32214
+ if (obj_fields_prop_union0 && obj_fields_prop_union1 && obj_fields_prop_union2 && obj_fields_prop_union3 && obj_fields_prop_union4) {
32187
32215
  let message = 'Object doesn\'t match union (at "' + path_fields_prop + '")';
32188
32216
  message += '\n' + obj_fields_prop_union0.split('\n').map((line) => '\t' + line).join('\n');
32189
32217
  message += '\n' + obj_fields_prop_union1.split('\n').map((line) => '\t' + line).join('\n');
32190
32218
  message += '\n' + obj_fields_prop_union2.split('\n').map((line) => '\t' + line).join('\n');
32191
32219
  message += '\n' + obj_fields_prop_union3.split('\n').map((line) => '\t' + line).join('\n');
32220
+ message += '\n' + obj_fields_prop_union4.split('\n').map((line) => '\t' + line).join('\n');
32192
32221
  return new TypeError(message);
32193
32222
  }
32194
32223
  }
@@ -34340,6 +34369,18 @@ function typeCheckConfig$4$1(untrustedConfig) {
34340
34369
  untrustedConfig_fields_object[key] = untrustedConfig_fields_prop;
34341
34370
  }
34342
34371
  }
34372
+ if (ArrayIsArray$1$1(untrustedConfig_fields_prop)) {
34373
+ const untrustedConfig_fields_prop_array = [];
34374
+ for (let i = 0, arrayLength = untrustedConfig_fields_prop.length; i < arrayLength; i++) {
34375
+ const untrustedConfig_fields_prop_item = untrustedConfig_fields_prop[i];
34376
+ if (typeof untrustedConfig_fields_prop_item === 'string') {
34377
+ untrustedConfig_fields_prop_array.push(untrustedConfig_fields_prop_item);
34378
+ }
34379
+ }
34380
+ if (untrustedConfig_fields_object !== undefined) {
34381
+ untrustedConfig_fields_object[key] = untrustedConfig_fields_prop_array;
34382
+ }
34383
+ }
34343
34384
  }
34344
34385
  if (untrustedConfig_fields_object !== undefined && Object.keys(untrustedConfig_fields_object).length >= 0) {
34345
34386
  config.fields = untrustedConfig_fields_object;
@@ -35432,7 +35473,7 @@ withDefaultLuvio((luvio) => {
35432
35473
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
35433
35474
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
35434
35475
  });
35435
- // version: 1.409.0-355a528ce3
35476
+ // version: 1.410.1-ee98040f21
35436
35477
 
35437
35478
  var allowUpdatesForNonCachedRecords = {
35438
35479
  isOpen: function (e) {
@@ -61424,10 +61465,36 @@ function validate$7(obj, path = 'RecordInputRepresentation') {
61424
61465
  if (obj_fields_prop_union3_error != null) {
61425
61466
  obj_fields_prop_union3 = obj_fields_prop_union3_error.message;
61426
61467
  }
61468
+ let obj_fields_prop_union4 = null;
61469
+ const obj_fields_prop_union4_error = (() => {
61470
+ if (!ArrayIsArray$2(obj_fields_prop)) {
61471
+ return new TypeError('Expected "array" but received "' +
61472
+ typeof obj_fields_prop +
61473
+ '" (at "' +
61474
+ path_fields_prop +
61475
+ '")');
61476
+ }
61477
+ for (let j = 0; j < obj_fields_prop.length; j++) {
61478
+ const obj_fields_prop_item = obj_fields_prop[j];
61479
+ const path_fields_prop_item = path_fields_prop + '[' + j + ']';
61480
+ if (typeof obj_fields_prop_item !== 'string') {
61481
+ return new TypeError('Expected "string" but received "' +
61482
+ typeof obj_fields_prop_item +
61483
+ '" (at "' +
61484
+ path_fields_prop_item +
61485
+ '")');
61486
+ }
61487
+ }
61488
+ })();
61489
+ // eslint-disable-next-line eqeqeq
61490
+ if (obj_fields_prop_union4_error != null) {
61491
+ obj_fields_prop_union4 = obj_fields_prop_union4_error.message;
61492
+ }
61427
61493
  if (obj_fields_prop_union0 &&
61428
61494
  obj_fields_prop_union1 &&
61429
61495
  obj_fields_prop_union2 &&
61430
- obj_fields_prop_union3) {
61496
+ obj_fields_prop_union3 &&
61497
+ obj_fields_prop_union4) {
61431
61498
  let message = 'Object doesn\'t match union (at "' + path_fields_prop + '")';
61432
61499
  message +=
61433
61500
  '\n' +
@@ -61453,6 +61520,12 @@ function validate$7(obj, path = 'RecordInputRepresentation') {
61453
61520
  .split('\n')
61454
61521
  .map((line) => '\t' + line)
61455
61522
  .join('\n');
61523
+ message +=
61524
+ '\n' +
61525
+ obj_fields_prop_union4
61526
+ .split('\n')
61527
+ .map((line) => '\t' + line)
61528
+ .join('\n');
61456
61529
  return new TypeError(message);
61457
61530
  }
61458
61531
  }
@@ -96508,7 +96581,12 @@ class AuraNetworkCommand extends NetworkCommand$1 {
96508
96581
  this.coerceAuraErrors
96509
96582
  );
96510
96583
  } else if (this.shouldUseFetch()) {
96511
- 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
+ }
96512
96590
  }
96513
96591
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
96514
96592
  }
@@ -97106,7 +97184,12 @@ let AuraCacheControlCommand$1 = class AuraCacheControlCommand extends CacheContr
97106
97184
  (errs) => this.coerceAuraErrors(errs)
97107
97185
  );
97108
97186
  } else if (this.shouldUseFetch()) {
97109
- 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
+ }
97110
97193
  }
97111
97194
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
97112
97195
  }
@@ -97245,7 +97328,12 @@ class AuraCacheControlCommand extends CacheControlCommand {
97245
97328
  (errs) => this.coerceAuraErrors(errs)
97246
97329
  );
97247
97330
  } else if (this.shouldUseFetch()) {
97248
- 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
+ }
97249
97337
  }
97250
97338
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
97251
97339
  }
@@ -97465,7 +97553,11 @@ const _FetchNetworkCommand = class _FetchNetworkCommand extends NetworkCommand {
97465
97553
  this.services = services;
97466
97554
  }
97467
97555
  fetch() {
97468
- 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
+ }
97469
97561
  }
97470
97562
  async coerceError(errorResponse) {
97471
97563
  return toError(errorResponse.statusText);
@@ -97529,7 +97621,11 @@ class HttpCacheControlCommand extends CacheControlCommand {
97529
97621
  return this.fetch();
97530
97622
  }
97531
97623
  fetch() {
97532
- 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
+ }
97533
97629
  }
97534
97630
  async coerceError(errorResponse) {
97535
97631
  return toError(errorResponse.statusText);
@@ -98006,9 +98102,13 @@ class OnlyIfCachedCacheControlStrategy extends CacheControlStrategy {
98006
98102
  }
98007
98103
  get expiredChecks() {
98008
98104
  return [
98009
- (cacheControlMetadata) => cacheControlMetadata.type === "no-store"
98105
+ ...super.expiredChecks,
98106
+ (cacheControlMetadata) => cacheControlMetadata.type === "no-cache"
98010
98107
  ];
98011
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.
98012
98112
  collectCacheHitInstrumentation(startTime, instrumentationAttributes) {
98013
98113
  if (this.services.instrumentation) {
98014
98114
  const meter = this.services.instrumentation.metrics.getMeter("onestore");
@@ -98530,7 +98630,7 @@ function buildServiceDescriptor$b(luvio) {
98530
98630
  },
98531
98631
  };
98532
98632
  }
98533
- // version: 1.409.0-355a528ce3
98633
+ // version: 1.410.1-ee98040f21
98534
98634
 
98535
98635
  /**
98536
98636
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -98556,7 +98656,7 @@ function buildServiceDescriptor$a(notifyRecordUpdateAvailable, getNormalizedLuvi
98556
98656
  },
98557
98657
  };
98558
98658
  }
98559
- // version: 1.409.0-355a528ce3
98659
+ // version: 1.410.1-ee98040f21
98560
98660
 
98561
98661
  /*!
98562
98662
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -98767,11 +98867,26 @@ class AuraGraphQLNormalizedCacheControlCommand extends AuraNormalizedCacheContro
98767
98867
  return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
98768
98868
  });
98769
98869
  } else if (this.shouldUseFetch()) {
98770
- return this.convertFetchResponseToData(
98771
- this.services.fetch(...this.originalFetchParams)
98772
- ).then((result) => {
98773
- return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
98774
- });
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
+ }
98775
98890
  }
98776
98891
  return resolvedPromiseLike$2(
98777
98892
  buildSubscribableResult$1(
@@ -100086,7 +100201,12 @@ function buildServiceDescriptor$2() {
100086
100201
  * All rights reserved.
100087
100202
  * For full license text, see the LICENSE.txt file
100088
100203
  */
100089
- function buildServiceDescriptor$1(interceptors = { request: [], response: [], finally: [] }, retryService) {
100204
+ function buildServiceDescriptor$1(interceptors = {
100205
+ request: [],
100206
+ retry: void 0,
100207
+ response: [],
100208
+ finally: []
100209
+ }, retryService) {
100090
100210
  return {
100091
100211
  type: "fetch",
100092
100212
  version: "1.0",
@@ -100095,6 +100215,7 @@ function buildServiceDescriptor$1(interceptors = { request: [], response: [], fi
100095
100215
  const context = (_a = interceptors.createContext) == null ? void 0 : _a.call(interceptors);
100096
100216
  const {
100097
100217
  request: requestInterceptors = [],
100218
+ retry: retryInterceptor = void 0,
100098
100219
  response: responseInterceptors = [],
100099
100220
  finally: finallyInterceptors = []
100100
100221
  } = interceptors;
@@ -100103,10 +100224,14 @@ function buildServiceDescriptor$1(interceptors = { request: [], response: [], fi
100103
100224
  resolvedPromiseLike$2(args)
100104
100225
  );
100105
100226
  return Promise.resolve(pending).then((args2) => {
100106
- if (retryService) {
100107
- return retryService.applyRetry(() => fetch(...args2));
100227
+ if (retryInterceptor) {
100228
+ return retryInterceptor(args2, retryService, context);
100229
+ } else {
100230
+ if (retryService) {
100231
+ return retryService.applyRetry(() => fetch(...args2));
100232
+ }
100233
+ return fetch(...args2);
100108
100234
  }
100109
- return fetch(...args2);
100110
100235
  }).then((response) => {
100111
100236
  return responseInterceptors.reduce(
100112
100237
  (previousPromise, interceptor) => previousPromise.then((response2) => interceptor(response2, context)),
@@ -101116,7 +101241,7 @@ register$1({
101116
101241
  id: '@salesforce/lds-network-adapter',
101117
101242
  instrument: instrument$2,
101118
101243
  });
101119
- // version: 1.409.0-19a3d9bdf5
101244
+ // version: 1.410.1-f2ce00a20c
101120
101245
 
101121
101246
  const { create: create$3, keys: keys$3 } = Object;
101122
101247
  const { stringify, parse } = JSON;
@@ -114929,7 +115054,7 @@ function registerCallback(cb) {
114929
115054
  cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
114930
115055
  }
114931
115056
  }
114932
- // version: 1.409.0-355a528ce3
115057
+ // version: 1.410.1-ee98040f21
114933
115058
 
114934
115059
  function createFragmentMap(documentNode) {
114935
115060
  const fragments = {};
@@ -144154,7 +144279,7 @@ register$1({
144154
144279
  configuration: { ...configurationForGraphQLAdapters$1 },
144155
144280
  instrument: instrument$1,
144156
144281
  });
144157
- // version: 1.409.0-355a528ce3
144282
+ // version: 1.410.1-ee98040f21
144158
144283
 
144159
144284
  // On core the unstable adapters are re-exported with different names,
144160
144285
  // we want to match them here.
@@ -144306,7 +144431,7 @@ withDefaultLuvio((luvio) => {
144306
144431
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
144307
144432
  graphQLImperative = ldsAdapter;
144308
144433
  });
144309
- // version: 1.409.0-355a528ce3
144434
+ // version: 1.410.1-ee98040f21
144310
144435
 
144311
144436
  var gqlApi = /*#__PURE__*/Object.freeze({
144312
144437
  __proto__: null,
@@ -145105,7 +145230,7 @@ const callbacks$1 = [];
145105
145230
  function register(r) {
145106
145231
  callbacks$1.forEach((callback) => callback(r));
145107
145232
  }
145108
- // version: 1.409.0-19a3d9bdf5
145233
+ // version: 1.410.1-f2ce00a20c
145109
145234
 
145110
145235
  /**
145111
145236
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -146421,4 +146546,4 @@ const { luvio } = getRuntime();
146421
146546
  setDefaultLuvio({ luvio });
146422
146547
 
146423
146548
  export { createPrimingSession, draftManager, draftQueue, evictCacheRecordsByIds, evictExpiredCacheEntries, executeAdapter, executeMutatingAdapter, getImperativeAdapterNames, importLuvioAdapterModule, importOneStoreAdapterModule, invokeAdapter, invokeAdapterWithDraftToMerge, invokeAdapterWithDraftToReplace, invokeAdapterWithMetadata, nimbusDraftQueue, registerReportObserver, setMetadataTTL, setUiApiRecordTTL, stopEviction, subscribeToAdapter };
146424
- // version: 1.409.0-19a3d9bdf5
146549
+ // version: 1.410.1-f2ce00a20c
@@ -4280,7 +4280,7 @@
4280
4280
  }
4281
4281
  callbacks.push(callback);
4282
4282
  }
4283
- // version: 1.409.0-19a3d9bdf5
4283
+ // version: 1.410.1-f2ce00a20c
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.409.0-19a3d9bdf5
5327
+ // version: 1.410.1-f2ce00a20c
5328
5328
 
5329
5329
  /**
5330
5330
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -25684,6 +25684,18 @@
25684
25684
  untrustedConfig_fields_object[key] = untrustedConfig_fields_prop;
25685
25685
  }
25686
25686
  }
25687
+ if (ArrayIsArray$1$1(untrustedConfig_fields_prop)) {
25688
+ const untrustedConfig_fields_prop_array = [];
25689
+ for (let i = 0, arrayLength = untrustedConfig_fields_prop.length; i < arrayLength; i++) {
25690
+ const untrustedConfig_fields_prop_item = untrustedConfig_fields_prop[i];
25691
+ if (typeof untrustedConfig_fields_prop_item === 'string') {
25692
+ untrustedConfig_fields_prop_array.push(untrustedConfig_fields_prop_item);
25693
+ }
25694
+ }
25695
+ if (untrustedConfig_fields_object !== undefined) {
25696
+ untrustedConfig_fields_object[key] = untrustedConfig_fields_prop_array;
25697
+ }
25698
+ }
25687
25699
  }
25688
25700
  if (untrustedConfig_fields_object !== undefined && Object.keys(untrustedConfig_fields_object).length >= 0) {
25689
25701
  config.fields = untrustedConfig_fields_object;
@@ -32189,12 +32201,29 @@
32189
32201
  if (obj_fields_prop_union3_error != null) {
32190
32202
  obj_fields_prop_union3 = obj_fields_prop_union3_error.message;
32191
32203
  }
32192
- if (obj_fields_prop_union0 && obj_fields_prop_union1 && obj_fields_prop_union2 && obj_fields_prop_union3) {
32204
+ let obj_fields_prop_union4 = null;
32205
+ const obj_fields_prop_union4_error = (() => {
32206
+ if (!ArrayIsArray$3(obj_fields_prop)) {
32207
+ return new TypeError('Expected "array" but received "' + typeof obj_fields_prop + '" (at "' + path_fields_prop + '")');
32208
+ }
32209
+ for (let i = 0; i < obj_fields_prop.length; i++) {
32210
+ const obj_fields_prop_item = obj_fields_prop[i];
32211
+ const path_fields_prop_item = path_fields_prop + '[' + i + ']';
32212
+ if (typeof obj_fields_prop_item !== 'string') {
32213
+ return new TypeError('Expected "string" but received "' + typeof obj_fields_prop_item + '" (at "' + path_fields_prop_item + '")');
32214
+ }
32215
+ }
32216
+ })();
32217
+ if (obj_fields_prop_union4_error != null) {
32218
+ obj_fields_prop_union4 = obj_fields_prop_union4_error.message;
32219
+ }
32220
+ if (obj_fields_prop_union0 && obj_fields_prop_union1 && obj_fields_prop_union2 && obj_fields_prop_union3 && obj_fields_prop_union4) {
32193
32221
  let message = 'Object doesn\'t match union (at "' + path_fields_prop + '")';
32194
32222
  message += '\n' + obj_fields_prop_union0.split('\n').map((line) => '\t' + line).join('\n');
32195
32223
  message += '\n' + obj_fields_prop_union1.split('\n').map((line) => '\t' + line).join('\n');
32196
32224
  message += '\n' + obj_fields_prop_union2.split('\n').map((line) => '\t' + line).join('\n');
32197
32225
  message += '\n' + obj_fields_prop_union3.split('\n').map((line) => '\t' + line).join('\n');
32226
+ message += '\n' + obj_fields_prop_union4.split('\n').map((line) => '\t' + line).join('\n');
32198
32227
  return new TypeError(message);
32199
32228
  }
32200
32229
  }
@@ -34346,6 +34375,18 @@
34346
34375
  untrustedConfig_fields_object[key] = untrustedConfig_fields_prop;
34347
34376
  }
34348
34377
  }
34378
+ if (ArrayIsArray$1$1(untrustedConfig_fields_prop)) {
34379
+ const untrustedConfig_fields_prop_array = [];
34380
+ for (let i = 0, arrayLength = untrustedConfig_fields_prop.length; i < arrayLength; i++) {
34381
+ const untrustedConfig_fields_prop_item = untrustedConfig_fields_prop[i];
34382
+ if (typeof untrustedConfig_fields_prop_item === 'string') {
34383
+ untrustedConfig_fields_prop_array.push(untrustedConfig_fields_prop_item);
34384
+ }
34385
+ }
34386
+ if (untrustedConfig_fields_object !== undefined) {
34387
+ untrustedConfig_fields_object[key] = untrustedConfig_fields_prop_array;
34388
+ }
34389
+ }
34349
34390
  }
34350
34391
  if (untrustedConfig_fields_object !== undefined && Object.keys(untrustedConfig_fields_object).length >= 0) {
34351
34392
  config.fields = untrustedConfig_fields_object;
@@ -35438,7 +35479,7 @@
35438
35479
  throttle(60, 60000, setupNotifyAllListRecordUpdateAvailable(luvio));
35439
35480
  throttle(60, 60000, setupNotifyAllListInfoSummaryUpdateAvailable(luvio));
35440
35481
  });
35441
- // version: 1.409.0-355a528ce3
35482
+ // version: 1.410.1-ee98040f21
35442
35483
 
35443
35484
  var allowUpdatesForNonCachedRecords = {
35444
35485
  isOpen: function (e) {
@@ -61430,10 +61471,36 @@
61430
61471
  if (obj_fields_prop_union3_error != null) {
61431
61472
  obj_fields_prop_union3 = obj_fields_prop_union3_error.message;
61432
61473
  }
61474
+ let obj_fields_prop_union4 = null;
61475
+ const obj_fields_prop_union4_error = (() => {
61476
+ if (!ArrayIsArray$2(obj_fields_prop)) {
61477
+ return new TypeError('Expected "array" but received "' +
61478
+ typeof obj_fields_prop +
61479
+ '" (at "' +
61480
+ path_fields_prop +
61481
+ '")');
61482
+ }
61483
+ for (let j = 0; j < obj_fields_prop.length; j++) {
61484
+ const obj_fields_prop_item = obj_fields_prop[j];
61485
+ const path_fields_prop_item = path_fields_prop + '[' + j + ']';
61486
+ if (typeof obj_fields_prop_item !== 'string') {
61487
+ return new TypeError('Expected "string" but received "' +
61488
+ typeof obj_fields_prop_item +
61489
+ '" (at "' +
61490
+ path_fields_prop_item +
61491
+ '")');
61492
+ }
61493
+ }
61494
+ })();
61495
+ // eslint-disable-next-line eqeqeq
61496
+ if (obj_fields_prop_union4_error != null) {
61497
+ obj_fields_prop_union4 = obj_fields_prop_union4_error.message;
61498
+ }
61433
61499
  if (obj_fields_prop_union0 &&
61434
61500
  obj_fields_prop_union1 &&
61435
61501
  obj_fields_prop_union2 &&
61436
- obj_fields_prop_union3) {
61502
+ obj_fields_prop_union3 &&
61503
+ obj_fields_prop_union4) {
61437
61504
  let message = 'Object doesn\'t match union (at "' + path_fields_prop + '")';
61438
61505
  message +=
61439
61506
  '\n' +
@@ -61459,6 +61526,12 @@
61459
61526
  .split('\n')
61460
61527
  .map((line) => '\t' + line)
61461
61528
  .join('\n');
61529
+ message +=
61530
+ '\n' +
61531
+ obj_fields_prop_union4
61532
+ .split('\n')
61533
+ .map((line) => '\t' + line)
61534
+ .join('\n');
61462
61535
  return new TypeError(message);
61463
61536
  }
61464
61537
  }
@@ -96514,7 +96587,12 @@
96514
96587
  this.coerceAuraErrors
96515
96588
  );
96516
96589
  } else if (this.shouldUseFetch()) {
96517
- 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
+ }
96518
96596
  }
96519
96597
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
96520
96598
  }
@@ -97112,7 +97190,12 @@
97112
97190
  (errs) => this.coerceAuraErrors(errs)
97113
97191
  );
97114
97192
  } else if (this.shouldUseFetch()) {
97115
- 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
+ }
97116
97199
  }
97117
97200
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
97118
97201
  }
@@ -97251,7 +97334,12 @@
97251
97334
  (errs) => this.coerceAuraErrors(errs)
97252
97335
  );
97253
97336
  } else if (this.shouldUseFetch()) {
97254
- 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
+ }
97255
97343
  }
97256
97344
  return resolvedPromiseLike$2(err$1(toError("Aura/Fetch network services not found")));
97257
97345
  }
@@ -97471,7 +97559,11 @@
97471
97559
  this.services = services;
97472
97560
  }
97473
97561
  fetch() {
97474
- 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
+ }
97475
97567
  }
97476
97568
  async coerceError(errorResponse) {
97477
97569
  return toError(errorResponse.statusText);
@@ -97535,7 +97627,11 @@
97535
97627
  return this.fetch();
97536
97628
  }
97537
97629
  fetch() {
97538
- 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
+ }
97539
97635
  }
97540
97636
  async coerceError(errorResponse) {
97541
97637
  return toError(errorResponse.statusText);
@@ -98012,9 +98108,13 @@
98012
98108
  }
98013
98109
  get expiredChecks() {
98014
98110
  return [
98015
- (cacheControlMetadata) => cacheControlMetadata.type === "no-store"
98111
+ ...super.expiredChecks,
98112
+ (cacheControlMetadata) => cacheControlMetadata.type === "no-cache"
98016
98113
  ];
98017
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.
98018
98118
  collectCacheHitInstrumentation(startTime, instrumentationAttributes) {
98019
98119
  if (this.services.instrumentation) {
98020
98120
  const meter = this.services.instrumentation.metrics.getMeter("onestore");
@@ -98536,7 +98636,7 @@
98536
98636
  },
98537
98637
  };
98538
98638
  }
98539
- // version: 1.409.0-355a528ce3
98639
+ // version: 1.410.1-ee98040f21
98540
98640
 
98541
98641
  /**
98542
98642
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -98562,7 +98662,7 @@
98562
98662
  },
98563
98663
  };
98564
98664
  }
98565
- // version: 1.409.0-355a528ce3
98665
+ // version: 1.410.1-ee98040f21
98566
98666
 
98567
98667
  /*!
98568
98668
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -98773,11 +98873,26 @@
98773
98873
  return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
98774
98874
  });
98775
98875
  } else if (this.shouldUseFetch()) {
98776
- return this.convertFetchResponseToData(
98777
- this.services.fetch(...this.originalFetchParams)
98778
- ).then((result) => {
98779
- return buildSubscribableResult$1(result, this.buildSubscribe(), () => this.refresh());
98780
- });
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
+ }
98781
98896
  }
98782
98897
  return resolvedPromiseLike$2(
98783
98898
  buildSubscribableResult$1(
@@ -100092,7 +100207,12 @@
100092
100207
  * All rights reserved.
100093
100208
  * For full license text, see the LICENSE.txt file
100094
100209
  */
100095
- function buildServiceDescriptor$1(interceptors = { request: [], response: [], finally: [] }, retryService) {
100210
+ function buildServiceDescriptor$1(interceptors = {
100211
+ request: [],
100212
+ retry: void 0,
100213
+ response: [],
100214
+ finally: []
100215
+ }, retryService) {
100096
100216
  return {
100097
100217
  type: "fetch",
100098
100218
  version: "1.0",
@@ -100101,6 +100221,7 @@
100101
100221
  const context = (_a = interceptors.createContext) == null ? void 0 : _a.call(interceptors);
100102
100222
  const {
100103
100223
  request: requestInterceptors = [],
100224
+ retry: retryInterceptor = void 0,
100104
100225
  response: responseInterceptors = [],
100105
100226
  finally: finallyInterceptors = []
100106
100227
  } = interceptors;
@@ -100109,10 +100230,14 @@
100109
100230
  resolvedPromiseLike$2(args)
100110
100231
  );
100111
100232
  return Promise.resolve(pending).then((args2) => {
100112
- if (retryService) {
100113
- return retryService.applyRetry(() => fetch(...args2));
100233
+ if (retryInterceptor) {
100234
+ return retryInterceptor(args2, retryService, context);
100235
+ } else {
100236
+ if (retryService) {
100237
+ return retryService.applyRetry(() => fetch(...args2));
100238
+ }
100239
+ return fetch(...args2);
100114
100240
  }
100115
- return fetch(...args2);
100116
100241
  }).then((response) => {
100117
100242
  return responseInterceptors.reduce(
100118
100243
  (previousPromise, interceptor) => previousPromise.then((response2) => interceptor(response2, context)),
@@ -101122,7 +101247,7 @@
101122
101247
  id: '@salesforce/lds-network-adapter',
101123
101248
  instrument: instrument$2,
101124
101249
  });
101125
- // version: 1.409.0-19a3d9bdf5
101250
+ // version: 1.410.1-f2ce00a20c
101126
101251
 
101127
101252
  const { create: create$3, keys: keys$3 } = Object;
101128
101253
  const { stringify, parse } = JSON;
@@ -114935,7 +115060,7 @@ keys: keys$2,
114935
115060
  cb(graphql_v1_import, graphql_imperative$1, graphql_imperative_legacy_v1_import, graphql_state_manager, useOneStoreGraphQL);
114936
115061
  }
114937
115062
  }
114938
- // version: 1.409.0-355a528ce3
115063
+ // version: 1.410.1-ee98040f21
114939
115064
 
114940
115065
  function createFragmentMap(documentNode) {
114941
115066
  const fragments = {};
@@ -144160,7 +144285,7 @@ keys: keys$2,
144160
144285
  configuration: { ...configurationForGraphQLAdapters$1 },
144161
144286
  instrument: instrument$1,
144162
144287
  });
144163
- // version: 1.409.0-355a528ce3
144288
+ // version: 1.410.1-ee98040f21
144164
144289
 
144165
144290
  // On core the unstable adapters are re-exported with different names,
144166
144291
  // we want to match them here.
@@ -144312,7 +144437,7 @@ keys: keys$2,
144312
144437
  unstable_graphQL_imperative = createImperativeAdapter(luvio, createInstrumentedAdapter(ldsAdapter, adapterMetadata), adapterMetadata);
144313
144438
  graphQLImperative = ldsAdapter;
144314
144439
  });
144315
- // version: 1.409.0-355a528ce3
144440
+ // version: 1.410.1-ee98040f21
144316
144441
 
144317
144442
  var gqlApi = /*#__PURE__*/Object.freeze({
144318
144443
  __proto__: null,
@@ -145111,7 +145236,7 @@ keys: keys$2,
145111
145236
  function register(r) {
145112
145237
  callbacks$1.forEach((callback) => callback(r));
145113
145238
  }
145114
- // version: 1.409.0-19a3d9bdf5
145239
+ // version: 1.410.1-f2ce00a20c
145115
145240
 
145116
145241
  /**
145117
145242
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -146448,4 +146573,4 @@ keys: keys$2,
146448
146573
  exports.subscribeToAdapter = subscribeToAdapter;
146449
146574
 
146450
146575
  }));
146451
- // version: 1.409.0-19a3d9bdf5
146576
+ // version: 1.410.1-f2ce00a20c
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-worker-api",
3
- "version": "1.409.0",
3
+ "version": "1.410.1",
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.409.0",
39
- "@salesforce/lds-adapters-uiapi": "^1.409.0",
40
- "@salesforce/lds-default-luvio": "^1.409.0",
41
- "@salesforce/lds-drafts": "^1.409.0",
42
- "@salesforce/lds-graphql-parser": "^1.409.0",
43
- "@salesforce/lds-luvio-engine": "^1.409.0",
44
- "@salesforce/lds-runtime-mobile": "^1.409.0",
45
- "@salesforce/nimbus-plugin-lds": "^1.409.0",
38
+ "@salesforce/lds-adapters-graphql": "^1.410.1",
39
+ "@salesforce/lds-adapters-uiapi": "^1.410.1",
40
+ "@salesforce/lds-default-luvio": "^1.410.1",
41
+ "@salesforce/lds-drafts": "^1.410.1",
42
+ "@salesforce/lds-graphql-parser": "^1.410.1",
43
+ "@salesforce/lds-luvio-engine": "^1.410.1",
44
+ "@salesforce/lds-runtime-mobile": "^1.410.1",
45
+ "@salesforce/nimbus-plugin-lds": "^1.410.1",
46
46
  "ajv": "^8.11.0",
47
47
  "glob": "^7.1.5",
48
48
  "nimbus-types": "^2.0.0-alpha1",