@scayle/storefront-core 8.1.2 → 8.1.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,13 @@
1
1
  # @scayle/storefront-core
2
2
 
3
+ ## 8.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ **Dependencies**
8
+
9
+ - Updated dependency to @scayle/storefront-api@17.14.0
10
+
3
11
  ## 8.1.2
4
12
 
5
13
  ### Patch Changes
@@ -13,7 +13,7 @@ export declare class Cached {
13
13
  private log;
14
14
  private prefix;
15
15
  private enabled;
16
- constructor(cache: CacheInterface, log: Log, prefix: (string | number) | undefined, enabled: boolean);
16
+ constructor(cache: CacheInterface, log: Log, prefix: string | number | undefined, enabled: boolean);
17
17
  get isCacheEnabled(): boolean | undefined;
18
18
  execute<TArgs extends unknown[], TResult>(fn: Fn<TArgs, TResult>, options?: CacheOptions): Awaited<Fn<TArgs, TResult>>;
19
19
  private getCacheValue;
@@ -1 +1 @@
1
- export declare const flattenDeep: <T extends unknown[]>(array: T) => (T extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? any : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : T)[];
1
+ export declare const flattenDeep: <T extends unknown[]>(array: T) => (T extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? InnerArr extends readonly (infer InnerArr)[] ? /*elided*/ any : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : InnerArr : T)[];
@@ -55,7 +55,7 @@ const groupFilterableValuesByKey = (filters, filterableKeys, {
55
55
  const transformedAvailableFilters = enabledFilters.reduce((availableFilters, filter) => {
56
56
  filter.values.forEach(value => {
57
57
  const isBoolean = filter.type === _storefrontApi.FilterTypes.BOOLEAN;
58
- const hasNameInValue = ("name" in value);
58
+ const hasNameInValue = "name" in value;
59
59
  if (isBoolean && hasNameInValue && value.name === false) {
60
60
  return;
61
61
  }
@@ -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"}@${"8.1.2"}`).setProtectedHeader({
40
+ }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.1.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"}@${"8.1.2"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
38
+ }).setIssuedAt(now).setNotBefore(now).setExpirationTime("1h").setIssuer(`${"@scayle/storefront-core"}@${"8.1.3"}`).setProtectedHeader({ alg: "HS256", typ: "JWT" }).sign(secret);
39
39
  return {
40
40
  accessToken: refreshedAccessToken,
41
41
  checkoutJwt
@@ -15,7 +15,7 @@ export interface LogOptions {
15
15
  * If no handler is provided, it will log to the console.
16
16
  */
17
17
  export declare class Log {
18
- static default: Log;
18
+ static readonly default: Log;
19
19
  _handler?: LogHandler;
20
20
  _space: string;
21
21
  _type: string;
@@ -4,13 +4,13 @@ export declare const mergeBaskets: (fromBasketKey: string, toBasketKey: string,
4
4
  }, context: RpcContext) => Promise<{
5
5
  type: "failure";
6
6
  statusCode: number;
7
- basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api/dist/shared/storefront-api.02fa829c").P, import("@scayle/storefront-api/dist/shared/storefront-api.02fa829c").a>;
7
+ basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api/dist/shared/storefront-api.Dgus9ezt").P, import("@scayle/storefront-api/dist/shared/storefront-api.Dgus9ezt").a>;
8
8
  } | {
9
9
  readonly type: "success";
10
- readonly basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api/dist/shared/storefront-api.02fa829c").P, import("@scayle/storefront-api/dist/shared/storefront-api.02fa829c").a>;
10
+ readonly basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api/dist/shared/storefront-api.Dgus9ezt").P, import("@scayle/storefront-api/dist/shared/storefront-api.Dgus9ezt").a>;
11
11
  } | {
12
12
  readonly type: "failure";
13
- readonly basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api/dist/shared/storefront-api.02fa829c").P, import("@scayle/storefront-api/dist/shared/storefront-api.02fa829c").a>;
13
+ readonly basket: import("@scayle/storefront-api").BasketResponseData<import("@scayle/storefront-api/dist/shared/storefront-api.Dgus9ezt").P, import("@scayle/storefront-api/dist/shared/storefront-api.Dgus9ezt").a>;
14
14
  readonly errors: import("@scayle/storefront-api").AddOrUpdateItemError[];
15
15
  } | undefined>;
16
16
  export declare const mergeWishlists: (fromWishlistKey: string, toWishlistKey: string, withOptions: BasketWithOptions, context: RpcContext) => Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scayle/storefront-core",
3
- "version": "8.1.2",
3
+ "version": "8.1.3",
4
4
  "description": "Collection of essential utilities to work with the Storefront API",
5
5
  "author": "SCAYLE Commerce Engine",
6
6
  "license": "MIT",
@@ -71,7 +71,7 @@
71
71
  "test:ci": "vitest --run --passWithNoTests --coverage --reporter=default --reporter=junit --outputFile=./junit.xml"
72
72
  },
73
73
  "dependencies": {
74
- "@scayle/storefront-api": "17.13.0",
74
+ "@scayle/storefront-api": "17.14.0",
75
75
  "crypto-js": "^4.2.0",
76
76
  "hookable": "^5.5.3",
77
77
  "jose": "^5.6.3",
@@ -81,19 +81,19 @@
81
81
  "utility-types": "^3.11.0"
82
82
  },
83
83
  "devDependencies": {
84
- "@scayle/eslint-config-storefront": "4.3.2",
84
+ "@scayle/eslint-config-storefront": "4.4.0",
85
85
  "@types/crypto-js": "4.2.2",
86
- "@types/node": "22.10.1",
86
+ "@types/node": "22.10.5",
87
87
  "@types/webpack-env": "1.18.5",
88
88
  "@vitest/coverage-v8": "2.1.8",
89
- "dprint": "0.47.6",
90
- "eslint": "9.16.0",
89
+ "dprint": "0.48.0",
90
+ "eslint": "9.17.0",
91
91
  "eslint-formatter-gitlab": "5.1.0",
92
92
  "publint": "0.2.12",
93
93
  "rimraf": "6.0.1",
94
- "typescript": "5.6.3",
95
- "unbuild": "2.0.0",
96
- "unstorage": "1.13.1",
94
+ "typescript": "5.7.2",
95
+ "unbuild": "3.2.0",
96
+ "unstorage": "1.14.4",
97
97
  "vitest": "2.1.8"
98
98
  }
99
99
  }