@scayle/storefront-nuxt 7.42.0 → 7.42.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @scayle/storefront-nuxt
|
|
2
2
|
|
|
3
|
+
## 7.42.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Ensure `useNuxtApp` is only called from a composable context in `useCategories`
|
|
8
|
+
|
|
9
|
+
## 7.42.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Ensure useNuxtApp is only called from a composable context
|
|
14
|
+
|
|
3
15
|
## 7.42.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/module.json
CHANGED
|
@@ -13,6 +13,7 @@ function getFetch(nuxtApp, log) {
|
|
|
13
13
|
export const useRpc = async (method, key, params, options = { autoFetch: true, lazy: false }) => {
|
|
14
14
|
const currentShop = useCurrentShop();
|
|
15
15
|
const log = useCoreLog("rpc");
|
|
16
|
+
const nuxtApp = useNuxtApp();
|
|
16
17
|
const isAutoFetchEnabled = options?.autoFetch ?? true;
|
|
17
18
|
log.debug(`useRpc: ${method}`);
|
|
18
19
|
const data = useState(`${method}-${key}-data`);
|
|
@@ -27,7 +28,7 @@ export const useRpc = async (method, key, params, options = { autoFetch: true, l
|
|
|
27
28
|
status.value = "pending";
|
|
28
29
|
fetching.value = true;
|
|
29
30
|
const apiBasePath = currentShop.value?.apiBasePath ?? "/api";
|
|
30
|
-
const fetch2 = getFetch(
|
|
31
|
+
const fetch2 = getFetch(nuxtApp, log);
|
|
31
32
|
data.value = await fetch2(`/rpc/${method}`, {
|
|
32
33
|
// @ts-ignore
|
|
33
34
|
method: "POST",
|
|
@@ -8,6 +8,7 @@ export async function useCategories({
|
|
|
8
8
|
key = "useCategories"
|
|
9
9
|
} = {}) {
|
|
10
10
|
const currentShop = useCurrentShop();
|
|
11
|
+
const nuxtApp = useNuxtApp();
|
|
11
12
|
const { data, fetching, fetch, error, status } = await useRpc(
|
|
12
13
|
"getCategoriesByPath",
|
|
13
14
|
key,
|
|
@@ -15,7 +16,7 @@ export async function useCategories({
|
|
|
15
16
|
options
|
|
16
17
|
);
|
|
17
18
|
const getCategoryById = rpcCall(
|
|
18
|
-
|
|
19
|
+
nuxtApp,
|
|
19
20
|
"getCategoryById",
|
|
20
21
|
currentShop.value ?? void 0
|
|
21
22
|
);
|
|
@@ -6,6 +6,7 @@ export const useSearch = ({ params, key = "search" } = {}) => {
|
|
|
6
6
|
`${key}-data`,
|
|
7
7
|
() => void 0
|
|
8
8
|
);
|
|
9
|
+
const nuxtApp = useNuxtApp();
|
|
9
10
|
const searchQuery = useState(`${key}-searchQuery`, () => "");
|
|
10
11
|
const pending = useState(`${key}-pending`, () => false);
|
|
11
12
|
const error = useState(`${key}-error`, () => void 0);
|
|
@@ -19,7 +20,7 @@ export const useSearch = ({ params, key = "search" } = {}) => {
|
|
|
19
20
|
}
|
|
20
21
|
try {
|
|
21
22
|
data.value = await rpcCall(
|
|
22
|
-
|
|
23
|
+
nuxtApp,
|
|
23
24
|
"searchProducts",
|
|
24
25
|
toValue(shop)
|
|
25
26
|
)({
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scayle/storefront-nuxt",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.42.
|
|
4
|
+
"version": "7.42.2",
|
|
5
5
|
"description": "Nuxt integration for the SCAYLE Commerce Engine and Storefront API",
|
|
6
6
|
"author": "SCAYLE Commerce Engine",
|
|
7
7
|
"license": "MIT",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"defu": "6.1.3",
|
|
70
70
|
"h3": "1.9.0",
|
|
71
71
|
"jose": "4.15.4",
|
|
72
|
-
"nitropack": "2.8.
|
|
72
|
+
"nitropack": "2.8.1",
|
|
73
73
|
"ofetch": "1.3.3",
|
|
74
74
|
"radash": "11.0.0",
|
|
75
75
|
"uncrypto": "0.1.3",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@nuxt/test-utils": "3.8.1",
|
|
84
84
|
"@scayle/eslint-config-storefront": "3.2.5",
|
|
85
85
|
"@scayle/prettier-config-storefront": "2.0.2",
|
|
86
|
-
"@types/node": "20.10.
|
|
86
|
+
"@types/node": "20.10.1",
|
|
87
87
|
"eslint": "8.54.0",
|
|
88
88
|
"eslint-formatter-gitlab": "5.1.0",
|
|
89
89
|
"node-mocks-http": "1.13.0",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"prettier": "3.0.0",
|
|
92
92
|
"publint": "0.2.5",
|
|
93
93
|
"vitest": "0.34.6",
|
|
94
|
-
"vue-tsc": "1.8.
|
|
94
|
+
"vue-tsc": "1.8.24"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"nuxt": ">=3.8.1",
|
|
@@ -99,16 +99,16 @@
|
|
|
99
99
|
"vue": ">=3.3.0"
|
|
100
100
|
},
|
|
101
101
|
"resolutions": {
|
|
102
|
-
"@vue/compiler-core": "3.3.
|
|
103
|
-
"@vue/shared": "3.3.
|
|
104
|
-
"@vue/compiler-dom": "3.3.
|
|
105
|
-
"@vue/compiler-sfc": "3.3.
|
|
106
|
-
"@vue/compiler-ssr": "3.3.
|
|
107
|
-
"@vue/reactivity-transform": "3.3.
|
|
108
|
-
"@vue/reactivity": "3.3.
|
|
109
|
-
"@vue/runtime-core": "3.3.
|
|
110
|
-
"@vue/runtime-dom": "3.3.
|
|
111
|
-
"@vue/server-renderer": "3.3.
|
|
102
|
+
"@vue/compiler-core": "3.3.9",
|
|
103
|
+
"@vue/shared": "3.3.9",
|
|
104
|
+
"@vue/compiler-dom": "3.3.9",
|
|
105
|
+
"@vue/compiler-sfc": "3.3.9",
|
|
106
|
+
"@vue/compiler-ssr": "3.3.9",
|
|
107
|
+
"@vue/reactivity-transform": "3.3.9",
|
|
108
|
+
"@vue/reactivity": "3.3.9",
|
|
109
|
+
"@vue/runtime-core": "3.3.9",
|
|
110
|
+
"@vue/runtime-dom": "3.3.9",
|
|
111
|
+
"@vue/server-renderer": "3.3.9"
|
|
112
112
|
},
|
|
113
113
|
"volta": {
|
|
114
114
|
"node": "20.10.0"
|