@kubb/core 0.49.0 → 0.50.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.
- package/dist/index.d.ts +9 -1
- package/dist/index.global.js +29 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.js +27 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -4
package/dist/index.d.ts
CHANGED
|
@@ -201,6 +201,14 @@ type Options$1 = {
|
|
|
201
201
|
};
|
|
202
202
|
declare const objectToParameters: (data: Data, options?: Options$1) => string;
|
|
203
203
|
|
|
204
|
+
declare const nameSorter: <T extends {
|
|
205
|
+
name: string;
|
|
206
|
+
}>(a: T, b: T) => 0 | 1 | -1;
|
|
207
|
+
|
|
208
|
+
declare const createJSDocBlockText: ({ comments }: {
|
|
209
|
+
comments: Array<string | undefined>;
|
|
210
|
+
}) => string | undefined;
|
|
211
|
+
|
|
204
212
|
type Import = {
|
|
205
213
|
name: string | string[];
|
|
206
214
|
path: string;
|
|
@@ -385,4 +393,4 @@ declare abstract class SchemaGenerator<TOptions extends object, TInput, TOutput>
|
|
|
385
393
|
abstract build(schema: TInput, name: string, description?: string): TOutput;
|
|
386
394
|
}
|
|
387
395
|
|
|
388
|
-
export { Argument0, CLIOptions, Cache, CacheStore, CorePluginOptions, File, FileManager, FileName, Generator, KubbBuild, KubbConfig, KubbJSONPlugin, KubbPlugin, KubbPluginKind, KubbUserConfig, LogLevel, LogType, Logger, MaybePromise, OptionalPath, Path, PathMode, PluginContext, PluginFactoryOptions, PluginLifecycle, PluginLifecycleHooks, PluginManager, ResolveIdParams, SchemaGenerator, Status, Strategy, TransformResult, TreeNode, UUID, ValidationPluginError, build, clean, createPlugin, createPluginCache, build as default, defineConfig, format, getPathMode, getRelativePath, hooks, isPromise, isURL, name, objectToParameters, read, validatePlugins, write };
|
|
396
|
+
export { Argument0, CLIOptions, Cache, CacheStore, CorePluginOptions, File, FileManager, FileName, Generator, KubbBuild, KubbConfig, KubbJSONPlugin, KubbPlugin, KubbPluginKind, KubbUserConfig, LogLevel, LogType, Logger, MaybePromise, OptionalPath, Path, PathMode, PluginContext, PluginFactoryOptions, PluginLifecycle, PluginLifecycleHooks, PluginManager, ResolveIdParams, SchemaGenerator, Status, Strategy, TransformResult, TreeNode, UUID, ValidationPluginError, build, clean, createJSDocBlockText, createPlugin, createPluginCache, build as default, defineConfig, format, getPathMode, getRelativePath, hooks, isPromise, isURL, name, nameSorter, objectToParameters, read, validatePlugins, write };
|
package/dist/index.global.js
CHANGED
|
@@ -21166,6 +21166,33 @@ var kubb = (function (exports) {
|
|
|
21166
21166
|
}, []).join("");
|
|
21167
21167
|
};
|
|
21168
21168
|
|
|
21169
|
+
// src/utils/nameSorter.ts
|
|
21170
|
+
init_define_process();
|
|
21171
|
+
var nameSorter = (a, b) => {
|
|
21172
|
+
if (a.name < b.name) {
|
|
21173
|
+
return -1;
|
|
21174
|
+
}
|
|
21175
|
+
if (a.name > b.name) {
|
|
21176
|
+
return 1;
|
|
21177
|
+
}
|
|
21178
|
+
return 0;
|
|
21179
|
+
};
|
|
21180
|
+
|
|
21181
|
+
// src/utils/jsdoc.ts
|
|
21182
|
+
init_define_process();
|
|
21183
|
+
var createJSDocBlockText = ({ comments }) => {
|
|
21184
|
+
const filteredComments = comments.filter(Boolean);
|
|
21185
|
+
if (!filteredComments.length) {
|
|
21186
|
+
return void 0;
|
|
21187
|
+
}
|
|
21188
|
+
const text = filteredComments.reduce((acc, comment) => {
|
|
21189
|
+
return `${acc}
|
|
21190
|
+
* ${comment}`;
|
|
21191
|
+
}, "/**");
|
|
21192
|
+
return `${text}
|
|
21193
|
+
*/`;
|
|
21194
|
+
};
|
|
21195
|
+
|
|
21169
21196
|
// src/plugin.ts
|
|
21170
21197
|
function createPlugin(factory) {
|
|
21171
21198
|
return (options) => {
|
|
@@ -21878,6 +21905,7 @@ ${curr.source}`,
|
|
|
21878
21905
|
exports.ValidationPluginError = ValidationPluginError;
|
|
21879
21906
|
exports.build = build;
|
|
21880
21907
|
exports.clean = clean;
|
|
21908
|
+
exports.createJSDocBlockText = createJSDocBlockText;
|
|
21881
21909
|
exports.createPlugin = createPlugin;
|
|
21882
21910
|
exports.createPluginCache = createPluginCache;
|
|
21883
21911
|
exports.default = src_default;
|
|
@@ -21889,6 +21917,7 @@ ${curr.source}`,
|
|
|
21889
21917
|
exports.isPromise = isPromise;
|
|
21890
21918
|
exports.isURL = isURL;
|
|
21891
21919
|
exports.name = name;
|
|
21920
|
+
exports.nameSorter = nameSorter;
|
|
21892
21921
|
exports.objectToParameters = objectToParameters;
|
|
21893
21922
|
exports.read = read;
|
|
21894
21923
|
exports.validatePlugins = validatePlugins;
|