webpipe-js 2.0.43 → 2.0.44

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
@@ -1693,17 +1693,25 @@ function printTest(test) {
1693
1693
  lines.push("");
1694
1694
  }
1695
1695
  lines.push(` when ${formatWhen(test.when)}`);
1696
- if (test.input) {
1697
- lines.push(` with input \`${test.input}\``);
1696
+ let hasWithClause = false;
1697
+ if (test.headers) {
1698
+ lines.push(` with headers \`${test.headers}\``);
1699
+ hasWithClause = true;
1698
1700
  }
1699
1701
  if (test.body) {
1700
- lines.push(` with body \`${test.body}\``);
1702
+ const prefix = hasWithClause ? "and with" : "with";
1703
+ lines.push(` ${prefix} body \`${test.body}\``);
1704
+ hasWithClause = true;
1701
1705
  }
1702
- if (test.headers) {
1703
- lines.push(` with headers \`${test.headers}\``);
1706
+ if (test.input) {
1707
+ const prefix = hasWithClause ? "and with" : "with";
1708
+ lines.push(` ${prefix} input \`${test.input}\``);
1709
+ hasWithClause = true;
1704
1710
  }
1705
1711
  if (test.cookies) {
1706
- lines.push(` with cookies \`${test.cookies}\``);
1712
+ const prefix = hasWithClause ? "and with" : "with";
1713
+ lines.push(` ${prefix} cookies \`${test.cookies}\``);
1714
+ hasWithClause = true;
1707
1715
  }
1708
1716
  test.conditions.forEach((condition) => {
1709
1717
  lines.push(printCondition(condition));
package/dist/index.mjs CHANGED
@@ -1640,17 +1640,25 @@ function printTest(test) {
1640
1640
  lines.push("");
1641
1641
  }
1642
1642
  lines.push(` when ${formatWhen(test.when)}`);
1643
- if (test.input) {
1644
- lines.push(` with input \`${test.input}\``);
1643
+ let hasWithClause = false;
1644
+ if (test.headers) {
1645
+ lines.push(` with headers \`${test.headers}\``);
1646
+ hasWithClause = true;
1645
1647
  }
1646
1648
  if (test.body) {
1647
- lines.push(` with body \`${test.body}\``);
1649
+ const prefix = hasWithClause ? "and with" : "with";
1650
+ lines.push(` ${prefix} body \`${test.body}\``);
1651
+ hasWithClause = true;
1648
1652
  }
1649
- if (test.headers) {
1650
- lines.push(` with headers \`${test.headers}\``);
1653
+ if (test.input) {
1654
+ const prefix = hasWithClause ? "and with" : "with";
1655
+ lines.push(` ${prefix} input \`${test.input}\``);
1656
+ hasWithClause = true;
1651
1657
  }
1652
1658
  if (test.cookies) {
1653
- lines.push(` with cookies \`${test.cookies}\``);
1659
+ const prefix = hasWithClause ? "and with" : "with";
1660
+ lines.push(` ${prefix} cookies \`${test.cookies}\``);
1661
+ hasWithClause = true;
1654
1662
  }
1655
1663
  test.conditions.forEach((condition) => {
1656
1664
  lines.push(printCondition(condition));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpipe-js",
3
- "version": "2.0.43",
3
+ "version": "2.0.44",
4
4
  "description": "Web Pipe parser",
5
5
  "license": "ISC",
6
6
  "author": "William Cotton",