@kubb/plugin-fetch 5.5.1 → 5.5.2

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
@@ -1249,6 +1249,14 @@ function createSdkGenerator() {
1249
1249
  const { config, resolver, root } = ctx;
1250
1250
  const { output, group, validator, returnType, throwOnErrorDefault, sdk } = ctx.options;
1251
1251
  if (!sdk) return null;
1252
+ if (sdk.mode === "tag" && output.mode === "file") throw new kubb_kit.Diagnostics.Error({
1253
+ code: kubb_kit.Diagnostics.code.invalidPluginOptions,
1254
+ severity: "error",
1255
+ message: `Plugin "${ctx.plugin.name}" resolves \`output.mode\` to 'file' but also configures \`sdk.mode: 'tag'\`.`,
1256
+ help: "A single-file output has nothing to split tag classes into. Set `sdk.mode: 'flat'` to emit one class into that file, or give `output.path` an extensionless directory name (or set `output.mode: 'directory'` explicitly) so each tag gets its own file.",
1257
+ location: { kind: "config" },
1258
+ plugin: ctx.plugin.name
1259
+ });
1252
1260
  const types = resolveOperationTypes(ctx.driver);
1253
1261
  if (!types) {
1254
1262
  ctx.warn(MISSING_OPERATION_TYPES_WARNING);