@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.cjs CHANGED
@@ -191,7 +191,7 @@ function memoize(store, factory) {
191
191
  }
192
192
  //#endregion
193
193
  //#region package.json
194
- var version = "5.0.0-beta.98";
194
+ var version = "5.0.0-beta.99";
195
195
  //#endregion
196
196
  //#region src/constants.ts
197
197
  /**
@@ -713,7 +713,7 @@ var Diagnostics = class Diagnostics {
713
713
  * since a single-file output has nothing to group.
714
714
  */
715
715
  function normalizeOutput({ output, group, pluginName }) {
716
- const mode = output.mode ?? "directory";
716
+ const mode = output.mode ?? "file";
717
717
  if (mode === "file" && group) throw new Diagnostics.Error({
718
718
  code: diagnosticCode.invalidPluginOptions,
719
719
  severity: "error",
@@ -1029,12 +1029,12 @@ var Resolver = class Resolver {
1029
1029
  return segment ? require_usingCtx.camelCase(segment) : "";
1030
1030
  }
1031
1031
  /**
1032
- * `mode: 'file'` resolves directly to `output.path`. `mode: 'directory'` (default) resolves
1032
+ * `mode: 'file'` (default) resolves directly to `output.path`. `mode: 'directory'` resolves
1033
1033
  * to `output.path/{baseName}`, or into a subdirectory when `group` and a `tag`/`path` value
1034
1034
  * are provided.
1035
1035
  */
1036
1036
  #resolvePath({ baseName, tag, path: groupPath, root, output, group }) {
1037
- if (output.mode === "file") return node_path.default.resolve(root, output.path);
1037
+ if (output.mode !== "directory") return node_path.default.resolve(root, output.path);
1038
1038
  const outputDir = node_path.default.resolve(root, output.path);
1039
1039
  const result = group && (groupPath || tag) ? node_path.default.resolve(outputDir, Resolver.#resolveGroupDir(group, group.type === "path" ? groupPath : tag), baseName) : node_path.default.resolve(outputDir, baseName);
1040
1040
  const outputDirWithSep = outputDir.endsWith(node_path.default.sep) ? outputDir : `${outputDir}${node_path.default.sep}`;