@salesforce/lds-runtime-webruntime 1.361.0 → 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.
@@ -16,7 +16,7 @@ import { getInstrumentation } from 'o11y/client';
16
16
  import { setServices } from 'force/luvioServiceProvisioner1';
17
17
  export { default, resolve, setServices } from 'force/luvioServiceProvisioner1';
18
18
  import { executeGlobalControllerRawResponse } from 'aura';
19
- import { HttpStatusCode as HttpStatusCode$2 } from 'force/luvioEngine';
19
+ import { getSfapJwt } from 'force/clwrSfapExchange';
20
20
 
21
21
  /**
22
22
  * Copyright (c) 2022, Salesforce, Inc.,
@@ -2724,52 +2724,20 @@ function buildJwtRequestHeaderInterceptor(jwtManager, jwtRequestModifier = (_e,
2724
2724
  };
2725
2725
  }
2726
2726
 
2727
- const SFAP_EXCHANGE_PATH = '/webruntime/sfap-info';
2728
- /**
2729
- * We expect jwt info and baseUri to be present in the response.
2730
- *
2731
- * @param response
2732
- */
2733
- function validateResponse(response) {
2734
- if (!response || !response.jwt || !response.baseUri) {
2735
- // wrapped the invocation in env conditional
2736
- // eslint-disable-next-line @salesforce/lds/no-error-in-production
2737
- throw new Error(`Expected jwt info and baseUri to be present but instead got: ${JSON.stringify(response)}`);
2738
- }
2739
- }
2740
2727
  /**
2741
2728
  * Resolves Jwt token for SFAP by calling Aura action
2742
2729
  * {@link JwtResolver} for platform SFAP
2743
2730
  */
2744
2731
  const platformSfapJwtResolver = {
2745
2732
  getJwt() {
2746
- return new Promise((resolve, reject) => {
2747
- fetch(SFAP_EXCHANGE_PATH)
2748
- .then((res) => res.json())
2749
- .then((response) => {
2750
- if (process.env.NODE_ENV !== 'production') {
2751
- validateResponse(response);
2752
- }
2733
+ return new Promise((resolve) => {
2734
+ getSfapJwt().then((response) => {
2753
2735
  resolve({
2754
2736
  jwt: response.jwt,
2755
2737
  extraInfo: {
2756
2738
  baseUri: response.baseUri,
2757
2739
  },
2758
2740
  });
2759
- })
2760
- .catch((error) => {
2761
- if (error instanceof Error) {
2762
- reject(error.message);
2763
- return;
2764
- }
2765
- // AuraFetchResponse errors
2766
- const { status } = error;
2767
- if (status !== HttpStatusCode$2.ServerError) {
2768
- // ConnectInJavaError
2769
- reject(error.body.message);
2770
- return;
2771
- }
2772
- reject(error.body.error);
2773
2741
  });
2774
2742
  });
2775
2743
  },
@@ -2902,4 +2870,4 @@ const services = [
2902
2870
  buildServiceDescriptor$2(),
2903
2871
  ];
2904
2872
  setServices(services);
2905
- // version: 1.361.0-6a70680f2b
2873
+ // version: 1.362.0-5d2767de00
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@salesforce/lds-runtime-webruntime",
3
- "version": "1.361.0",
3
+ "version": "1.362.0",
4
4
  "license": "SEE LICENSE IN LICENSE.txt",
5
5
  "description": "LDS engine for Webruntime runtime",
6
- "main": "dist/ldsWebruntimeOneRuntimeInit.js",
7
- "module": "dist/ldsWebruntimeOneRuntimeInit.js",
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/ldsWebruntimeOneRuntimeInit.js",
16
- "default": "./dist/ldsWebruntimeOneRuntimeInit.js"
15
+ "import": "./dist/ldsWebruntimeOneStoreInit.js",
16
+ "default": "./dist/ldsWebruntimeOneStoreInit.js"
17
17
  }
18
18
  },
19
19
  "sfdc": {
20
- "path": "forcelds/ldsWebruntimeOneRuntimeInit/",
21
- "publishedFileName": "ldsWebruntimeOneRuntimeInit.js",
20
+ "path": "forcelds/ldsWebruntimeOneStoreInit/",
21
+ "publishedFileName": "ldsWebruntimeOneStoreInit.js",
22
22
  "overrides": {
23
23
  "artifactDirectory": "dist",
24
- "outputModuleName": "ldsWebruntimeOneRuntimeInit"
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 && yarn test:unit && yarn test:size && yarn release:corejar"
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",
@@ -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.361.0"
64
+ "@salesforce/lds-adapters-uiapi-lex": "^1.362.0"
65
65
  },
66
66
  "luvioBundlesize": [
67
67
  {
68
- "path": "./dist/ldsWebruntimeOneRuntimeInit.js",
68
+ "path": "./dist/ldsWebruntimeOneStoreInit.js",
69
69
  "maxSize": {
70
70
  "none": "120 kB",
71
71
  "min": "50 kB",