@salesforce/lds-ads-bridge 1.106.1 → 1.107.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.
- package/dist/ads-bridge-perf.js +71 -71
- package/dist/adsBridge.js +1 -1
- package/package.json +3 -3
package/dist/ads-bridge-perf.js
CHANGED
|
@@ -368,7 +368,7 @@ const callbacks$1 = [];
|
|
|
368
368
|
function register(r) {
|
|
369
369
|
callbacks$1.forEach((callback) => callback(r));
|
|
370
370
|
}
|
|
371
|
-
// version: 1.
|
|
371
|
+
// version: 1.107.1-ee21406b5
|
|
372
372
|
|
|
373
373
|
/**
|
|
374
374
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -5451,7 +5451,7 @@ function validate$1x(obj, path = 'RecordTypeInfoRepresentation') {
|
|
|
5451
5451
|
})();
|
|
5452
5452
|
return v_error === undefined ? null : v_error;
|
|
5453
5453
|
}
|
|
5454
|
-
const select$
|
|
5454
|
+
const select$2m = function RecordTypeInfoRepresentationSelect() {
|
|
5455
5455
|
return {
|
|
5456
5456
|
kind: 'Fragment',
|
|
5457
5457
|
version: VERSION$1T,
|
|
@@ -5601,7 +5601,7 @@ function validate$1w(obj, path = 'FieldValueRepresentation') {
|
|
|
5601
5601
|
return v_error === undefined ? null : v_error;
|
|
5602
5602
|
}
|
|
5603
5603
|
const RepresentationType$T = 'FieldValueRepresentation';
|
|
5604
|
-
const select$
|
|
5604
|
+
const select$2l = function FieldValueRepresentationSelect() {
|
|
5605
5605
|
return {
|
|
5606
5606
|
kind: 'Fragment',
|
|
5607
5607
|
version: VERSION$1S,
|
|
@@ -5615,7 +5615,7 @@ const select$2k = function FieldValueRepresentationSelect() {
|
|
|
5615
5615
|
name: 'value',
|
|
5616
5616
|
kind: 'Link',
|
|
5617
5617
|
nullable: true,
|
|
5618
|
-
fragment: select$
|
|
5618
|
+
fragment: select$2j()
|
|
5619
5619
|
}
|
|
5620
5620
|
]
|
|
5621
5621
|
};
|
|
@@ -5689,7 +5689,7 @@ const getTypeCacheKeys$1u = (luvio, input, _fullPathFactory) => {
|
|
|
5689
5689
|
return rootKeySet;
|
|
5690
5690
|
};
|
|
5691
5691
|
|
|
5692
|
-
const TTL$
|
|
5692
|
+
const TTL$A = 120000;
|
|
5693
5693
|
const VERSION$1R = "79cb5ac9f44542f683d00245fdfe500d";
|
|
5694
5694
|
function validate$1v(obj, path = 'RecordCollectionRepresentation') {
|
|
5695
5695
|
const v_error = (() => {
|
|
@@ -5871,7 +5871,7 @@ function normalize$K(input, existing, path, luvio, store, timestamp) {
|
|
|
5871
5871
|
}
|
|
5872
5872
|
return input;
|
|
5873
5873
|
}
|
|
5874
|
-
const select$
|
|
5874
|
+
const select$2k = function RecordCollectionRepresentationSelect() {
|
|
5875
5875
|
return {
|
|
5876
5876
|
kind: 'Fragment',
|
|
5877
5877
|
version: VERSION$1R,
|
|
@@ -5909,7 +5909,7 @@ const select$2j = function RecordCollectionRepresentationSelect() {
|
|
|
5909
5909
|
name: 'records',
|
|
5910
5910
|
kind: 'Link',
|
|
5911
5911
|
plural: true,
|
|
5912
|
-
fragment: select$
|
|
5912
|
+
fragment: select$2j()
|
|
5913
5913
|
}
|
|
5914
5914
|
]
|
|
5915
5915
|
};
|
|
@@ -5971,7 +5971,7 @@ const ingest$1r = function RecordCollectionRepresentationIngest(input, path, luv
|
|
|
5971
5971
|
}
|
|
5972
5972
|
const key = path.fullPath;
|
|
5973
5973
|
const existingRecord = store.readEntry(key);
|
|
5974
|
-
const ttlToUse = TTL$
|
|
5974
|
+
const ttlToUse = TTL$A;
|
|
5975
5975
|
let incomingRecord = normalize$K(input, store.readEntry(key), {
|
|
5976
5976
|
fullPath: key,
|
|
5977
5977
|
parent: path.parent,
|
|
@@ -6018,7 +6018,7 @@ const keyBuilderFromType$y = function RecordRepresentationKeyBuilderFromType(luv
|
|
|
6018
6018
|
return keyBuilderFromType$x(luvio, object);
|
|
6019
6019
|
};
|
|
6020
6020
|
|
|
6021
|
-
const TTL$
|
|
6021
|
+
const TTL$z = 30000;
|
|
6022
6022
|
const VERSION$1Q = "98c5b18512e48ca8d28727549507e4ba";
|
|
6023
6023
|
function validate$1u(obj, path = 'RecordRepresentation') {
|
|
6024
6024
|
const v_error = (() => {
|
|
@@ -6210,14 +6210,14 @@ function validate$1u(obj, path = 'RecordRepresentation') {
|
|
|
6210
6210
|
return v_error === undefined ? null : v_error;
|
|
6211
6211
|
}
|
|
6212
6212
|
const RepresentationType$R = 'RecordRepresentation';
|
|
6213
|
-
function keyBuilder$
|
|
6213
|
+
function keyBuilder$2C(luvio, config) {
|
|
6214
6214
|
return keyPrefix + '::' + RepresentationType$R + ':' + config.recordId;
|
|
6215
6215
|
}
|
|
6216
6216
|
function keyBuilderFromType$x(luvio, object) {
|
|
6217
6217
|
const keyParams = {
|
|
6218
6218
|
recordId: object.id
|
|
6219
6219
|
};
|
|
6220
|
-
return keyBuilder$
|
|
6220
|
+
return keyBuilder$2C(luvio, keyParams);
|
|
6221
6221
|
}
|
|
6222
6222
|
function dynamicNormalize$5(ingestParams) {
|
|
6223
6223
|
return function normalize_dynamic(input, existing, path, luvio, store, timestamp) {
|
|
@@ -6262,8 +6262,8 @@ function dynamicNormalize$5(ingestParams) {
|
|
|
6262
6262
|
return input;
|
|
6263
6263
|
};
|
|
6264
6264
|
}
|
|
6265
|
-
const select$
|
|
6266
|
-
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$
|
|
6265
|
+
const select$2j = function RecordRepresentationSelect() {
|
|
6266
|
+
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$2m();
|
|
6267
6267
|
return {
|
|
6268
6268
|
kind: 'Fragment',
|
|
6269
6269
|
version: VERSION$1Q,
|
|
@@ -6280,13 +6280,13 @@ const select$2i = function RecordRepresentationSelect() {
|
|
|
6280
6280
|
name: 'childRelationships',
|
|
6281
6281
|
kind: 'Link',
|
|
6282
6282
|
map: true,
|
|
6283
|
-
fragment: select$
|
|
6283
|
+
fragment: select$2k()
|
|
6284
6284
|
},
|
|
6285
6285
|
{
|
|
6286
6286
|
name: 'fields',
|
|
6287
6287
|
kind: 'Link',
|
|
6288
6288
|
map: true,
|
|
6289
|
-
fragment: select$
|
|
6289
|
+
fragment: select$2l()
|
|
6290
6290
|
},
|
|
6291
6291
|
{
|
|
6292
6292
|
name: 'id',
|
|
@@ -6322,15 +6322,15 @@ const dynamicSelect$8 = function dynamicRecordRepresentationSelect(params) {
|
|
|
6322
6322
|
name: 'childRelationships',
|
|
6323
6323
|
kind: 'Link',
|
|
6324
6324
|
map: true,
|
|
6325
|
-
fragment: select$
|
|
6325
|
+
fragment: select$2k()
|
|
6326
6326
|
} : params.childRelationships;
|
|
6327
6327
|
const fieldsPathSelection = params.fields === undefined ? {
|
|
6328
6328
|
name: 'fields',
|
|
6329
6329
|
kind: 'Link',
|
|
6330
6330
|
map: true,
|
|
6331
|
-
fragment: select$
|
|
6331
|
+
fragment: select$2l()
|
|
6332
6332
|
} : params.fields;
|
|
6333
|
-
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$
|
|
6333
|
+
const { selections: RecordTypeInfoRepresentation__selections, opaque: RecordTypeInfoRepresentation__opaque, } = select$2m();
|
|
6334
6334
|
return {
|
|
6335
6335
|
kind: 'Fragment',
|
|
6336
6336
|
version: VERSION$1Q,
|
|
@@ -7993,7 +7993,7 @@ const RECORD_REPRESENTATION_ERROR_VERSION = 'RECORD_REPRESENTATION_ERROR_VERSION
|
|
|
7993
7993
|
const RECORD_REPRESENTATION_ERROR_STORE_METADATA_PARAMS = {
|
|
7994
7994
|
representationName: '',
|
|
7995
7995
|
namespace: keyPrefix,
|
|
7996
|
-
ttl: TTL$
|
|
7996
|
+
ttl: TTL$z,
|
|
7997
7997
|
version: RECORD_REPRESENTATION_ERROR_VERSION,
|
|
7998
7998
|
};
|
|
7999
7999
|
function isGraphNode$1(node) {
|
|
@@ -8366,7 +8366,7 @@ function mergeAndRefreshLowerVersionRecord(luvio, incoming, existing, incomingTr
|
|
|
8366
8366
|
};
|
|
8367
8367
|
}
|
|
8368
8368
|
else {
|
|
8369
|
-
buildNetworkSnapshot$
|
|
8369
|
+
buildNetworkSnapshot$_(luvio, {
|
|
8370
8370
|
recordId: incoming.id,
|
|
8371
8371
|
optionalFields: convertTrieToFields(incomingTrackedFieldsTrieRoot),
|
|
8372
8372
|
});
|
|
@@ -8386,7 +8386,7 @@ function mergeRecordConflict(luvio, incoming, existing, recordConflictMap) {
|
|
|
8386
8386
|
name: existing.apiName,
|
|
8387
8387
|
children: {},
|
|
8388
8388
|
};
|
|
8389
|
-
const recordKey = keyBuilder$
|
|
8389
|
+
const recordKey = keyBuilder$2C(luvio, {
|
|
8390
8390
|
recordId: incoming.id,
|
|
8391
8391
|
});
|
|
8392
8392
|
const trackedFieldsConfig = {
|
|
@@ -8669,7 +8669,7 @@ const createRecordIngest = (fieldsTrie, optionalFieldsTrie, recordConflictMap) =
|
|
|
8669
8669
|
luvio.storePublish(key, incomingRecord);
|
|
8670
8670
|
}
|
|
8671
8671
|
luvio.publishStoreMetadata(key, {
|
|
8672
|
-
ttl: TTL$
|
|
8672
|
+
ttl: TTL$z,
|
|
8673
8673
|
representationName: RepresentationType$R,
|
|
8674
8674
|
namespace: keyPrefix,
|
|
8675
8675
|
version: VERSION$1Q,
|
|
@@ -8737,12 +8737,12 @@ const createResourceRequest$13 = function getUiApiRecordsByRecordIdCreateResourc
|
|
|
8737
8737
|
};
|
|
8738
8738
|
};
|
|
8739
8739
|
|
|
8740
|
-
function keyBuilder$
|
|
8741
|
-
return keyBuilder$
|
|
8740
|
+
function keyBuilder$2B(luvio, params) {
|
|
8741
|
+
return keyBuilder$2C(luvio, {
|
|
8742
8742
|
recordId: params.urlParams.recordId
|
|
8743
8743
|
});
|
|
8744
8744
|
}
|
|
8745
|
-
function getResponseCacheKeys$
|
|
8745
|
+
function getResponseCacheKeys$W(luvio, resourceParams, response) {
|
|
8746
8746
|
return getTypeCacheKeys$1u(luvio, response);
|
|
8747
8747
|
}
|
|
8748
8748
|
function createResourceRequest$12(config) {
|
|
@@ -8758,7 +8758,7 @@ function createResourceRequest$12(config) {
|
|
|
8758
8758
|
priority: 'normal',
|
|
8759
8759
|
};
|
|
8760
8760
|
}
|
|
8761
|
-
function createResourceParams$
|
|
8761
|
+
function createResourceParams$V(config) {
|
|
8762
8762
|
const resourceParams = {
|
|
8763
8763
|
urlParams: {
|
|
8764
8764
|
recordId: config.recordId
|
|
@@ -8773,7 +8773,7 @@ function createResourceParams$U(config) {
|
|
|
8773
8773
|
// used by getUiApiRecordsBatchByRecordIds#selectChildResourceParams
|
|
8774
8774
|
function buildRecordSelector(luvio, recordId, fields, optionalFields) {
|
|
8775
8775
|
return {
|
|
8776
|
-
recordId: keyBuilder$
|
|
8776
|
+
recordId: keyBuilder$2C(luvio, { recordId }),
|
|
8777
8777
|
node: {
|
|
8778
8778
|
kind: 'Fragment',
|
|
8779
8779
|
private: ['eTag', 'weakEtag'],
|
|
@@ -8786,19 +8786,19 @@ function buildRecordSelector(luvio, recordId, fields, optionalFields) {
|
|
|
8786
8786
|
function buildSnapshotRefresh$5(luvio, config) {
|
|
8787
8787
|
return {
|
|
8788
8788
|
config,
|
|
8789
|
-
resolve: () => buildNetworkSnapshot$
|
|
8789
|
+
resolve: () => buildNetworkSnapshot$_(luvio, config),
|
|
8790
8790
|
};
|
|
8791
8791
|
}
|
|
8792
|
-
function prepareRequest$
|
|
8792
|
+
function prepareRequest$6(luvio, config) {
|
|
8793
8793
|
const { recordId, fields } = config;
|
|
8794
8794
|
// Should this go into the coersion logic?
|
|
8795
|
-
const key = keyBuilder$
|
|
8795
|
+
const key = keyBuilder$2B(luvio, createResourceParams$V(config));
|
|
8796
8796
|
const allTrackedFields = getTrackedFields(key, luvio.getNode(key), {
|
|
8797
8797
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
8798
8798
|
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
8799
8799
|
}, config.optionalFields);
|
|
8800
8800
|
const optionalFields = fields === undefined ? allTrackedFields : difference(allTrackedFields, fields);
|
|
8801
|
-
const resourceParams = createResourceParams$
|
|
8801
|
+
const resourceParams = createResourceParams$V({
|
|
8802
8802
|
recordId,
|
|
8803
8803
|
fields,
|
|
8804
8804
|
optionalFields: optionalFields.length > 0 ? optionalFields : undefined,
|
|
@@ -8806,7 +8806,7 @@ function prepareRequest$5(luvio, config) {
|
|
|
8806
8806
|
const request = createResourceRequest$13(resourceParams);
|
|
8807
8807
|
return { request, key, allTrackedFields, resourceParams };
|
|
8808
8808
|
}
|
|
8809
|
-
function ingestSuccess$
|
|
8809
|
+
function ingestSuccess$L(luvio, config, key, allTrackedFields, response, serverRequestCount) {
|
|
8810
8810
|
const { body } = response;
|
|
8811
8811
|
const fields = config.fields === undefined ? [] : config.fields;
|
|
8812
8812
|
const optionalFields = config.optionalFields === undefined ? [] : config.optionalFields;
|
|
@@ -8820,22 +8820,22 @@ function ingestSuccess$K(luvio, config, key, allTrackedFields, response, serverR
|
|
|
8820
8820
|
return luvio.storeLookup(buildRecordSelector(luvio, config.recordId, fields, optionalFields), buildSnapshotRefresh$5(luvio, config));
|
|
8821
8821
|
}
|
|
8822
8822
|
function onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount) {
|
|
8823
|
-
const snapshot = ingestSuccess$
|
|
8823
|
+
const snapshot = ingestSuccess$L(luvio, config, key, allTrackedFields, response, serverRequestCount);
|
|
8824
8824
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
8825
8825
|
}
|
|
8826
|
-
function ingestError$
|
|
8826
|
+
function ingestError$J(luvio, config, key, err) {
|
|
8827
8827
|
const errorSnapshot = luvio.errorSnapshot(err, buildSnapshotRefresh$5(luvio, config));
|
|
8828
8828
|
luvio.storeIngestError(key, errorSnapshot, RECORD_REPRESENTATION_ERROR_STORE_METADATA_PARAMS);
|
|
8829
8829
|
return errorSnapshot;
|
|
8830
8830
|
}
|
|
8831
8831
|
function onResourceError(luvio, config, key, err) {
|
|
8832
|
-
const errorSnapshot = ingestError$
|
|
8832
|
+
const errorSnapshot = ingestError$J(luvio, config, key, err);
|
|
8833
8833
|
return luvio.storeBroadcast().then(() => errorSnapshot);
|
|
8834
8834
|
}
|
|
8835
|
-
function buildNetworkSnapshot$
|
|
8836
|
-
const { request, key, allTrackedFields, resourceParams } = prepareRequest$
|
|
8835
|
+
function buildNetworkSnapshot$_(luvio, config, serverRequestCount = 0, options) {
|
|
8836
|
+
const { request, key, allTrackedFields, resourceParams } = prepareRequest$6(luvio, config);
|
|
8837
8837
|
return luvio.dispatchResourceRequest(request, options).then((response) => {
|
|
8838
|
-
return luvio.handleSuccessResponse(() => onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount + 1), () => getResponseCacheKeys$
|
|
8838
|
+
return luvio.handleSuccessResponse(() => onResourceSuccess(luvio, config, key, allTrackedFields, response, serverRequestCount + 1), () => getResponseCacheKeys$W(luvio, resourceParams, response.body));
|
|
8839
8839
|
}, (err) => {
|
|
8840
8840
|
return luvio.handleErrorResponse(() => {
|
|
8841
8841
|
return onResourceError(luvio, config, key, err);
|
|
@@ -8853,7 +8853,7 @@ function ingestSuccessChildResourceParams$6(luvio, childResourceParamsArray, chi
|
|
|
8853
8853
|
const now = Date.now();
|
|
8854
8854
|
for (let index = 0, len = childResourceParamsArray.length; index < len; index += 1) {
|
|
8855
8855
|
const childResourceParams = childResourceParamsArray[index];
|
|
8856
|
-
const childKey = keyBuilder$
|
|
8856
|
+
const childKey = keyBuilder$2B(luvio, childResourceParams);
|
|
8857
8857
|
const result = childEnvelopes[index];
|
|
8858
8858
|
const { statusCode: childStatusCode, result: childBody } = result;
|
|
8859
8859
|
if (childStatusCode === 200) {
|
|
@@ -8868,7 +8868,7 @@ function ingestSuccessChildResourceParams$6(luvio, childResourceParamsArray, chi
|
|
|
8868
8868
|
maxDepth: configurationForRestAdapters.getTrackedFieldDepthOnCacheMiss(),
|
|
8869
8869
|
onlyFetchLeafNodeIdAndName: configurationForRestAdapters.getTrackedFieldLeafNodeIdAndNameOnly(),
|
|
8870
8870
|
}, childResourceParams.queryParams.optionalFields);
|
|
8871
|
-
const childSnapshot = ingestSuccess$
|
|
8871
|
+
const childSnapshot = ingestSuccess$L(luvio, {
|
|
8872
8872
|
recordId: childResourceParams.urlParams.recordId,
|
|
8873
8873
|
fields: childResourceParams.queryParams.fields,
|
|
8874
8874
|
optionalFields: childResourceParams.queryParams.optionalFields,
|
|
@@ -8895,7 +8895,7 @@ function ingestSuccessChildResourceParams$6(luvio, childResourceParamsArray, chi
|
|
|
8895
8895
|
headers: {},
|
|
8896
8896
|
errorType: 'fetchResponse',
|
|
8897
8897
|
};
|
|
8898
|
-
ingestError$
|
|
8898
|
+
ingestError$J(luvio, {
|
|
8899
8899
|
recordId: childResourceParams.urlParams.recordId,
|
|
8900
8900
|
fields: childResourceParams.queryParams.fields,
|
|
8901
8901
|
optionalFields: childResourceParams.queryParams.optionalFields,
|
|
@@ -8911,7 +8911,7 @@ function ingestSuccessChildResourceParams$6(luvio, childResourceParamsArray, chi
|
|
|
8911
8911
|
// track non-cached responses so rebuilds work properly
|
|
8912
8912
|
if (childStatusCode !== 404 && childStatusCode !== 200) {
|
|
8913
8913
|
nonCachedErrors$6[childKey] = {
|
|
8914
|
-
expiration: now + TTL$
|
|
8914
|
+
expiration: now + TTL$z,
|
|
8915
8915
|
response: childBody,
|
|
8916
8916
|
status: childStatusCode,
|
|
8917
8917
|
};
|
|
@@ -8942,7 +8942,7 @@ function selectChildResourceParams$6(luvio, childResources, resourceParams) {
|
|
|
8942
8942
|
read: (reader) => {
|
|
8943
8943
|
// Top-level 404 lookup
|
|
8944
8944
|
const compositeSnapshot = luvio.storeLookup({
|
|
8945
|
-
recordId: keyBuilder$
|
|
8945
|
+
recordId: keyBuilder$2A(luvio, resourceParams),
|
|
8946
8946
|
node: {
|
|
8947
8947
|
kind: 'Fragment',
|
|
8948
8948
|
private: [],
|
|
@@ -8966,7 +8966,7 @@ function selectChildResourceParams$6(luvio, childResources, resourceParams) {
|
|
|
8966
8966
|
reader.enterPath(i);
|
|
8967
8967
|
reader.enterPath(envelopeBodyPath);
|
|
8968
8968
|
const childResource = childResources[i];
|
|
8969
|
-
const childKey = keyBuilder$
|
|
8969
|
+
const childKey = keyBuilder$2B(luvio, childResource);
|
|
8970
8970
|
const isMissingDataBeforeChildRead = reader.getIsDataMissing();
|
|
8971
8971
|
const childSnapshot = reader.read(buildRecordSelector(luvio, childResource.urlParams.recordId, childResource.queryParams.fields || [], childResource.queryParams.optionalFields || []));
|
|
8972
8972
|
reader.exitPath();
|
|
@@ -9067,10 +9067,10 @@ function createChildResourceParams$9(resourceParams) {
|
|
|
9067
9067
|
}
|
|
9068
9068
|
return childConfigs;
|
|
9069
9069
|
}
|
|
9070
|
-
function keyBuilder$
|
|
9070
|
+
function keyBuilder$2A(luvio, params) {
|
|
9071
9071
|
return keyPrefix + '::BatchRepresentation:(' + 'childRelationships:' + params.queryParams.childRelationships + ',' + 'fields:' + params.queryParams.fields + ',' + 'layoutTypes:' + params.queryParams.layoutTypes + ',' + 'modes:' + params.queryParams.modes + ',' + 'optionalFields:' + params.queryParams.optionalFields + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'updateMru:' + params.queryParams.updateMru + ',' + 'recordIds:' + params.urlParams.recordIds + ')';
|
|
9072
9072
|
}
|
|
9073
|
-
function getResponseCacheKeys$
|
|
9073
|
+
function getResponseCacheKeys$V(luvio, resourceParams, response) {
|
|
9074
9074
|
let keys = new StoreKeyMap();
|
|
9075
9075
|
const childEnvelopes = response.results;
|
|
9076
9076
|
const childResourceParamsArray = createChildResourceParams$9(resourceParams);
|
|
@@ -9085,11 +9085,11 @@ function getResponseCacheKeys$U(luvio, resourceParams, response) {
|
|
|
9085
9085
|
const childResult = childEnvelopes[index];
|
|
9086
9086
|
const { statusCode: childStatusCode, result: childBody } = childResult;
|
|
9087
9087
|
if (childStatusCode === 200) {
|
|
9088
|
-
const childKeys = getResponseCacheKeys$
|
|
9088
|
+
const childKeys = getResponseCacheKeys$W(luvio, childResourceParams, childBody);
|
|
9089
9089
|
keys.merge(childKeys);
|
|
9090
9090
|
}
|
|
9091
9091
|
else if (childStatusCode === 404) {
|
|
9092
|
-
const childKey = keyBuilder$
|
|
9092
|
+
const childKey = keyBuilder$2B(luvio, childResourceParams);
|
|
9093
9093
|
keys.set(childKey, {
|
|
9094
9094
|
namespace: keyPrefix,
|
|
9095
9095
|
representationName: RepresentationType$R,
|
|
@@ -9099,8 +9099,8 @@ function getResponseCacheKeys$U(luvio, resourceParams, response) {
|
|
|
9099
9099
|
}
|
|
9100
9100
|
return keys;
|
|
9101
9101
|
}
|
|
9102
|
-
function ingestError$
|
|
9103
|
-
const key = keyBuilder$
|
|
9102
|
+
function ingestError$I(luvio, params, error, snapshotRefresh) {
|
|
9103
|
+
const key = keyBuilder$2A(luvio, params);
|
|
9104
9104
|
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
9105
9105
|
luvio.storeIngestError(key, errorSnapshot);
|
|
9106
9106
|
return errorSnapshot;
|
|
@@ -9119,7 +9119,7 @@ function createResourceRequest$11(config) {
|
|
|
9119
9119
|
};
|
|
9120
9120
|
}
|
|
9121
9121
|
|
|
9122
|
-
function createResourceParams$
|
|
9122
|
+
function createResourceParams$U(config) {
|
|
9123
9123
|
const { records: configRecords } = config;
|
|
9124
9124
|
const recordIds = [];
|
|
9125
9125
|
const resourceConfigFields = [];
|
|
@@ -9171,13 +9171,13 @@ function createChildResourceParams$8(config) {
|
|
|
9171
9171
|
return childResources;
|
|
9172
9172
|
}
|
|
9173
9173
|
|
|
9174
|
-
function adapterFragment$
|
|
9174
|
+
function adapterFragment$G(luvio, config) {
|
|
9175
9175
|
const childResources = createChildResourceParams$8(config);
|
|
9176
|
-
const resourceParams = createResourceParams$
|
|
9176
|
+
const resourceParams = createResourceParams$U(config);
|
|
9177
9177
|
return selectChildResourceParams$6(luvio, childResources, resourceParams);
|
|
9178
9178
|
}
|
|
9179
9179
|
|
|
9180
|
-
function onFetchResponseSuccess$
|
|
9180
|
+
function onFetchResponseSuccess$K(luvio, config, resourceParams, response, serverRequestCount = 0) {
|
|
9181
9181
|
const childEnvelopes = response.body.results;
|
|
9182
9182
|
const childResourceParamsArray = createChildResourceParams$8(config);
|
|
9183
9183
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -9189,7 +9189,7 @@ function onFetchResponseSuccess$I(luvio, config, resourceParams, response, serve
|
|
|
9189
9189
|
}
|
|
9190
9190
|
}
|
|
9191
9191
|
const snapshotStateFulfilled = 'Fulfilled';
|
|
9192
|
-
const key = keyBuilder$
|
|
9192
|
+
const key = keyBuilder$2A(luvio, resourceParams);
|
|
9193
9193
|
const { childSnapshotData, seenRecords } = ingestSuccessChildResourceParams$6(luvio, childResourceParamsArray, childEnvelopes, serverRequestCount);
|
|
9194
9194
|
const snapshot = {
|
|
9195
9195
|
recordId: key,
|
|
@@ -9198,32 +9198,32 @@ function onFetchResponseSuccess$I(luvio, config, resourceParams, response, serve
|
|
|
9198
9198
|
seenRecords: seenRecords,
|
|
9199
9199
|
select: {
|
|
9200
9200
|
recordId: key,
|
|
9201
|
-
node: adapterFragment$
|
|
9201
|
+
node: adapterFragment$G(luvio, config),
|
|
9202
9202
|
variables: {},
|
|
9203
9203
|
},
|
|
9204
9204
|
refresh: {
|
|
9205
9205
|
config,
|
|
9206
|
-
resolve: () => buildNetworkSnapshot$
|
|
9206
|
+
resolve: () => buildNetworkSnapshot$Z(luvio, config, serverRequestCount, snapshotRefreshOptions),
|
|
9207
9207
|
},
|
|
9208
9208
|
variables: {},
|
|
9209
9209
|
};
|
|
9210
9210
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
9211
9211
|
}
|
|
9212
9212
|
|
|
9213
|
-
function onFetchResponseError$
|
|
9214
|
-
const snapshot = ingestError$
|
|
9213
|
+
function onFetchResponseError$L(luvio, config, resourceParams, response) {
|
|
9214
|
+
const snapshot = ingestError$I(luvio, resourceParams, response, {
|
|
9215
9215
|
config,
|
|
9216
|
-
resolve: () => buildNetworkSnapshot$
|
|
9216
|
+
resolve: () => buildNetworkSnapshot$Z(luvio, config, 0, snapshotRefreshOptions),
|
|
9217
9217
|
});
|
|
9218
9218
|
return luvio.storeBroadcast().then(() => snapshot);
|
|
9219
9219
|
}
|
|
9220
|
-
function buildNetworkSnapshot$
|
|
9221
|
-
const resourceParams = createResourceParams$
|
|
9220
|
+
function buildNetworkSnapshot$Z(luvio, config, serverRequestCount = 0, options) {
|
|
9221
|
+
const resourceParams = createResourceParams$U(config);
|
|
9222
9222
|
const request = createResourceRequest$11(resourceParams);
|
|
9223
9223
|
return luvio.dispatchResourceRequest(request, options).then((response) => {
|
|
9224
|
-
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$
|
|
9224
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess$K(luvio, config, resourceParams, response, serverRequestCount + 1), () => getResponseCacheKeys$V(luvio, resourceParams, response.body));
|
|
9225
9225
|
}, (response) => {
|
|
9226
|
-
return luvio.handleErrorResponse(() => onFetchResponseError$
|
|
9226
|
+
return luvio.handleErrorResponse(() => onFetchResponseError$L(luvio, config, resourceParams, response));
|
|
9227
9227
|
});
|
|
9228
9228
|
}
|
|
9229
9229
|
|
|
@@ -9240,7 +9240,7 @@ function resolveConflict(luvio, map) {
|
|
|
9240
9240
|
recordId,
|
|
9241
9241
|
optionalFields: convertTrieToFields(map.conflicts[recordId].trackedFields),
|
|
9242
9242
|
};
|
|
9243
|
-
buildNetworkSnapshot$
|
|
9243
|
+
buildNetworkSnapshot$_(luvio, config, map.serverRequestCount);
|
|
9244
9244
|
}
|
|
9245
9245
|
else {
|
|
9246
9246
|
const records = reduce.call(ids, (acc, id) => {
|
|
@@ -9252,7 +9252,7 @@ function resolveConflict(luvio, map) {
|
|
|
9252
9252
|
return acc;
|
|
9253
9253
|
}, []);
|
|
9254
9254
|
const config = { records };
|
|
9255
|
-
buildNetworkSnapshot$
|
|
9255
|
+
buildNetworkSnapshot$Z(luvio, config, map.serverRequestCount);
|
|
9256
9256
|
}
|
|
9257
9257
|
}
|
|
9258
9258
|
const ingest$1q = (input, path, luvio, store, timestamp) => {
|
|
@@ -9322,7 +9322,7 @@ const getMruListUi_ConfigPropertyNames = {
|
|
|
9322
9322
|
},
|
|
9323
9323
|
});
|
|
9324
9324
|
const RepresentationType$M = 'ObjectInfoRepresentation';
|
|
9325
|
-
function keyBuilder$
|
|
9325
|
+
function keyBuilder$2n(luvio, config) {
|
|
9326
9326
|
return keyPrefix + '::' + RepresentationType$M + ':' + config.apiName;
|
|
9327
9327
|
}
|
|
9328
9328
|
|
|
@@ -9648,7 +9648,7 @@ function getShallowRecord(luvio, storeRecordId) {
|
|
|
9648
9648
|
*/
|
|
9649
9649
|
function getObjectMetadata(luvio, record) {
|
|
9650
9650
|
const { data: objectInfo } = luvio.storeLookup({
|
|
9651
|
-
recordId: keyBuilder$
|
|
9651
|
+
recordId: keyBuilder$2n(luvio, { apiName: record.apiName }),
|
|
9652
9652
|
node: {
|
|
9653
9653
|
kind: 'Fragment',
|
|
9654
9654
|
private: ['eTag'],
|
|
@@ -9689,7 +9689,7 @@ function getObjectMetadata(luvio, record) {
|
|
|
9689
9689
|
function fixRecordTypes(luvio, record) {
|
|
9690
9690
|
// non-master record types should always be correct
|
|
9691
9691
|
if (record.recordTypeId === MASTER_RECORD_TYPE_ID) {
|
|
9692
|
-
const key = keyBuilder$
|
|
9692
|
+
const key = keyBuilder$2C(luvio, { recordId: record.id });
|
|
9693
9693
|
const recordNode = luvio.getNode(key);
|
|
9694
9694
|
if (isGraphNode(recordNode) &&
|
|
9695
9695
|
recordNode.scalar('recordTypeId') !== MASTER_RECORD_TYPE_ID) {
|
|
@@ -9776,7 +9776,7 @@ class AdsBridge {
|
|
|
9776
9776
|
*/
|
|
9777
9777
|
evict(recordId) {
|
|
9778
9778
|
const { luvio } = this;
|
|
9779
|
-
const key = keyBuilder$
|
|
9779
|
+
const key = keyBuilder$2C(luvio, { recordId });
|
|
9780
9780
|
return this.lockLdsRecordEmit(() => {
|
|
9781
9781
|
luvio.storeEvict(key);
|
|
9782
9782
|
luvio.storeBroadcast();
|
|
@@ -9791,7 +9791,7 @@ class AdsBridge {
|
|
|
9791
9791
|
*/
|
|
9792
9792
|
getTrackedFieldsForRecord(recordId) {
|
|
9793
9793
|
const { luvio } = this;
|
|
9794
|
-
const storeRecordId = keyBuilder$
|
|
9794
|
+
const storeRecordId = keyBuilder$2C(luvio, { recordId });
|
|
9795
9795
|
const recordNode = luvio.getNode(storeRecordId);
|
|
9796
9796
|
if (!isGraphNode(recordNode)) {
|
|
9797
9797
|
return Promise.resolve([]);
|
package/dist/adsBridge.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-ads-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.107.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "Bridge to sync data between LDS and ADS",
|
|
6
6
|
"main": "dist/adsBridge.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-ads-bridge"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
28
|
-
"@salesforce/lds-uiapi-record-utils": "^1.
|
|
27
|
+
"@salesforce/lds-adapters-uiapi": "^1.107.1",
|
|
28
|
+
"@salesforce/lds-uiapi-record-utils": "^1.107.1"
|
|
29
29
|
}
|
|
30
30
|
}
|