@salesforce/lds-runtime-aura 1.424.0 → 1.426.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.
@@ -40,7 +40,7 @@ import { instrument as instrument$5 } from '@lwc/state';
40
40
  import { withRegistration, register, setDefaultLuvio } from 'force/ldsEngine';
41
41
  import applyPredictionRequestLimit from '@salesforce/gate/lds.pdl.applyRequestLimit';
42
42
  import { pageScopedCache } from 'instrumentation/utility';
43
- import { createStorage, clearStorages, setDurableStorageImplementation } from 'force/ldsDurableStorage';
43
+ import { createStorage, clearStorages } from 'force/ldsDurableStorage';
44
44
  import lightningConnectEnabled from '@salesforce/gate/ui.services.LightningConnect.enabled';
45
45
  import bypassAppRestrictionEnabled from '@salesforce/gate/ui.services.LightningConnect.BypassAppRestriction.enabled';
46
46
  import csrfValidationEnabled from '@salesforce/gate/ui.services.LightningConnect.CsrfValidation.enabled';
@@ -49,7 +49,6 @@ import useHttpUiapiOneApp from '@salesforce/gate/lds.useHttpUiapiOneApp';
49
49
  import useHttpUiapiOneRuntime from '@salesforce/gate/lds.useHttpUiapiOneRuntime';
50
50
  import disableCreateContentDocumentAndVersionHTTPLexRuntime from '@salesforce/gate/lds.lex.http.disableCreateContentDocumentAndVersion';
51
51
  import useHotspotLimit from '@salesforce/gate/lds.pdl.useHotspotLimit';
52
- import { createStorage as createStorage$1, clearStorages as clearStorages$1 } from 'force/ldsStorage';
53
52
 
54
53
  /*!
55
54
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -2706,7 +2705,7 @@ function buildServiceDescriptor$d(luvio) {
2706
2705
  },
2707
2706
  };
2708
2707
  }
2709
- // version: 1.424.0-3bccebbf90
2708
+ // version: 1.426.1-9fe18ee3ae
2710
2709
 
2711
2710
  /*!
2712
2711
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -3059,7 +3058,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
3059
3058
  },
3060
3059
  };
3061
3060
  }
3062
- // version: 1.424.0-3bccebbf90
3061
+ // version: 1.426.1-9fe18ee3ae
3063
3062
 
3064
3063
  /*!
3065
3064
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -5695,7 +5694,7 @@ function getEnvironmentSetting(name) {
5695
5694
  }
5696
5695
  return undefined;
5697
5696
  }
5698
- // version: 1.424.0-3bccebbf90
5697
+ // version: 1.426.1-9fe18ee3ae
5699
5698
 
5700
5699
  const environmentHasAura = typeof window !== 'undefined' && typeof window.$A !== 'undefined';
5701
5700
  const defaultConfig = {
@@ -9243,6 +9242,11 @@ function setDifference(setA, setB) {
9243
9242
  }
9244
9243
  return differenceSet;
9245
9244
  }
9245
+ function addAllToSet(targetSet, sourceSet) {
9246
+ for (const element of sourceSet) {
9247
+ targetSet.add(element);
9248
+ }
9249
+ }
9246
9250
  function resolvedPromiseLike(result) {
9247
9251
  if (isPromiseLike(result)) {
9248
9252
  return result.then((nextResult) => nextResult);
@@ -9543,15 +9547,18 @@ class DurableCacheInclusionPolicy extends CacheInclusionPolicyService {
9543
9547
  if (readResult.isOk()) {
9544
9548
  return readResult;
9545
9549
  }
9546
- const keysToRevive = recordableCache.keysRead;
9547
- if (alreadyRevivedKeys && setDifference(keysToRevive, alreadyRevivedKeys).size === 0) {
9550
+ const missingKeys = recordableCache.missingKeysRead;
9551
+ if (alreadyRevivedKeys && setDifference(missingKeys, alreadyRevivedKeys).size === 0) {
9548
9552
  return readResult;
9549
9553
  }
9550
- return this.revive(keysToRevive, l1).then((revivedKeys) => {
9551
- if (setDifference(keysToRevive, revivedKeys).size > 0) {
9554
+ return this.revive(missingKeys, l1).then((revivedKeys) => {
9555
+ const newlyRevived = alreadyRevivedKeys ? setDifference(revivedKeys, alreadyRevivedKeys) : revivedKeys;
9556
+ if (newlyRevived.size === 0) {
9552
9557
  return readResult;
9553
9558
  }
9554
- return this.read({ l1, readFromL1, alreadyRevivedKeys: revivedKeys });
9559
+ const allRevived = new Set(alreadyRevivedKeys ?? []);
9560
+ addAllToSet(allRevived, revivedKeys);
9561
+ return this.read({ l1, readFromL1, alreadyRevivedKeys: allRevived });
9555
9562
  });
9556
9563
  });
9557
9564
  }
@@ -10347,10 +10354,6 @@ function buildPredictorForContext(context) {
10347
10354
  };
10348
10355
  }
10349
10356
  function initializeLDS() {
10350
- setDurableStorageImplementation({
10351
- createStorage: createStorage$1,
10352
- clearStorages: clearStorages$1,
10353
- });
10354
10357
  const storeOptions = {
10355
10358
  scheduler: () => { },
10356
10359
  };
@@ -10477,4 +10480,4 @@ function ldsEngineCreator() {
10477
10480
  }
10478
10481
 
10479
10482
  export { LexRequestStrategy, PdlPrefetcherEventType, PdlRequestPriority, buildPredictorForContext, configService, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, subscribeToPrefetcherEvents, unregisterRequestStrategy, whenPredictionsReady };
10480
- // version: 1.424.0-51efddf2a4
10483
+ // version: 1.426.1-37e68ccef8
@@ -0,0 +1,5 @@
1
+ /// <reference types="jest" />
2
+ export declare const createStorage: jest.Mock<any, any, any>;
3
+ export declare const clearStorages: jest.Mock<any, any, any>;
4
+ export declare const setDurableStorageImplementation: jest.Mock<any, any, any>;
5
+ export declare const getDurableStorageImplementation: jest.Mock<any, any, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-aura",
3
- "version": "1.424.0",
3
+ "version": "1.426.1",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Aura runtime",
6
6
  "main": "dist/ldsEngineCreator.js",
@@ -34,51 +34,51 @@
34
34
  "release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-aura"
35
35
  },
36
36
  "devDependencies": {
37
- "@conduit-client/service-provisioner": "3.16.0",
38
- "@conduit-client/tools-core": "3.16.0",
39
- "@salesforce/lds-adapters-apex": "^1.424.0",
40
- "@salesforce/lds-adapters-uiapi": "^1.424.0",
41
- "@salesforce/lds-ads-bridge": "^1.424.0",
42
- "@salesforce/lds-aura-storage": "^1.424.0",
43
- "@salesforce/lds-bindings": "^1.424.0",
44
- "@salesforce/lds-instrumentation": "^1.424.0",
45
- "@salesforce/lds-network-aura": "^1.424.0",
46
- "@salesforce/lds-network-fetch": "^1.424.0",
37
+ "@conduit-client/service-provisioner": "3.17.3",
38
+ "@conduit-client/tools-core": "3.17.3",
39
+ "@salesforce/lds-adapters-apex": "^1.426.1",
40
+ "@salesforce/lds-adapters-uiapi": "^1.426.1",
41
+ "@salesforce/lds-ads-bridge": "^1.426.1",
42
+ "@salesforce/lds-aura-storage": "^1.426.1",
43
+ "@salesforce/lds-bindings": "^1.426.1",
44
+ "@salesforce/lds-instrumentation": "^1.426.1",
45
+ "@salesforce/lds-network-aura": "^1.426.1",
46
+ "@salesforce/lds-network-fetch": "^1.426.1",
47
47
  "jwt-encode": "1.0.1"
48
48
  },
49
49
  "dependencies": {
50
- "@conduit-client/command-aura-graphql-normalized-cache-control": "3.16.0",
51
- "@conduit-client/command-aura-network": "3.16.0",
52
- "@conduit-client/command-aura-normalized-cache-control": "3.16.0",
53
- "@conduit-client/command-aura-resource-cache-control": "3.16.0",
54
- "@conduit-client/command-fetch-network": "3.16.0",
55
- "@conduit-client/command-http-graphql-normalized-cache-control": "3.16.0",
56
- "@conduit-client/command-http-normalized-cache-control": "3.16.0",
57
- "@conduit-client/command-ndjson": "3.16.0",
58
- "@conduit-client/command-network": "3.16.0",
59
- "@conduit-client/command-sse": "3.16.0",
60
- "@conduit-client/command-streaming": "3.16.0",
61
- "@conduit-client/service-aura-network": "3.16.0",
62
- "@conduit-client/service-bindings-imperative": "3.16.0",
63
- "@conduit-client/service-bindings-lwc": "3.16.0",
64
- "@conduit-client/service-cache": "3.16.0",
65
- "@conduit-client/service-cache-control": "3.16.0",
66
- "@conduit-client/service-cache-inclusion-policy": "3.16.0",
67
- "@conduit-client/service-config": "3.16.0",
68
- "@conduit-client/service-feature-flags": "3.16.0",
69
- "@conduit-client/service-fetch-network": "3.16.0",
70
- "@conduit-client/service-instrument-command": "3.16.0",
71
- "@conduit-client/service-pubsub": "3.16.0",
72
- "@conduit-client/service-store": "3.16.0",
73
- "@conduit-client/utils": "3.16.0",
50
+ "@conduit-client/command-aura-graphql-normalized-cache-control": "3.17.3",
51
+ "@conduit-client/command-aura-network": "3.17.3",
52
+ "@conduit-client/command-aura-normalized-cache-control": "3.17.3",
53
+ "@conduit-client/command-aura-resource-cache-control": "3.17.3",
54
+ "@conduit-client/command-fetch-network": "3.17.3",
55
+ "@conduit-client/command-http-graphql-normalized-cache-control": "3.17.3",
56
+ "@conduit-client/command-http-normalized-cache-control": "3.17.3",
57
+ "@conduit-client/command-ndjson": "3.17.3",
58
+ "@conduit-client/command-network": "3.17.3",
59
+ "@conduit-client/command-sse": "3.17.3",
60
+ "@conduit-client/command-streaming": "3.17.3",
61
+ "@conduit-client/service-aura-network": "3.17.3",
62
+ "@conduit-client/service-bindings-imperative": "3.17.3",
63
+ "@conduit-client/service-bindings-lwc": "3.17.3",
64
+ "@conduit-client/service-cache": "3.17.3",
65
+ "@conduit-client/service-cache-control": "3.17.3",
66
+ "@conduit-client/service-cache-inclusion-policy": "3.17.3",
67
+ "@conduit-client/service-config": "3.17.3",
68
+ "@conduit-client/service-feature-flags": "3.17.3",
69
+ "@conduit-client/service-fetch-network": "3.17.3",
70
+ "@conduit-client/service-instrument-command": "3.17.3",
71
+ "@conduit-client/service-pubsub": "3.17.3",
72
+ "@conduit-client/service-store": "3.17.3",
73
+ "@conduit-client/utils": "3.17.3",
74
74
  "@luvio/network-adapter-composable": "0.160.3",
75
75
  "@luvio/network-adapter-fetch": "0.160.3",
76
76
  "@lwc/state": "^0.29.0",
77
- "@salesforce/lds-adapters-onestore-graphql": "^1.424.0",
77
+ "@salesforce/lds-adapters-onestore-graphql": "^1.426.1",
78
78
  "@salesforce/lds-adapters-uiapi-lex": "^1.415.0",
79
- "@salesforce/lds-durable-storage": "^1.424.0",
80
- "@salesforce/lds-luvio-service": "^1.424.0",
81
- "@salesforce/lds-luvio-uiapi-records-service": "^1.424.0"
79
+ "@salesforce/lds-durable-storage": "^1.426.1",
80
+ "@salesforce/lds-luvio-service": "^1.426.1",
81
+ "@salesforce/lds-luvio-uiapi-records-service": "^1.426.1"
82
82
  },
83
83
  "luvioBundlesize": [
84
84
  {
@@ -1,6 +0,0 @@
1
- export declare function clearStorages(): Promise<void>;
2
- export declare function createStorage(): {
3
- getAll: jest.Mock<any, any, any>;
4
- get: jest.Mock<any, any, any>;
5
- set: jest.Mock<any, any, any>;
6
- };