@salesforce/lds-runtime-mobile 1.257.0 → 1.259.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 +27 -11
- package/package.json +16 -16
- package/sfdc/main.js +27 -11
package/dist/main.js
CHANGED
|
@@ -789,21 +789,27 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
|
|
|
789
789
|
const durableRecords = create$6(null);
|
|
790
790
|
const refreshedDurableRecords = create$6(null);
|
|
791
791
|
const evictedRecords = create$6(null);
|
|
792
|
-
const {
|
|
792
|
+
const { visitedIds, refreshedIds } = store.fallbackStringKeyInMemoryStore;
|
|
793
793
|
// TODO: W-8909393 Once metadata is stored in its own segment we need to
|
|
794
794
|
// call setEntries for the visitedIds on default segment and call setEntries
|
|
795
795
|
// on the metadata segment for the refreshedIds
|
|
796
796
|
const keys$1 = keys$7({ ...visitedIds, ...refreshedIds });
|
|
797
797
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
798
798
|
const key = keys$1[i];
|
|
799
|
-
const
|
|
799
|
+
const canonicalKey = store.getCanonicalRecordId(key);
|
|
800
|
+
// this record has been redirected, evict the original
|
|
801
|
+
if (canonicalKey !== key) {
|
|
802
|
+
evictedRecords[key] = true;
|
|
803
|
+
continue;
|
|
804
|
+
}
|
|
805
|
+
const record = store.readEntry(key);
|
|
800
806
|
const wasVisited = visitedIds[key] !== undefined;
|
|
801
807
|
// this record has been evicted, evict from DS
|
|
802
808
|
if (wasVisited && record === undefined) {
|
|
803
809
|
evictedRecords[key] = true;
|
|
804
810
|
continue;
|
|
805
811
|
}
|
|
806
|
-
const metadata =
|
|
812
|
+
const metadata = store.readMetadata(key);
|
|
807
813
|
const entries = wasVisited === true || enableDurableMetadataRefresh === false
|
|
808
814
|
? durableRecords
|
|
809
815
|
: refreshedDurableRecords;
|
|
@@ -1234,17 +1240,17 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1234
1240
|
};
|
|
1235
1241
|
const getNode = function (key) {
|
|
1236
1242
|
validateNotDisposed();
|
|
1237
|
-
if (stagingStore
|
|
1238
|
-
|
|
1243
|
+
if (stagingStore !== null) {
|
|
1244
|
+
return environment.getNode(key, stagingStore);
|
|
1239
1245
|
}
|
|
1240
|
-
return environment.getNode(key
|
|
1246
|
+
return environment.getNode(key);
|
|
1241
1247
|
};
|
|
1242
1248
|
const wrapNormalizedGraphNode = function (normalized, key) {
|
|
1243
1249
|
validateNotDisposed();
|
|
1244
|
-
if (stagingStore
|
|
1245
|
-
|
|
1250
|
+
if (stagingStore !== null) {
|
|
1251
|
+
return environment.wrapNormalizedGraphNode(normalized, key, stagingStore);
|
|
1246
1252
|
}
|
|
1247
|
-
return environment.wrapNormalizedGraphNode(normalized, key
|
|
1253
|
+
return environment.wrapNormalizedGraphNode(normalized, key);
|
|
1248
1254
|
};
|
|
1249
1255
|
const rebuildSnapshot = function (snapshot, onRebuild) {
|
|
1250
1256
|
validateNotDisposed();
|
|
@@ -2886,6 +2892,7 @@ function isScalarDataType(type) {
|
|
|
2886
2892
|
'Email',
|
|
2887
2893
|
'TextArea',
|
|
2888
2894
|
'Percent',
|
|
2895
|
+
'EncryptedString',
|
|
2889
2896
|
].includes(type);
|
|
2890
2897
|
}
|
|
2891
2898
|
|
|
@@ -6150,6 +6157,10 @@ class AbstractResourceRequestActionHandler {
|
|
|
6150
6157
|
...updatedAction.data.body.fields,
|
|
6151
6158
|
LastModifiedDate: new Date(updatedAction.timestamp).toISOString(),
|
|
6152
6159
|
};
|
|
6160
|
+
if (this.hasIdempotencySupport() &&
|
|
6161
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY]) {
|
|
6162
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
6163
|
+
}
|
|
6153
6164
|
shouldRetry = true;
|
|
6154
6165
|
actionDataChanged = true;
|
|
6155
6166
|
}
|
|
@@ -9761,6 +9772,8 @@ function dataTypeToType(objectInfoDataType, apiName) {
|
|
|
9761
9772
|
return 'PercentValue';
|
|
9762
9773
|
case 'Int':
|
|
9763
9774
|
return 'IntValue';
|
|
9775
|
+
case 'EncryptedString':
|
|
9776
|
+
return 'EncryptedStringValue';
|
|
9764
9777
|
// ! do the rest of the custom types
|
|
9765
9778
|
default:
|
|
9766
9779
|
return 'String';
|
|
@@ -14627,7 +14640,10 @@ function isErrorResponse(response) {
|
|
|
14627
14640
|
* @returns the merged record
|
|
14628
14641
|
*/
|
|
14629
14642
|
function mergeAggregateUiResponse(response, mergeFunc) {
|
|
14630
|
-
|
|
14643
|
+
if (response.ok === false) {
|
|
14644
|
+
return response;
|
|
14645
|
+
}
|
|
14646
|
+
const body = response.body;
|
|
14631
14647
|
try {
|
|
14632
14648
|
if (body === null ||
|
|
14633
14649
|
body === undefined ||
|
|
@@ -17674,4 +17690,4 @@ register({
|
|
|
17674
17690
|
});
|
|
17675
17691
|
|
|
17676
17692
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17677
|
-
// version: 1.
|
|
17693
|
+
// version: 1.259.0-921ca6033
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.259.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.259.0",
|
|
36
|
+
"@salesforce/lds-bindings": "^1.259.0",
|
|
37
|
+
"@salesforce/lds-instrumentation": "^1.259.0",
|
|
38
|
+
"@salesforce/lds-priming": "^1.259.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.259.0",
|
|
44
|
+
"@salesforce/lds-drafts": "^1.259.0",
|
|
45
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.259.0",
|
|
46
|
+
"@salesforce/lds-graphql-eval": "^1.259.0",
|
|
47
|
+
"@salesforce/lds-network-adapter": "^1.259.0",
|
|
48
|
+
"@salesforce/lds-network-nimbus": "^1.259.0",
|
|
49
|
+
"@salesforce/lds-store-binary": "^1.259.0",
|
|
50
|
+
"@salesforce/lds-store-nimbus": "^1.259.0",
|
|
51
|
+
"@salesforce/lds-store-sql": "^1.259.0",
|
|
52
|
+
"@salesforce/lds-utils-adapters": "^1.259.0",
|
|
53
|
+
"@salesforce/nimbus-plugin-lds": "^1.259.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
|
@@ -789,21 +789,27 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
|
|
|
789
789
|
const durableRecords = create$6(null);
|
|
790
790
|
const refreshedDurableRecords = create$6(null);
|
|
791
791
|
const evictedRecords = create$6(null);
|
|
792
|
-
const {
|
|
792
|
+
const { visitedIds, refreshedIds } = store.fallbackStringKeyInMemoryStore;
|
|
793
793
|
// TODO: W-8909393 Once metadata is stored in its own segment we need to
|
|
794
794
|
// call setEntries for the visitedIds on default segment and call setEntries
|
|
795
795
|
// on the metadata segment for the refreshedIds
|
|
796
796
|
const keys$1 = keys$7({ ...visitedIds, ...refreshedIds });
|
|
797
797
|
for (let i = 0, len = keys$1.length; i < len; i += 1) {
|
|
798
798
|
const key = keys$1[i];
|
|
799
|
-
const
|
|
799
|
+
const canonicalKey = store.getCanonicalRecordId(key);
|
|
800
|
+
// this record has been redirected, evict the original
|
|
801
|
+
if (canonicalKey !== key) {
|
|
802
|
+
evictedRecords[key] = true;
|
|
803
|
+
continue;
|
|
804
|
+
}
|
|
805
|
+
const record = store.readEntry(key);
|
|
800
806
|
const wasVisited = visitedIds[key] !== undefined;
|
|
801
807
|
// this record has been evicted, evict from DS
|
|
802
808
|
if (wasVisited && record === undefined) {
|
|
803
809
|
evictedRecords[key] = true;
|
|
804
810
|
continue;
|
|
805
811
|
}
|
|
806
|
-
const metadata =
|
|
812
|
+
const metadata = store.readMetadata(key);
|
|
807
813
|
const entries = wasVisited === true || enableDurableMetadataRefresh === false
|
|
808
814
|
? durableRecords
|
|
809
815
|
: refreshedDurableRecords;
|
|
@@ -1234,17 +1240,17 @@ function makeDurable(environment, { durableStore, instrumentation, useRevivingSt
|
|
|
1234
1240
|
};
|
|
1235
1241
|
const getNode = function (key) {
|
|
1236
1242
|
validateNotDisposed();
|
|
1237
|
-
if (stagingStore
|
|
1238
|
-
|
|
1243
|
+
if (stagingStore !== null) {
|
|
1244
|
+
return environment.getNode(key, stagingStore);
|
|
1239
1245
|
}
|
|
1240
|
-
return environment.getNode(key
|
|
1246
|
+
return environment.getNode(key);
|
|
1241
1247
|
};
|
|
1242
1248
|
const wrapNormalizedGraphNode = function (normalized, key) {
|
|
1243
1249
|
validateNotDisposed();
|
|
1244
|
-
if (stagingStore
|
|
1245
|
-
|
|
1250
|
+
if (stagingStore !== null) {
|
|
1251
|
+
return environment.wrapNormalizedGraphNode(normalized, key, stagingStore);
|
|
1246
1252
|
}
|
|
1247
|
-
return environment.wrapNormalizedGraphNode(normalized, key
|
|
1253
|
+
return environment.wrapNormalizedGraphNode(normalized, key);
|
|
1248
1254
|
};
|
|
1249
1255
|
const rebuildSnapshot = function (snapshot, onRebuild) {
|
|
1250
1256
|
validateNotDisposed();
|
|
@@ -2886,6 +2892,7 @@ function isScalarDataType(type) {
|
|
|
2886
2892
|
'Email',
|
|
2887
2893
|
'TextArea',
|
|
2888
2894
|
'Percent',
|
|
2895
|
+
'EncryptedString',
|
|
2889
2896
|
].includes(type);
|
|
2890
2897
|
}
|
|
2891
2898
|
|
|
@@ -6150,6 +6157,10 @@ class AbstractResourceRequestActionHandler {
|
|
|
6150
6157
|
...updatedAction.data.body.fields,
|
|
6151
6158
|
LastModifiedDate: new Date(updatedAction.timestamp).toISOString(),
|
|
6152
6159
|
};
|
|
6160
|
+
if (this.hasIdempotencySupport() &&
|
|
6161
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY]) {
|
|
6162
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
6163
|
+
}
|
|
6153
6164
|
shouldRetry = true;
|
|
6154
6165
|
actionDataChanged = true;
|
|
6155
6166
|
}
|
|
@@ -9761,6 +9772,8 @@ function dataTypeToType(objectInfoDataType, apiName) {
|
|
|
9761
9772
|
return 'PercentValue';
|
|
9762
9773
|
case 'Int':
|
|
9763
9774
|
return 'IntValue';
|
|
9775
|
+
case 'EncryptedString':
|
|
9776
|
+
return 'EncryptedStringValue';
|
|
9764
9777
|
// ! do the rest of the custom types
|
|
9765
9778
|
default:
|
|
9766
9779
|
return 'String';
|
|
@@ -14627,7 +14640,10 @@ function isErrorResponse(response) {
|
|
|
14627
14640
|
* @returns the merged record
|
|
14628
14641
|
*/
|
|
14629
14642
|
function mergeAggregateUiResponse(response, mergeFunc) {
|
|
14630
|
-
|
|
14643
|
+
if (response.ok === false) {
|
|
14644
|
+
return response;
|
|
14645
|
+
}
|
|
14646
|
+
const body = response.body;
|
|
14631
14647
|
try {
|
|
14632
14648
|
if (body === null ||
|
|
14633
14649
|
body === undefined ||
|
|
@@ -17674,4 +17690,4 @@ register({
|
|
|
17674
17690
|
});
|
|
17675
17691
|
|
|
17676
17692
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17677
|
-
// version: 1.
|
|
17693
|
+
// version: 1.259.0-921ca6033
|