@kubb/core 3.0.0-beta.3 → 3.0.0-beta.5

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.
@@ -111,34 +111,34 @@ declare class PluginManager {
111
111
  }
112
112
 
113
113
  /**
114
- * Config used in `kubb.config.js`
114
+ * Config used in `kubb.config.ts`
115
115
  *
116
- * @example import { defineConfig } from '@kubb/core'
116
+ * @example
117
+ * import { defineConfig } from '@kubb/core'
117
118
  * export default defineConfig({
118
119
  * ...
119
120
  * })
120
121
  */
121
122
  type UserConfig = Omit<Config, 'root' | 'plugins'> & {
122
123
  /**
123
- * Project root directory. Can be an absolute path, or a path relative from
124
- * the location of the config file itself.
124
+ * The project root directory, which can be either an absolute path or a path relative to the location of your `kubb.config.ts` file.
125
125
  * @default process.cwd()
126
126
  */
127
127
  root?: string;
128
128
  /**
129
- * Plugin type should be a Kubb plugin
129
+ * An array of Kubb plugins used for generation. Each plugin may have additional configurable options (defined within the plugin itself). If a plugin relies on another plugin, an error will occur if the required dependency is missing. Refer to “pre” for more details.
130
130
  */
131
131
  plugins?: Array<Omit<UnknownUserPlugin, 'context'>>;
132
132
  };
133
133
  type InputPath = {
134
134
  /**
135
- * Define your Swagger/OpenAPI file. This can be an absolute path or a path relative to the `root`.
135
+ * Specify your Swagger/OpenAPI file, either as an absolute path or a path relative to the root.
136
136
  */
137
137
  path: string;
138
138
  };
139
139
  type InputData = {
140
140
  /**
141
- * `string` or `object` containing your Swagger/OpenAPI data.
141
+ * A `string` or `object` that contains your Swagger/OpenAPI data.
142
142
  */
143
143
  data: string | unknown;
144
144
  };
@@ -149,21 +149,22 @@ type BarrelType = 'all' | 'named';
149
149
  */
150
150
  type Config<TInput = Input> = {
151
151
  /**
152
- * Optional config name to show in CLI output
152
+ * The name to display in the CLI output.
153
153
  */
154
154
  name?: string;
155
155
  /**
156
- * Project root directory. This can be an absolute path or a path relative to the location of your `kubb.config.ts` file.
156
+ * The project root directory, which can be either an absolute path or a path relative to the location of your `kubb.config.ts` file.
157
157
  * @default process.cwd()
158
158
  */
159
159
  root: string;
160
160
  /**
161
- * You can use `input.path` or `input.data` depending on the needs you have.
161
+ * You can use either `input.path` or `input.data`, depending on your specific needs.
162
162
  */
163
163
  input: TInput;
164
164
  output: {
165
165
  /**
166
- * The path where all generated files will be exported. This can be an absolute path or a path relative to the specified root option.
166
+ * The path where all generated files will be exported.
167
+ * This can be an absolute path or a path relative to the specified root option.
167
168
  */
168
169
  path: string;
169
170
  /**
@@ -176,13 +177,13 @@ type Config<TInput = Input> = {
176
177
  */
177
178
  write?: boolean;
178
179
  /**
179
- * Override the extension to the generated imports and exports, by default the plugin will add an extension
180
- * @default `{ '.ts': '.ts'}`
180
+ * Override the extension to the generated imports and exports, by default each plugin will add an extension
181
+ * @default { '.ts': '.ts'}
181
182
  */
182
183
  extension?: Record<KubbFile.Extname, KubbFile.Extname>;
183
184
  /**
184
- * Define what needs to exported, here you can also disable the export of barrel files.
185
- * @default `'named'`
185
+ * Specify how `index.ts` files should be created. You can also disable the generation of barrel files here. While each plugin has its own `barrelType` option, this setting controls the creation of the root barrel file, such as` src/gen/index.ts`.
186
+ * @default 'named'
186
187
  */
187
188
  barrelType?: BarrelType | false;
188
189
  };
@@ -368,7 +369,7 @@ type Output = {
368
369
  path: string;
369
370
  /**
370
371
  * Define what needs to be exported, here you can also disable the export of barrel files
371
- * @default `'named'`
372
+ * @default 'named'
372
373
  */
373
374
  barrelType?: BarrelType | false;
374
375
  /**
@@ -111,34 +111,34 @@ declare class PluginManager {
111
111
  }
112
112
 
113
113
  /**
114
- * Config used in `kubb.config.js`
114
+ * Config used in `kubb.config.ts`
115
115
  *
116
- * @example import { defineConfig } from '@kubb/core'
116
+ * @example
117
+ * import { defineConfig } from '@kubb/core'
117
118
  * export default defineConfig({
118
119
  * ...
119
120
  * })
120
121
  */
121
122
  type UserConfig = Omit<Config, 'root' | 'plugins'> & {
122
123
  /**
123
- * Project root directory. Can be an absolute path, or a path relative from
124
- * the location of the config file itself.
124
+ * The project root directory, which can be either an absolute path or a path relative to the location of your `kubb.config.ts` file.
125
125
  * @default process.cwd()
126
126
  */
127
127
  root?: string;
128
128
  /**
129
- * Plugin type should be a Kubb plugin
129
+ * An array of Kubb plugins used for generation. Each plugin may have additional configurable options (defined within the plugin itself). If a plugin relies on another plugin, an error will occur if the required dependency is missing. Refer to “pre” for more details.
130
130
  */
131
131
  plugins?: Array<Omit<UnknownUserPlugin, 'context'>>;
132
132
  };
133
133
  type InputPath = {
134
134
  /**
135
- * Define your Swagger/OpenAPI file. This can be an absolute path or a path relative to the `root`.
135
+ * Specify your Swagger/OpenAPI file, either as an absolute path or a path relative to the root.
136
136
  */
137
137
  path: string;
138
138
  };
139
139
  type InputData = {
140
140
  /**
141
- * `string` or `object` containing your Swagger/OpenAPI data.
141
+ * A `string` or `object` that contains your Swagger/OpenAPI data.
142
142
  */
143
143
  data: string | unknown;
144
144
  };
@@ -149,21 +149,22 @@ type BarrelType = 'all' | 'named';
149
149
  */
150
150
  type Config<TInput = Input> = {
151
151
  /**
152
- * Optional config name to show in CLI output
152
+ * The name to display in the CLI output.
153
153
  */
154
154
  name?: string;
155
155
  /**
156
- * Project root directory. This can be an absolute path or a path relative to the location of your `kubb.config.ts` file.
156
+ * The project root directory, which can be either an absolute path or a path relative to the location of your `kubb.config.ts` file.
157
157
  * @default process.cwd()
158
158
  */
159
159
  root: string;
160
160
  /**
161
- * You can use `input.path` or `input.data` depending on the needs you have.
161
+ * You can use either `input.path` or `input.data`, depending on your specific needs.
162
162
  */
163
163
  input: TInput;
164
164
  output: {
165
165
  /**
166
- * The path where all generated files will be exported. This can be an absolute path or a path relative to the specified root option.
166
+ * The path where all generated files will be exported.
167
+ * This can be an absolute path or a path relative to the specified root option.
167
168
  */
168
169
  path: string;
169
170
  /**
@@ -176,13 +177,13 @@ type Config<TInput = Input> = {
176
177
  */
177
178
  write?: boolean;
178
179
  /**
179
- * Override the extension to the generated imports and exports, by default the plugin will add an extension
180
- * @default `{ '.ts': '.ts'}`
180
+ * Override the extension to the generated imports and exports, by default each plugin will add an extension
181
+ * @default { '.ts': '.ts'}
181
182
  */
182
183
  extension?: Record<KubbFile.Extname, KubbFile.Extname>;
183
184
  /**
184
- * Define what needs to exported, here you can also disable the export of barrel files.
185
- * @default `'named'`
185
+ * Specify how `index.ts` files should be created. You can also disable the generation of barrel files here. While each plugin has its own `barrelType` option, this setting controls the creation of the root barrel file, such as` src/gen/index.ts`.
186
+ * @default 'named'
186
187
  */
187
188
  barrelType?: BarrelType | false;
188
189
  };
@@ -368,7 +369,7 @@ type Output = {
368
369
  path: string;
369
370
  /**
370
371
  * Define what needs to be exported, here you can also disable the export of barrel files
371
- * @default `'named'`
372
+ * @default 'named'
372
373
  */
373
374
  barrelType?: BarrelType | false;
374
375
  /**
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk72BWXKV4_cjs = require('./chunk-72BWXKV4.cjs');
3
+ var chunkYEWLGG6A_cjs = require('./chunk-YEWLGG6A.cjs');
4
4
  var util = require('util');
5
5
  var path = require('path');
6
6
  var tty = require('tty');
@@ -30,7 +30,7 @@ var tty__namespace = /*#__PURE__*/_interopNamespace(tty);
30
30
  var process$1__default = /*#__PURE__*/_interopDefault(process$1);
31
31
 
32
32
  // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/core.mjs
33
- chunk72BWXKV4_cjs.init_cjs_shims();
33
+ chunkYEWLGG6A_cjs.init_cjs_shims();
34
34
  var LogLevels = {
35
35
  silent: Number.NEGATIVE_INFINITY,
36
36
  fatal: 0,
@@ -433,7 +433,7 @@ function createConsola(options = {}) {
433
433
  }
434
434
 
435
435
  // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.06ad8a64.mjs
436
- chunk72BWXKV4_cjs.init_cjs_shims();
436
+ chunkYEWLGG6A_cjs.init_cjs_shims();
437
437
  function parseStack(stack) {
438
438
  const cwd = process.cwd() + path.sep;
439
439
  const lines = stack.split("\n").splice(1).map((l) => l.trim().replace("file://", "").replace(cwd, ""));
@@ -491,7 +491,7 @@ var BasicReporter = class {
491
491
  };
492
492
 
493
493
  // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/utils.mjs
494
- chunk72BWXKV4_cjs.init_cjs_shims();
494
+ chunkYEWLGG6A_cjs.init_cjs_shims();
495
495
  var {
496
496
  env = {},
497
497
  argv = [],
@@ -723,7 +723,7 @@ function box(text, _opts = {}) {
723
723
  }
724
724
 
725
725
  // ../../node_modules/.pnpm/consola@3.2.3/node_modules/consola/dist/shared/consola.36c0034f.mjs
726
- chunk72BWXKV4_cjs.init_cjs_shims();
726
+ chunkYEWLGG6A_cjs.init_cjs_shims();
727
727
  var providers = [
728
728
  ["APPVEYOR"],
729
729
  ["AZURE_PIPELINES", "SYSTEM_TEAMFOUNDATIONCOLLECTIONURI"],
@@ -1061,7 +1061,7 @@ function createConsola2(options = {}) {
1061
1061
  defaults: { level },
1062
1062
  stdout: process.stdout,
1063
1063
  stderr: process.stderr,
1064
- prompt: (...args) => import('./prompt-FODZPXQF.cjs').then((m) => m.prompt(...args)),
1064
+ prompt: (...args) => import('./prompt-NXAVVYGK.cjs').then((m) => m.prompt(...args)),
1065
1065
  reporters: options.reporters || [
1066
1066
  options.fancy ?? !(isCI2 || isTest) ? new FancyReporter() : new BasicReporter()
1067
1067
  ],
@@ -1084,5 +1084,5 @@ exports.colors = colors;
1084
1084
  exports.createConsola = createConsola2;
1085
1085
  exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
1086
1086
  exports.isUnicodeSupported = isUnicodeSupported;
1087
- //# sourceMappingURL=chunk-KXT7F2WS.cjs.map
1088
- //# sourceMappingURL=chunk-KXT7F2WS.cjs.map
1087
+ //# sourceMappingURL=chunk-2JGRDU6N.cjs.map
1088
+ //# sourceMappingURL=chunk-2JGRDU6N.cjs.map