@scayle/storefront-core 7.60.0 → 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,20 @@
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
+
11
+ ## 7.60.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+ - @scayle/storefront-api@17.4.2
17
+
3
18
  ## 7.60.0
4
19
 
5
20
  ### Minor Changes
@@ -213,8 +228,8 @@
213
228
 
214
229
  ```ts
215
230
  const { data: externalIDPRedirects } = await useIDP({
216
- queryParams: { redirectTo: "/account" },
217
- });
231
+ queryParams: { redirectTo: '/account' },
232
+ })
218
233
  ```
219
234
 
220
235
  Please note that `code` and `state` are not supported as these are used by the SCAYLE Authentication API.
@@ -831,7 +846,7 @@
831
846
 
832
847
  ```js
833
848
  env: {
834
- SFC_OMIT_MD5: true;
849
+ SFC_OMIT_MD5: true
835
850
  }
836
851
  ```
837
852
 
@@ -839,7 +854,7 @@
839
854
 
840
855
  ```js
841
856
  env: {
842
- SFC_OMIT_MD5: process.env.SFC_OMIT_MD5;
857
+ SFC_OMIT_MD5: process.env.SFC_OMIT_MD5
843
858
  }
844
859
  ```
845
860
 
@@ -877,7 +892,7 @@
877
892
 
878
893
  ```js
879
894
  env: {
880
- SFC_OMIT_MD5: true;
895
+ SFC_OMIT_MD5: true
881
896
  }
882
897
  ```
883
898
 
@@ -885,7 +900,7 @@
885
900
 
886
901
  ```js
887
902
  env: {
888
- SFC_OMIT_MD5: process.env.SFC_OMIT_MD5;
903
+ SFC_OMIT_MD5: process.env.SFC_OMIT_MD5
889
904
  }
890
905
  ```
891
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.0"}`).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.0"}`).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.0",
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",
@@ -59,7 +59,7 @@
59
59
  "test:ci": "vitest --run --passWithNoTests --coverage --reporter=default --reporter=junit"
60
60
  },
61
61
  "dependencies": {
62
- "@scayle/storefront-api": "17.4.1",
62
+ "@scayle/storefront-api": "17.4.2",
63
63
  "crypto-js": "^4.2.0",
64
64
  "hookable": "^5.5.3",
65
65
  "jose": "^5.6.3",
@@ -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"