@scayle/storefront-core 8.42.0 → 8.42.2

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
+ ## 8.42.2
4
+
5
+ ### Patch Changes
6
+
7
+ **Dependencies**
8
+
9
+ - Updated dependency to @scayle/unstorage-scayle-kv-driver@2.0.0
10
+
11
+ ## 8.42.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Increased the default cache timeout to 1000ms to reduce cases of prematurely skipping the cache.
16
+
3
17
  ## 8.42.0
4
18
 
5
19
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  import { timeout } from "../utils/index.mjs";
2
2
  import { sha256 } from "../utils/hash.mjs";
3
- import { CACHE_TIMEOUT } from "../constants/index.mjs";
3
+ const CACHE_TIMEOUT = 1e3;
4
4
  export const MINUTE = 60;
5
5
  const CACHE_NOT_INITIALIZED_MSG = "Cache is not initialized";
6
6
  export class Cached {
@@ -1,5 +1,4 @@
1
1
  export * from './withParameters';
2
- export * from './cache';
3
2
  export * from './httpStatus';
4
3
  export * from './sorting';
5
4
  export * from './product';
@@ -1,5 +1,4 @@
1
1
  export * from "./withParameters.mjs";
2
- export * from "./cache.mjs";
3
2
  export * from "./httpStatus.mjs";
4
3
  export * from "./sorting.mjs";
5
4
  export * from "./product.mjs";
@@ -33,7 +33,7 @@ export const getCheckoutToken = defineRpcHandler(async (jwtPayload = {}, context
33
33
  carrier,
34
34
  basketId: context.basketKey,
35
35
  campaignKey
36
- }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.42.0"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
36
+ }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.42.2"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
37
37
  return {
38
38
  accessToken: refreshedAccessToken,
39
39
  checkoutJwt
package/dist/server.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export { UnstorageCache } from './cache/providers/unstorage';
2
- export { CACHE_TIMEOUT } from './constants/cache';
3
2
  export * from './api/customer';
4
3
  export * from './api/oauth';
package/dist/server.mjs CHANGED
@@ -1,4 +1,3 @@
1
1
  export { UnstorageCache } from "./cache/providers/unstorage.mjs";
2
- export { CACHE_TIMEOUT } from "./constants/cache.mjs";
3
2
  export * from "./api/customer.mjs";
4
3
  export * from "./api/oauth.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-core",
3
- "version": "8.42.0",
3
+ "version": "8.42.2",
4
4
  "description": "Collection of essential utilities to work with the Storefront API",
5
5
  "author": "SCAYLE Commerce Engine",
6
6
  "license": "MIT",
@@ -57,7 +57,7 @@
57
57
  "uncrypto": "^0.1.3",
58
58
  "utility-types": "^3.11.0",
59
59
  "@scayle/storefront-api": "18.14.0",
60
- "@scayle/unstorage-scayle-kv-driver": "1.1.0"
60
+ "@scayle/unstorage-scayle-kv-driver": "2.0.0"
61
61
  },
62
62
  "devDependencies": {
63
63
  "@types/crypto-js": "4.2.2",
@@ -74,8 +74,8 @@
74
74
  "unbuild": "3.6.1",
75
75
  "unstorage": "1.17.0",
76
76
  "vitest": "3.2.4",
77
- "@scayle/vitest-config-storefront": "1.0.0",
78
- "@scayle/eslint-config-storefront": "4.7.6"
77
+ "@scayle/eslint-config-storefront": "4.7.6",
78
+ "@scayle/vitest-config-storefront": "1.0.0"
79
79
  },
80
80
  "volta": {
81
81
  "node": "22.18.0"
@@ -1,5 +0,0 @@
1
- /**
2
- * Default cache timeout duration in milliseconds.
3
- * Initially set to 300ms, currently 500ms.
4
- */
5
- export declare const CACHE_TIMEOUT = 500;
@@ -1 +0,0 @@
1
- export const CACHE_TIMEOUT = 500;