@salesforce/lds-runtime-webruntime 1.360.1 → 1.362.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.
|
@@ -14,8 +14,9 @@
|
|
|
14
14
|
/* proxy-compat-disable */
|
|
15
15
|
import { getInstrumentation } from 'o11y/client';
|
|
16
16
|
import { setServices } from 'force/luvioServiceProvisioner1';
|
|
17
|
+
export { default, resolve, setServices } from 'force/luvioServiceProvisioner1';
|
|
17
18
|
import { executeGlobalControllerRawResponse } from 'aura';
|
|
18
|
-
import {
|
|
19
|
+
import { getSfapJwt } from 'force/clwrSfapExchange';
|
|
19
20
|
|
|
20
21
|
/**
|
|
21
22
|
* Copyright (c) 2022, Salesforce, Inc.,
|
|
@@ -2341,7 +2342,7 @@ class ConsoleLogger {
|
|
|
2341
2342
|
/**
|
|
2342
2343
|
* Constructs a new LoggerService.
|
|
2343
2344
|
*/
|
|
2344
|
-
function loggerService(level, printer, formatter) {
|
|
2345
|
+
function loggerService$1(level, printer, formatter) {
|
|
2345
2346
|
return new ConsoleLogger(level, printer, formatter);
|
|
2346
2347
|
}
|
|
2347
2348
|
|
|
@@ -2431,7 +2432,7 @@ let defaultLogger = {
|
|
|
2431
2432
|
error: () => { },
|
|
2432
2433
|
};
|
|
2433
2434
|
if (process.env.NODE_ENV !== 'production') {
|
|
2434
|
-
defaultLogger = loggerService();
|
|
2435
|
+
defaultLogger = loggerService$1();
|
|
2435
2436
|
}
|
|
2436
2437
|
/**
|
|
2437
2438
|
* Decodes JWT token information and provides a default expiry if none is present.
|
|
@@ -2723,52 +2724,20 @@ function buildJwtRequestHeaderInterceptor(jwtManager, jwtRequestModifier = (_e,
|
|
|
2723
2724
|
};
|
|
2724
2725
|
}
|
|
2725
2726
|
|
|
2726
|
-
const SFAP_EXCHANGE_PATH = '/webruntime/sfap-info';
|
|
2727
|
-
/**
|
|
2728
|
-
* We expect jwt info and baseUri to be present in the response.
|
|
2729
|
-
*
|
|
2730
|
-
* @param response
|
|
2731
|
-
*/
|
|
2732
|
-
function validateResponse(response) {
|
|
2733
|
-
if (!response || !response.jwt || !response.baseUri) {
|
|
2734
|
-
// wrapped the invocation in env conditional
|
|
2735
|
-
// eslint-disable-next-line @salesforce/lds/no-error-in-production
|
|
2736
|
-
throw new Error(`Expected jwt info and baseUri to be present but instead got: ${JSON.stringify(response)}`);
|
|
2737
|
-
}
|
|
2738
|
-
}
|
|
2739
2727
|
/**
|
|
2740
2728
|
* Resolves Jwt token for SFAP by calling Aura action
|
|
2741
2729
|
* {@link JwtResolver} for platform SFAP
|
|
2742
2730
|
*/
|
|
2743
2731
|
const platformSfapJwtResolver = {
|
|
2744
2732
|
getJwt() {
|
|
2745
|
-
return new Promise((resolve
|
|
2746
|
-
|
|
2747
|
-
.then((res) => res.json())
|
|
2748
|
-
.then((response) => {
|
|
2749
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2750
|
-
validateResponse(response);
|
|
2751
|
-
}
|
|
2733
|
+
return new Promise((resolve) => {
|
|
2734
|
+
getSfapJwt().then((response) => {
|
|
2752
2735
|
resolve({
|
|
2753
2736
|
jwt: response.jwt,
|
|
2754
2737
|
extraInfo: {
|
|
2755
2738
|
baseUri: response.baseUri,
|
|
2756
2739
|
},
|
|
2757
2740
|
});
|
|
2758
|
-
})
|
|
2759
|
-
.catch((error) => {
|
|
2760
|
-
if (error instanceof Error) {
|
|
2761
|
-
reject(error.message);
|
|
2762
|
-
return;
|
|
2763
|
-
}
|
|
2764
|
-
// AuraFetchResponse errors
|
|
2765
|
-
const { status } = error;
|
|
2766
|
-
if (status !== HttpStatusCode$2.ServerError) {
|
|
2767
|
-
// ConnectInJavaError
|
|
2768
|
-
reject(error.body.message);
|
|
2769
|
-
return;
|
|
2770
|
-
}
|
|
2771
|
-
reject(error.body.error);
|
|
2772
2741
|
});
|
|
2773
2742
|
});
|
|
2774
2743
|
},
|
|
@@ -2870,33 +2839,6 @@ function buildJwtRequestInterceptor(logger) {
|
|
|
2870
2839
|
return jwtRequestHeaderInterceptor;
|
|
2871
2840
|
}
|
|
2872
2841
|
|
|
2873
|
-
// Initializes OneStore in Webruntime
|
|
2874
|
-
function initOneStore() {
|
|
2875
|
-
const loggerService = new ConsoleLogger$1('ERROR');
|
|
2876
|
-
const cacheServiceDescriptor = buildServiceDescriptor$4();
|
|
2877
|
-
const instrumentationServiceDescriptor = buildServiceDescriptor$5(loggerService);
|
|
2878
|
-
const inMemoryCacheInclusionPolicyServiceDescriptor = buildInMemoryCacheInclusionPolicyService(cacheServiceDescriptor.service);
|
|
2879
|
-
const services = [
|
|
2880
|
-
instrumentationServiceDescriptor,
|
|
2881
|
-
buildUnauthorizedFetchServiceDescriptor(),
|
|
2882
|
-
buildJwtAuthorizedSfapFetchServiceDescriptor(loggerService),
|
|
2883
|
-
buildCopilotFetchServiceDescriptor(loggerService),
|
|
2884
|
-
buildAuraNetworkService(),
|
|
2885
|
-
buildServiceDescriptor$6(instrumentationServiceDescriptor.service),
|
|
2886
|
-
buildServiceDescriptor$3(cacheServiceDescriptor.service, inMemoryCacheInclusionPolicyServiceDescriptor.service),
|
|
2887
|
-
buildServiceDescriptor$d(),
|
|
2888
|
-
buildServiceDescriptor$1(),
|
|
2889
|
-
buildServiceDescriptor$9(),
|
|
2890
|
-
buildServiceDescriptor$e(),
|
|
2891
|
-
buildServiceDescriptor$8(),
|
|
2892
|
-
buildServiceDescriptor$7(),
|
|
2893
|
-
buildServiceDescriptor$c(),
|
|
2894
|
-
buildServiceDescriptor$b(),
|
|
2895
|
-
buildServiceDescriptor$a(),
|
|
2896
|
-
buildServiceDescriptor$2(),
|
|
2897
|
-
];
|
|
2898
|
-
setServices(services);
|
|
2899
|
-
}
|
|
2900
2842
|
function buildAuraNetworkService() {
|
|
2901
2843
|
return {
|
|
2902
2844
|
type: 'auraNetwork',
|
|
@@ -2904,6 +2846,28 @@ function buildAuraNetworkService() {
|
|
|
2904
2846
|
service: executeGlobalControllerRawResponse,
|
|
2905
2847
|
};
|
|
2906
2848
|
}
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2849
|
+
const loggerService = new ConsoleLogger$1('ERROR');
|
|
2850
|
+
const cacheServiceDescriptor = buildServiceDescriptor$4();
|
|
2851
|
+
const instrumentationServiceDescriptor = buildServiceDescriptor$5(loggerService);
|
|
2852
|
+
const inMemoryCacheInclusionPolicyServiceDescriptor = buildInMemoryCacheInclusionPolicyService(cacheServiceDescriptor.service);
|
|
2853
|
+
const services = [
|
|
2854
|
+
instrumentationServiceDescriptor,
|
|
2855
|
+
buildUnauthorizedFetchServiceDescriptor(),
|
|
2856
|
+
buildJwtAuthorizedSfapFetchServiceDescriptor(loggerService),
|
|
2857
|
+
buildCopilotFetchServiceDescriptor(loggerService),
|
|
2858
|
+
buildAuraNetworkService(),
|
|
2859
|
+
buildServiceDescriptor$6(instrumentationServiceDescriptor.service),
|
|
2860
|
+
buildServiceDescriptor$3(cacheServiceDescriptor.service, inMemoryCacheInclusionPolicyServiceDescriptor.service),
|
|
2861
|
+
buildServiceDescriptor$d(),
|
|
2862
|
+
buildServiceDescriptor$1(),
|
|
2863
|
+
buildServiceDescriptor$9(),
|
|
2864
|
+
buildServiceDescriptor$e(),
|
|
2865
|
+
buildServiceDescriptor$8(),
|
|
2866
|
+
buildServiceDescriptor$7(),
|
|
2867
|
+
buildServiceDescriptor$c(),
|
|
2868
|
+
buildServiceDescriptor$b(),
|
|
2869
|
+
buildServiceDescriptor$a(),
|
|
2870
|
+
buildServiceDescriptor$2(),
|
|
2871
|
+
];
|
|
2872
|
+
setServices(services);
|
|
2873
|
+
// version: 1.362.0-5d2767de00
|
package/dist/types/main.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
1
|
+
import getServices, { resolve, setServices } from '@luvio/service-provisioner/v1';
|
|
2
|
+
export { getServices as default, resolve, setServices };
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/lds-runtime-webruntime",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.362.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"description": "LDS engine for Webruntime runtime",
|
|
6
|
-
"main": "dist/
|
|
7
|
-
"module": "dist/
|
|
6
|
+
"main": "dist/ldsWebruntimeOneStoreInit.js",
|
|
7
|
+
"module": "dist/ldsWebruntimeOneStoreInit.js",
|
|
8
8
|
"types": "dist/types/main.d.ts",
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
@@ -12,16 +12,16 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./dist/types/main.d.ts",
|
|
15
|
-
"import": "./dist/
|
|
16
|
-
"default": "./dist/
|
|
15
|
+
"import": "./dist/ldsWebruntimeOneStoreInit.js",
|
|
16
|
+
"default": "./dist/ldsWebruntimeOneStoreInit.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"sfdc": {
|
|
20
|
-
"path": "forcelds/
|
|
21
|
-
"publishedFileName": "
|
|
20
|
+
"path": "forcelds/ldsWebruntimeOneStoreInit/",
|
|
21
|
+
"publishedFileName": "ldsWebruntimeOneStoreInit.js",
|
|
22
22
|
"overrides": {
|
|
23
23
|
"artifactDirectory": "dist",
|
|
24
|
-
"outputModuleName": "
|
|
24
|
+
"outputModuleName": "ldsWebruntimeOneStoreInit"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
27
|
"scripts": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"test:debug": "node --inspect-brk ../../node_modules/.bin/jest --runInBand",
|
|
33
33
|
"test:size": "luvioBundlesize",
|
|
34
34
|
"release:corejar": "yarn build && ../core-build/scripts/core.js --name=lds-runtime-webruntime",
|
|
35
|
-
"ready": "yarn build &&
|
|
35
|
+
"ready": "yarn build && jest --collectCoverage && yarn test:size && yarn release:corejar"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@luvio/service-provisioner": "5.40.3",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"@luvio/command-sse": "5.40.3",
|
|
51
51
|
"@luvio/command-streaming": "5.40.3",
|
|
52
52
|
"@luvio/jwt-manager": "5.40.3",
|
|
53
|
-
"@luvio/network-adapter-composable": "0.
|
|
54
|
-
"@luvio/network-adapter-fetch": "0.
|
|
53
|
+
"@luvio/network-adapter-composable": "0.158.1",
|
|
54
|
+
"@luvio/network-adapter-fetch": "0.158.1",
|
|
55
55
|
"@luvio/service-aura-network": "5.40.3",
|
|
56
56
|
"@luvio/service-cache": "5.40.3",
|
|
57
57
|
"@luvio/service-cache-control": "5.40.3",
|
|
@@ -61,11 +61,11 @@
|
|
|
61
61
|
"@luvio/service-pubsub": "5.40.3",
|
|
62
62
|
"@luvio/service-store": "5.40.3",
|
|
63
63
|
"@luvio/utils": "5.40.3",
|
|
64
|
-
"@salesforce/lds-adapters-uiapi-lex": "^1.
|
|
64
|
+
"@salesforce/lds-adapters-uiapi-lex": "^1.362.0"
|
|
65
65
|
},
|
|
66
66
|
"luvioBundlesize": [
|
|
67
67
|
{
|
|
68
|
-
"path": "./dist/
|
|
68
|
+
"path": "./dist/ldsWebruntimeOneStoreInit.js",
|
|
69
69
|
"maxSize": {
|
|
70
70
|
"none": "120 kB",
|
|
71
71
|
"min": "50 kB",
|