@toktokhan-dev/cli-plugin-gen-api-react-query 0.1.0 → 0.1.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toktokhan-dev/cli-plugin-gen-api-react-query",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
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/cli": "0.0.11",
|
|
42
|
+
"@toktokhan-dev/node": "0.0.10"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/lodash": "^4.17.0",
|
|
@@ -23,7 +23,7 @@ const apiInstanceName = route.moduleName + "Api";
|
|
|
23
23
|
const queryKeyName = "QUERY_KEY_" + _.upperCase(apiClassName).replace(/ /g, '_');
|
|
24
24
|
|
|
25
25
|
const hasPaginationKeyword = (queryString, keywords = paginationKeywords ) => {
|
|
26
|
-
if
|
|
26
|
+
if(!includeReactQuery && !includeReactSuspenseQuery ) return false;
|
|
27
27
|
const keywordUnion = keywords.map(str => `.*${str}.*`).join("|");
|
|
28
28
|
const rgxSting = keywords.map(str => `(${keywordUnion})`).join("");
|
|
29
29
|
const rgx = new RegExp(rgxSting);
|
|
@@ -13,8 +13,10 @@ const { apiConfig, generateResponses, config } = it;
|
|
|
13
13
|
export type QueryParamsType = Record<string | number, any>;
|
|
14
14
|
export type ResponseFormat = keyof Omit<Body, "body" | "bodyUsed">;
|
|
15
15
|
|
|
16
|
-
export interface FullRequestParams extends Omit<RequestInit,
|
|
17
|
-
/**
|
|
16
|
+
export interface FullRequestParams extends Omit<RequestInit, 'body'> {
|
|
17
|
+
/** 임시 추가 */
|
|
18
|
+
paramsSerializer?: (...params: any[]) => any;
|
|
19
|
+
/** set parameter to`true` for call `securityWorker` for this request */
|
|
18
20
|
secure?: boolean;
|
|
19
21
|
/** request path */
|
|
20
22
|
path: string;
|