echoclaw-relay-agent 0.23.1 → 0.23.2
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.js
CHANGED
|
@@ -24,11 +24,11 @@ async function getServiceManager() {
|
|
|
24
24
|
const platform = detectPlatform();
|
|
25
25
|
switch (platform) {
|
|
26
26
|
case "macos": {
|
|
27
|
-
const { LaunchdService } = await import("./launchd-
|
|
27
|
+
const { LaunchdService } = await import("./launchd-6FICJJGR.js");
|
|
28
28
|
return new LaunchdService();
|
|
29
29
|
}
|
|
30
30
|
case "linux": {
|
|
31
|
-
const { SystemdService } = await import("./systemd-
|
|
31
|
+
const { SystemdService } = await import("./systemd-XHWEBL2W.js");
|
|
32
32
|
return new SystemdService();
|
|
33
33
|
}
|
|
34
34
|
case "windows": {
|
|
@@ -110,7 +110,10 @@ import path from "node:path";
|
|
|
110
110
|
var __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
111
111
|
function readCurrentVersion() {
|
|
112
112
|
const candidates = [
|
|
113
|
+
path.join(__dirname, "../package.json"),
|
|
114
|
+
// esbuild: dist/ → root
|
|
113
115
|
path.join(__dirname, "../../package.json"),
|
|
116
|
+
// tsc: dist/ota/ → root
|
|
114
117
|
path.join(__dirname, "../../../package.json")
|
|
115
118
|
];
|
|
116
119
|
for (const p of candidates) {
|
|
@@ -50,7 +50,15 @@ var LaunchdService = class {
|
|
|
50
50
|
}
|
|
51
51
|
await bootoutService();
|
|
52
52
|
const nodeExe = process.execPath;
|
|
53
|
-
const
|
|
53
|
+
const selfDir = path.dirname(fileURLToPath(import.meta.url));
|
|
54
|
+
const candidates = [
|
|
55
|
+
path.resolve(selfDir, "cli.js"),
|
|
56
|
+
// esbuild: dist/cli.js (same dir)
|
|
57
|
+
path.resolve(selfDir, "..", "cli.js")
|
|
58
|
+
// tsc: dist/service/ → dist/cli.js
|
|
59
|
+
];
|
|
60
|
+
const { existsSync } = await import("node:fs");
|
|
61
|
+
const cliPath = candidates.find((p) => existsSync(p)) ?? candidates[0];
|
|
54
62
|
const args = ["--gateway", "--relay", relayServer];
|
|
55
63
|
if (options?.bridgePort !== void 0) {
|
|
56
64
|
args.push("--bridge-port", String(options.bridgePort));
|
|
@@ -55,7 +55,15 @@ function validatePort(port) {
|
|
|
55
55
|
var SystemdService = class {
|
|
56
56
|
async install(relayServer, options) {
|
|
57
57
|
const nodeExe = process.execPath;
|
|
58
|
-
const
|
|
58
|
+
const selfDir = path.dirname(fileURLToPath(import.meta.url));
|
|
59
|
+
const { existsSync } = await import("node:fs");
|
|
60
|
+
const candidates = [
|
|
61
|
+
path.resolve(selfDir, "cli.js"),
|
|
62
|
+
// esbuild: same dir
|
|
63
|
+
path.resolve(selfDir, "..", "cli.js")
|
|
64
|
+
// tsc: parent dir
|
|
65
|
+
];
|
|
66
|
+
const cliPath = candidates.find((p) => existsSync(p)) ?? candidates[0];
|
|
59
67
|
if (options?.bridgePort !== void 0) {
|
|
60
68
|
validatePort(options.bridgePort);
|
|
61
69
|
}
|
package/package.json
CHANGED