@noir-ai/cli 1.7.2 → 1.7.3-beta.1
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/bin.js +19 -10
- package/dist/bin.js.map +1 -1
- package/dist/{chunk-6BCKFJ5Z.js → chunk-3NT7RW6K.js} +65 -1
- package/dist/{chunk-6BCKFJ5Z.js.map → chunk-3NT7RW6K.js.map} +1 -1
- package/dist/{chunk-RYY2FEIQ.js → chunk-6NRDGRCF.js} +8 -3
- package/dist/chunk-6NRDGRCF.js.map +1 -0
- package/dist/{chunk-YZGQDUJZ.js → chunk-B7OKXQKF.js} +2 -2
- package/dist/{chunk-7WMO6THL.js → chunk-KQYVVGOH.js} +3 -3
- package/dist/{chunk-ZA2URQAP.js → chunk-VW6KKJV4.js} +29 -9
- package/dist/chunk-VW6KKJV4.js.map +1 -0
- package/dist/{create-5D5BTGQ7.js → create-RHFPB5Q2.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{install-RB2M4VUA.js → install-M54KESYS.js} +3 -3
- package/dist/{sync-MAQAT33P.js → sync-ZGCGL3OU.js} +3 -3
- package/dist/tui/{chunk-A27BSG6W.js → chunk-A2Q74DOV.js} +65 -1
- package/dist/tui/{chunk-A27BSG6W.js.map → chunk-A2Q74DOV.js.map} +1 -1
- package/dist/tui/{chunk-OCKOVYUK.js → chunk-A2YMK3HL.js} +8 -3
- package/dist/tui/chunk-A2YMK3HL.js.map +1 -0
- package/dist/tui/{chunk-AYJJCWTI.js → chunk-KBM2UXAC.js} +3 -3
- package/dist/tui/{chunk-EH3XT7OC.js → chunk-KQXGWFXJ.js} +29 -9
- package/dist/tui/chunk-KQXGWFXJ.js.map +1 -0
- package/dist/tui/{chunk-X2VUST7G.js → chunk-MGRKJMHG.js} +2 -2
- package/dist/tui/{create-KNHRFLW5.js → create-DH2VPDVS.js} +4 -4
- package/dist/tui/index.js +19 -10
- package/dist/tui/index.js.map +1 -1
- package/dist/tui/{install-MPHQ65JD.js → install-BHXP6LG5.js} +3 -3
- package/dist/tui/{sync-RUHBKBMB.js → sync-DT4JKXZK.js} +3 -3
- package/dist/tui/{update-QPRYOSQN.js → update-FEYBGMVO.js} +4 -4
- package/dist/{update-6GUYY2OQ.js → update-M74XT6CS.js} +4 -4
- package/package.json +9 -9
- package/dist/chunk-RYY2FEIQ.js.map +0 -1
- package/dist/chunk-ZA2URQAP.js.map +0 -1
- package/dist/tui/chunk-EH3XT7OC.js.map +0 -1
- package/dist/tui/chunk-OCKOVYUK.js.map +0 -1
- /package/dist/{chunk-YZGQDUJZ.js.map → chunk-B7OKXQKF.js.map} +0 -0
- /package/dist/{chunk-7WMO6THL.js.map → chunk-KQYVVGOH.js.map} +0 -0
- /package/dist/{create-5D5BTGQ7.js.map → create-RHFPB5Q2.js.map} +0 -0
- /package/dist/{install-RB2M4VUA.js.map → install-M54KESYS.js.map} +0 -0
- /package/dist/{sync-MAQAT33P.js.map → sync-ZGCGL3OU.js.map} +0 -0
- /package/dist/tui/{chunk-AYJJCWTI.js.map → chunk-KBM2UXAC.js.map} +0 -0
- /package/dist/tui/{chunk-X2VUST7G.js.map → chunk-MGRKJMHG.js.map} +0 -0
- /package/dist/tui/{create-KNHRFLW5.js.map → create-DH2VPDVS.js.map} +0 -0
- /package/dist/tui/{install-MPHQ65JD.js.map → install-BHXP6LG5.js.map} +0 -0
- /package/dist/tui/{sync-RUHBKBMB.js.map → sync-DT4JKXZK.js.map} +0 -0
- /package/dist/tui/{update-QPRYOSQN.js.map → update-FEYBGMVO.js.map} +0 -0
- /package/dist/{update-6GUYY2OQ.js.map → update-M74XT6CS.js.map} +0 -0
package/dist/tui/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_UPDATE_CONFIG,
|
|
3
3
|
runAsyncUpdateCheck
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-KQXGWFXJ.js";
|
|
5
|
+
import "./chunk-A2YMK3HL.js";
|
|
6
6
|
import {
|
|
7
7
|
init
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KBM2UXAC.js";
|
|
9
9
|
import {
|
|
10
10
|
doctor
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MGRKJMHG.js";
|
|
12
12
|
import {
|
|
13
13
|
EXIT,
|
|
14
14
|
NoirCliError,
|
|
@@ -23,12 +23,13 @@ import {
|
|
|
23
23
|
json,
|
|
24
24
|
log,
|
|
25
25
|
requireInteractive,
|
|
26
|
+
spinner,
|
|
26
27
|
table,
|
|
27
28
|
terminalWidth,
|
|
28
29
|
tip,
|
|
29
30
|
useColor,
|
|
30
31
|
warn
|
|
31
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-A2Q74DOV.js";
|
|
32
33
|
|
|
33
34
|
// src/tui/index.tsx
|
|
34
35
|
import { render } from "ink";
|
|
@@ -204,12 +205,14 @@ async function daemonStart(opts) {
|
|
|
204
205
|
if (opts.detach === true) {
|
|
205
206
|
fail(EXIT.USAGE, "not implemented (tracked: v1.x)", opts);
|
|
206
207
|
}
|
|
208
|
+
const ds = spinner("Starting Noir daemon...", opts).start();
|
|
207
209
|
const project = loadProjectInfo(process.cwd());
|
|
208
210
|
const ensured = await ensureDaemonRunning({
|
|
209
211
|
project,
|
|
210
212
|
idleTimeoutSec: project.config.daemon.idleTimeoutSec
|
|
211
213
|
});
|
|
212
214
|
if (ensured.started) {
|
|
215
|
+
ds.succeed("Daemon started");
|
|
213
216
|
if (opts.json === true) {
|
|
214
217
|
process.stdout.write(
|
|
215
218
|
`${JSON.stringify({
|
|
@@ -230,6 +233,7 @@ async function daemonStart(opts) {
|
|
|
230
233
|
log(`Noir daemon listening at ${ensured.url}`, opts);
|
|
231
234
|
return;
|
|
232
235
|
}
|
|
236
|
+
ds.succeed("Daemon already running");
|
|
233
237
|
if (opts.json === true) {
|
|
234
238
|
process.stdout.write(
|
|
235
239
|
`${JSON.stringify({ ok: true, data: { url: ensured.url, port: ensured.port, reused: true } })}
|
|
@@ -252,6 +256,7 @@ async function daemonStop(opts) {
|
|
|
252
256
|
info("No Noir daemon is running.", opts);
|
|
253
257
|
return;
|
|
254
258
|
}
|
|
259
|
+
const ds = spinner(`Stopping daemon (pid ${rec.pid})...`, opts).start();
|
|
255
260
|
let signalled = false;
|
|
256
261
|
let errMsg;
|
|
257
262
|
try {
|
|
@@ -278,8 +283,9 @@ async function daemonStop(opts) {
|
|
|
278
283
|
return;
|
|
279
284
|
}
|
|
280
285
|
if (signalled) {
|
|
281
|
-
|
|
286
|
+
ds.succeed(`Stopped Noir daemon (pid ${rec.pid})`);
|
|
282
287
|
} else {
|
|
288
|
+
ds.warn(`Daemon (pid ${rec.pid}) could not be signalled: ${errMsg}`);
|
|
283
289
|
info(`Noir daemon (pid ${rec.pid}) could not be signalled: ${errMsg}`, opts);
|
|
284
290
|
}
|
|
285
291
|
}
|
|
@@ -292,6 +298,7 @@ async function daemonStatus(opts) {
|
|
|
292
298
|
clearDaemonRecord();
|
|
293
299
|
fail(EXIT.DAEMON_DOWN, "Noir daemon is not running (stale record removed).", opts);
|
|
294
300
|
}
|
|
301
|
+
const hs = spinner("Probing daemon health...", opts).start();
|
|
295
302
|
let health = null;
|
|
296
303
|
try {
|
|
297
304
|
const res = await fetch(`http://127.0.0.1:${rec.port}/health`);
|
|
@@ -302,6 +309,7 @@ async function daemonStatus(opts) {
|
|
|
302
309
|
health = null;
|
|
303
310
|
}
|
|
304
311
|
if (health?.ok !== true) {
|
|
312
|
+
hs.fail("Daemon not responding");
|
|
305
313
|
clearDaemonRecord();
|
|
306
314
|
fail(
|
|
307
315
|
EXIT.DAEMON_DOWN,
|
|
@@ -309,6 +317,7 @@ async function daemonStatus(opts) {
|
|
|
309
317
|
opts
|
|
310
318
|
);
|
|
311
319
|
}
|
|
320
|
+
hs.succeed("Daemon healthy");
|
|
312
321
|
const uptimeSec = typeof health?.uptimeSec === "number" ? health.uptimeSec : Math.max(0, Math.floor((Date.now() - rec.startedAt) / 1e3));
|
|
313
322
|
const data = {
|
|
314
323
|
running: true,
|
|
@@ -1349,7 +1358,7 @@ function createProgram() {
|
|
|
1349
1358
|
const transport = opts.transport === "streamable-http" ? "streamable-http" : "stdio";
|
|
1350
1359
|
const force = opts.force === true;
|
|
1351
1360
|
const host = parseHost(opts.host);
|
|
1352
|
-
const { create } = await import("./create-
|
|
1361
|
+
const { create } = await import("./create-DH2VPDVS.js");
|
|
1353
1362
|
const result = await create(dir, {
|
|
1354
1363
|
transport,
|
|
1355
1364
|
url: opts.url,
|
|
@@ -1387,7 +1396,7 @@ function createProgram() {
|
|
|
1387
1396
|
).choices(SUPPORTED_HOSTS)
|
|
1388
1397
|
).action(
|
|
1389
1398
|
async (opts, cmd) => {
|
|
1390
|
-
const { sync } = await import("./sync-
|
|
1399
|
+
const { sync } = await import("./sync-DT4JKXZK.js");
|
|
1391
1400
|
const host = parseHost(opts.host);
|
|
1392
1401
|
const force = opts.force === true;
|
|
1393
1402
|
const merge = opts.merge === true;
|
|
@@ -1585,7 +1594,7 @@ function createProgram() {
|
|
|
1585
1594
|
"dismiss the migration banner for the current version (persists in install.json)"
|
|
1586
1595
|
).argument("[spec]", "channel ('latest'|'beta') or exact version (default: latest)").action(
|
|
1587
1596
|
async (spec, opts, cmd) => {
|
|
1588
|
-
const { install } = await import("./install-
|
|
1597
|
+
const { install } = await import("./install-BHXP6LG5.js");
|
|
1589
1598
|
const cli = cmd.optsWithGlobals();
|
|
1590
1599
|
await install({
|
|
1591
1600
|
...cli,
|
|
@@ -1598,7 +1607,7 @@ function createProgram() {
|
|
|
1598
1607
|
);
|
|
1599
1608
|
installCmd.alias("migrate");
|
|
1600
1609
|
program2.command("update").description("update Noir to the latest version via the active install method").option("--check", "check for a new version without changing anything").argument("[spec]", "channel ('latest'|'beta') or exact version (default: latest)").action(async (spec, opts, cmd) => {
|
|
1601
|
-
const { update } = await import("./update-
|
|
1610
|
+
const { update } = await import("./update-FEYBGMVO.js");
|
|
1602
1611
|
const cli = cmd.optsWithGlobals();
|
|
1603
1612
|
await update({ ...cli, spec, check: opts.check === true });
|
|
1604
1613
|
});
|