@vesperjs/vue 0.6.0 → 0.7.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.
- package/dist/index.mjs +2 -2
- package/package.json +8 -8
package/dist/index.mjs
CHANGED
|
@@ -154,7 +154,7 @@ const useMutationApi = async function(url, options) {
|
|
|
154
154
|
if (timeout) mutOptions.timeout = timeout;
|
|
155
155
|
if (onRequestError) mutOptions.onRequestError = onRequestError;
|
|
156
156
|
if (onResponseError) mutOptions.onResponseError = onResponseError;
|
|
157
|
-
if (method
|
|
157
|
+
if (method === "post" || method === "put") mutOptions.body = body;
|
|
158
158
|
mutOptions.onResponse = ({ response }) => {
|
|
159
159
|
tokenRef.value = response.headers.get("Authorization")?.split(" ")[1] ?? token;
|
|
160
160
|
};
|
|
@@ -200,7 +200,7 @@ const useApiError = function({ flash, caller }) {
|
|
|
200
200
|
}
|
|
201
201
|
};
|
|
202
202
|
const reload = () => {
|
|
203
|
-
if (backendErrorInfo.value.status
|
|
203
|
+
if (backendErrorInfo.value.status === 404) globalThis.setTimeout(() => {
|
|
204
204
|
globalThis.location.reload();
|
|
205
205
|
}, 1e3);
|
|
206
206
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vesperjs/vue",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"vue.js"
|
|
6
6
|
],
|
|
@@ -22,11 +22,11 @@
|
|
|
22
22
|
"@formkit/tempo": "^1.0.0",
|
|
23
23
|
"@nanostores/persistent": "^1.3.4",
|
|
24
24
|
"@nanostores/router": "^1.0.0",
|
|
25
|
-
"@vesperjs/shared": "0.
|
|
25
|
+
"@vesperjs/shared": "0.7.0",
|
|
26
26
|
"nanostores": "^1.3.0",
|
|
27
27
|
"ofetch": "^1.5.1",
|
|
28
28
|
"undici": "^8.2.0",
|
|
29
|
-
"vue-i18n": "^11.4.
|
|
29
|
+
"vue-i18n": "^11.4.2"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@eslint/js": "^10.0.1",
|
|
@@ -36,14 +36,14 @@
|
|
|
36
36
|
"eslint": "^10.3.0",
|
|
37
37
|
"eslint-plugin-vue": "^10.9.1",
|
|
38
38
|
"oxfmt": "^0.48.0",
|
|
39
|
-
"tsdown": "^0.
|
|
39
|
+
"tsdown": "^0.22.0",
|
|
40
40
|
"typescript": "^6.0.3"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@vue/reactivity": "^3.5.34 || ^3.6.0-beta.
|
|
44
|
-
"@vue/runtime-core": "^3.5.34 || ^3.6.0-beta.
|
|
45
|
-
"@vue/runtime-dom": "^3.5.34 || ^3.6.0-beta.
|
|
46
|
-
"vue": "^3.5.34 || ^3.6.0-beta.
|
|
43
|
+
"@vue/reactivity": "^3.5.34 || ^3.6.0-beta.11",
|
|
44
|
+
"@vue/runtime-core": "^3.5.34 || ^3.6.0-beta.11",
|
|
45
|
+
"@vue/runtime-dom": "^3.5.34 || ^3.6.0-beta.11",
|
|
46
|
+
"vue": "^3.5.34 || ^3.6.0-beta.11"
|
|
47
47
|
},
|
|
48
48
|
"scripts": {
|
|
49
49
|
"build": "tsdown --dts",
|