@salesforce/lds-runtime-aura 1.348.1 → 1.349.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 +134 -8
- package/package.json +14 -12
package/dist/ldsEngineCreator.js
CHANGED
|
@@ -74,7 +74,7 @@ class NetworkCommand extends BaseCommand {
|
|
|
74
74
|
return this.fetch();
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
-
function buildServiceDescriptor$
|
|
77
|
+
function buildServiceDescriptor$d() {
|
|
78
78
|
return {
|
|
79
79
|
type: 'networkCommandBaseClass',
|
|
80
80
|
version: '1.0',
|
|
@@ -403,7 +403,7 @@ class AuraNetworkCommand extends NetworkCommand {
|
|
|
403
403
|
}
|
|
404
404
|
}
|
|
405
405
|
|
|
406
|
-
function buildServiceDescriptor$
|
|
406
|
+
function buildServiceDescriptor$c() {
|
|
407
407
|
return {
|
|
408
408
|
type: 'auraNetworkCommandBaseClass',
|
|
409
409
|
version: '1.0',
|
|
@@ -669,7 +669,7 @@ class AuraResourceCacheControlCommand extends AuraCacheControlCommand {
|
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
671
|
|
|
672
|
-
function buildServiceDescriptor$
|
|
672
|
+
function buildServiceDescriptor$b() {
|
|
673
673
|
return {
|
|
674
674
|
type: 'auraResourceCacheControlCommand',
|
|
675
675
|
version: '1.0',
|
|
@@ -684,6 +684,130 @@ function buildServiceDescriptor$9() {
|
|
|
684
684
|
*/
|
|
685
685
|
|
|
686
686
|
|
|
687
|
+
/**
|
|
688
|
+
* An implementation of BaseCommand that allows for extending abstract cache methods
|
|
689
|
+
*
|
|
690
|
+
* @typeParam Data cache result for read operations
|
|
691
|
+
* @typeParam NetworkResult cache result including network metadata
|
|
692
|
+
* @typeParam ExtraServices additional named services needed by a subclass
|
|
693
|
+
*/
|
|
694
|
+
class AuraNormalizedCacheControlCommand extends AuraCacheControlCommand {
|
|
695
|
+
constructor(services) {
|
|
696
|
+
super(services);
|
|
697
|
+
this.services = services;
|
|
698
|
+
}
|
|
699
|
+
readFromCache(cache) {
|
|
700
|
+
const data = this.buildResultType().query(cache, this.buildQuery());
|
|
701
|
+
if (data.isErr()) {
|
|
702
|
+
return resolvedPromiseLike(err(new Error(`Failed to build data from type: ${stringify$1(data.error)}`)));
|
|
703
|
+
}
|
|
704
|
+
return resolvedPromiseLike(ok(data.value));
|
|
705
|
+
}
|
|
706
|
+
writeToCache(cache, networkResult) {
|
|
707
|
+
if (networkResult.isOk()) {
|
|
708
|
+
this.buildResultType().write(cache.buildFixedTimeWritableCache(Date.now() / 1000), this.buildWriteInput(networkResult.value));
|
|
709
|
+
}
|
|
710
|
+
return resolvedPromiseLike(undefined);
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
function buildServiceDescriptor$a() {
|
|
715
|
+
return {
|
|
716
|
+
type: 'auraNormalizedCacheControlCommand',
|
|
717
|
+
version: '1.0',
|
|
718
|
+
service: AuraNormalizedCacheControlCommand,
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
/**
|
|
723
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
724
|
+
* All rights reserved.
|
|
725
|
+
* For full license text, see the LICENSE.txt file
|
|
726
|
+
*/
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
/**
|
|
730
|
+
* An implementation of BaseCommand that allows for extending abstract cache methods
|
|
731
|
+
*
|
|
732
|
+
* @typeParam Data cache result for read operations
|
|
733
|
+
* @typeParam NetworkResult cache result including network metadata
|
|
734
|
+
* @typeParam ExtraServices additional named services needed by a subclass
|
|
735
|
+
*/
|
|
736
|
+
class HttpCacheControlCommand extends CacheControlCommand {
|
|
737
|
+
constructor(services) {
|
|
738
|
+
super(services);
|
|
739
|
+
this.services = services;
|
|
740
|
+
}
|
|
741
|
+
requestFromNetwork() {
|
|
742
|
+
return this.fetch();
|
|
743
|
+
}
|
|
744
|
+
fetch() {
|
|
745
|
+
return this.convertFetchResponseToData(this.services.fetch(...this.fetchParams));
|
|
746
|
+
}
|
|
747
|
+
async coerceError(errorResponse) {
|
|
748
|
+
return toError(errorResponse.statusText); // Default Behavior
|
|
749
|
+
}
|
|
750
|
+
convertFetchResponseToData(response) {
|
|
751
|
+
return response.then((response) => {
|
|
752
|
+
if (response.ok) {
|
|
753
|
+
return response.json().then((json) => ok(json), (reason) => err(toError(reason)));
|
|
754
|
+
}
|
|
755
|
+
else {
|
|
756
|
+
return this.coerceError(response).then((coercedError) => err(coercedError));
|
|
757
|
+
}
|
|
758
|
+
}, (reason) => err(toError(reason)));
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
/**
|
|
763
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
764
|
+
* All rights reserved.
|
|
765
|
+
* For full license text, see the LICENSE.txt file
|
|
766
|
+
*/
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* An implementation of BaseCommand that allows for extending abstract cache methods
|
|
771
|
+
*
|
|
772
|
+
* @typeParam Data cache result for read operations
|
|
773
|
+
* @typeParam NetworkResult cache result including network metadata
|
|
774
|
+
* @typeParam ExtraServices additional named services needed by a subclass
|
|
775
|
+
*/
|
|
776
|
+
class HttpNormalizedCacheControlCommand extends HttpCacheControlCommand {
|
|
777
|
+
constructor(services) {
|
|
778
|
+
super(services);
|
|
779
|
+
this.services = services;
|
|
780
|
+
}
|
|
781
|
+
readFromCache(cache) {
|
|
782
|
+
const data = this.buildResultType().query(cache, this.buildQuery());
|
|
783
|
+
if (data.isErr()) {
|
|
784
|
+
return resolvedPromiseLike(err(new Error(`Failed to build data from type: ${stringify$1(data.error)}`)));
|
|
785
|
+
}
|
|
786
|
+
return resolvedPromiseLike(ok(data.value));
|
|
787
|
+
}
|
|
788
|
+
writeToCache(cache, networkResult) {
|
|
789
|
+
if (networkResult.isOk()) {
|
|
790
|
+
this.buildResultType().write(cache.buildFixedTimeWritableCache(Date.now() / 1000), this.buildWriteInput(networkResult.value));
|
|
791
|
+
}
|
|
792
|
+
return resolvedPromiseLike(undefined);
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
function buildServiceDescriptor$9() {
|
|
797
|
+
return {
|
|
798
|
+
type: 'httpNormalizedCacheControlCommand',
|
|
799
|
+
version: '1.0',
|
|
800
|
+
service: HttpNormalizedCacheControlCommand,
|
|
801
|
+
};
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
/**
|
|
805
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
806
|
+
* All rights reserved.
|
|
807
|
+
* For full license text, see the LICENSE.txt file
|
|
808
|
+
*/
|
|
809
|
+
|
|
810
|
+
|
|
687
811
|
/**
|
|
688
812
|
* An implementation of NetworkCommand that uses HTTP/fetch as the transport mechanism.
|
|
689
813
|
*/
|
|
@@ -5208,7 +5332,7 @@ function buildAuraLocalStoragePrefetchStorage(options = {}) {
|
|
|
5208
5332
|
...DEFAULT_STORAGE_OPTIONS,
|
|
5209
5333
|
...storageOptions,
|
|
5210
5334
|
secure: false,
|
|
5211
|
-
|
|
5335
|
+
adapterType: 'localstorage',
|
|
5212
5336
|
name: 'pdl',
|
|
5213
5337
|
maxSize: 4096000, // 4MB
|
|
5214
5338
|
});
|
|
@@ -5330,7 +5454,7 @@ function getEnvironmentSetting(name) {
|
|
|
5330
5454
|
}
|
|
5331
5455
|
return undefined;
|
|
5332
5456
|
}
|
|
5333
|
-
// version: 1.
|
|
5457
|
+
// version: 1.349.0-2008e7132b
|
|
5334
5458
|
|
|
5335
5459
|
const forceRecordTransactionsDisabled = getEnvironmentSetting(EnvironmentSettings.ForceRecordTransactionsDisabled);
|
|
5336
5460
|
//TODO: Some duplication here that can be most likely moved to a util class
|
|
@@ -5991,11 +6115,13 @@ function initializeOneStore() {
|
|
|
5991
6115
|
buildAuraNetworkService(),
|
|
5992
6116
|
buildServiceDescriptor$5(instrumentationServiceDescriptor.service),
|
|
5993
6117
|
buildServiceDescriptor$2(cacheServiceDescriptor.service),
|
|
5994
|
-
buildServiceDescriptor$
|
|
6118
|
+
buildServiceDescriptor$c(),
|
|
5995
6119
|
buildServiceDescriptor$8(),
|
|
5996
|
-
buildServiceDescriptor$
|
|
6120
|
+
buildServiceDescriptor$d(),
|
|
5997
6121
|
buildServiceDescriptor$7(),
|
|
5998
6122
|
buildServiceDescriptor$6(),
|
|
6123
|
+
buildServiceDescriptor$b(),
|
|
6124
|
+
buildServiceDescriptor$a(),
|
|
5999
6125
|
buildServiceDescriptor$9(),
|
|
6000
6126
|
buildServiceDescriptor$1(),
|
|
6001
6127
|
];
|
|
@@ -6020,4 +6146,4 @@ function ldsEngineCreator() {
|
|
|
6020
6146
|
}
|
|
6021
6147
|
|
|
6022
6148
|
export { LexRequestStrategy, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, registerRequestStrategy, saveRequestAsPrediction, unregisterRequestStrategy, whenPredictionsReady };
|
|
6023
|
-
// version: 1.
|
|
6149
|
+
// version: 1.349.0-3d2a6c656b
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-aura",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.349.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Aura runtime",
|
|
6
6
|
"main": "dist/ldsEngineCreator.js",
|
|
@@ -35,21 +35,23 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@luvio/service-provisioner": "5.33.0",
|
|
38
|
-
"@salesforce/lds-adapters-apex": "^1.
|
|
39
|
-
"@salesforce/lds-adapters-uiapi": "^1.
|
|
38
|
+
"@salesforce/lds-adapters-apex": "^1.349.0",
|
|
39
|
+
"@salesforce/lds-adapters-uiapi": "^1.349.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": "^1.
|
|
41
|
+
"@salesforce/lds-ads-bridge": "^1.349.0",
|
|
42
|
+
"@salesforce/lds-aura-storage": "^1.349.0",
|
|
43
|
+
"@salesforce/lds-bindings": "^1.349.0",
|
|
44
|
+
"@salesforce/lds-instrumentation": "^1.349.0",
|
|
45
|
+
"@salesforce/lds-network-aura": "^1.349.0",
|
|
46
|
+
"@salesforce/lds-network-fetch": "^1.349.0",
|
|
47
47
|
"jwt-encode": "1.0.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@luvio/command-aura-network": "5.33.0",
|
|
51
|
+
"@luvio/command-aura-normalized-cache-control": "5.33.0",
|
|
51
52
|
"@luvio/command-aura-resource-cache-control": "5.33.0",
|
|
52
53
|
"@luvio/command-fetch-network": "5.33.0",
|
|
54
|
+
"@luvio/command-http-normalized-cache-control": "5.33.0",
|
|
53
55
|
"@luvio/command-network": "5.33.0",
|
|
54
56
|
"@luvio/command-sse": "5.33.0",
|
|
55
57
|
"@luvio/command-streaming": "5.33.0",
|
|
@@ -63,14 +65,14 @@
|
|
|
63
65
|
"@luvio/service-pubsub": "5.33.0",
|
|
64
66
|
"@luvio/service-store": "5.33.0",
|
|
65
67
|
"@luvio/utils": "5.33.0",
|
|
66
|
-
"@salesforce/lds-adapters-uiapi-lex": "^1.
|
|
68
|
+
"@salesforce/lds-adapters-uiapi-lex": "^1.349.0"
|
|
67
69
|
},
|
|
68
70
|
"luvioBundlesize": [
|
|
69
71
|
{
|
|
70
72
|
"path": "./dist/ldsEngineCreator.js",
|
|
71
73
|
"maxSize": {
|
|
72
|
-
"none": "
|
|
73
|
-
"min": "
|
|
74
|
+
"none": "229.5 kB",
|
|
75
|
+
"min": "94.7 kB",
|
|
74
76
|
"compressed": "39.5 kB"
|
|
75
77
|
}
|
|
76
78
|
}
|