@salesforce/lds-runtime-mobile 1.142.0 → 1.142.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/main.js +12 -10
- package/package.json +1 -1
- package/sfdc/main.js +12 -10
package/dist/main.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { withRegistration, register } from '@salesforce/lds-default-luvio';
|
|
15
15
|
import { setupInstrumentation, instrumentAdapter as instrumentAdapter$1, instrumentLuvio, setLdsAdaptersUiapiInstrumentation, setLdsNetworkAdapterInstrumentation } from '@salesforce/lds-instrumentation';
|
|
16
|
-
import { HttpStatusCode,
|
|
16
|
+
import { HttpStatusCode, StoreKeySet, serializeStructuredKey, Reader, deepFreeze, emitAdapterEvent, createCustomAdapterEventEmitter, StoreKeyMap, isFileReference, Environment, Luvio, InMemoryStore } from '@luvio/engine';
|
|
17
17
|
import { parseAndVisit, Kind, visit, execute, buildSchema, isObjectType, defaultFieldResolver } from '@luvio/graphql-parser';
|
|
18
18
|
import { getRecordId18, keyBuilderQuickActionExecutionRepresentation, ingestQuickActionExecutionRepresentation, keyBuilderContentDocumentCompositeRepresentation, getResponseCacheKeysContentDocumentCompositeRepresentation, keyBuilderFromTypeContentDocumentCompositeRepresentation, ingestContentDocumentCompositeRepresentation, keyBuilderRecord, getTypeCacheKeysRecord, keyBuilderFromTypeRecordRepresentation, ingestRecord, RecordRepresentationRepresentationType, ObjectInfoRepresentationType, getRecordAdapterFactory, getObjectInfoAdapterFactory, getObjectInfosAdapterFactory, UiApiNamespace, RecordRepresentationType, RecordRepresentationTTL, RecordRepresentationVersion } from '@salesforce/lds-adapters-uiapi';
|
|
19
19
|
import caseSensitiveUserId from '@salesforce/user/Id';
|
|
@@ -758,7 +758,7 @@ class DurableTTLStore {
|
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
|
|
761
|
-
function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler) {
|
|
761
|
+
function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, additionalDurableStoreOperations = []) {
|
|
762
762
|
const durableRecords = create$5(null);
|
|
763
763
|
const evictedRecords = create$5(null);
|
|
764
764
|
const { records, metadata: storeMetadata, visitedIds, refreshedIds, } = store.fallbackStringKeyInMemoryStore;
|
|
@@ -785,7 +785,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
|
|
|
785
785
|
};
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
|
-
const durableStoreOperations =
|
|
788
|
+
const durableStoreOperations = additionalDurableStoreOperations;
|
|
789
789
|
// publishes
|
|
790
790
|
const recordKeys = keys$6(durableRecords);
|
|
791
791
|
if (recordKeys.length > 0) {
|
|
@@ -888,7 +888,8 @@ function isUnfulfilledSnapshot(cachedSnapshotResult) {
|
|
|
888
888
|
}
|
|
889
889
|
/**
|
|
890
890
|
* Configures the environment to persist data into a durable store and attempt to resolve
|
|
891
|
-
* data from the persistent store before hitting the network.
|
|
891
|
+
* data from the persistent store before hitting the network. Sets the default
|
|
892
|
+
* cache policy to stale-while-revalidate with infinite staleDuration.
|
|
892
893
|
*
|
|
893
894
|
* @param environment The base environment
|
|
894
895
|
* @param durableStore A DurableStore implementation
|
|
@@ -1028,12 +1029,12 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
1028
1029
|
// call the base storeBroadcast
|
|
1029
1030
|
return publishChangesToDurableStore();
|
|
1030
1031
|
};
|
|
1031
|
-
const publishChangesToDurableStore = function () {
|
|
1032
|
+
const publishChangesToDurableStore = function (additionalDurableStoreOperations) {
|
|
1032
1033
|
validateNotDisposed();
|
|
1033
1034
|
if (ingestStagingStore === null) {
|
|
1034
1035
|
return Promise.resolve();
|
|
1035
1036
|
}
|
|
1036
|
-
const promise = flushInMemoryStoreValuesToDurableStore(ingestStagingStore, durableStore, durableStoreErrorHandler);
|
|
1037
|
+
const promise = flushInMemoryStoreValuesToDurableStore(ingestStagingStore, durableStore, durableStoreErrorHandler, additionalDurableStoreOperations);
|
|
1037
1038
|
ingestStagingStore = null;
|
|
1038
1039
|
return promise;
|
|
1039
1040
|
};
|
|
@@ -1313,10 +1314,11 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
1313
1314
|
return entries;
|
|
1314
1315
|
});
|
|
1315
1316
|
};
|
|
1316
|
-
|
|
1317
|
+
// set the default cache policy of the base environment
|
|
1318
|
+
environment.setDefaultCachePolicy({
|
|
1317
1319
|
type: 'stale-while-revalidate',
|
|
1318
|
-
|
|
1319
|
-
};
|
|
1320
|
+
staleDurationSeconds: Number.MAX_SAFE_INTEGER,
|
|
1321
|
+
});
|
|
1320
1322
|
return create$5(environment, {
|
|
1321
1323
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
1322
1324
|
storeIngest: { value: storeIngest },
|
|
@@ -15883,4 +15885,4 @@ register({
|
|
|
15883
15885
|
});
|
|
15884
15886
|
|
|
15885
15887
|
export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
15886
|
-
// version: 1.142.
|
|
15888
|
+
// version: 1.142.1-d514db71e
|
package/package.json
CHANGED
package/sfdc/main.js
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import { withRegistration, register } from 'native/ldsEngineMobile';
|
|
15
15
|
import { setupInstrumentation, instrumentAdapter as instrumentAdapter$1, instrumentLuvio, setLdsAdaptersUiapiInstrumentation, setLdsNetworkAdapterInstrumentation } from 'force/ldsInstrumentation';
|
|
16
|
-
import { HttpStatusCode,
|
|
16
|
+
import { HttpStatusCode, StoreKeySet, serializeStructuredKey, Reader, deepFreeze, emitAdapterEvent, createCustomAdapterEventEmitter, StoreKeyMap, isFileReference, Environment, Luvio, InMemoryStore } from 'force/luvioEngine';
|
|
17
17
|
import { parseAndVisit, Kind, visit, execute, buildSchema, isObjectType, defaultFieldResolver } from 'force/ldsGraphqlParser';
|
|
18
18
|
import { getRecordId18, keyBuilderQuickActionExecutionRepresentation, ingestQuickActionExecutionRepresentation, keyBuilderContentDocumentCompositeRepresentation, getResponseCacheKeysContentDocumentCompositeRepresentation, keyBuilderFromTypeContentDocumentCompositeRepresentation, ingestContentDocumentCompositeRepresentation, keyBuilderRecord, getTypeCacheKeysRecord, keyBuilderFromTypeRecordRepresentation, ingestRecord, RecordRepresentationRepresentationType, ObjectInfoRepresentationType, getRecordAdapterFactory, getObjectInfoAdapterFactory, getObjectInfosAdapterFactory, UiApiNamespace, RecordRepresentationType, RecordRepresentationTTL, RecordRepresentationVersion } from 'force/ldsAdaptersUiapi';
|
|
19
19
|
import caseSensitiveUserId from '@salesforce/user/Id';
|
|
@@ -758,7 +758,7 @@ class DurableTTLStore {
|
|
|
758
758
|
}
|
|
759
759
|
}
|
|
760
760
|
|
|
761
|
-
function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler) {
|
|
761
|
+
function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStoreErrorHandler, additionalDurableStoreOperations = []) {
|
|
762
762
|
const durableRecords = create$5(null);
|
|
763
763
|
const evictedRecords = create$5(null);
|
|
764
764
|
const { records, metadata: storeMetadata, visitedIds, refreshedIds, } = store.fallbackStringKeyInMemoryStore;
|
|
@@ -785,7 +785,7 @@ function flushInMemoryStoreValuesToDurableStore(store, durableStore, durableStor
|
|
|
785
785
|
};
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
|
-
const durableStoreOperations =
|
|
788
|
+
const durableStoreOperations = additionalDurableStoreOperations;
|
|
789
789
|
// publishes
|
|
790
790
|
const recordKeys = keys$6(durableRecords);
|
|
791
791
|
if (recordKeys.length > 0) {
|
|
@@ -888,7 +888,8 @@ function isUnfulfilledSnapshot(cachedSnapshotResult) {
|
|
|
888
888
|
}
|
|
889
889
|
/**
|
|
890
890
|
* Configures the environment to persist data into a durable store and attempt to resolve
|
|
891
|
-
* data from the persistent store before hitting the network.
|
|
891
|
+
* data from the persistent store before hitting the network. Sets the default
|
|
892
|
+
* cache policy to stale-while-revalidate with infinite staleDuration.
|
|
892
893
|
*
|
|
893
894
|
* @param environment The base environment
|
|
894
895
|
* @param durableStore A DurableStore implementation
|
|
@@ -1028,12 +1029,12 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
1028
1029
|
// call the base storeBroadcast
|
|
1029
1030
|
return publishChangesToDurableStore();
|
|
1030
1031
|
};
|
|
1031
|
-
const publishChangesToDurableStore = function () {
|
|
1032
|
+
const publishChangesToDurableStore = function (additionalDurableStoreOperations) {
|
|
1032
1033
|
validateNotDisposed();
|
|
1033
1034
|
if (ingestStagingStore === null) {
|
|
1034
1035
|
return Promise.resolve();
|
|
1035
1036
|
}
|
|
1036
|
-
const promise = flushInMemoryStoreValuesToDurableStore(ingestStagingStore, durableStore, durableStoreErrorHandler);
|
|
1037
|
+
const promise = flushInMemoryStoreValuesToDurableStore(ingestStagingStore, durableStore, durableStoreErrorHandler, additionalDurableStoreOperations);
|
|
1037
1038
|
ingestStagingStore = null;
|
|
1038
1039
|
return promise;
|
|
1039
1040
|
};
|
|
@@ -1313,10 +1314,11 @@ function makeDurable(environment, { durableStore, instrumentation }) {
|
|
|
1313
1314
|
return entries;
|
|
1314
1315
|
});
|
|
1315
1316
|
};
|
|
1316
|
-
|
|
1317
|
+
// set the default cache policy of the base environment
|
|
1318
|
+
environment.setDefaultCachePolicy({
|
|
1317
1319
|
type: 'stale-while-revalidate',
|
|
1318
|
-
|
|
1319
|
-
};
|
|
1320
|
+
staleDurationSeconds: Number.MAX_SAFE_INTEGER,
|
|
1321
|
+
});
|
|
1320
1322
|
return create$5(environment, {
|
|
1321
1323
|
publishStoreMetadata: { value: publishStoreMetadata },
|
|
1322
1324
|
storeIngest: { value: storeIngest },
|
|
@@ -15883,4 +15885,4 @@ register({
|
|
|
15883
15885
|
});
|
|
15884
15886
|
|
|
15885
15887
|
export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
15886
|
-
// version: 1.142.
|
|
15888
|
+
// version: 1.142.1-d514db71e
|