@neat.is/core 0.10.2 → 0.10.3-dev.20260930
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/{chunk-CAGAHYDB.js → chunk-DLQNMU3R.js} +2 -2
- package/dist/{chunk-TXKOAART.js → chunk-LNIVRE4L.js} +6 -8
- package/dist/{chunk-TXKOAART.js.map → chunk-LNIVRE4L.js.map} +1 -1
- package/dist/cli.cjs +29 -22
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +26 -17
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +5 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/neatd.cjs +5 -7
- package/dist/neatd.cjs.map +1 -1
- package/dist/neatd.js +2 -2
- package/dist/server.cjs.map +1 -1
- package/dist/server.js +1 -1
- package/package.json +2 -2
- /package/dist/{chunk-CAGAHYDB.js.map → chunk-DLQNMU3R.js.map} +0 -0
package/dist/cli.js
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
resolveNeatVersion,
|
|
9
9
|
startK8sSubstratePolling,
|
|
10
10
|
writeDaemonRecord
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DLQNMU3R.js";
|
|
12
12
|
import {
|
|
13
13
|
buildSearchIndex
|
|
14
14
|
} from "./chunk-BC53SCT7.js";
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
startStalenessLoop,
|
|
83
83
|
upsertConnectorEntry,
|
|
84
84
|
validateConnectorEntry
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-LNIVRE4L.js";
|
|
86
86
|
import {
|
|
87
87
|
startOtelGrpcReceiver
|
|
88
88
|
} from "./chunk-5SJHA5ZH.js";
|
|
@@ -4208,9 +4208,15 @@ async function snapshotProjectStatus(restPort, project, body) {
|
|
|
4208
4208
|
}
|
|
4209
4209
|
return [{ name: project, status: await probeProjectHealth(restPort, project) }];
|
|
4210
4210
|
}
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4211
|
+
var STILL_WAITING_INTERVAL_MS = 1e4;
|
|
4212
|
+
function daemonProgressLine(project, event) {
|
|
4213
|
+
if (event.kind === "starting") return `starting the daemon for ${project}\u2026`;
|
|
4214
|
+
return `still waiting for ${project}'s daemon (${Math.round(event.elapsedMs / 1e3)}s)`;
|
|
4215
|
+
}
|
|
4216
|
+
async function waitForDaemonReady(restPort, project, timeoutMs, onProgress, reminderIntervalMs = STILL_WAITING_INTERVAL_MS) {
|
|
4217
|
+
const startedAt = Date.now();
|
|
4218
|
+
const deadline = startedAt + timeoutMs;
|
|
4219
|
+
let nextReminderAt = startedAt + reminderIntervalMs;
|
|
4214
4220
|
while (Date.now() < deadline) {
|
|
4215
4221
|
const body = await fetchDaemonHealth(restPort);
|
|
4216
4222
|
if (body !== null) {
|
|
@@ -4220,15 +4226,10 @@ async function waitForDaemonReady(restPort, project, timeoutMs) {
|
|
|
4220
4226
|
if (bootstrapping.length === 0) {
|
|
4221
4227
|
return { ready: true, brokenProjects: broken, stillBootstrapping: [] };
|
|
4222
4228
|
}
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
console.log(
|
|
4228
|
-
`neat: waiting on ${bootstrapping.length} project${plural}: ${bootstrapping.join(", ")}`
|
|
4229
|
-
);
|
|
4230
|
-
lastBootstrapping = bootstrapping;
|
|
4231
|
-
}
|
|
4229
|
+
}
|
|
4230
|
+
if (Date.now() >= nextReminderAt) {
|
|
4231
|
+
onProgress?.({ kind: "waiting", elapsedMs: Date.now() - startedAt });
|
|
4232
|
+
nextReminderAt += reminderIntervalMs;
|
|
4232
4233
|
}
|
|
4233
4234
|
await new Promise((r) => setTimeout(r, PROBE_INTERVAL_MS));
|
|
4234
4235
|
}
|
|
@@ -4440,7 +4441,8 @@ async function ensureProjectDaemon(opts) {
|
|
|
4440
4441
|
projectPath: opts.projectPath,
|
|
4441
4442
|
ports: allocated
|
|
4442
4443
|
});
|
|
4443
|
-
|
|
4444
|
+
opts.onProgress?.({ kind: "starting" });
|
|
4445
|
+
const ready = await waitForDaemonReady(allocated.rest, opts.project, timeoutMs, opts.onProgress);
|
|
4444
4446
|
if (!ready.ready) {
|
|
4445
4447
|
return {
|
|
4446
4448
|
status: "timed-out",
|
|
@@ -4586,7 +4588,8 @@ async function runOrchestrator(opts) {
|
|
|
4586
4588
|
const outcome = await ensureProjectDaemon({
|
|
4587
4589
|
project: currentProjectName,
|
|
4588
4590
|
projectPath: opts.scanPath,
|
|
4589
|
-
timeoutMs
|
|
4591
|
+
timeoutMs,
|
|
4592
|
+
onProgress: (event) => console.log(`neat: ${daemonProgressLine(currentProjectName, event)}`)
|
|
4590
4593
|
});
|
|
4591
4594
|
const allocated = "ports" in outcome ? outcome.ports : null;
|
|
4592
4595
|
switch (outcome.status) {
|
|
@@ -6646,7 +6649,13 @@ async function runUpCommand(argv, deps) {
|
|
|
6646
6649
|
err("neat up: that daemon doesn't run on this machine, so it isn't yours to start.");
|
|
6647
6650
|
return 2;
|
|
6648
6651
|
}
|
|
6649
|
-
const
|
|
6652
|
+
const project = entry2.name;
|
|
6653
|
+
const outcome = await ensure({
|
|
6654
|
+
project,
|
|
6655
|
+
projectPath: entry2.path,
|
|
6656
|
+
// `--json` prints one object and nothing else, so progress stays quiet there.
|
|
6657
|
+
...args.json ? {} : { onProgress: (event) => out(`neat up: ${daemonProgressLine(project, event)}`) }
|
|
6658
|
+
});
|
|
6650
6659
|
const log = daemonLogPath(entry2.path);
|
|
6651
6660
|
if (args.json) {
|
|
6652
6661
|
const ports = "ports" in outcome ? outcome.ports : void 0;
|