@kubb/plugin-ts 4.12.6 → 4.12.8

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 { i as Schema, n as PluginTs, o as OasTypes, s as SchemaObject } from "./types-C7ABVeaM.cjs";
1
+ import { i as Schema, n as PluginTs, o as OasTypes, s as SchemaObject } from "./types-CCmRQ3Mz.cjs";
2
2
  import { KubbNode } from "@kubb/react-fabric/types";
3
3
 
4
4
  //#region src/components/OasType.d.ts
@@ -1,4 +1,4 @@
1
- import { i as Schema, n as PluginTs, o as OasTypes, s as SchemaObject } from "./types-xVulrECR.js";
1
+ import { i as Schema, n as PluginTs, o as OasTypes, s as SchemaObject } from "./types-DOUgsQdD.js";
2
2
  import { KubbNode } from "@kubb/react-fabric/types";
3
3
 
4
4
  //#region src/components/OasType.d.ts
@@ -1,4 +1,4 @@
1
- import { n as PluginTs, r as ReactGenerator } from "./types-C7ABVeaM.cjs";
1
+ import { n as PluginTs, r as ReactGenerator } from "./types-CCmRQ3Mz.cjs";
2
2
 
3
3
  //#region src/generators/oasGenerator.d.ts
4
4
  declare const oasGenerator: ReactGenerator<PluginTs>;
@@ -1,4 +1,4 @@
1
- import { n as PluginTs, r as ReactGenerator } from "./types-xVulrECR.js";
1
+ import { n as PluginTs, r as ReactGenerator } from "./types-DOUgsQdD.js";
2
2
 
3
3
  //#region src/generators/oasGenerator.d.ts
4
4
  declare const oasGenerator: ReactGenerator<PluginTs>;
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UserPluginWithLifeCycle, n as PluginTs, t as Options } from "./types-C7ABVeaM.cjs";
1
+ import { a as UserPluginWithLifeCycle, n as PluginTs, t as Options } from "./types-CCmRQ3Mz.cjs";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginTsName = "plugin-ts";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { a as UserPluginWithLifeCycle, n as PluginTs, t as Options } from "./types-xVulrECR.js";
1
+ import { a as UserPluginWithLifeCycle, n as PluginTs, t as Options } from "./types-DOUgsQdD.js";
2
2
 
3
3
  //#region src/plugin.d.ts
4
4
  declare const pluginTsName = "plugin-ts";
@@ -1,5 +1,3 @@
1
- import { Fabric } from "@kubb/react-fabric";
2
- import ts from "typescript";
3
1
  import * as OasTypes from "oas/types";
4
2
  import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
5
3
  import { Operation, Operation as Operation$1 } from "oas/operation";
@@ -7,7 +5,9 @@ import { OpenAPIV3 } from "openapi-types";
7
5
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
8
6
  import BaseOas from "oas";
9
7
  import { KubbFile } from "@kubb/fabric-core/types";
8
+ import { Fabric } from "@kubb/react-fabric";
10
9
  import { KubbNode } from "@kubb/react-fabric/types";
10
+ import ts from "typescript";
11
11
 
12
12
  //#region ../oas/src/types.d.ts
13
13
  type contentType = 'application/json' | (string & {});
@@ -101,7 +101,7 @@ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
101
101
  * console.log('Starting Kubb generation')
102
102
  * })
103
103
  *
104
- * events.on('plugin:end', (plugin, duration) => {
104
+ * events.on('plugin:end', (plugin, { duration }) => {
105
105
  * console.log(`Plugin ${plugin.name} completed in ${duration}ms`)
106
106
  * })
107
107
  * ```
@@ -170,21 +170,21 @@ interface KubbEvents {
170
170
  */
171
171
  'hooks:end': [];
172
172
  /**
173
- * Emitted when a single hook execution starts.
174
- */
175
- 'hook:start': [command: string];
176
- /**
177
- * Emitted to execute a hook command (e.g., format or lint).
173
+ * Emitted when a single hook execution starts. (e.g., format or lint).
178
174
  * The callback should be invoked when the command completes.
179
175
  */
180
- 'hook:execute': [{
181
- command: string | URL;
176
+ 'hook:start': [{
177
+ id?: string;
178
+ command: string;
182
179
  args?: readonly string[];
183
- }, cb: () => void];
180
+ }];
184
181
  /**
185
182
  * Emitted when a single hook execution completes.
186
183
  */
187
- 'hook:end': [command: string];
184
+ 'hook:end': [{
185
+ id?: string;
186
+ command: string;
187
+ }];
188
188
  /**
189
189
  * Emitted when a new version of Kubb is available.
190
190
  */
@@ -247,8 +247,13 @@ interface KubbEvents {
247
247
  'plugin:start': [plugin: Plugin];
248
248
  /**
249
249
  * Emitted when a plugin completes execution.
250
+ * Duration in ms
250
251
  */
251
- 'plugin:end': [plugin: Plugin, duration: number];
252
+ 'plugin:end': [plugin: Plugin, meta: {
253
+ duration: number;
254
+ success: boolean;
255
+ error?: Error;
256
+ }];
252
257
  /**
253
258
  * Emitted when plugin hook progress tracking starts.
254
259
  * Contains the hook name and list of plugins to execute.
@@ -707,8 +712,11 @@ type FileMetaBase = {
707
712
  };
708
713
  //#endregion
709
714
  //#region ../plugin-oas/src/types.d.ts
715
+ type GetOasOptions = {
716
+ validate?: boolean;
717
+ };
710
718
  type Context$2 = {
711
- getOas(): Promise<Oas>;
719
+ getOas(options?: GetOasOptions): Promise<Oas>;
712
720
  getBaseURL(): Promise<string | undefined>;
713
721
  };
714
722
  declare global {
@@ -1267,4 +1275,4 @@ type ResolvedOptions = {
1267
1275
  type PluginTs = PluginFactoryOptions<'plugin-ts', Options, ResolvedOptions, never, ResolvePathOptions>;
1268
1276
  //#endregion
1269
1277
  export { UserPluginWithLifeCycle as a, Schema as i, PluginTs as n, OasTypes as o, ReactGenerator as r, SchemaObject$1 as s, Options as t };
1270
- //# sourceMappingURL=types-xVulrECR.d.ts.map
1278
+ //# sourceMappingURL=types-CCmRQ3Mz.d.cts.map
@@ -1,3 +1,5 @@
1
+ import { Fabric } from "@kubb/react-fabric";
2
+ import ts from "typescript";
1
3
  import * as OasTypes from "oas/types";
2
4
  import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
3
5
  import { Operation, Operation as Operation$1 } from "oas/operation";
@@ -5,9 +7,7 @@ import { OpenAPIV3 } from "openapi-types";
5
7
  import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
6
8
  import BaseOas from "oas";
7
9
  import { KubbFile } from "@kubb/fabric-core/types";
8
- import { Fabric } from "@kubb/react-fabric";
9
10
  import { KubbNode } from "@kubb/react-fabric/types";
10
- import ts from "typescript";
11
11
 
12
12
  //#region ../oas/src/types.d.ts
13
13
  type contentType = 'application/json' | (string & {});
@@ -101,7 +101,7 @@ type ExecutedMeta<H extends PluginLifecycleHooks = PluginLifecycleHooks> = {
101
101
  * console.log('Starting Kubb generation')
102
102
  * })
103
103
  *
104
- * events.on('plugin:end', (plugin, duration) => {
104
+ * events.on('plugin:end', (plugin, { duration }) => {
105
105
  * console.log(`Plugin ${plugin.name} completed in ${duration}ms`)
106
106
  * })
107
107
  * ```
@@ -170,21 +170,21 @@ interface KubbEvents {
170
170
  */
171
171
  'hooks:end': [];
172
172
  /**
173
- * Emitted when a single hook execution starts.
174
- */
175
- 'hook:start': [command: string];
176
- /**
177
- * Emitted to execute a hook command (e.g., format or lint).
173
+ * Emitted when a single hook execution starts. (e.g., format or lint).
178
174
  * The callback should be invoked when the command completes.
179
175
  */
180
- 'hook:execute': [{
181
- command: string | URL;
176
+ 'hook:start': [{
177
+ id?: string;
178
+ command: string;
182
179
  args?: readonly string[];
183
- }, cb: () => void];
180
+ }];
184
181
  /**
185
182
  * Emitted when a single hook execution completes.
186
183
  */
187
- 'hook:end': [command: string];
184
+ 'hook:end': [{
185
+ id?: string;
186
+ command: string;
187
+ }];
188
188
  /**
189
189
  * Emitted when a new version of Kubb is available.
190
190
  */
@@ -247,8 +247,13 @@ interface KubbEvents {
247
247
  'plugin:start': [plugin: Plugin];
248
248
  /**
249
249
  * Emitted when a plugin completes execution.
250
+ * Duration in ms
250
251
  */
251
- 'plugin:end': [plugin: Plugin, duration: number];
252
+ 'plugin:end': [plugin: Plugin, meta: {
253
+ duration: number;
254
+ success: boolean;
255
+ error?: Error;
256
+ }];
252
257
  /**
253
258
  * Emitted when plugin hook progress tracking starts.
254
259
  * Contains the hook name and list of plugins to execute.
@@ -707,8 +712,11 @@ type FileMetaBase = {
707
712
  };
708
713
  //#endregion
709
714
  //#region ../plugin-oas/src/types.d.ts
715
+ type GetOasOptions = {
716
+ validate?: boolean;
717
+ };
710
718
  type Context$2 = {
711
- getOas(): Promise<Oas>;
719
+ getOas(options?: GetOasOptions): Promise<Oas>;
712
720
  getBaseURL(): Promise<string | undefined>;
713
721
  };
714
722
  declare global {
@@ -1267,4 +1275,4 @@ type ResolvedOptions = {
1267
1275
  type PluginTs = PluginFactoryOptions<'plugin-ts', Options, ResolvedOptions, never, ResolvePathOptions>;
1268
1276
  //#endregion
1269
1277
  export { UserPluginWithLifeCycle as a, Schema as i, PluginTs as n, OasTypes as o, ReactGenerator as r, SchemaObject$1 as s, Options as t };
1270
- //# sourceMappingURL=types-C7ABVeaM.d.cts.map
1278
+ //# sourceMappingURL=types-DOUgsQdD.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubb/plugin-ts",
3
- "version": "4.12.6",
3
+ "version": "4.12.8",
4
4
  "description": "TypeScript code generation plugin for Kubb, transforming OpenAPI schemas into TypeScript interfaces, types, and utility functions.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -64,17 +64,17 @@
64
64
  }
65
65
  ],
66
66
  "dependencies": {
67
- "@kubb/fabric-core": "0.7.1",
68
- "@kubb/react-fabric": "0.7.1",
67
+ "@kubb/fabric-core": "0.7.4",
68
+ "@kubb/react-fabric": "0.7.4",
69
69
  "natural-orderby": "^5.0.0",
70
70
  "remeda": "^2.32.0",
71
71
  "typescript": "5.9.3",
72
- "@kubb/core": "4.12.6",
73
- "@kubb/oas": "4.12.6",
74
- "@kubb/plugin-oas": "4.12.6"
72
+ "@kubb/core": "4.12.8",
73
+ "@kubb/oas": "4.12.8",
74
+ "@kubb/plugin-oas": "4.12.8"
75
75
  },
76
76
  "peerDependencies": {
77
- "@kubb/react-fabric": "0.7.1",
77
+ "@kubb/react-fabric": "0.7.4",
78
78
  "typescript": ">=5.9.0"
79
79
  },
80
80
  "engines": {