@kubb/plugin-vue-query 4.11.1 → 4.11.3

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.
@@ -1,4 +1,4 @@
1
- import { c as Operation, i as Transformer, o as OperationSchemas, r as PluginVueQuery, t as Infinite } from "./types-BWI2KEBy.cjs";
1
+ import { c as Operation, i as Transformer, o as OperationSchemas, r as PluginVueQuery, t as Infinite } from "./types-BbcLVl7P.cjs";
2
2
  import { FunctionParams } from "@kubb/react-fabric";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,4 +1,4 @@
1
- import { c as Operation, i as Transformer, o as OperationSchemas, r as PluginVueQuery, t as Infinite } from "./types-Ds-oDlyr.js";
1
+ import { c as Operation, i as Transformer, o as OperationSchemas, r as PluginVueQuery, t as Infinite } from "./types-Bt5VIopi.js";
2
2
  import { FunctionParams } from "@kubb/react-fabric";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,4 +1,4 @@
1
- import { a as ReactGenerator, r as PluginVueQuery } from "./types-BWI2KEBy.cjs";
1
+ import { a as ReactGenerator, r as PluginVueQuery } from "./types-BbcLVl7P.cjs";
2
2
 
3
3
  //#region src/generators/infiniteQueryGenerator.d.ts
4
4
  declare const infiniteQueryGenerator: ReactGenerator<PluginVueQuery>;
@@ -1,4 +1,4 @@
1
- import { a as ReactGenerator, r as PluginVueQuery } from "./types-Ds-oDlyr.js";
1
+ import { a as ReactGenerator, r as PluginVueQuery } from "./types-Bt5VIopi.js";
2
2
 
3
3
  //#region src/generators/infiniteQueryGenerator.d.ts
4
4
  declare const infiniteQueryGenerator: ReactGenerator<PluginVueQuery>;
package/dist/index.cjs CHANGED
@@ -126,6 +126,7 @@ const pluginVueQuery = (0, __kubb_core.definePlugin)((options) => {
126
126
  fabric: this.fabric,
127
127
  oas,
128
128
  pluginManager: this.pluginManager,
129
+ logger: this.logger,
129
130
  plugin: this.plugin,
130
131
  contentType,
131
132
  exclude,
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["MutationKey","QueryKey","queryGenerator","infiniteQueryGenerator","mutationGenerator","pluginOasName","pluginTsName","pluginZodName","path","options","groupName: Group['name']","pluginClientName","OperationGenerator"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\nimport { definePlugin, type Group, getBarrelFiles, getMode } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { resolveModuleSource } from '@kubb/core/utils'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { MutationKey, QueryKey } from './components'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './generators'\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,\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n mutation = {},\n query = {},\n paramsCasing,\n mutationKey = MutationKey.getTransformer,\n queryKey = QueryKey.getTransformer,\n generators = [queryGenerator, infiniteQueryGenerator, mutationGenerator].filter(Boolean),\n contentType,\n client,\n } = options\n\n const clientName = client?.client ?? 'axios'\n const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientName}` : undefined)\n\n return {\n name: pluginVueQueryName,\n options: {\n output,\n client: {\n ...options.client,\n client: clientName,\n clientType: client?.clientType ?? 'function',\n dataReturnType: client?.dataReturnType ?? 'data',\n pathParamsType,\n importPath: clientImportPath,\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 queryKey,\n query:\n query === false\n ? false\n : {\n methods: ['get'],\n importPath: '@tanstack/vue-query',\n ...query,\n },\n mutationKey,\n mutation:\n mutation === false\n ? false\n : {\n methods: ['post', 'put', 'patch', 'delete'],\n importPath: '@tanstack/vue-query',\n ...mutation,\n },\n paramsType,\n pathParamsType,\n parser,\n paramsCasing,\n group,\n },\n pre: [pluginOasName, pluginTsName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (group && (options?.group?.path || options?.group?.tag)) {\n const groupName: Group['name'] = group?.name\n ? group.name\n : (ctx) => {\n if (group?.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n }\n\n return path.resolve(\n root,\n output.path,\n groupName({\n group: group.type === 'path' ? options.group.path! : options.group.tag!,\n }),\n baseName,\n )\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n let resolvedName = camelCase(name)\n\n if (type === 'file' || type === 'function') {\n resolvedName = camelCase(name, {\n isFile: type === 'file',\n })\n }\n if (type === 'type') {\n resolvedName = pascalCase(name)\n }\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async install() {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = getMode(path.resolve(root, output.path))\n const oas = await this.getOas()\n const baseURL = await this.getBaseURL()\n\n if (baseURL) {\n this.plugin.options.client.baseURL = baseURL\n }\n\n const hasClientPlugin = !!this.pluginManager.getPluginByKey([pluginClientName])\n\n if (this.plugin.options.client.bundle && !hasClientPlugin && !this.plugin.options.client.importPath) {\n // pre add bundled\n await this.upsertFile({\n baseName: 'fetch.ts',\n path: path.resolve(root, '.kubb/fetch.ts'),\n sources: [\n {\n name: 'fetch',\n value: resolveModuleSource(\n this.plugin.options.client.client === 'fetch' ? '@kubb/plugin-client/templates/clients/fetch' : '@kubb/plugin-client/templates/clients/axios',\n ).source,\n isExportable: true,\n isIndexable: true,\n },\n ],\n })\n }\n\n if (!hasClientPlugin) {\n await this.addFile({\n baseName: 'config.ts',\n path: path.resolve(root, '.kubb/config.ts'),\n sources: [\n {\n name: 'config',\n value: resolveModuleSource('@kubb/plugin-client/templates/config').source,\n isExportable: false,\n isIndexable: false,\n },\n ],\n })\n }\n\n const operationGenerator = new OperationGenerator(this.plugin.options, {\n fabric: this.fabric,\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType,\n exclude,\n include,\n override,\n mode,\n })\n\n const files = await operationGenerator.build(...generators)\n await this.upsertFile(...files)\n\n const barrelFiles = await getBarrelFiles(this.fabric.files, {\n type: output.barrelType ?? 'named',\n root,\n output,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.upsertFile(...barrelFiles)\n },\n }\n})\n"],"mappings":";;;;;;;;;;;;;AAYA,MAAa,qBAAqB;AAElC,MAAa,gDAA+C,YAAY;CACtE,MAAM,EACJ,SAAS;EAAE,MAAM;EAAS,YAAY;EAAS,EAC/C,OACA,UAAU,EAAE,EACZ,SACA,WAAW,EAAE,EACb,SAAS,UACT,UACA,eAAe,EAAE,EACjB,aAAa,UACb,iBAAiB,eAAe,WAAW,WAAW,QAAQ,kBAAkB,UAChF,WAAW,EAAE,EACb,QAAQ,EAAE,EACV,cACA,cAAcA,+BAAY,gBAC1B,WAAWC,4BAAS,gBACpB,aAAa;EAACC;EAAgBC;EAAwBC;EAAkB,CAAC,OAAO,QAAQ,EACxF,aACA,WACE;CAEJ,MAAM,aAAa,QAAQ,UAAU;CACrC,MAAM,mBAAmB,QAAQ,eAAe,CAAC,QAAQ,SA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G,WAAW;AAC3D,SAAM,KAAK,WAAW,GAAG,MAAM;GAE/B,MAAM,cAAc,sCAAqB,KAAK,OAAO,OAAO;IAC1D,MAAM,OAAO,cAAc;IAC3B;IACA;IACA,MAAM,EACJ,WAAW,KAAK,OAAO,KACxB;IACD,QAAQ,KAAK;IACd,CAAC;AAEF,SAAM,KAAK,WAAW,GAAG,YAAY;;EAExC;EACD"}
1
+ {"version":3,"file":"index.cjs","names":["MutationKey","QueryKey","queryGenerator","infiniteQueryGenerator","mutationGenerator","pluginOasName","pluginTsName","pluginZodName","path","options","groupName: Group['name']","pluginClientName","OperationGenerator"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\nimport { definePlugin, type Group, getBarrelFiles, getMode } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { resolveModuleSource } from '@kubb/core/utils'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { MutationKey, QueryKey } from './components'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './generators'\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,\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n mutation = {},\n query = {},\n paramsCasing,\n mutationKey = MutationKey.getTransformer,\n queryKey = QueryKey.getTransformer,\n generators = [queryGenerator, infiniteQueryGenerator, mutationGenerator].filter(Boolean),\n contentType,\n client,\n } = options\n\n const clientName = client?.client ?? 'axios'\n const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientName}` : undefined)\n\n return {\n name: pluginVueQueryName,\n options: {\n output,\n client: {\n ...options.client,\n client: clientName,\n clientType: client?.clientType ?? 'function',\n dataReturnType: client?.dataReturnType ?? 'data',\n pathParamsType,\n importPath: clientImportPath,\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 queryKey,\n query:\n query === false\n ? false\n : {\n methods: ['get'],\n importPath: '@tanstack/vue-query',\n ...query,\n },\n mutationKey,\n mutation:\n mutation === false\n ? false\n : {\n methods: ['post', 'put', 'patch', 'delete'],\n importPath: '@tanstack/vue-query',\n ...mutation,\n },\n paramsType,\n pathParamsType,\n parser,\n paramsCasing,\n group,\n },\n pre: [pluginOasName, pluginTsName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (group && (options?.group?.path || options?.group?.tag)) {\n const groupName: Group['name'] = group?.name\n ? group.name\n : (ctx) => {\n if (group?.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n }\n\n return path.resolve(\n root,\n output.path,\n groupName({\n group: group.type === 'path' ? options.group.path! : options.group.tag!,\n }),\n baseName,\n )\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n let resolvedName = camelCase(name)\n\n if (type === 'file' || type === 'function') {\n resolvedName = camelCase(name, {\n isFile: type === 'file',\n })\n }\n if (type === 'type') {\n resolvedName = pascalCase(name)\n }\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async install() {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = getMode(path.resolve(root, output.path))\n const oas = await this.getOas()\n const baseURL = await this.getBaseURL()\n\n if (baseURL) {\n this.plugin.options.client.baseURL = baseURL\n }\n\n const hasClientPlugin = !!this.pluginManager.getPluginByKey([pluginClientName])\n\n if (this.plugin.options.client.bundle && !hasClientPlugin && !this.plugin.options.client.importPath) {\n // pre add bundled\n await this.upsertFile({\n baseName: 'fetch.ts',\n path: path.resolve(root, '.kubb/fetch.ts'),\n sources: [\n {\n name: 'fetch',\n value: resolveModuleSource(\n this.plugin.options.client.client === 'fetch' ? '@kubb/plugin-client/templates/clients/fetch' : '@kubb/plugin-client/templates/clients/axios',\n ).source,\n isExportable: true,\n isIndexable: true,\n },\n ],\n })\n }\n\n if (!hasClientPlugin) {\n await this.addFile({\n baseName: 'config.ts',\n path: path.resolve(root, '.kubb/config.ts'),\n sources: [\n {\n name: 'config',\n value: resolveModuleSource('@kubb/plugin-client/templates/config').source,\n isExportable: false,\n isIndexable: false,\n },\n ],\n })\n }\n\n const operationGenerator = new OperationGenerator(this.plugin.options, {\n fabric: this.fabric,\n oas,\n pluginManager: this.pluginManager,\n logger: this.logger,\n plugin: this.plugin,\n contentType,\n exclude,\n include,\n override,\n mode,\n })\n\n const files = await operationGenerator.build(...generators)\n await this.upsertFile(...files)\n\n const barrelFiles = await getBarrelFiles(this.fabric.files, {\n type: output.barrelType ?? 'named',\n root,\n output,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.upsertFile(...barrelFiles)\n },\n }\n})\n"],"mappings":";;;;;;;;;;;;;AAYA,MAAa,qBAAqB;AAElC,MAAa,gDAA+C,YAAY;CACtE,MAAM,EACJ,SAAS;EAAE,MAAM;EAAS,YAAY;EAAS,EAC/C,OACA,UAAU,EAAE,EACZ,SACA,WAAW,EAAE,EACb,SAAS,UACT,UACA,eAAe,EAAE,EACjB,aAAa,UACb,iBAAiB,eAAe,WAAW,WAAW,QAAQ,kBAAkB,UAChF,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kDAA2B,uCAAuC,CAAC;KACnE,cAAc;KACd,aAAa;KACd,CACF;IACF,CAAC;GAgBJ,MAAM,QAAQ,MAba,IAAII,qCAAmB,KAAK,OAAO,SAAS;IACrE,QAAQ,KAAK;IACb;IACA,eAAe,KAAK;IACpB,QAAQ,KAAK;IACb,QAAQ,KAAK;IACb;IACA;IACA;IACA;IACA;IACD,CAAC,CAEqC,MAAM,GAAG,WAAW;AAC3D,SAAM,KAAK,WAAW,GAAG,MAAM;GAE/B,MAAM,cAAc,sCAAqB,KAAK,OAAO,OAAO;IAC1D,MAAM,OAAO,cAAc;IAC3B;IACA;IACA,MAAM,EACJ,WAAW,KAAK,OAAO,KACxB;IACD,QAAQ,KAAK;IACd,CAAC;AAEF,SAAM,KAAK,WAAW,GAAG,YAAY;;EAExC;EACD"}
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as Options, r as PluginVueQuery, s as UserPluginWithLifeCycle } from "./types-BWI2KEBy.cjs";
1
+ import { n as Options, r as PluginVueQuery, s as UserPluginWithLifeCycle } from "./types-BbcLVl7P.cjs";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginVueQueryName = "plugin-vue-query";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as Options, r as PluginVueQuery, s as UserPluginWithLifeCycle } from "./types-Ds-oDlyr.js";
1
+ import { n as Options, r as PluginVueQuery, s as UserPluginWithLifeCycle } from "./types-Bt5VIopi.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginVueQueryName = "plugin-vue-query";
package/dist/index.js CHANGED
@@ -125,6 +125,7 @@ const pluginVueQuery = definePlugin((options) => {
125
125
  fabric: this.fabric,
126
126
  oas,
127
127
  pluginManager: this.pluginManager,
128
+ logger: this.logger,
128
129
  plugin: this.plugin,
129
130
  contentType,
130
131
  exclude,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["options","groupName: Group['name']"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\nimport { definePlugin, type Group, getBarrelFiles, getMode } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { resolveModuleSource } from '@kubb/core/utils'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { MutationKey, QueryKey } from './components'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './generators'\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,\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n mutation = {},\n query = {},\n paramsCasing,\n mutationKey = MutationKey.getTransformer,\n queryKey = QueryKey.getTransformer,\n generators = [queryGenerator, infiniteQueryGenerator, mutationGenerator].filter(Boolean),\n contentType,\n client,\n } = options\n\n const clientName = client?.client ?? 'axios'\n const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientName}` : undefined)\n\n return {\n name: pluginVueQueryName,\n options: {\n output,\n client: {\n ...options.client,\n client: clientName,\n clientType: client?.clientType ?? 'function',\n dataReturnType: client?.dataReturnType ?? 'data',\n pathParamsType,\n importPath: clientImportPath,\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 queryKey,\n query:\n query === false\n ? false\n : {\n methods: ['get'],\n importPath: '@tanstack/vue-query',\n ...query,\n },\n mutationKey,\n mutation:\n mutation === false\n ? false\n : {\n methods: ['post', 'put', 'patch', 'delete'],\n importPath: '@tanstack/vue-query',\n ...mutation,\n },\n paramsType,\n pathParamsType,\n parser,\n paramsCasing,\n group,\n },\n pre: [pluginOasName, pluginTsName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (group && (options?.group?.path || options?.group?.tag)) {\n const groupName: Group['name'] = group?.name\n ? group.name\n : (ctx) => {\n if (group?.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n }\n\n return path.resolve(\n root,\n output.path,\n groupName({\n group: group.type === 'path' ? options.group.path! : options.group.tag!,\n }),\n baseName,\n )\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n let resolvedName = camelCase(name)\n\n if (type === 'file' || type === 'function') {\n resolvedName = camelCase(name, {\n isFile: type === 'file',\n })\n }\n if (type === 'type') {\n resolvedName = pascalCase(name)\n }\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async install() {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = getMode(path.resolve(root, output.path))\n const oas = await this.getOas()\n const baseURL = await this.getBaseURL()\n\n if (baseURL) {\n this.plugin.options.client.baseURL = baseURL\n }\n\n const hasClientPlugin = !!this.pluginManager.getPluginByKey([pluginClientName])\n\n if (this.plugin.options.client.bundle && !hasClientPlugin && !this.plugin.options.client.importPath) {\n // pre add bundled\n await this.upsertFile({\n baseName: 'fetch.ts',\n path: path.resolve(root, '.kubb/fetch.ts'),\n sources: [\n {\n name: 'fetch',\n value: resolveModuleSource(\n this.plugin.options.client.client === 'fetch' ? '@kubb/plugin-client/templates/clients/fetch' : '@kubb/plugin-client/templates/clients/axios',\n ).source,\n isExportable: true,\n isIndexable: true,\n },\n ],\n })\n }\n\n if (!hasClientPlugin) {\n await this.addFile({\n baseName: 'config.ts',\n path: path.resolve(root, '.kubb/config.ts'),\n sources: [\n {\n name: 'config',\n value: resolveModuleSource('@kubb/plugin-client/templates/config').source,\n isExportable: false,\n isIndexable: false,\n },\n ],\n })\n }\n\n const operationGenerator = new OperationGenerator(this.plugin.options, {\n fabric: this.fabric,\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType,\n exclude,\n include,\n override,\n mode,\n })\n\n const files = await operationGenerator.build(...generators)\n await this.upsertFile(...files)\n\n const barrelFiles = await getBarrelFiles(this.fabric.files, {\n type: output.barrelType ?? 'named',\n root,\n output,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.upsertFile(...barrelFiles)\n },\n }\n})\n"],"mappings":";;;;;;;;;;;;AAYA,MAAa,qBAAqB;AAElC,MAAa,iBAAiB,cAA8B,YAAY;CACtE,MAAM,EACJ,SAAS;EAAE,MAAM;EAAS,YAAY;EAAS,EAC/C,OACA,UAAU,EAAE,EACZ,SACA,WAAW,EAAE,EACb,SAAS,UACT,UACA,eAAe,EAAE,EACjB,aAAa,UACb,iBAAiB,eAAe,WAAW,WAAW,QAAQ,kBAAkB,UAChF,WAAW,EAAE,EACb,QAAQ,EAAE,EACV,cACA,cAAc,YAAY,gBAC1B,WAAW,SAAS,gBACpB,aAAa;EAAC;EAAgB;EAAwB;EAAkB,CAAC,OAAO,QAAQ,EACxF,aACA,WACE;CAEJ,MAAM,aAAa,QAAQ,UAAU;CACrC,MAAM,mBAAmB,QAAQ,eAAe,CAAC,QAAQ,SAAS,+BAA+B,eAAe;AAEhH,QAAO;EACL,MAAM;EACN,SAAS;GACP;GACA,QAAQ;IACN,GAAG,QAAQ;IACX,QAAQ;IACR,YAAY,QAAQ,cAAc;IAClC,gBAAgB,QAAQ,kBAAkB;IAC1C;IAC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J,WAAW,KAAK,OAAO,KACxB;IACD,QAAQ,KAAK;IACd,CAAC;AAEF,SAAM,KAAK,WAAW,GAAG,YAAY;;EAExC;EACD"}
1
+ {"version":3,"file":"index.js","names":["options","groupName: Group['name']"],"sources":["../src/plugin.ts"],"sourcesContent":["import path from 'node:path'\nimport { definePlugin, type Group, getBarrelFiles, getMode } from '@kubb/core'\nimport { camelCase, pascalCase } from '@kubb/core/transformers'\nimport { resolveModuleSource } from '@kubb/core/utils'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { MutationKey, QueryKey } from './components'\nimport { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './generators'\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,\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n mutation = {},\n query = {},\n paramsCasing,\n mutationKey = MutationKey.getTransformer,\n queryKey = QueryKey.getTransformer,\n generators = [queryGenerator, infiniteQueryGenerator, mutationGenerator].filter(Boolean),\n contentType,\n client,\n } = options\n\n const clientName = client?.client ?? 'axios'\n const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientName}` : undefined)\n\n return {\n name: pluginVueQueryName,\n options: {\n output,\n client: {\n ...options.client,\n client: clientName,\n clientType: client?.clientType ?? 'function',\n dataReturnType: client?.dataReturnType ?? 'data',\n pathParamsType,\n importPath: clientImportPath,\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 queryKey,\n query:\n query === false\n ? false\n : {\n methods: ['get'],\n importPath: '@tanstack/vue-query',\n ...query,\n },\n mutationKey,\n mutation:\n mutation === false\n ? false\n : {\n methods: ['post', 'put', 'patch', 'delete'],\n importPath: '@tanstack/vue-query',\n ...mutation,\n },\n paramsType,\n pathParamsType,\n parser,\n paramsCasing,\n group,\n },\n pre: [pluginOasName, pluginTsName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (group && (options?.group?.path || options?.group?.tag)) {\n const groupName: Group['name'] = group?.name\n ? group.name\n : (ctx) => {\n if (group?.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n }\n\n return path.resolve(\n root,\n output.path,\n groupName({\n group: group.type === 'path' ? options.group.path! : options.group.tag!,\n }),\n baseName,\n )\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n let resolvedName = camelCase(name)\n\n if (type === 'file' || type === 'function') {\n resolvedName = camelCase(name, {\n isFile: type === 'file',\n })\n }\n if (type === 'type') {\n resolvedName = pascalCase(name)\n }\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async install() {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = getMode(path.resolve(root, output.path))\n const oas = await this.getOas()\n const baseURL = await this.getBaseURL()\n\n if (baseURL) {\n this.plugin.options.client.baseURL = baseURL\n }\n\n const hasClientPlugin = !!this.pluginManager.getPluginByKey([pluginClientName])\n\n if (this.plugin.options.client.bundle && !hasClientPlugin && !this.plugin.options.client.importPath) {\n // pre add bundled\n await this.upsertFile({\n baseName: 'fetch.ts',\n path: path.resolve(root, '.kubb/fetch.ts'),\n sources: [\n {\n name: 'fetch',\n value: resolveModuleSource(\n this.plugin.options.client.client === 'fetch' ? '@kubb/plugin-client/templates/clients/fetch' : '@kubb/plugin-client/templates/clients/axios',\n ).source,\n isExportable: true,\n isIndexable: true,\n },\n ],\n })\n }\n\n if (!hasClientPlugin) {\n await this.addFile({\n baseName: 'config.ts',\n path: path.resolve(root, '.kubb/config.ts'),\n sources: [\n {\n name: 'config',\n value: resolveModuleSource('@kubb/plugin-client/templates/config').source,\n isExportable: false,\n isIndexable: false,\n },\n ],\n })\n }\n\n const operationGenerator = new OperationGenerator(this.plugin.options, {\n fabric: this.fabric,\n oas,\n pluginManager: this.pluginManager,\n logger: this.logger,\n plugin: this.plugin,\n contentType,\n exclude,\n include,\n override,\n mode,\n })\n\n const files = await operationGenerator.build(...generators)\n await this.upsertFile(...files)\n\n const barrelFiles = await getBarrelFiles(this.fabric.files, {\n type: output.barrelType ?? 'named',\n root,\n output,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.upsertFile(...barrelFiles)\n },\n }\n})\n"],"mappings":";;;;;;;;;;;;AAYA,MAAa,qBAAqB;AAElC,MAAa,iBAAiB,cAA8B,YAAY;CACtE,MAAM,EACJ,SAAS;EAAE,MAAM;EAAS,YAAY;EAAS,EAC/C,OACA,UAAU,EAAE,EACZ,SACA,WAAW,EAAE,EACb,SAAS,UACT,UACA,eAAe,EAAE,EACjB,aAAa,UACb,iBAAiB,eAAe,WAAW,WAAW,QAAQ,kBAAkB,UAChF,WAAW,EAAE,EACb,QAAQ,EAAE,EACV,cACA,cAAc,YAAY,gBAC1B,WAAW,SAAS,gBACpB,aAAa;EAAC;EAAgB;EAAwB;EAAkB,CAAC,OAAO,QAAQ,EACxF,aACA,WACE;CAEJ,MAAM,aAAa,QAAQ,UAAU;CACrC,MAAM,mBAAmB,QAAQ,eAAe,CAAC,QAAQ,SAA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A;IACA;IACD,CAAC,CAEqC,MAAM,GAAG,WAAW;AAC3D,SAAM,KAAK,WAAW,GAAG,MAAM;GAE/B,MAAM,cAAc,MAAM,eAAe,KAAK,OAAO,OAAO;IAC1D,MAAM,OAAO,cAAc;IAC3B;IACA;IACA,MAAM,EACJ,WAAW,KAAK,OAAO,KACxB;IACD,QAAQ,KAAK;IACd,CAAC;AAEF,SAAM,KAAK,WAAW,GAAG,YAAY;;EAExC;EACD"}
@@ -1,4 +1,3 @@
1
- import { Fabric } from "@kubb/react-fabric";
2
1
  import * as OasTypes from "oas/types";
3
2
  import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
4
3
  import { Operation, Operation as Operation$1 } from "oas/operation";
@@ -6,6 +5,7 @@ import { OpenAPIV3 } from "openapi-types";
6
5
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
7
6
  import BaseOas from "oas";
8
7
  import { KubbFile } from "@kubb/fabric-core/types";
8
+ import { Fabric } from "@kubb/react-fabric";
9
9
  import { ConsolaInstance, LogLevel } from "consola";
10
10
  import { KubbNode } from "@kubb/react-fabric/types";
11
11
 
@@ -73,13 +73,35 @@ type DebugEvent = {
73
73
  date: Date;
74
74
  logs: string[];
75
75
  fileName?: string;
76
+ /**
77
+ * Category of the debug log, used for GitHub Actions grouping
78
+ * - 'setup': Initial configuration and environment setup
79
+ * - 'plugin': Plugin installation and execution
80
+ * - 'hook': Plugin hook execution details
81
+ * - 'schema': Schema parsing and generation
82
+ * - 'file': File operations (read/write/generate)
83
+ * - 'error': Error details and stack traces
84
+ * - undefined: Generic logs (always inline)
85
+ */
86
+ category?: 'setup' | 'plugin' | 'hook' | 'schema' | 'file' | 'error';
87
+ /**
88
+ * Plugin name for grouping plugin-specific logs together
89
+ */
90
+ pluginName?: string;
91
+ /**
92
+ * Indicates if this is the start or end of a plugin's execution
93
+ * - 'start': Start of plugin execution group
94
+ * - 'end': End of plugin execution group
95
+ */
96
+ pluginGroupMarker?: 'start' | 'end';
76
97
  };
77
98
  type Events$1 = {
78
99
  start: [message: string];
79
100
  success: [message: string];
80
- error: [message: string, cause: Error];
101
+ error: [message: string, error: Error];
81
102
  warning: [message: string];
82
103
  debug: [DebugEvent];
104
+ verbose: [DebugEvent];
83
105
  info: [message: string];
84
106
  progress_start: [{
85
107
  id: string;
@@ -103,7 +125,7 @@ type Logger = {
103
125
  consola?: ConsolaInstance;
104
126
  on: EventEmitter<Events$1>['on'];
105
127
  emit: EventEmitter<Events$1>['emit'];
106
- writeLogs: () => Promise<string[]>;
128
+ writeLogs: () => Promise<void>;
107
129
  };
108
130
  //#endregion
109
131
  //#region ../core/src/utils/types.d.ts
@@ -414,14 +436,35 @@ type Group = {
414
436
  //#region ../core/src/PluginManager.d.ts
415
437
  type RequiredPluginLifecycle = Required<PluginLifecycle>;
416
438
  type Strategy = 'hookFirst' | 'hookForPlugin' | 'hookParallel' | 'hookSeq';
417
- type Executer<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
418
- message: string;
439
+ type ExecutingMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
440
+ strategy: Strategy;
441
+ hookName: H;
442
+ plugin: Plugin;
443
+ parameters?: unknown[] | undefined;
444
+ output?: unknown;
445
+ };
446
+ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
447
+ duration: number;
419
448
  strategy: Strategy;
420
449
  hookName: H;
421
450
  plugin: Plugin;
422
451
  parameters?: unknown[] | undefined;
423
452
  output?: unknown;
424
453
  };
454
+ type ErrorMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
455
+ hookName: H;
456
+ duration: number;
457
+ strategy: Strategy;
458
+ parameters?: unknown[] | undefined;
459
+ plugin: Plugin;
460
+ };
461
+ type ProgressStartMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
462
+ hookName: H;
463
+ plugins: Array<Plugin>;
464
+ };
465
+ type ProgressStopMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
466
+ hookName: H;
467
+ };
425
468
  type ParseResult<H extends PluginLifecycleHooks> = RequiredPluginLifecycle[H];
426
469
  type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseResult<H>>> = {
427
470
  result: Result;
@@ -436,9 +479,11 @@ type Options$2 = {
436
479
  concurrency?: number;
437
480
  };
438
481
  type Events = {
439
- executing: [executer: Executer];
440
- executed: [executer: Executer];
441
- error: [error: Error];
482
+ progress_start: [meta: ProgressStartMeta];
483
+ progress_stop: [meta: ProgressStopMeta];
484
+ executing: [meta: ExecutingMeta];
485
+ executed: [meta: ExecutedMeta];
486
+ error: [error: Error, meta: ErrorMeta];
442
487
  };
443
488
  type GetFileProps<TOptions = object> = {
444
489
  name: string;
@@ -451,8 +496,6 @@ declare class PluginManager {
451
496
  #private;
452
497
  readonly events: EventEmitter<Events>;
453
498
  readonly config: Config;
454
- readonly executed: Array<Executer>;
455
- readonly logger: Logger;
456
499
  readonly options: Options$2;
457
500
  constructor(config: Config, options: Options$2);
458
501
  getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
@@ -478,13 +521,11 @@ declare class PluginManager {
478
521
  hookForPlugin<H extends PluginLifecycleHooks>({
479
522
  pluginKey,
480
523
  hookName,
481
- parameters,
482
- message
524
+ parameters
483
525
  }: {
484
526
  pluginKey: Plugin['key'];
485
527
  hookName: H;
486
528
  parameters: PluginParameter<H>;
487
- message: string;
488
529
  }): Promise<Array<ReturnType<ParseResult<H>> | null>>;
489
530
  /**
490
531
  * Run a specific hookName for plugin x.
@@ -492,13 +533,11 @@ declare class PluginManager {
492
533
  hookForPluginSync<H extends PluginLifecycleHooks>({
493
534
  pluginKey,
494
535
  hookName,
495
- parameters,
496
- message
536
+ parameters
497
537
  }: {
498
538
  pluginKey: Plugin['key'];
499
539
  hookName: H;
500
540
  parameters: PluginParameter<H>;
501
- message: string;
502
541
  }): Array<ReturnType<ParseResult<H>>> | null;
503
542
  /**
504
543
  * First non-null result stops and will return it's value.
@@ -506,13 +545,11 @@ declare class PluginManager {
506
545
  hookFirst<H extends PluginLifecycleHooks>({
507
546
  hookName,
508
547
  parameters,
509
- skipped,
510
- message
548
+ skipped
511
549
  }: {
512
550
  hookName: H;
513
551
  parameters: PluginParameter<H>;
514
552
  skipped?: ReadonlySet<Plugin> | null;
515
- message: string;
516
553
  }): Promise<SafeParseResult<H>>;
517
554
  /**
518
555
  * First non-null result stops and will return it's value.
@@ -520,37 +557,31 @@ declare class PluginManager {
520
557
  hookFirstSync<H extends PluginLifecycleHooks>({
521
558
  hookName,
522
559
  parameters,
523
- skipped,
524
- message
560
+ skipped
525
561
  }: {
526
562
  hookName: H;
527
563
  parameters: PluginParameter<H>;
528
564
  skipped?: ReadonlySet<Plugin> | null;
529
- message: string;
530
565
  }): SafeParseResult<H>;
531
566
  /**
532
567
  * Run all plugins in parallel(order will be based on `this.plugin` and if `pre` or `post` is set).
533
568
  */
534
569
  hookParallel<H extends PluginLifecycleHooks, TOuput = void>({
535
570
  hookName,
536
- parameters,
537
- message
571
+ parameters
538
572
  }: {
539
573
  hookName: H;
540
574
  parameters?: Parameters<RequiredPluginLifecycle[H]> | undefined;
541
- message: string;
542
575
  }): Promise<Awaited<TOuput>[]>;
543
576
  /**
544
577
  * Chains plugins
545
578
  */
546
579
  hookSeq<H extends PluginLifecycleHooks>({
547
580
  hookName,
548
- parameters,
549
- message
581
+ parameters
550
582
  }: {
551
583
  hookName: H;
552
584
  parameters?: PluginParameter<H>;
553
- message: string;
554
585
  }): Promise<void>;
555
586
  getPluginByKey(pluginKey: Plugin['key']): Plugin | undefined;
556
587
  getPluginsByKey(hookName: keyof PluginWithLifeCycle, pluginKey: Plugin['key']): Plugin[];
@@ -667,6 +698,7 @@ type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
667
698
  override: Array<Override<TOptions>> | undefined;
668
699
  contentType: contentType | undefined;
669
700
  pluginManager: PluginManager;
701
+ logger?: Logger;
670
702
  /**
671
703
  * Current plugin
672
704
  */
@@ -910,6 +942,7 @@ type Context<TOptions, TPluginOptions extends PluginFactoryOptions> = {
910
942
  fabric: Fabric;
911
943
  oas: Oas;
912
944
  pluginManager: PluginManager;
945
+ logger?: Logger;
913
946
  /**
914
947
  * Current plugin
915
948
  */
@@ -1305,4 +1338,4 @@ type ResolvedOptions = {
1305
1338
  type PluginVueQuery = PluginFactoryOptions<'plugin-vue-query', Options, ResolvedOptions, never, ResolvePathOptions>;
1306
1339
  //#endregion
1307
1340
  export { ReactGenerator as a, Operation$1 as c, Transformer as i, Options as n, OperationSchemas as o, PluginVueQuery as r, UserPluginWithLifeCycle as s, Infinite as t };
1308
- //# sourceMappingURL=types-Ds-oDlyr.d.ts.map
1341
+ //# sourceMappingURL=types-BbcLVl7P.d.cts.map
@@ -1,3 +1,4 @@
1
+ import { Fabric } from "@kubb/react-fabric";
1
2
  import * as OasTypes from "oas/types";
2
3
  import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
3
4
  import { Operation, Operation as Operation$1 } from "oas/operation";
@@ -5,7 +6,6 @@ import { OpenAPIV3 } from "openapi-types";
5
6
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
6
7
  import BaseOas from "oas";
7
8
  import { KubbFile } from "@kubb/fabric-core/types";
8
- import { Fabric } from "@kubb/react-fabric";
9
9
  import { ConsolaInstance, LogLevel } from "consola";
10
10
  import { KubbNode } from "@kubb/react-fabric/types";
11
11
 
@@ -73,13 +73,35 @@ type DebugEvent = {
73
73
  date: Date;
74
74
  logs: string[];
75
75
  fileName?: string;
76
+ /**
77
+ * Category of the debug log, used for GitHub Actions grouping
78
+ * - 'setup': Initial configuration and environment setup
79
+ * - 'plugin': Plugin installation and execution
80
+ * - 'hook': Plugin hook execution details
81
+ * - 'schema': Schema parsing and generation
82
+ * - 'file': File operations (read/write/generate)
83
+ * - 'error': Error details and stack traces
84
+ * - undefined: Generic logs (always inline)
85
+ */
86
+ category?: 'setup' | 'plugin' | 'hook' | 'schema' | 'file' | 'error';
87
+ /**
88
+ * Plugin name for grouping plugin-specific logs together
89
+ */
90
+ pluginName?: string;
91
+ /**
92
+ * Indicates if this is the start or end of a plugin's execution
93
+ * - 'start': Start of plugin execution group
94
+ * - 'end': End of plugin execution group
95
+ */
96
+ pluginGroupMarker?: 'start' | 'end';
76
97
  };
77
98
  type Events$1 = {
78
99
  start: [message: string];
79
100
  success: [message: string];
80
- error: [message: string, cause: Error];
101
+ error: [message: string, error: Error];
81
102
  warning: [message: string];
82
103
  debug: [DebugEvent];
104
+ verbose: [DebugEvent];
83
105
  info: [message: string];
84
106
  progress_start: [{
85
107
  id: string;
@@ -103,7 +125,7 @@ type Logger = {
103
125
  consola?: ConsolaInstance;
104
126
  on: EventEmitter<Events$1>['on'];
105
127
  emit: EventEmitter<Events$1>['emit'];
106
- writeLogs: () => Promise<string[]>;
128
+ writeLogs: () => Promise<void>;
107
129
  };
108
130
  //#endregion
109
131
  //#region ../core/src/utils/types.d.ts
@@ -414,14 +436,35 @@ type Group = {
414
436
  //#region ../core/src/PluginManager.d.ts
415
437
  type RequiredPluginLifecycle = Required<PluginLifecycle>;
416
438
  type Strategy = 'hookFirst' | 'hookForPlugin' | 'hookParallel' | 'hookSeq';
417
- type Executer<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
418
- message: string;
439
+ type ExecutingMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
440
+ strategy: Strategy;
441
+ hookName: H;
442
+ plugin: Plugin;
443
+ parameters?: unknown[] | undefined;
444
+ output?: unknown;
445
+ };
446
+ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
447
+ duration: number;
419
448
  strategy: Strategy;
420
449
  hookName: H;
421
450
  plugin: Plugin;
422
451
  parameters?: unknown[] | undefined;
423
452
  output?: unknown;
424
453
  };
454
+ type ErrorMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
455
+ hookName: H;
456
+ duration: number;
457
+ strategy: Strategy;
458
+ parameters?: unknown[] | undefined;
459
+ plugin: Plugin;
460
+ };
461
+ type ProgressStartMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
462
+ hookName: H;
463
+ plugins: Array<Plugin>;
464
+ };
465
+ type ProgressStopMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
466
+ hookName: H;
467
+ };
425
468
  type ParseResult<H extends PluginLifecycleHooks> = RequiredPluginLifecycle[H];
426
469
  type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseResult<H>>> = {
427
470
  result: Result;
@@ -436,9 +479,11 @@ type Options$2 = {
436
479
  concurrency?: number;
437
480
  };
438
481
  type Events = {
439
- executing: [executer: Executer];
440
- executed: [executer: Executer];
441
- error: [error: Error];
482
+ progress_start: [meta: ProgressStartMeta];
483
+ progress_stop: [meta: ProgressStopMeta];
484
+ executing: [meta: ExecutingMeta];
485
+ executed: [meta: ExecutedMeta];
486
+ error: [error: Error, meta: ErrorMeta];
442
487
  };
443
488
  type GetFileProps<TOptions = object> = {
444
489
  name: string;
@@ -451,8 +496,6 @@ declare class PluginManager {
451
496
  #private;
452
497
  readonly events: EventEmitter<Events>;
453
498
  readonly config: Config;
454
- readonly executed: Array<Executer>;
455
- readonly logger: Logger;
456
499
  readonly options: Options$2;
457
500
  constructor(config: Config, options: Options$2);
458
501
  getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
@@ -478,13 +521,11 @@ declare class PluginManager {
478
521
  hookForPlugin<H extends PluginLifecycleHooks>({
479
522
  pluginKey,
480
523
  hookName,
481
- parameters,
482
- message
524
+ parameters
483
525
  }: {
484
526
  pluginKey: Plugin['key'];
485
527
  hookName: H;
486
528
  parameters: PluginParameter<H>;
487
- message: string;
488
529
  }): Promise<Array<ReturnType<ParseResult<H>> | null>>;
489
530
  /**
490
531
  * Run a specific hookName for plugin x.
@@ -492,13 +533,11 @@ declare class PluginManager {
492
533
  hookForPluginSync<H extends PluginLifecycleHooks>({
493
534
  pluginKey,
494
535
  hookName,
495
- parameters,
496
- message
536
+ parameters
497
537
  }: {
498
538
  pluginKey: Plugin['key'];
499
539
  hookName: H;
500
540
  parameters: PluginParameter<H>;
501
- message: string;
502
541
  }): Array<ReturnType<ParseResult<H>>> | null;
503
542
  /**
504
543
  * First non-null result stops and will return it's value.
@@ -506,13 +545,11 @@ declare class PluginManager {
506
545
  hookFirst<H extends PluginLifecycleHooks>({
507
546
  hookName,
508
547
  parameters,
509
- skipped,
510
- message
548
+ skipped
511
549
  }: {
512
550
  hookName: H;
513
551
  parameters: PluginParameter<H>;
514
552
  skipped?: ReadonlySet<Plugin> | null;
515
- message: string;
516
553
  }): Promise<SafeParseResult<H>>;
517
554
  /**
518
555
  * First non-null result stops and will return it's value.
@@ -520,37 +557,31 @@ declare class PluginManager {
520
557
  hookFirstSync<H extends PluginLifecycleHooks>({
521
558
  hookName,
522
559
  parameters,
523
- skipped,
524
- message
560
+ skipped
525
561
  }: {
526
562
  hookName: H;
527
563
  parameters: PluginParameter<H>;
528
564
  skipped?: ReadonlySet<Plugin> | null;
529
- message: string;
530
565
  }): SafeParseResult<H>;
531
566
  /**
532
567
  * Run all plugins in parallel(order will be based on `this.plugin` and if `pre` or `post` is set).
533
568
  */
534
569
  hookParallel<H extends PluginLifecycleHooks, TOuput = void>({
535
570
  hookName,
536
- parameters,
537
- message
571
+ parameters
538
572
  }: {
539
573
  hookName: H;
540
574
  parameters?: Parameters<RequiredPluginLifecycle[H]> | undefined;
541
- message: string;
542
575
  }): Promise<Awaited<TOuput>[]>;
543
576
  /**
544
577
  * Chains plugins
545
578
  */
546
579
  hookSeq<H extends PluginLifecycleHooks>({
547
580
  hookName,
548
- parameters,
549
- message
581
+ parameters
550
582
  }: {
551
583
  hookName: H;
552
584
  parameters?: PluginParameter<H>;
553
- message: string;
554
585
  }): Promise<void>;
555
586
  getPluginByKey(pluginKey: Plugin['key']): Plugin | undefined;
556
587
  getPluginsByKey(hookName: keyof PluginWithLifeCycle, pluginKey: Plugin['key']): Plugin[];
@@ -667,6 +698,7 @@ type Context$1<TOptions, TPluginOptions extends PluginFactoryOptions> = {
667
698
  override: Array<Override<TOptions>> | undefined;
668
699
  contentType: contentType | undefined;
669
700
  pluginManager: PluginManager;
701
+ logger?: Logger;
670
702
  /**
671
703
  * Current plugin
672
704
  */
@@ -910,6 +942,7 @@ type Context<TOptions, TPluginOptions extends PluginFactoryOptions> = {
910
942
  fabric: Fabric;
911
943
  oas: Oas;
912
944
  pluginManager: PluginManager;
945
+ logger?: Logger;
913
946
  /**
914
947
  * Current plugin
915
948
  */
@@ -1305,4 +1338,4 @@ type ResolvedOptions = {
1305
1338
  type PluginVueQuery = PluginFactoryOptions<'plugin-vue-query', Options, ResolvedOptions, never, ResolvePathOptions>;
1306
1339
  //#endregion
1307
1340
  export { ReactGenerator as a, Operation$1 as c, Transformer as i, Options as n, OperationSchemas as o, PluginVueQuery as r, UserPluginWithLifeCycle as s, Infinite as t };
1308
- //# sourceMappingURL=types-BWI2KEBy.d.cts.map
1341
+ //# sourceMappingURL=types-Bt5VIopi.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-vue-query",
3
- "version": "4.11.1",
3
+ "version": "4.11.3",
4
4
  "description": "Vue Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for Vue.js applications.",
5
5
  "keywords": [
6
6
  "vue-query",
@@ -70,12 +70,12 @@
70
70
  "dependencies": {
71
71
  "@kubb/react-fabric": "0.5.4",
72
72
  "remeda": "^2.32.0",
73
- "@kubb/core": "4.11.1",
74
- "@kubb/oas": "4.11.1",
75
- "@kubb/plugin-client": "4.11.1",
76
- "@kubb/plugin-oas": "4.11.1",
77
- "@kubb/plugin-ts": "4.11.1",
78
- "@kubb/plugin-zod": "4.11.1"
73
+ "@kubb/core": "4.11.3",
74
+ "@kubb/oas": "4.11.3",
75
+ "@kubb/plugin-client": "4.11.3",
76
+ "@kubb/plugin-oas": "4.11.3",
77
+ "@kubb/plugin-ts": "4.11.3",
78
+ "@kubb/plugin-zod": "4.11.3"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "@kubb/react-fabric": "0.5.4"
package/src/plugin.ts CHANGED
@@ -185,6 +185,7 @@ export const pluginVueQuery = definePlugin<PluginVueQuery>((options) => {
185
185
  fabric: this.fabric,
186
186
  oas,
187
187
  pluginManager: this.pluginManager,
188
+ logger: this.logger,
188
189
  plugin: this.plugin,
189
190
  contentType,
190
191
  exclude,