@salesforce/lds-runtime-bridge 1.266.0-dev19 → 1.266.0-dev20
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.
- package/dist/ldsRuntimeBridge.js +20 -8
- package/package.json +8 -8
package/dist/ldsRuntimeBridge.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* *******************************************************************************************
|
|
13
13
|
*/
|
|
14
14
|
import { setDefaultLuvio } from 'force/ldsEngine';
|
|
15
|
-
import { StoreKeySet, serializeStructuredKey, StringKeyInMemoryStore, Reader, deepFreeze, emitAdapterEvent, InMemoryStore, Environment, Luvio } from 'force/luvioEngine';
|
|
15
|
+
import { setBypassDeepFreeze, StoreKeySet, serializeStructuredKey, StringKeyInMemoryStore, Reader, deepFreeze, emitAdapterEvent, InMemoryStore, Environment, Luvio } from 'force/luvioEngine';
|
|
16
16
|
import { instrumentLuvio } from 'force/ldsInstrumentation';
|
|
17
17
|
import { isStoreKeyRecordViewEntity, RECORD_ID_PREFIX, RECORD_FIELDS_KEY_JUNCTION, getRecordId18, extractRecordIdFromStoreKey, RECORD_VIEW_ENTITY_ID_PREFIX, keyBuilderRecord } from 'force/ldsAdaptersUiapi';
|
|
18
18
|
import '@salesforce/gate/lds.idempotencyWriteDisabled';
|
|
@@ -529,7 +529,9 @@ function isUnfulfilledSnapshot(cachedSnapshotResult) {
|
|
|
529
529
|
* @param durableStore A DurableStore implementation
|
|
530
530
|
* @param instrumentation An instrumentation function implementation
|
|
531
531
|
*/
|
|
532
|
-
function makeDurable(environment, { durableStore, instrumentation, useRevivingStore, enableDurableMetadataRefresh = false, }) {
|
|
532
|
+
function makeDurable(environment, { durableStore, instrumentation, useRevivingStore, enableDurableMetadataRefresh = false, disableDeepFreeze = false, }) {
|
|
533
|
+
// runtimes can choose to disable deepFreeze, e.g. headless mobile runtime
|
|
534
|
+
setBypassDeepFreeze(disableDeepFreeze);
|
|
533
535
|
let stagingStore = null;
|
|
534
536
|
const durableTTLStore = new DurableTTLStore(durableStore);
|
|
535
537
|
const mergeKeysPromiseMap = new Map();
|
|
@@ -2536,6 +2538,9 @@ function createSinglePredicate(val, operator, field, alias) {
|
|
|
2536
2538
|
else if (field.apiName === 'weakEtag') {
|
|
2537
2539
|
leftPath = '$.weakEtag';
|
|
2538
2540
|
}
|
|
2541
|
+
else if (field.apiName === 'RecordTypeId') {
|
|
2542
|
+
leftPath = '$.recordTypeId';
|
|
2543
|
+
}
|
|
2539
2544
|
return {
|
|
2540
2545
|
alias,
|
|
2541
2546
|
leftPath,
|
|
@@ -3677,6 +3682,9 @@ function normalizeRecordFields(key, entry) {
|
|
|
3677
3682
|
* Transforms a record for storage in the durable store. The transformation involves denormalizing
|
|
3678
3683
|
* scalar fields and persisting link metadata to transform back into a normalized representation
|
|
3679
3684
|
*
|
|
3685
|
+
* If the record contains pending fields this will return undefined as pending records do not get persisted
|
|
3686
|
+
* to the durable store. There should be a refresh operation outbound that will bring in the updated record.
|
|
3687
|
+
*
|
|
3680
3688
|
* @param normalizedRecord Record containing normalized field links
|
|
3681
3689
|
* @param recordStore a store containing referenced record fields
|
|
3682
3690
|
*/
|
|
@@ -3691,7 +3699,9 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
|
|
|
3691
3699
|
// pending fields get filtered out of the durable store
|
|
3692
3700
|
const { pending } = field;
|
|
3693
3701
|
if (pending === true) {
|
|
3694
|
-
|
|
3702
|
+
// do not write records with pending fields to the durable store
|
|
3703
|
+
// there should be a refresh operation outbound that will bring in the updated record
|
|
3704
|
+
return undefined;
|
|
3695
3705
|
}
|
|
3696
3706
|
const { __ref } = field;
|
|
3697
3707
|
if (__ref !== undefined) {
|
|
@@ -3857,10 +3867,12 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
3857
3867
|
};
|
|
3858
3868
|
}
|
|
3859
3869
|
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries, store);
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3870
|
+
if (denormalizedRecord !== undefined) {
|
|
3871
|
+
putEntries[recordKey] = {
|
|
3872
|
+
data: denormalizedRecord,
|
|
3873
|
+
metadata,
|
|
3874
|
+
};
|
|
3875
|
+
}
|
|
3864
3876
|
}
|
|
3865
3877
|
else {
|
|
3866
3878
|
putEntries[key] = value;
|
|
@@ -4003,4 +4015,4 @@ function ldsRuntimeBridge() {
|
|
|
4003
4015
|
}
|
|
4004
4016
|
|
|
4005
4017
|
export { ldsRuntimeBridge as default };
|
|
4006
|
-
// version: 1.266.0-
|
|
4018
|
+
// version: 1.266.0-dev20-117d849b4
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-bridge",
|
|
3
|
-
"version": "1.266.0-
|
|
3
|
+
"version": "1.266.0-dev20",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for bridge.app.",
|
|
6
6
|
"main": "dist/ldsRuntimeBridge.js",
|
|
@@ -34,17 +34,17 @@
|
|
|
34
34
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-bridge"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@salesforce/lds-adapters-uiapi": "^1.266.0-
|
|
38
|
-
"@salesforce/lds-instrumentation": "^1.266.0-
|
|
37
|
+
"@salesforce/lds-adapters-uiapi": "^1.266.0-dev20",
|
|
38
|
+
"@salesforce/lds-instrumentation": "^1.266.0-dev20",
|
|
39
39
|
"@salesforce/user": "0.0.21",
|
|
40
40
|
"o11y": "244.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@salesforce/lds-drafts-adapters-uiapi": "^1.266.0-
|
|
44
|
-
"@salesforce/lds-network-aura": "^1.266.0-
|
|
45
|
-
"@salesforce/lds-runtime-aura": "^1.266.0-
|
|
46
|
-
"@salesforce/lds-store-nimbus": "^1.266.0-
|
|
47
|
-
"@salesforce/nimbus-plugin-lds": "^1.266.0-
|
|
43
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.266.0-dev20",
|
|
44
|
+
"@salesforce/lds-network-aura": "^1.266.0-dev20",
|
|
45
|
+
"@salesforce/lds-runtime-aura": "^1.266.0-dev20",
|
|
46
|
+
"@salesforce/lds-store-nimbus": "^1.266.0-dev20",
|
|
47
|
+
"@salesforce/nimbus-plugin-lds": "^1.266.0-dev20",
|
|
48
48
|
"babel-plugin-dynamic-import-node": "^2.3.3"
|
|
49
49
|
},
|
|
50
50
|
"luvioBundlesize": [
|