sonamu 0.15.0 → 0.15.1

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.
@@ -6,7 +6,7 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <meta name="sonamu-ui-token" content="{{sonamuUIToken}}" />
8
8
  <title>{{projectName}}: Sonamu UI</title>
9
- <script type="module" crossorigin src="/sonamu-ui/assets/index-CdZtV4yt.js"></script>
9
+ <script type="module" crossorigin src="/sonamu-ui/assets/index-WNemA9iY.js"></script>
10
10
  <link rel="stylesheet" crossorigin href="/sonamu-ui/assets/index-DbecN7yE.css">
11
11
  </head>
12
12
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sonamu",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Sonamu — TypeScript Fullstack API Framework",
5
5
  "keywords": [
6
6
  "framework",
@@ -289,7 +289,7 @@ export const use${inflection.camelize(hookName)} = ${typeParamsDef}(${paramsDef}
289
289
  `.trim(),
290
290
  );
291
291
 
292
- // infiniteQueryOptions + useInfiniteQuery (AsyncIdConfig.useListInfinite 대상 조건)
292
+ // infiniteQueryOptions + useInfiniteQuery (AsyncIdConfig.listInfiniteQueryOptions 대상 조건)
293
293
  // 조건: resourceName이 복수형이고 methodName === "findMany"
294
294
  const resourceName = api.options.resourceName;
295
295
  const isInfiniteTarget =
@@ -425,10 +425,8 @@ ${functions.join("\n\n")}
425
425
  });
426
426
 
427
427
  if (listApi) {
428
- // resourceName에서 hook 이름 생성 (기존 로직과 동일)
429
- const hookName = inflection.camelize(assertDefined(listApi.options.resourceName), true);
430
- const useHookName = `use${inflection.camelize(hookName)}`;
431
- const useHookInfiniteName = `${useHookName}Infinite`;
428
+ // 위 1.에서 만든 함수 이름(get + resourceName)과 같아야 함
429
+ const methodName = `get${inflection.camelize(assertDefined(listApi.options.resourceName))}`;
432
430
 
433
431
  // ListParams 타입명 구성
434
432
  const listParamsType = `${names.capital}ListParams`;
@@ -438,8 +436,8 @@ ${functions.join("\n\n")}
438
436
  // AsyncIdConfig: ${names.capital}
439
437
  export const ${names.capital}AsyncIdConfig: AsyncIdConfig<${names.capital}SubsetKey, ${names.capital}SubsetMapping, ${listParamsType}> = {
440
438
  placeholderKey: "entity.${names.capital}",
441
- useList: ${names.capital}Service.${useHookName},
442
- useListInfinite: ${names.capital}Service.${useHookInfiniteName},
439
+ listQueryOptions: ${names.capital}Service.${methodName}QueryOptions,
440
+ listInfiniteQueryOptions: ${names.capital}Service.${methodName}InfiniteQueryOptions,
443
441
  };
444
442
  `.trim(),
445
443
  );