@scayle/storefront-nuxt 7.85.9 → 7.85.11
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 +12 -0
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +2 -2
- package/dist/module.d.mts +3 -3
- package/dist/module.d.ts +3 -3
- package/dist/module.json +12 -0
- package/dist/module.mjs +2 -2
- package/dist/rpc.d.mts +1 -1
- package/dist/rpc.d.ts +1 -1
- package/dist/rpc.mjs +1 -1
- package/dist/runtime/api/{purgeAll.mjs → purgeAll.js} +1 -1
- package/dist/runtime/api/{purgeTags.mjs → purgeTags.js} +1 -1
- package/dist/runtime/api/{rpcHandler.mjs → rpcHandler.js} +2 -2
- package/dist/runtime/composables/core/useAvailableShops.d.ts +1 -1
- package/dist/runtime/composables/core/useCurrentShop.d.ts +1 -1
- package/dist/runtime/composables/core/{useFormatHelpers.mjs → useFormatHelpers.js} +1 -1
- package/dist/runtime/composables/core/useIDP.d.ts +1 -1
- package/dist/runtime/composables/core/{useIDP.mjs → useIDP.js} +3 -3
- package/dist/runtime/composables/core/{useRpc.mjs → useRpc.js} +3 -3
- package/dist/runtime/composables/core/{useRpcCall.mjs → useRpcCall.js} +2 -2
- package/dist/runtime/composables/core/{useSession.mjs → useSession.js} +1 -1
- package/dist/runtime/composables/core/useUser.d.ts +1 -1
- package/dist/runtime/composables/core/{useUser.mjs → useUser.js} +4 -4
- package/dist/runtime/composables/index.d.ts +36 -36
- package/dist/runtime/composables/index.js +36 -0
- package/dist/runtime/composables/storefront/useBasket.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useBasket.mjs → useBasket.js} +3 -3
- package/dist/runtime/composables/storefront/useBrand.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useBrand.mjs → useBrand.js} +1 -1
- package/dist/runtime/composables/storefront/useBrands.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useBrands.mjs → useBrands.js} +1 -1
- package/dist/runtime/composables/storefront/useCategories.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useCategories.mjs → useCategories.js} +3 -3
- package/dist/runtime/composables/storefront/useCategoryById.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useCategoryById.mjs → useCategoryById.js} +1 -1
- package/dist/runtime/composables/storefront/useCategoryByPath.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useCategoryByPath.mjs → useCategoryByPath.js} +1 -1
- package/dist/runtime/composables/storefront/useCurrentPromotions.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useCurrentPromotions.mjs → useCurrentPromotions.js} +1 -1
- package/dist/runtime/composables/storefront/{useFacet.mjs → useFacet.js} +5 -5
- package/dist/runtime/composables/storefront/useFilters.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useFilters.mjs → useFilters.js} +1 -1
- package/dist/runtime/composables/storefront/useNavigationTree.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useNavigationTree.mjs → useNavigationTree.js} +1 -1
- package/dist/runtime/composables/storefront/useNavigationTrees.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useNavigationTrees.mjs → useNavigationTrees.js} +1 -1
- package/dist/runtime/composables/storefront/useOrder.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useOrder.mjs → useOrder.js} +1 -1
- package/dist/runtime/composables/storefront/useOrderConfirmation.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useOrderConfirmation.mjs → useOrderConfirmation.js} +1 -1
- package/dist/runtime/composables/storefront/useProduct.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useProduct.mjs → useProduct.js} +1 -1
- package/dist/runtime/composables/storefront/useProducts.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useProducts.mjs → useProducts.js} +1 -1
- package/dist/runtime/composables/storefront/useProductsByIds.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useProductsByIds.mjs → useProductsByIds.js} +1 -1
- package/dist/runtime/composables/storefront/useProductsByReferenceKeys.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useProductsByReferenceKeys.mjs → useProductsByReferenceKeys.js} +1 -1
- package/dist/runtime/composables/storefront/useProductsCount.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useProductsCount.mjs → useProductsCount.js} +1 -1
- package/dist/runtime/composables/storefront/usePromotions.d.ts +1 -1
- package/dist/runtime/composables/storefront/{usePromotions.mjs → usePromotions.js} +1 -1
- package/dist/runtime/composables/storefront/usePromotionsByIds.d.ts +1 -1
- package/dist/runtime/composables/storefront/{usePromotionsByIds.mjs → usePromotionsByIds.js} +1 -1
- package/dist/runtime/composables/storefront/{useQueryFilterState.mjs → useQueryFilterState.js} +1 -1
- package/dist/runtime/composables/storefront/{useSearch.mjs → useSearch.js} +1 -1
- package/dist/runtime/composables/storefront/useShopConfiguration.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useShopConfiguration.mjs → useShopConfiguration.js} +1 -1
- package/dist/runtime/composables/storefront/{useStorefrontSearch.mjs → useStorefrontSearch.js} +1 -1
- package/dist/runtime/composables/storefront/useUserAddresses.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useUserAddresses.mjs → useUserAddresses.js} +1 -1
- package/dist/runtime/composables/storefront/useVariant.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useVariant.mjs → useVariant.js} +1 -1
- package/dist/runtime/composables/storefront/useWishlist.d.ts +1 -1
- package/dist/runtime/composables/storefront/{useWishlist.mjs → useWishlist.js} +3 -3
- package/dist/runtime/composables/{useCoreLog.mjs → useCoreLog.js} +1 -1
- package/dist/runtime/context.d.ts +1 -1
- package/dist/runtime/{context.mjs → context.js} +1 -1
- package/dist/runtime/createLog.d.ts +2 -2
- package/dist/runtime/{createLog.mjs → createLog.js} +1 -1
- package/dist/runtime/nitro/plugins/{configValidation.mjs → configValidation.js} +1 -1
- package/dist/runtime/nitro/plugins/{nitroLogger.mjs → nitroLogger.js} +1 -1
- package/dist/runtime/nitro/plugins/{nitroRuntimeStorageConfig.mjs → nitroRuntimeStorageConfig.js} +2 -2
- package/dist/runtime/plugin/{log.client.mjs → log.client.js} +1 -1
- package/dist/runtime/plugin/{shop.mjs → shop.js} +2 -2
- package/dist/runtime/rpc/rpcCall.d.ts +1 -1
- package/dist/runtime/server/middleware/{bootstrap.utils.d.ts → bootstrap-utils.d.ts} +1 -1
- package/dist/runtime/server/middleware/bootstrap.d.ts +1 -1
- package/dist/runtime/server/middleware/{bootstrap.mjs → bootstrap.js} +4 -4
- package/dist/runtime/server/middleware/{redirects.mjs → redirects.js} +1 -1
- package/dist/runtime/server/utils/cacheStorage.d.ts +1 -1
- package/dist/shared/{storefront-nuxt.77c99ba5.d.mts → storefront-nuxt.80aa5060.d.mts} +1 -1
- package/dist/shared/{storefront-nuxt.77c99ba5.d.ts → storefront-nuxt.80aa5060.d.ts} +1 -1
- package/dist/types.d.mts +11 -0
- package/dist/types.d.ts +11 -0
- package/package.json +5 -5
- package/dist/runtime/composables/index.mjs +0 -36
- /package/dist/runtime/api/{cacheAuth.mjs → cacheAuth.js} +0 -0
- /package/dist/runtime/api/{up.mjs → up.js} +0 -0
- /package/dist/runtime/{campaignKey.mjs → campaignKey.js} +0 -0
- /package/dist/runtime/composables/core/{useAvailableShops.mjs → useAvailableShops.js} +0 -0
- /package/dist/runtime/composables/core/{useCurrentShop.mjs → useCurrentShop.js} +0 -0
- /package/dist/runtime/composables/core/{useLog.mjs → useLog.js} +0 -0
- /package/dist/runtime/error/{handler.mjs → handler.js} +0 -0
- /package/dist/runtime/{handler.mjs → handler.js} +0 -0
- /package/dist/runtime/{log.mjs → log.js} +0 -0
- /package/dist/runtime/nitro/plugins/{cacheRuntimeConfig.mjs → cacheRuntimeConfig.js} +0 -0
- /package/dist/runtime/nitro/plugins/{nitroSetXPoweredByHeader.mjs → nitroSetXPoweredByHeader.js} +0 -0
- /package/dist/runtime/plugin/{log.server.mjs → log.server.js} +0 -0
- /package/dist/runtime/rpc/{rpcCall.mjs → rpcCall.js} +0 -0
- /package/dist/runtime/server/middleware/{bootstrap.utils.mjs → bootstrap-utils.js} +0 -0
- /package/dist/runtime/server/middleware/{redirects.utils.mjs → redirects.utils.js} +0 -0
- /package/dist/runtime/server/utils/{cacheStorage.mjs → cacheStorage.js} +0 -0
- /package/dist/runtime/utils/{promise.mjs → promise.js} +0 -0
- /package/dist/runtime/utils/{route.mjs → route.js} +0 -0
- /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,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,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,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,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,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,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'>>;
|
package/dist/runtime/composables/storefront/{useQueryFilterState.mjs → useQueryFilterState.js}
RENAMED
|
@@ -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.
|
|
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,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 */
|
package/dist/runtime/composables/storefront/{useStorefrontSearch.mjs → useStorefrontSearch.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState } from "nuxt/app";
|
|
2
|
-
import { useRpcCall } from "../core/useRpcCall.
|
|
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,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,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.
|
|
9
|
-
import { extendPromise } from "../../utils/promise.
|
|
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.
|
|
11
|
+
import { useRpcCall } from "../core/useRpcCall.js";
|
|
12
12
|
export function useWishlist({
|
|
13
13
|
params,
|
|
14
14
|
key = "useWishlist"
|
|
@@ -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.
|
|
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,6 +1,6 @@
|
|
|
1
1
|
import { defineNitroPlugin } from "nitropack/runtime/plugin";
|
|
2
2
|
import { useRuntimeConfig } from "#imports";
|
|
3
|
-
import { RuntimeConfigSchema } from "../../utils/zodSchema.
|
|
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.
|
|
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;
|
package/dist/runtime/nitro/plugins/{nitroRuntimeStorageConfig.mjs → nitroRuntimeStorageConfig.js}
RENAMED
|
@@ -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.
|
|
6
|
-
import createLog from "../../createLog.
|
|
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.
|
|
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.
|
|
3
|
-
import { useAvailableShops } from "../composables/core/useAvailableShops.
|
|
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.
|
|
9
|
-
import { useCacheStorage, useSessionStorage } from "../utils/cacheStorage.
|
|
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
|
|
17
|
-
import { useRedirects } from "./redirects.
|
|
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.
|
|
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 '
|
|
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 '
|
|
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';
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module, ModulePublicRuntimeConfig } from './module.js'
|
|
4
|
+
|
|
5
|
+
declare module '@nuxt/schema' {
|
|
6
|
+
interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
10
|
+
|
|
11
|
+
export { type AdditionalShopConfig, type AppKeys, type BapiConfig, type CheckoutEvent, type CheckoutShopConfig, type ModulePublicRuntimeConfig, type PublicShopConfig, type RedisConfig, type SapiConfig, type SessionConfig, type ShopConfig, type ShopConfigIndexed, type StorageConfig, type StorageEntity, type StorageProvider, type StorefrontConfig } from './module.js'
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { NuxtModule } from '@nuxt/schema'
|
|
2
|
+
|
|
3
|
+
import type { default as Module, ModulePublicRuntimeConfig } from './module'
|
|
4
|
+
|
|
5
|
+
declare module '@nuxt/schema' {
|
|
6
|
+
interface PublicRuntimeConfig extends ModulePublicRuntimeConfig {}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export type ModuleOptions = typeof Module extends NuxtModule<infer O> ? Partial<O> : Record<string, any>
|
|
10
|
+
|
|
11
|
+
export { type AdditionalShopConfig, type AppKeys, type BapiConfig, type CheckoutEvent, type CheckoutShopConfig, type ModulePublicRuntimeConfig, type PublicShopConfig, type RedisConfig, type SapiConfig, type SessionConfig, type ShopConfig, type ShopConfigIndexed, type StorageConfig, type StorageEntity, type StorageProvider, type 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.
|
|
4
|
+
"version": "7.85.11",
|
|
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.
|
|
34
|
+
"#storefront/composables": "./dist/runtime/composables/index.js"
|
|
35
35
|
},
|
|
36
36
|
"main": "./dist/index.mjs",
|
|
37
37
|
"types": "./dist/index.d.ts",
|
|
@@ -80,12 +80,12 @@
|
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@nuxt/eslint": "0.5.7",
|
|
83
|
-
"@nuxt/module-builder": "0.
|
|
83
|
+
"@nuxt/module-builder": "0.8.4",
|
|
84
84
|
"@nuxt/schema": "3.13.2",
|
|
85
85
|
"@nuxt/test-utils": "3.14.2",
|
|
86
86
|
"@scayle/eslint-config-storefront": "4.3.0",
|
|
87
87
|
"@scayle/eslint-plugin-vue-composable": "0.2.1",
|
|
88
|
-
"@types/node": "20.16.
|
|
88
|
+
"@types/node": "20.16.10",
|
|
89
89
|
"dprint": "0.47.2",
|
|
90
90
|
"eslint": "9.11.1",
|
|
91
91
|
"eslint-formatter-gitlab": "5.1.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
},
|
|
107
107
|
"resolutions": {
|
|
108
108
|
"h3": "1.12.0",
|
|
109
|
-
"vue": "3.5.
|
|
109
|
+
"vue": "3.5.10",
|
|
110
110
|
"@nuxt/kit": "3.13.2",
|
|
111
111
|
"@nuxt/schema": "3.13.2"
|
|
112
112
|
},
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/runtime/nitro/plugins/{nitroSetXPoweredByHeader.mjs → nitroSetXPoweredByHeader.js}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|