@salesforce/lds-runtime-bridge 1.266.0-dev5 → 1.266.0-dev7
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 +26 -5
- package/package.json +8 -8
package/dist/ldsRuntimeBridge.js
CHANGED
|
@@ -900,6 +900,10 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
900
900
|
}
|
|
901
901
|
return {};
|
|
902
902
|
};
|
|
903
|
+
const getIngestStagingStore = function () {
|
|
904
|
+
validateNotDisposed();
|
|
905
|
+
return stagingStore === null || stagingStore === void 0 ? void 0 : stagingStore.fallbackStringKeyInMemoryStore;
|
|
906
|
+
};
|
|
903
907
|
const handleSuccessResponse = async function (ingestAndBroadcastFunc, getResponseCacheKeysFunc) {
|
|
904
908
|
validateNotDisposed();
|
|
905
909
|
const cacheKeyMap = getResponseCacheKeysFunc();
|
|
@@ -1092,6 +1096,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1092
1096
|
applyCachePolicy: { value: applyCachePolicy },
|
|
1093
1097
|
getIngestStagingStoreRecords: { value: getIngestStagingStoreRecords },
|
|
1094
1098
|
getIngestStagingStoreMetadata: { value: getIngestStagingStoreMetadata },
|
|
1099
|
+
getIngestStagingStore: { value: getIngestStagingStore },
|
|
1095
1100
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
1096
1101
|
handleErrorResponse: { value: handleErrorResponse },
|
|
1097
1102
|
getNotifyChangeStoreEntries: { value: getNotifyChangeStoreEntries },
|
|
@@ -3656,7 +3661,7 @@ function normalizeRecordFields(key, entry) {
|
|
|
3656
3661
|
* @param normalizedRecord Record containing normalized field links
|
|
3657
3662
|
* @param recordStore a store containing referenced record fields
|
|
3658
3663
|
*/
|
|
3659
|
-
function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntries) {
|
|
3664
|
+
function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntries, store) {
|
|
3660
3665
|
const fields = normalizedRecord.fields;
|
|
3661
3666
|
const filteredFields = {};
|
|
3662
3667
|
const links = {};
|
|
@@ -3683,6 +3688,19 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
|
|
|
3683
3688
|
if (ref !== undefined) {
|
|
3684
3689
|
filteredFields[fieldName] = ref;
|
|
3685
3690
|
}
|
|
3691
|
+
else {
|
|
3692
|
+
// if we have a store to read, try to find the field there too
|
|
3693
|
+
// The durable ingest staging store may pass through to L1, and
|
|
3694
|
+
// not all fields are necessarily published every time, so it is
|
|
3695
|
+
// important to check L1 and not just the fields being published,
|
|
3696
|
+
// otherwise we risk truncating the fields on the record.
|
|
3697
|
+
if (store) {
|
|
3698
|
+
ref = store.readEntry(__ref);
|
|
3699
|
+
if (ref !== undefined) {
|
|
3700
|
+
filteredFields[fieldName] = ref;
|
|
3701
|
+
}
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3686
3704
|
}
|
|
3687
3705
|
// we want to preserve fields that are missing nodes
|
|
3688
3706
|
if (filteredFields[fieldName] !== undefined || field.isMissing === true) {
|
|
@@ -3704,7 +3722,7 @@ function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
|
3704
3722
|
}
|
|
3705
3723
|
return keyBuilderRecord(luvio, { recordId });
|
|
3706
3724
|
}
|
|
3707
|
-
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata) {
|
|
3725
|
+
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore) {
|
|
3708
3726
|
const getEntries = function (entries, segment) {
|
|
3709
3727
|
// this HOF only inspects records in the default segment
|
|
3710
3728
|
if (segment !== DefaultDurableSegment) {
|
|
@@ -3772,6 +3790,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
3772
3790
|
const putRecordViews = {};
|
|
3773
3791
|
const storeRecords = getStoreRecords !== undefined ? getStoreRecords() : {};
|
|
3774
3792
|
const storeMetadata = getStoreMetadata !== undefined ? getStoreMetadata() : {};
|
|
3793
|
+
const store = getStore();
|
|
3775
3794
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
3776
3795
|
const key = keys$1[i];
|
|
3777
3796
|
let value = entries[key];
|
|
@@ -3818,7 +3837,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
3818
3837
|
metadataVersion: DURABLE_METADATA_VERSION,
|
|
3819
3838
|
};
|
|
3820
3839
|
}
|
|
3821
|
-
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries);
|
|
3840
|
+
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries, store);
|
|
3822
3841
|
putEntries[recordKey] = {
|
|
3823
3842
|
data: denormalizedRecord,
|
|
3824
3843
|
metadata,
|
|
@@ -3911,6 +3930,7 @@ new CachedGraphQLSchema();
|
|
|
3911
3930
|
let luvio;
|
|
3912
3931
|
let getIngestRecords;
|
|
3913
3932
|
let getIngestMetadata;
|
|
3933
|
+
let getIngestStore;
|
|
3914
3934
|
// LdsSqliteStore plugin helper
|
|
3915
3935
|
function getNimbusDurableStore() {
|
|
3916
3936
|
const resolvedPlugin = __nimbus.plugins.LdsSqliteStore;
|
|
@@ -3922,7 +3942,7 @@ function getNimbusDurableStore() {
|
|
|
3922
3942
|
* See TD-0153300 for moving RecordDenormalizingDurableStore out of lds-drafts
|
|
3923
3943
|
*/
|
|
3924
3944
|
function createRecordDenormingStore(luvio, durableStore) {
|
|
3925
|
-
const recordDenormingStore = makeRecordDenormalizingDurableStore(luvio, durableStore, () => getIngestRecords(), () => getIngestMetadata());
|
|
3945
|
+
const recordDenormingStore = makeRecordDenormalizingDurableStore(luvio, durableStore, () => getIngestRecords(), () => getIngestMetadata(), () => getIngestStore());
|
|
3926
3946
|
return recordDenormingStore;
|
|
3927
3947
|
}
|
|
3928
3948
|
function getRuntime() {
|
|
@@ -3938,6 +3958,7 @@ function getRuntime() {
|
|
|
3938
3958
|
// Set ingest records/metadata properties from durable environment
|
|
3939
3959
|
getIngestRecords = durableEnv.getIngestStagingStoreRecords;
|
|
3940
3960
|
getIngestMetadata = durableEnv.getIngestStagingStoreMetadata;
|
|
3961
|
+
getIngestStore = durableEnv.getIngestStagingStore;
|
|
3941
3962
|
// Return new luvio instance
|
|
3942
3963
|
luvio = new Luvio(durableEnv, {
|
|
3943
3964
|
instrument: instrumentLuvio,
|
|
@@ -3963,4 +3984,4 @@ function ldsRuntimeBridge() {
|
|
|
3963
3984
|
}
|
|
3964
3985
|
|
|
3965
3986
|
export { ldsRuntimeBridge as default };
|
|
3966
|
-
// version: 1.266.0-
|
|
3987
|
+
// version: 1.266.0-dev7-c30e261b4
|
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-dev7",
|
|
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-dev7",
|
|
38
|
+
"@salesforce/lds-instrumentation": "^1.266.0-dev7",
|
|
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-dev7",
|
|
44
|
+
"@salesforce/lds-network-aura": "^1.266.0-dev7",
|
|
45
|
+
"@salesforce/lds-runtime-aura": "^1.266.0-dev7",
|
|
46
|
+
"@salesforce/lds-store-nimbus": "^1.266.0-dev7",
|
|
47
|
+
"@salesforce/nimbus-plugin-lds": "^1.266.0-dev7",
|
|
48
48
|
"babel-plugin-dynamic-import-node": "^2.3.3"
|
|
49
49
|
},
|
|
50
50
|
"luvioBundlesize": [
|