Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@kubb/core

Package Overview
Dependencies
Maintainers
1
Versions
662
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@kubb/core - npm Package Compare versions

Comparing version 0.32.0 to 0.33.0

35

dist/index.d.ts

@@ -160,4 +160,19 @@ import EventEmitter from 'events';

};
type KubbPluginKind = 'schema' | 'controller';
type KubbPlugin<TOptions extends PluginFactoryOptions = PluginFactoryOptions> = {
/**
* Unique name used for the plugin
* @example @kubb/typescript
*/
name: string;
/**
* Kind/type for the plugin
* Type 'schema' can be used for JSON schema's, Typescript types, ...
* Type 'controller' can be used to create generate API calls, React-Query hooks, Axios controllers, ...
* @default undefined
*/
kind?: KubbPluginKind;
/**
* Defined an api that can be used by other plugins
*/
api?: TOptions['api'];

@@ -342,2 +357,20 @@ } & Partial<PluginLifecycle>;

export { Argument0, CLIOptions, Cache, CacheStore, CorePluginOptions, EmittedFile, File, FileManager, FileName, KubbConfig, KubbPlugin, KubbUserConfig, LogLevel, LogType, Logger, MaybePromise, OptionalPath, Path, PathMode, PluginContext, PluginFactoryOptions, PluginLifecycle, PluginLifecycleHooks, PluginManager, ResolveIdParams, Status, Strategy, TransformResult, TreeNode, UUID, ValidationPluginError, build, createPlugin, createPluginCache, build as default, defineConfig, format, getPathMode, getRelativePath, hooks, isPromise, validatePlugins, write };
/**
* Abstract class that contains the building blocks for plugins to create their own Generator
* @link idea based on https://github.com/colinhacks/zod/blob/master/src/types.ts#L137
*/
declare abstract class Generator<TOptions extends object = object> {
private _options;
constructor(options?: TOptions);
get options(): TOptions;
abstract build(...params: any): any;
}
/**
* Abstract class that contains the building blocks for plugins to create their own SchemaGenerator
*/
declare abstract class SchemaGenerator<TOptions extends object, TInput, TOutput> extends Generator<TOptions> {
abstract build(schema: TInput, name: string, description?: string): TOutput;
}
export { Argument0, CLIOptions, Cache, CacheStore, CorePluginOptions, EmittedFile, File, FileManager, FileName, Generator, KubbConfig, KubbPlugin, KubbPluginKind, KubbUserConfig, LogLevel, LogType, Logger, MaybePromise, OptionalPath, Path, PathMode, PluginContext, PluginFactoryOptions, PluginLifecycle, PluginLifecycleHooks, PluginManager, ResolveIdParams, SchemaGenerator, Status, Strategy, TransformResult, TreeNode, UUID, ValidationPluginError, build, createPlugin, createPluginCache, build as default, defineConfig, format, getPathMode, getRelativePath, hooks, isPromise, validatePlugins, write };

@@ -581,2 +581,23 @@ 'use strict';

// src/generators/Generator.ts
var Generator = class {
_options = {};
constructor(options = {}) {
if (options) {
this._options = {
...this._options,
...options
};
}
return this;
}
get options() {
return this._options;
}
};
// src/generators/SchemaGenerator.ts
var SchemaGenerator = class extends Generator {
};
// src/index.ts

@@ -586,3 +607,5 @@ var src_default = build;

exports.FileManager = FileManager;
exports.Generator = Generator;
exports.PluginManager = PluginManager;
exports.SchemaGenerator = SchemaGenerator;
exports.TreeNode = TreeNode;

@@ -589,0 +612,0 @@ exports.ValidationPluginError = ValidationPluginError;

2

package.json
{
"name": "@kubb/core",
"version": "0.32.0",
"version": "0.33.0",
"description": "Generator core",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc