@scayle/storefront-core 8.19.0 → 8.19.1
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
|
@@ -29,12 +29,18 @@ export const getCategoriesByPath = async function getCategoriesByPath2({ path, c
|
|
|
29
29
|
return getRootCategories({ children, includeHidden, properties }, context);
|
|
30
30
|
}
|
|
31
31
|
const sanitizedPath = splitAndRemoveEmpty(path);
|
|
32
|
-
const result = await cached(
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
const result = await cached(
|
|
33
|
+
mapSAPIFetchErrorToResponse(sapiClient.categories.getByPath),
|
|
34
|
+
{
|
|
35
|
+
cacheKeyPrefix: `getByPath-categories-${sanitizedPath}`
|
|
36
|
+
}
|
|
37
|
+
)(sanitizedPath, {
|
|
35
38
|
with: { children, properties },
|
|
36
39
|
includeHidden
|
|
37
40
|
});
|
|
41
|
+
if (result instanceof Response) {
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
38
44
|
const rootPath = await Promise.all(
|
|
39
45
|
(result.rootlineIds || []).map((id) => {
|
|
40
46
|
return cached(sapiClient.categories.getById, {
|
|
@@ -36,7 +36,7 @@ export const getCheckoutToken = async function getCheckoutToken2(jwtPayload = {}
|
|
|
36
36
|
carrier,
|
|
37
37
|
basketId: context.basketKey,
|
|
38
38
|
campaignKey
|
|
39
|
-
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.19.
|
|
39
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.19.1"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
|
|
40
40
|
return {
|
|
41
41
|
accessToken: refreshedAccessToken,
|
|
42
42
|
checkoutJwt
|