@synkro-sh/cli 1.6.41 → 1.6.43
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 +22 -10
- package/dist/bootstrap.js.map +1 -1
- package/package.json +1 -1
package/dist/bootstrap.js
CHANGED
|
@@ -19,7 +19,7 @@ var __export = (target, all) => {
|
|
|
19
19
|
import { existsSync } from "fs";
|
|
20
20
|
import { homedir } from "os";
|
|
21
21
|
import { join } from "path";
|
|
22
|
-
import { execSync } from "child_process";
|
|
22
|
+
import { execFileSync, execSync } from "child_process";
|
|
23
23
|
function which(cmd2) {
|
|
24
24
|
try {
|
|
25
25
|
const result = execSync(`which ${cmd2}`, { encoding: "utf-8" }).trim();
|
|
@@ -30,8 +30,9 @@ function which(cmd2) {
|
|
|
30
30
|
}
|
|
31
31
|
function getVersion(cmd2) {
|
|
32
32
|
try {
|
|
33
|
-
const result =
|
|
34
|
-
|
|
33
|
+
const result = execFileSync(cmd2, ["--version"], { encoding: "utf-8", timeout: 5e3 }).trim();
|
|
34
|
+
const line = result.split("\n")[0];
|
|
35
|
+
return line.replace(/\s*\(Claude Code\)/, "");
|
|
35
36
|
} catch {
|
|
36
37
|
return void 0;
|
|
37
38
|
}
|
|
@@ -53,14 +54,25 @@ function detectAgents() {
|
|
|
53
54
|
}
|
|
54
55
|
const cursorBinary = which("cursor");
|
|
55
56
|
const cursorConfigDir = join(home, ".cursor");
|
|
56
|
-
|
|
57
|
+
const cursorApp = process.platform === "darwin" && existsSync("/Applications/Cursor.app");
|
|
58
|
+
if (cursorBinary || cursorApp || existsSync(cursorConfigDir)) {
|
|
59
|
+
let version;
|
|
60
|
+
if (cursorBinary) {
|
|
61
|
+
version = getVersion("cursor");
|
|
62
|
+
} else if (cursorApp) {
|
|
63
|
+
try {
|
|
64
|
+
const plist = execSync("defaults read /Applications/Cursor.app/Contents/Info CFBundleShortVersionString 2>/dev/null", { encoding: "utf-8", timeout: 3e3 }).trim();
|
|
65
|
+
if (plist) version = plist;
|
|
66
|
+
} catch {
|
|
67
|
+
}
|
|
68
|
+
}
|
|
57
69
|
agents.push({
|
|
58
70
|
kind: "cursor",
|
|
59
71
|
name: "Cursor",
|
|
60
72
|
binaryPath: cursorBinary,
|
|
61
73
|
configDir: cursorConfigDir,
|
|
62
74
|
settingsPath: join(cursorConfigDir, "hooks.json"),
|
|
63
|
-
version
|
|
75
|
+
version
|
|
64
76
|
});
|
|
65
77
|
}
|
|
66
78
|
return agents;
|
|
@@ -6570,7 +6582,7 @@ var init_githubSetup = __esm({
|
|
|
6570
6582
|
});
|
|
6571
6583
|
|
|
6572
6584
|
// cli/commands/repoConnect.ts
|
|
6573
|
-
import { execSync as execSync3, execFileSync } from "child_process";
|
|
6585
|
+
import { execSync as execSync3, execFileSync as execFileSync2 } from "child_process";
|
|
6574
6586
|
import { readdirSync } from "fs";
|
|
6575
6587
|
import { createServer as createServer2 } from "http";
|
|
6576
6588
|
import { createInterface } from "readline";
|
|
@@ -6594,7 +6606,7 @@ function detectSubdirRepos() {
|
|
|
6594
6606
|
for (const entry of entries) {
|
|
6595
6607
|
if (!entry.isDirectory() || entry.name.startsWith(".")) continue;
|
|
6596
6608
|
try {
|
|
6597
|
-
const remoteUrl =
|
|
6609
|
+
const remoteUrl = execFileSync2("git", ["-C", entry.name, "remote", "get-url", "origin"], {
|
|
6598
6610
|
encoding: "utf-8",
|
|
6599
6611
|
timeout: 5e3,
|
|
6600
6612
|
stdio: ["pipe", "pipe", "pipe"]
|
|
@@ -8250,7 +8262,7 @@ function writeConfigEnv(opts) {
|
|
|
8250
8262
|
`SYNKRO_CREDENTIALS_PATH=${shellQuoteSingle(credsPath)}`,
|
|
8251
8263
|
`SYNKRO_TIER=${shellQuoteSingle(safeTier)}`,
|
|
8252
8264
|
`SYNKRO_INFERENCE=${shellQuoteSingle(safeInference)}`,
|
|
8253
|
-
`SYNKRO_VERSION=${shellQuoteSingle("1.6.
|
|
8265
|
+
`SYNKRO_VERSION=${shellQuoteSingle("1.6.43")}`
|
|
8254
8266
|
];
|
|
8255
8267
|
if (safeSynkroBin) lines.push(`SYNKRO_CLI_BIN=${shellQuoteSingle(safeSynkroBin)}`);
|
|
8256
8268
|
if (safeUserId) lines.push(`SYNKRO_USER_ID=${shellQuoteSingle(safeUserId)}`);
|
|
@@ -10232,7 +10244,7 @@ var init_grade = __esm({
|
|
|
10232
10244
|
});
|
|
10233
10245
|
|
|
10234
10246
|
// cli/local-cc/pueue.ts
|
|
10235
|
-
import { execFileSync as
|
|
10247
|
+
import { execFileSync as execFileSync3, spawnSync as spawnSync6, spawn } from "child_process";
|
|
10236
10248
|
import { homedir as homedir12 } from "os";
|
|
10237
10249
|
import { join as join12 } from "path";
|
|
10238
10250
|
import { connect as connect2 } from "net";
|
|
@@ -11313,7 +11325,7 @@ var args = process.argv.slice(2);
|
|
|
11313
11325
|
var cmd = args[0] || "";
|
|
11314
11326
|
var subArgs = args.slice(1);
|
|
11315
11327
|
function printVersion() {
|
|
11316
|
-
console.log("1.6.
|
|
11328
|
+
console.log("1.6.43");
|
|
11317
11329
|
}
|
|
11318
11330
|
function printHelp2() {
|
|
11319
11331
|
console.log(`Synkro CLI \u2014 runtime safety for AI coding agents
|