@salesforce/lds-runtime-aura 1.404.0-dev6 → 1.404.0-dev7
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 +35 -6
- package/package.json +38 -38
package/dist/ldsEngineCreator.js
CHANGED
|
@@ -42,6 +42,10 @@ import { instrument as instrument$5 } from '@lwc/state';
|
|
|
42
42
|
import { withRegistration, register, setDefaultLuvio } from 'force/ldsEngine';
|
|
43
43
|
import { pageScopedCache } from 'instrumentation/utility';
|
|
44
44
|
import { createStorage, clearStorages } from 'force/ldsStorage';
|
|
45
|
+
import lightningConnectEnabled from '@salesforce/gate/ui.services.LightningConnect.enabled';
|
|
46
|
+
import bypassAppRestrictionEnabled from '@salesforce/gate/ui.services.LightningConnect.BypassAppRestriction.enabled';
|
|
47
|
+
import csrfValidationEnabled from '@salesforce/gate/ui.services.LightningConnect.CsrfValidation.enabled';
|
|
48
|
+
import sessionApiEnabled from '@salesforce/gate/ui.uisdk.session.api.enabled';
|
|
45
49
|
import useHotspotLimit from '@salesforce/gate/lds.pdl.useHotspotLimit';
|
|
46
50
|
import useHttpUiapiOneApp from '@salesforce/gate/lds.useHttpUiapiOneApp';
|
|
47
51
|
import useHttpUiapiOneRuntime from '@salesforce/gate/lds.useHttpUiapiOneRuntime';
|
|
@@ -2698,7 +2702,7 @@ function buildServiceDescriptor$d(luvio) {
|
|
|
2698
2702
|
},
|
|
2699
2703
|
};
|
|
2700
2704
|
}
|
|
2701
|
-
// version: 1.404.0-
|
|
2705
|
+
// version: 1.404.0-dev7-7d4ca687f7
|
|
2702
2706
|
|
|
2703
2707
|
/*!
|
|
2704
2708
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -3051,7 +3055,7 @@ function buildServiceDescriptor$9(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
3051
3055
|
},
|
|
3052
3056
|
};
|
|
3053
3057
|
}
|
|
3054
|
-
// version: 1.404.0-
|
|
3058
|
+
// version: 1.404.0-dev7-7d4ca687f7
|
|
3055
3059
|
|
|
3056
3060
|
/*!
|
|
3057
3061
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4754,7 +4758,7 @@ function getEnvironmentSetting(name) {
|
|
|
4754
4758
|
}
|
|
4755
4759
|
return undefined;
|
|
4756
4760
|
}
|
|
4757
|
-
// version: 1.404.0-
|
|
4761
|
+
// version: 1.404.0-dev7-7d4ca687f7
|
|
4758
4762
|
|
|
4759
4763
|
/**
|
|
4760
4764
|
* Observability / Critical Availability Program (230+)
|
|
@@ -5884,6 +5888,23 @@ class CsrfTokenManager {
|
|
|
5884
5888
|
CsrfTokenManager.instance = null;
|
|
5885
5889
|
|
|
5886
5890
|
const CSRF_TOKEN_HEADER = 'X-CSRF-Token';
|
|
5891
|
+
/**
|
|
5892
|
+
* Checks if all required gates are enabled for CSRF token interceptor.
|
|
5893
|
+
*
|
|
5894
|
+
* @returns true if all gates are enabled, false otherwise
|
|
5895
|
+
*/
|
|
5896
|
+
function areCsrfGatesEnabled() {
|
|
5897
|
+
try {
|
|
5898
|
+
return (lightningConnectEnabled.isOpen({ fallback: false }) &&
|
|
5899
|
+
bypassAppRestrictionEnabled.isOpen({ fallback: false }) &&
|
|
5900
|
+
csrfValidationEnabled.isOpen({ fallback: false }) &&
|
|
5901
|
+
sessionApiEnabled.isOpen({ fallback: false }));
|
|
5902
|
+
}
|
|
5903
|
+
catch (error) {
|
|
5904
|
+
// If any gate check fails, disable CSRF interceptor
|
|
5905
|
+
return false;
|
|
5906
|
+
}
|
|
5907
|
+
}
|
|
5887
5908
|
/**
|
|
5888
5909
|
* Determines if the HTTP method requires CSRF protection.
|
|
5889
5910
|
* Only mutating operations (POST, PUT, PATCH, DELETE) require CSRF tokens.
|
|
@@ -5911,6 +5932,10 @@ function isCsrfMethod(method) {
|
|
|
5911
5932
|
function buildCsrfTokenInterceptor() {
|
|
5912
5933
|
const csrfTokenManager = CsrfTokenManager.getInstance();
|
|
5913
5934
|
return async (fetchArgs) => {
|
|
5935
|
+
// Check if all required gates are enabled before running
|
|
5936
|
+
if (!areCsrfGatesEnabled()) {
|
|
5937
|
+
return resolvedPromiseLike$2(fetchArgs);
|
|
5938
|
+
}
|
|
5914
5939
|
const [urlOrRequest, options] = fetchArgs;
|
|
5915
5940
|
// Determine the method from either Request object or options
|
|
5916
5941
|
let method;
|
|
@@ -5940,6 +5965,10 @@ function buildCsrfTokenInterceptor() {
|
|
|
5940
5965
|
function buildLuvioCsrfTokenInterceptor() {
|
|
5941
5966
|
const csrfTokenManager = CsrfTokenManager.getInstance();
|
|
5942
5967
|
return async (resourceRequest) => {
|
|
5968
|
+
// Check if all required gates are enabled before running
|
|
5969
|
+
if (!areCsrfGatesEnabled()) {
|
|
5970
|
+
return resolvedPromiseLike$2(resourceRequest);
|
|
5971
|
+
}
|
|
5943
5972
|
// Ensure headers object exists
|
|
5944
5973
|
if (!resourceRequest.headers) {
|
|
5945
5974
|
resourceRequest.headers = {};
|
|
@@ -6188,8 +6217,8 @@ async function isCsrfError(response) {
|
|
|
6188
6217
|
// Clone to avoid consuming the original response
|
|
6189
6218
|
const cloned = response.clone();
|
|
6190
6219
|
const body = await cloned.json();
|
|
6191
|
-
// Check the error array format:
|
|
6192
|
-
const errorCode = body?.
|
|
6220
|
+
// Check the error array format: body[0].errorCode
|
|
6221
|
+
const errorCode = body?.[0]?.errorCode;
|
|
6193
6222
|
return errorCode === 'INVALID_ACCESS_TOKEN';
|
|
6194
6223
|
}
|
|
6195
6224
|
catch {
|
|
@@ -9888,4 +9917,4 @@ function ldsEngineCreator() {
|
|
|
9888
9917
|
}
|
|
9889
9918
|
|
|
9890
9919
|
export { LexRequestStrategy, PdlRequestPriority, buildPredictorForContext, ldsEngineCreator as default, initializeLDS, initializeOneStore, notifyUpdateAvailableFactory, registerRequestStrategy, saveRequestAsPrediction, unregisterRequestStrategy, whenPredictionsReady };
|
|
9891
|
-
// version: 1.404.0-
|
|
9920
|
+
// version: 1.404.0-dev7-f7cbfedbf0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-aura",
|
|
3
|
-
"version": "1.404.0-
|
|
3
|
+
"version": "1.404.0-dev7",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Aura runtime",
|
|
6
6
|
"main": "dist/ldsEngineCreator.js",
|
|
@@ -34,49 +34,49 @@
|
|
|
34
34
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-aura"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@conduit-client/service-provisioner": "3.7.0-
|
|
38
|
-
"@conduit-client/tools-core": "3.7.0-
|
|
39
|
-
"@salesforce/lds-adapters-apex": "^1.404.0-
|
|
40
|
-
"@salesforce/lds-adapters-uiapi": "^1.404.0-
|
|
41
|
-
"@salesforce/lds-ads-bridge": "^1.404.0-
|
|
42
|
-
"@salesforce/lds-aura-storage": "^1.404.0-
|
|
43
|
-
"@salesforce/lds-bindings": "^1.404.0-
|
|
44
|
-
"@salesforce/lds-instrumentation": "^1.404.0-
|
|
45
|
-
"@salesforce/lds-network-aura": "^1.404.0-
|
|
46
|
-
"@salesforce/lds-network-fetch": "^1.404.0-
|
|
37
|
+
"@conduit-client/service-provisioner": "3.7.0-dev2",
|
|
38
|
+
"@conduit-client/tools-core": "3.7.0-dev2",
|
|
39
|
+
"@salesforce/lds-adapters-apex": "^1.404.0-dev7",
|
|
40
|
+
"@salesforce/lds-adapters-uiapi": "^1.404.0-dev7",
|
|
41
|
+
"@salesforce/lds-ads-bridge": "^1.404.0-dev7",
|
|
42
|
+
"@salesforce/lds-aura-storage": "^1.404.0-dev7",
|
|
43
|
+
"@salesforce/lds-bindings": "^1.404.0-dev7",
|
|
44
|
+
"@salesforce/lds-instrumentation": "^1.404.0-dev7",
|
|
45
|
+
"@salesforce/lds-network-aura": "^1.404.0-dev7",
|
|
46
|
+
"@salesforce/lds-network-fetch": "^1.404.0-dev7",
|
|
47
47
|
"jwt-encode": "1.0.1"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@conduit-client/command-aura-graphql-normalized-cache-control": "3.7.0-
|
|
51
|
-
"@conduit-client/command-aura-network": "3.7.0-
|
|
52
|
-
"@conduit-client/command-aura-normalized-cache-control": "3.7.0-
|
|
53
|
-
"@conduit-client/command-aura-resource-cache-control": "3.7.0-
|
|
54
|
-
"@conduit-client/command-fetch-network": "3.7.0-
|
|
55
|
-
"@conduit-client/command-http-graphql-normalized-cache-control": "3.7.0-
|
|
56
|
-
"@conduit-client/command-http-normalized-cache-control": "3.7.0-
|
|
57
|
-
"@conduit-client/command-ndjson": "3.7.0-
|
|
58
|
-
"@conduit-client/command-network": "3.7.0-
|
|
59
|
-
"@conduit-client/command-sse": "3.7.0-
|
|
60
|
-
"@conduit-client/command-streaming": "3.7.0-
|
|
61
|
-
"@conduit-client/service-aura-network": "3.7.0-
|
|
62
|
-
"@conduit-client/service-bindings-imperative": "3.7.0-
|
|
63
|
-
"@conduit-client/service-bindings-lwc": "3.7.0-
|
|
64
|
-
"@conduit-client/service-cache": "3.7.0-
|
|
65
|
-
"@conduit-client/service-cache-control": "3.7.0-
|
|
66
|
-
"@conduit-client/service-cache-inclusion-policy": "3.7.0-
|
|
67
|
-
"@conduit-client/service-feature-flags": "3.7.0-
|
|
68
|
-
"@conduit-client/service-fetch-network": "3.7.0-
|
|
69
|
-
"@conduit-client/service-instrument-command": "3.7.0-
|
|
70
|
-
"@conduit-client/service-pubsub": "3.7.0-
|
|
71
|
-
"@conduit-client/service-store": "3.7.0-
|
|
72
|
-
"@conduit-client/utils": "3.7.0-
|
|
50
|
+
"@conduit-client/command-aura-graphql-normalized-cache-control": "3.7.0-dev2",
|
|
51
|
+
"@conduit-client/command-aura-network": "3.7.0-dev2",
|
|
52
|
+
"@conduit-client/command-aura-normalized-cache-control": "3.7.0-dev2",
|
|
53
|
+
"@conduit-client/command-aura-resource-cache-control": "3.7.0-dev2",
|
|
54
|
+
"@conduit-client/command-fetch-network": "3.7.0-dev2",
|
|
55
|
+
"@conduit-client/command-http-graphql-normalized-cache-control": "3.7.0-dev2",
|
|
56
|
+
"@conduit-client/command-http-normalized-cache-control": "3.7.0-dev2",
|
|
57
|
+
"@conduit-client/command-ndjson": "3.7.0-dev2",
|
|
58
|
+
"@conduit-client/command-network": "3.7.0-dev2",
|
|
59
|
+
"@conduit-client/command-sse": "3.7.0-dev2",
|
|
60
|
+
"@conduit-client/command-streaming": "3.7.0-dev2",
|
|
61
|
+
"@conduit-client/service-aura-network": "3.7.0-dev2",
|
|
62
|
+
"@conduit-client/service-bindings-imperative": "3.7.0-dev2",
|
|
63
|
+
"@conduit-client/service-bindings-lwc": "3.7.0-dev2",
|
|
64
|
+
"@conduit-client/service-cache": "3.7.0-dev2",
|
|
65
|
+
"@conduit-client/service-cache-control": "3.7.0-dev2",
|
|
66
|
+
"@conduit-client/service-cache-inclusion-policy": "3.7.0-dev2",
|
|
67
|
+
"@conduit-client/service-feature-flags": "3.7.0-dev2",
|
|
68
|
+
"@conduit-client/service-fetch-network": "3.7.0-dev2",
|
|
69
|
+
"@conduit-client/service-instrument-command": "3.7.0-dev2",
|
|
70
|
+
"@conduit-client/service-pubsub": "3.7.0-dev2",
|
|
71
|
+
"@conduit-client/service-store": "3.7.0-dev2",
|
|
72
|
+
"@conduit-client/utils": "3.7.0-dev2",
|
|
73
73
|
"@luvio/network-adapter-composable": "0.158.7",
|
|
74
74
|
"@luvio/network-adapter-fetch": "0.158.7",
|
|
75
75
|
"@lwc/state": "^0.23.0",
|
|
76
|
-
"@salesforce/lds-adapters-onestore-graphql": "^1.404.0-
|
|
77
|
-
"@salesforce/lds-adapters-uiapi-lex": "^1.404.0-
|
|
78
|
-
"@salesforce/lds-luvio-service": "^1.404.0-
|
|
79
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.404.0-
|
|
76
|
+
"@salesforce/lds-adapters-onestore-graphql": "^1.404.0-dev7",
|
|
77
|
+
"@salesforce/lds-adapters-uiapi-lex": "^1.404.0-dev7",
|
|
78
|
+
"@salesforce/lds-luvio-service": "^1.404.0-dev7",
|
|
79
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.404.0-dev7"
|
|
80
80
|
},
|
|
81
81
|
"luvioBundlesize": [
|
|
82
82
|
{
|