@kubb/plugin-swr 3.0.0-beta.2 → 3.0.0-beta.4

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,7 +1,7 @@
1
1
  import { Operation } from '@kubb/oas';
2
2
  import { OperationSchemas } from '@kubb/plugin-oas';
3
3
  import { ReactNode } from 'react';
4
- import { P as PluginSwr } from './types-DaH2Sc1M.cjs';
4
+ import { P as PluginSwr } from './types-Bt7A3YoC.cjs';
5
5
  import { FunctionParams } from '@kubb/react';
6
6
  import '@kubb/core';
7
7
  import '@kubb/plugin-client';
@@ -1,7 +1,7 @@
1
1
  import { Operation } from '@kubb/oas';
2
2
  import { OperationSchemas } from '@kubb/plugin-oas';
3
3
  import { ReactNode } from 'react';
4
- import { P as PluginSwr } from './types-DaH2Sc1M.js';
4
+ import { P as PluginSwr } from './types-Bt7A3YoC.js';
5
5
  import { FunctionParams } from '@kubb/react';
6
6
  import '@kubb/core';
7
7
  import '@kubb/plugin-client';
@@ -1,5 +1,5 @@
1
1
  import * as _kubb_plugin_oas from '@kubb/plugin-oas';
2
- import { P as PluginSwr } from './types-DaH2Sc1M.cjs';
2
+ import { P as PluginSwr } from './types-Bt7A3YoC.cjs';
3
3
  import '@kubb/core';
4
4
  import '@kubb/oas';
5
5
  import '@kubb/plugin-client';
@@ -1,5 +1,5 @@
1
1
  import * as _kubb_plugin_oas from '@kubb/plugin-oas';
2
- import { P as PluginSwr } from './types-DaH2Sc1M.js';
2
+ import { P as PluginSwr } from './types-Bt7A3YoC.js';
3
3
  import '@kubb/core';
4
4
  import '@kubb/oas';
5
5
  import '@kubb/plugin-client';
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _kubb_core from '@kubb/core';
2
- import { O as Options, P as PluginSwr } from './types-DaH2Sc1M.cjs';
2
+ import { O as Options, P as PluginSwr } from './types-Bt7A3YoC.cjs';
3
3
  import '@kubb/oas';
4
4
  import '@kubb/plugin-client';
5
5
  import '@kubb/plugin-oas';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _kubb_core from '@kubb/core';
2
- import { O as Options, P as PluginSwr } from './types-DaH2Sc1M.js';
2
+ import { O as Options, P as PluginSwr } from './types-Bt7A3YoC.js';
3
3
  import '@kubb/oas';
4
4
  import '@kubb/plugin-client';
5
5
  import '@kubb/plugin-oas';
@@ -5,7 +5,8 @@ import { ResolvePathOptions, Exclude, Include, Override, Generator } from '@kubb
5
5
 
6
6
  type Options = {
7
7
  /**
8
- * @default 'hooks'
8
+ * Specify the export location for the files and define the behavior of the output
9
+ * @default { path: 'hooks', barrelType: 'named' }
9
10
  */
10
11
  output?: Output;
11
12
  /**
@@ -40,7 +41,7 @@ type Options = {
40
41
  * It will be used as `import { useQuery } from '${importPath}'`.
41
42
  * It allows both relative and absolute path.
42
43
  * the path will be applied as is, so relative path should be based on the file being generated.
43
- * @default '@tanstack/react-query' if 'framework' is set to 'react'
44
+ * @default 'swr'
44
45
  */
45
46
  importPath?: string;
46
47
  };
@@ -59,18 +60,15 @@ type Options = {
59
60
  * It will be used as `import { useQuery } from '${importPath}'`.
60
61
  * It allows both relative and absolute path.
61
62
  * the path will be applied as is, so relative path should be based on the file being generated.
62
- * @default '@tanstack/react-query' if 'framework' is set to 'react'
63
+ * @default 'swr/mutation'
63
64
  */
64
65
  importPath?: string;
65
66
  };
66
67
  /**
67
68
  * How to pass your pathParams.
68
- *
69
- * `object` will return the pathParams as an object.
70
- *
71
- * `inline` will return the pathParams as comma separated params.
72
- * @default `'inline'`
73
- * @private
69
+ * - 'object' will return the pathParams as an object.
70
+ * - 'inline' will return the pathParams as comma separated params.
71
+ * @default 'inline'
74
72
  */
75
73
  pathParamsType?: PluginClient['options']['pathParamsType'];
76
74
  /**
@@ -5,7 +5,8 @@ import { ResolvePathOptions, Exclude, Include, Override, Generator } from '@kubb
5
5
 
6
6
  type Options = {
7
7
  /**
8
- * @default 'hooks'
8
+ * Specify the export location for the files and define the behavior of the output
9
+ * @default { path: 'hooks', barrelType: 'named' }
9
10
  */
10
11
  output?: Output;
11
12
  /**
@@ -40,7 +41,7 @@ type Options = {
40
41
  * It will be used as `import { useQuery } from '${importPath}'`.
41
42
  * It allows both relative and absolute path.
42
43
  * the path will be applied as is, so relative path should be based on the file being generated.
43
- * @default '@tanstack/react-query' if 'framework' is set to 'react'
44
+ * @default 'swr'
44
45
  */
45
46
  importPath?: string;
46
47
  };
@@ -59,18 +60,15 @@ type Options = {
59
60
  * It will be used as `import { useQuery } from '${importPath}'`.
60
61
  * It allows both relative and absolute path.
61
62
  * the path will be applied as is, so relative path should be based on the file being generated.
62
- * @default '@tanstack/react-query' if 'framework' is set to 'react'
63
+ * @default 'swr/mutation'
63
64
  */
64
65
  importPath?: string;
65
66
  };
66
67
  /**
67
68
  * How to pass your pathParams.
68
- *
69
- * `object` will return the pathParams as an object.
70
- *
71
- * `inline` will return the pathParams as comma separated params.
72
- * @default `'inline'`
73
- * @private
69
+ * - 'object' will return the pathParams as an object.
70
+ * - 'inline' will return the pathParams as comma separated params.
71
+ * @default 'inline'
74
72
  */
75
73
  pathParamsType?: PluginClient['options']['pathParamsType'];
76
74
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-swr",
3
- "version": "3.0.0-beta.2",
3
+ "version": "3.0.0-beta.4",
4
4
  "description": "Generator plugin-swr",
5
5
  "keywords": [
6
6
  "typescript",
@@ -63,25 +63,25 @@
63
63
  "!/**/__tests__/**"
64
64
  ],
65
65
  "dependencies": {
66
- "@kubb/core": "3.0.0-beta.2",
67
- "@kubb/fs": "3.0.0-beta.2",
68
- "@kubb/oas": "3.0.0-beta.2",
69
- "@kubb/plugin-client": "3.0.0-beta.2",
70
- "@kubb/plugin-oas": "3.0.0-beta.2",
71
- "@kubb/plugin-ts": "3.0.0-beta.2",
72
- "@kubb/plugin-zod": "3.0.0-beta.2",
73
- "@kubb/react": "3.0.0-beta.2"
66
+ "@kubb/core": "3.0.0-beta.4",
67
+ "@kubb/fs": "3.0.0-beta.4",
68
+ "@kubb/oas": "3.0.0-beta.4",
69
+ "@kubb/plugin-client": "3.0.0-beta.4",
70
+ "@kubb/plugin-oas": "3.0.0-beta.4",
71
+ "@kubb/plugin-ts": "3.0.0-beta.4",
72
+ "@kubb/plugin-zod": "3.0.0-beta.4",
73
+ "@kubb/react": "3.0.0-beta.4"
74
74
  },
75
75
  "devDependencies": {
76
76
  "@types/react": "^18.3.11",
77
77
  "react": "^18.3.1",
78
78
  "tsup": "^8.3.0",
79
79
  "typescript": "^5.6.2",
80
- "@kubb/config-ts": "3.0.0-beta.2",
81
- "@kubb/config-tsup": "3.0.0-beta.2"
80
+ "@kubb/config-ts": "3.0.0-beta.4",
81
+ "@kubb/config-tsup": "3.0.0-beta.4"
82
82
  },
83
83
  "peerDependencies": {
84
- "@kubb/react": "3.0.0-beta.2"
84
+ "@kubb/react": "3.0.0-beta.4"
85
85
  },
86
86
  "engines": {
87
87
  "node": ">=20"
package/src/types.ts CHANGED
@@ -5,7 +5,8 @@ import type { Exclude, Generator, Include, Override, ResolvePathOptions } from '
5
5
 
6
6
  export type Options = {
7
7
  /**
8
- * @default 'hooks'
8
+ * Specify the export location for the files and define the behavior of the output
9
+ * @default { path: 'hooks', barrelType: 'named' }
9
10
  */
10
11
  output?: Output
11
12
  /**
@@ -40,7 +41,7 @@ export type Options = {
40
41
  * It will be used as `import { useQuery } from '${importPath}'`.
41
42
  * It allows both relative and absolute path.
42
43
  * the path will be applied as is, so relative path should be based on the file being generated.
43
- * @default '@tanstack/react-query' if 'framework' is set to 'react'
44
+ * @default 'swr'
44
45
  */
45
46
  importPath?: string
46
47
  }
@@ -59,18 +60,15 @@ export type Options = {
59
60
  * It will be used as `import { useQuery } from '${importPath}'`.
60
61
  * It allows both relative and absolute path.
61
62
  * the path will be applied as is, so relative path should be based on the file being generated.
62
- * @default '@tanstack/react-query' if 'framework' is set to 'react'
63
+ * @default 'swr/mutation'
63
64
  */
64
65
  importPath?: string
65
66
  }
66
67
  /**
67
68
  * How to pass your pathParams.
68
- *
69
- * `object` will return the pathParams as an object.
70
- *
71
- * `inline` will return the pathParams as comma separated params.
72
- * @default `'inline'`
73
- * @private
69
+ * - 'object' will return the pathParams as an object.
70
+ * - 'inline' will return the pathParams as comma separated params.
71
+ * @default 'inline'
74
72
  */
75
73
  pathParamsType?: PluginClient['options']['pathParamsType']
76
74
  /**