@elastic/esql 1.4.0 → 1.4.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/lib/index.mjs CHANGED
@@ -27553,7 +27553,12 @@ ${inp.indent})`;
27553
27553
  optionsTxt.push(out.txt);
27554
27554
  options += (options ? " " : "") + out.txt;
27555
27555
  }
27556
- breakOptions = breakOptions || args.lines > 1 || optionsLines > 1 || options.length > opts.wrap - inp.remaining - cmd3.length - 1 - args.txt.length;
27556
+ const pipeTab = opts.pipeTab ?? " ";
27557
+ const pipeAndSpaceLength = "| ".length;
27558
+ const spaceBetweenCmdAndArgsLength = 1;
27559
+ const linePrefixLength = inp.indent.length + pipeTab.length + pipeAndSpaceLength + cmd3.length + spaceBetweenCmdAndArgsLength + args.txt.length;
27560
+ const remainingForOptions = opts.wrap - linePrefixLength;
27561
+ breakOptions = breakOptions || args.lines > 1 || optionsLines > 1 || options.length > remainingForOptions;
27557
27562
  if (breakOptions) {
27558
27563
  options = optionsTxt.join("\n" + optionIndent);
27559
27564
  }