@scayle/storefront-core 7.66.1 → 7.66.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,19 @@
|
|
|
1
1
|
# @scayle/storefront-core
|
|
2
2
|
|
|
3
|
+
## 7.66.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Response objects with an error status code should not be cached
|
|
8
|
+
|
|
9
|
+
## 7.66.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
**Dependencies**
|
|
14
|
+
|
|
15
|
+
- Updated dependency to @scayle/storefront-api@17.9.4
|
|
16
|
+
|
|
3
17
|
## 7.66.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cache/cached.cjs
CHANGED
package/dist/cache/cached.mjs
CHANGED
|
@@ -42,6 +42,9 @@ export class Cached {
|
|
|
42
42
|
if (response === void 0 || response === null) {
|
|
43
43
|
return response;
|
|
44
44
|
}
|
|
45
|
+
if (response instanceof Response && !response.ok) {
|
|
46
|
+
return response;
|
|
47
|
+
}
|
|
45
48
|
try {
|
|
46
49
|
await this.setCacheValue(cacheKey, response, options);
|
|
47
50
|
} catch (e) {
|
|
@@ -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.66.
|
|
40
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.66.3"}`).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.66.
|
|
38
|
+
}).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"7.66.3"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
|
|
39
39
|
return {
|
|
40
40
|
accessToken: refreshedAccessToken,
|
|
41
41
|
checkoutJwt
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-core",
|
|
3
|
-
"version": "7.66.
|
|
3
|
+
"version": "7.66.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 --outputFile=./junit.xml"
|
|
60
60
|
},
|
|
61
61
|
"dependencies": {
|
|
62
|
-
"@scayle/storefront-api": "17.9.
|
|
62
|
+
"@scayle/storefront-api": "17.9.4",
|
|
63
63
|
"crypto-js": "^4.2.0",
|
|
64
64
|
"hookable": "^5.5.3",
|
|
65
65
|
"jose": "^5.6.3",
|
|
@@ -71,18 +71,18 @@
|
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@scayle/eslint-config-storefront": "4.3.2",
|
|
73
73
|
"@types/crypto-js": "4.2.2",
|
|
74
|
-
"@types/node": "22.
|
|
74
|
+
"@types/node": "22.9.0",
|
|
75
75
|
"@types/webpack-env": "1.18.5",
|
|
76
76
|
"@vitest/coverage-v8": "2.1.4",
|
|
77
77
|
"dprint": "0.47.5",
|
|
78
|
-
"eslint": "9.
|
|
78
|
+
"eslint": "9.14.0",
|
|
79
79
|
"eslint-formatter-gitlab": "5.1.0",
|
|
80
80
|
"publint": "0.2.12",
|
|
81
81
|
"rimraf": "6.0.1",
|
|
82
82
|
"ts-node": "10.9.2",
|
|
83
83
|
"typescript": "5.6.3",
|
|
84
84
|
"unbuild": "2.0.0",
|
|
85
|
-
"unstorage": "1.
|
|
85
|
+
"unstorage": "1.13.1",
|
|
86
86
|
"vitest": "2.1.4"
|
|
87
87
|
},
|
|
88
88
|
"optionalDependencies": {
|