@ametie/vue-muza-use 0.0.1 → 0.0.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/README.md +9 -9
- package/package.json +12 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Vue Muza Use 🎹
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@ametie/vue-muza-use)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
[](https://vuejs.org/)
|
|
6
6
|
[](https://www.typescriptlang.org/)
|
|
@@ -34,13 +34,13 @@
|
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
36
|
# npm
|
|
37
|
-
npm install @
|
|
37
|
+
npm install @ametie/vue-muza-use axios
|
|
38
38
|
|
|
39
39
|
# pnpm
|
|
40
|
-
pnpm add @
|
|
40
|
+
pnpm add @ametie/vue-muza-use axios
|
|
41
41
|
|
|
42
42
|
# yarn
|
|
43
|
-
yarn add @
|
|
43
|
+
yarn add @ametie/vue-muza-use axios
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
---
|
|
@@ -53,7 +53,7 @@ Use `createApiClient` for a "batteries-included" setup, or bring your own Axios
|
|
|
53
53
|
|
|
54
54
|
```typescript
|
|
55
55
|
import { createApp } from 'vue'
|
|
56
|
-
import { createApi, createApiClient, setAuthMonitor } from '@
|
|
56
|
+
import { createApi, createApiClient, setAuthMonitor } from '@ametie/vue-muza-use'
|
|
57
57
|
import App from './App.vue'
|
|
58
58
|
|
|
59
59
|
const app = createApp(App)
|
|
@@ -92,7 +92,7 @@ app.mount('#app')
|
|
|
92
92
|
|
|
93
93
|
```typescript
|
|
94
94
|
<script setup lang="ts">
|
|
95
|
-
import { useApi } from '@
|
|
95
|
+
import { useApi } from '@ametie/vue-muza-use'
|
|
96
96
|
|
|
97
97
|
interface User {
|
|
98
98
|
id: number
|
|
@@ -123,7 +123,7 @@ Typically used for forms. Pass a `ref` as `data`, and it automatically unwraps c
|
|
|
123
123
|
```typescript
|
|
124
124
|
<script setup lang="ts">
|
|
125
125
|
import { ref } from 'vue'
|
|
126
|
-
import { useApiPost } from '@
|
|
126
|
+
import { useApiPost } from '@ametie/vue-muza-use'
|
|
127
127
|
|
|
128
128
|
const formData = ref({ email: '', password: '' })
|
|
129
129
|
|
|
@@ -170,7 +170,7 @@ watch(searchQuery, (newVal) => {
|
|
|
170
170
|
Useful for complex filters where changing one filter should invalidate all pending requests on the page (or scope).
|
|
171
171
|
|
|
172
172
|
```typescript
|
|
173
|
-
import { useAbortController } from '@
|
|
173
|
+
import { useAbortController } from '@ametie/vue-muza-use'
|
|
174
174
|
|
|
175
175
|
// In your specific composable or component
|
|
176
176
|
const { execute } = useApi('/heavy-report', {
|
|
@@ -264,4 +264,4 @@ This happens transparently to your components. They just "wait" a bit longer for
|
|
|
264
264
|
|
|
265
265
|
## License
|
|
266
266
|
|
|
267
|
-
MIT © [
|
|
267
|
+
MIT © [Ametie](https://github.com/ametie)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ametie/vue-muza-use",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Powerful Vue 3 API composable (Muza Kit) with Axios, Auto-Refresh & TypeScript",
|
|
5
5
|
"author": "MortyQ",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,7 +13,17 @@
|
|
|
13
13
|
"README.md",
|
|
14
14
|
"package.json"
|
|
15
15
|
],
|
|
16
|
-
"keywords": [
|
|
16
|
+
"keywords": [
|
|
17
|
+
"vue",
|
|
18
|
+
"axios",
|
|
19
|
+
"composable",
|
|
20
|
+
"api",
|
|
21
|
+
"typescript",
|
|
22
|
+
"request",
|
|
23
|
+
"auth",
|
|
24
|
+
"refresh",
|
|
25
|
+
"muza"
|
|
26
|
+
],
|
|
17
27
|
"type": "module",
|
|
18
28
|
"types": "./dist/index.d.ts",
|
|
19
29
|
"main": "./dist/index.cjs",
|