@kubb/plugin-solid-query 4.12.3 → 4.12.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,18 +1,18 @@
1
- const require_generators = require('./generators-CftpFL3x.cjs');
2
- const require_components = require('./components-CN5aDA3t.cjs');
1
+ const require_generators = require('./generators-D7P06gQr.cjs');
2
+ const require_components = require('./components-BXqP1b7p.cjs');
3
3
  let node_path = require("node:path");
4
4
  node_path = require_generators.__toESM(node_path);
5
- let __kubb_core = require("@kubb/core");
6
- let __kubb_core_transformers = require("@kubb/core/transformers");
7
- let __kubb_core_utils = require("@kubb/core/utils");
8
- let __kubb_plugin_client = require("@kubb/plugin-client");
9
- let __kubb_plugin_oas = require("@kubb/plugin-oas");
10
- let __kubb_plugin_ts = require("@kubb/plugin-ts");
11
- let __kubb_plugin_zod = require("@kubb/plugin-zod");
5
+ let _kubb_core = require("@kubb/core");
6
+ let _kubb_core_transformers = require("@kubb/core/transformers");
7
+ let _kubb_core_utils = require("@kubb/core/utils");
8
+ let _kubb_plugin_client = require("@kubb/plugin-client");
9
+ let _kubb_plugin_oas = require("@kubb/plugin-oas");
10
+ let _kubb_plugin_ts = require("@kubb/plugin-ts");
11
+ let _kubb_plugin_zod = require("@kubb/plugin-zod");
12
12
 
13
13
  //#region src/plugin.ts
14
14
  const pluginSolidQueryName = "plugin-solid-query";
15
- const pluginSolidQuery = (0, __kubb_core.definePlugin)((options) => {
15
+ const pluginSolidQuery = (0, _kubb_core.definePlugin)((options) => {
16
16
  const { output = {
17
17
  path: "hooks",
18
18
  barrelType: "named"
@@ -55,13 +55,13 @@ const pluginSolidQuery = (0, __kubb_core.definePlugin)((options) => {
55
55
  paramsCasing
56
56
  },
57
57
  pre: [
58
- __kubb_plugin_oas.pluginOasName,
59
- __kubb_plugin_ts.pluginTsName,
60
- parser === "zod" ? __kubb_plugin_zod.pluginZodName : void 0
58
+ _kubb_plugin_oas.pluginOasName,
59
+ _kubb_plugin_ts.pluginTsName,
60
+ parser === "zod" ? _kubb_plugin_zod.pluginZodName : void 0
61
61
  ].filter(Boolean),
62
62
  resolvePath(baseName, pathMode, options$1) {
63
63
  const root = node_path.default.resolve(this.config.root, this.config.output.path);
64
- if ((pathMode ?? (0, __kubb_core.getMode)(node_path.default.resolve(root, output.path))) === "single")
64
+ if ((pathMode ?? (0, _kubb_core.getMode)(node_path.default.resolve(root, output.path))) === "single")
65
65
  /**
66
66
  * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend
67
67
  * Other plugins then need to call addOrAppend instead of just add from the fileManager class
@@ -70,32 +70,32 @@ const pluginSolidQuery = (0, __kubb_core.definePlugin)((options) => {
70
70
  if (group && (options$1?.group?.path || options$1?.group?.tag)) {
71
71
  const groupName = group?.name ? group.name : (ctx) => {
72
72
  if (group?.type === "path") return `${ctx.group.split("/")[1]}`;
73
- return `${(0, __kubb_core_transformers.camelCase)(ctx.group)}Controller`;
73
+ return `${(0, _kubb_core_transformers.camelCase)(ctx.group)}Controller`;
74
74
  };
75
75
  return node_path.default.resolve(root, output.path, groupName({ group: group.type === "path" ? options$1.group.path : options$1.group.tag }), baseName);
76
76
  }
77
77
  return node_path.default.resolve(root, output.path, baseName);
78
78
  },
79
79
  resolveName(name, type) {
80
- let resolvedName = (0, __kubb_core_transformers.camelCase)(name);
81
- if (type === "file" || type === "function") resolvedName = (0, __kubb_core_transformers.camelCase)(name, { isFile: type === "file" });
82
- if (type === "type") resolvedName = (0, __kubb_core_transformers.pascalCase)(name);
80
+ let resolvedName = (0, _kubb_core_transformers.camelCase)(name);
81
+ if (type === "file" || type === "function") resolvedName = (0, _kubb_core_transformers.camelCase)(name, { isFile: type === "file" });
82
+ if (type === "type") resolvedName = (0, _kubb_core_transformers.pascalCase)(name);
83
83
  if (type) return transformers?.name?.(resolvedName, type) || resolvedName;
84
84
  return resolvedName;
85
85
  },
86
86
  async install() {
87
87
  const root = node_path.default.resolve(this.config.root, this.config.output.path);
88
- const mode = (0, __kubb_core.getMode)(node_path.default.resolve(root, output.path));
88
+ const mode = (0, _kubb_core.getMode)(node_path.default.resolve(root, output.path));
89
89
  const oas = await this.getOas();
90
90
  const baseURL = await this.getBaseURL();
91
91
  if (baseURL) this.plugin.options.client.baseURL = baseURL;
92
- const hasClientPlugin = !!this.pluginManager.getPluginByKey([__kubb_plugin_client.pluginClientName]);
92
+ const hasClientPlugin = !!this.pluginManager.getPluginByKey([_kubb_plugin_client.pluginClientName]);
93
93
  if (this.plugin.options.client.bundle && !hasClientPlugin && !this.plugin.options.client.importPath) await this.upsertFile({
94
94
  baseName: "fetch.ts",
95
95
  path: node_path.default.resolve(root, ".kubb/fetch.ts"),
96
96
  sources: [{
97
97
  name: "fetch",
98
- value: (0, __kubb_core_utils.resolveModuleSource)(this.plugin.options.client.client === "fetch" ? "@kubb/plugin-client/templates/clients/fetch" : "@kubb/plugin-client/templates/clients/axios").source,
98
+ value: (0, _kubb_core_utils.resolveModuleSource)(this.plugin.options.client.client === "fetch" ? "@kubb/plugin-client/templates/clients/fetch" : "@kubb/plugin-client/templates/clients/axios").source,
99
99
  isExportable: true,
100
100
  isIndexable: true
101
101
  }]
@@ -105,12 +105,12 @@ const pluginSolidQuery = (0, __kubb_core.definePlugin)((options) => {
105
105
  path: node_path.default.resolve(root, ".kubb/config.ts"),
106
106
  sources: [{
107
107
  name: "config",
108
- value: (0, __kubb_core_utils.resolveModuleSource)("@kubb/plugin-client/templates/config").source,
108
+ value: (0, _kubb_core_utils.resolveModuleSource)("@kubb/plugin-client/templates/config").source,
109
109
  isExportable: false,
110
110
  isIndexable: false
111
111
  }]
112
112
  });
113
- const files = await new __kubb_plugin_oas.OperationGenerator(this.plugin.options, {
113
+ const files = await new _kubb_plugin_oas.OperationGenerator(this.plugin.options, {
114
114
  fabric: this.fabric,
115
115
  oas,
116
116
  pluginManager: this.pluginManager,
@@ -123,7 +123,7 @@ const pluginSolidQuery = (0, __kubb_core.definePlugin)((options) => {
123
123
  mode
124
124
  }).build(...generators);
125
125
  await this.upsertFile(...files);
126
- const barrelFiles = await (0, __kubb_core.getBarrelFiles)(this.fabric.files, {
126
+ const barrelFiles = await (0, _kubb_core.getBarrelFiles)(this.fabric.files, {
127
127
  type: output.barrelType ?? "named",
128
128
  root,
129
129
  output,
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["QueryKey","queryGenerator","mutationGenerator","MutationKey","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 { mutationGenerator, queryGenerator } from './generators'\nimport type { PluginSolidQuery } from './types.ts'\n\nexport const pluginSolidQueryName = 'plugin-solid-query' satisfies PluginSolidQuery['name']\n\nexport const pluginSolidQuery = definePlugin<PluginSolidQuery>((options) => {\n const {\n output = { path: 'hooks', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n parser = 'client',\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n queryKey = QueryKey.getTransformer,\n generators = [queryGenerator, mutationGenerator].filter(Boolean),\n mutation = {},\n query = {},\n mutationKey = MutationKey.getTransformer,\n paramsCasing,\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: pluginSolidQueryName,\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 queryKey,\n query:\n query === false\n ? false\n : {\n methods: ['get'],\n importPath: '@tanstack/solid-query',\n ...query,\n },\n mutationKey,\n mutation:\n mutation === false\n ? false\n : {\n methods: ['post', 'put', 'patch', 'delete'],\n importPath: '@tanstack/solid-query',\n ...mutation,\n },\n paramsType,\n pathParamsType,\n parser,\n group,\n paramsCasing,\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 fetch\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 events: this.events,\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 })\n\n await this.upsertFile(...barrelFiles)\n },\n }\n})\n"],"mappings":";;;;;;;;;;;;;AAYA,MAAa,uBAAuB;AAEpC,MAAa,kDAAmD,YAAY;CAC1E,MAAM,EACJ,SAAS;EAAE,MAAM;EAAS,YAAY;EAAS,EAC/C,OACA,UAAU,EAAE,EACZ,SACA,WAAW,EAAE,EACb,SAAS,UACT,eAAe,EAAE,EACjB,aAAa,UACb,iBAAiB,eAAe,WAAW,WAAW,QAAQ,kBAAkB,UAChF,WAAWA,4BAAS,gBACpB,aAAa,CAACC,mCAAgBC,qCAAkB,CAAC,OAAO,QAAQ,EAChE,WAAW,EAAE,EACb,QAAQ,EAAE,EACV,cAAcC,+BAAY,gBAC1B,cACA,aACA,WACE;CAEJ,MAAM,aAAa,QAAQ,UAAU;CACrC,MAAM,mBAAm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E/B,MAAM,cAAc,sCAAqB,KAAK,OAAO,OAAO;IAC1D,MAAM,OAAO,cAAc;IAC3B;IACA;IACA,MAAM,EACJ,WAAW,KAAK,OAAO,KACxB;IACF,CAAC;AAEF,SAAM,KAAK,WAAW,GAAG,YAAY;;EAExC;EACD"}
1
+ {"version":3,"file":"index.cjs","names":["QueryKey","queryGenerator","mutationGenerator","MutationKey","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 { mutationGenerator, queryGenerator } from './generators'\nimport type { PluginSolidQuery } from './types.ts'\n\nexport const pluginSolidQueryName = 'plugin-solid-query' satisfies PluginSolidQuery['name']\n\nexport const pluginSolidQuery = definePlugin<PluginSolidQuery>((options) => {\n const {\n output = { path: 'hooks', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n parser = 'client',\n transformers = {},\n paramsType = 'inline',\n pathParamsType = paramsType === 'object' ? 'object' : options.pathParamsType || 'inline',\n queryKey = QueryKey.getTransformer,\n generators = [queryGenerator, mutationGenerator].filter(Boolean),\n mutation = {},\n query = {},\n mutationKey = MutationKey.getTransformer,\n paramsCasing,\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: pluginSolidQueryName,\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 queryKey,\n query:\n query === false\n ? false\n : {\n methods: ['get'],\n importPath: '@tanstack/solid-query',\n ...query,\n },\n mutationKey,\n mutation:\n mutation === false\n ? false\n : {\n methods: ['post', 'put', 'patch', 'delete'],\n importPath: '@tanstack/solid-query',\n ...mutation,\n },\n paramsType,\n pathParamsType,\n parser,\n group,\n paramsCasing,\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 fetch\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 events: this.events,\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 })\n\n await this.upsertFile(...barrelFiles)\n },\n }\n})\n"],"mappings":";;;;;;;;;;;;;AAYA,MAAa,uBAAuB;AAEpC,MAAa,iDAAmD,YAAY;CAC1E,MAAM,EACJ,SAAS;EAAE,MAAM;EAAS,YAAY;EAAS,EAC/C,OACA,UAAU,EAAE,EACZ,SACA,WAAW,EAAE,EACb,SAAS,UACT,eAAe,EAAE,EACjB,aAAa,UACb,iBAAiB,eAAe,WAAW,WAAW,QAAQ,kBAAkB,UAChF,WAAWA,4BAAS,gBACpB,aAAa,CAACC,mCAAgBC,qCAAkB,CAAC,OAAO,QAAQ,EAChE,WAAW,EAAE,EACb,QAAQ,EAAE,EACV,cAAcC,+BAAY,gBAC1B,cACA,aACA,WACE;CAEJ,MAAM,aAAa,QAAQ,UAAU;CACrC,MAAM,mBAAmB,QAAQ,eAAe,CAAC,QAAQ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AK,OAAO,OAAO;IAC1D,MAAM,OAAO,cAAc;IAC3B;IACA;IACA,MAAM,EACJ,WAAW,KAAK,OAAO,KACxB;IACF,CAAC;AAEF,SAAM,KAAK,WAAW,GAAG,YAAY;;EAExC;EACD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-solid-query",
3
- "version": "4.12.3",
3
+ "version": "4.12.5",
4
4
  "description": "Solid Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for Solid.js applications.",
5
5
  "keywords": [
6
6
  "solid-query",
@@ -68,17 +68,17 @@
68
68
  }
69
69
  ],
70
70
  "dependencies": {
71
- "@kubb/react-fabric": "0.7.0",
71
+ "@kubb/react-fabric": "0.7.1",
72
72
  "remeda": "^2.32.0",
73
- "@kubb/core": "4.12.3",
74
- "@kubb/oas": "4.12.3",
75
- "@kubb/plugin-client": "4.12.3",
76
- "@kubb/plugin-oas": "4.12.3",
77
- "@kubb/plugin-ts": "4.12.3",
78
- "@kubb/plugin-zod": "4.12.3"
73
+ "@kubb/core": "4.12.5",
74
+ "@kubb/oas": "4.12.5",
75
+ "@kubb/plugin-client": "4.12.5",
76
+ "@kubb/plugin-oas": "4.12.5",
77
+ "@kubb/plugin-ts": "4.12.5",
78
+ "@kubb/plugin-zod": "4.12.5"
79
79
  },
80
80
  "peerDependencies": {
81
- "@kubb/react-fabric": "0.7.0"
81
+ "@kubb/react-fabric": "0.7.1"
82
82
  },
83
83
  "engines": {
84
84
  "node": ">=20"