@salesforce/lds-runtime-aura 1.305.0 → 1.306.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/ldsEngineCreator.js
CHANGED
|
@@ -2651,7 +2651,9 @@ class LexPredictivePrefetcher extends ApplicationPredictivePrefetcher {
|
|
|
2651
2651
|
: this.requestRunner.reduceRequests(nonCmpDefPredictions);
|
|
2652
2652
|
const predictedRequestsWithLimit = (this.page.shouldExecuteAlwaysRequestByThemself()
|
|
2653
2653
|
? [...alwaysRequestEntries, ...reducedPredictions]
|
|
2654
|
-
: reducedPredictions)
|
|
2654
|
+
: reducedPredictions)
|
|
2655
|
+
// Sorting in order requested
|
|
2656
|
+
.sort((a, b) => a.requestMetadata.requestTime - b.requestMetadata.requestTime);
|
|
2655
2657
|
await runRequestsWithLimit(predictedRequestsWithLimit, this.requestRunner, this.options.inflightRequestLimit,
|
|
2656
2658
|
// `this.repository.pageStartTime` would be the correct here,
|
|
2657
2659
|
// but when doing predict+watch, it could be (set in watch)
|
|
@@ -2749,8 +2751,9 @@ function deepEquals(objA, objB) {
|
|
|
2749
2751
|
}
|
|
2750
2752
|
|
|
2751
2753
|
class PrefetchRepository {
|
|
2752
|
-
constructor(storage) {
|
|
2754
|
+
constructor(storage, options = {}) {
|
|
2753
2755
|
this.storage = storage;
|
|
2756
|
+
this.options = options;
|
|
2754
2757
|
this.requestBuffer = new Map();
|
|
2755
2758
|
this.pageStartTime = Date.now();
|
|
2756
2759
|
}
|
|
@@ -2778,6 +2781,10 @@ class PrefetchRepository {
|
|
|
2778
2781
|
existingRequestEntry.requestMetadata.requestTime = requestTime;
|
|
2779
2782
|
}
|
|
2780
2783
|
});
|
|
2784
|
+
const { modifyBeforeSaveHook } = this.options;
|
|
2785
|
+
if (modifyBeforeSaveHook !== undefined) {
|
|
2786
|
+
page.requests = modifyBeforeSaveHook(page.requests);
|
|
2787
|
+
}
|
|
2781
2788
|
setPromises.push(this.storage.set(id, page));
|
|
2782
2789
|
}
|
|
2783
2790
|
this.clearRequestBuffer();
|
|
@@ -2925,6 +2932,10 @@ const onePreloads = new Set([
|
|
|
2925
2932
|
'markup://force:relatedListQuickLinksContainer',
|
|
2926
2933
|
'markup://lst:relatedListQuickLinksContainer',
|
|
2927
2934
|
'markup://lst:secondDegreeRelatedListSingleContainer',
|
|
2935
|
+
'markup://lst:bundle_act_coreListViewManagerDesktop',
|
|
2936
|
+
'markup://lst:bundle_act_coreListViewManagerDesktop_generatedTemplates',
|
|
2937
|
+
'markup://lst:baseFilterPanel',
|
|
2938
|
+
'markup://lst:chartPanel',
|
|
2928
2939
|
'markup://force:socialPhotoWrapper',
|
|
2929
2940
|
'markup://forceContent:contentVersionsEditWizard',
|
|
2930
2941
|
'markup://forceContent:outputTitle',
|
|
@@ -3034,7 +3045,16 @@ class GetComponentsDefStrategy extends RequestStrategy {
|
|
|
3034
3045
|
combineRequests(reqA, reqB) {
|
|
3035
3046
|
const result = new Set(reqA);
|
|
3036
3047
|
reqB.forEach((c) => result.add(c));
|
|
3037
|
-
|
|
3048
|
+
// remove the ones that can't be preloaded.
|
|
3049
|
+
return [...result].filter((def) => {
|
|
3050
|
+
return (def.startsWith('markup://') &&
|
|
3051
|
+
!(
|
|
3052
|
+
// any generated template
|
|
3053
|
+
(def.includes('forceGenerated') ||
|
|
3054
|
+
// part of onePreload
|
|
3055
|
+
def.includes('one:onePreloads') ||
|
|
3056
|
+
onePreloads.has(def))));
|
|
3057
|
+
});
|
|
3038
3058
|
}
|
|
3039
3059
|
isContextDependent(_context, _request) {
|
|
3040
3060
|
return true;
|
|
@@ -3904,7 +3924,7 @@ function getEnvironmentSetting(name) {
|
|
|
3904
3924
|
}
|
|
3905
3925
|
return undefined;
|
|
3906
3926
|
}
|
|
3907
|
-
// version: 1.
|
|
3927
|
+
// version: 1.306.0-c047984840
|
|
3908
3928
|
|
|
3909
3929
|
const forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
|
|
3910
3930
|
//TODO: Some duplication here that can be most likely moved to a util class
|
|
@@ -4237,8 +4257,10 @@ function getInflightRequestLimit() {
|
|
|
4237
4257
|
}
|
|
4238
4258
|
function setupPredictivePrefetcher(luvio) {
|
|
4239
4259
|
const storage = buildAuraPrefetchStorage();
|
|
4240
|
-
const repository = new PrefetchRepository(storage);
|
|
4241
4260
|
const requestRunner = new LexRequestRunner(luvio);
|
|
4261
|
+
const repository = new PrefetchRepository(storage, {
|
|
4262
|
+
modifyBeforeSaveHook: (requests) => requestRunner.reduceRequests(requests),
|
|
4263
|
+
});
|
|
4242
4264
|
const inflightRequestLimit = applyPredictionRequestLimit.isOpen({ fallback: false })
|
|
4243
4265
|
? getInflightRequestLimit()
|
|
4244
4266
|
: 1000;
|
|
@@ -4455,4 +4477,4 @@ function ldsEngineCreator() {
|
|
|
4455
4477
|
}
|
|
4456
4478
|
|
|
4457
4479
|
export { buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore };
|
|
4458
|
-
// version: 1.
|
|
4480
|
+
// version: 1.306.0-66359b439e
|
|
@@ -9,10 +9,14 @@ export type PageEntry<Request> = {
|
|
|
9
9
|
id: string;
|
|
10
10
|
requests: RequestEntry<Request>[];
|
|
11
11
|
};
|
|
12
|
+
export type PrefetchRepositoryOptions = {
|
|
13
|
+
modifyBeforeSaveHook?: (requests: RequestEntry<any>[]) => RequestEntry<any>[];
|
|
14
|
+
};
|
|
12
15
|
export declare class PrefetchRepository {
|
|
13
16
|
private storage;
|
|
17
|
+
private options;
|
|
14
18
|
private requestBuffer;
|
|
15
|
-
constructor(storage: PrefetchStorage);
|
|
19
|
+
constructor(storage: PrefetchStorage, options?: PrefetchRepositoryOptions);
|
|
16
20
|
clearRequestBuffer(): void;
|
|
17
21
|
pageStartTime: number;
|
|
18
22
|
markPageStart(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-aura",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.306.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Aura runtime",
|
|
6
6
|
"main": "dist/ldsEngineCreator.js",
|
|
@@ -35,15 +35,15 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@luvio/service-broker": "5.3.1",
|
|
38
|
-
"@salesforce/lds-adapters-apex": "^1.
|
|
39
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
38
|
+
"@salesforce/lds-adapters-apex": "^1.306.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.306.0",
|
|
40
40
|
"@salesforce/lds-adapters-uiapi-lex": "^1.302.0",
|
|
41
|
-
"@salesforce/lds-ads-bridge": "^1.
|
|
42
|
-
"@salesforce/lds-aura-storage": "^1.
|
|
43
|
-
"@salesforce/lds-bindings": "^1.
|
|
44
|
-
"@salesforce/lds-instrumentation": "^1.
|
|
45
|
-
"@salesforce/lds-network-aura": "^1.
|
|
46
|
-
"@salesforce/lds-network-fetch-with-jwt": "^1.
|
|
41
|
+
"@salesforce/lds-ads-bridge": "^1.306.0",
|
|
42
|
+
"@salesforce/lds-aura-storage": "^1.306.0",
|
|
43
|
+
"@salesforce/lds-bindings": "^1.306.0",
|
|
44
|
+
"@salesforce/lds-instrumentation": "^1.306.0",
|
|
45
|
+
"@salesforce/lds-network-aura": "^1.306.0",
|
|
46
|
+
"@salesforce/lds-network-fetch-with-jwt": "^1.306.0"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@luvio/command-aura-network": "5.3.1",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"@luvio/service-subscription": "5.3.1",
|
|
65
65
|
"@luvio/service-type-registry": "5.3.1",
|
|
66
66
|
"@luvio/utils": "5.3.1",
|
|
67
|
-
"@salesforce/lds-adapters-uiapi-lex": "^1.
|
|
67
|
+
"@salesforce/lds-adapters-uiapi-lex": "^1.306.0"
|
|
68
68
|
},
|
|
69
69
|
"luvioBundlesize": [
|
|
70
70
|
{
|