@scayle/storefront-nuxt 7.85.9 → 7.85.10

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 (117) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.d.mts +4 -4
  3. package/dist/index.d.ts +4 -4
  4. package/dist/index.mjs +2 -2
  5. package/dist/module.d.mts +3 -3
  6. package/dist/module.d.ts +3 -3
  7. package/dist/module.json +12 -0
  8. package/dist/module.mjs +2 -2
  9. package/dist/rpc.d.mts +1 -1
  10. package/dist/rpc.d.ts +1 -1
  11. package/dist/rpc.mjs +1 -1
  12. package/dist/runtime/api/{purgeAll.mjs → purgeAll.js} +1 -1
  13. package/dist/runtime/api/{purgeTags.mjs → purgeTags.js} +1 -1
  14. package/dist/runtime/api/{rpcHandler.mjs → rpcHandler.js} +2 -2
  15. package/dist/runtime/composables/core/useAvailableShops.d.ts +1 -1
  16. package/dist/runtime/composables/core/useCurrentShop.d.ts +1 -1
  17. package/dist/runtime/composables/core/{useFormatHelpers.mjs → useFormatHelpers.js} +1 -1
  18. package/dist/runtime/composables/core/useIDP.d.ts +1 -1
  19. package/dist/runtime/composables/core/{useIDP.mjs → useIDP.js} +3 -3
  20. package/dist/runtime/composables/core/{useRpc.mjs → useRpc.js} +3 -3
  21. package/dist/runtime/composables/core/{useRpcCall.mjs → useRpcCall.js} +2 -2
  22. package/dist/runtime/composables/core/{useSession.mjs → useSession.js} +1 -1
  23. package/dist/runtime/composables/core/useUser.d.ts +1 -1
  24. package/dist/runtime/composables/core/{useUser.mjs → useUser.js} +4 -4
  25. package/dist/runtime/composables/index.d.ts +36 -36
  26. package/dist/runtime/composables/index.js +36 -0
  27. package/dist/runtime/composables/storefront/useBasket.d.ts +1 -1
  28. package/dist/runtime/composables/storefront/{useBasket.mjs → useBasket.js} +3 -3
  29. package/dist/runtime/composables/storefront/useBrand.d.ts +1 -1
  30. package/dist/runtime/composables/storefront/{useBrand.mjs → useBrand.js} +1 -1
  31. package/dist/runtime/composables/storefront/useBrands.d.ts +1 -1
  32. package/dist/runtime/composables/storefront/{useBrands.mjs → useBrands.js} +1 -1
  33. package/dist/runtime/composables/storefront/useCategories.d.ts +1 -1
  34. package/dist/runtime/composables/storefront/{useCategories.mjs → useCategories.js} +3 -3
  35. package/dist/runtime/composables/storefront/useCategoryById.d.ts +1 -1
  36. package/dist/runtime/composables/storefront/{useCategoryById.mjs → useCategoryById.js} +1 -1
  37. package/dist/runtime/composables/storefront/useCategoryByPath.d.ts +1 -1
  38. package/dist/runtime/composables/storefront/{useCategoryByPath.mjs → useCategoryByPath.js} +1 -1
  39. package/dist/runtime/composables/storefront/useCurrentPromotions.d.ts +1 -1
  40. package/dist/runtime/composables/storefront/{useCurrentPromotions.mjs → useCurrentPromotions.js} +1 -1
  41. package/dist/runtime/composables/storefront/{useFacet.mjs → useFacet.js} +5 -5
  42. package/dist/runtime/composables/storefront/useFilters.d.ts +1 -1
  43. package/dist/runtime/composables/storefront/{useFilters.mjs → useFilters.js} +1 -1
  44. package/dist/runtime/composables/storefront/useNavigationTree.d.ts +1 -1
  45. package/dist/runtime/composables/storefront/{useNavigationTree.mjs → useNavigationTree.js} +1 -1
  46. package/dist/runtime/composables/storefront/useNavigationTrees.d.ts +1 -1
  47. package/dist/runtime/composables/storefront/{useNavigationTrees.mjs → useNavigationTrees.js} +1 -1
  48. package/dist/runtime/composables/storefront/useOrder.d.ts +1 -1
  49. package/dist/runtime/composables/storefront/{useOrder.mjs → useOrder.js} +1 -1
  50. package/dist/runtime/composables/storefront/useOrderConfirmation.d.ts +1 -1
  51. package/dist/runtime/composables/storefront/{useOrderConfirmation.mjs → useOrderConfirmation.js} +1 -1
  52. package/dist/runtime/composables/storefront/useProduct.d.ts +1 -1
  53. package/dist/runtime/composables/storefront/{useProduct.mjs → useProduct.js} +1 -1
  54. package/dist/runtime/composables/storefront/useProducts.d.ts +1 -1
  55. package/dist/runtime/composables/storefront/{useProducts.mjs → useProducts.js} +1 -1
  56. package/dist/runtime/composables/storefront/useProductsByIds.d.ts +1 -1
  57. package/dist/runtime/composables/storefront/{useProductsByIds.mjs → useProductsByIds.js} +1 -1
  58. package/dist/runtime/composables/storefront/useProductsByReferenceKeys.d.ts +1 -1
  59. package/dist/runtime/composables/storefront/{useProductsByReferenceKeys.mjs → useProductsByReferenceKeys.js} +1 -1
  60. package/dist/runtime/composables/storefront/useProductsCount.d.ts +1 -1
  61. package/dist/runtime/composables/storefront/{useProductsCount.mjs → useProductsCount.js} +1 -1
  62. package/dist/runtime/composables/storefront/usePromotions.d.ts +1 -1
  63. package/dist/runtime/composables/storefront/{usePromotions.mjs → usePromotions.js} +1 -1
  64. package/dist/runtime/composables/storefront/usePromotionsByIds.d.ts +1 -1
  65. package/dist/runtime/composables/storefront/{usePromotionsByIds.mjs → usePromotionsByIds.js} +1 -1
  66. package/dist/runtime/composables/storefront/{useQueryFilterState.mjs → useQueryFilterState.js} +1 -1
  67. package/dist/runtime/composables/storefront/{useSearch.mjs → useSearch.js} +1 -1
  68. package/dist/runtime/composables/storefront/useShopConfiguration.d.ts +1 -1
  69. package/dist/runtime/composables/storefront/{useShopConfiguration.mjs → useShopConfiguration.js} +1 -1
  70. package/dist/runtime/composables/storefront/{useStorefrontSearch.mjs → useStorefrontSearch.js} +1 -1
  71. package/dist/runtime/composables/storefront/useUserAddresses.d.ts +1 -1
  72. package/dist/runtime/composables/storefront/{useUserAddresses.mjs → useUserAddresses.js} +1 -1
  73. package/dist/runtime/composables/storefront/useVariant.d.ts +1 -1
  74. package/dist/runtime/composables/storefront/{useVariant.mjs → useVariant.js} +1 -1
  75. package/dist/runtime/composables/storefront/useWishlist.d.ts +1 -1
  76. package/dist/runtime/composables/storefront/{useWishlist.mjs → useWishlist.js} +3 -3
  77. package/dist/runtime/composables/{useCoreLog.mjs → useCoreLog.js} +1 -1
  78. package/dist/runtime/context.d.ts +1 -1
  79. package/dist/runtime/{context.mjs → context.js} +1 -1
  80. package/dist/runtime/createLog.d.ts +2 -2
  81. package/dist/runtime/{createLog.mjs → createLog.js} +1 -1
  82. package/dist/runtime/nitro/plugins/{configValidation.mjs → configValidation.js} +1 -1
  83. package/dist/runtime/nitro/plugins/{nitroLogger.mjs → nitroLogger.js} +1 -1
  84. package/dist/runtime/nitro/plugins/{nitroRuntimeStorageConfig.mjs → nitroRuntimeStorageConfig.js} +2 -2
  85. package/dist/runtime/plugin/{log.client.mjs → log.client.js} +1 -1
  86. package/dist/runtime/plugin/{shop.mjs → shop.js} +2 -2
  87. package/dist/runtime/rpc/rpcCall.d.ts +1 -1
  88. package/dist/runtime/server/middleware/{bootstrap.utils.d.ts → bootstrap-utils.d.ts} +1 -1
  89. package/dist/runtime/server/middleware/bootstrap.d.ts +1 -1
  90. package/dist/runtime/server/middleware/{bootstrap.mjs → bootstrap.js} +4 -4
  91. package/dist/runtime/server/middleware/{redirects.mjs → redirects.js} +1 -1
  92. package/dist/runtime/server/utils/cacheStorage.d.ts +1 -1
  93. package/dist/shared/{storefront-nuxt.77c99ba5.d.mts → storefront-nuxt.80aa5060.d.mts} +1 -1
  94. package/dist/shared/{storefront-nuxt.77c99ba5.d.ts → storefront-nuxt.80aa5060.d.ts} +1 -1
  95. package/dist/types.d.mts +62 -0
  96. package/dist/types.d.ts +62 -0
  97. package/package.json +8 -6
  98. package/dist/runtime/composables/index.mjs +0 -36
  99. /package/dist/runtime/api/{cacheAuth.mjs → cacheAuth.js} +0 -0
  100. /package/dist/runtime/api/{up.mjs → up.js} +0 -0
  101. /package/dist/runtime/{campaignKey.mjs → campaignKey.js} +0 -0
  102. /package/dist/runtime/composables/core/{useAvailableShops.mjs → useAvailableShops.js} +0 -0
  103. /package/dist/runtime/composables/core/{useCurrentShop.mjs → useCurrentShop.js} +0 -0
  104. /package/dist/runtime/composables/core/{useLog.mjs → useLog.js} +0 -0
  105. /package/dist/runtime/error/{handler.mjs → handler.js} +0 -0
  106. /package/dist/runtime/{handler.mjs → handler.js} +0 -0
  107. /package/dist/runtime/{log.mjs → log.js} +0 -0
  108. /package/dist/runtime/nitro/plugins/{cacheRuntimeConfig.mjs → cacheRuntimeConfig.js} +0 -0
  109. /package/dist/runtime/nitro/plugins/{nitroSetXPoweredByHeader.mjs → nitroSetXPoweredByHeader.js} +0 -0
  110. /package/dist/runtime/plugin/{log.server.mjs → log.server.js} +0 -0
  111. /package/dist/runtime/rpc/{rpcCall.mjs → rpcCall.js} +0 -0
  112. /package/dist/runtime/server/middleware/{bootstrap.utils.mjs → bootstrap-utils.js} +0 -0
  113. /package/dist/runtime/server/middleware/{redirects.utils.mjs → redirects.utils.js} +0 -0
  114. /package/dist/runtime/server/utils/{cacheStorage.mjs → cacheStorage.js} +0 -0
  115. /package/dist/runtime/utils/{promise.mjs → promise.js} +0 -0
  116. /package/dist/runtime/utils/{route.mjs → route.js} +0 -0
  117. /package/dist/runtime/utils/{zodSchema.mjs → zodSchema.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from '#imports';
4
4
  export declare function useProduct<DataT = NormalizedRpcResponse<'getProductById'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
5
5
  params: MaybeRefOrGetter<RpcMethodParameters<'getProductById'>>;
@@ -1,4 +1,4 @@
1
- import { useRpc } from "../core/useRpc.mjs";
1
+ import { useRpc } from "../core/useRpc.js";
2
2
  export function useProduct({
3
3
  params,
4
4
  options,
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from '#imports';
4
4
  export declare function useProducts<DataT = NormalizedRpcResponse<'getProductsByCategory'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
5
5
  params: MaybeRefOrGetter<RpcMethodParameters<'getProductsByCategory'>>;
@@ -1,4 +1,4 @@
1
- import { useRpc } from "../core/useRpc.mjs";
1
+ import { useRpc } from "../core/useRpc.js";
2
2
  export function useProducts({
3
3
  params,
4
4
  options,
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from '#imports';
4
4
  export declare function useProductsByIds<DataT = NormalizedRpcResponse<'getProductsByIds'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
5
5
  params: MaybeRefOrGetter<RpcMethodParameters<'getProductsByIds'>>;
@@ -1,4 +1,4 @@
1
- import { useRpc } from "../core/useRpc.mjs";
1
+ import { useRpc } from "../core/useRpc.js";
2
2
  export function useProductsByIds({
3
3
  params,
4
4
  options,
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from '#imports';
4
4
  export declare function useProductsByReferenceKeys<DataT = NormalizedRpcResponse<'getProductsByReferenceKeys'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
5
5
  params: MaybeRefOrGetter<RpcMethodParameters<'getProductsByReferenceKeys'>>;
@@ -1,4 +1,4 @@
1
- import { useRpc } from "../core/useRpc.mjs";
1
+ import { useRpc } from "../core/useRpc.js";
2
2
  export function useProductsByReferenceKeys({
3
3
  params,
4
4
  options,
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
2
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from '#imports';
4
4
  export declare function useProductsCount<DataT = NormalizedRpcResponse<'getProductsCount'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
5
5
  params: MaybeRefOrGetter<RpcMethodParameters<'getProductsCount'>>;
@@ -1,4 +1,4 @@
1
- import { useRpc } from "../core/useRpc.mjs";
1
+ import { useRpc } from "../core/useRpc.js";
2
2
  export function useProductsCount({
3
3
  params,
4
4
  options,
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from '#imports';
4
4
  export declare function usePromotions<DataT = NormalizedRpcResponse<'getPromotions'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
5
5
  params: MaybeRefOrGetter<RpcMethodParameters<'getPromotions'>>;
@@ -1,4 +1,4 @@
1
- import { useRpc } from "../core/useRpc.mjs";
1
+ import { useRpc } from "../core/useRpc.js";
2
2
  export function usePromotions({
3
3
  params,
4
4
  options,
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from '#imports';
4
4
  export declare function usePromotionsByIds<DataT = NormalizedRpcResponse<'getPromotionsByIds'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
5
5
  params: MaybeRefOrGetter<RpcMethodParameters<'getPromotionsByIds'>>;
@@ -1,4 +1,4 @@
1
- import { useRpc } from "../core/useRpc.mjs";
1
+ import { useRpc } from "../core/useRpc.js";
2
2
  export function usePromotionsByIds({
3
3
  params,
4
4
  options,
@@ -6,7 +6,7 @@ import {
6
6
  getSortByValue
7
7
  } from "@scayle/storefront-core";
8
8
  import { computed } from "vue";
9
- import { getCurrentPage } from "../../utils/route.mjs";
9
+ import { getCurrentPage } from "../../utils/route.js";
10
10
  import { useRoute, useRouter } from "#imports";
11
11
  const DEFAULT_QUERY_KEYS = ["page", "sort", "term"];
12
12
  function queryValueToString(value) {
@@ -1,5 +1,5 @@
1
1
  import { useState } from "nuxt/app";
2
- import { useRpcCall } from "../core/useRpcCall.mjs";
2
+ import { useRpcCall } from "../core/useRpcCall.js";
3
3
  export function useSearch({ params, key = "search" } = {}) {
4
4
  const data = useState(
5
5
  `${key}-data`,
@@ -1,4 +1,4 @@
1
- import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
1
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc.js';
2
2
  export declare function useShopConfiguration<DataT = NormalizedRpcResponse<'getShopConfiguration'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ options, key: _key, }?: Partial<{
3
3
  options: UseRpcOptions<'getShopConfiguration', DataT, PickKeys, DefaultT>;
4
4
  /** @deprecated use the second argument of the composable to define the key */
@@ -1,4 +1,4 @@
1
- import { useRpc } from "../core/useRpc.mjs";
1
+ import { useRpc } from "../core/useRpc.js";
2
2
  export function useShopConfiguration({
3
3
  options,
4
4
  key: _key
@@ -1,5 +1,5 @@
1
1
  import { useState } from "nuxt/app";
2
- import { useRpcCall } from "../core/useRpcCall.mjs";
2
+ import { useRpcCall } from "../core/useRpcCall.js";
3
3
  export function useStorefrontSearch(searchQuery, { params, key = "search" } = {}) {
4
4
  const data = useState(
5
5
  `${key}-data`,
@@ -1,4 +1,4 @@
1
- import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc';
1
+ import type { UseRpcOptions, UseRpcReturn, NormalizedRpcResponse, KeysOf } from '../core/useRpc.js';
2
2
  export declare function useUserAddresses<DataT = NormalizedRpcResponse<'getShopUserAddresses'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ options, key: _key, }?: Partial<{
3
3
  options: UseRpcOptions<'getShopUserAddresses', DataT, PickKeys, DefaultT>;
4
4
  /** @deprecated use the second argument of the composable to define the key */
@@ -1,4 +1,4 @@
1
- import { useRpc } from "../core/useRpc.mjs";
1
+ import { useRpc } from "../core/useRpc.js";
2
2
  export function useUserAddresses({
3
3
  options,
4
4
  key: _key
@@ -1,5 +1,5 @@
1
1
  import type { RpcMethodParameters } from '@scayle/storefront-core';
2
- import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc';
2
+ import type { KeysOf, UseRpcOptions, UseRpcReturn, NormalizedRpcResponse } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter } from '#imports';
4
4
  export declare function useVariant<DataT = NormalizedRpcResponse<'getVariantById'>, PickKeys extends KeysOf<DataT> = KeysOf<DataT>, DefaultT = null>({ params, options, key: _key, }?: Partial<{
5
5
  params: MaybeRefOrGetter<RpcMethodParameters<'getVariantById'>>;
@@ -1,4 +1,4 @@
1
- import { useRpc } from "../core/useRpc.mjs";
1
+ import { useRpc } from "../core/useRpc.js";
2
2
  export function useVariant({
3
3
  params,
4
4
  options,
@@ -1,5 +1,5 @@
1
1
  import type { Product, WishlistItem, RpcMethodParameters } from '@scayle/storefront-core';
2
- import { type UseRpcReturn } from '../core/useRpc';
2
+ import { type UseRpcReturn } from '../core/useRpc.js';
3
3
  import type { MaybeRefOrGetter, ComputedRef } from '#imports';
4
4
  type Options = Partial<{
5
5
  params: MaybeRefOrGetter<RpcMethodParameters<'getWishlist'>>;
@@ -5,10 +5,10 @@ import {
5
5
  } from "@scayle/storefront-core";
6
6
  import { useNuxtApp } from "nuxt/app";
7
7
  import { computed } from "vue";
8
- import { useRpc } from "../core/useRpc.mjs";
9
- import { extendPromise } from "../../utils/promise.mjs";
8
+ import { useRpc } from "../core/useRpc.js";
9
+ import { extendPromise } from "../../utils/promise.js";
10
10
  import { toValue, toRef } from "#imports";
11
- import { useRpcCall } from "../core/useRpcCall.mjs";
11
+ import { useRpcCall } from "../core/useRpcCall.js";
12
12
  export function useWishlist({
13
13
  params,
14
14
  key = "useWishlist"
@@ -1,4 +1,4 @@
1
- import { useLog } from "./core/useLog.mjs";
1
+ import { useLog } from "./core/useLog.js";
2
2
  export function useCoreLog(subSpace) {
3
3
  return useLog(subSpace ? `sfc.${subSpace}` : "sfc");
4
4
  }
@@ -3,7 +3,7 @@ import type { RuntimeConfig } from '@nuxt/schema';
3
3
  import { type H3Event } from 'h3';
4
4
  import type { Log, RpcContext, Cache as CacheInterface } from '@scayle/storefront-core';
5
5
  import { StorefrontAPIClient } from '@scayle/storefront-core';
6
- import type { ShopConfig, StorefrontConfig } from '../module';
6
+ import type { ShopConfig, StorefrontConfig } from '../module.js';
7
7
  export interface ContextBuilderOptions {
8
8
  $cache: CacheInterface;
9
9
  $shopConfig: ShopConfig;
@@ -9,7 +9,7 @@ import {
9
9
  generateWishlistKey
10
10
  } from "@scayle/storefront-core/dist/utils/keys";
11
11
  import { useNitroApp } from "nitropack/runtime";
12
- import { fetchCampaignKey } from "./campaignKey.mjs";
12
+ import { fetchCampaignKey } from "./campaignKey.js";
13
13
  async function getWishlistKey(appKeys, session, $log, $shopConfig) {
14
14
  return session.data.user ? await generateWishlistKey({
15
15
  keyTemplate: appKeys.wishlistKey,
@@ -1,4 +1,4 @@
1
1
  import type { ConsolaInstance, ConsolaOptions } from 'consola';
2
- import type { LogLevel } from '../types/module';
3
- import { Log } from './log';
2
+ import type { LogLevel } from '../types/module.js';
3
+ import { Log } from './log.js';
4
4
  export default function createLog(createConsola: (options?: Partial<ConsolaOptions>) => ConsolaInstance, space: string | undefined, level: LogLevel): Log;
@@ -1,4 +1,4 @@
1
- import { Log } from "./log.mjs";
1
+ import { Log } from "./log.js";
2
2
  const levelMap = {
3
3
  error: 0,
4
4
  warn: 1,
@@ -1,6 +1,6 @@
1
1
  import { defineNitroPlugin } from "nitropack/runtime/plugin";
2
2
  import { useRuntimeConfig } from "#imports";
3
- import { RuntimeConfigSchema } from "../../utils/zodSchema.mjs";
3
+ import { RuntimeConfigSchema } from "../../utils/zodSchema.js";
4
4
  import { purifySensitiveValue } from "@scayle/storefront-core";
5
5
  export const sensitiveKeys = [
6
6
  "token",
@@ -1,7 +1,7 @@
1
1
  import { createConsola } from "consola";
2
2
  import { defineNitroPlugin } from "nitropack/runtime/plugin";
3
3
  import { useRuntimeConfig } from "#imports";
4
- import createLog from "../../createLog.mjs";
4
+ import createLog from "../../createLog.js";
5
5
  export default defineNitroPlugin((nitroApp) => {
6
6
  const config = useRuntimeConfig();
7
7
  const logConfig = config.public.storefront.log;
@@ -2,8 +2,8 @@ import { createConsola } from "consola";
2
2
  import {
3
3
  STORAGE_MOUNT_CACHE,
4
4
  STORAGE_MOUNT_SESSION
5
- } from "../../server/utils/cacheStorage.mjs";
6
- import createLog from "../../createLog.mjs";
5
+ } from "../../server/utils/cacheStorage.js";
6
+ import createLog from "../../createLog.js";
7
7
  import drivers from "#virtual/storage-drivers";
8
8
  import { defineNitroPlugin } from "nitropack/runtime/plugin";
9
9
  import { useStorage } from "nitropack/runtime/storage";
@@ -1,6 +1,6 @@
1
1
  import { defineNuxtPlugin, useRuntimeConfig } from "nuxt/app";
2
2
  import { createConsola } from "consola/browser";
3
- import createLog from "../createLog.mjs";
3
+ import createLog from "../createLog.js";
4
4
  export default defineNuxtPlugin((nuxtApp) => {
5
5
  const config = useRuntimeConfig().public;
6
6
  const log = createLog(
@@ -1,6 +1,6 @@
1
1
  import { defineNuxtPlugin } from "nuxt/app";
2
- import { useCurrentShop } from "../composables/core/useCurrentShop.mjs";
3
- import { useAvailableShops } from "../composables/core/useAvailableShops.mjs";
2
+ import { useCurrentShop } from "../composables/core/useCurrentShop.js";
3
+ import { useAvailableShops } from "../composables/core/useAvailableShops.js";
4
4
  export default defineNuxtPlugin((nuxtApp) => {
5
5
  const currentShop = useCurrentShop();
6
6
  const availableShops = useAvailableShops();
@@ -1,6 +1,6 @@
1
1
  import type { RpcContext, RpcMethodName, RpcMethodParameters, RpcMethodReturnType } from '@scayle/storefront-core';
2
2
  import type { NuxtApp } from 'nuxt/app';
3
- import type { PublicShopConfig } from '../../types/module';
3
+ import type { PublicShopConfig } from '../../types/module.js';
4
4
  /**
5
5
  * rpcCall can be used to invoke an RPC method either on the client or server
6
6
  * It makes an HTTP request on the client and direct call on the server using $fetch
@@ -1,5 +1,5 @@
1
1
  import { type H3Event } from 'h3';
2
- import type { ModuleBaseOptions, PublicShopConfig, ShopConfig, ShopConfigIndexed } from '../../../module';
2
+ import type { ModuleBaseOptions, PublicShopConfig, ShopConfig, ShopConfigIndexed } from '../../../module.js';
3
3
  import type { NitroRuntimeConfigApp } from 'nitropack';
4
4
  type BootstrapPath = {
5
5
  path: string;
@@ -1,5 +1,5 @@
1
1
  import type { RpcContext, Cache, ShopUser } from '@scayle/storefront-core';
2
- import type { PublicShopConfig } from '../../../module';
2
+ import type { PublicShopConfig } from '../../../module.js';
3
3
  declare module 'h3' {
4
4
  interface H3EventContext {
5
5
  $rpcContext: RpcContext;
@@ -5,16 +5,16 @@ import {
5
5
  useSession,
6
6
  unsignCookie
7
7
  } from "@scayle/h3-session";
8
- import { buildContext } from "../../context.mjs";
9
- import { useCacheStorage, useSessionStorage } from "../utils/cacheStorage.mjs";
8
+ import { buildContext } from "../../context.js";
9
+ import { useCacheStorage, useSessionStorage } from "../utils/cacheStorage.js";
10
10
  import {
11
11
  convertShopsToList,
12
12
  getCurrentShopConfigForRequest,
13
13
  getPublicShopData,
14
14
  getBootstrapPath,
15
15
  getApiBasePath
16
- } from "./bootstrap.utils.mjs";
17
- import { useRedirects } from "./redirects.mjs";
16
+ } from "./bootstrap-utils.js";
17
+ import { useRedirects } from "./redirects.js";
18
18
  import { useRuntimeConfig } from "#imports";
19
19
  const generateSessionId = (event) => {
20
20
  let userId;
@@ -1,6 +1,6 @@
1
1
  import { sendRedirect, getRequestURL } from "h3";
2
2
  import { UnstorageCache } from "@scayle/storefront-core/dist/cache/providers/unstorage";
3
- import { getRedirectLookupUrls, getTargetLocation } from "./redirects.utils.mjs";
3
+ import { getRedirectLookupUrls, getTargetLocation } from "./redirects.utils.js";
4
4
  import { useRuntimeConfig } from "#imports";
5
5
  const REDIS_REDIRECT_PREFIX = ":REDIRECT";
6
6
  const REDIRECT_NOT_SET = "REDIRECT_NOT_SET";
@@ -1,7 +1,7 @@
1
1
  import type { Log } from '@scayle/storefront-core';
2
2
  import { UnstorageCache } from '@scayle/storefront-core/dist/cache/providers/unstorage';
3
3
  import { type SessionStore } from '@scayle/h3-session';
4
- import type { SessionConfig } from '../../../types/module';
4
+ import type { SessionConfig } from '../../../types/module.js';
5
5
  export declare const STORAGE_MOUNT_BASE = "storefront";
6
6
  export declare const STORAGE_MOUNT_CACHE = "storefront-cache";
7
7
  export declare const STORAGE_MOUNT_SESSION = "storefront-session";
@@ -1,7 +1,7 @@
1
1
  import { StorefrontHooks, RpcContext, RpcMethodName, HashAlgorithm, WithParams, rpcMethods, ShopUser } from '@scayle/storefront-core';
2
2
  import { CompressionEncodings } from '@scayle/unstorage-compression-driver';
3
3
  import { BuiltinDriverName, BuiltinDriverOptions } from 'unstorage';
4
- import { CheckoutShopConfigType, SessionType, RedisConfigType, StorageType, SapiConfigType, ShopConfigType, IdpType, StorefrontConfigType, ModulePublicRuntimeConfigType, ShopSelectorType, RedirectType } from '../runtime/utils/zodSchema.ts';
4
+ import { CheckoutShopConfigType, SessionType, RedisConfigType, StorageType, SapiConfigType, ShopConfigType, IdpType, StorefrontConfigType, ModulePublicRuntimeConfigType, ShopSelectorType, RedirectType } from '../../dist/runtime/utils/zodSchema.js';
5
5
  import { HookResult } from '@nuxt/schema';
6
6
 
7
7
  type StorageProvider = 'memory' | 'redis';
@@ -1,7 +1,7 @@
1
1
  import { StorefrontHooks, RpcContext, RpcMethodName, HashAlgorithm, WithParams, rpcMethods, ShopUser } from '@scayle/storefront-core';
2
2
  import { CompressionEncodings } from '@scayle/unstorage-compression-driver';
3
3
  import { BuiltinDriverName, BuiltinDriverOptions } from 'unstorage';
4
- import { CheckoutShopConfigType, SessionType, RedisConfigType, StorageType, SapiConfigType, ShopConfigType, IdpType, StorefrontConfigType, ModulePublicRuntimeConfigType, ShopSelectorType, RedirectType } from '../runtime/utils/zodSchema.ts';
4
+ import { CheckoutShopConfigType, SessionType, RedisConfigType, StorageType, SapiConfigType, ShopConfigType, IdpType, StorefrontConfigType, ModulePublicRuntimeConfigType, ShopSelectorType, RedirectType } from '../../dist/runtime/utils/zodSchema.js';
5
5
  import { HookResult } from '@nuxt/schema';
6
6
 
7
7
  type StorageProvider = 'memory' | 'redis';
@@ -0,0 +1,62 @@
1
+
2
+ import type { ModulePublicRuntimeConfig } from './module.js'
3
+
4
+ export interface ModuleOptions {
5
+ session: {
6
+ /** @default "$session" */
7
+ cookieName: string,
8
+
9
+ /** @default "lax" */
10
+ sameSite: string,
11
+ },
12
+
13
+ /** @default "domain" */
14
+ shopSelector: string,
15
+
16
+ oauth: {
17
+ /** @default "" */
18
+ apiHost: string,
19
+
20
+ /** @default "" */
21
+ clientId: string,
22
+
23
+ /** @default "" */
24
+ clientSecret: string,
25
+ },
26
+
27
+ idp: {
28
+ /** @default false */
29
+ enabled: boolean,
30
+
31
+ idpKeys: Array<any>,
32
+
33
+ /** @default "" */
34
+ idpRedirectURL: string,
35
+ },
36
+
37
+ appKeys: {
38
+ /** @default "wishlist_{shopId}_{userId}" */
39
+ wishlistKey: string,
40
+
41
+ /** @default "basket_{shopId}_{userId}" */
42
+ basketKey: string,
43
+
44
+ /** @default "sha256" */
45
+ hashAlgorithm: string,
46
+ },
47
+ }
48
+
49
+ declare module '@nuxt/schema' {
50
+ interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
51
+ interface NuxtOptions { ['storefront']?: ModuleOptions }
52
+ interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
53
+ }
54
+
55
+ declare module 'nuxt/schema' {
56
+ interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
57
+ interface NuxtOptions { ['storefront']?: ModuleOptions }
58
+ interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
59
+ }
60
+
61
+
62
+ export type { AdditionalShopConfig, AppKeys, BapiConfig, CheckoutEvent, CheckoutShopConfig, ModulePublicRuntimeConfig, PublicShopConfig, RedisConfig, SapiConfig, SessionConfig, ShopConfig, ShopConfigIndexed, StorageConfig, StorageEntity, StorageProvider, StorefrontConfig } from './module.js'
@@ -0,0 +1,62 @@
1
+
2
+ import type { ModulePublicRuntimeConfig } from './module'
3
+
4
+ export interface ModuleOptions {
5
+ session: {
6
+ /** @default "$session" */
7
+ cookieName: string,
8
+
9
+ /** @default "lax" */
10
+ sameSite: string,
11
+ },
12
+
13
+ /** @default "domain" */
14
+ shopSelector: string,
15
+
16
+ oauth: {
17
+ /** @default "" */
18
+ apiHost: string,
19
+
20
+ /** @default "" */
21
+ clientId: string,
22
+
23
+ /** @default "" */
24
+ clientSecret: string,
25
+ },
26
+
27
+ idp: {
28
+ /** @default false */
29
+ enabled: boolean,
30
+
31
+ idpKeys: Array<any>,
32
+
33
+ /** @default "" */
34
+ idpRedirectURL: string,
35
+ },
36
+
37
+ appKeys: {
38
+ /** @default "wishlist_{shopId}_{userId}" */
39
+ wishlistKey: string,
40
+
41
+ /** @default "basket_{shopId}_{userId}" */
42
+ basketKey: string,
43
+
44
+ /** @default "sha256" */
45
+ hashAlgorithm: string,
46
+ },
47
+ }
48
+
49
+ declare module '@nuxt/schema' {
50
+ interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
51
+ interface NuxtOptions { ['storefront']?: ModuleOptions }
52
+ interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
53
+ }
54
+
55
+ declare module 'nuxt/schema' {
56
+ interface NuxtConfig { ['storefront']?: Partial<ModuleOptions> }
57
+ interface NuxtOptions { ['storefront']?: ModuleOptions }
58
+ interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
59
+ }
60
+
61
+
62
+ export type { AdditionalShopConfig, AppKeys, BapiConfig, CheckoutEvent, CheckoutShopConfig, ModulePublicRuntimeConfig, PublicShopConfig, RedisConfig, SapiConfig, SessionConfig, ShopConfig, ShopConfigIndexed, StorageConfig, StorageEntity, StorageProvider, StorefrontConfig } from './module'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@scayle/storefront-nuxt",
3
3
  "type": "module",
4
- "version": "7.85.9",
4
+ "version": "7.85.10",
5
5
  "description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
6
6
  "author": "SCAYLE Commerce Engine",
7
7
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  }
32
32
  },
33
33
  "imports": {
34
- "#storefront/composables": "./dist/runtime/composables/index.mjs"
34
+ "#storefront/composables": "./dist/runtime/composables/index.js"
35
35
  },
36
36
  "main": "./dist/index.mjs",
37
37
  "types": "./dist/index.d.ts",
@@ -55,7 +55,8 @@
55
55
  "package:lint": "publint",
56
56
  "test": "vitest run",
57
57
  "test:ci": "vitest run",
58
- "test:watch": "vitest watch"
58
+ "test:watch": "vitest watch",
59
+ "postinstall": "patch-package"
59
60
  },
60
61
  "dependencies": {
61
62
  "@nuxt/kit": "^3.12.2",
@@ -80,12 +81,12 @@
80
81
  },
81
82
  "devDependencies": {
82
83
  "@nuxt/eslint": "0.5.7",
83
- "@nuxt/module-builder": "0.6.0",
84
+ "@nuxt/module-builder": "0.7.1",
84
85
  "@nuxt/schema": "3.13.2",
85
86
  "@nuxt/test-utils": "3.14.2",
86
87
  "@scayle/eslint-config-storefront": "4.3.0",
87
88
  "@scayle/eslint-plugin-vue-composable": "0.2.1",
88
- "@types/node": "20.16.9",
89
+ "@types/node": "20.16.10",
89
90
  "dprint": "0.47.2",
90
91
  "eslint": "9.11.1",
91
92
  "eslint-formatter-gitlab": "5.1.0",
@@ -94,6 +95,7 @@
94
95
  "node-mocks-http": "1.16.0",
95
96
  "nuxi": "3.14.0",
96
97
  "nuxt": "3.13.2",
98
+ "patch-package": "8.0.0",
97
99
  "publint": "0.2.11",
98
100
  "vitest": "2.1.1",
99
101
  "vue-tsc": "2.1.6"
@@ -106,7 +108,7 @@
106
108
  },
107
109
  "resolutions": {
108
110
  "h3": "1.12.0",
109
- "vue": "3.5.9",
111
+ "vue": "3.5.10",
110
112
  "@nuxt/kit": "3.13.2",
111
113
  "@nuxt/schema": "3.13.2"
112
114
  },
@@ -1,36 +0,0 @@
1
- export * from "./core/useAvailableShops.mjs";
2
- export * from "./core/useCurrentShop.mjs";
3
- export * from "./core/useFormatHelpers.mjs";
4
- export * from "./core/useIDP.mjs";
5
- export * from "./core/useLog.mjs";
6
- export * from "./core/useRpc.mjs";
7
- export * from "./core/useRpcCall.mjs";
8
- export * from "./core/useSession.mjs";
9
- export * from "./core/useUser.mjs";
10
- export * from "./storefront/useBasket.mjs";
11
- export * from "./storefront/useBrand.mjs";
12
- export * from "./storefront/useBrands.mjs";
13
- export * from "./storefront/useCategories.mjs";
14
- export * from "./storefront/useCategoryById.mjs";
15
- export * from "./storefront/useCategoryByPath.mjs";
16
- export * from "./storefront/useCurrentPromotions.mjs";
17
- export * from "./storefront/useFacet.mjs";
18
- export * from "./storefront/useFilters.mjs";
19
- export * from "./storefront/useNavigationTree.mjs";
20
- export * from "./storefront/useNavigationTrees.mjs";
21
- export * from "./storefront/useOrder.mjs";
22
- export * from "./storefront/useOrderConfirmation.mjs";
23
- export * from "./storefront/useProduct.mjs";
24
- export * from "./storefront/useProducts.mjs";
25
- export * from "./storefront/useProductsByIds.mjs";
26
- export * from "./storefront/useProductsByReferenceKeys.mjs";
27
- export * from "./storefront/useProductsCount.mjs";
28
- export * from "./storefront/usePromotions.mjs";
29
- export * from "./storefront/usePromotionsByIds.mjs";
30
- export * from "./storefront/useQueryFilterState.mjs";
31
- export * from "./storefront/useSearch.mjs";
32
- export * from "./storefront/useShopConfiguration.mjs";
33
- export * from "./storefront/useStorefrontSearch.mjs";
34
- export * from "./storefront/useUserAddresses.mjs";
35
- export * from "./storefront/useVariant.mjs";
36
- export * from "./storefront/useWishlist.mjs";
File without changes