@synkro-sh/cli 1.3.56 → 1.3.58

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
@@ -3594,7 +3594,9 @@ function captureClaudeSetupToken() {
3594
3594
  let raw = "";
3595
3595
  try {
3596
3596
  raw = readFileSync4(tmpFile, "utf-8");
3597
- } catch {
3597
+ } catch (e) {
3598
+ reject(new Error(`Could not read script output file: ${e.message}`));
3599
+ return;
3598
3600
  }
3599
3601
  try {
3600
3602
  unlinkSync3(tmpFile);
@@ -3604,13 +3606,16 @@ function captureClaudeSetupToken() {
3604
3606
  reject(new Error(`claude setup-token exited with code ${code}`));
3605
3607
  return;
3606
3608
  }
3607
- const stripped = raw.replace(/\x1B\[[0-9;]*[A-Za-z]|\x1B\][^\x07]*\x07/g, "");
3608
- const match = stripped.replace(/\s/g, "").match(/sk-ant-oat01-[A-Za-z0-9_-]+AAA/);
3609
- if (!match) {
3610
- reject(new Error("Could not find token in claude setup-token output"));
3609
+ const yellowRe = /\x1B\[38;2;255;193;7m([^\x1B]*)/g;
3610
+ let yellow = "";
3611
+ let m;
3612
+ while ((m = yellowRe.exec(raw)) !== null) yellow += m[1];
3613
+ const token = yellow.replace(/\s/g, "").match(/sk-ant-oat01-[A-Za-z0-9_-]+/);
3614
+ if (!token) {
3615
+ reject(new Error(`Could not find token in claude setup-token output (file=${raw.length}b, yellow=${yellow.length}b)`));
3611
3616
  return;
3612
3617
  }
3613
- resolve2(match[0]);
3618
+ resolve2(token[0]);
3614
3619
  });
3615
3620
  });
3616
3621
  }
@@ -3980,7 +3985,7 @@ function writeConfigEnv(opts) {
3980
3985
  `SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
3981
3986
  `SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
3982
3987
  `SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
3983
- `SYNKRO_VERSION=${shellQuoteSingle("1.3.56")}`
3988
+ `SYNKRO_VERSION=${shellQuoteSingle("1.3.58")}`
3984
3989
  ];
3985
3990
  if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
3986
3991
  if (safeOrgId) lines.push(`SYNKRO_ORG_ID=${shellQuoteSingle(safeOrgId)}`);