@salesforce/lds-runtime-mobile 1.134.2 → 1.134.4
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 +6 -6
- package/dist/types/__mocks__/o11y/activity.d.ts +11 -2
- package/dist/types/__mocks__/o11y/idleDetector.d.ts +18 -2
- package/dist/types/__mocks__/o11y/instrumentation.d.ts +5 -6
- package/package.json +1 -1
- package/sfdc/main.js +6 -6
- package/sfdc/types/__mocks__/o11y/activity.d.ts +11 -2
- package/sfdc/types/__mocks__/o11y/idleDetector.d.ts +18 -2
- package/sfdc/types/__mocks__/o11y/instrumentation.d.ts +5 -6
package/dist/main.js
CHANGED
|
@@ -626,10 +626,8 @@ function publishDurableStoreEntries(durableRecords, put, publishMetadata) {
|
|
|
626
626
|
* will refresh the snapshot from network, and then run the results from network
|
|
627
627
|
* through L2 ingestion, returning the subsequent revived snapshot.
|
|
628
628
|
*/
|
|
629
|
-
function reviveSnapshot(baseEnvironment, durableStore,
|
|
630
|
-
|
|
631
|
-
unavailableSnapshot, durableStoreErrorHandler, buildL1Snapshot, reviveMetrics = { l2Trips: [] }) {
|
|
632
|
-
const { recordId, select, seenRecords, state } = unavailableSnapshot;
|
|
629
|
+
function reviveSnapshot(baseEnvironment, durableStore, unavailableSnapshot, durableStoreErrorHandler, buildL1Snapshot, reviveMetrics = { l2Trips: [] }) {
|
|
630
|
+
const { recordId, select, missingLinks, seenRecords, state } = unavailableSnapshot;
|
|
633
631
|
// L2 can only revive Unfulfilled snapshots that have a selector since they have the
|
|
634
632
|
// info needed to revive (like missingLinks) and rebuild. Otherwise return L1 snapshot.
|
|
635
633
|
if (state !== 'Unfulfilled' || select === undefined) {
|
|
@@ -642,6 +640,7 @@ unavailableSnapshot, durableStoreErrorHandler, buildL1Snapshot, reviveMetrics =
|
|
|
642
640
|
// we attempt to read all keys from L2 - so combine recordId with any seenRecords
|
|
643
641
|
const keysToReviveSet = new StoreKeySet().add(recordId);
|
|
644
642
|
keysToReviveSet.merge(seenRecords);
|
|
643
|
+
keysToReviveSet.merge(missingLinks);
|
|
645
644
|
const keysToRevive = keysToReviveSet.keysAsArray();
|
|
646
645
|
const canonicalKeys = keysToRevive.map((x) => serializeStructuredKey(baseEnvironment.storeGetCanonicalKey(x)));
|
|
647
646
|
const start = Date.now();
|
|
@@ -675,10 +674,11 @@ unavailableSnapshot, durableStoreErrorHandler, buildL1Snapshot, reviveMetrics =
|
|
|
675
674
|
if (snapshot.state === 'Unfulfilled') {
|
|
676
675
|
// have to check if the new snapshot has any additional seenRecords
|
|
677
676
|
// and revive again if so
|
|
678
|
-
const { seenRecords: newSnapshotSeenRecords, recordId: newSnapshotRecordId } = snapshot;
|
|
677
|
+
const { seenRecords: newSnapshotSeenRecords, missingLinks: newSnapshotMissingLinks, recordId: newSnapshotRecordId, } = snapshot;
|
|
679
678
|
const newKeysToReviveSet = new StoreKeySet();
|
|
680
679
|
newKeysToReviveSet.add(newSnapshotRecordId);
|
|
681
680
|
newKeysToReviveSet.merge(newSnapshotSeenRecords);
|
|
681
|
+
newKeysToReviveSet.merge(newSnapshotMissingLinks);
|
|
682
682
|
const newKeys = newKeysToReviveSet.keysAsArray();
|
|
683
683
|
// in case DS returned additional entries we combine the requested
|
|
684
684
|
// and returned keys
|
|
@@ -15745,4 +15745,4 @@ register({
|
|
|
15745
15745
|
});
|
|
15746
15746
|
|
|
15747
15747
|
export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
15748
|
-
// version: 1.134.
|
|
15748
|
+
// version: 1.134.4-b3535d2e7
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare function stop(_userSchemaOrText?: any | string, _userData?: any): void;
|
|
2
|
+
declare function error(_error: Error, _userSchemaOrText?: any | string, _userData?: any): void;
|
|
3
|
+
declare function discard(): void;
|
|
4
|
+
declare function terminate(): void;
|
|
5
|
+
export declare const activity: {
|
|
6
|
+
stop: typeof stop;
|
|
7
|
+
error: typeof error;
|
|
8
|
+
discard: typeof discard;
|
|
9
|
+
terminate: typeof terminate;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare function requestIdleDetectedCallback(_callback: any): void;
|
|
2
|
+
declare function declareNotifierTaskSingle(_name: string): {
|
|
3
|
+
isBusy: boolean;
|
|
4
|
+
done: () => void;
|
|
5
|
+
};
|
|
6
|
+
declare function declareNotifierTaskMulti(_name: string, _existingBusyCount?: number): {
|
|
7
|
+
isBusy: boolean;
|
|
8
|
+
add: () => void;
|
|
9
|
+
done: () => void;
|
|
10
|
+
};
|
|
11
|
+
declare function declarePollableTaskMulti(_name: string, _isBusyChecker: any): void;
|
|
12
|
+
export declare const idleDetector: {
|
|
13
|
+
requestIdleDetectedCallback: typeof requestIdleDetectedCallback;
|
|
14
|
+
declareNotifierTaskSingle: typeof declareNotifierTaskSingle;
|
|
15
|
+
declareNotifierTaskMulti: typeof declareNotifierTaskMulti;
|
|
16
|
+
declarePollableTaskMulti: typeof declarePollableTaskMulti;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
declare function
|
|
3
|
-
declare function
|
|
4
|
-
declare function
|
|
5
|
-
declare function
|
|
6
|
-
declare function trackValue(_operation: string, _value: number, _hasError?: boolean, _tags?: MetricsTags): void;
|
|
1
|
+
declare function log(_schema: any, _data?: any): void;
|
|
2
|
+
declare function error(_err: Error, _userSchemaOrText?: string, _data?: any): void;
|
|
3
|
+
declare function startActivity(_name: string): any;
|
|
4
|
+
declare function incrementCounter(_operation: string, _increment?: number, _hasError?: boolean, _tags?: any): void;
|
|
5
|
+
declare function trackValue(_operation: string, _value: number, _hasError?: boolean, _tags?: any): void;
|
|
7
6
|
export declare const instrumentation: {
|
|
8
7
|
log: typeof log;
|
|
9
8
|
error: typeof error;
|
package/package.json
CHANGED
package/sfdc/main.js
CHANGED
|
@@ -626,10 +626,8 @@ function publishDurableStoreEntries(durableRecords, put, publishMetadata) {
|
|
|
626
626
|
* will refresh the snapshot from network, and then run the results from network
|
|
627
627
|
* through L2 ingestion, returning the subsequent revived snapshot.
|
|
628
628
|
*/
|
|
629
|
-
function reviveSnapshot(baseEnvironment, durableStore,
|
|
630
|
-
|
|
631
|
-
unavailableSnapshot, durableStoreErrorHandler, buildL1Snapshot, reviveMetrics = { l2Trips: [] }) {
|
|
632
|
-
const { recordId, select, seenRecords, state } = unavailableSnapshot;
|
|
629
|
+
function reviveSnapshot(baseEnvironment, durableStore, unavailableSnapshot, durableStoreErrorHandler, buildL1Snapshot, reviveMetrics = { l2Trips: [] }) {
|
|
630
|
+
const { recordId, select, missingLinks, seenRecords, state } = unavailableSnapshot;
|
|
633
631
|
// L2 can only revive Unfulfilled snapshots that have a selector since they have the
|
|
634
632
|
// info needed to revive (like missingLinks) and rebuild. Otherwise return L1 snapshot.
|
|
635
633
|
if (state !== 'Unfulfilled' || select === undefined) {
|
|
@@ -642,6 +640,7 @@ unavailableSnapshot, durableStoreErrorHandler, buildL1Snapshot, reviveMetrics =
|
|
|
642
640
|
// we attempt to read all keys from L2 - so combine recordId with any seenRecords
|
|
643
641
|
const keysToReviveSet = new StoreKeySet().add(recordId);
|
|
644
642
|
keysToReviveSet.merge(seenRecords);
|
|
643
|
+
keysToReviveSet.merge(missingLinks);
|
|
645
644
|
const keysToRevive = keysToReviveSet.keysAsArray();
|
|
646
645
|
const canonicalKeys = keysToRevive.map((x) => serializeStructuredKey(baseEnvironment.storeGetCanonicalKey(x)));
|
|
647
646
|
const start = Date.now();
|
|
@@ -675,10 +674,11 @@ unavailableSnapshot, durableStoreErrorHandler, buildL1Snapshot, reviveMetrics =
|
|
|
675
674
|
if (snapshot.state === 'Unfulfilled') {
|
|
676
675
|
// have to check if the new snapshot has any additional seenRecords
|
|
677
676
|
// and revive again if so
|
|
678
|
-
const { seenRecords: newSnapshotSeenRecords, recordId: newSnapshotRecordId } = snapshot;
|
|
677
|
+
const { seenRecords: newSnapshotSeenRecords, missingLinks: newSnapshotMissingLinks, recordId: newSnapshotRecordId, } = snapshot;
|
|
679
678
|
const newKeysToReviveSet = new StoreKeySet();
|
|
680
679
|
newKeysToReviveSet.add(newSnapshotRecordId);
|
|
681
680
|
newKeysToReviveSet.merge(newSnapshotSeenRecords);
|
|
681
|
+
newKeysToReviveSet.merge(newSnapshotMissingLinks);
|
|
682
682
|
const newKeys = newKeysToReviveSet.keysAsArray();
|
|
683
683
|
// in case DS returned additional entries we combine the requested
|
|
684
684
|
// and returned keys
|
|
@@ -15745,4 +15745,4 @@ register({
|
|
|
15745
15745
|
});
|
|
15746
15746
|
|
|
15747
15747
|
export { getRuntime, registerReportObserver, reportGraphqlQueryParseError };
|
|
15748
|
-
// version: 1.134.
|
|
15748
|
+
// version: 1.134.4-b3535d2e7
|
|
@@ -1,2 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare function stop(_userSchemaOrText?: any | string, _userData?: any): void;
|
|
2
|
+
declare function error(_error: Error, _userSchemaOrText?: any | string, _userData?: any): void;
|
|
3
|
+
declare function discard(): void;
|
|
4
|
+
declare function terminate(): void;
|
|
5
|
+
export declare const activity: {
|
|
6
|
+
stop: typeof stop;
|
|
7
|
+
error: typeof error;
|
|
8
|
+
discard: typeof discard;
|
|
9
|
+
terminate: typeof terminate;
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -1,2 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
declare function requestIdleDetectedCallback(_callback: any): void;
|
|
2
|
+
declare function declareNotifierTaskSingle(_name: string): {
|
|
3
|
+
isBusy: boolean;
|
|
4
|
+
done: () => void;
|
|
5
|
+
};
|
|
6
|
+
declare function declareNotifierTaskMulti(_name: string, _existingBusyCount?: number): {
|
|
7
|
+
isBusy: boolean;
|
|
8
|
+
add: () => void;
|
|
9
|
+
done: () => void;
|
|
10
|
+
};
|
|
11
|
+
declare function declarePollableTaskMulti(_name: string, _isBusyChecker: any): void;
|
|
12
|
+
export declare const idleDetector: {
|
|
13
|
+
requestIdleDetectedCallback: typeof requestIdleDetectedCallback;
|
|
14
|
+
declareNotifierTaskSingle: typeof declareNotifierTaskSingle;
|
|
15
|
+
declareNotifierTaskMulti: typeof declareNotifierTaskMulti;
|
|
16
|
+
declarePollableTaskMulti: typeof declarePollableTaskMulti;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
declare function
|
|
3
|
-
declare function
|
|
4
|
-
declare function
|
|
5
|
-
declare function
|
|
6
|
-
declare function trackValue(_operation: string, _value: number, _hasError?: boolean, _tags?: MetricsTags): void;
|
|
1
|
+
declare function log(_schema: any, _data?: any): void;
|
|
2
|
+
declare function error(_err: Error, _userSchemaOrText?: string, _data?: any): void;
|
|
3
|
+
declare function startActivity(_name: string): any;
|
|
4
|
+
declare function incrementCounter(_operation: string, _increment?: number, _hasError?: boolean, _tags?: any): void;
|
|
5
|
+
declare function trackValue(_operation: string, _value: number, _hasError?: boolean, _tags?: any): void;
|
|
7
6
|
export declare const instrumentation: {
|
|
8
7
|
log: typeof log;
|
|
9
8
|
error: typeof error;
|