@kubb/plugin-vue-query 5.0.0-beta.3 → 5.0.0-beta.31

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.
Files changed (41) hide show
  1. package/README.md +26 -5
  2. package/dist/{components-qfOFRSoM.cjs → components-B6lPYyOP.cjs} +367 -381
  3. package/dist/components-B6lPYyOP.cjs.map +1 -0
  4. package/dist/{components-D1UhYFgY.js → components-BZqujNQv.js} +336 -380
  5. package/dist/components-BZqujNQv.js.map +1 -0
  6. package/dist/components.cjs +1 -1
  7. package/dist/components.d.ts +3 -67
  8. package/dist/components.js +1 -1
  9. package/dist/{generators-CbnIVBgY.js → generators-C-3isXzW.js} +158 -203
  10. package/dist/generators-C-3isXzW.js.map +1 -0
  11. package/dist/{generators-C4gs_P1i.cjs → generators-QHQkbNnm.cjs} +157 -202
  12. package/dist/generators-QHQkbNnm.cjs.map +1 -0
  13. package/dist/generators.cjs +1 -1
  14. package/dist/generators.d.ts +17 -1
  15. package/dist/generators.js +1 -1
  16. package/dist/index.cjs +136 -23
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.ts +29 -1
  19. package/dist/index.js +136 -23
  20. package/dist/index.js.map +1 -1
  21. package/dist/types-D-LjzI_Q.d.ts +270 -0
  22. package/extension.yaml +1273 -0
  23. package/package.json +16 -18
  24. package/src/components/InfiniteQuery.tsx +16 -48
  25. package/src/components/InfiniteQueryOptions.tsx +43 -58
  26. package/src/components/Mutation.tsx +33 -42
  27. package/src/components/Query.tsx +16 -49
  28. package/src/components/QueryKey.tsx +9 -61
  29. package/src/components/QueryOptions.tsx +20 -76
  30. package/src/generators/infiniteQueryGenerator.tsx +55 -63
  31. package/src/generators/mutationGenerator.tsx +50 -61
  32. package/src/generators/queryGenerator.tsx +52 -61
  33. package/src/plugin.ts +46 -30
  34. package/src/resolvers/resolverVueQuery.ts +61 -4
  35. package/src/types.ts +129 -53
  36. package/src/utils.ts +44 -25
  37. package/dist/components-D1UhYFgY.js.map +0 -1
  38. package/dist/components-qfOFRSoM.cjs.map +0 -1
  39. package/dist/generators-C4gs_P1i.cjs.map +0 -1
  40. package/dist/generators-CbnIVBgY.js.map +0 -1
  41. package/dist/types-nVDTfuS1.d.ts +0 -194
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generators-QHQkbNnm.cjs","names":["jsxRendererSync","ast","pluginTsName","getOperationParameters","operationFileEntry","resolveOperationTypeNames","pluginZodName","resolveZodSchemaNames","pluginClientName","File","path","QueryKey","Client","InfiniteQueryOptions","InfiniteQuery","jsxRendererSync","ast","pluginTsName","operationFileEntry","resolveOperationTypeNames","pluginZodName","resolveZodSchemaNames","pluginClientName","File","path","MutationKey","Client","Mutation","jsxRendererSync","ast","pluginTsName","operationFileEntry","resolveOperationTypeNames","pluginZodName","resolveZodSchemaNames","pluginClientName","File","path","QueryKey","Client","QueryOptions","Query"],"sources":["../src/generators/infiniteQueryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/queryGenerator.tsx"],"sourcesContent":["import path from 'node:path'\nimport { getOperationParameters, operationFileEntry, resolveOperationTypeNames } from '@internals/shared'\nimport { resolveZodSchemaNames } from '@internals/tanstack-query'\nimport { ast, defineGenerator } from '@kubb/core'\nimport { Client, pluginClientName } from '@kubb/plugin-client'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, jsxRendererSync } from '@kubb/renderer-jsx'\nimport { difference } from 'remeda'\nimport { InfiniteQuery, InfiniteQueryOptions, QueryKey } from '../components'\nimport type { PluginVueQuery } from '../types'\n\n/**\n * Built-in generator for `useInfiniteQuery` composables. Enabled when\n * `pluginVueQuery({ infinite: { ... } })`. Emits one `useFooInfiniteQuery`\n * composable per query operation, wiring the configured cursor path into\n * TanStack Query's cursor-based pagination.\n */\nexport const infiniteQueryGenerator = defineGenerator<PluginVueQuery>({\n name: 'vue-query-infinite',\n renderer: jsxRendererSync,\n operation(node, ctx) {\n if (!ast.isHttpOperationNode(node)) return null\n const { config, driver, resolver, root } = ctx\n const { output, query, mutation, infinite, paramsCasing, paramsType, pathParamsType, parser, client: clientOptions, group } = ctx.options\n\n const pluginTs = driver.getPlugin(pluginTsName)\n if (!pluginTs) return null\n const tsResolver = driver.getResolver(pluginTsName)\n\n const isQuery = query === false || (!!query && query.methods.some((method) => node.method.toLowerCase() === method.toLowerCase()))\n const isMutation =\n mutation !== false &&\n !isQuery &&\n difference(mutation ? mutation.methods : [], query ? query.methods : []).some((method) => node.method.toLowerCase() === method.toLowerCase())\n const infiniteOptions = infinite && typeof infinite === 'object' ? infinite : null\n\n if (!isQuery || isMutation || !infiniteOptions) return null\n\n // Validate queryParam exists in operation's query parameters\n const normalizeKey = (key: string) => key.replace(/\\?$/, '')\n const queryParamKeys = getOperationParameters(node).query.map((p) => p.name)\n const hasQueryParam = infiniteOptions.queryParam ? queryParamKeys.some((k) => normalizeKey(k) === infiniteOptions.queryParam) : false\n // cursorParam validation against response schema keys is skipped in v5 (complex schema inspection)\n const hasCursorParam = !infiniteOptions.cursorParam || true\n\n if (!hasQueryParam || !hasCursorParam) return null\n\n const importPath = query ? query.importPath : '@tanstack/vue-query'\n\n const queryName = resolver.resolveInfiniteQueryName(node)\n const queryOptionsName = resolver.resolveInfiniteQueryOptionsName(node)\n const queryKeyName = resolver.resolveInfiniteQueryKeyName(node)\n const queryKeyTypeName = resolver.resolveInfiniteQueryKeyTypeName(node)\n const clientBaseName = resolver.resolveInfiniteClientName(node)\n\n const meta = {\n file: resolver.resolveFile(operationFileEntry(node, queryName), { root, output, group: group ?? undefined }),\n fileTs: tsResolver.resolveFile(operationFileEntry(node, node.operationId), {\n root,\n output: pluginTs.options?.output ?? output,\n group: pluginTs.options?.group ?? undefined,\n }),\n }\n\n const importedTypeNames = resolveOperationTypeNames(node, tsResolver, {\n paramsCasing,\n exclude: [queryKeyTypeName],\n order: 'body-response-first',\n })\n\n const pluginZod = parser === 'zod' ? driver.getPlugin(pluginZodName) : null\n const zodResolver = pluginZod ? driver.getResolver(pluginZodName) : null\n const fileZod = zodResolver\n ? zodResolver.resolveFile(operationFileEntry(node, node.operationId), {\n root,\n output: pluginZod?.options?.output ?? output,\n group: pluginZod?.options?.group ?? undefined,\n })\n : null\n const zodSchemaNames = resolveZodSchemaNames(node, zodResolver)\n\n const clientPlugin = driver.getPlugin(pluginClientName)\n const hasClientPlugin = clientPlugin?.name === pluginClientName\n const shouldUseClientPlugin = hasClientPlugin && clientOptions.clientType !== 'class'\n const clientResolver = shouldUseClientPlugin ? driver.getResolver(pluginClientName) : null\n\n const clientFile = shouldUseClientPlugin\n ? clientResolver?.resolveFile(operationFileEntry(node, node.operationId), {\n root,\n output: clientPlugin?.options?.output ?? output,\n group: clientPlugin?.options?.group ?? undefined,\n })\n : null\n\n const resolvedClientName = shouldUseClientPlugin ? (clientResolver?.resolveName(node.operationId) ?? clientBaseName) : clientBaseName\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n footer={resolver.resolveFooter(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n >\n {fileZod && zodSchemaNames.length > 0 && <File.Import name={zodSchemaNames} root={meta.file.path} path={fileZod.path} />}\n {clientOptions.importPath ? (\n <>\n {!shouldUseClientPlugin && <File.Import name={'client'} path={clientOptions.importPath} />}\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={clientOptions.importPath} isTypeOnly />\n {clientOptions.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={clientOptions.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n {!shouldUseClientPlugin && <File.Import name={['client']} root={meta.file.path} path={path.resolve(root, '.kubb/client.ts')} />}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={meta.file.path}\n path={path.resolve(root, '.kubb/client.ts')}\n isTypeOnly\n />\n {clientOptions.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={meta.file.path} path={path.resolve(root, '.kubb/client.ts')} isTypeOnly />\n )}\n </>\n )}\n <File.Import name={['toValue']} path=\"vue\" />\n <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n {shouldUseClientPlugin && clientFile && <File.Import name={[resolvedClientName]} root={meta.file.path} path={clientFile.path} />}\n {!shouldUseClientPlugin && <File.Import name={['buildFormData']} root={meta.file.path} path={path.resolve(root, '.kubb/config.ts')} />}\n {meta.fileTs && importedTypeNames.length > 0 && (\n <File.Import name={Array.from(new Set(importedTypeNames))} root={meta.file.path} path={meta.fileTs.path} isTypeOnly />\n )}\n\n <QueryKey\n name={queryKeyName}\n typeName={queryKeyTypeName}\n node={node}\n tsResolver={tsResolver}\n pathParamsType={pathParamsType}\n paramsCasing={paramsCasing}\n transformer={ctx.options.queryKey}\n />\n\n {!shouldUseClientPlugin && (\n <Client\n name={resolvedClientName}\n baseURL={clientOptions.baseURL}\n dataReturnType={clientOptions.dataReturnType || 'data'}\n paramsCasing={clientOptions.paramsCasing || paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n parser={parser}\n node={node}\n tsResolver={tsResolver}\n zodResolver={zodResolver}\n />\n )}\n\n <File.Import name={['InfiniteData']} isTypeOnly path={importPath} />\n <File.Import name={['infiniteQueryOptions']} path={importPath} />\n\n <InfiniteQueryOptions\n name={queryOptionsName}\n clientName={resolvedClientName}\n queryKeyName={queryKeyName}\n node={node}\n tsResolver={tsResolver}\n paramsCasing={paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n dataReturnType={clientOptions.dataReturnType || 'data'}\n cursorParam={infiniteOptions.cursorParam}\n nextParam={infiniteOptions.nextParam}\n previousParam={infiniteOptions.previousParam}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n\n <File.Import name={['useInfiniteQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'UseInfiniteQueryOptions', 'UseInfiniteQueryReturnType']} path={importPath} isTypeOnly />\n\n <InfiniteQuery\n name={queryName}\n queryOptionsName={queryOptionsName}\n queryKeyName={queryKeyName}\n queryKeyTypeName={queryKeyTypeName}\n node={node}\n tsResolver={tsResolver}\n paramsCasing={paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n dataReturnType={clientOptions.dataReturnType || 'data'}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { operationFileEntry, resolveOperationTypeNames } from '@internals/shared'\nimport { resolveZodSchemaNames } from '@internals/tanstack-query'\nimport { ast, defineGenerator } from '@kubb/core'\nimport { Client, pluginClientName } from '@kubb/plugin-client'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, jsxRendererSync } from '@kubb/renderer-jsx'\nimport { difference } from 'remeda'\nimport { Mutation, MutationKey } from '../components'\nimport type { PluginVueQuery } from '../types'\n\n/**\n * Built-in generator for `useMutation` composables. Emits one\n * `useFooMutation` composable per POST/PUT/DELETE operation (configurable\n * via `mutation.methods`) plus the matching `fooMutationKey` helper.\n */\nexport const mutationGenerator = defineGenerator<PluginVueQuery>({\n name: 'vue-query-mutation',\n renderer: jsxRendererSync,\n operation(node, ctx) {\n if (!ast.isHttpOperationNode(node)) return null\n const { config, driver, resolver, root } = ctx\n const { output, query, mutation, paramsCasing, paramsType, pathParamsType, parser, client: clientOptions, group } = ctx.options\n\n const pluginTs = driver.getPlugin(pluginTsName)\n if (!pluginTs) return null\n const tsResolver = driver.getResolver(pluginTsName)\n\n const isQuery = query === false || (!!query && query.methods.some((method) => node.method.toLowerCase() === method.toLowerCase()))\n const isMutation =\n mutation !== false &&\n !isQuery &&\n difference(mutation ? mutation.methods : [], query ? query.methods : []).some((method) => node.method.toLowerCase() === method.toLowerCase())\n\n if (!isMutation) return null\n\n const importPath = mutation ? mutation.importPath : '@tanstack/vue-query'\n\n const mutationHookName = resolver.resolveMutationName(node)\n const mutationTypeName = resolver.resolveMutationTypeName(node)\n const mutationKeyName = resolver.resolveMutationKeyName(node)\n const clientName = resolver.resolveClientName(node)\n\n const meta = {\n file: resolver.resolveFile(operationFileEntry(node, mutationHookName), { root, output, group: group ?? undefined }),\n fileTs: tsResolver.resolveFile(operationFileEntry(node, node.operationId), {\n root,\n output: pluginTs.options?.output ?? output,\n group: pluginTs.options?.group ?? undefined,\n }),\n }\n\n const importedTypeNames = resolveOperationTypeNames(node, tsResolver, { paramsCasing, order: 'body-response-first' })\n\n const pluginZod = parser === 'zod' ? driver.getPlugin(pluginZodName) : null\n const zodResolver = pluginZod ? driver.getResolver(pluginZodName) : null\n const fileZod = zodResolver\n ? zodResolver.resolveFile(operationFileEntry(node, node.operationId), {\n root,\n output: pluginZod?.options?.output ?? output,\n group: pluginZod?.options?.group ?? undefined,\n })\n : null\n const zodSchemaNames = resolveZodSchemaNames(node, zodResolver)\n\n const clientPlugin = driver.getPlugin(pluginClientName)\n const hasClientPlugin = clientPlugin?.name === pluginClientName\n const shouldUseClientPlugin = hasClientPlugin && clientOptions.clientType !== 'class'\n const clientResolver = shouldUseClientPlugin ? driver.getResolver(pluginClientName) : null\n\n const clientFile = shouldUseClientPlugin\n ? clientResolver?.resolveFile(operationFileEntry(node, node.operationId), {\n root,\n output: clientPlugin?.options?.output ?? output,\n group: clientPlugin?.options?.group ?? undefined,\n })\n : null\n\n const resolvedClientName = shouldUseClientPlugin ? (clientResolver?.resolveName(node.operationId) ?? clientName) : clientName\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n footer={resolver.resolveFooter(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n >\n {fileZod && zodSchemaNames.length > 0 && <File.Import name={zodSchemaNames} root={meta.file.path} path={fileZod.path} />}\n {clientOptions.importPath ? (\n <>\n {!shouldUseClientPlugin && <File.Import name={'client'} path={clientOptions.importPath} />}\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={clientOptions.importPath} isTypeOnly />\n {clientOptions.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={clientOptions.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n {!shouldUseClientPlugin && <File.Import name={['client']} root={meta.file.path} path={path.resolve(root, '.kubb/client.ts')} />}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={meta.file.path}\n path={path.resolve(root, '.kubb/client.ts')}\n isTypeOnly\n />\n {clientOptions.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={meta.file.path} path={path.resolve(root, '.kubb/client.ts')} isTypeOnly />\n )}\n </>\n )}\n <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n {shouldUseClientPlugin && clientFile && <File.Import name={[resolvedClientName]} root={meta.file.path} path={clientFile.path} />}\n {!shouldUseClientPlugin && node.requestBody?.content?.some((e) => e.contentType === 'multipart/form-data') && (\n <File.Import name={['buildFormData']} root={meta.file.path} path={path.resolve(root, '.kubb/config.ts')} />\n )}\n {meta.fileTs && importedTypeNames.length > 0 && (\n <File.Import name={Array.from(new Set(importedTypeNames))} root={meta.file.path} path={meta.fileTs.path} isTypeOnly />\n )}\n\n <MutationKey name={mutationKeyName} node={node} pathParamsType={pathParamsType} paramsCasing={paramsCasing} transformer={ctx.options.mutationKey} />\n\n {!shouldUseClientPlugin && (\n <Client\n name={resolvedClientName}\n baseURL={clientOptions.baseURL}\n dataReturnType={clientOptions.dataReturnType || 'data'}\n paramsCasing={clientOptions.paramsCasing || paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n parser={parser}\n node={node}\n tsResolver={tsResolver}\n zodResolver={zodResolver}\n />\n )}\n\n {mutation && (\n <>\n <File.Import name={['useMutation']} path={importPath} />\n <File.Import name={['MutationObserverOptions', 'QueryClient']} path={importPath} isTypeOnly />\n <Mutation\n name={mutationHookName}\n clientName={resolvedClientName}\n typeName={mutationTypeName}\n node={node}\n tsResolver={tsResolver}\n paramsCasing={paramsCasing}\n dataReturnType={clientOptions.dataReturnType || 'data'}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n mutationKeyName={mutationKeyName}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { operationFileEntry, resolveOperationTypeNames } from '@internals/shared'\nimport { resolveZodSchemaNames } from '@internals/tanstack-query'\nimport { ast, defineGenerator } from '@kubb/core'\nimport { Client, pluginClientName } from '@kubb/plugin-client'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, jsxRendererSync } from '@kubb/renderer-jsx'\nimport { difference } from 'remeda'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginVueQuery } from '../types'\n\n/**\n * Built-in generator for `useQuery` composables. Emits one `useFooQuery`\n * composable per GET operation (configurable via `query.methods`) plus the\n * matching `fooQueryKey` / `fooQueryOptions` helpers.\n */\nexport const queryGenerator = defineGenerator<PluginVueQuery>({\n name: 'vue-query',\n renderer: jsxRendererSync,\n operation(node, ctx) {\n if (!ast.isHttpOperationNode(node)) return null\n const { config, driver, resolver, root } = ctx\n const { output, query, mutation, paramsCasing, paramsType, pathParamsType, parser, client: clientOptions, group } = ctx.options\n\n const pluginTs = driver.getPlugin(pluginTsName)\n if (!pluginTs) return null\n const tsResolver = driver.getResolver(pluginTsName)\n\n const isQuery = query === false || (!!query && query.methods.some((method) => node.method.toLowerCase() === method.toLowerCase()))\n const isMutation =\n mutation !== false &&\n !isQuery &&\n difference(mutation ? mutation.methods : [], query ? query.methods : []).some((method) => node.method.toLowerCase() === method.toLowerCase())\n\n if (!isQuery || isMutation) return null\n\n const importPath = query ? query.importPath : '@tanstack/vue-query'\n\n const queryName = resolver.resolveQueryName(node)\n const queryOptionsName = resolver.resolveQueryOptionsName(node)\n const queryKeyName = resolver.resolveQueryKeyName(node)\n const queryKeyTypeName = resolver.resolveQueryKeyTypeName(node)\n const clientName = resolver.resolveClientName(node)\n\n const meta = {\n file: resolver.resolveFile(operationFileEntry(node, queryName), { root, output, group: group ?? undefined }),\n fileTs: tsResolver.resolveFile(operationFileEntry(node, node.operationId), {\n root,\n output: pluginTs.options?.output ?? output,\n group: pluginTs.options?.group ?? undefined,\n }),\n }\n\n const importedTypeNames = resolveOperationTypeNames(node, tsResolver, {\n paramsCasing,\n exclude: [queryKeyTypeName],\n order: 'body-response-first',\n })\n\n const pluginZod = parser === 'zod' ? driver.getPlugin(pluginZodName) : null\n const zodResolver = pluginZod ? driver.getResolver(pluginZodName) : null\n const fileZod = zodResolver\n ? zodResolver.resolveFile(operationFileEntry(node, node.operationId), {\n root,\n output: pluginZod?.options?.output ?? output,\n group: pluginZod?.options?.group ?? undefined,\n })\n : null\n const zodSchemaNames = resolveZodSchemaNames(node, zodResolver)\n\n const clientPlugin = driver.getPlugin(pluginClientName)\n const hasClientPlugin = clientPlugin?.name === pluginClientName\n const shouldUseClientPlugin = hasClientPlugin && clientOptions.clientType !== 'class'\n const clientResolver = shouldUseClientPlugin ? driver.getResolver(pluginClientName) : null\n\n const clientFile = shouldUseClientPlugin\n ? clientResolver?.resolveFile(operationFileEntry(node, node.operationId), {\n root,\n output: clientPlugin?.options?.output ?? output,\n group: clientPlugin?.options?.group ?? undefined,\n })\n : null\n\n const resolvedClientName = shouldUseClientPlugin ? (clientResolver?.resolveName(node.operationId) ?? clientName) : clientName\n\n return (\n <File\n baseName={meta.file.baseName}\n path={meta.file.path}\n meta={meta.file.meta}\n banner={resolver.resolveBanner(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n footer={resolver.resolveFooter(ctx.meta, { output, config, file: { path: meta.file.path, baseName: meta.file.baseName } })}\n >\n {fileZod && zodSchemaNames.length > 0 && <File.Import name={zodSchemaNames} root={meta.file.path} path={fileZod.path} />}\n {clientOptions.importPath ? (\n <>\n {!shouldUseClientPlugin && <File.Import name={'client'} path={clientOptions.importPath} />}\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={clientOptions.importPath} isTypeOnly />\n {clientOptions.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={clientOptions.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n {!shouldUseClientPlugin && <File.Import name={['client']} root={meta.file.path} path={path.resolve(root, '.kubb/client.ts')} />}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={meta.file.path}\n path={path.resolve(root, '.kubb/client.ts')}\n isTypeOnly\n />\n {clientOptions.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={meta.file.path} path={path.resolve(root, '.kubb/client.ts')} isTypeOnly />\n )}\n </>\n )}\n <File.Import name={['toValue']} path=\"vue\" />\n <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n {shouldUseClientPlugin && clientFile && <File.Import name={[resolvedClientName]} root={meta.file.path} path={clientFile.path} />}\n {!shouldUseClientPlugin && <File.Import name={['buildFormData']} root={meta.file.path} path={path.resolve(root, '.kubb/config.ts')} />}\n {meta.fileTs && importedTypeNames.length > 0 && (\n <File.Import name={Array.from(new Set(importedTypeNames))} root={meta.file.path} path={meta.fileTs.path} isTypeOnly />\n )}\n\n <QueryKey\n name={queryKeyName}\n typeName={queryKeyTypeName}\n node={node}\n tsResolver={tsResolver}\n pathParamsType={pathParamsType}\n paramsCasing={paramsCasing}\n transformer={ctx.options.queryKey}\n />\n\n {!shouldUseClientPlugin && (\n <Client\n name={resolvedClientName}\n baseURL={clientOptions.baseURL}\n dataReturnType={clientOptions.dataReturnType || 'data'}\n paramsCasing={clientOptions.paramsCasing || paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n parser={parser}\n node={node}\n tsResolver={tsResolver}\n zodResolver={zodResolver}\n />\n )}\n\n <File.Import name={['queryOptions']} path={importPath} />\n\n <QueryOptions\n name={queryOptionsName}\n clientName={resolvedClientName}\n queryKeyName={queryKeyName}\n node={node}\n tsResolver={tsResolver}\n paramsCasing={paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n dataReturnType={clientOptions.dataReturnType || 'data'}\n />\n\n {query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'UseQueryOptions', 'UseQueryReturnType']} path={importPath} isTypeOnly />\n <Query\n name={queryName}\n queryOptionsName={queryOptionsName}\n queryKeyName={queryKeyName}\n queryKeyTypeName={queryKeyTypeName}\n node={node}\n tsResolver={tsResolver}\n paramsCasing={paramsCasing}\n paramsType={paramsType}\n pathParamsType={pathParamsType}\n dataReturnType={clientOptions.dataReturnType || 'data'}\n />\n </>\n )}\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;AAkBA,MAAa,0BAAA,GAAA,WAAA,iBAAyD;CACpE,MAAM;CACN,UAAUA,mBAAAA;CACV,UAAU,MAAM,KAAK;EACnB,IAAI,CAACC,WAAAA,IAAI,oBAAoB,KAAK,EAAE,OAAO;EAC3C,MAAM,EAAE,QAAQ,QAAQ,UAAU,SAAS;EAC3C,MAAM,EAAE,QAAQ,OAAO,UAAU,UAAU,cAAc,YAAY,gBAAgB,QAAQ,QAAQ,eAAe,UAAU,IAAI;EAElI,MAAM,WAAW,OAAO,UAAUC,gBAAAA,aAAa;EAC/C,IAAI,CAAC,UAAU,OAAO;EACtB,MAAM,aAAa,OAAO,YAAYA,gBAAAA,aAAa;EAEnD,MAAM,UAAU,UAAU,SAAU,CAAC,CAAC,SAAS,MAAM,QAAQ,MAAM,WAAW,KAAK,OAAO,aAAa,KAAK,OAAO,aAAa,CAAC;EACjI,MAAM,aACJ,aAAa,SACb,CAAC,YAAA,GAAA,OAAA,YACU,WAAW,SAAS,UAAU,EAAE,EAAE,QAAQ,MAAM,UAAU,EAAE,CAAC,CAAC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e;OAAmB;OAAqB;MAAE,MAAM;MAAY,YAAA;MAAa,CAAA;KACxH,iBAAA,GAAA,+BAAA,KAACK,mBAAAA,OAAD;MACE,MAAM;MACY;MACJ;MACI;MACZ;MACM;MACE;MACF;MACI;MAChB,gBAAgB,cAAc,kBAAkB;MAChD,CAAA;KACD,EAAA,CAAA;IAEA;;;CAGZ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_generators = require("./generators-C4gs_P1i.cjs");
2
+ const require_generators = require("./generators-QHQkbNnm.cjs");
3
3
  exports.infiniteQueryGenerator = require_generators.infiniteQueryGenerator;
4
4
  exports.mutationGenerator = require_generators.mutationGenerator;
5
5
  exports.queryGenerator = require_generators.queryGenerator;
@@ -1,14 +1,30 @@
1
1
  import { t as __name } from "./chunk--u3MIqq1.js";
2
- import { r as PluginVueQuery } from "./types-nVDTfuS1.js";
2
+ import { r as PluginVueQuery } from "./types-D-LjzI_Q.js";
3
3
  import * as _$_kubb_core0 from "@kubb/core";
4
4
 
5
5
  //#region src/generators/infiniteQueryGenerator.d.ts
6
+ /**
7
+ * Built-in generator for `useInfiniteQuery` composables. Enabled when
8
+ * `pluginVueQuery({ infinite: { ... } })`. Emits one `useFooInfiniteQuery`
9
+ * composable per query operation, wiring the configured cursor path into
10
+ * TanStack Query's cursor-based pagination.
11
+ */
6
12
  declare const infiniteQueryGenerator: _$_kubb_core0.Generator<PluginVueQuery, unknown>;
7
13
  //#endregion
8
14
  //#region src/generators/mutationGenerator.d.ts
15
+ /**
16
+ * Built-in generator for `useMutation` composables. Emits one
17
+ * `useFooMutation` composable per POST/PUT/DELETE operation (configurable
18
+ * via `mutation.methods`) plus the matching `fooMutationKey` helper.
19
+ */
9
20
  declare const mutationGenerator: _$_kubb_core0.Generator<PluginVueQuery, unknown>;
10
21
  //#endregion
11
22
  //#region src/generators/queryGenerator.d.ts
23
+ /**
24
+ * Built-in generator for `useQuery` composables. Emits one `useFooQuery`
25
+ * composable per GET operation (configurable via `query.methods`) plus the
26
+ * matching `fooQueryKey` / `fooQueryOptions` helpers.
27
+ */
12
28
  declare const queryGenerator: _$_kubb_core0.Generator<PluginVueQuery, unknown>;
13
29
  //#endregion
14
30
  export { infiniteQueryGenerator, mutationGenerator, queryGenerator };
@@ -1,2 +1,2 @@
1
- import { n as mutationGenerator, r as infiniteQueryGenerator, t as queryGenerator } from "./generators-CbnIVBgY.js";
1
+ import { n as mutationGenerator, r as infiniteQueryGenerator, t as queryGenerator } from "./generators-C-3isXzW.js";
2
2
  export { infiniteQueryGenerator, mutationGenerator, queryGenerator };
package/dist/index.cjs CHANGED
@@ -2,8 +2,8 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_components = require("./components-qfOFRSoM.cjs");
6
- const require_generators = require("./generators-C4gs_P1i.cjs");
5
+ const require_components = require("./components-B6lPYyOP.cjs");
6
+ const require_generators = require("./generators-QHQkbNnm.cjs");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_components.__toESM(node_path, 1);
9
9
  let _kubb_core = require("@kubb/core");
@@ -13,48 +13,162 @@ let _kubb_plugin_client_templates_clients_fetch_source = require("@kubb/plugin-c
13
13
  let _kubb_plugin_client_templates_config_source = require("@kubb/plugin-client/templates/config.source");
14
14
  let _kubb_plugin_ts = require("@kubb/plugin-ts");
15
15
  let _kubb_plugin_zod = require("@kubb/plugin-zod");
16
+ //#region ../../internals/shared/src/group.ts
17
+ /**
18
+ * Builds the `group` config a Kubb plugin passes to `ctx.setOptions`, applying the
19
+ * shared default naming so every plugin groups output consistently:
20
+ *
21
+ * - `path` groups use the second path segment (`/pet/findByStatus` → `pet`).
22
+ * - other groups use `${camelCase(group)}${suffix}` (e.g. `petController`).
23
+ *
24
+ * Returns `null` when grouping is disabled, matching the per-plugin convention.
25
+ *
26
+ * @param group - The user-supplied group option, or `undefined` to disable grouping.
27
+ * @param options.suffix - Appended to non-`path` group names, e.g. `'Controller'` or `'Requests'`.
28
+ * @param options.honorName - When `true`, a user-provided `group.name` overrides the default namer.
29
+ *
30
+ * @example
31
+ * ```ts
32
+ * createGroupConfig(group, { suffix: 'Controller' }) // plugin-ts, plugin-zod
33
+ * createGroupConfig(group, { suffix: 'Controller', honorName: true }) // plugin-faker, plugin-client, …
34
+ * createGroupConfig(group, { suffix: 'Requests', honorName: true }) // plugin-cypress, plugin-mcp
35
+ * ```
36
+ */
37
+ function createGroupConfig(group, options) {
38
+ if (!group) return null;
39
+ const defaultName = (ctx) => {
40
+ if (group.type === "path") return `${ctx.group.split("/")[1]}`;
41
+ return `${require_components.camelCase(ctx.group)}${options.suffix}`;
42
+ };
43
+ return {
44
+ ...group,
45
+ name: options.honorName && group.name ? group.name : defaultName
46
+ };
47
+ }
48
+ //#endregion
16
49
  //#region src/resolvers/resolverVueQuery.ts
50
+ function capitalize(name) {
51
+ return `${name.charAt(0).toUpperCase()}${name.slice(1)}`;
52
+ }
17
53
  /**
18
- * Naming convention resolver for Vue Query plugin.
54
+ * Default resolver used by `@kubb/plugin-vue-query`. Decides the names and
55
+ * file paths for every generated TanStack Query composable (`useFooQuery`,
56
+ * `useFooMutation`, `useFooInfiniteQuery`) and its companion helpers.
57
+ *
58
+ * Functions and files use camelCase; composables get the `use` prefix.
59
+ *
60
+ * @example Resolve composable and helper names
61
+ * ```ts
62
+ * import { resolverVueQuery } from '@kubb/plugin-vue-query'
19
63
  *
20
- * Provides default naming helpers using camelCase for functions and file paths.
64
+ * resolverVueQuery.resolveQueryName(operationNode) // 'useGetPetById'
65
+ * resolverVueQuery.resolveQueryKeyName(operationNode) // 'getPetByIdQueryKey'
66
+ * resolverVueQuery.resolveQueryOptionsName(operationNode) // 'getPetByIdQueryOptions'
67
+ * ```
21
68
  */
22
- const resolverVueQuery = (0, _kubb_core.defineResolver)((ctx) => ({
69
+ const resolverVueQuery = (0, _kubb_core.defineResolver)(() => ({
23
70
  name: "default",
24
71
  pluginName: "plugin-vue-query",
25
72
  default(name, type) {
26
73
  return require_components.camelCase(name, { isFile: type === "file" });
27
74
  },
28
75
  resolveName(name) {
29
- return ctx.default(name, "function");
76
+ return this.default(name, "function");
77
+ },
78
+ resolvePathName(name, type) {
79
+ return this.default(name, type);
80
+ },
81
+ resolveQueryName(node) {
82
+ return `use${capitalize(this.resolveName(node.operationId))}`;
83
+ },
84
+ resolveInfiniteQueryName(node) {
85
+ return `use${capitalize(this.resolveName(node.operationId))}Infinite`;
86
+ },
87
+ resolveMutationName(node) {
88
+ return `use${capitalize(this.resolveName(node.operationId))}`;
89
+ },
90
+ resolveQueryOptionsName(node) {
91
+ return `${this.resolveName(node.operationId)}QueryOptions`;
92
+ },
93
+ resolveInfiniteQueryOptionsName(node) {
94
+ return `${this.resolveName(node.operationId)}InfiniteQueryOptions`;
95
+ },
96
+ resolveQueryKeyName(node) {
97
+ return `${this.resolveName(node.operationId)}QueryKey`;
98
+ },
99
+ resolveInfiniteQueryKeyName(node) {
100
+ return `${this.resolveName(node.operationId)}InfiniteQueryKey`;
101
+ },
102
+ resolveMutationKeyName(node) {
103
+ return `${this.resolveName(node.operationId)}MutationKey`;
104
+ },
105
+ resolveQueryKeyTypeName(node) {
106
+ return `${capitalize(this.resolveName(node.operationId))}QueryKey`;
107
+ },
108
+ resolveInfiniteQueryKeyTypeName(node) {
109
+ return `${capitalize(this.resolveName(node.operationId))}InfiniteQueryKey`;
110
+ },
111
+ resolveMutationTypeName(node) {
112
+ return capitalize(this.resolveName(node.operationId));
113
+ },
114
+ resolveClientName(node) {
115
+ return this.resolveName(node.operationId);
116
+ },
117
+ resolveInfiniteClientName(node) {
118
+ return `${this.resolveName(node.operationId)}Infinite`;
30
119
  }
31
120
  }));
32
121
  //#endregion
33
122
  //#region src/plugin.ts
123
+ /**
124
+ * Canonical plugin name for `@kubb/plugin-vue-query`. Used for driver lookups
125
+ * and cross-plugin dependency references.
126
+ */
34
127
  const pluginVueQueryName = "plugin-vue-query";
128
+ /**
129
+ * Generates one TanStack Query composable per OpenAPI operation for Vue's
130
+ * Composition API. Queries become `useFooQuery` (and optionally
131
+ * `useFooInfiniteQuery`); mutations become `useFooMutation`. Each composable
132
+ * is fully typed end to end.
133
+ *
134
+ * @example
135
+ * ```ts
136
+ * import { defineConfig } from 'kubb'
137
+ * import { pluginTs } from '@kubb/plugin-ts'
138
+ * import { pluginVueQuery } from '@kubb/plugin-vue-query'
139
+ *
140
+ * export default defineConfig({
141
+ * input: { path: './petStore.yaml' },
142
+ * output: { path: './src/gen' },
143
+ * plugins: [
144
+ * pluginTs(),
145
+ * pluginVueQuery({
146
+ * output: { path: './hooks' },
147
+ * }),
148
+ * ],
149
+ * })
150
+ * ```
151
+ */
35
152
  const pluginVueQuery = (0, _kubb_core.definePlugin)((options) => {
36
153
  const { output = {
37
154
  path: "hooks",
38
155
  barrelType: "named"
39
- }, group, exclude = [], include, override = [], parser = "client", infinite = false, transformers = {}, paramsType = "inline", pathParamsType = paramsType === "object" ? "object" : options.pathParamsType || "inline", mutation = {}, query = {}, mutationKey = require_components.MutationKey.getTransformer, queryKey = require_components.QueryKey.getTransformer, paramsCasing, client, resolver: userResolver, transformer: userTransformer, generators: userGenerators = [] } = options;
156
+ }, group, exclude = [], include, override = [], parser = false, infinite = false, paramsType = "inline", pathParamsType = paramsType === "object" ? "object" : options.pathParamsType || "inline", mutation = {}, query = {}, mutationKey = require_components.mutationKeyTransformer, queryKey = require_components.queryKeyTransformer, paramsCasing, client, resolver: userResolver, transformer: userTransformer, generators: userGenerators = [] } = options;
40
157
  const clientName = client?.client ?? "axios";
41
158
  const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientName}` : void 0);
42
159
  const selectedGenerators = options.generators ?? [
43
160
  require_generators.queryGenerator,
44
161
  require_generators.infiniteQueryGenerator,
45
162
  require_generators.mutationGenerator
46
- ].filter(Boolean);
47
- const groupConfig = group ? {
48
- ...group,
49
- name: group.name ? group.name : (ctx) => {
50
- if (group.type === "path") return `${ctx.group.split("/")[1]}`;
51
- return `${require_components.camelCase(ctx.group)}Controller`;
52
- }
53
- } : void 0;
163
+ ].filter((generator) => Boolean(generator));
164
+ const groupConfig = createGroupConfig(group, {
165
+ suffix: "Controller",
166
+ honorName: true
167
+ });
54
168
  return {
55
169
  name: pluginVueQueryName,
56
170
  options,
57
- dependencies: [_kubb_plugin_ts.pluginTsName, parser === "zod" ? _kubb_plugin_zod.pluginZodName : void 0].filter(Boolean),
171
+ dependencies: [_kubb_plugin_ts.pluginTsName, parser === "zod" ? _kubb_plugin_zod.pluginZodName : void 0].filter((dependency) => Boolean(dependency)),
58
172
  hooks: { "kubb:plugin:setup"(ctx) {
59
173
  const resolver = userResolver ? {
60
174
  ...resolverVueQuery,
@@ -62,7 +176,6 @@ const pluginVueQuery = (0, _kubb_core.definePlugin)((options) => {
62
176
  } : resolverVueQuery;
63
177
  ctx.setOptions({
64
178
  output,
65
- transformers,
66
179
  client: {
67
180
  bundle: client?.bundle,
68
181
  baseURL: client?.baseURL,
@@ -92,9 +205,9 @@ const pluginVueQuery = (0, _kubb_core.definePlugin)((options) => {
92
205
  infinite: infinite ? {
93
206
  queryParam: "id",
94
207
  initialPageParam: 0,
95
- cursorParam: void 0,
96
- nextParam: void 0,
97
- previousParam: void 0,
208
+ cursorParam: null,
209
+ nextParam: null,
210
+ previousParam: null,
98
211
  ...infinite
99
212
  } : false,
100
213
  parser,
@@ -114,10 +227,10 @@ const pluginVueQuery = (0, _kubb_core.definePlugin)((options) => {
114
227
  const root = node_path.default.resolve(ctx.config.root, ctx.config.output.path);
115
228
  const hasClientPlugin = !!ctx.config.plugins?.some((p) => p.name === _kubb_plugin_client.pluginClientName);
116
229
  if (client?.bundle && !hasClientPlugin && !clientImportPath) ctx.injectFile({
117
- baseName: "fetch.ts",
118
- path: node_path.default.resolve(root, ".kubb/fetch.ts"),
230
+ baseName: "client.ts",
231
+ path: node_path.default.resolve(root, ".kubb/client.ts"),
119
232
  sources: [_kubb_core.ast.createSource({
120
- name: "fetch",
233
+ name: "client",
121
234
  nodes: [_kubb_core.ast.createText(clientName === "fetch" ? _kubb_plugin_client_templates_clients_fetch_source.source : _kubb_plugin_client_templates_clients_axios_source.source)],
122
235
  isExportable: true,
123
236
  isIndexable: true
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["camelCase","MutationKey","QueryKey","queryGenerator","infiniteQueryGenerator","mutationGenerator","camelCase","pluginTsName","pluginZodName","path","pluginClientName","ast","fetchClientSource","axiosClientSource","configSource"],"sources":["../src/resolvers/resolverVueQuery.ts","../src/plugin.ts"],"sourcesContent":["import { camelCase } from '@internals/utils'\nimport { defineResolver } from '@kubb/core'\nimport type { PluginVueQuery } from '../types.ts'\n\n/**\n * Naming convention resolver for Vue Query plugin.\n *\n * Provides default naming helpers using camelCase for functions and file paths.\n */\nexport const resolverVueQuery = defineResolver<PluginVueQuery>((ctx) => ({\n name: 'default',\n pluginName: 'plugin-vue-query',\n default(name, type) {\n return camelCase(name, { isFile: type === 'file' })\n },\n resolveName(name) {\n return ctx.default(name, 'function')\n },\n}))\n","import path from 'node:path'\nimport { camelCase } from '@internals/utils'\nimport { ast, definePlugin, type Group } from '@kubb/core'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { source as axiosClientSource } from '@kubb/plugin-client/templates/clients/axios.source'\nimport { source as fetchClientSource } from '@kubb/plugin-client/templates/clients/fetch.source'\nimport { source as configSource } from '@kubb/plugin-client/templates/config.source'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { MutationKey } from './components/MutationKey.tsx'\nimport { QueryKey } from './components/QueryKey.tsx'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './generators'\nimport { resolverVueQuery } from './resolvers/resolverVueQuery.ts'\nimport type { PluginVueQuery } from './types.ts'\n\nexport const pluginVueQueryName = 'plugin-vue-query' satisfies PluginVueQuery['name']\n\nexport const pluginVueQuery = definePlugin<PluginVueQuery>((options) => {\n const {\n output = { path: 'hooks', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n parser = 'client',\n infinite = false,\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n mutation = {},\n query = {},\n mutationKey = MutationKey.getTransformer,\n queryKey = QueryKey.getTransformer,\n paramsCasing,\n client,\n resolver: userResolver,\n transformer: userTransformer,\n generators: userGenerators = [],\n } = options\n\n const clientName = client?.client ?? 'axios'\n const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientName}` : undefined)\n\n const selectedGenerators = options.generators ?? [queryGenerator, infiniteQueryGenerator, mutationGenerator].filter(Boolean)\n\n const groupConfig = group\n ? ({\n ...group,\n name: group.name\n ? group.name\n : (ctx: { group: string }) => {\n if (group.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n },\n } satisfies Group)\n : undefined\n\n return {\n name: pluginVueQueryName,\n options,\n dependencies: [pluginTsName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n hooks: {\n 'kubb:plugin:setup'(ctx) {\n const resolver = userResolver ? { ...resolverVueQuery, ...userResolver } : resolverVueQuery\n\n ctx.setOptions({\n output,\n transformers,\n client: {\n bundle: client?.bundle,\n baseURL: client?.baseURL,\n client: clientName,\n clientType: client?.clientType ?? 'function',\n importPath: clientImportPath,\n dataReturnType: client?.dataReturnType ?? 'data',\n paramsCasing,\n },\n queryKey,\n query:\n query === false\n ? false\n : {\n importPath: '@tanstack/vue-query',\n methods: ['get'],\n ...query,\n },\n mutationKey,\n mutation:\n mutation === false\n ? false\n : {\n importPath: '@tanstack/vue-query',\n methods: ['post', 'put', 'patch', 'delete'],\n ...mutation,\n },\n infinite: infinite\n ? {\n queryParam: 'id',\n initialPageParam: 0,\n cursorParam: undefined,\n nextParam: undefined,\n previousParam: undefined,\n ...infinite,\n }\n : false,\n parser,\n paramsType,\n pathParamsType,\n paramsCasing,\n group: groupConfig,\n exclude,\n include,\n override,\n resolver,\n })\n ctx.setResolver(resolver)\n if (userTransformer) {\n ctx.setTransformer(userTransformer)\n }\n\n for (const gen of selectedGenerators) {\n ctx.addGenerator(gen)\n }\n for (const gen of userGenerators) {\n ctx.addGenerator(gen)\n }\n\n const root = path.resolve(ctx.config.root, ctx.config.output.path)\n const hasClientPlugin = !!ctx.config.plugins?.some((p) => (p as { name?: string }).name === pluginClientName)\n\n if (client?.bundle && !hasClientPlugin && !clientImportPath) {\n ctx.injectFile({\n baseName: 'fetch.ts',\n path: path.resolve(root, '.kubb/fetch.ts'),\n sources: [\n ast.createSource({\n name: 'fetch',\n nodes: [ast.createText(clientName === 'fetch' ? fetchClientSource : axiosClientSource)],\n isExportable: true,\n isIndexable: true,\n }),\n ],\n })\n }\n\n if (!hasClientPlugin) {\n ctx.injectFile({\n baseName: 'config.ts',\n path: path.resolve(root, '.kubb/config.ts'),\n sources: [\n ast.createSource({\n name: 'config',\n nodes: [ast.createText(configSource)],\n isExportable: false,\n isIndexable: false,\n }),\n ],\n })\n }\n },\n },\n }\n})\n\nexport default pluginVueQuery\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AASA,MAAa,oBAAA,GAAA,WAAA,iBAAmD,SAAS;CACvE,MAAM;CACN,YAAY;CACZ,QAAQ,MAAM,MAAM;AAClB,SAAOA,mBAAAA,UAAU,MAAM,EAAE,QAAQ,SAAS,QAAQ,CAAC;;CAErD,YAAY,MAAM;AAChB,SAAO,IAAI,QAAQ,MAAM,WAAW;;CAEvC,EAAE;;;ACHH,MAAa,qBAAqB;AAElC,MAAa,kBAAA,GAAA,WAAA,eAA+C,YAAY;CACtE,MAAM,EACJ,SAAS;EAAE,MAAM;EAAS,YAAY;EAAS,EAC/C,OACA,UAAU,EAAE,EACZ,SACA,WAAW,EAAE,EACb,SAAS,UACT,WAAW,OACX,eAAe,EAAE,EACjB,aAAa,UACb,iBAAiB,eAAe,WAAW,WAAW,QA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a,KAAA;KACb,WAAW,KAAA;KACX,eAAe,KAAA;KACf,GAAG;KACJ,GACD;IACJ;IACA;IACA;IACA;IACA,OAAO;IACP;IACA;IACA;IACA;IACD,CAAC;AACF,OAAI,YAAY,SAAS;AACzB,OAAI,gBACF,KAAI,eAAe,gBAAgB;AAGrC,QAAK,MAAM,OAAO,mBAChB,KAAI,aAAa,IAAI;AAEvB,QAAK,MAAM,OAAO,eAChB,KAAI,aAAa,IAAI;GAGvB,MAAM,OAAOC,UAAAA,QAAK,QAAQ,IAAI,OAAO,MAAM,IAAI,OAAO,OAAO,KAAK;GAClE,MAAM,kBAAkB,CAAC,CAAC,IAAI,OAAO,SAAS,MAAM,MAAO,EAAwB,SAASC,oBAAAA,iBAAiB;AAE7G,OAAI,QAAQ,UAAU,CAAC,mBAAmB,CAAC,iBACzC,KAAI,WAAW;IACb,UAAU;IACV,MAAMD,UAAAA,QAAK,QAAQ,MAAM,iBAAiB;IAC1C,SAAS,CACPE,WAAAA,IAAI,aAAa;KACf,MAAM;KACN,OAAO,CAACA,WAAAA,IAAI,WAAW,eAAe,UAAUC,mDAAAA,SAAoBC,mDAAAA,OAAkB,CAAC;KACvF,cAAc;KACd,aAAa;KACd,CAAC,CACH;IACF,CAAC;AAGJ,OAAI,CAAC,gBACH,KAAI,WAAW;IACb,UAAU;IACV,MAAMJ,UAAAA,QAAK,QAAQ,MAAM,kBAAkB;IAC3C,SAAS,CACPE,WAAAA,IAAI,aAAa;KACf,MAAM;KACN,OAAO,CAACA,WAAAA,IAAI,WAAWG,4CAAAA,OAAa,CAAC;KACrC,cAAc;KACd,aAAa;KACd,CAAC,CACH;IACF,CAAC;KAGP;EACF;EACD"}
1
+ {"version":3,"file":"index.cjs","names":["camelCase","camelCase","mutationKeyTransformer","queryKeyTransformer","queryGenerator","infiniteQueryGenerator","mutationGenerator","pluginTsName","pluginZodName","path","pluginClientName","ast","fetchClientSource","axiosClientSource","configSource"],"sources":["../../../internals/shared/src/group.ts","../src/resolvers/resolverVueQuery.ts","../src/plugin.ts"],"sourcesContent":["import { camelCase } from '@internals/utils'\nimport type { Group } from '@kubb/core'\n\n/**\n * Builds the `group` config a Kubb plugin passes to `ctx.setOptions`, applying the\n * shared default naming so every plugin groups output consistently:\n *\n * - `path` groups use the second path segment (`/pet/findByStatus` → `pet`).\n * - other groups use `${camelCase(group)}${suffix}` (e.g. `petController`).\n *\n * Returns `null` when grouping is disabled, matching the per-plugin convention.\n *\n * @param group - The user-supplied group option, or `undefined` to disable grouping.\n * @param options.suffix - Appended to non-`path` group names, e.g. `'Controller'` or `'Requests'`.\n * @param options.honorName - When `true`, a user-provided `group.name` overrides the default namer.\n *\n * @example\n * ```ts\n * createGroupConfig(group, { suffix: 'Controller' }) // plugin-ts, plugin-zod\n * createGroupConfig(group, { suffix: 'Controller', honorName: true }) // plugin-faker, plugin-client, …\n * createGroupConfig(group, { suffix: 'Requests', honorName: true }) // plugin-cypress, plugin-mcp\n * ```\n */\nexport function createGroupConfig(group: Group | undefined, options: { suffix: string; honorName?: boolean }): Group | null {\n if (!group) {\n return null\n }\n\n const defaultName = (ctx: { group: string }): string => {\n if (group.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n\n return `${camelCase(ctx.group)}${options.suffix}`\n }\n\n return {\n ...group,\n name: options.honorName && group.name ? group.name : defaultName,\n } satisfies Group\n}\n","import { camelCase } from '@internals/utils'\nimport { defineResolver } from '@kubb/core'\nimport type { PluginVueQuery } from '../types.ts'\n\nfunction capitalize(name: string): string {\n return `${name.charAt(0).toUpperCase()}${name.slice(1)}`\n}\n\n/**\n * Default resolver used by `@kubb/plugin-vue-query`. Decides the names and\n * file paths for every generated TanStack Query composable (`useFooQuery`,\n * `useFooMutation`, `useFooInfiniteQuery`) and its companion helpers.\n *\n * Functions and files use camelCase; composables get the `use` prefix.\n *\n * @example Resolve composable and helper names\n * ```ts\n * import { resolverVueQuery } from '@kubb/plugin-vue-query'\n *\n * resolverVueQuery.resolveQueryName(operationNode) // 'useGetPetById'\n * resolverVueQuery.resolveQueryKeyName(operationNode) // 'getPetByIdQueryKey'\n * resolverVueQuery.resolveQueryOptionsName(operationNode) // 'getPetByIdQueryOptions'\n * ```\n */\nexport const resolverVueQuery = defineResolver<PluginVueQuery>(() => ({\n name: 'default',\n pluginName: 'plugin-vue-query',\n default(name, type) {\n return camelCase(name, { isFile: type === 'file' })\n },\n resolveName(name) {\n return this.default(name, 'function')\n },\n resolvePathName(name, type) {\n return this.default(name, type)\n },\n resolveQueryName(node) {\n return `use${capitalize(this.resolveName(node.operationId))}`\n },\n resolveInfiniteQueryName(node) {\n return `use${capitalize(this.resolveName(node.operationId))}Infinite`\n },\n resolveMutationName(node) {\n return `use${capitalize(this.resolveName(node.operationId))}`\n },\n resolveQueryOptionsName(node) {\n return `${this.resolveName(node.operationId)}QueryOptions`\n },\n resolveInfiniteQueryOptionsName(node) {\n return `${this.resolveName(node.operationId)}InfiniteQueryOptions`\n },\n resolveQueryKeyName(node) {\n return `${this.resolveName(node.operationId)}QueryKey`\n },\n resolveInfiniteQueryKeyName(node) {\n return `${this.resolveName(node.operationId)}InfiniteQueryKey`\n },\n resolveMutationKeyName(node) {\n return `${this.resolveName(node.operationId)}MutationKey`\n },\n resolveQueryKeyTypeName(node) {\n return `${capitalize(this.resolveName(node.operationId))}QueryKey`\n },\n resolveInfiniteQueryKeyTypeName(node) {\n return `${capitalize(this.resolveName(node.operationId))}InfiniteQueryKey`\n },\n resolveMutationTypeName(node) {\n return capitalize(this.resolveName(node.operationId))\n },\n resolveClientName(node) {\n return this.resolveName(node.operationId)\n },\n resolveInfiniteClientName(node) {\n return `${this.resolveName(node.operationId)}Infinite`\n },\n}))\n","import path from 'node:path'\nimport { createGroupConfig } from '@internals/shared'\nimport { ast, definePlugin } from '@kubb/core'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { source as axiosClientSource } from '@kubb/plugin-client/templates/clients/axios.source'\nimport { source as fetchClientSource } from '@kubb/plugin-client/templates/clients/fetch.source'\nimport { source as configSource } from '@kubb/plugin-client/templates/config.source'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { mutationKeyTransformer } from '@internals/tanstack-query'\nimport { queryKeyTransformer } from '@internals/tanstack-query'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './generators'\nimport { resolverVueQuery } from './resolvers/resolverVueQuery.ts'\nimport type { PluginVueQuery } from './types.ts'\n\n/**\n * Canonical plugin name for `@kubb/plugin-vue-query`. Used for driver lookups\n * and cross-plugin dependency references.\n */\nexport const pluginVueQueryName = 'plugin-vue-query' satisfies PluginVueQuery['name']\n\n/**\n * Generates one TanStack Query composable per OpenAPI operation for Vue's\n * Composition API. Queries become `useFooQuery` (and optionally\n * `useFooInfiniteQuery`); mutations become `useFooMutation`. Each composable\n * is fully typed end to end.\n *\n * @example\n * ```ts\n * import { defineConfig } from 'kubb'\n * import { pluginTs } from '@kubb/plugin-ts'\n * import { pluginVueQuery } from '@kubb/plugin-vue-query'\n *\n * export default defineConfig({\n * input: { path: './petStore.yaml' },\n * output: { path: './src/gen' },\n * plugins: [\n * pluginTs(),\n * pluginVueQuery({\n * output: { path: './hooks' },\n * }),\n * ],\n * })\n * ```\n */\nexport const pluginVueQuery = definePlugin<PluginVueQuery>((options) => {\n const {\n output = { path: 'hooks', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n parser = false,\n infinite = false,\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n mutation = {},\n query = {},\n mutationKey = mutationKeyTransformer,\n queryKey = queryKeyTransformer,\n paramsCasing,\n client,\n resolver: userResolver,\n transformer: userTransformer,\n generators: userGenerators = [],\n } = options\n\n const clientName = client?.client ?? 'axios'\n const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientName}` : undefined)\n\n const selectedGenerators =\n options.generators ??\n [queryGenerator, infiniteQueryGenerator, mutationGenerator].filter((generator): generator is NonNullable<typeof generator> => Boolean(generator))\n\n const groupConfig = createGroupConfig(group, { suffix: 'Controller', honorName: true })\n\n return {\n name: pluginVueQueryName,\n options,\n dependencies: [pluginTsName, parser === 'zod' ? pluginZodName : undefined].filter((dependency): dependency is string => Boolean(dependency)),\n hooks: {\n 'kubb:plugin:setup'(ctx) {\n const resolver = userResolver ? { ...resolverVueQuery, ...userResolver } : resolverVueQuery\n\n ctx.setOptions({\n output,\n client: {\n bundle: client?.bundle,\n baseURL: client?.baseURL,\n client: clientName,\n clientType: client?.clientType ?? 'function',\n importPath: clientImportPath,\n dataReturnType: client?.dataReturnType ?? 'data',\n paramsCasing,\n },\n queryKey,\n query:\n query === false\n ? false\n : {\n importPath: '@tanstack/vue-query',\n methods: ['get'],\n ...query,\n },\n mutationKey,\n mutation:\n mutation === false\n ? false\n : {\n importPath: '@tanstack/vue-query',\n methods: ['post', 'put', 'patch', 'delete'],\n ...mutation,\n },\n infinite: infinite\n ? {\n queryParam: 'id',\n initialPageParam: 0,\n cursorParam: null,\n nextParam: null,\n previousParam: null,\n ...infinite,\n }\n : false,\n parser,\n paramsType,\n pathParamsType,\n paramsCasing,\n group: groupConfig,\n exclude,\n include,\n override,\n resolver,\n })\n ctx.setResolver(resolver)\n if (userTransformer) {\n ctx.setTransformer(userTransformer)\n }\n\n for (const gen of selectedGenerators) {\n ctx.addGenerator(gen)\n }\n for (const gen of userGenerators) {\n ctx.addGenerator(gen)\n }\n\n const root = path.resolve(ctx.config.root, ctx.config.output.path)\n const hasClientPlugin = !!ctx.config.plugins?.some((p) => (p as { name?: string }).name === pluginClientName)\n\n if (client?.bundle && !hasClientPlugin && !clientImportPath) {\n ctx.injectFile({\n baseName: 'client.ts',\n path: path.resolve(root, '.kubb/client.ts'),\n sources: [\n ast.createSource({\n name: 'client',\n nodes: [ast.createText(clientName === 'fetch' ? fetchClientSource : axiosClientSource)],\n isExportable: true,\n isIndexable: true,\n }),\n ],\n })\n }\n\n if (!hasClientPlugin) {\n ctx.injectFile({\n baseName: 'config.ts',\n path: path.resolve(root, '.kubb/config.ts'),\n sources: [\n ast.createSource({\n name: 'config',\n nodes: [ast.createText(configSource)],\n isExportable: false,\n isIndexable: false,\n }),\n ],\n })\n }\n },\n },\n }\n})\n\nexport default pluginVueQuery\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,SAAgB,kBAAkB,OAA0B,SAAgE;CAC1H,IAAI,CAAC,OACH,OAAO;CAGT,MAAM,eAAe,QAAmC;EACtD,IAAI,MAAM,SAAS,QACjB,OAAO,GAAG,IAAI,MAAM,MAAM,IAAI,CAAC;EAGjC,OAAO,GAAGA,mBAAAA,UAAU,IAAI,MAAM,GAAG,QAAQ;;CAG3C,OAAO;EACL,GAAG;EACH,MAAM,QAAQ,aAAa,MAAM,OAAO,MAAM,OAAO;EACtD;;;;ACnCH,SAAS,WAAW,MAAsB;CACxC,OAAO,GAAG,KAAK,OAAO,EAAE,CAAC,aAAa,GAAG,KAAK,MAAM,EAAE;;;;;;;;;;;;;;;;;;AAmBxD,MAAa,oBAAA,GAAA,WAAA,uBAAyD;CACpE,MAAM;CACN,YAAY;CACZ,QAAQ,MAAM,MAAM;EAClB,OAAOC,mBAAAA,UAAU,MAAM,EAAE,QAAQ,SAAS,QAAQ,CAAC;;CAErD,YAAY,MAAM;EAChB,OAAO,KAAK,QAAQ,MAAM,WAAW;;CAEvC,gBAAgB,MAAM,MAAM;EAC1B,OAAO,KAAK,QAAQ,MAAM,KAAK;;CAEjC,iBAAiB,MAAM;EACrB,OAAO,MAAM,WAAW,KAAK,YAAY,KAAK,YAAY,CAAC;;CAE7D,yBAAyB,MAAM;EAC7B,OAAO,MAAM,WAAW,KAAK,YAAY,KAAK,YAAY,CAAC,CAAC;;CAE9D,oBAAoB,MAAM;EACxB,OAAO,MAAM,WAAW,KAAK,YAAY,KAAK,YAAY,CAAC;;CAE7D,wBAAwB,MAAM;EAC5B,OAAO,GAAG,KAAK,YAAY,K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MAAM,MAAO,EAAwB,SAASC,oBAAAA,iBAAiB;GAE7G,IAAI,QAAQ,UAAU,CAAC,mBAAmB,CAAC,kBACzC,IAAI,WAAW;IACb,UAAU;IACV,MAAMD,UAAAA,QAAK,QAAQ,MAAM,kBAAkB;IAC3C,SAAS,CACPE,WAAAA,IAAI,aAAa;KACf,MAAM;KACN,OAAO,CAACA,WAAAA,IAAI,WAAW,eAAe,UAAUC,mDAAAA,SAAoBC,mDAAAA,OAAkB,CAAC;KACvF,cAAc;KACd,aAAa;KACd,CAAC,CACH;IACF,CAAC;GAGJ,IAAI,CAAC,iBACH,IAAI,WAAW;IACb,UAAU;IACV,MAAMJ,UAAAA,QAAK,QAAQ,MAAM,kBAAkB;IAC3C,SAAS,CACPE,WAAAA,IAAI,aAAa;KACf,MAAM;KACN,OAAO,CAACA,WAAAA,IAAI,WAAWG,4CAAAA,OAAa,CAAC;KACrC,cAAc;KACd,aAAa;KACd,CAAC,CACH;IACF,CAAC;KAGP;EACF;EACD"}
package/dist/index.d.ts CHANGED
@@ -1,9 +1,37 @@
1
1
  import { t as __name } from "./chunk--u3MIqq1.js";
2
- import { n as Options, r as PluginVueQuery } from "./types-nVDTfuS1.js";
2
+ import { n as Options, r as PluginVueQuery } from "./types-D-LjzI_Q.js";
3
3
  import * as _$_kubb_core0 from "@kubb/core";
4
4
 
5
5
  //#region src/plugin.d.ts
6
+ /**
7
+ * Canonical plugin name for `@kubb/plugin-vue-query`. Used for driver lookups
8
+ * and cross-plugin dependency references.
9
+ */
6
10
  declare const pluginVueQueryName = "plugin-vue-query";
11
+ /**
12
+ * Generates one TanStack Query composable per OpenAPI operation for Vue's
13
+ * Composition API. Queries become `useFooQuery` (and optionally
14
+ * `useFooInfiniteQuery`); mutations become `useFooMutation`. Each composable
15
+ * is fully typed end to end.
16
+ *
17
+ * @example
18
+ * ```ts
19
+ * import { defineConfig } from 'kubb'
20
+ * import { pluginTs } from '@kubb/plugin-ts'
21
+ * import { pluginVueQuery } from '@kubb/plugin-vue-query'
22
+ *
23
+ * export default defineConfig({
24
+ * input: { path: './petStore.yaml' },
25
+ * output: { path: './src/gen' },
26
+ * plugins: [
27
+ * pluginTs(),
28
+ * pluginVueQuery({
29
+ * output: { path: './hooks' },
30
+ * }),
31
+ * ],
32
+ * })
33
+ * ```
34
+ */
7
35
  declare const pluginVueQuery: (options?: Options | undefined) => _$_kubb_core0.Plugin<PluginVueQuery>;
8
36
  //#endregion
9
37
  export { type PluginVueQuery, pluginVueQuery as default, pluginVueQuery, pluginVueQueryName };