@scayle/storefront-nuxt 8.57.2 → 8.58.0

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.
Files changed (68) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/module.json +2 -2
  3. package/dist/module.mjs +5 -5
  4. package/dist/runtime/JSONReporter.js +7 -3
  5. package/dist/runtime/api/cacheAuth.d.ts +12 -12
  6. package/dist/runtime/api/cacheAuth.js +11 -11
  7. package/dist/runtime/composables/core/useFormatHelpers.d.ts +2 -2
  8. package/dist/runtime/composables/core/useIDP.d.ts +2 -3
  9. package/dist/runtime/composables/core/useRpc.js +1 -1
  10. package/dist/runtime/composables/core/useUser.d.ts +3 -3
  11. package/dist/runtime/composables/storefront/useBasket.d.ts +1 -1
  12. package/dist/runtime/composables/storefront/useBasket.js +18 -20
  13. package/dist/runtime/composables/storefront/useBrand.d.ts +1 -1
  14. package/dist/runtime/composables/storefront/useBrand.js +1 -3
  15. package/dist/runtime/composables/storefront/useBrands.d.ts +1 -1
  16. package/dist/runtime/composables/storefront/useBrands.js +1 -3
  17. package/dist/runtime/composables/storefront/useCampaign.d.ts +1 -1
  18. package/dist/runtime/composables/storefront/useCampaign.js +1 -3
  19. package/dist/runtime/composables/storefront/useCategories.d.ts +2 -2
  20. package/dist/runtime/composables/storefront/useCategories.js +1 -3
  21. package/dist/runtime/composables/storefront/useCategoryById.d.ts +1 -1
  22. package/dist/runtime/composables/storefront/useCategoryById.js +1 -3
  23. package/dist/runtime/composables/storefront/useCategoryByPath.d.ts +1 -1
  24. package/dist/runtime/composables/storefront/useCategoryByPath.js +1 -3
  25. package/dist/runtime/composables/storefront/useCategoryTree.d.ts +1 -1
  26. package/dist/runtime/composables/storefront/useCategoryTree.js +1 -3
  27. package/dist/runtime/composables/storefront/useCurrentPromotions.d.ts +1 -1
  28. package/dist/runtime/composables/storefront/useCurrentPromotions.js +1 -3
  29. package/dist/runtime/composables/storefront/useFilters.d.ts +1 -1
  30. package/dist/runtime/composables/storefront/useFilters.js +1 -3
  31. package/dist/runtime/composables/storefront/useNavigationTree.d.ts +1 -1
  32. package/dist/runtime/composables/storefront/useNavigationTree.js +1 -3
  33. package/dist/runtime/composables/storefront/useNavigationTrees.d.ts +1 -1
  34. package/dist/runtime/composables/storefront/useNavigationTrees.js +1 -3
  35. package/dist/runtime/composables/storefront/useOrder.d.ts +1 -1
  36. package/dist/runtime/composables/storefront/useOrder.js +1 -3
  37. package/dist/runtime/composables/storefront/useOrderConfirmation.d.ts +1 -1
  38. package/dist/runtime/composables/storefront/useOrderConfirmation.js +1 -3
  39. package/dist/runtime/composables/storefront/useProduct.d.ts +1 -1
  40. package/dist/runtime/composables/storefront/useProduct.js +1 -3
  41. package/dist/runtime/composables/storefront/useProducts.d.ts +1 -1
  42. package/dist/runtime/composables/storefront/useProducts.js +1 -3
  43. package/dist/runtime/composables/storefront/useProductsByIds.d.ts +1 -1
  44. package/dist/runtime/composables/storefront/useProductsByIds.js +1 -3
  45. package/dist/runtime/composables/storefront/useProductsByReferenceKeys.d.ts +1 -1
  46. package/dist/runtime/composables/storefront/useProductsByReferenceKeys.js +1 -3
  47. package/dist/runtime/composables/storefront/useProductsCount.d.ts +2 -2
  48. package/dist/runtime/composables/storefront/useProductsCount.js +1 -3
  49. package/dist/runtime/composables/storefront/usePromotions.d.ts +1 -1
  50. package/dist/runtime/composables/storefront/usePromotions.js +1 -3
  51. package/dist/runtime/composables/storefront/usePromotionsByIds.d.ts +1 -1
  52. package/dist/runtime/composables/storefront/usePromotionsByIds.js +1 -3
  53. package/dist/runtime/composables/storefront/useShopConfiguration.d.ts +4 -5
  54. package/dist/runtime/composables/storefront/useShopConfiguration.js +1 -3
  55. package/dist/runtime/composables/storefront/useStorefrontSearch.d.ts +4 -2
  56. package/dist/runtime/composables/storefront/useUserAddresses.d.ts +6 -7
  57. package/dist/runtime/composables/storefront/useUserAddresses.js +1 -3
  58. package/dist/runtime/composables/storefront/useVariant.d.ts +1 -1
  59. package/dist/runtime/composables/storefront/useVariant.js +1 -3
  60. package/dist/runtime/composables/storefront/useWishlist.d.ts +2 -3
  61. package/dist/runtime/composables/storefront/useWishlist.js +8 -8
  62. package/dist/runtime/composables/useProductPrice.d.ts +2 -2
  63. package/dist/runtime/nitro/plugins/nitroStorageConfig.js +1 -1
  64. package/dist/runtime/server/middleware/bootstrap-utils.d.ts +2 -2
  65. package/dist/runtime/server/middleware/bootstrap.js +1 -1
  66. package/dist/runtime/utils/zodSchema.d.ts +1 -1
  67. package/dist/runtime/utils/zodSchema.js +1 -3
  68. package/package.json +12 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # @scayle/storefront-nuxt
2
2
 
3
+ ## 8.58.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Introduced support for Nuxt 4 while maintaining full backward compatibility with Nuxt 3.
8
+ This enables consumers to migrate to Nuxt 4 ahead of the Nuxt 3 end of support on 31 Jan 2026.
9
+
10
+ - **Version Requirements:**
11
+ - Nuxt 3: `v3.13.0+`
12
+ - Nuxt 4: `v4.2.0+`
13
+
14
+ **NOTE:** Please be aware that the SCAYLE Storefront Application itself does not yet support Nuxt 4. These package updates are a prerequisite. We recommend remaining on Nuxt 3 for your Storefront implementation until further notice.
15
+
16
+ See the [Nuxt 4 Migration Guide](https://nuxt.com/docs/4.x/getting-started/upgrade) for general upgrade details.
17
+
18
+ ### Patch Changes
19
+
20
+ **Dependencies**
21
+
22
+ **@scayle/storefront-core v8.58.0**
23
+
24
+ - No changes in this release.
25
+
26
+ ## 8.57.3
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependency `@vercel/nft@1.1.1` to `@vercel/nft@1.2.0`
31
+
32
+ **Dependencies**
33
+
34
+ **@scayle/storefront-core v8.57.3**
35
+
36
+ - No changes in this release.
37
+
3
38
  ## 8.57.2
4
39
 
5
40
  ### Patch Changes
package/dist/module.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
- "version": "8.57.2",
3
+ "version": "8.58.0",
4
4
  "configKey": "storefront",
5
5
  "compatibility": {
6
- "nuxt": "^3.9.0"
6
+ "nuxt": ">=3.13"
7
7
  },
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "1.0.2",
package/dist/module.mjs CHANGED
@@ -47,14 +47,14 @@ ${usesCompression ? genImport("@scayle/unstorage-compression-driver", "compressi
47
47
 
48
48
 
49
49
  export default {
50
- ${usedDrivers.map((driver) => '"' + driver + '":' + genSafeVariableName(driver) + ",").join("\n")}
50
+ ${usedDrivers.map((driver) => `"${driver}":${genSafeVariableName(driver)},`).join("\n")}
51
51
 
52
52
  ${isScaleKvUsed ? "scayleKv," : ""}
53
53
  ${usesCompression ? "compression" : ""}
54
54
  }`;
55
55
  }
56
56
  const PACKAGE_NAME = "@scayle/storefront-nuxt";
57
- const PACKAGE_VERSION = "8.57.2";
57
+ const PACKAGE_VERSION = "8.58.0";
58
58
  const logger = createConsola({
59
59
  fancy: true,
60
60
  formatOptions: {
@@ -69,9 +69,9 @@ const logger = createConsola({
69
69
  // This assertion avoids the typescript error
70
70
  });
71
71
  function createRpcMethodIndex(customRpcImports) {
72
- return customRpcImports.map(({ source, names }) => genExport(source, names)).join(
72
+ return `${customRpcImports.map(({ source, names }) => genExport(source, names)).join(
73
73
  "\n"
74
- ) + `
74
+ )}
75
75
  export {}`;
76
76
  }
77
77
  function createRpcMethodTypeDeclaration(customRpcImports) {
@@ -231,7 +231,7 @@ const module$1 = defineNuxtModule({
231
231
  version: PACKAGE_VERSION,
232
232
  configKey: "storefront",
233
233
  compatibility: {
234
- nuxt: "^3.9.0"
234
+ nuxt: ">=3.13"
235
235
  }
236
236
  },
237
237
  // Default configuration options of the Nuxt module
@@ -16,8 +16,11 @@ ${indent}`);
16
16
  const stack = "stack" in err && err.stack && typeof err.stack === "string" ? this.formatStack(err.stack, message, opts) : "";
17
17
  const level = opts?.errorLevel || 0;
18
18
  const causedPrefix = level > 0 ? `${" ".repeat(level)}[cause]: ` : "";
19
- const causedError = "cause" in err && err.cause ? "\n\n" + this.formatError(err.cause, { ...opts, errorLevel: level + 1 }) : "";
20
- return causedPrefix + message + "\n" + stack + causedError;
19
+ const causedError = "cause" in err && err.cause ? `
20
+
21
+ ${this.formatError(err.cause, { ...opts, errorLevel: level + 1 })}` : "";
22
+ return `${causedPrefix + message}
23
+ ${stack}${causedError}`;
21
24
  }
22
25
  formatArgs(args, opts) {
23
26
  const _args = args.map((arg) => {
@@ -50,6 +53,7 @@ ${indent}`);
50
53
  compact: true
51
54
  });
52
55
  const stream = logObj.level < 2 ? ctx.options.stderr || process.stderr : ctx.options.stdout || process.stdout;
53
- return stream.write(line + "\n");
56
+ return stream.write(`${line}
57
+ `);
54
58
  }
55
59
  }
@@ -1,16 +1,4 @@
1
1
  import type { EventHandler } from 'h3';
2
- /**
3
- * Wraps an event handler with cache authentication.
4
- *
5
- * It takes an event handler and returns a new handler that is protected by
6
- * basic authentication if cache authentication is configured in the runtime config (`cache.auth`).
7
- * If cache authentication is not configured, the original handler is returned.
8
- *
9
- * @param handler The event handler to wrap.
10
- *
11
- * @returns The wrapped event handler.
12
- */
13
- export declare const eventHandlerWithCacheAuth: (handler: EventHandler) => EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
14
2
  /**
15
3
  * Wraps an event handler with basic authentication.
16
4
  *
@@ -25,3 +13,15 @@ export declare const eventHandlerWithCacheAuth: (handler: EventHandler) => Event
25
13
  * @returns The wrapped and awaited event handler, else an authentication failure response is returned.
26
14
  */
27
15
  export declare const eventHandlerWithBasicAuth: (handler: EventHandler, auth: string) => EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
16
+ /**
17
+ * Wraps an event handler with cache authentication.
18
+ *
19
+ * It takes an event handler and returns a new handler that is protected by
20
+ * basic authentication if cache authentication is configured in the runtime config (`cache.auth`).
21
+ * If cache authentication is not configured, the original handler is returned.
22
+ *
23
+ * @param handler The event handler to wrap.
24
+ *
25
+ * @returns The wrapped event handler.
26
+ */
27
+ export declare const eventHandlerWithCacheAuth: (handler: EventHandler) => EventHandler<import("h3").EventHandlerRequest, Promise<any>>;
@@ -7,17 +7,6 @@ import {
7
7
  } from "h3";
8
8
  import { HttpStatusCode } from "@scayle/storefront-core";
9
9
  import { useRuntimeConfig } from "#imports";
10
- export const eventHandlerWithCacheAuth = (handler) => defineEventHandler(async (event) => {
11
- const config = useRuntimeConfig();
12
- const auth = config.storefront.cache?.auth;
13
- if (!auth || !auth.username || !auth.password) {
14
- return await handler(event);
15
- }
16
- return await eventHandlerWithBasicAuth(
17
- handler,
18
- `${auth.username}:${auth.password}`
19
- )(event);
20
- });
21
10
  const authenticationFailed = (event) => {
22
11
  setResponseHeader(
23
12
  event,
@@ -39,3 +28,14 @@ export const eventHandlerWithBasicAuth = (handler, auth) => defineEventHandler(a
39
28
  }
40
29
  return await handler(event);
41
30
  });
31
+ export const eventHandlerWithCacheAuth = (handler) => defineEventHandler(async (event) => {
32
+ const config = useRuntimeConfig();
33
+ const auth = config.storefront.cache?.auth;
34
+ if (!auth || !auth.username || !auth.password) {
35
+ return await handler(event);
36
+ }
37
+ return await eventHandlerWithBasicAuth(
38
+ handler,
39
+ `${auth.username}:${auth.password}`
40
+ )(event);
41
+ });
@@ -39,7 +39,7 @@ type FormatCurrencyOptions = {
39
39
  *
40
40
  * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
41
41
  */
42
- type FormatPercentageOptions = {
42
+ interface FormatPercentageOptions {
43
43
  /**
44
44
  * The locale to use for formatting.
45
45
  */
@@ -56,7 +56,7 @@ type FormatPercentageOptions = {
56
56
  * How to display the sign for the percentage.
57
57
  */
58
58
  signDisplay?: Intl.NumberFormatOptions['signDisplay'];
59
- };
59
+ }
60
60
  /**
61
61
  * Provides currency and percentage formatting helpers.
62
62
  *
@@ -1,6 +1,6 @@
1
1
  import type { MaybeRefOrGetter } from 'vue';
2
2
  import type { RpcMethodParameters } from '@scayle/storefront-core';
3
- import { type UseRpcReturn, type UseRpcCacheKey } from '../core/useRpc.js';
3
+ import type { UseRpcReturn, UseRpcCacheKey } from '../core/useRpc.js';
4
4
  /**
5
5
  * The shape of the data returned by the `getExternalIdpRedirect` RPC call.
6
6
  */
@@ -14,9 +14,8 @@ type UseIDPBaseReturn = Pick<Awaited<UseRpcReturn<'getExternalIdpRedirect'>>, 'd
14
14
  *
15
15
  * @param params The parameters for the `getExternalIdpRedirect` RPC call.
16
16
  * @param key A unique key for the RPC call. Used for caching and invalidation. Defaults to 'useIDP'.
17
-
18
17
  * @returns An object containing the `data` returned from, any `error` encountered within,
19
- the current `status` and a function to manually `refresh` the RPC call.
18
+ * the current `status` and a function to manually `refresh` the RPC call.
20
19
  * It also acts as a promise that resolves to the same object.
21
20
  */
22
21
  export declare function useIDP(params?: MaybeRefOrGetter<RpcMethodParameters<'getExternalIdpRedirect'>>, key?: UseRpcCacheKey): UseIDPBaseReturn & Promise<UseIDPBaseReturn>;
@@ -37,7 +37,7 @@ export function useRpc(method, key, params, options) {
37
37
  },
38
38
  baseURL: apiBasePath,
39
39
  headers: {
40
- "x-shop-id": currentShop.value?.shopId + ""
40
+ "x-shop-id": `${currentShop.value?.shopId}`
41
41
  }
42
42
  })
43
43
  );
@@ -1,17 +1,17 @@
1
1
  import type { ShopUser, UpdatePasswordParams } from '@scayle/storefront-core';
2
- import { type UseRpcReturn, type UseRpcCacheKey } from './useRpc.js';
2
+ import type { UseRpcReturn, UseRpcCacheKey } from './useRpc.js';
3
3
  import type { ComputedRef } from 'vue';
4
4
  /**
5
5
  * Extended parameters for the `useUser` composable.
6
6
  */
7
- export type ExtendedUseUserParams = {
7
+ export interface ExtendedUseUserParams {
8
8
  /** The key used for caching the user data. Defaults to 'useUser'. */
9
9
  key?: UseRpcCacheKey;
10
10
  /** Whether to fetch the user data immediately. Defaults to `true`. */
11
11
  immediate?: boolean;
12
12
  /** Whether to enable lazy loading of user data. Defaults to `false`. */
13
13
  lazy?: boolean;
14
- };
14
+ }
15
15
  type UseUserBaseReturn = Pick<Awaited<UseRpcReturn<'getUser'>>, 'error' | 'status' | 'refresh'> & {
16
16
  updateUser: (payload: Partial<ShopUser>) => Promise<void>;
17
17
  updatePassword: (payload: UpdatePasswordParams) => Promise<void>;
@@ -1,6 +1,6 @@
1
1
  import type { AddOrUpdateItemType, RpcMethodParameters, BasketResponseData, BasketItem, Product, BasketTotalPrice, BasketItemUpdateData } from '@scayle/storefront-core';
2
2
  import { ExistingItemHandling, generateBasketKey } from '@scayle/storefront-core';
3
- import { type NormalizedRpcResponse, type UseRpcReturn, type UseRpcCacheKey } from '../core/useRpc.js';
3
+ import type { NormalizedRpcResponse, UseRpcReturn, UseRpcCacheKey } from '../core/useRpc.js';
4
4
  import type { MaybeRefOrGetter, ComputedRef, Ref } from 'vue';
5
5
  import type { BasketKey, BasketPackageInformation } from '@scayle/storefront-api';
6
6
  /**
@@ -6,9 +6,7 @@ import {
6
6
  wasAddedWithReducedQuantity
7
7
  } from "@scayle/storefront-core";
8
8
  import { extendPromise } from "../../utils/promise.js";
9
- import {
10
- useRpc
11
- } from "../core/useRpc.js";
9
+ import { useRpc } from "../core/useRpc.js";
12
10
  import { useRpcCall } from "../core/useRpcCall.js";
13
11
  import { toValue, computed } from "vue";
14
12
  import { FetchError } from "ofetch";
@@ -48,6 +46,23 @@ export function useBasket({
48
46
  refresh,
49
47
  status
50
48
  } = asyncData;
49
+ const handleBasketError = (basketErrors) => {
50
+ if (wasAddedWithReducedQuantity(basketErrors)) {
51
+ throw new Error("Item was added with reduced quantity", {
52
+ cause: AddToBasketFailureKind.ITEM_ADDED_WITH_REDUCED_QUANTITY
53
+ });
54
+ }
55
+ };
56
+ const handleFetchError = (error2) => {
57
+ if (error2 instanceof FetchError && isAddOrUpdateItemError(
58
+ error2.data.errors?.[0]
59
+ ) && error2.data.errors?.[0].operation !== "delete") {
60
+ throw new Error(error2.message, {
61
+ cause: error2.data.errors?.[0].kind
62
+ });
63
+ }
64
+ throw error2;
65
+ };
51
66
  const addItem = async ({
52
67
  variantId,
53
68
  promotionId,
@@ -89,23 +104,6 @@ export function useBasket({
89
104
  handleFetchError(error2);
90
105
  }
91
106
  };
92
- const handleBasketError = (basketErrors) => {
93
- if (wasAddedWithReducedQuantity(basketErrors)) {
94
- throw new Error("Item was added with reduced quantity", {
95
- cause: AddToBasketFailureKind.ITEM_ADDED_WITH_REDUCED_QUANTITY
96
- });
97
- }
98
- };
99
- const handleFetchError = (error2) => {
100
- if (error2 instanceof FetchError && isAddOrUpdateItemError(
101
- error2.data.errors?.[0]
102
- ) && error2.data.errors?.[0].operation !== "delete") {
103
- throw new Error(error2.message, {
104
- cause: error2.data.errors?.[0].kind
105
- });
106
- }
107
- throw error2;
108
- };
109
107
  function isAddOrUpdateItemError(error2) {
110
108
  return typeof error2 === "object" && error2 !== null && "operation" in error2 && "kind" in error2;
111
109
  }
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves brand data using the `getBrandById` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useBrand({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves multiple brands data using the 'getBrands' RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useBrands({
5
3
  params,
6
4
  options
@@ -1,4 +1,4 @@
1
- import { type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
1
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
2
2
  /**
3
3
  * Retrieves the first active campaign.
4
4
  *
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useCampaign({
5
3
  options
6
4
  } = {}, key = "useCampaign") {
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters, RpcMethodReturnType } from '@scayle/storefront-core';
2
- import { type KeysOf, type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  type UseCategoriesBaseReturn<DataT, PickKeys extends KeysOf<DataT>, DefaultT> = Pick<Awaited<UseRpcReturn<'getCategoriesByPath', DataT, PickKeys, DefaultT>>, 'data' | 'error' | 'status' | 'refresh'> & {
5
5
  getCategoryById: (id: number, includeHidden?: true) => RpcMethodReturnType<'getCategoryById'>;
@@ -26,7 +26,7 @@ type UseCategoriesBaseReturn<DataT, PickKeys extends KeysOf<DataT>, DefaultT> =
26
26
  * @param input An object containing parameters and options for the `getCategoriesByPath` RPC call.
27
27
  * @param input.params The parameters for the `getCategoriesByPath` RPC method.
28
28
  * @param input.options The options for the underlying `useRpc` call, controlling data handling and loading state.
29
- * @param keyA A unique key for caching and state management within `useRpc`.
29
+ * @param key A unique key for caching and state management within `useRpc`.
30
30
  *
31
31
  * @returns A promise that resolves to an object containing the category data,
32
32
  * error and status information, a refresh function, and a `getCategoryById`
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  import { extendPromise } from "../../utils/promise.js";
5
3
  import { useRpcCall } from "../core/useRpcCall.js";
6
4
  export function useCategories({
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves data for a single category by its ID using the `getCategoryById` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useCategoryById({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves data for a single category by its path using the `getCategoryByPath` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useCategoryByPath({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { MaybeRefOrGetter } from 'vue';
2
- import { type KeysOf, type NormalizedRpcResponse, type UseRpcOptions, type UseRpcReturn, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { KeysOf, NormalizedRpcResponse, UseRpcOptions, UseRpcReturn, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { RpcMethodParameters } from '@scayle/storefront-core';
4
4
  type UseCategoriesBaseReturn<DataT, PickKeys extends KeysOf<DataT>, DefaultT> = Awaited<UseRpcReturn<'getCategoryTree', DataT, PickKeys, DefaultT>> & Promise<Awaited<UseRpcReturn<'getCategoryTree', DataT, PickKeys, DefaultT>>>;
5
5
  export declare function useCategoryTree<DataT = NormalizedRpcResponse<'getCategoryTree'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, }?: Partial<{
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useCategoryTree({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type KeysOf, type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves data of the current active promotion data using the `getCurrentPromotions` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useCurrentPromotions({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves filter data using the `getFilters` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useFilters({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves data of a single navigation tree using the `fetchNavigationTreeById` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useNavigationTreeById({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type UseRpcReturn, type UseRpcOptions, type NormalizedRpcResponse, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { UseRpcReturn, UseRpcOptions, NormalizedRpcResponse, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves data of all navigation trees using the `fetchAllNavigationTrees` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useNavigationTrees({
5
3
  params = {},
6
4
  options
@@ -1,6 +1,6 @@
1
1
  import type { RpcMethodParameters, Order } from '@scayle/storefront-core';
2
2
  import type { AsyncDataOptions } from 'nuxt/app';
3
- import { type KeysOf, type ExtendedAsyncData, type UseRpcCacheKey } from '../core/useRpc.js';
3
+ import type { KeysOf, ExtendedAsyncData, UseRpcCacheKey } from '../core/useRpc.js';
4
4
  import type { MaybeRefOrGetter } from 'vue';
5
5
  /**
6
6
  * Retrieves order data by ID using the `getOrderById` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useOrder({
5
3
  params,
6
4
  options
@@ -1,6 +1,6 @@
1
1
  import type { RpcMethodParameters, Order } from '@scayle/storefront-core';
2
2
  import type { AsyncDataOptions } from 'nuxt/app';
3
- import { type ExtendedAsyncData, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
3
+ import type { ExtendedAsyncData, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
4
4
  import type { MaybeRefOrGetter } from 'vue';
5
5
  /**
6
6
  * Retrieves order data by ID using the `getOrderDataByCbd RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useOrderConfirmation({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type KeysOf, type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves data for a single product by its ID using the `getProductById` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useProduct({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type KeysOf, type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves product data by its category using the `getProductById` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useProducts({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type KeysOf, type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves data of multiple products by their ID using the `getProductsByIds` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useProductsByIds({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type KeysOf, type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves data of multiple products by their reference keys using the `getProductsByReferenceKeys` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useProductsByReferenceKeys({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves product count of a category by its ID using the `getProductsCount` RPC method.
@@ -7,7 +7,7 @@ import type { MaybeRefOrGetter } from 'vue';
7
7
  * This function acts as a wrapper around the `useRpc` composable,
8
8
  * simplifying the process of fetching data. It internally calls `useRpc`
9
9
  * with the provided parameters and options.
10
- * *
10
+ *
11
11
  * @template DataT The type of the normalized RPC response data. Defaults to `NormalizedRpcResponse<'getProductsCount'>`.
12
12
  * @template PickKeys The keys to pick from the data. Defaults to all keys of `DataT`.
13
13
  * @template DefaultT The default value to use if data is not available. Defaults to `null`.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useProductsCount({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type KeysOf, type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves data for all available promotion using the `getPromotions` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function usePromotions({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type KeysOf, type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves data for multiple promotions by their IDs using the `getPromotionsByIds` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function usePromotionsByIds({
5
3
  params,
6
4
  options
@@ -1,10 +1,10 @@
1
- import { type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
1
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
2
2
  /**
3
3
  * Retrieves data about the current shop by its shopID using the `getShopConfiguration` RPC method.
4
4
  *
5
5
  * This function acts as a wrapper around the `useRpc` composable,
6
6
  * simplifying the process of fetching data. It internally calls `useRpc`
7
- * with the provided parameters and options.
7
+ * with the provided options.
8
8
  *
9
9
  * @see https://scayle.dev/en/api-guides/storefront-api/resources/shop-configuration/get-a-shop-configuration
10
10
  *
@@ -12,9 +12,8 @@ import { type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type
12
12
  * @template PickKeys The keys to pick from the data. Defaults to all keys of `DataT`.
13
13
  * @template DefaultT The default value to use if data is not available. Defaults to `null`.
14
14
  *
15
- * @param params An object containing parameters and options for the `getShopConfiguration` RPC call.
16
- * @param params.params The parameters for the `getShopConfiguration` RPC method.
17
- * @param params.options The options for the underlying `useRpc` call, controlling data handling and loading state.
15
+ * @param options An object containing options for the underlying `useRpc` call.
16
+ * @param options.options The options for the underlying `useRpc` call, controlling data handling and loading state.
18
17
  * @param key A unique key for this RPC call. Used internally by `useRpc` for caching and state management.
19
18
  *
20
19
  * @returns The result of the `useRpc` call, which includes the fetched data,
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useShopConfiguration({
5
3
  options
6
4
  } = {}, key = "useShopConfiguration") {
@@ -16,8 +16,10 @@ export type SearchOptions = Partial<{
16
16
  *
17
17
  * @deprecated `useStorefrontSearch` is deprecated. Consider using `useSearch` of `@scayle/storefront-search` instead.
18
18
  *
19
- * @param option - An object containing options for the search request.
20
- * @param option.with - An object describing which data the returned suggestions/results should contain.
19
+ * @param searchQuery A reactive reference to the search query string.
20
+ * @param options An object containing options for the search request.
21
+ * @param options.params Parameters for the search request.
22
+ * @param key A unique key for this search instance. Used internally for state management.
21
23
  *
22
24
  * @returns An object containing reactive data and computed properties for managing search results and suggestions.
23
25
  */
@@ -1,20 +1,19 @@
1
- import { type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type KeysOf, type UseRpcCacheKey } from '../core/useRpc.js';
1
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf, UseRpcCacheKey } from '../core/useRpc.js';
2
2
  /**
3
- * Retrieves address data for a logged-in user using the `getCategoryById` RPC method.
3
+ * Retrieves address data for a logged-in user using the `getShopUserAddresses` RPC method.
4
4
  *
5
5
  * This function acts as a wrapper around the `useRpc` composable,
6
6
  * simplifying the process of fetching data. It internally calls `useRpc`
7
- * with the provided parameters and options.
7
+ * with the provided options.
8
8
  *
9
9
  * @see https://scayle.dev/en/api-guides/customer-account-api/resources/customer/address/list-addresses
10
10
  *
11
- * @template DataT The type of the normalized RPC response data. Defaults to `NormalizedRpcResponse<'getCategoryById'>`.
11
+ * @template DataT The type of the normalized RPC response data. Defaults to `NormalizedRpcResponse<'getShopUserAddresses'>`.
12
12
  * @template PickKeys The keys to pick from the data. Defaults to all keys of `DataT`.
13
13
  * @template DefaultT The default value to use if data is not available. Defaults to `null`.
14
14
  *
15
- * @param params An object containing parameters and options for the `getCategoryById` RPC call.
16
- * @param params.params The parameters for the `getCategoryById` RPC method.
17
- * @param params.options The options for the underlying `useRpc` call, controlling data handling and loading state.
15
+ * @param options An object containing options for the underlying `useRpc` call.
16
+ * @param options.options The options for the underlying `useRpc` call, controlling data handling and loading state.
18
17
  * @param key A unique key for this RPC call. Used internally by `useRpc` for caching and state management.
19
18
  *
20
19
  * @returns The result of the `useRpc` call, which includes the fetched data,
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useUserAddresses({
5
3
  options
6
4
  } = {}, key = "useUserAddresses") {
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type KeysOf, type UseRpcOptions, type UseRpcReturn, type NormalizedRpcResponse, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from 'vue';
4
4
  /**
5
5
  * Retrieves data for a single or multiple product variant by its ID using the `getVariantById` RPC method.
@@ -1,6 +1,4 @@
1
- import {
2
- useRpc
3
- } from "../core/useRpc.js";
1
+ import { useRpc } from "../core/useRpc.js";
4
2
  export function useVariant({
5
3
  params,
6
4
  options
@@ -1,5 +1,5 @@
1
1
  import type { Product, WishlistItem, RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type UseRpcReturn, type UseRpcCacheKey } from '../core/useRpc.js';
2
+ import type { UseRpcReturn, UseRpcCacheKey } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter, ComputedRef } from 'vue';
4
4
  /**
5
5
  * Representation of options for configuring the `useWishlist` composable.
@@ -59,9 +59,8 @@ type UseWishlistBaseReturn = Awaited<UseRpcReturn<'getWishlist'>> & {
59
59
  * @see https://scayle.dev/en/api-guides/storefront-api/resources/wishlists/get-a-wishlist
60
60
  * @see https://scayle.dev/en/core-documentation/storefront-guide/storefront-application/technical-foundation/data-and-state#shared-state-and-caching
61
61
  *
62
- * @param params An object containing parameters and options for all wishlist-related RPC calls.
62
+ * @param params An object containing parameters for wishlist-related RPC calls.
63
63
  * @param params.params The parameters for the `useWishlist` RPC method.
64
- * @param params.options The options for the underlying `useRpc` call, controlling data handling and loading state.
65
64
  * @param key A unique key for this RPC call. Used internally by `useRpc` for caching and state management.
66
65
  *
67
66
  * @returns A promise that resolves to an object containing wishlist data, methods, and reactive properties.
@@ -36,6 +36,14 @@ export function useWishlist({
36
36
  with: toValue(params)
37
37
  });
38
38
  };
39
+ const findItem = (item) => {
40
+ return data.value?.items?.find((entry) => {
41
+ if ("variantId" in item) {
42
+ return entry.variant?.id === item.variantId;
43
+ }
44
+ return entry.product?.id === item.productId;
45
+ });
46
+ };
39
47
  const removeItem = async (item) => {
40
48
  const element = findItem(item);
41
49
  if (!element) {
@@ -67,14 +75,6 @@ export function useWishlist({
67
75
  const clear = async () => {
68
76
  data.value = await clearWishlistRpc();
69
77
  };
70
- const findItem = (item) => {
71
- return data.value?.items?.find((entry) => {
72
- if ("variantId" in item) {
73
- return entry.variant?.id === item.variantId;
74
- }
75
- return entry.product?.id === item.productId;
76
- });
77
- };
78
78
  const contains = (item) => {
79
79
  return findItem(item) !== void 0;
80
80
  };
@@ -1,9 +1,9 @@
1
1
  import type { ComputedRef, MaybeRefOrGetter } from 'vue';
2
2
  import type { AppliedReduction, BasketItem, CentAmount, OrderItem, Price } from '@scayle/storefront-core';
3
- type RelativeReductions = {
3
+ interface RelativeReductions {
4
4
  value: number;
5
5
  category: 'promotion' | 'sale' | 'campaign' | 'voucher';
6
- };
6
+ }
7
7
  export type BasketItemPrice = BasketItem['price']['total'];
8
8
  export type OrderPrice = OrderItem['price'];
9
9
  export interface UseProductPriceReturn {
@@ -35,7 +35,7 @@ export default defineNitroPlugin(async () => {
35
35
  `${STORAGE_MOUNT_CACHE} storage mount not provided. Falling back to memory driver.`
36
36
  );
37
37
  }
38
- const mountShopStorage = async (shopId, mount) => {
38
+ const mountShopStorage = async (_shopId, mount) => {
39
39
  try {
40
40
  if (!availableMounts.includes(mount)) {
41
41
  await mountStorage(storage, mount);
@@ -5,12 +5,12 @@ import type { StorefrontRuntimeConfigType } from '../../utils/zodSchema.js';
5
5
  /**
6
6
  * Represents the bootstrapped path information.
7
7
  */
8
- type BootstrapPath = {
8
+ interface BootstrapPath {
9
9
  /** The bootstrapped path. */
10
10
  path: string;
11
11
  /** The original request path. */
12
12
  originalPath: string;
13
- };
13
+ }
14
14
  /**
15
15
  * Gets the bootstrap path from the URL.
16
16
  *
@@ -168,7 +168,7 @@ export default defineEventHandler(async (event) => {
168
168
  config.app.baseURL
169
169
  );
170
170
  if (!event.context.$rpcContext) {
171
- event.context.$log.debug("Bootstrapping request: " + path);
171
+ event.context.$log.debug(`Bootstrapping request: ${path}`);
172
172
  await tracer.startActiveSpan(
173
173
  `storefront-nuxt.middleware/bootstrap`,
174
174
  {
@@ -1,5 +1,5 @@
1
1
  import * as z from 'zod/mini';
2
- import { type LogLevel, type WithParams } from '@scayle/storefront-core';
2
+ import type { LogLevel, WithParams } from '@scayle/storefront-core';
3
3
  export declare const RedirectsSchema: z.ZodMiniObject<{
4
4
  enabled: z.ZodMiniBoolean<boolean>;
5
5
  queryParamWhitelist: z.ZodMiniOptional<z.ZodMiniArray<z.ZodMiniString<string>>>;
@@ -1,7 +1,5 @@
1
1
  import * as z from "zod/mini";
2
- import {
3
- rpcMethods
4
- } from "@scayle/storefront-core";
2
+ import { rpcMethods } from "@scayle/storefront-core";
5
3
  import { builtinDrivers } from "unstorage";
6
4
  export const RedirectsSchema = z.object({
7
5
  enabled: z.boolean(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "8.57.2",
4
+ "version": "8.58.0",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -62,18 +62,18 @@
62
62
  "node": ">= 20.7.0"
63
63
  },
64
64
  "peerDependencies": {
65
- "@nuxt/kit": ">=3.12.2",
65
+ "@nuxt/kit": ">=3.13.0 || >=4.2.0",
66
66
  "@scayle/storefront-api": "^18.1.0",
67
67
  "fishery": "^2.2.2",
68
68
  "h3": "^1.10.0",
69
69
  "nitropack": "^2.9.7",
70
- "nuxt": ">=3.10.0",
70
+ "nuxt": ">=3.10.0 || >=4.2.2",
71
71
  "unstorage": "^1.10.1",
72
72
  "vue": "^3.4.0"
73
73
  },
74
74
  "dependencies": {
75
75
  "@opentelemetry/api": "^1.9.0",
76
- "@vercel/nft": "1.1.1",
76
+ "@vercel/nft": "1.2.0",
77
77
  "@vueuse/core": "14.1.0",
78
78
  "consola": "^3.4.2",
79
79
  "core-js": "^3.37.1",
@@ -90,7 +90,7 @@
90
90
  "vue-router": "^4.4.0",
91
91
  "zod": "^4.0.0",
92
92
  "@scayle/h3-session": "0.6.3",
93
- "@scayle/storefront-core": "8.57.2",
93
+ "@scayle/storefront-core": "8.58.0",
94
94
  "@scayle/unstorage-compression-driver": "1.2.5"
95
95
  },
96
96
  "devDependencies": {
@@ -100,10 +100,10 @@
100
100
  "@nuxt/kit": "3.20.0",
101
101
  "@nuxt/module-builder": "1.0.2",
102
102
  "@nuxt/schema": "3.20.0",
103
- "@nuxt/test-utils": "3.21.0",
104
- "@types/node": "22.19.3",
103
+ "@nuxt/test-utils": "3.23.0",
104
+ "@types/node": "22.19.5",
105
105
  "@vitest/coverage-v8": "4.0.16",
106
- "dprint": "0.50.2",
106
+ "dprint": "0.51.1",
107
107
  "eslint-formatter-gitlab": "7.0.1",
108
108
  "eslint": "9.39.2",
109
109
  "fishery": "2.4.0",
@@ -116,11 +116,11 @@
116
116
  "typescript": "5.9.3",
117
117
  "unbuild": "3.6.1",
118
118
  "vitest": "4.0.16",
119
- "vue-tsc": "3.1.8",
120
- "happy-dom": "20.0.11",
121
- "@scayle/eslint-config-storefront": "4.7.18",
122
- "@scayle/eslint-plugin-vue-composable": "0.2.3",
119
+ "vue-tsc": "3.2.2",
120
+ "happy-dom": "20.1.0",
121
+ "@scayle/eslint-config-storefront": "4.7.20",
123
122
  "@scayle/vitest-config-storefront": "1.0.0",
123
+ "@scayle/eslint-plugin-vue-composable": "0.2.3",
124
124
  "@scayle/unstorage-scayle-kv-driver": "2.0.10"
125
125
  },
126
126
  "scripts": {