@salesforce/lds-ads-bridge 1.267.0 → 1.269.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/ads-bridge-perf.js
CHANGED
|
@@ -478,7 +478,7 @@ const callbacks$1 = [];
|
|
|
478
478
|
function register(r) {
|
|
479
479
|
callbacks$1.forEach((callback) => callback(r));
|
|
480
480
|
}
|
|
481
|
-
// version: 1.
|
|
481
|
+
// version: 1.269.0-b2ea86b9d
|
|
482
482
|
|
|
483
483
|
/**
|
|
484
484
|
* Returns true if the value acts like a Promise, i.e. has a "then" function,
|
|
@@ -8306,7 +8306,7 @@ function getResponseCacheKeys$14(storeKeyMap, luvio, resourceParams, response) {
|
|
|
8306
8306
|
function createResourceRequest$1c(config) {
|
|
8307
8307
|
const headers = {};
|
|
8308
8308
|
return {
|
|
8309
|
-
baseUri: '/services/data/
|
|
8309
|
+
baseUri: '/services/data/v61.0',
|
|
8310
8310
|
basePath: '/ui-api/records/' + config.urlParams.recordId + '',
|
|
8311
8311
|
method: 'get',
|
|
8312
8312
|
body: null,
|
|
@@ -8681,7 +8681,7 @@ function ingestError$N(luvio, params, error, snapshotRefresh) {
|
|
|
8681
8681
|
function createResourceRequest$1b(config) {
|
|
8682
8682
|
const headers = {};
|
|
8683
8683
|
return {
|
|
8684
|
-
baseUri: '/services/data/
|
|
8684
|
+
baseUri: '/services/data/v61.0',
|
|
8685
8685
|
basePath: '/ui-api/records/batch/' + config.urlParams.recordIds + '',
|
|
8686
8686
|
method: 'get',
|
|
8687
8687
|
body: null,
|
|
@@ -9201,7 +9201,7 @@ function isStoreKeyRecordId(key) {
|
|
|
9201
9201
|
// No need to pass the actual record key `luvio.ingestStore`. The `RecordRepresentation.ts#ingest`
|
|
9202
9202
|
// function extracts the appropriate record id from the ingested record.
|
|
9203
9203
|
const INGEST_KEY = '';
|
|
9204
|
-
const
|
|
9204
|
+
const MAIN_RECORD_TYPE_ID = '012000000000000AAA';
|
|
9205
9205
|
const DMO_API_NAME_SUFFIX = '__dlm';
|
|
9206
9206
|
function isGraphNode(node) {
|
|
9207
9207
|
return node !== null && node.type === 'Node';
|
|
@@ -9312,11 +9312,10 @@ function getObjectMetadata(luvio, record) {
|
|
|
9312
9312
|
*/
|
|
9313
9313
|
function fixRecordTypes(luvio, record) {
|
|
9314
9314
|
// non-master record types should always be correct
|
|
9315
|
-
if (record.recordTypeId ===
|
|
9315
|
+
if (record.recordTypeId === MAIN_RECORD_TYPE_ID) {
|
|
9316
9316
|
const key = keyBuilder$3c(luvio, { recordId: record.id });
|
|
9317
9317
|
const recordNode = luvio.getNode(key);
|
|
9318
|
-
if (isGraphNode(recordNode) &&
|
|
9319
|
-
recordNode.scalar('recordTypeId') !== MASTER_RECORD_TYPE_ID) {
|
|
9318
|
+
if (isGraphNode(recordNode) && recordNode.scalar('recordTypeId') !== MAIN_RECORD_TYPE_ID) {
|
|
9320
9319
|
// ignore bogus incoming record type information & keep what we have
|
|
9321
9320
|
record.recordTypeId = recordNode.scalar('recordTypeId');
|
|
9322
9321
|
record.recordTypeInfo = recordNode.object('recordTypeInfo').data;
|
package/dist/adsBridge.js
CHANGED
|
@@ -54,7 +54,7 @@ function isStoreKeyRecordId(key) {
|
|
|
54
54
|
// No need to pass the actual record key `luvio.ingestStore`. The `RecordRepresentation.ts#ingest`
|
|
55
55
|
// function extracts the appropriate record id from the ingested record.
|
|
56
56
|
const INGEST_KEY = '';
|
|
57
|
-
const
|
|
57
|
+
const MAIN_RECORD_TYPE_ID = '012000000000000AAA';
|
|
58
58
|
const DMO_API_NAME_SUFFIX = '__dlm';
|
|
59
59
|
function isGraphNode(node) {
|
|
60
60
|
return node !== null && node.type === 'Node';
|
|
@@ -165,11 +165,10 @@ function getObjectMetadata(luvio, record) {
|
|
|
165
165
|
*/
|
|
166
166
|
function fixRecordTypes(luvio, record) {
|
|
167
167
|
// non-master record types should always be correct
|
|
168
|
-
if (record.recordTypeId ===
|
|
168
|
+
if (record.recordTypeId === MAIN_RECORD_TYPE_ID) {
|
|
169
169
|
const key = keyBuilderRecord(luvio, { recordId: record.id });
|
|
170
170
|
const recordNode = luvio.getNode(key);
|
|
171
|
-
if (isGraphNode(recordNode) &&
|
|
172
|
-
recordNode.scalar('recordTypeId') !== MASTER_RECORD_TYPE_ID) {
|
|
171
|
+
if (isGraphNode(recordNode) && recordNode.scalar('recordTypeId') !== MAIN_RECORD_TYPE_ID) {
|
|
173
172
|
// ignore bogus incoming record type information & keep what we have
|
|
174
173
|
record.recordTypeId = recordNode.scalar('recordTypeId');
|
|
175
174
|
record.recordTypeInfo = recordNode.object('recordTypeInfo').data;
|
|
@@ -372,4 +371,4 @@ function withAdsBridge(callback) {
|
|
|
372
371
|
}
|
|
373
372
|
|
|
374
373
|
export { instrument, withAdsBridge };
|
|
375
|
-
// version: 1.
|
|
374
|
+
// version: 1.269.0-b2ea86b9d
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-ads-bridge",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.269.0",
|
|
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",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-ads-bridge"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
33
|
-
"@salesforce/lds-uiapi-record-utils": "^1.
|
|
32
|
+
"@salesforce/lds-adapters-uiapi": "^1.269.0",
|
|
33
|
+
"@salesforce/lds-uiapi-record-utils": "^1.269.0"
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -17,7 +17,7 @@ function createBridge() {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
// constants for record type tests
|
|
20
|
-
const
|
|
20
|
+
const MAIN_RECORD_TYPE_ID = '012000000000000AAA';
|
|
21
21
|
|
|
22
22
|
const nonMasterRecordTypeInfo = {
|
|
23
23
|
available: true,
|
|
@@ -152,7 +152,7 @@ describe('AdsBridge', () => {
|
|
|
152
152
|
bridge.addRecords([
|
|
153
153
|
createRecord({
|
|
154
154
|
id: '123',
|
|
155
|
-
recordTypeId:
|
|
155
|
+
recordTypeId: MAIN_RECORD_TYPE_ID,
|
|
156
156
|
recordTypeInfo: null,
|
|
157
157
|
}),
|
|
158
158
|
]);
|
|
@@ -172,7 +172,7 @@ describe('AdsBridge', () => {
|
|
|
172
172
|
luvio,
|
|
173
173
|
createRecord({
|
|
174
174
|
id: '123',
|
|
175
|
-
recordTypeId:
|
|
175
|
+
recordTypeId: MAIN_RECORD_TYPE_ID,
|
|
176
176
|
recordTypeInfo: null,
|
|
177
177
|
})
|
|
178
178
|
);
|
|
@@ -200,14 +200,14 @@ describe('AdsBridge', () => {
|
|
|
200
200
|
luvio,
|
|
201
201
|
createRecord({
|
|
202
202
|
id: '123',
|
|
203
|
-
recordTypeId:
|
|
203
|
+
recordTypeId: MAIN_RECORD_TYPE_ID,
|
|
204
204
|
recordTypeInfo: null,
|
|
205
205
|
fields: {
|
|
206
206
|
Child: {
|
|
207
207
|
displayValue: null,
|
|
208
208
|
value: createRecord({
|
|
209
209
|
id: '456',
|
|
210
|
-
recordTypeId:
|
|
210
|
+
recordTypeId: MAIN_RECORD_TYPE_ID,
|
|
211
211
|
recordTypeInfo: null,
|
|
212
212
|
}),
|
|
213
213
|
},
|
|
@@ -219,7 +219,7 @@ describe('AdsBridge', () => {
|
|
|
219
219
|
// same as above, except child now has non-master record type
|
|
220
220
|
createRecord({
|
|
221
221
|
id: '123',
|
|
222
|
-
recordTypeId:
|
|
222
|
+
recordTypeId: MAIN_RECORD_TYPE_ID,
|
|
223
223
|
recordTypeInfo: null,
|
|
224
224
|
fields: {
|
|
225
225
|
Child: {
|
|
@@ -236,7 +236,7 @@ describe('AdsBridge', () => {
|
|
|
236
236
|
|
|
237
237
|
expect(queryRecord(luvio, { recordId: '123' })).toMatchObject({
|
|
238
238
|
data: {
|
|
239
|
-
recordTypeId:
|
|
239
|
+
recordTypeId: MAIN_RECORD_TYPE_ID,
|
|
240
240
|
recordTypeInfo: null,
|
|
241
241
|
fields: {
|
|
242
242
|
Child: {
|
package/src/ads-bridge.ts
CHANGED
|
@@ -33,7 +33,7 @@ import { RECORD_ID_PREFIX, isStoreKeyRecordId } from '@salesforce/lds-uiapi-reco
|
|
|
33
33
|
// function extracts the appropriate record id from the ingested record.
|
|
34
34
|
const INGEST_KEY = '';
|
|
35
35
|
|
|
36
|
-
const
|
|
36
|
+
const MAIN_RECORD_TYPE_ID = '012000000000000AAA';
|
|
37
37
|
|
|
38
38
|
const DMO_API_NAME_SUFFIX = '__dlm';
|
|
39
39
|
|
|
@@ -220,14 +220,11 @@ function getObjectMetadata(luvio: Luvio, record: RecordRepresentation): ObjectMe
|
|
|
220
220
|
*/
|
|
221
221
|
function fixRecordTypes(luvio: Luvio, record: RecordRepresentation): void {
|
|
222
222
|
// non-master record types should always be correct
|
|
223
|
-
if (record.recordTypeId ===
|
|
223
|
+
if (record.recordTypeId === MAIN_RECORD_TYPE_ID) {
|
|
224
224
|
const key = keyBuilderRecord(luvio, { recordId: record.id });
|
|
225
225
|
const recordNode = luvio.getNode<RecordRepresentationNormalized, RecordRepresentation>(key);
|
|
226
226
|
|
|
227
|
-
if (
|
|
228
|
-
isGraphNode(recordNode) &&
|
|
229
|
-
recordNode.scalar('recordTypeId') !== MASTER_RECORD_TYPE_ID
|
|
230
|
-
) {
|
|
227
|
+
if (isGraphNode(recordNode) && recordNode.scalar('recordTypeId') !== MAIN_RECORD_TYPE_ID) {
|
|
231
228
|
// ignore bogus incoming record type information & keep what we have
|
|
232
229
|
record.recordTypeId = recordNode.scalar('recordTypeId');
|
|
233
230
|
record.recordTypeInfo = recordNode.object('recordTypeInfo').data;
|