webpipe-js 2.0.69 → 2.0.71

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
@@ -567,9 +567,11 @@ var Parser = class {
567
567
  this.skipInlineSpaces();
568
568
  let config = "";
569
569
  let configType = "quoted";
570
+ let hasConfig = false;
570
571
  let configStart = void 0;
571
572
  let configEnd = void 0;
572
573
  if (this.cur() === ":") {
574
+ hasConfig = true;
573
575
  this.pos++;
574
576
  this.skipInlineSpaces();
575
577
  configStart = this.pos;
@@ -582,7 +584,7 @@ var Parser = class {
582
584
  const parsedJoinTargets = name === "join" ? this.parseJoinTaskNames(config) : void 0;
583
585
  this.skipWhitespaceOnly();
584
586
  const end = this.pos;
585
- return { kind: "Regular", name, nameStart, nameEnd, args, config, configType, configStart, configEnd, condition, parsedJoinTargets, start, end };
587
+ return { kind: "Regular", name, nameStart, nameEnd, args, config, configType, hasConfig, configStart, configEnd, condition, parsedJoinTargets, start, end };
586
588
  }
587
589
  /**
588
590
  * Parse optional step condition (tag expression after the config)
@@ -2073,9 +2075,9 @@ function formatConfigValue(value) {
2073
2075
  function formatPipelineStep(step, indent = " ", isLastStep = false) {
2074
2076
  if (step.kind === "Regular") {
2075
2077
  const argsPart = step.args.length > 0 ? `(${step.args.join(", ")})` : "";
2076
- const configPart = formatStepConfig(step.config, step.configType);
2077
2078
  const conditionPart = step.condition ? " " + formatTagExpr(step.condition) : "";
2078
- return `${indent}|> ${step.name}${argsPart}: ${configPart}${conditionPart}`;
2079
+ const configPart = step.hasConfig ? `: ${formatStepConfig(step.config, step.configType)}` : "";
2080
+ return `${indent}|> ${step.name}${argsPart}${configPart}${conditionPart}`;
2079
2081
  } else if (step.kind === "Result") {
2080
2082
  const lines = [`${indent}|> result`];
2081
2083
  step.branches.forEach((branch) => {
package/dist/index.d.cts CHANGED
@@ -168,6 +168,7 @@ type PipelineStep = {
168
168
  args: string[];
169
169
  config: string;
170
170
  configType: ConfigType;
171
+ hasConfig: boolean;
171
172
  configStart?: number;
172
173
  configEnd?: number;
173
174
  condition?: TagExpr;
package/dist/index.d.ts CHANGED
@@ -168,6 +168,7 @@ type PipelineStep = {
168
168
  args: string[];
169
169
  config: string;
170
170
  configType: ConfigType;
171
+ hasConfig: boolean;
171
172
  configStart?: number;
172
173
  configEnd?: number;
173
174
  condition?: TagExpr;
package/dist/index.mjs CHANGED
@@ -513,9 +513,11 @@ var Parser = class {
513
513
  this.skipInlineSpaces();
514
514
  let config = "";
515
515
  let configType = "quoted";
516
+ let hasConfig = false;
516
517
  let configStart = void 0;
517
518
  let configEnd = void 0;
518
519
  if (this.cur() === ":") {
520
+ hasConfig = true;
519
521
  this.pos++;
520
522
  this.skipInlineSpaces();
521
523
  configStart = this.pos;
@@ -528,7 +530,7 @@ var Parser = class {
528
530
  const parsedJoinTargets = name === "join" ? this.parseJoinTaskNames(config) : void 0;
529
531
  this.skipWhitespaceOnly();
530
532
  const end = this.pos;
531
- return { kind: "Regular", name, nameStart, nameEnd, args, config, configType, configStart, configEnd, condition, parsedJoinTargets, start, end };
533
+ return { kind: "Regular", name, nameStart, nameEnd, args, config, configType, hasConfig, configStart, configEnd, condition, parsedJoinTargets, start, end };
532
534
  }
533
535
  /**
534
536
  * Parse optional step condition (tag expression after the config)
@@ -2019,9 +2021,9 @@ function formatConfigValue(value) {
2019
2021
  function formatPipelineStep(step, indent = " ", isLastStep = false) {
2020
2022
  if (step.kind === "Regular") {
2021
2023
  const argsPart = step.args.length > 0 ? `(${step.args.join(", ")})` : "";
2022
- const configPart = formatStepConfig(step.config, step.configType);
2023
2024
  const conditionPart = step.condition ? " " + formatTagExpr(step.condition) : "";
2024
- return `${indent}|> ${step.name}${argsPart}: ${configPart}${conditionPart}`;
2025
+ const configPart = step.hasConfig ? `: ${formatStepConfig(step.config, step.configType)}` : "";
2026
+ return `${indent}|> ${step.name}${argsPart}${configPart}${conditionPart}`;
2025
2027
  } else if (step.kind === "Result") {
2026
2028
  const lines = [`${indent}|> result`];
2027
2029
  step.branches.forEach((branch) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpipe-js",
3
- "version": "2.0.69",
3
+ "version": "2.0.71",
4
4
  "description": "Web Pipe parser",
5
5
  "license": "ISC",
6
6
  "author": "William Cotton",