@scayle/storefront-core 7.60.1 → 7.61.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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @scayle/storefront-core
2
2
 
3
+ ## 7.61.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Add `sapiClient: StorefrontAPIClient` to `RpcContext`
8
+
9
+ Deprecate `bapiClient` in favour of `sapiClient`
10
+
3
11
  ## 7.60.1
4
12
 
5
13
  ### Patch Changes
@@ -220,8 +228,8 @@
220
228
 
221
229
  ```ts
222
230
  const { data: externalIDPRedirects } = await useIDP({
223
- queryParams: { redirectTo: "/account" },
224
- });
231
+ queryParams: { redirectTo: '/account' },
232
+ })
225
233
  ```
226
234
 
227
235
  Please note that `code` and `state` are not supported as these are used by the SCAYLE Authentication API.
@@ -838,7 +846,7 @@
838
846
 
839
847
  ```js
840
848
  env: {
841
- SFC_OMIT_MD5: true;
849
+ SFC_OMIT_MD5: true
842
850
  }
843
851
  ```
844
852
 
@@ -846,7 +854,7 @@
846
854
 
847
855
  ```js
848
856
  env: {
849
- SFC_OMIT_MD5: process.env.SFC_OMIT_MD5;
857
+ SFC_OMIT_MD5: process.env.SFC_OMIT_MD5
850
858
  }
851
859
  ```
852
860
 
@@ -884,7 +892,7 @@
884
892
 
885
893
  ```js
886
894
  env: {
887
- SFC_OMIT_MD5: true;
895
+ SFC_OMIT_MD5: true
888
896
  }
889
897
  ```
890
898
 
@@ -892,7 +900,7 @@
892
900
 
893
901
  ```js
894
902
  env: {
895
- SFC_OMIT_MD5: process.env.SFC_OMIT_MD5;
903
+ SFC_OMIT_MD5: process.env.SFC_OMIT_MD5
896
904
  }
897
905
  ```
898
906
 
@@ -33,7 +33,7 @@ const getCheckoutToken = exports.getCheckoutToken = async function getCheckoutTo
33
33
  carrier,
34
34
  basketId: context.basketKey,
35
35
  campaignKey: context.campaignKey
36
- }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.60.1"}`).setProtectedHeader({
36
+ }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.61.0"}`).setProtectedHeader({
37
37
  alg: "HS256",
38
38
  typ: "JWT"
39
39
  }).sign(secret);
@@ -27,7 +27,7 @@ export const getCheckoutToken = async function getCheckoutToken2(jwtPayload = {}
27
27
  carrier,
28
28
  basketId: context.basketKey,
29
29
  campaignKey: context.campaignKey
30
- }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.60.1"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
30
+ }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.61.0"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
31
31
  return {
32
32
  accessToken: refreshedAccessToken,
33
33
  checkoutJwt
@@ -72,7 +72,11 @@ export type RpcContext = {
72
72
  */
73
73
  cbdExpiration?: number;
74
74
  };
75
+ /**
76
+ * @deprecated bapiClient got renamed. Use {@link RpcContext.sapiClient} from now on.
77
+ */
75
78
  bapiClient: StorefrontAPIClient;
79
+ sapiClient?: StorefrontAPIClient;
76
80
  cached: CachedType;
77
81
  /**
78
82
  * @deprecated this flag will be removed in a future release.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-core",
3
- "version": "7.60.1",
3
+ "version": "7.61.0",
4
4
  "description": "Collection of essential utilities to work with the Storefront API",
5
5
  "author": "SCAYLE Commerce Engine",
6
6
  "license": "MIT",
@@ -74,7 +74,7 @@
74
74
  "@types/crypto-js": "4.2.2",
75
75
  "@types/node": "20.14.11",
76
76
  "@types/webpack-env": "1.18.5",
77
- "@vitest/coverage-v8": "2.0.3",
77
+ "@vitest/coverage-v8": "2.0.4",
78
78
  "dprint": "0.47.2",
79
79
  "eslint": "9.7.0",
80
80
  "eslint-formatter-gitlab": "5.1.0",
@@ -84,7 +84,7 @@
84
84
  "typescript": "5.5.3",
85
85
  "unbuild": "2.0.0",
86
86
  "unstorage": "1.10.2",
87
- "vitest": "2.0.3"
87
+ "vitest": "2.0.4"
88
88
  },
89
89
  "optionalDependencies": {
90
90
  "redis": "4"