@scayle/storefront-core 7.49.1 → 7.49.3

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.49.3
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @aboutyou/backbone@16.3.0
9
+
10
+ ## 7.49.2
11
+
12
+ ### Patch Changes
13
+
14
+ - Fixed a bug where the `addItemToWishlist` RPC method returned an empty response upon failure.
15
+ - Updated dependencies
16
+ - @aboutyou/backbone@16.2.2
17
+
3
18
  ## 7.49.1
4
19
 
5
20
  ### Patch Changes
@@ -52,15 +52,17 @@ const addItemToWishlist = exports.addItemToWishlist = async function addItemToWi
52
52
  pricePromotionKey
53
53
  });
54
54
  if (result.type === "success") {
55
- return await getWishlist(resolvedWith, context);
55
+ return result.wishlist;
56
56
  } else {
57
57
  const {
58
- code,
59
- message
60
- } = result.wishlist;
58
+ statusCode: code,
59
+ kind,
60
+ type
61
+ } = result;
61
62
  context.log.error("Adding to wishlist failed", result.wishlist);
62
63
  return new Response(JSON.stringify({
63
- message
64
+ kind,
65
+ type
64
66
  }), {
65
67
  status: code
66
68
  });
@@ -33,11 +33,11 @@ export const addItemToWishlist = async function addItemToWishlist2(options, cont
33
33
  }
34
34
  );
35
35
  if (result.type === "success") {
36
- return await getWishlist(resolvedWith, context);
36
+ return result.wishlist;
37
37
  } else {
38
- const { code, message } = result.wishlist;
38
+ const { statusCode: code, kind, type } = result;
39
39
  context.log.error("Adding to wishlist failed", result.wishlist);
40
- return new Response(JSON.stringify({ message }), { status: code });
40
+ return new Response(JSON.stringify({ kind, type }), { status: code });
41
41
  }
42
42
  };
43
43
  export const removeItemFromWishlist = async function removeItemFromWishlist2(options, context) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-core",
3
- "version": "7.49.1",
3
+ "version": "7.49.3",
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
- "@aboutyou/backbone": "16.2.1",
62
+ "@aboutyou/backbone": "16.3.0",
63
63
  "crypto-js": "4.2.0",
64
64
  "jose": "5.2.4",
65
65
  "radash": "12.1.0",
@@ -73,9 +73,9 @@
73
73
  "@types/crypto-js": "4.2.2",
74
74
  "@types/node": "20.12.7",
75
75
  "@types/webpack-env": "1.18.4",
76
- "@vitest/coverage-v8": "1.5.1",
76
+ "@vitest/coverage-v8": "1.5.2",
77
77
  "dprint": "0.45.1",
78
- "eslint": "9.0.0",
78
+ "eslint": "9.1.1",
79
79
  "eslint-formatter-gitlab": "5.1.0",
80
80
  "publint": "0.2.7",
81
81
  "rimraf": "5.0.5",
@@ -83,7 +83,7 @@
83
83
  "typescript": "5.4.5",
84
84
  "unbuild": "2.0.0",
85
85
  "unstorage": "1.10.2",
86
- "vitest": "1.5.1"
86
+ "vitest": "1.5.2"
87
87
  },
88
88
  "optionalDependencies": {
89
89
  "redis": "4"