@theholocron/cli 3.19.0 → 3.19.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/dist/cli.mjs CHANGED
@@ -2775,7 +2775,13 @@ const WORKFLOW_CHECK_CONTEXTS = {
2775
2775
  function generateThinCallerContent(name, withOverrides, additionalPaths) {
2776
2776
  const base = WORKFLOW_TEMPLATES[name];
2777
2777
  if (!base) return "";
2778
- const fmt = (k, v) => ` ${k}: ${v === true ? "true" : v === false ? "false" : String(v)}`;
2778
+ const yamlScalar = (v) => {
2779
+ if (v === true) return "true";
2780
+ if (v === false) return "false";
2781
+ const s = String(v);
2782
+ return s.startsWith("[") || s.startsWith("{") ? `'${s}'` : s;
2783
+ };
2784
+ const fmt = (k, v) => ` ${k}: ${yamlScalar(v)}`;
2779
2785
  let result = base;
2780
2786
  if (additionalPaths && additionalPaths.length > 0) result = result.replace(/( {4}paths:\n)((?:[ ]{6}- [^\n]+\n)+)/, (_, header, existing) => {
2781
2787
  const existingPaths = new Set([...existing.matchAll(/- (.+)/g)].map((m) => m[1]));
@@ -2790,7 +2796,7 @@ function generateThinCallerContent(name, withOverrides, additionalPaths) {
2790
2796
  const m = line.match(/^ {6}([^:]+):\s*(.*)/);
2791
2797
  return m ? [m[1].trim(), m[2].trim()] : null;
2792
2798
  }).filter((e) => e !== null));
2793
- for (const [k, v] of Object.entries(withOverrides)) existingEntries.set(k, v === true ? "true" : v === false ? "false" : String(v));
2799
+ for (const [k, v] of Object.entries(withOverrides)) existingEntries.set(k, yamlScalar(v));
2794
2800
  const merged = [...existingEntries.entries()].map(([k, v]) => ` ${k}: ${v}`).join("\n");
2795
2801
  return result.replace(withBlockRe, ` with:\n${merged}\n`);
2796
2802
  }