@salesforce/lds-runtime-webruntime 1.378.0 → 1.379.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/ldsWebruntimeOneStoreInit.js +18 -13
- package/package.json +25 -25
|
@@ -21,6 +21,7 @@ import language from '@salesforce/i18n/lang';
|
|
|
21
21
|
import isDesignMode from '@app/isDesignMode';
|
|
22
22
|
import isPreviewMode from '@app/isPreviewMode';
|
|
23
23
|
import authenticationCookieName from '@app/authenticationCookieName';
|
|
24
|
+
import apiBasePath from '@app/apiBasePath';
|
|
24
25
|
|
|
25
26
|
/*!
|
|
26
27
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -3664,7 +3665,7 @@ function buildServiceDescriptor$2(luvio) {
|
|
|
3664
3665
|
},
|
|
3665
3666
|
};
|
|
3666
3667
|
}
|
|
3667
|
-
// version: 1.
|
|
3668
|
+
// version: 1.379.1-7ea94edc38
|
|
3668
3669
|
|
|
3669
3670
|
/**
|
|
3670
3671
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -3690,7 +3691,7 @@ function buildServiceDescriptor$1(notifyRecordUpdateAvailable, getNormalizedLuvi
|
|
|
3690
3691
|
},
|
|
3691
3692
|
};
|
|
3692
3693
|
}
|
|
3693
|
-
// version: 1.
|
|
3694
|
+
// version: 1.379.1-7ea94edc38
|
|
3694
3695
|
|
|
3695
3696
|
/*!
|
|
3696
3697
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -4133,7 +4134,7 @@ async function webruntimeRequestInterceptor(args) {
|
|
|
4133
4134
|
if (!(typeof url === 'string' || url instanceof URL)) {
|
|
4134
4135
|
return resolvedPromiseLike$3(args);
|
|
4135
4136
|
}
|
|
4136
|
-
const urlObj =
|
|
4137
|
+
const urlObj = buildApiBaseUrl(url, apiBasePath);
|
|
4137
4138
|
urlObj.searchParams.append('language', language);
|
|
4138
4139
|
urlObj.searchParams.append('asGuest', getAsGuestParamValue().toString());
|
|
4139
4140
|
urlObj.searchParams.append('htmlEncode', 'false');
|
|
@@ -4144,19 +4145,23 @@ async function webruntimeRequestInterceptor(args) {
|
|
|
4144
4145
|
}
|
|
4145
4146
|
return resolvedPromiseLike$3(args);
|
|
4146
4147
|
}
|
|
4148
|
+
function buildApiBaseUrl(url, apiBasePath) {
|
|
4149
|
+
// The URL constructor's second argument provides a base if the first argument is a relative URL.
|
|
4150
|
+
const urlObj = new URL(url, location?.href);
|
|
4151
|
+
// If a base path is provided, ensure the URL starts with it, otherwiswe prepend it to the path.
|
|
4152
|
+
if (apiBasePath && !urlObj.pathname.startsWith(apiBasePath)) {
|
|
4153
|
+
urlObj.pathname = apiBasePath + urlObj.pathname;
|
|
4154
|
+
}
|
|
4155
|
+
return urlObj;
|
|
4156
|
+
}
|
|
4147
4157
|
function hasSidCookie() {
|
|
4148
4158
|
const cookies = document.cookie.split(';');
|
|
4149
|
-
return cookies.some((cookie) => {
|
|
4150
|
-
const [name] = cookie.trim().split('=');
|
|
4151
|
-
return name === authenticationCookieName;
|
|
4152
|
-
});
|
|
4159
|
+
return cookies.some((cookie) => cookie.trim().startsWith(`${authenticationCookieName}=`));
|
|
4153
4160
|
}
|
|
4154
4161
|
function getAsGuestParamValue() {
|
|
4155
|
-
//
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
}
|
|
4159
|
-
return !hasSidCookie();
|
|
4162
|
+
// It's a guest user if not in design/preview mode AND the '__Secure-has-sid' cookie is missing.
|
|
4163
|
+
// Note: `authenticationCookieName` (__Secure-has-sid) is *NOT* set in design/preview mode.
|
|
4164
|
+
return !(isDesignMode || isPreviewMode) && !hasSidCookie();
|
|
4160
4165
|
}
|
|
4161
4166
|
async function addCSRFToken(params) {
|
|
4162
4167
|
const { csrfToken } = await getUser();
|
|
@@ -4306,4 +4311,4 @@ const services = [
|
|
|
4306
4311
|
buildServiceDescriptor$1({}, {}),
|
|
4307
4312
|
];
|
|
4308
4313
|
setServices(services);
|
|
4309
|
-
// version: 1.
|
|
4314
|
+
// version: 1.379.1-5350e195b2
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-webruntime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.379.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Webruntime runtime",
|
|
6
6
|
"main": "dist/ldsWebruntimeOneStoreInit.js",
|
|
@@ -35,35 +35,35 @@
|
|
|
35
35
|
"ready": "yarn build && jest --collectCoverage && yarn test:size && yarn release:corejar"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@luvio/service-provisioner": "5.
|
|
39
|
-
"@luvio/tools-core": "5.
|
|
38
|
+
"@luvio/service-provisioner": "5.57.2",
|
|
39
|
+
"@luvio/tools-core": "5.57.2",
|
|
40
40
|
"jwt-encode": "1.0.1"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@luvio/command-aura-network": "5.
|
|
44
|
-
"@luvio/command-aura-normalized-cache-control": "5.
|
|
45
|
-
"@luvio/command-aura-resource-cache-control": "5.
|
|
46
|
-
"@luvio/command-fetch-network": "5.
|
|
47
|
-
"@luvio/command-http-normalized-cache-control": "5.
|
|
48
|
-
"@luvio/command-ndjson": "5.
|
|
49
|
-
"@luvio/command-network": "5.
|
|
50
|
-
"@luvio/command-sse": "5.
|
|
51
|
-
"@luvio/command-streaming": "5.
|
|
52
|
-
"@luvio/jwt-manager": "5.
|
|
43
|
+
"@luvio/command-aura-network": "5.57.2",
|
|
44
|
+
"@luvio/command-aura-normalized-cache-control": "5.57.2",
|
|
45
|
+
"@luvio/command-aura-resource-cache-control": "5.57.2",
|
|
46
|
+
"@luvio/command-fetch-network": "5.57.2",
|
|
47
|
+
"@luvio/command-http-normalized-cache-control": "5.57.2",
|
|
48
|
+
"@luvio/command-ndjson": "5.57.2",
|
|
49
|
+
"@luvio/command-network": "5.57.2",
|
|
50
|
+
"@luvio/command-sse": "5.57.2",
|
|
51
|
+
"@luvio/command-streaming": "5.57.2",
|
|
52
|
+
"@luvio/jwt-manager": "5.57.2",
|
|
53
53
|
"@luvio/network-adapter-composable": "0.158.7",
|
|
54
54
|
"@luvio/network-adapter-fetch": "0.158.7",
|
|
55
|
-
"@luvio/service-aura-network": "5.
|
|
56
|
-
"@luvio/service-cache": "5.
|
|
57
|
-
"@luvio/service-cache-control": "5.
|
|
58
|
-
"@luvio/service-cache-inclusion-policy": "5.
|
|
59
|
-
"@luvio/service-fetch-network": "5.
|
|
60
|
-
"@luvio/service-instrument-command": "5.
|
|
61
|
-
"@luvio/service-pubsub": "5.
|
|
62
|
-
"@luvio/service-store": "5.
|
|
63
|
-
"@luvio/utils": "5.
|
|
64
|
-
"@salesforce/lds-adapters-uiapi-lex": "^1.
|
|
65
|
-
"@salesforce/lds-luvio-service": "^1.
|
|
66
|
-
"@salesforce/lds-luvio-uiapi-records-service": "^1.
|
|
55
|
+
"@luvio/service-aura-network": "5.57.2",
|
|
56
|
+
"@luvio/service-cache": "5.57.2",
|
|
57
|
+
"@luvio/service-cache-control": "5.57.2",
|
|
58
|
+
"@luvio/service-cache-inclusion-policy": "5.57.2",
|
|
59
|
+
"@luvio/service-fetch-network": "5.57.2",
|
|
60
|
+
"@luvio/service-instrument-command": "5.57.2",
|
|
61
|
+
"@luvio/service-pubsub": "5.57.2",
|
|
62
|
+
"@luvio/service-store": "5.57.2",
|
|
63
|
+
"@luvio/utils": "5.57.2",
|
|
64
|
+
"@salesforce/lds-adapters-uiapi-lex": "^1.379.1",
|
|
65
|
+
"@salesforce/lds-luvio-service": "^1.379.1",
|
|
66
|
+
"@salesforce/lds-luvio-uiapi-records-service": "^1.379.1"
|
|
67
67
|
},
|
|
68
68
|
"luvioBundlesize": [
|
|
69
69
|
{
|