@toktokhan-dev/cli-plugin-gen-api-react-query 0.0.17 → 0.0.19
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toktokhan-dev/cli-plugin-gen-api-react-query",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"description": "A CLI plugin for generating API hooks with React Query built by TOKTOKHAN.DEV",
|
|
5
5
|
"author": "TOKTOKHAN.DEV <fe-system@toktokhan.dev>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"lodash": "^4.17.21",
|
|
39
39
|
"prettier-plugin-organize-imports": "^3.2.4",
|
|
40
40
|
"swagger-typescript-api": "^13.0.3",
|
|
41
|
-
"@toktokhan-dev/
|
|
42
|
-
"@toktokhan-dev/
|
|
41
|
+
"@toktokhan-dev/node": "0.0.10",
|
|
42
|
+
"@toktokhan-dev/cli": "0.0.11"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/lodash": "^4.17.0",
|
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
const hookKeyName = `${lowerhookVariant}Key`;
|
|
46
46
|
|
|
47
47
|
const isAxiosInstance = myConfig.httpClientType === 'axios'
|
|
48
|
+
const fetchErrorType = `{ error: ${errorType} }`
|
|
49
|
+
|
|
48
50
|
|
|
49
51
|
|
|
50
52
|
const initialPageParam = () => {
|
|
@@ -81,7 +83,7 @@
|
|
|
81
83
|
<% if (isAxiosInstance) { %>
|
|
82
84
|
AxiosError<<%~ errorType %>>
|
|
83
85
|
<% } else { %>
|
|
84
|
-
<%~
|
|
86
|
+
<%~ fetchErrorType %>
|
|
85
87
|
<% } %>
|
|
86
88
|
, TData>,
|
|
87
89
|
) => {
|
|
@@ -98,7 +100,7 @@
|
|
|
98
100
|
<% if (isAxiosInstance) { %>
|
|
99
101
|
AxiosError<<%~ errorType %>>
|
|
100
102
|
<% } else { %>
|
|
101
|
-
<%~
|
|
103
|
+
<%~ fetchErrorType %>
|
|
102
104
|
<% } %>
|
|
103
105
|
>,
|
|
104
106
|
) => {
|