@toktokhan-dev/cli-plugin-gen-api-react-query 0.1.6 → 0.1.8

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.js CHANGED
@@ -199,6 +199,9 @@ const genApi = defineCommand({
199
199
  ],
200
200
  },
201
201
  run: async (config) => {
202
+ if (config.swaggerSchemaUrls && config.swaggerSchemaUrls.length === 0) {
203
+ throw new Error('No URLs provided');
204
+ }
202
205
  const isWebUrl = (string) => string.startsWith('http://') || string.startsWith('https://');
203
206
  // 다중 URL 처리 로직 추가
204
207
  const urls = (() => {
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.6",
3
+ "version": "0.1.8",
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",
@@ -147,7 +147,7 @@
147
147
  initialPageParam: <% if (initialPageParam()) { %>
148
148
  <%~ initialPageParam() %>
149
149
  <% } else { %>
150
- null
150
+ ''
151
151
  <% } %>,
152
152
  queryFn: <% if (getNextPage()) { %>
153
153
  <%~ getNextPage() %>
@@ -164,7 +164,7 @@
164
164
  <%~ getNextPageParam() %>
165
165
  <% } else { %>
166
166
  (lastPage) => {
167
- const <%~ pagination.nextKey %> = lastPage.cursor ?? null;
167
+ const <%~ pagination.nextKey %> = lastPage.cursor ?? '';
168
168
  return <%~ pagination.nextKey %>;
169
169
  }
170
170
  <% } %>,
@@ -147,7 +147,7 @@
147
147
  initialPageParam: <% if (initialPageParam()) { %>
148
148
  <%~ initialPageParam() %>
149
149
  <% } else { %>
150
- null
150
+ ''
151
151
  <% } %>,
152
152
  queryFn: <% if (getNextPage()) { %>
153
153
  <%~ getNextPage() %>
@@ -164,7 +164,7 @@
164
164
  <%~ getNextPageParam() %>
165
165
  <% } else { %>
166
166
  (lastPage) => {
167
- const <%~ pagination.nextKey %> = lastPage.cursor ?? null;
167
+ const <%~ pagination.nextKey %> = lastPage.cursor ?? '';
168
168
  return <%~ pagination.nextKey %>;
169
169
  }
170
170
  <% } %>,