@sharedots/cli 0.1.6 → 0.1.8
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/index.js +126 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39830,6 +39830,52 @@ var init_ClusterContext = __esm({
|
|
|
39830
39830
|
}
|
|
39831
39831
|
return nextList;
|
|
39832
39832
|
});
|
|
39833
|
+
try {
|
|
39834
|
+
const jobsRes = await fetch(`${coordinatorUrl}/api/jobs?roomId=${encodeURIComponent(roomId)}`);
|
|
39835
|
+
if (jobsRes.ok) {
|
|
39836
|
+
const jobsData = await jobsRes.json();
|
|
39837
|
+
const remoteJobs = jobsData.jobs || [];
|
|
39838
|
+
if (remoteJobs.length > 0) {
|
|
39839
|
+
setActiveJobs((prev) => {
|
|
39840
|
+
const merged = [...prev];
|
|
39841
|
+
for (const rj of remoteJobs) {
|
|
39842
|
+
const jId = String(rj.jobId || "");
|
|
39843
|
+
const spec = rj.spec || {};
|
|
39844
|
+
const name = String(spec.name || rj.name || `Job ${jId.slice(0, 8)}`);
|
|
39845
|
+
const status = String(rj.status || "queued");
|
|
39846
|
+
const rTasks = rj.tasks || [];
|
|
39847
|
+
const completedTasks = rTasks.filter((t) => t.status === "completed").length;
|
|
39848
|
+
const progressPercent = rTasks.length > 0 ? Math.round(completedTasks / rTasks.length * 100) : status === "completed" ? 100 : 0;
|
|
39849
|
+
const existingIdx = merged.findIndex((j) => j.jobId === jId);
|
|
39850
|
+
const jobObj = {
|
|
39851
|
+
jobId: jId,
|
|
39852
|
+
name,
|
|
39853
|
+
status,
|
|
39854
|
+
progressPercent,
|
|
39855
|
+
tasks: rTasks.map((t) => ({
|
|
39856
|
+
taskId: String(t.taskId || ""),
|
|
39857
|
+
jobId: jId,
|
|
39858
|
+
workerId: String(t.workerId || ""),
|
|
39859
|
+
workerHost: String(t.workerId || "worker"),
|
|
39860
|
+
workerIp: "mesh",
|
|
39861
|
+
percent: t.status === "completed" ? 100 : t.status === "running" ? 50 : 0,
|
|
39862
|
+
status: t.status || "pending"
|
|
39863
|
+
})),
|
|
39864
|
+
durationMs: rj.finishedAt && rj.startedAt ? Number(rj.finishedAt) - Number(rj.startedAt) : void 0,
|
|
39865
|
+
resultArtifactId: rj.resultArtifactId ? String(rj.resultArtifactId) : void 0
|
|
39866
|
+
};
|
|
39867
|
+
if (existingIdx >= 0) {
|
|
39868
|
+
merged[existingIdx] = { ...merged[existingIdx], ...jobObj };
|
|
39869
|
+
} else {
|
|
39870
|
+
merged.unshift(jobObj);
|
|
39871
|
+
}
|
|
39872
|
+
}
|
|
39873
|
+
return merged;
|
|
39874
|
+
});
|
|
39875
|
+
}
|
|
39876
|
+
}
|
|
39877
|
+
} catch {
|
|
39878
|
+
}
|
|
39833
39879
|
} catch {
|
|
39834
39880
|
}
|
|
39835
39881
|
}, [coordinatorUrl, roomId, addLog]);
|
|
@@ -40620,7 +40666,7 @@ var init_Footer = __esm({
|
|
|
40620
40666
|
const nodesTicker = overview.onlineNodes > 0 ? source_default.cyan(`${overview.onlineNodes} node${overview.onlineNodes > 1 ? "s" : ""} online`) : source_default.gray("0 nodes");
|
|
40621
40667
|
const runningJobs = activeJobs.filter((j) => j.status === "running").length;
|
|
40622
40668
|
const jobsTicker = runningJobs > 0 ? source_default.yellowBright(`${runningJobs} job active`) : source_default.dim("idle");
|
|
40623
|
-
return (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [(0, import_jsx_runtime4.jsx)(Box_default, { children: (0, import_jsx_runtime4.jsxs)(Text, { color: "gray", children: [source_default.cyan("[1-5]"), " View ", source_default.dim("\u2502"), " ", source_default.cyan("[
|
|
40669
|
+
return (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", borderStyle: "single", borderColor: "gray", paddingX: 1, children: [(0, import_jsx_runtime4.jsx)(Box_default, { children: (0, import_jsx_runtime4.jsxs)(Text, { color: "gray", children: [source_default.cyan("[1-5]"), " View ", source_default.dim("\u2502"), " ", source_default.cyan("[w]"), " Web ", source_default.dim("\u2502"), " ", source_default.cyan("[?]"), " Help ", source_default.dim("\u2502"), " ", source_default.cyan("[r]"), " Refresh ", source_default.dim("\u2502"), " ", source_default.cyan("[q]"), " Exit"] }) }), (0, import_jsx_runtime4.jsx)(Box_default, { children: (0, import_jsx_runtime4.jsxs)(Text, { children: [daemonTicker, " ", source_default.dim("\u2502"), " ", nodesTicker, " ", source_default.dim("\u2502"), " ", jobsTicker] }) })] });
|
|
40624
40670
|
};
|
|
40625
40671
|
}
|
|
40626
40672
|
});
|
|
@@ -41000,7 +41046,7 @@ var init_HelpOverlay = __esm({
|
|
|
41000
41046
|
init_source();
|
|
41001
41047
|
await init_build2();
|
|
41002
41048
|
HelpOverlay = ({ onClose: _onClose }) => {
|
|
41003
|
-
return (0, import_jsx_runtime8.jsxs)(Box_default, { flexDirection: "column", borderStyle: "double", borderColor: "cyanBright", padding: 1, width: "100%", children: [(0, import_jsx_runtime8.jsx)(Box_default, { justifyContent: "center", marginBottom: 1, children: (0, import_jsx_runtime8.jsx)(Text, { bold: true, color: "cyanBright", children: "SHAREDOTS TUI \u2014 KEYBOARD NAVIGATION & SHORTCUTS" }) }), (0, import_jsx_runtime8.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [(0, import_jsx_runtime8.jsxs)(Box_default, { flexDirection: "column", width: "48%", children: [(0, import_jsx_runtime8.jsx)(Text, { bold: true, color: "white", children: "GLOBAL SHORTCUTS" }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" 1..5 / F1..F5 "), " Switch View (Mesh / Daemon / Fleet / Jobs / Logs)"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" Tab / S-Tab "), " Cycle tabs forward / backward"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" r "), " Force instant refresh of network and cluster"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" ? "), " Toggle this Help overlay"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" q / Ctrl+C "), " Open Graceful Shutdown dialog"] }), (0, import_jsx_runtime8.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [(0, import_jsx_runtime8.jsx)(Text, { bold: true, color: "white", children: "TAB 1: MESH ONBOARDING" }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" h "), " Host new room (binds Tailscale/LAN IP & QR)"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" j "), " Switch to Join Room form"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" p "), " Ping all detected Tailscale mesh peers"] })] })] }), (0, import_jsx_runtime8.jsxs)(Box_default, { flexDirection: "column", width: "48%", children: [(0, import_jsx_runtime8.jsx)(Text, { bold: true, color: "white", children: "TAB 2: DAEMON SUPERVISOR & TUNER" }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" s / x / R "), " Start / Stop / Restart daemon binary"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" d "), " Detach daemon to background"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" + / - or \u2190 / \u2192 "), " Adjust dedicated CPU cores"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" [ / ] "), " Adjust RAM ceiling in 512MB steps"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" g "), " Toggle CUDA / ROCm / Metal GPU"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" p / w / c "), " Toggle Python / WASM / Container"] }), (0, import_jsx_runtime8.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [(0, import_jsx_runtime8.jsx)(Text, { bold: true, color: "white", children: "TAB 4 & 5: JOBS & LOGS" }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" 1..4 (in Jobs) "), " Select compute preset"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" Enter "), " Dispatch job across cluster"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" a / c / d / t "), " Filter log stream (All / Coord / Daemon / Tasks)"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" l "), " Cycle log level (ALL / INFO / WARN / ERROR)"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" / "), " Focus log search query"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" Space "), " Pause / Resume auto-scrolling"] })] })] })] }), (0, import_jsx_runtime8.jsx)(Box_default, { marginTop: 1, justifyContent: "center", children: (0, import_jsx_runtime8.jsxs)(Text, { color: "gray", children: ["Press ", source_default.cyanBright("[Esc]"), " or ", source_default.cyanBright("[?]"), " to return to dashboard"] }) })] });
|
|
41049
|
+
return (0, import_jsx_runtime8.jsxs)(Box_default, { flexDirection: "column", borderStyle: "double", borderColor: "cyanBright", padding: 1, width: "100%", children: [(0, import_jsx_runtime8.jsx)(Box_default, { justifyContent: "center", marginBottom: 1, children: (0, import_jsx_runtime8.jsx)(Text, { bold: true, color: "cyanBright", children: "SHAREDOTS TUI \u2014 KEYBOARD NAVIGATION & SHORTCUTS" }) }), (0, import_jsx_runtime8.jsxs)(Box_default, { flexDirection: "row", justifyContent: "space-between", children: [(0, import_jsx_runtime8.jsxs)(Box_default, { flexDirection: "column", width: "48%", children: [(0, import_jsx_runtime8.jsx)(Text, { bold: true, color: "white", children: "GLOBAL SHORTCUTS" }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" 1..5 / F1..F5 "), " Switch View (Mesh / Daemon / Fleet / Jobs / Logs)"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" Tab / S-Tab "), " Cycle tabs forward / backward"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" w "), " Open Web Dashboard bridge in browser"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" r "), " Force instant refresh of network and cluster"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" ? "), " Toggle this Help overlay"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" q / Ctrl+C "), " Open Graceful Shutdown dialog"] }), (0, import_jsx_runtime8.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [(0, import_jsx_runtime8.jsx)(Text, { bold: true, color: "white", children: "TAB 1: MESH ONBOARDING" }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" h "), " Host new room (binds Tailscale/LAN IP & QR)"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" j "), " Switch to Join Room form"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" p "), " Ping all detected Tailscale mesh peers"] })] })] }), (0, import_jsx_runtime8.jsxs)(Box_default, { flexDirection: "column", width: "48%", children: [(0, import_jsx_runtime8.jsx)(Text, { bold: true, color: "white", children: "TAB 2: DAEMON SUPERVISOR & TUNER" }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" s / x / R "), " Start / Stop / Restart daemon binary"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" d "), " Detach daemon to background"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" + / - or \u2190 / \u2192 "), " Adjust dedicated CPU cores"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" [ / ] "), " Adjust RAM ceiling in 512MB steps"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" g "), " Toggle CUDA / ROCm / Metal GPU"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" p / w / c "), " Toggle Python / WASM / Container"] }), (0, import_jsx_runtime8.jsxs)(Box_default, { marginTop: 1, flexDirection: "column", children: [(0, import_jsx_runtime8.jsx)(Text, { bold: true, color: "white", children: "TAB 4 & 5: JOBS & LOGS" }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" 1..4 (in Jobs) "), " Select compute preset"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" Enter "), " Dispatch job across cluster"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" a / c / d / t "), " Filter log stream (All / Coord / Daemon / Tasks)"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" l "), " Cycle log level (ALL / INFO / WARN / ERROR)"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" / "), " Focus log search query"] }), (0, import_jsx_runtime8.jsxs)(Text, { children: [source_default.cyan(" Space "), " Pause / Resume auto-scrolling"] })] })] })] }), (0, import_jsx_runtime8.jsx)(Box_default, { marginTop: 1, justifyContent: "center", children: (0, import_jsx_runtime8.jsxs)(Text, { color: "gray", children: ["Press ", source_default.cyanBright("[Esc]"), " or ", source_default.cyanBright("[?]"), " to return to dashboard"] }) })] });
|
|
41004
41050
|
};
|
|
41005
41051
|
}
|
|
41006
41052
|
});
|
|
@@ -41870,6 +41916,57 @@ var init_OnboardingView = __esm({
|
|
|
41870
41916
|
}
|
|
41871
41917
|
});
|
|
41872
41918
|
|
|
41919
|
+
// ../../apps/tui/dist/services/dashboard-bridge.js
|
|
41920
|
+
import { spawnSync as spawnSync2 } from "child_process";
|
|
41921
|
+
function constructDashboardBridgeUrl(options) {
|
|
41922
|
+
const coordinator = (options.coordinatorUrl || "https://sharedots.onrender.com").replace(/\/$/, "");
|
|
41923
|
+
const roomId = options.roomId || "default-room";
|
|
41924
|
+
const token = options.roomToken || "sec_default";
|
|
41925
|
+
const port = options.port || "3000";
|
|
41926
|
+
const params = new URLSearchParams();
|
|
41927
|
+
params.set("room", roomId);
|
|
41928
|
+
params.set("token", token);
|
|
41929
|
+
params.set("coordinator", coordinator);
|
|
41930
|
+
const dashboardHost = (process.env.SHAREDOTS_DASHBOARD_URL || "https://sharedots.vercel.app").replace(/\/$/, "");
|
|
41931
|
+
const localUrl = `http://localhost:${port}/?${params.toString()}`;
|
|
41932
|
+
const hostedUrl = `${dashboardHost}/?${params.toString()}`;
|
|
41933
|
+
return { localUrl, hostedUrl };
|
|
41934
|
+
}
|
|
41935
|
+
async function openDashboardFromTui(options) {
|
|
41936
|
+
const { localUrl, hostedUrl } = constructDashboardBridgeUrl(options);
|
|
41937
|
+
const port = options.port || "3000";
|
|
41938
|
+
let isLocalRunning = false;
|
|
41939
|
+
try {
|
|
41940
|
+
const res = await fetch(`http://localhost:${port}`, { signal: AbortSignal.timeout(500) });
|
|
41941
|
+
if (res.ok || res.status < 500) {
|
|
41942
|
+
isLocalRunning = true;
|
|
41943
|
+
}
|
|
41944
|
+
} catch {
|
|
41945
|
+
isLocalRunning = false;
|
|
41946
|
+
}
|
|
41947
|
+
const targetUrl = isLocalRunning ? localUrl : hostedUrl;
|
|
41948
|
+
if (options.openBrowser !== false) {
|
|
41949
|
+
try {
|
|
41950
|
+
if (process.platform === "win32") {
|
|
41951
|
+
const winUrl = targetUrl.replace(/&/g, "^&");
|
|
41952
|
+
spawnSync2("cmd.exe", ["/c", "start", "", winUrl], { stdio: "ignore" });
|
|
41953
|
+
} else if (process.platform === "darwin") {
|
|
41954
|
+
spawnSync2("open", [targetUrl], { stdio: "ignore" });
|
|
41955
|
+
} else {
|
|
41956
|
+
spawnSync2("xdg-open", [targetUrl], { stdio: "ignore" });
|
|
41957
|
+
}
|
|
41958
|
+
} catch {
|
|
41959
|
+
}
|
|
41960
|
+
}
|
|
41961
|
+
return targetUrl;
|
|
41962
|
+
}
|
|
41963
|
+
var init_dashboard_bridge = __esm({
|
|
41964
|
+
"../../apps/tui/dist/services/dashboard-bridge.js"() {
|
|
41965
|
+
"use strict";
|
|
41966
|
+
init_esm_shims();
|
|
41967
|
+
}
|
|
41968
|
+
});
|
|
41969
|
+
|
|
41873
41970
|
// ../../apps/tui/dist/app.js
|
|
41874
41971
|
var import_jsx_runtime17, import_react33, MIN_COLUMNS, MIN_ROWS, AppContent, App2, app_default;
|
|
41875
41972
|
var init_app = __esm({
|
|
@@ -41893,13 +41990,14 @@ var init_app = __esm({
|
|
|
41893
41990
|
init_DaemonContext();
|
|
41894
41991
|
init_LogContext();
|
|
41895
41992
|
init_TailscaleContext();
|
|
41993
|
+
init_dashboard_bridge();
|
|
41896
41994
|
MIN_COLUMNS = 80;
|
|
41897
41995
|
MIN_ROWS = 24;
|
|
41898
41996
|
AppContent = ({ initialTab = 1, onExit: customExit }) => {
|
|
41899
41997
|
const { exit } = use_app_default();
|
|
41900
41998
|
const { stdout } = use_stdout_default();
|
|
41901
41999
|
const { refreshStatus } = useTailscale();
|
|
41902
|
-
const { refreshWorkers, isInputFocused } = useCluster();
|
|
42000
|
+
const { refreshWorkers, isInputFocused, roomId, roomToken, coordinatorUrl } = useCluster();
|
|
41903
42001
|
const { stopDaemon, detachDaemon, status: daemonStatus, pid: daemonPid } = useDaemon();
|
|
41904
42002
|
const { addLog } = useLogs();
|
|
41905
42003
|
const [activeTab, setActiveTab] = (0, import_react33.useState)(initialTab);
|
|
@@ -42006,6 +42104,16 @@ var init_app = __esm({
|
|
|
42006
42104
|
addLog({ source: "system", level: "INFO", message: "Instant metrics and peer refresh triggered" });
|
|
42007
42105
|
return;
|
|
42008
42106
|
}
|
|
42107
|
+
if (input === "w" || input === "W") {
|
|
42108
|
+
void openDashboardFromTui({
|
|
42109
|
+
coordinatorUrl: coordinatorUrl || "https://sharedots.onrender.com",
|
|
42110
|
+
roomId,
|
|
42111
|
+
roomToken
|
|
42112
|
+
}).then((url) => {
|
|
42113
|
+
addLog({ source: "system", level: "INFO", message: `Web Dashboard opened in browser: ${url}` });
|
|
42114
|
+
});
|
|
42115
|
+
return;
|
|
42116
|
+
}
|
|
42009
42117
|
if (activeTab === 4 && (input === "1" || input === "2" || input === "3" || input === "4")) {
|
|
42010
42118
|
return;
|
|
42011
42119
|
}
|
|
@@ -42102,7 +42210,7 @@ var init_dist6 = __esm({
|
|
|
42102
42210
|
init_esm_shims();
|
|
42103
42211
|
init_dist();
|
|
42104
42212
|
init_dist2();
|
|
42105
|
-
import { spawnSync as
|
|
42213
|
+
import { spawnSync as spawnSync3 } from "child_process";
|
|
42106
42214
|
import { existsSync as existsSync7, readFileSync as readFileSync6, realpathSync, rmSync as rmSync3 } from "fs";
|
|
42107
42215
|
import { dirname as dirname3, join as join4, resolve as resolve4 } from "path";
|
|
42108
42216
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
@@ -42740,8 +42848,9 @@ function constructDashboardUrl(options) {
|
|
|
42740
42848
|
token,
|
|
42741
42849
|
coordinator
|
|
42742
42850
|
}).toString();
|
|
42851
|
+
const dashboardHost = (process.env.SHAREDOTS_DASHBOARD_URL || "https://sharedots.vercel.app").replace(/\/$/, "");
|
|
42743
42852
|
const localUrl = `http://localhost:${port}/?${qs}`;
|
|
42744
|
-
const hostedUrl =
|
|
42853
|
+
const hostedUrl = `${dashboardHost}/?${qs}`;
|
|
42745
42854
|
const effectiveUrl = options.hosted ? hostedUrl : localUrl;
|
|
42746
42855
|
return { localUrl, hostedUrl, effectiveUrl };
|
|
42747
42856
|
}
|
|
@@ -42767,7 +42876,7 @@ async function openDashboardBridge(options) {
|
|
|
42767
42876
|
} catch {
|
|
42768
42877
|
isLocalRunning = false;
|
|
42769
42878
|
}
|
|
42770
|
-
const targetUrl = isLocalRunning ? localUrl :
|
|
42879
|
+
const targetUrl = isLocalRunning ? localUrl : hostedUrl;
|
|
42771
42880
|
console.log(`
|
|
42772
42881
|
\x1B[1m\x1B[36m\u26A1 SHAREDOTS WEB DASHBOARD CONTROL BRIDGE\x1B[0m
|
|
42773
42882
|
`);
|
|
@@ -42776,11 +42885,16 @@ async function openDashboardBridge(options) {
|
|
|
42776
42885
|
console.log(` Coordinator: ${coordinator}`);
|
|
42777
42886
|
console.log(` Target URL: ${targetUrl}
|
|
42778
42887
|
`);
|
|
42779
|
-
if (!isLocalRunning
|
|
42780
|
-
|
|
42781
|
-
|
|
42782
|
-
console.log(`Hosted dashboard: \x1B[36m${hostedUrl}\x1B[0m
|
|
42888
|
+
if (!isLocalRunning) {
|
|
42889
|
+
if (options.hosted) {
|
|
42890
|
+
console.log(`\x1B[32m\u2714 Connecting to hosted cloud dashboard directly.\x1B[0m
|
|
42783
42891
|
`);
|
|
42892
|
+
} else {
|
|
42893
|
+
console.log(`\x1B[33mNotice: Local dashboard is not running on port ${port}.\x1B[0m`);
|
|
42894
|
+
console.log(`\x1B[32m\u2714 Automatically routing browser to hosted cloud dashboard.\x1B[0m`);
|
|
42895
|
+
console.log(`To run the dashboard locally instead: \x1B[36mpnpm dashboard:dev\x1B[0m
|
|
42896
|
+
`);
|
|
42897
|
+
}
|
|
42784
42898
|
}
|
|
42785
42899
|
if (options.openBrowser !== false) {
|
|
42786
42900
|
console.log(`Opening browser...`);
|
|
@@ -43171,7 +43285,7 @@ function parseFlags(argv) {
|
|
|
43171
43285
|
|
|
43172
43286
|
// src/index.ts
|
|
43173
43287
|
var __dirname3 = dirname3(fileURLToPath3(import.meta.url));
|
|
43174
|
-
var CLI_VERSION = "0.1.
|
|
43288
|
+
var CLI_VERSION = "0.1.8";
|
|
43175
43289
|
function getCliVersion() {
|
|
43176
43290
|
try {
|
|
43177
43291
|
const pkgPath = resolve4(__dirname3, "../package.json");
|
|
@@ -43599,7 +43713,7 @@ Join a worker with 1-command:`);
|
|
|
43599
43713
|
console.error(`Benchmark script not found at ${benchScript}`);
|
|
43600
43714
|
process.exit(1);
|
|
43601
43715
|
}
|
|
43602
|
-
const res =
|
|
43716
|
+
const res = spawnSync3(process.execPath, [benchScript, ...process.argv.slice(3)], {
|
|
43603
43717
|
stdio: "inherit"
|
|
43604
43718
|
});
|
|
43605
43719
|
process.exit(res.status ?? 0);
|