@synkro-sh/cli 1.3.19 → 1.3.20

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
@@ -2652,7 +2652,9 @@ import { createInterface } from "readline";
2652
2652
  function detectGitRepo() {
2653
2653
  try {
2654
2654
  const remoteUrl = execSync2("git remote get-url origin", { encoding: "utf-8", timeout: 5e3 }).trim();
2655
- const match = remoteUrl.match(/(?:github\.com|gitlab\.com|bitbucket\.org)[:/](.+?)(?:\.git)?$/);
2655
+ const sshMatch = remoteUrl.match(/^git@[^:]+:(.+?)(?:\.git)?$/);
2656
+ const httpMatch = remoteUrl.match(/^https?:\/\/[^/]+\/(.+?)(?:\.git)?$/);
2657
+ const match = sshMatch || httpMatch;
2656
2658
  if (!match) return null;
2657
2659
  const fullName = match[1];
2658
2660
  return { fullName, shortName: fullName.split("/").pop() || fullName };
@@ -2721,9 +2723,12 @@ function waitForGithubToken() {
2721
2723
  function openBrowser2(url) {
2722
2724
  const { execFile: execFile2 } = __require("child_process");
2723
2725
  const plat = process.platform;
2724
- if (plat === "darwin") execFile2("open", [url]);
2725
- else if (plat === "win32") execFile2("cmd", ["/c", "start", "", url]);
2726
- else execFile2("xdg-open", [url]);
2726
+ const cb = (err) => {
2727
+ if (err) console.log(` Open this URL manually: ${url}`);
2728
+ };
2729
+ if (plat === "darwin") execFile2("open", [url], cb);
2730
+ else if (plat === "win32") execFile2("cmd", ["/c", "start", "", url], cb);
2731
+ else execFile2("xdg-open", [url], cb);
2727
2732
  }
2728
2733
  async function connectGithubAndSelectRepos() {
2729
2734
  const url = `${SYNKRO_WEB_AUTH_URL2}/cli-github?port=${GITHUB_PORT}`;
@@ -3233,7 +3238,7 @@ function writeConfigEnv(opts) {
3233
3238
  `SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
3234
3239
  `SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
3235
3240
  `SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
3236
- `SYNKRO_VERSION=${shellQuoteSingle("1.3.19")}`
3241
+ `SYNKRO_VERSION=${shellQuoteSingle("1.3.20")}`
3237
3242
  ];
3238
3243
  if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
3239
3244
  if (safeOrgId) lines.push(`SYNKRO_ORG_ID=${shellQuoteSingle(safeOrgId)}`);
@@ -3546,7 +3551,9 @@ async function installCommand(opts = {}) {
3546
3551
  function detectGitRepo2() {
3547
3552
  try {
3548
3553
  const remoteUrl = execSync4("git remote get-url origin", { encoding: "utf-8", timeout: 5e3 }).trim();
3549
- const match = remoteUrl.match(/(?:github\.com|gitlab\.com|bitbucket\.org)[:/](.+?)(?:\.git)?$/);
3554
+ const sshMatch = remoteUrl.match(/^git@[^:]+:(.+?)(?:\.git)?$/);
3555
+ const httpMatch = remoteUrl.match(/^https?:\/\/[^/]+\/(.+?)(?:\.git)?$/);
3556
+ const match = sshMatch || httpMatch;
3550
3557
  return match ? match[1] : null;
3551
3558
  } catch {
3552
3559
  return null;