@kubb/plugin-swr 4.12.7 → 4.12.9

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-2siB3blQ.cjs";
1
+ import { a as OperationSchemas, n as PluginSwr, r as Transformer, s as Operation } from "./types-DzUtljim.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-C8bOpN3-.js";
1
+ import { a as OperationSchemas, n as PluginSwr, r as Transformer, s as Operation } from "./types-D_6Kr2D2.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 { i as ReactGenerator, n as PluginSwr } from "./types-2siB3blQ.cjs";
1
+ import { i as ReactGenerator, n as PluginSwr } from "./types-DzUtljim.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-C8bOpN3-.js";
1
+ import { i as ReactGenerator, n as PluginSwr } from "./types-D_6Kr2D2.js";
2
2
 
3
3
  //#region src/generators/mutationGenerator.d.ts
4
4
  declare const mutationGenerator: ReactGenerator<PluginSwr>;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as PluginSwr, o as UserPluginWithLifeCycle, t as Options } from "./types-2siB3blQ.cjs";
1
+ import { n as PluginSwr, o as UserPluginWithLifeCycle, t as Options } from "./types-DzUtljim.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-C8bOpN3-.js";
1
+ import { n as PluginSwr, o as UserPluginWithLifeCycle, t as Options } from "./types-D_6Kr2D2.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginSwrName = "plugin-swr";
@@ -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 { KubbNode } from "@kubb/react-fabric/types";
10
10
 
11
11
  //#region ../oas/src/types.d.ts
@@ -41,6 +41,7 @@ declare class Oas<const TOAS = unknown> extends BaseOas {
41
41
  getRequestSchema(operation: Operation): SchemaObject | undefined;
42
42
  getParametersSchema(operation: Operation, inKey: 'path' | 'query' | 'header'): SchemaObject | null;
43
43
  valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
44
+ flattenSchema(schema?: SchemaObject): SchemaObject | undefined;
44
45
  }
45
46
  //#endregion
46
47
  //#region ../core/src/BaseGenerator.d.ts
@@ -169,21 +170,21 @@ interface KubbEvents {
169
170
  */
170
171
  'hooks:end': [];
171
172
  /**
172
- * Emitted when a single hook execution starts.
173
- */
174
- 'hook:start': [command: string];
175
- /**
176
- * Emitted to execute a hook command (e.g., format or lint).
173
+ * Emitted when a single hook execution starts. (e.g., format or lint).
177
174
  * The callback should be invoked when the command completes.
178
175
  */
179
- 'hook:execute': [{
180
- command: string | URL;
176
+ 'hook:start': [{
177
+ id?: string;
178
+ command: string;
181
179
  args?: readonly string[];
182
- }, cb: () => void];
180
+ }];
183
181
  /**
184
182
  * Emitted when a single hook execution completes.
185
183
  */
186
- 'hook:end': [command: string];
184
+ 'hook:end': [{
185
+ id?: string;
186
+ command: string;
187
+ }];
187
188
  /**
188
189
  * Emitted when a new version of Kubb is available.
189
190
  */
@@ -1425,4 +1426,4 @@ type ResolvedOptions = {
1425
1426
  type PluginSwr = PluginFactoryOptions<'plugin-swr', Options, ResolvedOptions, never, ResolvePathOptions>;
1426
1427
  //#endregion
1427
1428
  export { OperationSchemas as a, ReactGenerator as i, PluginSwr as n, UserPluginWithLifeCycle as o, Transformer as r, Operation$1 as s, Options as t };
1428
- //# sourceMappingURL=types-2siB3blQ.d.cts.map
1429
+ //# sourceMappingURL=types-D_6Kr2D2.d.ts.map
@@ -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 { KubbNode } from "@kubb/react-fabric/types";
10
10
 
11
11
  //#region ../oas/src/types.d.ts
@@ -41,6 +41,7 @@ declare class Oas<const TOAS = unknown> extends BaseOas {
41
41
  getRequestSchema(operation: Operation): SchemaObject | undefined;
42
42
  getParametersSchema(operation: Operation, inKey: 'path' | 'query' | 'header'): SchemaObject | null;
43
43
  valdiate(): Promise<oas_normalize_lib_types0.ValidationResult>;
44
+ flattenSchema(schema?: SchemaObject): SchemaObject | undefined;
44
45
  }
45
46
  //#endregion
46
47
  //#region ../core/src/BaseGenerator.d.ts
@@ -169,21 +170,21 @@ interface KubbEvents {
169
170
  */
170
171
  'hooks:end': [];
171
172
  /**
172
- * Emitted when a single hook execution starts.
173
- */
174
- 'hook:start': [command: string];
175
- /**
176
- * Emitted to execute a hook command (e.g., format or lint).
173
+ * Emitted when a single hook execution starts. (e.g., format or lint).
177
174
  * The callback should be invoked when the command completes.
178
175
  */
179
- 'hook:execute': [{
180
- command: string | URL;
176
+ 'hook:start': [{
177
+ id?: string;
178
+ command: string;
181
179
  args?: readonly string[];
182
- }, cb: () => void];
180
+ }];
183
181
  /**
184
182
  * Emitted when a single hook execution completes.
185
183
  */
186
- 'hook:end': [command: string];
184
+ 'hook:end': [{
185
+ id?: string;
186
+ command: string;
187
+ }];
187
188
  /**
188
189
  * Emitted when a new version of Kubb is available.
189
190
  */
@@ -1425,4 +1426,4 @@ type ResolvedOptions = {
1425
1426
  type PluginSwr = PluginFactoryOptions<'plugin-swr', Options, ResolvedOptions, never, ResolvePathOptions>;
1426
1427
  //#endregion
1427
1428
  export { OperationSchemas as a, ReactGenerator as i, PluginSwr as n, UserPluginWithLifeCycle as o, Transformer as r, Operation$1 as s, Options as t };
1428
- //# sourceMappingURL=types-C8bOpN3-.d.ts.map
1429
+ //# sourceMappingURL=types-DzUtljim.d.cts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-swr",
3
- "version": "4.12.7",
3
+ "version": "4.12.9",
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",
@@ -70,17 +70,17 @@
70
70
  }
71
71
  ],
72
72
  "dependencies": {
73
- "@kubb/react-fabric": "0.7.2",
73
+ "@kubb/react-fabric": "0.7.4",
74
74
  "remeda": "^2.32.0",
75
- "@kubb/core": "4.12.7",
76
- "@kubb/oas": "4.12.7",
77
- "@kubb/plugin-client": "4.12.7",
78
- "@kubb/plugin-oas": "4.12.7",
79
- "@kubb/plugin-ts": "4.12.7",
80
- "@kubb/plugin-zod": "4.12.7"
75
+ "@kubb/core": "4.12.9",
76
+ "@kubb/oas": "4.12.9",
77
+ "@kubb/plugin-client": "4.12.9",
78
+ "@kubb/plugin-oas": "4.12.9",
79
+ "@kubb/plugin-ts": "4.12.9",
80
+ "@kubb/plugin-zod": "4.12.9"
81
81
  },
82
82
  "peerDependencies": {
83
- "@kubb/react-fabric": "0.7.2"
83
+ "@kubb/react-fabric": "0.7.4"
84
84
  },
85
85
  "engines": {
86
86
  "node": ">=20"