@neat.is/core 0.4.24-dev.20260701 → 0.4.25
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.cjs +23 -6
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +23 -6
- package/dist/cli.js.map +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -3182,6 +3182,9 @@ async function healthIsForProject(restPort, project) {
|
|
|
3182
3182
|
}
|
|
3183
3183
|
return false;
|
|
3184
3184
|
}
|
|
3185
|
+
function daemonLogPath(projectPath2) {
|
|
3186
|
+
return path7.join(projectPath2, "neat-out", "daemon.log");
|
|
3187
|
+
}
|
|
3185
3188
|
function spawnDaemonDetached(spec) {
|
|
3186
3189
|
const here = path7.dirname(new URL(import.meta.url).pathname);
|
|
3187
3190
|
const candidates = [
|
|
@@ -3213,15 +3216,19 @@ function spawnDaemonDetached(spec) {
|
|
|
3213
3216
|
env.OTEL_PORT = String(spec.ports.otlp);
|
|
3214
3217
|
env.NEAT_WEB_PORT = String(spec.ports.web);
|
|
3215
3218
|
}
|
|
3219
|
+
let logFd = null;
|
|
3220
|
+
if (spec) {
|
|
3221
|
+
const logPath = daemonLogPath(spec.projectPath);
|
|
3222
|
+
fsSync.mkdirSync(path7.dirname(logPath), { recursive: true });
|
|
3223
|
+
logFd = fsSync.openSync(logPath, "a");
|
|
3224
|
+
}
|
|
3216
3225
|
const child = spawn2(process.execPath, [entry2, "start"], {
|
|
3217
3226
|
detached: true,
|
|
3218
|
-
|
|
3219
|
-
// `BindAuthorityError` message lands in front of the operator instead
|
|
3220
|
-
// of being swallowed (issue #341).
|
|
3221
|
-
stdio: ["ignore", "ignore", "inherit"],
|
|
3227
|
+
stdio: ["ignore", logFd ?? "ignore", logFd ?? "ignore"],
|
|
3222
3228
|
env
|
|
3223
3229
|
});
|
|
3224
3230
|
child.unref();
|
|
3231
|
+
if (logFd !== null) fsSync.closeSync(logFd);
|
|
3225
3232
|
return child;
|
|
3226
3233
|
}
|
|
3227
3234
|
function openBrowser(url) {
|
|
@@ -3410,10 +3417,12 @@ async function runOrchestrator(opts) {
|
|
|
3410
3417
|
} else {
|
|
3411
3418
|
result.steps.browser = openBrowser(dashboardUrl);
|
|
3412
3419
|
}
|
|
3413
|
-
|
|
3420
|
+
const daemonRunning = result.steps.daemon === "spawned" || result.steps.daemon === "already-running";
|
|
3421
|
+
const daemonLog = daemonRunning ? path7.relative(opts.scanPath, daemonLogPath(opts.scanPath)) : null;
|
|
3422
|
+
printSummary(result, graph, dashboardUrl, daemonLog);
|
|
3414
3423
|
return result;
|
|
3415
3424
|
}
|
|
3416
|
-
function printSummary(result, graph, dashboardUrl) {
|
|
3425
|
+
function printSummary(result, graph, dashboardUrl, daemonLog) {
|
|
3417
3426
|
const nodes = [];
|
|
3418
3427
|
graph.forEachNode((_id, attrs) => nodes.push(attrs));
|
|
3419
3428
|
const edges = [];
|
|
@@ -3435,6 +3444,14 @@ function printSummary(result, graph, dashboardUrl) {
|
|
|
3435
3444
|
} else {
|
|
3436
3445
|
console.log("running locally \u2014 open the dashboard, no token needed");
|
|
3437
3446
|
}
|
|
3447
|
+
if (daemonLog !== null) {
|
|
3448
|
+
console.log("");
|
|
3449
|
+
console.log(`daemon running in the background (logs: ${daemonLog})`);
|
|
3450
|
+
console.log(
|
|
3451
|
+
"next: run your app or your test suite \u2014 OBSERVED edges fill in as it executes,"
|
|
3452
|
+
);
|
|
3453
|
+
console.log(" and divergences surface where code and runtime disagree.");
|
|
3454
|
+
}
|
|
3438
3455
|
}
|
|
3439
3456
|
|
|
3440
3457
|
// src/cli-verbs.ts
|