@scayle/storefront-nuxt 7.62.2 → 7.62.4
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 +14 -0
- package/dist/module.json +1 -1
- package/dist/runtime/api/rpcHandler.d.ts +2 -2
- package/dist/runtime/composables/storefront/useBasket.d.ts +1 -1
- package/dist/runtime/composables/storefront/useBasket.mjs +4 -4
- package/dist/runtime/composables/storefront/useFacet.mjs +79 -72
- package/dist/runtime/composables/storefront/useWishlist.d.ts +1 -1
- package/dist/runtime/plugin/log.client.mjs +10 -2
- package/package.json +12 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 7.62.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Removed direct logging of `vm` in `log.client.ts` to fix a recursive/infinite logging issue, now logging `vm.$options` instead.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
- @scayle/storefront-core@7.47.0
|
|
10
|
+
|
|
11
|
+
## 7.62.3
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Ensure composables are not called asynchronously in `useBasket` and `useFacet`
|
|
16
|
+
|
|
3
17
|
## 7.62.2
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/module.json
CHANGED
|
@@ -23,7 +23,7 @@ declare const _default: import("h3").EventHandler<import("h3").EventHandlerReque
|
|
|
23
23
|
unfilteredCount: number;
|
|
24
24
|
} | {
|
|
25
25
|
count: number;
|
|
26
|
-
} | import("@scayle/storefront-core").TypeaheadSuggestionsEndpointResponseData | import("@aboutyou/backbone/endpoints/shopconfiguration/shopconfiguration").ShopConfigurationResponseData | {
|
|
26
|
+
} | import("@scayle/storefront-core").TypeaheadSuggestionsEndpointResponseData | import("@scayle/storefront-core").SearchV2SuggestionsEndpointResponseData | import("@scayle/storefront-core").SearchEntity | import("@aboutyou/backbone/endpoints/shopconfiguration/shopconfiguration").ShopConfigurationResponseData | {
|
|
27
27
|
user: import("@scayle/storefront-core").ShopUser | undefined;
|
|
28
28
|
} | import("@scayle/storefront-core").WishlistResponseData | Response | import("@scayle/storefront-core").ShopUserAddress[] | import("@aboutyou/backbone/endpoints/variants/variantsByIds").VariantDetail[] | import("@aboutyou/backbone").NavigationAllEndpointResponseData | import("@scayle/storefront-core").NavigationTree | {
|
|
29
29
|
success: true;
|
|
@@ -37,5 +37,5 @@ declare const _default: import("h3").EventHandler<import("h3").EventHandlerReque
|
|
|
37
37
|
[k: string]: string;
|
|
38
38
|
} | {
|
|
39
39
|
message: string;
|
|
40
|
-
} | undefined>>;
|
|
40
|
+
} | null | undefined>>;
|
|
41
41
|
export default _default;
|
|
@@ -59,6 +59,6 @@ export declare function useBasket({ params, key, }?: UseBasketOptions): Promise<
|
|
|
59
59
|
readonly errors: import("@aboutyou/backbone/helpers/BapiClient").AddOrUpdateItemError[];
|
|
60
60
|
} | undefined>;
|
|
61
61
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | null>;
|
|
62
|
-
status: import("vue").Ref<import("nuxt/
|
|
62
|
+
status: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
63
63
|
}>;
|
|
64
64
|
export {};
|
|
@@ -29,6 +29,10 @@ export async function useBasket({
|
|
|
29
29
|
} = {}) {
|
|
30
30
|
const nuxtApp = useNuxtApp();
|
|
31
31
|
const shop = useCurrentShop();
|
|
32
|
+
useEventListener(
|
|
33
|
+
"message",
|
|
34
|
+
(event) => onCheckoutUpdate(event, fetching.value, fetch)
|
|
35
|
+
);
|
|
32
36
|
const {
|
|
33
37
|
data,
|
|
34
38
|
pending: fetching,
|
|
@@ -49,10 +53,6 @@ export async function useBasket({
|
|
|
49
53
|
default: () => void 0
|
|
50
54
|
}
|
|
51
55
|
);
|
|
52
|
-
useEventListener(
|
|
53
|
-
"message",
|
|
54
|
-
(event) => onCheckoutUpdate(event, fetching.value, fetch)
|
|
55
|
-
);
|
|
56
56
|
const addItem = async ({
|
|
57
57
|
variantId,
|
|
58
58
|
promotionId,
|
|
@@ -28,81 +28,88 @@ export async function useFacet({
|
|
|
28
28
|
const productCountWhere = useState(
|
|
29
29
|
`${key}-productCountWhereCondition`
|
|
30
30
|
);
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
31
|
+
const [
|
|
32
|
+
{
|
|
33
|
+
data: categoryData,
|
|
34
|
+
fetch: refreshCategories,
|
|
35
|
+
fetching: categoriesFetching,
|
|
36
|
+
error: categoriesError,
|
|
37
|
+
status: categoriesStatus
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
data: productData,
|
|
41
|
+
fetch: _refreshProducts,
|
|
42
|
+
fetching: productsFetching,
|
|
43
|
+
error: productError,
|
|
44
|
+
status: productStatus
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
data: productCountData,
|
|
48
|
+
fetch: _refreshProductCount,
|
|
49
|
+
fetching: productCountFetching,
|
|
50
|
+
error: productCountError,
|
|
51
|
+
status: productCountStatus
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
data: filterData,
|
|
55
|
+
fetch: refreshFilters,
|
|
56
|
+
fetching: filtersFetching,
|
|
57
|
+
error: filterError,
|
|
58
|
+
status: filterStatus
|
|
59
|
+
}
|
|
60
|
+
] = await Promise.all([
|
|
61
|
+
useCategories({
|
|
62
|
+
params: () => ({
|
|
63
|
+
path: currentPath.value,
|
|
64
|
+
includeHidden: params.with?.product?.categories?.includeHidden || void 0
|
|
65
|
+
}),
|
|
66
|
+
options: { autoFetch: false },
|
|
67
|
+
key: `${key}-categories`
|
|
66
68
|
}),
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
orFiltersOperator: currentOrFiltersOperator.value
|
|
69
|
+
useProducts({
|
|
70
|
+
params: () => ({
|
|
71
|
+
page: currentPage.value,
|
|
72
|
+
perPage: currentPerPage.value,
|
|
73
|
+
with: params.with?.product,
|
|
74
|
+
category: currentPath.value,
|
|
75
|
+
includeSoldOut: params.includeSoldOut,
|
|
76
|
+
includeSellableForFree: params.includeSellableForFree,
|
|
77
|
+
where: currentWhereCondition.value,
|
|
78
|
+
sort: currentSorting.value,
|
|
79
|
+
pricePromotionKey: currentPricePromotionKey.value,
|
|
80
|
+
cache: currentCacheParams.value,
|
|
81
|
+
orFiltersOperator: currentOrFiltersOperator.value
|
|
82
|
+
}),
|
|
83
|
+
options: { autoFetch: false },
|
|
84
|
+
key: `${key}-products`
|
|
84
85
|
}),
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
category: currentPath.value,
|
|
97
|
-
includedFilters: params.includedFilters,
|
|
98
|
-
includeSoldOut: params.includeSoldOut,
|
|
99
|
-
includeSellableForFree: params.includeSellableForFree,
|
|
100
|
-
where: currentWhereCondition.value,
|
|
101
|
-
orFiltersOperator: currentOrFiltersOperator.value
|
|
86
|
+
useProductsCount({
|
|
87
|
+
params: () => ({
|
|
88
|
+
category: currentPath.value,
|
|
89
|
+
includedFilters: params.includedFilters,
|
|
90
|
+
includeSoldOut: params.includeSoldOut,
|
|
91
|
+
includeSellableForFree: params.includeSellableForFree,
|
|
92
|
+
where: productCountWhere.value,
|
|
93
|
+
orFiltersOperator: currentOrFiltersOperator.value
|
|
94
|
+
}),
|
|
95
|
+
options: { autoFetch: false },
|
|
96
|
+
key: `${key}-productCount`
|
|
102
97
|
}),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
98
|
+
useFilters({
|
|
99
|
+
params: () => ({
|
|
100
|
+
category: currentPath.value,
|
|
101
|
+
includedFilters: params.includedFilters,
|
|
102
|
+
includeSoldOut: params.includeSoldOut,
|
|
103
|
+
includeSellableForFree: params.includeSellableForFree,
|
|
104
|
+
where: currentWhereCondition.value,
|
|
105
|
+
orFiltersOperator: currentOrFiltersOperator.value
|
|
106
|
+
}),
|
|
107
|
+
options: { autoFetch: false },
|
|
108
|
+
key: `${key}-filters`
|
|
109
|
+
})
|
|
110
|
+
]);
|
|
111
|
+
const categories = computed(() => categoryData.value?.categories);
|
|
112
|
+
const selectedCategory = computed(() => categoryData.value?.activeNode);
|
|
106
113
|
const pagination = computed(() => productData.value?.pagination);
|
|
107
114
|
const products = computed(() => productData.value?.products);
|
|
108
115
|
const filters = computed(() => filterData.value?.filters);
|
|
@@ -41,6 +41,6 @@ export declare function useWishlist({ params, key, }?: Options): Promise<{
|
|
|
41
41
|
productId: number;
|
|
42
42
|
}) => boolean;
|
|
43
43
|
error: import("vue").Ref<import("nuxt/app").NuxtError<unknown> | null>;
|
|
44
|
-
status: import("vue").Ref<import("nuxt/
|
|
44
|
+
status: import("vue").Ref<import("nuxt/app").AsyncDataRequestStatus>;
|
|
45
45
|
}>;
|
|
46
46
|
export {};
|
|
@@ -20,9 +20,17 @@ export default defineNuxtPlugin((nuxtApp) => {
|
|
|
20
20
|
});
|
|
21
21
|
function addClientSideErrorHandling(log, app) {
|
|
22
22
|
app.config.warnHandler = (msg, vm, trace) => {
|
|
23
|
-
log.space("warnHandler").warn(msg, {
|
|
23
|
+
log.space("warnHandler").warn(msg, {
|
|
24
|
+
vmOptions: vm?.$options,
|
|
25
|
+
trace,
|
|
26
|
+
component: vm?.$options.__name
|
|
27
|
+
});
|
|
24
28
|
};
|
|
25
29
|
app.config.errorHandler = (error, vm, info) => {
|
|
26
|
-
log.space("errorHandler").error(error, {
|
|
30
|
+
log.space("errorHandler").error(error, {
|
|
31
|
+
vmOptions: vm?.$options,
|
|
32
|
+
info,
|
|
33
|
+
component: vm?.$options.__name
|
|
34
|
+
});
|
|
27
35
|
};
|
|
28
36
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.62.
|
|
4
|
+
"version": "7.62.4",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -60,17 +60,17 @@
|
|
|
60
60
|
"test:watch": "vitest watch"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@nuxt/kit": "3.
|
|
63
|
+
"@nuxt/kit": "3.11.1",
|
|
64
64
|
"@scayle/h3-session": "0.3.5",
|
|
65
|
-
"@scayle/storefront-core": "7.
|
|
65
|
+
"@scayle/storefront-core": "7.47.0",
|
|
66
66
|
"@scayle/unstorage-compression-driver": "0.1.2",
|
|
67
67
|
"@vueuse/core": "10.9.0",
|
|
68
68
|
"consola": "3.2.3",
|
|
69
69
|
"core-js": "3.36.1",
|
|
70
70
|
"defu": "6.1.4",
|
|
71
71
|
"jose": "^5.2.0",
|
|
72
|
-
"knitwork": "1.
|
|
73
|
-
"nitropack": "2.9.
|
|
72
|
+
"knitwork": "1.1.0",
|
|
73
|
+
"nitropack": "2.9.6",
|
|
74
74
|
"ofetch": "1.3.4",
|
|
75
75
|
"radash": "12.1.0",
|
|
76
76
|
"uncrypto": "0.1.3",
|
|
@@ -80,16 +80,17 @@
|
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@nuxt/module-builder": "0.5.5",
|
|
83
|
-
"@nuxt/schema": "3.
|
|
83
|
+
"@nuxt/schema": "3.11.1",
|
|
84
84
|
"@nuxt/test-utils": "3.12.0",
|
|
85
85
|
"@scayle/eslint-config-storefront": "3.2.6",
|
|
86
|
+
"@scayle/eslint-plugin-vue-composable": "0.1.1",
|
|
86
87
|
"@scayle/prettier-config-storefront": "2.0.2",
|
|
87
|
-
"@types/node": "20.
|
|
88
|
+
"@types/node": "20.12.3",
|
|
88
89
|
"eslint": "8.57.0",
|
|
89
90
|
"eslint-formatter-gitlab": "5.1.0",
|
|
90
91
|
"h3": "1.11.1",
|
|
91
92
|
"node-mocks-http": "1.14.1",
|
|
92
|
-
"nuxt": "3.
|
|
93
|
+
"nuxt": "3.11.1",
|
|
93
94
|
"prettier": "3.0.0",
|
|
94
95
|
"publint": "0.2.7",
|
|
95
96
|
"vitest": "1.4.0",
|
|
@@ -104,10 +105,10 @@
|
|
|
104
105
|
"resolutions": {
|
|
105
106
|
"h3": "1.11.1",
|
|
106
107
|
"vue": "3.4.21",
|
|
107
|
-
"@nuxt/kit": "3.
|
|
108
|
-
"@nuxt/schema": "3.
|
|
108
|
+
"@nuxt/kit": "3.11.1",
|
|
109
|
+
"@nuxt/schema": "3.11.1"
|
|
109
110
|
},
|
|
110
111
|
"volta": {
|
|
111
|
-
"node": "20.
|
|
112
|
+
"node": "20.12.0"
|
|
112
113
|
}
|
|
113
114
|
}
|