@tablation/crew 0.148.0 → 0.149.0
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.js +43 -13
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1185,6 +1185,11 @@ function render(e) {
|
|
|
1185
1185
|
const level = e.level === "info" ? "" : `${e.level.toUpperCase()}: `;
|
|
1186
1186
|
return `${e.at} ${scope}:${ticket} ${level}${e.message}`;
|
|
1187
1187
|
}
|
|
1188
|
+
function renderPlain(e) {
|
|
1189
|
+
const level = e.level === "info" ? "" : `${e.level === "warn" ? "warning" : e.level}: `;
|
|
1190
|
+
const ticket = e.ticket ? `${e.ticket}: ` : "";
|
|
1191
|
+
return `${level}${ticket}${e.message}`;
|
|
1192
|
+
}
|
|
1188
1193
|
var DEFAULT_EVENTS_ROTATE_BYTES = 64 * 1024 * 1024;
|
|
1189
1194
|
var ROTATED_EVENTS_RE = /^events\.\d{8}T\d{6}Z(?:-\d+)?\.jsonl$/;
|
|
1190
1195
|
var ROTATE_LOCK_STALE_MS = 6e4;
|
|
@@ -1254,7 +1259,8 @@ var Emitter = class _Emitter {
|
|
|
1254
1259
|
message,
|
|
1255
1260
|
...extra.role ?? this.role ? { role: extra.role ?? this.role } : {},
|
|
1256
1261
|
...extra.ticket ? { ticket: extra.ticket } : {},
|
|
1257
|
-
...extra.data ? { data: extra.data } : {}
|
|
1262
|
+
...extra.data ? { data: extra.data } : {},
|
|
1263
|
+
...extra.routine ? { routine: true } : {}
|
|
1258
1264
|
};
|
|
1259
1265
|
const line = render(e);
|
|
1260
1266
|
try {
|
|
@@ -1271,13 +1277,19 @@ var Emitter = class _Emitter {
|
|
|
1271
1277
|
`);
|
|
1272
1278
|
} catch {
|
|
1273
1279
|
}
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1280
|
+
if (!e.routine || this.opts.verbose) {
|
|
1281
|
+
try {
|
|
1282
|
+
(this.opts.console ?? ((l) => process.stderr.write(`${l}
|
|
1283
|
+
`)))(this.opts.plain ? renderPlain(e) : line);
|
|
1284
|
+
} catch {
|
|
1285
|
+
}
|
|
1278
1286
|
}
|
|
1279
1287
|
return e;
|
|
1280
1288
|
}
|
|
1289
|
+
/** Routine progress: logged, but shown on the console only under `--verbose`. */
|
|
1290
|
+
note(message, extra = {}) {
|
|
1291
|
+
return this.emit(message, { ...extra, routine: true });
|
|
1292
|
+
}
|
|
1281
1293
|
warn(message, extra = {}) {
|
|
1282
1294
|
return this.emit(message, { ...extra, level: "warn" });
|
|
1283
1295
|
}
|
|
@@ -26776,7 +26788,7 @@ import { dirname as dirOf2, resolve as resolvePath } from "path";
|
|
|
26776
26788
|
import { existsSync as existsSync56, readdirSync as readdirSync18, statSync as statSync17 } from "fs";
|
|
26777
26789
|
import { join as join58 } from "path";
|
|
26778
26790
|
function builtVersion() {
|
|
26779
|
-
return true ? "0.
|
|
26791
|
+
return true ? "0.149.0" : null;
|
|
26780
26792
|
}
|
|
26781
26793
|
var REBUILD_HINT = "rebuild with npm run build";
|
|
26782
26794
|
function newestMtime(path) {
|
|
@@ -29536,7 +29548,12 @@ if (command === "passenger-sync-daemon") {
|
|
|
29536
29548
|
rotateBytes: cfg.ship.eventsRotateBytes,
|
|
29537
29549
|
logFile: dryRun ? void 0 : cfg.ship.logFile,
|
|
29538
29550
|
console: (l) => process.stderr.write(`${l}
|
|
29539
|
-
`)
|
|
29551
|
+
`),
|
|
29552
|
+
// CREW-3266: a person at a terminal gets terse, untimestamped lines and routine
|
|
29553
|
+
// progress only under --verbose. The daemon and timer units are not a TTY and
|
|
29554
|
+
// keep the full log form.
|
|
29555
|
+
verbose: flag("verbose"),
|
|
29556
|
+
plain: !!process.stderr.isTTY
|
|
29540
29557
|
});
|
|
29541
29558
|
async function materializePassengerMirrors(emit2) {
|
|
29542
29559
|
const specs = passengerCheckoutSyncSpecs(cfg).filter((s) => s.mirror);
|
|
@@ -33452,7 +33469,8 @@ Signed in as ${result.identity.email} \u2014 minted an API key in workspace "${r
|
|
|
33452
33469
|
break;
|
|
33453
33470
|
}
|
|
33454
33471
|
const pathWt = applyRunWorktree(repoWt.dir, repoWt.config, planWt);
|
|
33455
|
-
emit.
|
|
33472
|
+
if (planIsUsable(planWt)) emit.note(describeRunWorktreePlan(planWt));
|
|
33473
|
+
else emit.warn(describeRunWorktreePlan(planWt));
|
|
33456
33474
|
if (pathWt && planIsUsable(planWt) && wantsCodeBridge(repoWt.config.hooks.intel)) {
|
|
33457
33475
|
const shellWt = resolveShell(repoWt.config.shell ?? cfg.ship.shell);
|
|
33458
33476
|
const paragraph = await startWorktreeIntel({
|
|
@@ -33487,7 +33505,7 @@ Signed in as ${result.identity.email} \u2014 minted an API key in workspace "${r
|
|
|
33487
33505
|
return script ? runScript(script, { cwd, env, shell: shellWt, timeoutMs: name === "intel" ? 6e4 : void 0 }) : null;
|
|
33488
33506
|
}
|
|
33489
33507
|
});
|
|
33490
|
-
emit.
|
|
33508
|
+
emit.note(paragraph);
|
|
33491
33509
|
}
|
|
33492
33510
|
if (pathWt) process.stdout.write(`${pathWt}
|
|
33493
33511
|
`);
|
|
@@ -33976,6 +33994,8 @@ ${where.join("\n")}`);
|
|
|
33976
33994
|
let baseChecked = 0;
|
|
33977
33995
|
let baseActed = 0;
|
|
33978
33996
|
let baseUnsafe = 0;
|
|
33997
|
+
let fastForwarded = 0;
|
|
33998
|
+
const prunable = [];
|
|
33979
33999
|
for (const r of await resolvedRepos(route2)) {
|
|
33980
34000
|
const base = refreshBaseBranch(r.dir, r.config.branch.remote, r.config.branch.base, dryRun);
|
|
33981
34001
|
const att = dryRun ? null : baseAttention(r.name, base, r.config.branch.remote, r.config.branch.base);
|
|
@@ -33997,7 +34017,8 @@ ${where.join("\n")}`);
|
|
|
33997
34017
|
for (const w of worktrees(r.dir)) {
|
|
33998
34018
|
if (!w.branch) continue;
|
|
33999
34019
|
if (w.prunable) {
|
|
34000
|
-
emit.
|
|
34020
|
+
emit.note(`${w.branch}: worktree at ${w.path} no longer exists \u2014 skipping`);
|
|
34021
|
+
prunable.push(r.dir);
|
|
34001
34022
|
continue;
|
|
34002
34023
|
}
|
|
34003
34024
|
let s2;
|
|
@@ -34012,8 +34033,13 @@ ${where.join("\n")}`);
|
|
|
34012
34033
|
tracked2++;
|
|
34013
34034
|
if (s2.canFastForward) {
|
|
34014
34035
|
acted++;
|
|
34015
|
-
if (dryRun)
|
|
34016
|
-
|
|
34036
|
+
if (dryRun) {
|
|
34037
|
+
emit.note(`would fast-forward ${w.branch}: ${s2.detail}`);
|
|
34038
|
+
fastForwarded++;
|
|
34039
|
+
} else if (fastForward(w.path, w.branch)) {
|
|
34040
|
+
emit.note(`fast-forwarded ${w.branch}`);
|
|
34041
|
+
fastForwarded++;
|
|
34042
|
+
} else emit.warn(`could not fast-forward ${w.branch}`);
|
|
34017
34043
|
} else if (s2.behind > 0 || s2.ahead > 0) {
|
|
34018
34044
|
acted++;
|
|
34019
34045
|
emit.warn(`${w.branch}: ${s2.detail}`);
|
|
@@ -34021,8 +34047,12 @@ ${where.join("\n")}`);
|
|
|
34021
34047
|
}
|
|
34022
34048
|
}
|
|
34023
34049
|
if (baseUnsafe > 0) process.exitCode = 1;
|
|
34024
|
-
if (baseChecked > 0 && baseActed === 0) emit.
|
|
34050
|
+
if (baseChecked > 0 && baseActed === 0) emit.note(`${baseChecked} base branch(es) checked, all level with the remote`);
|
|
34051
|
+
if (prunable.length > 0) {
|
|
34052
|
+
emit.warn(`${prunable.length} worktree(s) no longer exist on disk and were skipped \u2014 run \`git worktree prune\` in ${[...new Set(prunable)].join(", ")} to clear them`);
|
|
34053
|
+
}
|
|
34025
34054
|
if (tracked2 === 0) emit.emit("no worktree tracks a remote branch \u2014 nothing to sync");
|
|
34055
|
+
else if (fastForwarded > 0) emit.emit(`${dryRun ? "would fast-forward" : "fast-forwarded"} ${fastForwarded} of ${tracked2} worktree(s)${acted > fastForwarded ? `; ${acted - fastForwarded} need attention` : ""}`);
|
|
34026
34056
|
else if (acted === 0) emit.emit(`${tracked2} worktree(s) tracking a remote, all level with it`);
|
|
34027
34057
|
break;
|
|
34028
34058
|
}
|
package/package.json
CHANGED