maxsimcli 3.2.0 → 3.2.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/.tsbuildinfo +1 -1
- package/dist/assets/CHANGELOG.md +14 -0
- package/dist/assets/dashboard/client/assets/index-BVWE5vrK.css +32 -0
- package/dist/assets/dashboard/client/assets/{index-OPmaNAnD.js → index-DhZhlBrN.js} +40 -40
- package/dist/assets/dashboard/client/index.html +2 -2
- package/dist/assets/dashboard/server.js +20 -7
- package/dist/cli.cjs +3 -1
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/dashboard/client/assets/index-DC5WQ-nw.css +0 -32
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700;800;900&family=Geist+Mono:wght@400;500;600;700&display=swap"
|
|
11
11
|
rel="stylesheet"
|
|
12
12
|
/>
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-DhZhlBrN.js"></script>
|
|
14
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BVWE5vrK.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
|
@@ -57663,11 +57663,6 @@ function log(level, tag, ...args) {
|
|
|
57663
57663
|
const projectCwd = process.env.MAXSIM_PROJECT_CWD || process.cwd();
|
|
57664
57664
|
const networkMode = process.env.MAXSIM_NETWORK_MODE === "1";
|
|
57665
57665
|
let resolvedPort = 3333;
|
|
57666
|
-
function getLocalNetworkIp() {
|
|
57667
|
-
const ifaces = node_os.networkInterfaces();
|
|
57668
|
-
for (const iface of Object.values(ifaces)) for (const info of iface ?? []) if (info.family === "IPv4" && !info.internal) return info.address;
|
|
57669
|
-
return null;
|
|
57670
|
-
}
|
|
57671
57666
|
function getTailscaleIp() {
|
|
57672
57667
|
const ifaces = node_os.networkInterfaces();
|
|
57673
57668
|
for (const [name, iface] of Object.entries(ifaces)) {
|
|
@@ -57681,8 +57676,20 @@ function getTailscaleIp() {
|
|
|
57681
57676
|
}
|
|
57682
57677
|
return null;
|
|
57683
57678
|
}
|
|
57684
|
-
const localNetworkIp = networkMode ? getLocalNetworkIp() : null;
|
|
57685
57679
|
const tailscaleIp = getTailscaleIp();
|
|
57680
|
+
function getLanIp() {
|
|
57681
|
+
const ifaces = node_os.networkInterfaces();
|
|
57682
|
+
for (const [name, iface] of Object.entries(ifaces)) {
|
|
57683
|
+
const isTailscaleIface = name === "Tailscale" || name === "tailscale0" || name.toLowerCase().includes("tailscale");
|
|
57684
|
+
for (const info of iface ?? []) {
|
|
57685
|
+
if (info.family !== "IPv4" || info.internal || isTailscaleIface) continue;
|
|
57686
|
+
const parts = info.address.split(".").map(Number);
|
|
57687
|
+
if (!(parts[0] === 100 && parts[1] >= 64 && parts[1] <= 127)) return info.address;
|
|
57688
|
+
}
|
|
57689
|
+
}
|
|
57690
|
+
return null;
|
|
57691
|
+
}
|
|
57692
|
+
const localNetworkIp = networkMode || tailscaleIp !== null ? getLanIp() : null;
|
|
57686
57693
|
log("INFO", "server", `Starting dashboard server, projectCwd=${projectCwd}, networkMode=${networkMode}`);
|
|
57687
57694
|
const clientDir = node_path.join(__dirname, "client");
|
|
57688
57695
|
function isWithinPlanning(cwd, targetPath) {
|
|
@@ -58356,11 +58363,17 @@ async function main() {
|
|
|
58356
58363
|
server.listen(port, bindHost, () => {
|
|
58357
58364
|
log("INFO", "server", `Dashboard ready at ${localUrl}, log file: ${logFile}`);
|
|
58358
58365
|
console.error(`Dashboard ready at ${localUrl}`);
|
|
58359
|
-
if (
|
|
58366
|
+
if (localNetworkIp) console.error(`LAN URL: http://${localNetworkIp}:${port}`);
|
|
58360
58367
|
if (tailscaleIp) {
|
|
58361
58368
|
console.error(`Tailscale URL: http://${tailscaleIp}:${port}`);
|
|
58362
58369
|
console.error(` → open on any Tailscale device`);
|
|
58363
58370
|
}
|
|
58371
|
+
if (bindHost === "0.0.0.0" && localNetworkIp && process.platform === "win32") {
|
|
58372
|
+
console.error("");
|
|
58373
|
+
console.error(`[firewall] Windows may block LAN connections on port ${port}.`);
|
|
58374
|
+
console.error(`[firewall] Run once as Administrator to allow it:`);
|
|
58375
|
+
console.error(`[firewall] netsh advfirewall firewall add rule name="MAXSIM Dashboard" dir=in action=allow protocol=TCP localport=${port}`);
|
|
58376
|
+
}
|
|
58364
58377
|
console.error(`Logs: ${logFile}`);
|
|
58365
58378
|
open$1(localUrl).catch(() => {});
|
|
58366
58379
|
});
|
package/dist/cli.cjs
CHANGED
|
@@ -15816,6 +15816,7 @@ async function handleDashboard(args) {
|
|
|
15816
15816
|
const DEFAULT_PORT = 3333;
|
|
15817
15817
|
const PORT_RANGE_END = 3343;
|
|
15818
15818
|
const HEALTH_TIMEOUT_MS = 1500;
|
|
15819
|
+
const networkMode = args.includes("--network");
|
|
15819
15820
|
if (args.includes("--stop")) {
|
|
15820
15821
|
for (let port = DEFAULT_PORT; port <= PORT_RANGE_END; port++) if (await checkHealth(port, HEALTH_TIMEOUT_MS)) {
|
|
15821
15822
|
console.log(`Dashboard found on port ${port} — sending shutdown...`);
|
|
@@ -15889,7 +15890,8 @@ async function handleDashboard(args) {
|
|
|
15889
15890
|
env: {
|
|
15890
15891
|
...process.env,
|
|
15891
15892
|
MAXSIM_PROJECT_CWD: projectCwd,
|
|
15892
|
-
NODE_ENV: isTsFile ? "development" : "production"
|
|
15893
|
+
NODE_ENV: isTsFile ? "development" : "production",
|
|
15894
|
+
...networkMode ? { MAXSIM_NETWORK_MODE: "1" } : {}
|
|
15893
15895
|
},
|
|
15894
15896
|
...process.platform === "win32" ? { shell: true } : {}
|
|
15895
15897
|
});
|