@scayle/storefront-core 7.65.5 → 7.65.6
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 +6 -0
- package/dist/helpers/filterHelper.cjs +3 -1
- package/dist/helpers/filterHelper.mjs +3 -1
- package/dist/rpc/methods/checkout/checkout.cjs +1 -1
- package/dist/rpc/methods/checkout/checkout.mjs +1 -1
- package/dist/rpc/methods/products.cjs +2 -2
- package/dist/rpc/methods/products.mjs +2 -2
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -109,7 +109,9 @@ exports.getActiveFilters = getActiveFilters;
|
|
|
109
109
|
const groupFiltersByKey = filters => {
|
|
110
110
|
const groupedFilters = filters.reduce((acc, item) => {
|
|
111
111
|
const groupId = item.key;
|
|
112
|
-
if (!acc[groupId])
|
|
112
|
+
if (!acc[groupId]) {
|
|
113
|
+
acc[groupId] = [];
|
|
114
|
+
}
|
|
113
115
|
acc[groupId].push(item);
|
|
114
116
|
return acc;
|
|
115
117
|
}, {});
|
|
@@ -97,7 +97,9 @@ export const getActiveFilters = (filters, activeFilters) => {
|
|
|
97
97
|
export const groupFiltersByKey = (filters) => {
|
|
98
98
|
const groupedFilters = filters.reduce((acc, item) => {
|
|
99
99
|
const groupId = item.key;
|
|
100
|
-
if (!acc[groupId])
|
|
100
|
+
if (!acc[groupId]) {
|
|
101
|
+
acc[groupId] = [];
|
|
102
|
+
}
|
|
101
103
|
acc[groupId].push(item);
|
|
102
104
|
return acc;
|
|
103
105
|
}, {});
|
|
@@ -37,7 +37,7 @@ const getCheckoutToken = exports.getCheckoutToken = async function getCheckoutTo
|
|
|
37
37
|
carrier,
|
|
38
38
|
basketId: context.basketKey,
|
|
39
39
|
campaignKey: context.campaignKey
|
|
40
|
-
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.65.
|
|
40
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.65.6"}`).setProtectedHeader({
|
|
41
41
|
alg: "HS256",
|
|
42
42
|
typ: "JWT"
|
|
43
43
|
}).sign(secret);
|
|
@@ -35,7 +35,7 @@ export const getCheckoutToken = async function getCheckoutToken2(jwtPayload = {}
|
|
|
35
35
|
carrier,
|
|
36
36
|
basketId: context.basketKey,
|
|
37
37
|
campaignKey: context.campaignKey
|
|
38
|
-
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.65.
|
|
38
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.65.6"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
|
|
39
39
|
return {
|
|
40
40
|
accessToken: refreshedAccessToken,
|
|
41
41
|
checkoutJwt
|
|
@@ -269,8 +269,8 @@ const getProductsByCategory = exports.getProductsByCategory = async function get
|
|
|
269
269
|
pagination
|
|
270
270
|
} = await cached(bapiClient.products.query, {
|
|
271
271
|
...cache,
|
|
272
|
-
ttl: 15 * _cache.MINUTE,
|
|
273
|
-
cacheKeyPrefix: `products-query-category-${category === "/" ? "root" : categoryId}`
|
|
272
|
+
ttl: cache?.ttl ?? 15 * _cache.MINUTE,
|
|
273
|
+
cacheKeyPrefix: cache?.cacheKeyPrefix || `products-query-category-${category === "/" ? "root" : categoryId}`
|
|
274
274
|
})({
|
|
275
275
|
where: {
|
|
276
276
|
categoryId,
|
|
@@ -249,8 +249,8 @@ export const getProductsByCategory = async function getProductsByCategory2(param
|
|
|
249
249
|
bapiClient.products.query,
|
|
250
250
|
{
|
|
251
251
|
...cache,
|
|
252
|
-
ttl: 15 * MINUTE,
|
|
253
|
-
cacheKeyPrefix: `products-query-category-${category === "/" ? "root" : categoryId}`
|
|
252
|
+
ttl: cache?.ttl ?? 15 * MINUTE,
|
|
253
|
+
cacheKeyPrefix: cache?.cacheKeyPrefix || `products-query-category-${category === "/" ? "root" : categoryId}`
|
|
254
254
|
}
|
|
255
255
|
)({
|
|
256
256
|
where: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-core",
|
|
3
|
-
"version": "7.65.
|
|
3
|
+
"version": "7.65.6",
|
|
4
4
|
"description": "Collection of essential utilities to work with the Storefront API",
|
|
5
5
|
"author": "SCAYLE Commerce Engine",
|
|
6
6
|
"license": "MIT",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"package:lint": "publint",
|
|
57
57
|
"test:watch": "vitest --passWithNoTests",
|
|
58
58
|
"test": "vitest --run --passWithNoTests",
|
|
59
|
-
"test:ci": "vitest --run --passWithNoTests --coverage --reporter=default --reporter=junit"
|
|
59
|
+
"test:ci": "vitest --run --passWithNoTests --coverage --reporter=default --reporter=junit --outputFile=./junit.xml"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
62
|
"@scayle/storefront-api": "17.8.0",
|
|
@@ -69,21 +69,21 @@
|
|
|
69
69
|
"utility-types": "^3.11.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@scayle/eslint-config-storefront": "4.3.
|
|
72
|
+
"@scayle/eslint-config-storefront": "4.3.2",
|
|
73
73
|
"@types/crypto-js": "4.2.2",
|
|
74
|
-
"@types/node": "20.16.
|
|
74
|
+
"@types/node": "20.16.12",
|
|
75
75
|
"@types/webpack-env": "1.18.5",
|
|
76
|
-
"@vitest/coverage-v8": "2.1.
|
|
76
|
+
"@vitest/coverage-v8": "2.1.3",
|
|
77
77
|
"dprint": "0.47.2",
|
|
78
|
-
"eslint": "9.
|
|
78
|
+
"eslint": "9.12.0",
|
|
79
79
|
"eslint-formatter-gitlab": "5.1.0",
|
|
80
80
|
"publint": "0.2.11",
|
|
81
81
|
"rimraf": "6.0.1",
|
|
82
82
|
"ts-node": "10.9.2",
|
|
83
|
-
"typescript": "5.6.
|
|
83
|
+
"typescript": "5.6.3",
|
|
84
84
|
"unbuild": "2.0.0",
|
|
85
85
|
"unstorage": "1.12.0",
|
|
86
|
-
"vitest": "2.1.
|
|
86
|
+
"vitest": "2.1.3"
|
|
87
87
|
},
|
|
88
88
|
"optionalDependencies": {
|
|
89
89
|
"redis": "4"
|