@salesforce/lds-runtime-bridge 1.287.1 → 1.289.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.
- package/dist/ldsRuntimeBridge.js +18 -16
- package/package.json +8 -8
package/dist/ldsRuntimeBridge.js
CHANGED
|
@@ -700,7 +700,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
700
700
|
// because we do not want some other code attempting to use the
|
|
701
701
|
// in-memory values before the durable store onChanged handler
|
|
702
702
|
// calls back and revives the values to in-memory
|
|
703
|
-
environment.
|
|
703
|
+
environment.storeDealloc(key);
|
|
704
704
|
};
|
|
705
705
|
const publishStoreMetadata = function (recordId, storeMetadata) {
|
|
706
706
|
validateNotDisposed();
|
|
@@ -3725,6 +3725,9 @@ function buildBaseSchema() {
|
|
|
3725
3725
|
|
|
3726
3726
|
const { keys, values, create, assign, freeze } = Object;
|
|
3727
3727
|
|
|
3728
|
+
function createLink(key) {
|
|
3729
|
+
return { __ref: key };
|
|
3730
|
+
}
|
|
3728
3731
|
/**
|
|
3729
3732
|
* Records are stored in the durable store with scalar fields denormalized. This function takes that denoramlized
|
|
3730
3733
|
* durable store record representation and normalizes it back out into the format the the luvio store expects it
|
|
@@ -3735,26 +3738,25 @@ const { keys, values, create, assign, freeze } = Object;
|
|
|
3735
3738
|
function normalizeRecordFields(key, entry) {
|
|
3736
3739
|
const { data: record } = entry;
|
|
3737
3740
|
const { fields, links } = record;
|
|
3738
|
-
const
|
|
3741
|
+
const missingFieldLinks = keys(links);
|
|
3742
|
+
const fieldNames = keys(fields);
|
|
3739
3743
|
const normalizedFields = {};
|
|
3740
3744
|
const returnEntries = {};
|
|
3741
|
-
|
|
3742
|
-
|
|
3745
|
+
// restore fields
|
|
3746
|
+
for (let i = 0, len = fieldNames.length; i < len; i++) {
|
|
3747
|
+
const fieldName = fieldNames[i];
|
|
3743
3748
|
const field = fields[fieldName];
|
|
3749
|
+
const fieldKey = buildRecordFieldStoreKey(key, fieldName);
|
|
3750
|
+
returnEntries[fieldKey] = { data: field };
|
|
3751
|
+
normalizedFields[fieldName] = createLink(fieldKey);
|
|
3752
|
+
}
|
|
3753
|
+
// restore missing fields
|
|
3754
|
+
for (let i = 0, len = missingFieldLinks.length; i < len; i++) {
|
|
3755
|
+
const fieldName = missingFieldLinks[i];
|
|
3744
3756
|
const link = links[fieldName];
|
|
3745
|
-
// field is undefined for missing links
|
|
3746
|
-
if (field !== undefined) {
|
|
3747
|
-
const fieldKey = buildRecordFieldStoreKey(key, fieldName);
|
|
3748
|
-
returnEntries[fieldKey] = { data: field };
|
|
3749
|
-
}
|
|
3750
|
-
// we need to restore the undefined __ref node as it is
|
|
3751
|
-
// lost during serialization
|
|
3752
3757
|
if (link.isMissing === true) {
|
|
3753
3758
|
normalizedFields[fieldName] = { ...link, __ref: undefined };
|
|
3754
3759
|
}
|
|
3755
|
-
else {
|
|
3756
|
-
normalizedFields[fieldName] = link;
|
|
3757
|
-
}
|
|
3758
3760
|
}
|
|
3759
3761
|
returnEntries[key] = {
|
|
3760
3762
|
data: assign(record, { fields: normalizedFields }),
|
|
@@ -3816,7 +3818,7 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
|
|
|
3816
3818
|
}
|
|
3817
3819
|
}
|
|
3818
3820
|
// we want to preserve fields that are missing nodes
|
|
3819
|
-
if (
|
|
3821
|
+
if (field.isMissing === true) {
|
|
3820
3822
|
links[fieldName] = field;
|
|
3821
3823
|
}
|
|
3822
3824
|
}
|
|
@@ -4099,4 +4101,4 @@ function ldsRuntimeBridge() {
|
|
|
4099
4101
|
}
|
|
4100
4102
|
|
|
4101
4103
|
export { ldsRuntimeBridge as default };
|
|
4102
|
-
// version: 1.
|
|
4104
|
+
// version: 1.289.0-5ba45a0a4
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.289.0",
|
|
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.
|
|
38
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
37
|
+
"@salesforce/lds-adapters-uiapi": "^1.289.0",
|
|
38
|
+
"@salesforce/lds-instrumentation": "^1.289.0",
|
|
39
39
|
"@salesforce/user": "0.0.21",
|
|
40
40
|
"o11y": "250.7.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@salesforce/lds-drafts-adapters-uiapi": "^1.
|
|
44
|
-
"@salesforce/lds-network-aura": "^1.
|
|
45
|
-
"@salesforce/lds-runtime-aura": "^1.
|
|
46
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
47
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
43
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.289.0",
|
|
44
|
+
"@salesforce/lds-network-aura": "^1.289.0",
|
|
45
|
+
"@salesforce/lds-runtime-aura": "^1.289.0",
|
|
46
|
+
"@salesforce/lds-store-nimbus": "^1.289.0",
|
|
47
|
+
"@salesforce/nimbus-plugin-lds": "^1.289.0",
|
|
48
48
|
"babel-plugin-dynamic-import-node": "^2.3.3"
|
|
49
49
|
},
|
|
50
50
|
"luvioBundlesize": [
|