@salesforce/lds-runtime-mobile 1.256.0 → 1.258.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 +24 -11
- package/package.json +16 -16
- package/sfdc/main.js +24 -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();
|
|
@@ -6150,6 +6156,10 @@ class AbstractResourceRequestActionHandler {
|
|
|
6150
6156
|
...updatedAction.data.body.fields,
|
|
6151
6157
|
LastModifiedDate: new Date(updatedAction.timestamp).toISOString(),
|
|
6152
6158
|
};
|
|
6159
|
+
if (this.hasIdempotencySupport() &&
|
|
6160
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY]) {
|
|
6161
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
6162
|
+
}
|
|
6153
6163
|
shouldRetry = true;
|
|
6154
6164
|
actionDataChanged = true;
|
|
6155
6165
|
}
|
|
@@ -14627,7 +14637,10 @@ function isErrorResponse(response) {
|
|
|
14627
14637
|
* @returns the merged record
|
|
14628
14638
|
*/
|
|
14629
14639
|
function mergeAggregateUiResponse(response, mergeFunc) {
|
|
14630
|
-
|
|
14640
|
+
if (response.ok === false) {
|
|
14641
|
+
return response;
|
|
14642
|
+
}
|
|
14643
|
+
const body = response.body;
|
|
14631
14644
|
try {
|
|
14632
14645
|
if (body === null ||
|
|
14633
14646
|
body === undefined ||
|
|
@@ -17674,4 +17687,4 @@ register({
|
|
|
17674
17687
|
});
|
|
17675
17688
|
|
|
17676
17689
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17677
|
-
// version: 1.
|
|
17690
|
+
// version: 1.258.0-69570a3e6
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-mobile",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.258.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.258.0",
|
|
36
|
+
"@salesforce/lds-bindings": "^1.258.0",
|
|
37
|
+
"@salesforce/lds-instrumentation": "^1.258.0",
|
|
38
|
+
"@salesforce/lds-priming": "^1.258.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.258.0",
|
|
44
|
+
"@salesforce/lds-drafts": "^1.258.0",
|
|
45
|
+
"@salesforce/lds-drafts-adapters-uiapi": "^1.258.0",
|
|
46
|
+
"@salesforce/lds-graphql-eval": "^1.258.0",
|
|
47
|
+
"@salesforce/lds-network-adapter": "^1.258.0",
|
|
48
|
+
"@salesforce/lds-network-nimbus": "^1.258.0",
|
|
49
|
+
"@salesforce/lds-store-binary": "^1.258.0",
|
|
50
|
+
"@salesforce/lds-store-nimbus": "^1.258.0",
|
|
51
|
+
"@salesforce/lds-store-sql": "^1.258.0",
|
|
52
|
+
"@salesforce/lds-utils-adapters": "^1.258.0",
|
|
53
|
+
"@salesforce/nimbus-plugin-lds": "^1.258.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();
|
|
@@ -6150,6 +6156,10 @@ class AbstractResourceRequestActionHandler {
|
|
|
6150
6156
|
...updatedAction.data.body.fields,
|
|
6151
6157
|
LastModifiedDate: new Date(updatedAction.timestamp).toISOString(),
|
|
6152
6158
|
};
|
|
6159
|
+
if (this.hasIdempotencySupport() &&
|
|
6160
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY]) {
|
|
6161
|
+
updatedAction.data.headers[HTTP_HEADER_IDEMPOTENCY_KEY] = uuidv4();
|
|
6162
|
+
}
|
|
6153
6163
|
shouldRetry = true;
|
|
6154
6164
|
actionDataChanged = true;
|
|
6155
6165
|
}
|
|
@@ -14627,7 +14637,10 @@ function isErrorResponse(response) {
|
|
|
14627
14637
|
* @returns the merged record
|
|
14628
14638
|
*/
|
|
14629
14639
|
function mergeAggregateUiResponse(response, mergeFunc) {
|
|
14630
|
-
|
|
14640
|
+
if (response.ok === false) {
|
|
14641
|
+
return response;
|
|
14642
|
+
}
|
|
14643
|
+
const body = response.body;
|
|
14631
14644
|
try {
|
|
14632
14645
|
if (body === null ||
|
|
14633
14646
|
body === undefined ||
|
|
@@ -17674,4 +17687,4 @@ register({
|
|
|
17674
17687
|
});
|
|
17675
17688
|
|
|
17676
17689
|
export { O11Y_NAMESPACE_LDS_MOBILE, getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
17677
|
-
// version: 1.
|
|
17690
|
+
// version: 1.258.0-69570a3e6
|