@salesforce/lds-runtime-mobile 1.271.0 → 1.273.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/main.js +51 -9
- package/package.json +16 -16
- package/sfdc/main.js +51 -9
package/dist/main.js
CHANGED
|
@@ -786,7 +786,7 @@ class DurableTTLStore {
|
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
788
|
|
|
789
|
-
function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, additionalDurableStoreOperations = [], enableDurableMetadataRefresh = false) {
|
|
789
|
+
function flushInMemoryStoreValuesToDurableStore(store, durableStore, crossEnvironmentNotifier, durableStoreErrorHandler, redirects, additionalDurableStoreOperations = [], enableDurableMetadataRefresh = false) {
|
|
790
790
|
const durableRecords = create$6(null);
|
|
791
791
|
const refreshedDurableRecords = create$6(null);
|
|
792
792
|
const evictedRecords = create$6(null);
|
|
@@ -833,6 +833,14 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
|
|
|
833
833
|
entries: refreshedDurableRecords,
|
|
834
834
|
segment: DefaultDurableSegment,
|
|
835
835
|
});
|
|
836
|
+
if (crossEnvironmentNotifier !== undefined) {
|
|
837
|
+
crossEnvironmentNotifier.notifyCrossEnvironments({
|
|
838
|
+
data: {
|
|
839
|
+
refreshedDurableRecords,
|
|
840
|
+
},
|
|
841
|
+
type: 'Update',
|
|
842
|
+
});
|
|
843
|
+
}
|
|
836
844
|
}
|
|
837
845
|
// redirects
|
|
838
846
|
redirects.forEach((value, key) => {
|
|
@@ -1164,6 +1172,15 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1164
1172
|
}
|
|
1165
1173
|
}
|
|
1166
1174
|
});
|
|
1175
|
+
let notifier;
|
|
1176
|
+
const getCrossEnvironmentNotifier = function () {
|
|
1177
|
+
validateNotDisposed();
|
|
1178
|
+
return notifier;
|
|
1179
|
+
};
|
|
1180
|
+
const setCrossEnvironmentNotifier = function (crossEnvironmentNotifier) {
|
|
1181
|
+
validateNotDisposed();
|
|
1182
|
+
notifier = crossEnvironmentNotifier;
|
|
1183
|
+
};
|
|
1167
1184
|
const dispose = function () {
|
|
1168
1185
|
validateNotDisposed();
|
|
1169
1186
|
disposed = true;
|
|
@@ -1216,7 +1233,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1216
1233
|
if (stagingStore === null) {
|
|
1217
1234
|
return Promise.resolve();
|
|
1218
1235
|
}
|
|
1219
|
-
const promise = flushInMemoryStoreValuesToDurableStore(stagingStore, durableStore, durableStoreErrorHandler, new Map(pendingStoreRedirects), additionalDurableStoreOperations, enableDurableMetadataRefresh);
|
|
1236
|
+
const promise = flushInMemoryStoreValuesToDurableStore(stagingStore, durableStore, getCrossEnvironmentNotifier(), durableStoreErrorHandler, new Map(pendingStoreRedirects), additionalDurableStoreOperations, enableDurableMetadataRefresh);
|
|
1220
1237
|
pendingStoreRedirects.clear();
|
|
1221
1238
|
stagingStore = null;
|
|
1222
1239
|
return promise;
|
|
@@ -1385,6 +1402,10 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1385
1402
|
}
|
|
1386
1403
|
return {};
|
|
1387
1404
|
};
|
|
1405
|
+
const getIngestStagingStore = function () {
|
|
1406
|
+
validateNotDisposed();
|
|
1407
|
+
return stagingStore === null || stagingStore === void 0 ? void 0 : stagingStore.fallbackStringKeyInMemoryStore;
|
|
1408
|
+
};
|
|
1388
1409
|
const handleSuccessResponse = async function (ingestAndBroadcastFunc, getResponseCacheKeysFunc) {
|
|
1389
1410
|
validateNotDisposed();
|
|
1390
1411
|
const cacheKeyMap = getResponseCacheKeysFunc();
|
|
@@ -1577,10 +1598,13 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1577
1598
|
applyCachePolicy: { value: applyCachePolicy },
|
|
1578
1599
|
getIngestStagingStoreRecords: { value: getIngestStagingStoreRecords },
|
|
1579
1600
|
getIngestStagingStoreMetadata: { value: getIngestStagingStoreMetadata },
|
|
1601
|
+
getIngestStagingStore: { value: getIngestStagingStore },
|
|
1580
1602
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
1581
1603
|
handleErrorResponse: { value: handleErrorResponse },
|
|
1582
1604
|
getNotifyChangeStoreEntries: { value: getNotifyChangeStoreEntries },
|
|
1583
1605
|
notifyStoreUpdateAvailable: { value: notifyStoreUpdateAvailable },
|
|
1606
|
+
getCrossEnvironmentNotifier: { value: getCrossEnvironmentNotifier },
|
|
1607
|
+
setCrossEnvironmentNotifier: { value: setCrossEnvironmentNotifier },
|
|
1584
1608
|
});
|
|
1585
1609
|
}
|
|
1586
1610
|
|
|
@@ -11650,7 +11674,7 @@ function createUserJsonOutput(selection, jsonInput, jsonOutput) {
|
|
|
11650
11674
|
function createjsonOutput(selections, jsonInput, jsonOutput) {
|
|
11651
11675
|
const keys$1 = keys$4(jsonInput);
|
|
11652
11676
|
selections.filter(isFieldNode).forEach((subSelection) => {
|
|
11653
|
-
const fieldName = subSelection.name.value;
|
|
11677
|
+
const fieldName = subSelection.alias ? subSelection.alias.value : subSelection.name.value;
|
|
11654
11678
|
if (keys$1.includes(fieldName)) {
|
|
11655
11679
|
if (isArray$2(jsonInput[fieldName])) {
|
|
11656
11680
|
jsonOutput[fieldName] = [];
|
|
@@ -12966,7 +12990,7 @@ function normalizeRecordFields(key, entry) {
|
|
|
12966
12990
|
* @param normalizedRecord Record containing normalized field links
|
|
12967
12991
|
* @param recordStore a store containing referenced record fields
|
|
12968
12992
|
*/
|
|
12969
|
-
function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntries) {
|
|
12993
|
+
function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntries, store) {
|
|
12970
12994
|
const fields = normalizedRecord.fields;
|
|
12971
12995
|
const filteredFields = {};
|
|
12972
12996
|
const links = {};
|
|
@@ -12993,6 +13017,19 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
|
|
|
12993
13017
|
if (ref !== undefined) {
|
|
12994
13018
|
filteredFields[fieldName] = ref;
|
|
12995
13019
|
}
|
|
13020
|
+
else {
|
|
13021
|
+
// if we have a store to read, try to find the field there too
|
|
13022
|
+
// The durable ingest staging store may pass through to L1, and
|
|
13023
|
+
// not all fields are necessarily published every time, so it is
|
|
13024
|
+
// important to check L1 and not just the fields being published,
|
|
13025
|
+
// otherwise we risk truncating the fields on the record.
|
|
13026
|
+
if (store) {
|
|
13027
|
+
ref = store.readEntry(__ref);
|
|
13028
|
+
if (ref !== undefined) {
|
|
13029
|
+
filteredFields[fieldName] = ref;
|
|
13030
|
+
}
|
|
13031
|
+
}
|
|
13032
|
+
}
|
|
12996
13033
|
}
|
|
12997
13034
|
// we want to preserve fields that are missing nodes
|
|
12998
13035
|
if (filteredFields[fieldName] !== undefined || field.isMissing === true) {
|
|
@@ -13014,7 +13051,7 @@ function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
|
13014
13051
|
}
|
|
13015
13052
|
return keyBuilderRecord(luvio, { recordId });
|
|
13016
13053
|
}
|
|
13017
|
-
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata) {
|
|
13054
|
+
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore) {
|
|
13018
13055
|
const getEntries = function (entries, segment) {
|
|
13019
13056
|
// this HOF only inspects records in the default segment
|
|
13020
13057
|
if (segment !== DefaultDurableSegment) {
|
|
@@ -13082,6 +13119,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13082
13119
|
const putRecordViews = {};
|
|
13083
13120
|
const storeRecords = getStoreRecords !== undefined ? getStoreRecords() : {};
|
|
13084
13121
|
const storeMetadata = getStoreMetadata !== undefined ? getStoreMetadata() : {};
|
|
13122
|
+
const store = getStore();
|
|
13085
13123
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
13086
13124
|
const key = keys$1[i];
|
|
13087
13125
|
let value = entries[key];
|
|
@@ -13128,7 +13166,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13128
13166
|
metadataVersion: DURABLE_METADATA_VERSION,
|
|
13129
13167
|
};
|
|
13130
13168
|
}
|
|
13131
|
-
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries);
|
|
13169
|
+
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries, store);
|
|
13132
13170
|
putEntries[recordKey] = {
|
|
13133
13171
|
data: denormalizedRecord,
|
|
13134
13172
|
metadata,
|
|
@@ -17805,22 +17843,25 @@ function getRuntime() {
|
|
|
17805
17843
|
const internalAdapterStore = new InMemoryStore();
|
|
17806
17844
|
let getIngestRecordsForInternalAdapters;
|
|
17807
17845
|
let getIngestMetadataForInternalAdapters;
|
|
17846
|
+
let getIngestStoreInternal;
|
|
17808
17847
|
const internalAdapterDurableStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => getIngestRecordsForInternalAdapters !== undefined
|
|
17809
17848
|
? getIngestRecordsForInternalAdapters()
|
|
17810
17849
|
: {}, () => getIngestMetadataForInternalAdapters !== undefined
|
|
17811
17850
|
? getIngestMetadataForInternalAdapters()
|
|
17812
|
-
: {});
|
|
17851
|
+
: {}, () => (getIngestStoreInternal !== undefined ? getIngestStoreInternal() : undefined));
|
|
17813
17852
|
const { adapters: { getObjectInfo, getObjectInfos, getRecord, getObjectInfoDirectory }, durableEnvironment: internalAdapterDurableEnvironment, luvio: internalLuvio, } = buildInternalAdapters(internalAdapterStore, lazyNetworkAdapter, internalAdapterDurableStore, (apiName, objectInfo) => lazyObjectInfoService.ensureObjectInfoCached(apiName, objectInfo));
|
|
17814
17853
|
lazyInternalLuvio = internalLuvio;
|
|
17815
17854
|
getIngestRecordsForInternalAdapters =
|
|
17816
17855
|
internalAdapterDurableEnvironment.getIngestStagingStoreRecords;
|
|
17817
17856
|
getIngestMetadataForInternalAdapters =
|
|
17818
17857
|
internalAdapterDurableEnvironment.getIngestStagingStoreRecords;
|
|
17858
|
+
getIngestStoreInternal = internalAdapterDurableEnvironment.getIngestStagingStore;
|
|
17819
17859
|
lazyObjectInfoService = new ObjectInfoService(getObjectInfo, getObjectInfos, getObjectInfoDirectory, lazyBaseDurableStore);
|
|
17820
17860
|
// creates a durable store that denormalizes scalar fields for records
|
|
17821
17861
|
let getIngestRecords;
|
|
17822
17862
|
let getIngestMetadata;
|
|
17823
|
-
|
|
17863
|
+
let getIngestStore;
|
|
17864
|
+
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined));
|
|
17824
17865
|
const baseEnv = new Environment(store, lazyNetworkAdapter);
|
|
17825
17866
|
const gqlEnv = makeEnvironmentGraphqlAware(baseEnv);
|
|
17826
17867
|
const durableEnv = makeDurable(gqlEnv, {
|
|
@@ -17829,6 +17870,7 @@ function getRuntime() {
|
|
|
17829
17870
|
});
|
|
17830
17871
|
getIngestRecords = durableEnv.getIngestStagingStoreRecords;
|
|
17831
17872
|
getIngestMetadata = durableEnv.getIngestStagingStoreMetadata;
|
|
17873
|
+
getIngestStore = durableEnv.getIngestStagingStore;
|
|
17832
17874
|
// draft queue
|
|
17833
17875
|
lazyDraftQueue = buildLdsDraftQueue(recordDenormingStore);
|
|
17834
17876
|
const draftService = new UiApiDraftRecordService(lazyDraftQueue, () => lazyLuvio, recordDenormingStore, getObjectInfo, newRecordId, userId, formatDisplayValue);
|
|
@@ -17928,4 +17970,4 @@ register({
|
|
|
17928
17970
|
});
|
|
17929
17971
|
|
|
17930
17972
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17931
|
-
// version: 1.
|
|
17973
|
+
// version: 1.273.0-f97941e01
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.273.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS runtime for mobile/hybrid environments.",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,25 +32,25 @@
|
|
|
32
32
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-mobile"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
36
|
-
"@salesforce/lds-bindings": "^1.
|
|
37
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
38
|
-
"@salesforce/lds-priming": "^1.
|
|
35
|
+
"@salesforce/lds-adapters-uiapi": "^1.273.0",
|
|
36
|
+
"@salesforce/lds-bindings": "^1.273.0",
|
|
37
|
+
"@salesforce/lds-instrumentation": "^1.273.0",
|
|
38
|
+
"@salesforce/lds-priming": "^1.273.0",
|
|
39
39
|
"@salesforce/user": "0.0.21",
|
|
40
40
|
"o11y": "244.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@salesforce/lds-adapters-graphql": "^1.
|
|
44
|
-
"@salesforce/lds-drafts": "^1.
|
|
45
|
-
"@salesforce/lds-drafts-adapters-uiapi": "^1.
|
|
46
|
-
"@salesforce/lds-graphql-eval": "^1.
|
|
47
|
-
"@salesforce/lds-network-adapter": "^1.
|
|
48
|
-
"@salesforce/lds-network-nimbus": "^1.
|
|
49
|
-
"@salesforce/lds-store-binary": "^1.
|
|
50
|
-
"@salesforce/lds-store-nimbus": "^1.
|
|
51
|
-
"@salesforce/lds-store-sql": "^1.
|
|
52
|
-
"@salesforce/lds-utils-adapters": "^1.
|
|
53
|
-
"@salesforce/nimbus-plugin-lds": "^1.
|
|
43
|
+
"@salesforce/lds-adapters-graphql": "^1.273.0",
|
|
44
|
+
"@salesforce/lds-drafts": "^1.273.0",
|
|
45
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.273.0",
|
|
46
|
+
"@salesforce/lds-graphql-eval": "^1.273.0",
|
|
47
|
+
"@salesforce/lds-network-adapter": "^1.273.0",
|
|
48
|
+
"@salesforce/lds-network-nimbus": "^1.273.0",
|
|
49
|
+
"@salesforce/lds-store-binary": "^1.273.0",
|
|
50
|
+
"@salesforce/lds-store-nimbus": "^1.273.0",
|
|
51
|
+
"@salesforce/lds-store-sql": "^1.273.0",
|
|
52
|
+
"@salesforce/lds-utils-adapters": "^1.273.0",
|
|
53
|
+
"@salesforce/nimbus-plugin-lds": "^1.273.0",
|
|
54
54
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
55
55
|
"wait-for-expect": "^3.0.2"
|
|
56
56
|
},
|
package/sfdc/main.js
CHANGED
|
@@ -786,7 +786,7 @@ class DurableTTLStore {
|
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
788
|
|
|
789
|
-
function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, redirects, additionalDurableStoreOperations = [], enableDurableMetadataRefresh = false) {
|
|
789
|
+
function flushInMemoryStoreValuesToDurableStore(store, durableStore, crossEnvironmentNotifier, durableStoreErrorHandler, redirects, additionalDurableStoreOperations = [], enableDurableMetadataRefresh = false) {
|
|
790
790
|
const durableRecords = create$6(null);
|
|
791
791
|
const refreshedDurableRecords = create$6(null);
|
|
792
792
|
const evictedRecords = create$6(null);
|
|
@@ -833,6 +833,14 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
|
|
|
833
833
|
entries: refreshedDurableRecords,
|
|
834
834
|
segment: DefaultDurableSegment,
|
|
835
835
|
});
|
|
836
|
+
if (crossEnvironmentNotifier !== undefined) {
|
|
837
|
+
crossEnvironmentNotifier.notifyCrossEnvironments({
|
|
838
|
+
data: {
|
|
839
|
+
refreshedDurableRecords,
|
|
840
|
+
},
|
|
841
|
+
type: 'Update',
|
|
842
|
+
});
|
|
843
|
+
}
|
|
836
844
|
}
|
|
837
845
|
// redirects
|
|
838
846
|
redirects.forEach((value, key) => {
|
|
@@ -1164,6 +1172,15 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1164
1172
|
}
|
|
1165
1173
|
}
|
|
1166
1174
|
});
|
|
1175
|
+
let notifier;
|
|
1176
|
+
const getCrossEnvironmentNotifier = function () {
|
|
1177
|
+
validateNotDisposed();
|
|
1178
|
+
return notifier;
|
|
1179
|
+
};
|
|
1180
|
+
const setCrossEnvironmentNotifier = function (crossEnvironmentNotifier) {
|
|
1181
|
+
validateNotDisposed();
|
|
1182
|
+
notifier = crossEnvironmentNotifier;
|
|
1183
|
+
};
|
|
1167
1184
|
const dispose = function () {
|
|
1168
1185
|
validateNotDisposed();
|
|
1169
1186
|
disposed = true;
|
|
@@ -1216,7 +1233,7 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1216
1233
|
if (stagingStore === null) {
|
|
1217
1234
|
return Promise.resolve();
|
|
1218
1235
|
}
|
|
1219
|
-
const promise = flushInMemoryStoreValuesToDurableStore(stagingStore, durableStore, durableStoreErrorHandler, new Map(pendingStoreRedirects), additionalDurableStoreOperations, enableDurableMetadataRefresh);
|
|
1236
|
+
const promise = flushInMemoryStoreValuesToDurableStore(stagingStore, durableStore, getCrossEnvironmentNotifier(), durableStoreErrorHandler, new Map(pendingStoreRedirects), additionalDurableStoreOperations, enableDurableMetadataRefresh);
|
|
1220
1237
|
pendingStoreRedirects.clear();
|
|
1221
1238
|
stagingStore = null;
|
|
1222
1239
|
return promise;
|
|
@@ -1385,6 +1402,10 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1385
1402
|
}
|
|
1386
1403
|
return {};
|
|
1387
1404
|
};
|
|
1405
|
+
const getIngestStagingStore = function () {
|
|
1406
|
+
validateNotDisposed();
|
|
1407
|
+
return stagingStore === null || stagingStore === void 0 ? void 0 : stagingStore.fallbackStringKeyInMemoryStore;
|
|
1408
|
+
};
|
|
1388
1409
|
const handleSuccessResponse = async function (ingestAndBroadcastFunc, getResponseCacheKeysFunc) {
|
|
1389
1410
|
validateNotDisposed();
|
|
1390
1411
|
const cacheKeyMap = getResponseCacheKeysFunc();
|
|
@@ -1577,10 +1598,13 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1577
1598
|
applyCachePolicy: { value: applyCachePolicy },
|
|
1578
1599
|
getIngestStagingStoreRecords: { value: getIngestStagingStoreRecords },
|
|
1579
1600
|
getIngestStagingStoreMetadata: { value: getIngestStagingStoreMetadata },
|
|
1601
|
+
getIngestStagingStore: { value: getIngestStagingStore },
|
|
1580
1602
|
handleSuccessResponse: { value: handleSuccessResponse },
|
|
1581
1603
|
handleErrorResponse: { value: handleErrorResponse },
|
|
1582
1604
|
getNotifyChangeStoreEntries: { value: getNotifyChangeStoreEntries },
|
|
1583
1605
|
notifyStoreUpdateAvailable: { value: notifyStoreUpdateAvailable },
|
|
1606
|
+
getCrossEnvironmentNotifier: { value: getCrossEnvironmentNotifier },
|
|
1607
|
+
setCrossEnvironmentNotifier: { value: setCrossEnvironmentNotifier },
|
|
1584
1608
|
});
|
|
1585
1609
|
}
|
|
1586
1610
|
|
|
@@ -11650,7 +11674,7 @@ function createUserJsonOutput(selection, jsonInput, jsonOutput) {
|
|
|
11650
11674
|
function createjsonOutput(selections, jsonInput, jsonOutput) {
|
|
11651
11675
|
const keys$1 = keys$4(jsonInput);
|
|
11652
11676
|
selections.filter(isFieldNode).forEach((subSelection) => {
|
|
11653
|
-
const fieldName = subSelection.name.value;
|
|
11677
|
+
const fieldName = subSelection.alias ? subSelection.alias.value : subSelection.name.value;
|
|
11654
11678
|
if (keys$1.includes(fieldName)) {
|
|
11655
11679
|
if (isArray$2(jsonInput[fieldName])) {
|
|
11656
11680
|
jsonOutput[fieldName] = [];
|
|
@@ -12966,7 +12990,7 @@ function normalizeRecordFields(key, entry) {
|
|
|
12966
12990
|
* @param normalizedRecord Record containing normalized field links
|
|
12967
12991
|
* @param recordStore a store containing referenced record fields
|
|
12968
12992
|
*/
|
|
12969
|
-
function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntries) {
|
|
12993
|
+
function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntries, store) {
|
|
12970
12994
|
const fields = normalizedRecord.fields;
|
|
12971
12995
|
const filteredFields = {};
|
|
12972
12996
|
const links = {};
|
|
@@ -12993,6 +13017,19 @@ function buildDurableRecordRepresentation(normalizedRecord, records, pendingEntr
|
|
|
12993
13017
|
if (ref !== undefined) {
|
|
12994
13018
|
filteredFields[fieldName] = ref;
|
|
12995
13019
|
}
|
|
13020
|
+
else {
|
|
13021
|
+
// if we have a store to read, try to find the field there too
|
|
13022
|
+
// The durable ingest staging store may pass through to L1, and
|
|
13023
|
+
// not all fields are necessarily published every time, so it is
|
|
13024
|
+
// important to check L1 and not just the fields being published,
|
|
13025
|
+
// otherwise we risk truncating the fields on the record.
|
|
13026
|
+
if (store) {
|
|
13027
|
+
ref = store.readEntry(__ref);
|
|
13028
|
+
if (ref !== undefined) {
|
|
13029
|
+
filteredFields[fieldName] = ref;
|
|
13030
|
+
}
|
|
13031
|
+
}
|
|
13032
|
+
}
|
|
12996
13033
|
}
|
|
12997
13034
|
// we want to preserve fields that are missing nodes
|
|
12998
13035
|
if (filteredFields[fieldName] !== undefined || field.isMissing === true) {
|
|
@@ -13014,7 +13051,7 @@ function getDenormalizedKey(originalKey, recordId, luvio) {
|
|
|
13014
13051
|
}
|
|
13015
13052
|
return keyBuilderRecord(luvio, { recordId });
|
|
13016
13053
|
}
|
|
13017
|
-
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata) {
|
|
13054
|
+
function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecords, getStoreMetadata, getStore) {
|
|
13018
13055
|
const getEntries = function (entries, segment) {
|
|
13019
13056
|
// this HOF only inspects records in the default segment
|
|
13020
13057
|
if (segment !== DefaultDurableSegment) {
|
|
@@ -13082,6 +13119,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13082
13119
|
const putRecordViews = {};
|
|
13083
13120
|
const storeRecords = getStoreRecords !== undefined ? getStoreRecords() : {};
|
|
13084
13121
|
const storeMetadata = getStoreMetadata !== undefined ? getStoreMetadata() : {};
|
|
13122
|
+
const store = getStore();
|
|
13085
13123
|
for (let i = 0, len = keys$1.length; i < len; i++) {
|
|
13086
13124
|
const key = keys$1[i];
|
|
13087
13125
|
let value = entries[key];
|
|
@@ -13128,7 +13166,7 @@ function makeRecordDenormalizingDurableStore(luvio, durableStore, getStoreRecord
|
|
|
13128
13166
|
metadataVersion: DURABLE_METADATA_VERSION,
|
|
13129
13167
|
};
|
|
13130
13168
|
}
|
|
13131
|
-
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries);
|
|
13169
|
+
const denormalizedRecord = buildDurableRecordRepresentation(record, storeRecords, recordEntries, store);
|
|
13132
13170
|
putEntries[recordKey] = {
|
|
13133
13171
|
data: denormalizedRecord,
|
|
13134
13172
|
metadata,
|
|
@@ -17805,22 +17843,25 @@ function getRuntime() {
|
|
|
17805
17843
|
const internalAdapterStore = new InMemoryStore();
|
|
17806
17844
|
let getIngestRecordsForInternalAdapters;
|
|
17807
17845
|
let getIngestMetadataForInternalAdapters;
|
|
17846
|
+
let getIngestStoreInternal;
|
|
17808
17847
|
const internalAdapterDurableStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => getIngestRecordsForInternalAdapters !== undefined
|
|
17809
17848
|
? getIngestRecordsForInternalAdapters()
|
|
17810
17849
|
: {}, () => getIngestMetadataForInternalAdapters !== undefined
|
|
17811
17850
|
? getIngestMetadataForInternalAdapters()
|
|
17812
|
-
: {});
|
|
17851
|
+
: {}, () => (getIngestStoreInternal !== undefined ? getIngestStoreInternal() : undefined));
|
|
17813
17852
|
const { adapters: { getObjectInfo, getObjectInfos, getRecord, getObjectInfoDirectory }, durableEnvironment: internalAdapterDurableEnvironment, luvio: internalLuvio, } = buildInternalAdapters(internalAdapterStore, lazyNetworkAdapter, internalAdapterDurableStore, (apiName, objectInfo) => lazyObjectInfoService.ensureObjectInfoCached(apiName, objectInfo));
|
|
17814
17853
|
lazyInternalLuvio = internalLuvio;
|
|
17815
17854
|
getIngestRecordsForInternalAdapters =
|
|
17816
17855
|
internalAdapterDurableEnvironment.getIngestStagingStoreRecords;
|
|
17817
17856
|
getIngestMetadataForInternalAdapters =
|
|
17818
17857
|
internalAdapterDurableEnvironment.getIngestStagingStoreRecords;
|
|
17858
|
+
getIngestStoreInternal = internalAdapterDurableEnvironment.getIngestStagingStore;
|
|
17819
17859
|
lazyObjectInfoService = new ObjectInfoService(getObjectInfo, getObjectInfos, getObjectInfoDirectory, lazyBaseDurableStore);
|
|
17820
17860
|
// creates a durable store that denormalizes scalar fields for records
|
|
17821
17861
|
let getIngestRecords;
|
|
17822
17862
|
let getIngestMetadata;
|
|
17823
|
-
|
|
17863
|
+
let getIngestStore;
|
|
17864
|
+
const recordDenormingStore = makeRecordDenormalizingDurableStore(lazyLuvio, lazyBaseDurableStore, () => (getIngestRecords !== undefined ? getIngestRecords() : {}), () => (getIngestMetadata !== undefined ? getIngestMetadata() : {}), () => (getIngestStore !== undefined ? getIngestStore() : undefined));
|
|
17824
17865
|
const baseEnv = new Environment(store, lazyNetworkAdapter);
|
|
17825
17866
|
const gqlEnv = makeEnvironmentGraphqlAware(baseEnv);
|
|
17826
17867
|
const durableEnv = makeDurable(gqlEnv, {
|
|
@@ -17829,6 +17870,7 @@ function getRuntime() {
|
|
|
17829
17870
|
});
|
|
17830
17871
|
getIngestRecords = durableEnv.getIngestStagingStoreRecords;
|
|
17831
17872
|
getIngestMetadata = durableEnv.getIngestStagingStoreMetadata;
|
|
17873
|
+
getIngestStore = durableEnv.getIngestStagingStore;
|
|
17832
17874
|
// draft queue
|
|
17833
17875
|
lazyDraftQueue = buildLdsDraftQueue(recordDenormingStore);
|
|
17834
17876
|
const draftService = new UiApiDraftRecordService(lazyDraftQueue, () => lazyLuvio, recordDenormingStore, getObjectInfo, newRecordId, userId, formatDisplayValue);
|
|
@@ -17928,4 +17970,4 @@ register({
|
|
|
17928
17970
|
});
|
|
17929
17971
|
|
|
17930
17972
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17931
|
-
// version: 1.
|
|
17973
|
+
// version: 1.273.0-f97941e01
|