@kubb/core 1.4.0 → 1.4.2
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.
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/globals.d.ts +1 -0
- package/package.json +5 -6
- package/dist/index.cjs +0 -1587
- package/dist/index.cjs.map +0 -1
- package/dist/index.js +0 -1519
- package/dist/index.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -78,7 +78,7 @@ declare class Queue {
|
|
|
78
78
|
|
|
79
79
|
declare function getEncodedText(text?: string): string;
|
|
80
80
|
|
|
81
|
-
declare function renderTemplate<TData extends Record<string,
|
|
81
|
+
declare function renderTemplate<TData extends Record<string, unknown> = Record<string, unknown>>(template: string, data?: TData | undefined): string;
|
|
82
82
|
|
|
83
83
|
declare function clean(path: string): Promise<boolean>;
|
|
84
84
|
|
|
@@ -100,7 +100,7 @@ declare function transformReservedWord(word: string): string;
|
|
|
100
100
|
|
|
101
101
|
declare function getStackTrace(belowFn?: Function): NodeJS.CallSite[];
|
|
102
102
|
|
|
103
|
-
declare const
|
|
103
|
+
declare const uniqueIdFactory: (counter: number) => (str?: string) => string;
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Normalizes directories to have a trailing slash.
|
|
@@ -229,8 +229,12 @@ type Status = 'new' | 'success' | 'removed';
|
|
|
229
229
|
|
|
230
230
|
declare function getIndexes(root: string, options?: TreeNodeOptions): File[] | null;
|
|
231
231
|
declare function combineFiles(files: Array<File | null>): File[];
|
|
232
|
-
|
|
232
|
+
/**
|
|
233
|
+
* Support for js, ts and tsx(React)
|
|
234
|
+
*/
|
|
235
|
+
type Extension = '.ts' | '.js' | '.tsx';
|
|
233
236
|
declare const extensions: Array<Extension>;
|
|
237
|
+
declare function isExtensionAllowed(fileName: string): boolean;
|
|
234
238
|
declare function getFileSource(file: File): string;
|
|
235
239
|
|
|
236
240
|
declare class FileManager {
|
|
@@ -704,4 +708,4 @@ declare abstract class SchemaGenerator<TOptions extends object, TInput, TOutput>
|
|
|
704
708
|
abstract build(schema: TInput, name: string, description?: string): TOutput;
|
|
705
709
|
}
|
|
706
710
|
|
|
707
|
-
export { Argument0, BuildOutput, CLIOptions, Cache, CacheItem, CorePluginOptions, Executer, Extension, File, FileManager, FileName, Generator, KubbConfig, KubbJSONPlugins, KubbObjectPlugin, KubbObjectPlugins, KubbPlugin, KubbPluginKind, KubbUserConfig, KubbUserPlugin, LogLevel, LogLevels, LogType, Logger, OptionalPath, ParallelPluginError, ParseResult, Path, PathMode, PluginCache, PluginContext, PluginError, PluginFactoryOptions, PluginLifecycle, PluginLifecycleHooks, PluginManager, PossiblePromise, Queue, QueueJob, Register, ResolveNameParams, ResolvePathParams, ResolvedFile, SafeParseResult, SchemaGenerator, Source, Status, Strategy, SummaryError, TransformResult, TreeNode, TreeNodeOptions, URLPath, UUID, ValidationPluginError, Warning, build, canLogHierarchy, clean, combineFiles, createJSDocBlockText, createLogger, createPlugin, createPluginCache, build as default, defaultColours, defineConfig, extensions, getEncodedText, getFileSource, getIndexes, getLocation, getPathMode, getRelativePath, getStackTrace, getUniqueName, hooks, importModule, isPromise, isPromiseFulfilledResult, isPromiseRejectedResult, pluginName as name, nameSorter, normalizeDirectory, objectToParameters, pluginName, randomColour, randomPicoColour, read, renderTemplate, throttle, timeout, transformReservedWord,
|
|
711
|
+
export { Argument0, BuildOutput, CLIOptions, Cache, CacheItem, CorePluginOptions, Executer, Export, Extension, File, FileManager, FileName, Generator, Import, KubbConfig, KubbJSONPlugins, KubbObjectPlugin, KubbObjectPlugins, KubbPlugin, KubbPluginKind, KubbUserConfig, KubbUserPlugin, LogLevel, LogLevels, LogType, Logger, OptionalPath, ParallelPluginError, ParseResult, Path, PathMode, PluginCache, PluginContext, PluginError, PluginFactoryOptions, PluginLifecycle, PluginLifecycleHooks, PluginManager, PossiblePromise, Queue, QueueJob, Register, ResolveNameParams, ResolvePathParams, ResolvedFile, SafeParseResult, SchemaGenerator, Source, Status, Strategy, SummaryError, TransformResult, TreeNode, TreeNodeOptions, URLPath, UUID, ValidationPluginError, Warning, build, canLogHierarchy, clean, combineFiles, createJSDocBlockText, createLogger, createPlugin, createPluginCache, build as default, defaultColours, defineConfig, extensions, getEncodedText, getFileSource, getIndexes, getLocation, getPathMode, getRelativePath, getStackTrace, getUniqueName, hooks, importModule, isExtensionAllowed, isPromise, isPromiseFulfilledResult, isPromiseRejectedResult, pluginName as name, nameSorter, normalizeDirectory, objectToParameters, pluginName, randomColour, randomPicoColour, read, renderTemplate, throttle, timeout, transformReservedWord, uniqueIdFactory, validatePlugins, write };
|
package/dist/index.d.ts
CHANGED
|
@@ -78,7 +78,7 @@ declare class Queue {
|
|
|
78
78
|
|
|
79
79
|
declare function getEncodedText(text?: string): string;
|
|
80
80
|
|
|
81
|
-
declare function renderTemplate<TData extends Record<string,
|
|
81
|
+
declare function renderTemplate<TData extends Record<string, unknown> = Record<string, unknown>>(template: string, data?: TData | undefined): string;
|
|
82
82
|
|
|
83
83
|
declare function clean(path: string): Promise<boolean>;
|
|
84
84
|
|
|
@@ -100,7 +100,7 @@ declare function transformReservedWord(word: string): string;
|
|
|
100
100
|
|
|
101
101
|
declare function getStackTrace(belowFn?: Function): NodeJS.CallSite[];
|
|
102
102
|
|
|
103
|
-
declare const
|
|
103
|
+
declare const uniqueIdFactory: (counter: number) => (str?: string) => string;
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Normalizes directories to have a trailing slash.
|
|
@@ -229,8 +229,12 @@ type Status = 'new' | 'success' | 'removed';
|
|
|
229
229
|
|
|
230
230
|
declare function getIndexes(root: string, options?: TreeNodeOptions): File[] | null;
|
|
231
231
|
declare function combineFiles(files: Array<File | null>): File[];
|
|
232
|
-
|
|
232
|
+
/**
|
|
233
|
+
* Support for js, ts and tsx(React)
|
|
234
|
+
*/
|
|
235
|
+
type Extension = '.ts' | '.js' | '.tsx';
|
|
233
236
|
declare const extensions: Array<Extension>;
|
|
237
|
+
declare function isExtensionAllowed(fileName: string): boolean;
|
|
234
238
|
declare function getFileSource(file: File): string;
|
|
235
239
|
|
|
236
240
|
declare class FileManager {
|
|
@@ -704,4 +708,4 @@ declare abstract class SchemaGenerator<TOptions extends object, TInput, TOutput>
|
|
|
704
708
|
abstract build(schema: TInput, name: string, description?: string): TOutput;
|
|
705
709
|
}
|
|
706
710
|
|
|
707
|
-
export { Argument0, BuildOutput, CLIOptions, Cache, CacheItem, CorePluginOptions, Executer, Extension, File, FileManager, FileName, Generator, KubbConfig, KubbJSONPlugins, KubbObjectPlugin, KubbObjectPlugins, KubbPlugin, KubbPluginKind, KubbUserConfig, KubbUserPlugin, LogLevel, LogLevels, LogType, Logger, OptionalPath, ParallelPluginError, ParseResult, Path, PathMode, PluginCache, PluginContext, PluginError, PluginFactoryOptions, PluginLifecycle, PluginLifecycleHooks, PluginManager, PossiblePromise, Queue, QueueJob, Register, ResolveNameParams, ResolvePathParams, ResolvedFile, SafeParseResult, SchemaGenerator, Source, Status, Strategy, SummaryError, TransformResult, TreeNode, TreeNodeOptions, URLPath, UUID, ValidationPluginError, Warning, build, canLogHierarchy, clean, combineFiles, createJSDocBlockText, createLogger, createPlugin, createPluginCache, build as default, defaultColours, defineConfig, extensions, getEncodedText, getFileSource, getIndexes, getLocation, getPathMode, getRelativePath, getStackTrace, getUniqueName, hooks, importModule, isPromise, isPromiseFulfilledResult, isPromiseRejectedResult, pluginName as name, nameSorter, normalizeDirectory, objectToParameters, pluginName, randomColour, randomPicoColour, read, renderTemplate, throttle, timeout, transformReservedWord,
|
|
711
|
+
export { Argument0, BuildOutput, CLIOptions, Cache, CacheItem, CorePluginOptions, Executer, Export, Extension, File, FileManager, FileName, Generator, Import, KubbConfig, KubbJSONPlugins, KubbObjectPlugin, KubbObjectPlugins, KubbPlugin, KubbPluginKind, KubbUserConfig, KubbUserPlugin, LogLevel, LogLevels, LogType, Logger, OptionalPath, ParallelPluginError, ParseResult, Path, PathMode, PluginCache, PluginContext, PluginError, PluginFactoryOptions, PluginLifecycle, PluginLifecycleHooks, PluginManager, PossiblePromise, Queue, QueueJob, Register, ResolveNameParams, ResolvePathParams, ResolvedFile, SafeParseResult, SchemaGenerator, Source, Status, Strategy, SummaryError, TransformResult, TreeNode, TreeNodeOptions, URLPath, UUID, ValidationPluginError, Warning, build, canLogHierarchy, clean, combineFiles, createJSDocBlockText, createLogger, createPlugin, createPluginCache, build as default, defaultColours, defineConfig, extensions, getEncodedText, getFileSource, getIndexes, getLocation, getPathMode, getRelativePath, getStackTrace, getUniqueName, hooks, importModule, isExtensionAllowed, isPromise, isPromiseFulfilledResult, isPromiseRejectedResult, pluginName as name, nameSorter, normalizeDirectory, objectToParameters, pluginName, randomColour, randomPicoColour, read, renderTemplate, throttle, timeout, transformReservedWord, uniqueIdFactory, validatePlugins, write };
|
package/globals.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ type KubbObjectPlugins = {
|
|
|
10
10
|
['@kubb/swagger-ts']: import('@kubb/swagger-ts').PluginOptions
|
|
11
11
|
['@kubb/swagger-zod']: import('@kubb/swagger-zod').PluginOptions
|
|
12
12
|
['@kubb/swagger-zodios']: import('@kubb/swagger-zodios').PluginOptions
|
|
13
|
+
['@kubb/swagger-form']: import('@kubb/swagger-form').PluginOptions
|
|
13
14
|
}
|
|
14
15
|
/**
|
|
15
16
|
* `tsconfig.json`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Generator core",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"typescript",
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
"type": "module",
|
|
20
20
|
"exports": {
|
|
21
21
|
".": {
|
|
22
|
-
"types": "./dist/index.d.ts",
|
|
23
22
|
"import": "./dist/index.js",
|
|
24
23
|
"module": "./dist/index.js",
|
|
25
24
|
"default": "./dist/index.cjs"
|
|
@@ -51,7 +50,7 @@
|
|
|
51
50
|
"picocolors": "^1.0.0",
|
|
52
51
|
"rimraf": "^5.0.1",
|
|
53
52
|
"seedrandom": "^3.0.5",
|
|
54
|
-
"@kubb/ts-codegen": "1.4.
|
|
53
|
+
"@kubb/ts-codegen": "1.4.2"
|
|
55
54
|
},
|
|
56
55
|
"devDependencies": {
|
|
57
56
|
"@types/fs-extra": "^11.0.1",
|
|
@@ -59,10 +58,10 @@
|
|
|
59
58
|
"eslint": "^8.43.0",
|
|
60
59
|
"ora": "^6.3.1",
|
|
61
60
|
"tsup": "^7.1.0",
|
|
62
|
-
"typescript": "^5.1.
|
|
63
|
-
"@kubb/eslint-config": "1.
|
|
61
|
+
"typescript": "^5.1.5",
|
|
62
|
+
"@kubb/eslint-config": "1.1.8",
|
|
64
63
|
"@kubb/ts-config": "0.1.0",
|
|
65
|
-
"@kubb/tsup-config": "1.
|
|
64
|
+
"@kubb/tsup-config": "1.1.8"
|
|
66
65
|
},
|
|
67
66
|
"packageManager": "pnpm@8.3.0",
|
|
68
67
|
"engines": {
|