@salesforce/lds-runtime-mobile 1.266.0-dev14 → 1.266.0-dev16
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 +15 -4
- package/package.json +16 -16
- package/sfdc/main.js +15 -4
package/dist/main.js
CHANGED
|
@@ -16788,6 +16788,7 @@ function findReferenceFieldForSpanningField(fieldName, objectInfo) {
|
|
|
16788
16788
|
function buildFieldUnionArray(existingRecord, incomingRecord, objectInfo) {
|
|
16789
16789
|
const allFields = Array.from(new Set([...Object.keys(existingRecord.fields), ...Object.keys(incomingRecord.fields)]));
|
|
16790
16790
|
const fieldUnion = [];
|
|
16791
|
+
let includesSpanningFields = false;
|
|
16791
16792
|
allFields.forEach((fieldName) => {
|
|
16792
16793
|
const objectInfoField = objectInfo.fields[fieldName];
|
|
16793
16794
|
if (objectInfoField === undefined) {
|
|
@@ -16795,13 +16796,14 @@ function buildFieldUnionArray(existingRecord, incomingRecord, objectInfo) {
|
|
|
16795
16796
|
const referenceField = findReferenceFieldForSpanningField(fieldName, objectInfo);
|
|
16796
16797
|
if (referenceField !== undefined) {
|
|
16797
16798
|
fieldUnion.push(`${fieldName}.Id`);
|
|
16799
|
+
includesSpanningFields = true;
|
|
16798
16800
|
}
|
|
16799
16801
|
}
|
|
16800
16802
|
else {
|
|
16801
16803
|
fieldUnion.push(fieldName);
|
|
16802
16804
|
}
|
|
16803
16805
|
});
|
|
16804
|
-
return fieldUnion;
|
|
16806
|
+
return { fields: fieldUnion, includesSpanningFields };
|
|
16805
16807
|
}
|
|
16806
16808
|
/**
|
|
16807
16809
|
* Merges (if possible) an incoming record from a priming session with an existing record in the durable store.
|
|
@@ -16833,7 +16835,7 @@ function mergeRecord(existingRecord, incomingRecord, objectInfo) {
|
|
|
16833
16835
|
ok: false,
|
|
16834
16836
|
code: 'conflict-drafts',
|
|
16835
16837
|
hasDraft: true,
|
|
16836
|
-
fieldUnion: buildFieldUnionArray(existingRecord, incomingRecord, objectInfo),
|
|
16838
|
+
fieldUnion: buildFieldUnionArray(existingRecord, incomingRecord, objectInfo).fields,
|
|
16837
16839
|
};
|
|
16838
16840
|
}
|
|
16839
16841
|
// Check if incoming record's Etag is equal to the existing one
|
|
@@ -16895,10 +16897,19 @@ function mergeRecord(existingRecord, incomingRecord, objectInfo) {
|
|
|
16895
16897
|
};
|
|
16896
16898
|
}
|
|
16897
16899
|
// If Etags do not match and the incoming record does not contain all fields, re-request the record
|
|
16900
|
+
const { fields, includesSpanningFields } = buildFieldUnionArray(existingRecord, incomingRecord, objectInfo);
|
|
16901
|
+
if (includesSpanningFields) {
|
|
16902
|
+
return {
|
|
16903
|
+
ok: false,
|
|
16904
|
+
code: 'conflict-spanning-record',
|
|
16905
|
+
fieldUnion: fields,
|
|
16906
|
+
hasDraft: false,
|
|
16907
|
+
};
|
|
16908
|
+
}
|
|
16898
16909
|
return {
|
|
16899
16910
|
ok: false,
|
|
16900
16911
|
code: 'conflict-missing-fields',
|
|
16901
|
-
fieldUnion:
|
|
16912
|
+
fieldUnion: fields,
|
|
16902
16913
|
hasDraft: false,
|
|
16903
16914
|
};
|
|
16904
16915
|
}
|
|
@@ -17951,4 +17962,4 @@ register({
|
|
|
17951
17962
|
});
|
|
17952
17963
|
|
|
17953
17964
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17954
|
-
// version: 1.266.0-
|
|
17965
|
+
// version: 1.266.0-dev16-a54e7da01
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.266.0-
|
|
3
|
+
"version": "1.266.0-dev16",
|
|
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.266.0-
|
|
36
|
-
"@salesforce/lds-bindings": "^1.266.0-
|
|
37
|
-
"@salesforce/lds-instrumentation": "^1.266.0-
|
|
38
|
-
"@salesforce/lds-priming": "^1.266.0-
|
|
35
|
+
"@salesforce/lds-adapters-uiapi": "^1.266.0-dev16",
|
|
36
|
+
"@salesforce/lds-bindings": "^1.266.0-dev16",
|
|
37
|
+
"@salesforce/lds-instrumentation": "^1.266.0-dev16",
|
|
38
|
+
"@salesforce/lds-priming": "^1.266.0-dev16",
|
|
39
39
|
"@salesforce/user": "0.0.21",
|
|
40
40
|
"o11y": "244.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"@salesforce/lds-adapters-graphql": "^1.266.0-
|
|
44
|
-
"@salesforce/lds-drafts": "^1.266.0-
|
|
45
|
-
"@salesforce/lds-drafts-adapters-uiapi": "^1.266.0-
|
|
46
|
-
"@salesforce/lds-graphql-eval": "^1.266.0-
|
|
47
|
-
"@salesforce/lds-network-adapter": "^1.266.0-
|
|
48
|
-
"@salesforce/lds-network-nimbus": "^1.266.0-
|
|
49
|
-
"@salesforce/lds-store-binary": "^1.266.0-
|
|
50
|
-
"@salesforce/lds-store-nimbus": "^1.266.0-
|
|
51
|
-
"@salesforce/lds-store-sql": "^1.266.0-
|
|
52
|
-
"@salesforce/lds-utils-adapters": "^1.266.0-
|
|
53
|
-
"@salesforce/nimbus-plugin-lds": "^1.266.0-
|
|
43
|
+
"@salesforce/lds-adapters-graphql": "^1.266.0-dev16",
|
|
44
|
+
"@salesforce/lds-drafts": "^1.266.0-dev16",
|
|
45
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.266.0-dev16",
|
|
46
|
+
"@salesforce/lds-graphql-eval": "^1.266.0-dev16",
|
|
47
|
+
"@salesforce/lds-network-adapter": "^1.266.0-dev16",
|
|
48
|
+
"@salesforce/lds-network-nimbus": "^1.266.0-dev16",
|
|
49
|
+
"@salesforce/lds-store-binary": "^1.266.0-dev16",
|
|
50
|
+
"@salesforce/lds-store-nimbus": "^1.266.0-dev16",
|
|
51
|
+
"@salesforce/lds-store-sql": "^1.266.0-dev16",
|
|
52
|
+
"@salesforce/lds-utils-adapters": "^1.266.0-dev16",
|
|
53
|
+
"@salesforce/nimbus-plugin-lds": "^1.266.0-dev16",
|
|
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
|
@@ -16788,6 +16788,7 @@ function findReferenceFieldForSpanningField(fieldName, objectInfo) {
|
|
|
16788
16788
|
function buildFieldUnionArray(existingRecord, incomingRecord, objectInfo) {
|
|
16789
16789
|
const allFields = Array.from(new Set([...Object.keys(existingRecord.fields), ...Object.keys(incomingRecord.fields)]));
|
|
16790
16790
|
const fieldUnion = [];
|
|
16791
|
+
let includesSpanningFields = false;
|
|
16791
16792
|
allFields.forEach((fieldName) => {
|
|
16792
16793
|
const objectInfoField = objectInfo.fields[fieldName];
|
|
16793
16794
|
if (objectInfoField === undefined) {
|
|
@@ -16795,13 +16796,14 @@ function buildFieldUnionArray(existingRecord, incomingRecord, objectInfo) {
|
|
|
16795
16796
|
const referenceField = findReferenceFieldForSpanningField(fieldName, objectInfo);
|
|
16796
16797
|
if (referenceField !== undefined) {
|
|
16797
16798
|
fieldUnion.push(`${fieldName}.Id`);
|
|
16799
|
+
includesSpanningFields = true;
|
|
16798
16800
|
}
|
|
16799
16801
|
}
|
|
16800
16802
|
else {
|
|
16801
16803
|
fieldUnion.push(fieldName);
|
|
16802
16804
|
}
|
|
16803
16805
|
});
|
|
16804
|
-
return fieldUnion;
|
|
16806
|
+
return { fields: fieldUnion, includesSpanningFields };
|
|
16805
16807
|
}
|
|
16806
16808
|
/**
|
|
16807
16809
|
* Merges (if possible) an incoming record from a priming session with an existing record in the durable store.
|
|
@@ -16833,7 +16835,7 @@ function mergeRecord(existingRecord, incomingRecord, objectInfo) {
|
|
|
16833
16835
|
ok: false,
|
|
16834
16836
|
code: 'conflict-drafts',
|
|
16835
16837
|
hasDraft: true,
|
|
16836
|
-
fieldUnion: buildFieldUnionArray(existingRecord, incomingRecord, objectInfo),
|
|
16838
|
+
fieldUnion: buildFieldUnionArray(existingRecord, incomingRecord, objectInfo).fields,
|
|
16837
16839
|
};
|
|
16838
16840
|
}
|
|
16839
16841
|
// Check if incoming record's Etag is equal to the existing one
|
|
@@ -16895,10 +16897,19 @@ function mergeRecord(existingRecord, incomingRecord, objectInfo) {
|
|
|
16895
16897
|
};
|
|
16896
16898
|
}
|
|
16897
16899
|
// If Etags do not match and the incoming record does not contain all fields, re-request the record
|
|
16900
|
+
const { fields, includesSpanningFields } = buildFieldUnionArray(existingRecord, incomingRecord, objectInfo);
|
|
16901
|
+
if (includesSpanningFields) {
|
|
16902
|
+
return {
|
|
16903
|
+
ok: false,
|
|
16904
|
+
code: 'conflict-spanning-record',
|
|
16905
|
+
fieldUnion: fields,
|
|
16906
|
+
hasDraft: false,
|
|
16907
|
+
};
|
|
16908
|
+
}
|
|
16898
16909
|
return {
|
|
16899
16910
|
ok: false,
|
|
16900
16911
|
code: 'conflict-missing-fields',
|
|
16901
|
-
fieldUnion:
|
|
16912
|
+
fieldUnion: fields,
|
|
16902
16913
|
hasDraft: false,
|
|
16903
16914
|
};
|
|
16904
16915
|
}
|
|
@@ -17951,4 +17962,4 @@ register({
|
|
|
17951
17962
|
});
|
|
17952
17963
|
|
|
17953
17964
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17954
|
-
// version: 1.266.0-
|
|
17965
|
+
// version: 1.266.0-dev16-a54e7da01
|