@kubb/plugin-swr 4.10.0 → 4.11.0

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 { a as OperationSchemas, n as PluginSwr, r as Transformer, s as Operation } from "./types-DV16H9Nj.cjs";
1
+ import { a as OperationSchemas, n as PluginSwr, r as Transformer, s as Operation } from "./types-QkQgbj3P.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 { a as OperationSchemas, n as PluginSwr, r as Transformer, s as Operation } from "./types-BhMJy6gt.js";
1
+ import { a as OperationSchemas, n as PluginSwr, r as Transformer, s as Operation } from "./types-5G9WmFc0.js";
2
2
  import { FunctionParams } from "@kubb/react-fabric";
3
3
  import { KubbNode } from "@kubb/react-fabric/types";
4
4
 
@@ -1,5 +1,4 @@
1
1
  const require_generators = require('./generators-DM1zpqft.cjs');
2
- require('./components-Djw0ll1l.cjs');
3
2
 
4
3
  exports.mutationGenerator = require_generators.mutationGenerator;
5
4
  exports.queryGenerator = require_generators.queryGenerator;
@@ -1,4 +1,4 @@
1
- import { i as ReactGenerator, n as PluginSwr } from "./types-DV16H9Nj.cjs";
1
+ import { i as ReactGenerator, n as PluginSwr } from "./types-QkQgbj3P.cjs";
2
2
 
3
3
  //#region src/generators/mutationGenerator.d.ts
4
4
  declare const mutationGenerator: ReactGenerator<PluginSwr>;
@@ -1,4 +1,4 @@
1
- import { i as ReactGenerator, n as PluginSwr } from "./types-BhMJy6gt.js";
1
+ import { i as ReactGenerator, n as PluginSwr } from "./types-5G9WmFc0.js";
2
2
 
3
3
  //#region src/generators/mutationGenerator.d.ts
4
4
  declare const mutationGenerator: ReactGenerator<PluginSwr>;
@@ -1,4 +1,3 @@
1
- import "./components-bS6nIkbY.js";
2
1
  import { n as mutationGenerator, t as queryGenerator } from "./generators-DWKtejUq.js";
3
2
 
4
3
  export { mutationGenerator, queryGenerator };
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as PluginSwr, o as UserPluginWithLifeCycle, t as Options } from "./types-DV16H9Nj.cjs";
1
+ import { n as PluginSwr, o as UserPluginWithLifeCycle, t as Options } from "./types-QkQgbj3P.cjs";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginSwrName = "plugin-swr";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as PluginSwr, o as UserPluginWithLifeCycle, t as Options } from "./types-BhMJy6gt.js";
1
+ import { n as PluginSwr, o as UserPluginWithLifeCycle, t as Options } from "./types-5G9WmFc0.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginSwrName = "plugin-swr";
@@ -17,7 +17,7 @@ type SchemaObject$1 = OasTypes.SchemaObject & {
17
17
  };
18
18
  //#endregion
19
19
  //#region ../oas/src/Oas.d.ts
20
- type Options$4 = {
20
+ type Options$3 = {
21
21
  contentType?: contentType;
22
22
  discriminator?: 'strict' | 'inherit';
23
23
  };
@@ -31,8 +31,8 @@ declare class Oas<const TOAS = unknown> extends BaseOas {
31
31
  oas: TOAS | OASDocument | string;
32
32
  user?: User;
33
33
  });
34
- setOptions(options: Options$4): void;
35
- get options(): Options$4;
34
+ setOptions(options: Options$3): void;
35
+ get options(): Options$3;
36
36
  get($ref: string): any;
37
37
  getKey($ref: string): string | undefined;
38
38
  set($ref: string, value: unknown): false | undefined;
@@ -427,7 +427,7 @@ type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseRe
427
427
  result: Result;
428
428
  plugin: Plugin;
429
429
  };
430
- type Options$3 = {
430
+ type Options$2 = {
431
431
  fabric: Fabric;
432
432
  logger: Logger;
433
433
  /**
@@ -453,8 +453,8 @@ declare class PluginManager {
453
453
  readonly config: Config;
454
454
  readonly executed: Array<Executer>;
455
455
  readonly logger: Logger;
456
- readonly options: Options$3;
457
- constructor(config: Config, options: Options$3);
456
+ readonly options: Options$2;
457
+ constructor(config: Config, options: Options$2);
458
458
  getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
459
459
  get plugins(): Array<Plugin>;
460
460
  getFile<TOptions = object>({
@@ -1006,7 +1006,7 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
1006
1006
  };
1007
1007
  //#endregion
1008
1008
  //#region ../plugin-client/src/types.d.ts
1009
- type Options$2 = {
1009
+ type Options$1 = {
1010
1010
  /**
1011
1011
  * Specify the export location for the files and define the behavior of the output
1012
1012
  * @default { path: 'clients', barrelType: 'named' }
@@ -1121,20 +1121,20 @@ type Options$2 = {
1121
1121
  };
1122
1122
  type ResolvedOptions$1 = {
1123
1123
  output: Output<Oas>;
1124
- group?: Options$2['group'];
1124
+ group?: Options$1['group'];
1125
1125
  baseURL: string | undefined;
1126
- client: Options$2['client'];
1127
- clientType: NonNullable<Options$2['clientType']>;
1128
- bundle: NonNullable<Options$2['bundle']>;
1129
- parser: NonNullable<Options$2['parser']>;
1130
- urlType: NonNullable<Options$2['urlType']>;
1131
- importPath: Options$2['importPath'];
1132
- dataReturnType: NonNullable<Options$2['dataReturnType']>;
1133
- pathParamsType: NonNullable<Options$2['pathParamsType']>;
1134
- paramsType: NonNullable<Options$2['paramsType']>;
1135
- paramsCasing: Options$2['paramsCasing'];
1126
+ client: Options$1['client'];
1127
+ clientType: NonNullable<Options$1['clientType']>;
1128
+ bundle: NonNullable<Options$1['bundle']>;
1129
+ parser: NonNullable<Options$1['parser']>;
1130
+ urlType: NonNullable<Options$1['urlType']>;
1131
+ importPath: Options$1['importPath'];
1132
+ dataReturnType: NonNullable<Options$1['dataReturnType']>;
1133
+ pathParamsType: NonNullable<Options$1['pathParamsType']>;
1134
+ paramsType: NonNullable<Options$1['paramsType']>;
1135
+ paramsCasing: Options$1['paramsCasing'];
1136
1136
  };
1137
- type PluginClient = PluginFactoryOptions<'plugin-client', Options$2, ResolvedOptions$1, never, ResolvePathOptions>;
1137
+ type PluginClient = PluginFactoryOptions<'plugin-client', Options$1, ResolvedOptions$1, never, ResolvePathOptions>;
1138
1138
  //#endregion
1139
1139
  //#region src/types.d.ts
1140
1140
  type TransformerProps = {
@@ -1188,7 +1188,7 @@ type Mutation = {
1188
1188
  */
1189
1189
  paramsToTrigger?: boolean;
1190
1190
  };
1191
- type Options$1 = {
1191
+ type Options = {
1192
1192
  /**
1193
1193
  * Specify the export location for the files and define the behavior of the output
1194
1194
  * @default { path: 'hooks', barrelType: 'named' }
@@ -1258,17 +1258,17 @@ type Options$1 = {
1258
1258
  type ResolvedOptions = {
1259
1259
  output: Output<Oas>;
1260
1260
  client: NonNullable<PluginSwr['options']['client']>;
1261
- parser: Required<NonNullable<Options$1['parser']>>;
1261
+ parser: Required<NonNullable<Options['parser']>>;
1262
1262
  queryKey: QueryKey | undefined;
1263
1263
  query: NonNullable<Required<Query>> | false;
1264
1264
  mutationKey: MutationKey | undefined;
1265
1265
  mutation: (Required<Pick<Mutation, 'methods' | 'importPath'>> & Pick<Mutation, 'paramsToTrigger'>) | false;
1266
- paramsCasing: Options$1['paramsCasing'];
1267
- paramsType: NonNullable<Options$1['paramsType']>;
1268
- pathParamsType: NonNullable<Options$1['pathParamsType']>;
1269
- group: Options$1['group'];
1266
+ paramsCasing: Options['paramsCasing'];
1267
+ paramsType: NonNullable<Options['paramsType']>;
1268
+ pathParamsType: NonNullable<Options['pathParamsType']>;
1269
+ group: Options['group'];
1270
1270
  };
1271
- type PluginSwr = PluginFactoryOptions<'plugin-swr', Options$1, ResolvedOptions, never, ResolvePathOptions>;
1271
+ type PluginSwr = PluginFactoryOptions<'plugin-swr', Options, ResolvedOptions, never, ResolvePathOptions>;
1272
1272
  //#endregion
1273
- export { OperationSchemas as a, ReactGenerator as i, PluginSwr as n, UserPluginWithLifeCycle as o, Transformer as r, Operation$1 as s, Options$1 as t };
1274
- //# sourceMappingURL=types-BhMJy6gt.d.ts.map
1273
+ export { OperationSchemas as a, ReactGenerator as i, PluginSwr as n, UserPluginWithLifeCycle as o, Transformer as r, Operation$1 as s, Options as t };
1274
+ //# sourceMappingURL=types-5G9WmFc0.d.ts.map
@@ -17,7 +17,7 @@ type SchemaObject$1 = OasTypes.SchemaObject & {
17
17
  };
18
18
  //#endregion
19
19
  //#region ../oas/src/Oas.d.ts
20
- type Options$4 = {
20
+ type Options$3 = {
21
21
  contentType?: contentType;
22
22
  discriminator?: 'strict' | 'inherit';
23
23
  };
@@ -31,8 +31,8 @@ declare class Oas<const TOAS = unknown> extends BaseOas {
31
31
  oas: TOAS | OASDocument | string;
32
32
  user?: User;
33
33
  });
34
- setOptions(options: Options$4): void;
35
- get options(): Options$4;
34
+ setOptions(options: Options$3): void;
35
+ get options(): Options$3;
36
36
  get($ref: string): any;
37
37
  getKey($ref: string): string | undefined;
38
38
  set($ref: string, value: unknown): false | undefined;
@@ -427,7 +427,7 @@ type SafeParseResult<H extends PluginLifecycleHooks, Result = ReturnType<ParseRe
427
427
  result: Result;
428
428
  plugin: Plugin;
429
429
  };
430
- type Options$3 = {
430
+ type Options$2 = {
431
431
  fabric: Fabric;
432
432
  logger: Logger;
433
433
  /**
@@ -453,8 +453,8 @@ declare class PluginManager {
453
453
  readonly config: Config;
454
454
  readonly executed: Array<Executer>;
455
455
  readonly logger: Logger;
456
- readonly options: Options$3;
457
- constructor(config: Config, options: Options$3);
456
+ readonly options: Options$2;
457
+ constructor(config: Config, options: Options$2);
458
458
  getContext<TOptions extends PluginFactoryOptions>(plugin: Plugin<TOptions>): PluginContext<TOptions> & Record<string, any>;
459
459
  get plugins(): Array<Plugin>;
460
460
  getFile<TOptions = object>({
@@ -1006,7 +1006,7 @@ type CoreGenerator<TOptions extends PluginFactoryOptions> = {
1006
1006
  };
1007
1007
  //#endregion
1008
1008
  //#region ../plugin-client/src/types.d.ts
1009
- type Options$2 = {
1009
+ type Options$1 = {
1010
1010
  /**
1011
1011
  * Specify the export location for the files and define the behavior of the output
1012
1012
  * @default { path: 'clients', barrelType: 'named' }
@@ -1121,20 +1121,20 @@ type Options$2 = {
1121
1121
  };
1122
1122
  type ResolvedOptions$1 = {
1123
1123
  output: Output<Oas>;
1124
- group?: Options$2['group'];
1124
+ group?: Options$1['group'];
1125
1125
  baseURL: string | undefined;
1126
- client: Options$2['client'];
1127
- clientType: NonNullable<Options$2['clientType']>;
1128
- bundle: NonNullable<Options$2['bundle']>;
1129
- parser: NonNullable<Options$2['parser']>;
1130
- urlType: NonNullable<Options$2['urlType']>;
1131
- importPath: Options$2['importPath'];
1132
- dataReturnType: NonNullable<Options$2['dataReturnType']>;
1133
- pathParamsType: NonNullable<Options$2['pathParamsType']>;
1134
- paramsType: NonNullable<Options$2['paramsType']>;
1135
- paramsCasing: Options$2['paramsCasing'];
1126
+ client: Options$1['client'];
1127
+ clientType: NonNullable<Options$1['clientType']>;
1128
+ bundle: NonNullable<Options$1['bundle']>;
1129
+ parser: NonNullable<Options$1['parser']>;
1130
+ urlType: NonNullable<Options$1['urlType']>;
1131
+ importPath: Options$1['importPath'];
1132
+ dataReturnType: NonNullable<Options$1['dataReturnType']>;
1133
+ pathParamsType: NonNullable<Options$1['pathParamsType']>;
1134
+ paramsType: NonNullable<Options$1['paramsType']>;
1135
+ paramsCasing: Options$1['paramsCasing'];
1136
1136
  };
1137
- type PluginClient = PluginFactoryOptions<'plugin-client', Options$2, ResolvedOptions$1, never, ResolvePathOptions>;
1137
+ type PluginClient = PluginFactoryOptions<'plugin-client', Options$1, ResolvedOptions$1, never, ResolvePathOptions>;
1138
1138
  //#endregion
1139
1139
  //#region src/types.d.ts
1140
1140
  type TransformerProps = {
@@ -1188,7 +1188,7 @@ type Mutation = {
1188
1188
  */
1189
1189
  paramsToTrigger?: boolean;
1190
1190
  };
1191
- type Options$1 = {
1191
+ type Options = {
1192
1192
  /**
1193
1193
  * Specify the export location for the files and define the behavior of the output
1194
1194
  * @default { path: 'hooks', barrelType: 'named' }
@@ -1258,17 +1258,17 @@ type Options$1 = {
1258
1258
  type ResolvedOptions = {
1259
1259
  output: Output<Oas>;
1260
1260
  client: NonNullable<PluginSwr['options']['client']>;
1261
- parser: Required<NonNullable<Options$1['parser']>>;
1261
+ parser: Required<NonNullable<Options['parser']>>;
1262
1262
  queryKey: QueryKey | undefined;
1263
1263
  query: NonNullable<Required<Query>> | false;
1264
1264
  mutationKey: MutationKey | undefined;
1265
1265
  mutation: (Required<Pick<Mutation, 'methods' | 'importPath'>> & Pick<Mutation, 'paramsToTrigger'>) | false;
1266
- paramsCasing: Options$1['paramsCasing'];
1267
- paramsType: NonNullable<Options$1['paramsType']>;
1268
- pathParamsType: NonNullable<Options$1['pathParamsType']>;
1269
- group: Options$1['group'];
1266
+ paramsCasing: Options['paramsCasing'];
1267
+ paramsType: NonNullable<Options['paramsType']>;
1268
+ pathParamsType: NonNullable<Options['pathParamsType']>;
1269
+ group: Options['group'];
1270
1270
  };
1271
- type PluginSwr = PluginFactoryOptions<'plugin-swr', Options$1, ResolvedOptions, never, ResolvePathOptions>;
1271
+ type PluginSwr = PluginFactoryOptions<'plugin-swr', Options, ResolvedOptions, never, ResolvePathOptions>;
1272
1272
  //#endregion
1273
- export { OperationSchemas as a, ReactGenerator as i, PluginSwr as n, UserPluginWithLifeCycle as o, Transformer as r, Operation$1 as s, Options$1 as t };
1274
- //# sourceMappingURL=types-DV16H9Nj.d.cts.map
1273
+ export { OperationSchemas as a, ReactGenerator as i, PluginSwr as n, UserPluginWithLifeCycle as o, Transformer as r, Operation$1 as s, Options as t };
1274
+ //# sourceMappingURL=types-QkQgbj3P.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-swr",
3
- "version": "4.10.0",
3
+ "version": "4.11.0",
4
4
  "description": "SWR hooks generator plugin for Kubb, creating type-safe data fetching hooks from OpenAPI specifications for React and Next.js applications.",
5
5
  "keywords": [
6
6
  "swr",
@@ -30,16 +30,16 @@
30
30
  "type": "module",
31
31
  "exports": {
32
32
  ".": {
33
- "import": "./dist/index.js",
34
- "require": "./dist/index.cjs"
33
+ "require": "./dist/index.cjs",
34
+ "import": "./dist/index.js"
35
35
  },
36
36
  "./components": {
37
- "import": "./dist/components.js",
38
- "require": "./dist/components.cjs"
37
+ "require": "./dist/components.cjs",
38
+ "import": "./dist/components.js"
39
39
  },
40
40
  "./generators": {
41
- "import": "./dist/generators.js",
42
- "require": "./dist/generators.cjs"
41
+ "require": "./dist/generators.cjs",
42
+ "import": "./dist/generators.js"
43
43
  },
44
44
  "./package.json": "./package.json"
45
45
  },
@@ -72,12 +72,12 @@
72
72
  "dependencies": {
73
73
  "@kubb/react-fabric": "0.5.4",
74
74
  "remeda": "^2.32.0",
75
- "@kubb/core": "4.10.0",
76
- "@kubb/plugin-client": "4.10.0",
77
- "@kubb/plugin-oas": "4.10.0",
78
- "@kubb/plugin-ts": "4.10.0",
79
- "@kubb/plugin-zod": "4.10.0",
80
- "@kubb/oas": "4.10.0"
75
+ "@kubb/core": "4.11.0",
76
+ "@kubb/oas": "4.11.0",
77
+ "@kubb/plugin-client": "4.11.0",
78
+ "@kubb/plugin-oas": "4.11.0",
79
+ "@kubb/plugin-ts": "4.11.0",
80
+ "@kubb/plugin-zod": "4.11.0"
81
81
  },
82
82
  "peerDependencies": {
83
83
  "@kubb/react-fabric": "0.5.4"