@wise/wds-codemods 1.0.0-experimental-a96ea6f → 1.0.0-experimental-8a5b52a

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.
@@ -5,8 +5,6 @@ node_fs_promises = require_constants$1.__toESM(node_fs_promises);
5
5
  let node_path = require("node:path");
6
6
  node_path = require_constants$1.__toESM(node_path);
7
7
  let __inquirer_prompts = require("@inquirer/prompts");
8
- let ora = require("ora");
9
- ora = require_constants$1.__toESM(ora);
10
8
  let node_fs = require("node:fs");
11
9
  node_fs = require_constants$1.__toESM(node_fs);
12
10
  let node_util = require("node:util");
@@ -1525,7 +1523,7 @@ const renderTable = (data, indexHeading = "index") => {
1525
1523
  const remainingLines = columnWidths.slice(1).map((width) => "─".repeat(width + 2));
1526
1524
  const topSeparator = `┌${firstCellLine}┬${remainingLines.join("┬")}┐`;
1527
1525
  const midSeparator = `├${firstCellLine}┼${remainingLines.join("┼")}┤`;
1528
- const endSeparator = `└${firstCellLine}┴${remainingLines.join("┴")}┘\n`;
1526
+ const endSeparator = `└${firstCellLine}┴${remainingLines.join("┴")}┘`;
1529
1527
  const formatRow = (cells) => {
1530
1528
  return `│${cells.map((cell, index) => {
1531
1529
  const padding = columnWidths[index] - getDisplayWidth(cell);
@@ -1611,7 +1609,7 @@ const assessPrerequisites = (packagePath, codemodPath) => {
1611
1609
  }
1612
1610
  });
1613
1611
  if (!isCompliant) {
1614
- console.info(`${require_constants$1.CONSOLE_ICONS.error} \x1b[1mPrerequisite check failed\x1b[0m`);
1612
+ console.info(`${require_constants$1.CONSOLE_ICONS.error} \x1b[31mPrerequisite check failed -\x1b[0m \x1b[2m${packagePath}\x1b[0m`);
1615
1613
  renderTable(comparisons, "package");
1616
1614
  return false;
1617
1615
  }
@@ -1627,8 +1625,7 @@ const assessPrerequisites = (packagePath, codemodPath) => {
1627
1625
  * - Deduplicates by package root and checks each unique root once
1628
1626
  * - Logs a concise summary; detailed table is logged by assessPrerequisites on failure
1629
1627
  */
1630
- const assessPrerequisitesBatch = (targetPaths, codemodPath) => {
1631
- const prereqSpinner = (0, ora.default)("Checking prerequisites...\n").start();
1628
+ const assessPrerequisitesBatch = (targetPaths, codemodPath, spinnies) => {
1632
1629
  const packageRootToTargets = /* @__PURE__ */ new Map();
1633
1630
  const failedTargetsNoPackage = [];
1634
1631
  for (const target of targetPaths) {
@@ -1651,12 +1648,12 @@ const assessPrerequisitesBatch = (targetPaths, codemodPath) => {
1651
1648
  const uniquePackages = packageRootToTargets.size;
1652
1649
  const passedCount = Array.from(results.values()).filter(Boolean).length;
1653
1650
  const failedCount = uniquePackages - passedCount;
1654
- if (failedTargetsNoPackage.length || !passedCount) if (!passedCount) prereqSpinner.fail(`All targets failed prerequisite checks`);
1651
+ if (failedTargetsNoPackage.length || !passedCount) if (!passedCount) spinnies.fail("prerequisite-check", { text: "All targets failed prerequisite checks" });
1655
1652
  else {
1656
- prereqSpinner.fail(`No package.json found for ${failedTargetsNoPackage.length} target${failedTargetsNoPackage.length !== 1 ? "s" : ""} (searching upwards to project root).`);
1653
+ spinnies.fail("prerequisite-check", { text: `No package.json found for ${failedTargetsNoPackage.length} target${failedTargetsNoPackage.length !== 1 ? "s" : ""} (searching upwards to project root).` });
1657
1654
  failedTargetsNoPackage.forEach((t$5) => console.error(`- ${t$5}`));
1658
1655
  }
1659
- else prereqSpinner.succeed(`Checked ${totalTargets} target${totalTargets !== 1 ? "s" : ""} across ${uniquePackages} package${uniquePackages !== 1 ? "s" : ""}: ${passedCount} passed, ${failedCount} failed.`);
1656
+ else spinnies.succeed("prerequisite-check", { text: `\x1b[0mChecked ${totalTargets} target${totalTargets !== 1 ? "s" : ""} across ${uniquePackages} package${uniquePackages !== 1 ? "s" : ""}:\x1b[0m \x1b[32m${passedCount} passed\x1b[0m, \x1b[31m${failedCount} failed\x1b[0m.` });
1660
1657
  const failedPackageRoots = Array.from(results.entries()).filter(([, ok]) => !ok).map(([root]) => root);
1661
1658
  return {
1662
1659
  allPassed,
@@ -2039,4 +2036,4 @@ Object.defineProperty(exports, 'validateClaudeConfig', {
2039
2036
  return validateClaudeConfig;
2040
2037
  }
2041
2038
  });
2042
- //# sourceMappingURL=helpers-TwDiPzvk.js.map
2039
+ //# sourceMappingURL=helpers-C9EIzTCd.js.map