@kubb/core 5.0.0-beta.98 → 5.0.0-beta.99

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
@@ -1,5 +1,5 @@
1
1
  import { t as __name } from "./rolldown-runtime-C0LytTxp.js";
2
- import { $ as definePlugin, A as Generator, At as DiagnosticSeverity, B as Include, Bt as AdapterSource, C as KubbWarnContext, Ct as UserReporter, D as CreateKubbOptions, Dt as DiagnosticDoc, E as UserConfig, Et as Diagnostic, F as Parser, Ft as SerializedDiagnostic, G as Output, H as KubbPluginSetupContext, I as defineParser, It as UpdateDiagnostic, J as Override, K as OutputMode, L as Exclude, Lt as Hookable, M as defineGenerator, Mt as PerformanceDiagnostic, N as KubbDriver, Nt as ProblemCode, O as Kubb, Ot as DiagnosticKind, P as FileManagerHooks, Pt as ProblemDiagnostic, Q as ResolvePluginOptions, R as Filter, Rt as Adapter, S as KubbSuccessContext, St as ReporterName, T as PostGenerateCommand, Tt as logLevel, U as KubbPluginStartContext, V as KubbPluginEndContext, Vt as createAdapter, W as NormalizedPlugin, X as PluginFactoryOptions, Y as Plugin, Z as PluginName, _ as KubbHookStartContext, _t as Storage, a as KubbBuildEndContext, at as ResolveOptionsContext, b as KubbLifecycleStartContext, bt as Reporter, c as KubbErrorContext, ct as ResolverDefault, d as KubbFilesProcessingStartContext, dt as ResolverFilePathParams, et as BannerMeta, f as KubbFilesProcessingUpdateContext, ft as ResolverPatch, g as KubbHookLineContext, gt as createRenderer, h as KubbHookEndContext, ht as RendererFactory, i as Input, it as ResolveImportsOptions, j as GeneratorContext, jt as Diagnostics, k as createKubb, kt as DiagnosticLocation, l as KubbFileProcessingUpdate, lt as ResolverFile, m as KubbGenerationStartContext, mt as Renderer, n as CLIOptions, nt as ResolveBannerFile, o as KubbBuildStartContext, ot as ResolvePathOptions, p as KubbGenerationEndContext, pt as ResolverPathParams, q as OutputOptions, r as Config, rt as ResolveFileOptions, s as KubbDiagnosticContext, st as Resolver, t as BuildOutput, tt as ResolveBannerContext, u as KubbFilesProcessingEndContext, ut as ResolverFileParams, v as KubbHooks, vt as createStorage, w as PossibleConfig, wt as createReporter, x as KubbPluginsEndContext, xt as ReporterContext, y as KubbInfoContext, yt as GenerationResult, z as Group, zt as AdapterFactoryOptions } from "./types-CK6CfipY.js";
2
+ import { $ as definePlugin, A as Generator, At as DiagnosticSeverity, B as Include, Bt as AdapterSource, C as KubbWarnContext, Ct as UserReporter, D as CreateKubbOptions, Dt as DiagnosticDoc, E as UserConfig, Et as Diagnostic, F as Parser, Ft as SerializedDiagnostic, G as Output, H as KubbPluginSetupContext, I as defineParser, It as UpdateDiagnostic, J as Override, K as OutputMode, L as Exclude, Lt as Hookable, M as defineGenerator, Mt as PerformanceDiagnostic, N as KubbDriver, Nt as ProblemCode, O as Kubb, Ot as DiagnosticKind, P as FileManagerHooks, Pt as ProblemDiagnostic, Q as ResolvePluginOptions, R as Filter, Rt as Adapter, S as KubbSuccessContext, St as ReporterName, T as PostGenerateCommand, Tt as logLevel, U as KubbPluginStartContext, V as KubbPluginEndContext, Vt as createAdapter, W as NormalizedPlugin, X as PluginFactoryOptions, Y as Plugin, Z as PluginName, _ as KubbHookStartContext, _t as Storage, a as KubbBuildEndContext, at as ResolveOptionsContext, b as KubbLifecycleStartContext, bt as Reporter, c as KubbErrorContext, ct as ResolverDefault, d as KubbFilesProcessingStartContext, dt as ResolverFilePathParams, et as BannerMeta, f as KubbFilesProcessingUpdateContext, ft as ResolverPatch, g as KubbHookLineContext, gt as createRenderer, h as KubbHookEndContext, ht as RendererFactory, i as Input, it as ResolveImportsOptions, j as GeneratorContext, jt as Diagnostics, k as createKubb, kt as DiagnosticLocation, l as KubbFileProcessingUpdate, lt as ResolverFile, m as KubbGenerationStartContext, mt as Renderer, n as CLIOptions, nt as ResolveBannerFile, o as KubbBuildStartContext, ot as ResolvePathOptions, p as KubbGenerationEndContext, pt as ResolverPathParams, q as OutputOptions, r as Config, rt as ResolveFileOptions, s as KubbDiagnosticContext, st as Resolver, t as BuildOutput, tt as ResolveBannerContext, u as KubbFilesProcessingEndContext, ut as ResolverFileParams, v as KubbHooks, vt as createStorage, w as PossibleConfig, wt as createReporter, x as KubbPluginsEndContext, xt as ReporterContext, y as KubbInfoContext, yt as GenerationResult, z as Group, zt as AdapterFactoryOptions } from "./types-DM7-MGjZ.js";
3
3
  //#region src/applyConfigDefaults.d.ts
4
4
  type ApplyConfigDefaultsOptions<TOutput> = {
5
5
  defaultAdapter: Adapter;
package/dist/index.js CHANGED
@@ -189,7 +189,7 @@ function memoize(store, factory) {
189
189
  }
190
190
  //#endregion
191
191
  //#region package.json
192
- var version = "5.0.0-beta.98";
192
+ var version = "5.0.0-beta.99";
193
193
  //#endregion
194
194
  //#region src/constants.ts
195
195
  /**
@@ -711,7 +711,7 @@ var Diagnostics = class Diagnostics {
711
711
  * since a single-file output has nothing to group.
712
712
  */
713
713
  function normalizeOutput({ output, group, pluginName }) {
714
- const mode = output.mode ?? "directory";
714
+ const mode = output.mode ?? "file";
715
715
  if (mode === "file" && group) throw new Diagnostics.Error({
716
716
  code: diagnosticCode.invalidPluginOptions,
717
717
  severity: "error",
@@ -1027,12 +1027,12 @@ var Resolver = class Resolver {
1027
1027
  return segment ? camelCase(segment) : "";
1028
1028
  }
1029
1029
  /**
1030
- * `mode: 'file'` resolves directly to `output.path`. `mode: 'directory'` (default) resolves
1030
+ * `mode: 'file'` (default) resolves directly to `output.path`. `mode: 'directory'` resolves
1031
1031
  * to `output.path/{baseName}`, or into a subdirectory when `group` and a `tag`/`path` value
1032
1032
  * are provided.
1033
1033
  */
1034
1034
  #resolvePath({ baseName, tag, path: groupPath, root, output, group }) {
1035
- if (output.mode === "file") return path.resolve(root, output.path);
1035
+ if (output.mode !== "directory") return path.resolve(root, output.path);
1036
1036
  const outputDir = path.resolve(root, output.path);
1037
1037
  const result = group && (groupPath || tag) ? path.resolve(outputDir, Resolver.#resolveGroupDir(group, group.type === "path" ? groupPath : tag), baseName) : path.resolve(outputDir, baseName);
1038
1038
  const outputDirWithSep = outputDir.endsWith(path.sep) ? outputDir : `${outputDir}${path.sep}`;