@synkro-sh/cli 1.3.37 → 1.3.38

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/bootstrap.js CHANGED
@@ -1508,7 +1508,11 @@ if [ "$USE_LOCAL" = "true" ]; then
1508
1508
  if [ -n "$V_INNER" ]; then
1509
1509
  LOCAL_OK=$(printf '%s' "$V_INNER" | sed -nE 's|.*<ok>(.*)</ok>.*|\\1|p' | head -1)
1510
1510
  LOCAL_OK="\${LOCAL_OK:-true}"
1511
- # Extract first <violation>...</violation> block, then fields from it.
1511
+ # Top-level <reason> (clean diff). Skip text inside <violation>...</violation>
1512
+ # by stripping those blocks first so the regex doesn't grab a violation reason.
1513
+ OUTER_V=$(printf '%s' "$V_INNER" | sed -E 's|<violation>[^<]*(<[^/]+>[^<]*</[^>]+>[^<]*)*</violation>||g')
1514
+ OUTER_REASON=$(printf '%s' "$OUTER_V" | sed -nE 's|.*<reason>(.*)</reason>.*|\\1|p' | head -1)
1515
+ # First violation block fields (when ok=false).
1512
1516
  FIRST_V=$(printf '%s' "$V_INNER" | awk -v RS='</violation>' '/<violation>/{print; exit}')
1513
1517
  LOCAL_SEV=$(printf '%s' "$FIRST_V" | sed -nE 's|.*<severity>(.*)</severity>.*|\\1|p' | head -1)
1514
1518
  LOCAL_CAT=$(printf '%s' "$FIRST_V" | sed -nE 's|.*<category>(.*)</category>.*|\\1|p' | head -1)
@@ -1519,10 +1523,11 @@ if [ "$USE_LOCAL" = "true" ]; then
1519
1523
  --arg sev "\${LOCAL_SEV:-low}" \\
1520
1524
  --arg cat "\${LOCAL_CAT:-unspecified}" \\
1521
1525
  --arg reason "$LOCAL_REASON" \\
1526
+ --arg outer_reason "$OUTER_REASON" \\
1522
1527
  'if $ok == "false" then
1523
1528
  {ok: false, severity: $sev, category: $cat, reason: $reason}
1524
1529
  else
1525
- {ok: true, severity: "low", category: "clean", reason: ""}
1530
+ {ok: true, severity: "low", category: "clean", reason: $outer_reason}
1526
1531
  end')
1527
1532
  else
1528
1533
  RESP=""
@@ -3718,7 +3723,7 @@ function writeConfigEnv(opts) {
3718
3723
  `SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
3719
3724
  `SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
3720
3725
  `SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
3721
- `SYNKRO_VERSION=${shellQuoteSingle("1.3.37")}`
3726
+ `SYNKRO_VERSION=${shellQuoteSingle("1.3.38")}`
3722
3727
  ];
3723
3728
  if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
3724
3729
  if (safeOrgId) lines.push(`SYNKRO_ORG_ID=${shellQuoteSingle(safeOrgId)}`);