@kubb/core 0.47.0 → 0.47.1

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 CHANGED
@@ -195,6 +195,12 @@ declare const isURL: (data: string) => boolean;
195
195
 
196
196
  declare const format: (source: string) => string;
197
197
 
198
+ type Data = string[][];
199
+ type Options$1 = {
200
+ typed?: boolean;
201
+ };
202
+ declare const objectToParameters: (data: Data, options?: Options$1) => string;
203
+
198
204
  type Import = {
199
205
  name: string | string[];
200
206
  path: string;
@@ -379,4 +385,4 @@ declare abstract class SchemaGenerator<TOptions extends object, TInput, TOutput>
379
385
  abstract build(schema: TInput, name: string, description?: string): TOutput;
380
386
  }
381
387
 
382
- 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, read, validatePlugins, write };
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 };
@@ -21153,6 +21153,19 @@ var kubb = (function (exports) {
21153
21153
  return (0, import_js_beautify.default)(source, formatOptions);
21154
21154
  };
21155
21155
 
21156
+ // src/utils/objectToParameters.ts
21157
+ init_define_process();
21158
+ var objectToParameters = (data, options = {}) => {
21159
+ return data.reduce((acc, [key, value]) => {
21160
+ if (options.typed) {
21161
+ acc.push(`${key}: ${value}["${key}"], `);
21162
+ } else {
21163
+ acc.push(`${key},`);
21164
+ }
21165
+ return acc;
21166
+ }, []).join("");
21167
+ };
21168
+
21156
21169
  // src/plugin.ts
21157
21170
  function createPlugin(factory) {
21158
21171
  return (options) => {
@@ -21876,6 +21889,7 @@ ${curr.source}`,
21876
21889
  exports.isPromise = isPromise;
21877
21890
  exports.isURL = isURL;
21878
21891
  exports.name = name;
21892
+ exports.objectToParameters = objectToParameters;
21879
21893
  exports.read = read;
21880
21894
  exports.validatePlugins = validatePlugins;
21881
21895
  exports.write = write;