@tablation/crew 0.169.0 → 0.169.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/cli.js +10 -5
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6102,13 +6102,17 @@ function removeLaunchdUnit(unit, dryRun, log) {
|
|
|
6102
6102
|
if (existsSync16(unit.plistPath)) unlinkSync2(unit.plistPath);
|
|
6103
6103
|
log.emit(`removed ${unit.label} (${unit.plistPath})`);
|
|
6104
6104
|
}
|
|
6105
|
+
function foreignInstallRefusal(blocking, ownProgram) {
|
|
6106
|
+
const found = blocking.map((u) => `${u.label} runs ${u.program ?? "an unreadable ProgramArguments"}`).join("; ");
|
|
6107
|
+
const others = [...new Set(blocking.map((u) => u.program).filter((p) => p !== null))];
|
|
6108
|
+
const uninstall = others.length > 0 ? `Or remove only that copy's units by running ${others.map((p) => `\`${p} uninstall\``).join(" / ")} instead (the copy at ${ownProgram} is not changed).` : "The unit has no readable program, so only --replace can remove it.";
|
|
6109
|
+
return `scheduler units on this machine start a different copy of crew than this one (${ownProgram}): ${found}. Nothing was changed. Two sets of units would run two crews against the same board, so install stopped. \`crew install --replace\` removes the other copy's scheduler units and installs this copy's, so this ship keeps serving the same routes from this copy. ${uninstall} Neither command touches crew.yaml, routes or tickets.`;
|
|
6110
|
+
}
|
|
6105
6111
|
function clearForeignLaunchdUnits(crewHome, replace, dryRun, log, dir, loaded) {
|
|
6106
6112
|
const foreign = foreignLaunchdUnits(crewHome, dir, loaded);
|
|
6107
6113
|
const blocking = foreign.filter((u) => !u.orphan && (u.program === null || u.programExists));
|
|
6108
6114
|
if (blocking.length > 0 && !replace) {
|
|
6109
|
-
log.warn(
|
|
6110
|
-
`two crew installs target this machine: ${blocking.map((u) => `${u.label} runs ${u.program ?? "an unreadable ProgramArguments"}`).join("; ")}. Run \`crew uninstall\` from the other one, or pass --replace.`
|
|
6111
|
-
);
|
|
6115
|
+
log.warn(foreignInstallRefusal(blocking, crewInvocation(crewHome).at(-1) ?? crewHome));
|
|
6112
6116
|
return false;
|
|
6113
6117
|
}
|
|
6114
6118
|
for (const unit of foreign) {
|
|
@@ -29822,7 +29826,7 @@ import { dirname as dirOf2, resolve as resolvePath } from "path";
|
|
|
29822
29826
|
import { existsSync as existsSync56, readdirSync as readdirSync18, statSync as statSync17 } from "fs";
|
|
29823
29827
|
import { join as join61 } from "path";
|
|
29824
29828
|
function builtVersion() {
|
|
29825
|
-
return true ? "0.169.
|
|
29829
|
+
return true ? "0.169.1" : null;
|
|
29826
29830
|
}
|
|
29827
29831
|
var REBUILD_HINT = "rebuild with npm run build";
|
|
29828
29832
|
function newestMtime(path) {
|
|
@@ -32671,7 +32675,8 @@ if (command === "passenger-sync-daemon") {
|
|
|
32671
32675
|
const DAEMON_SUBCOMMANDS = /* @__PURE__ */ new Set(["start", "stop", "status", "restart"]);
|
|
32672
32676
|
const worktreeArgs = command === "worktree" ? splitWorktreeArgs(positional, cfg.routes.map((r) => r.route)) : void 0;
|
|
32673
32677
|
const named = worktreeArgs ? worktreeArgs.route : command === "daemon" && DAEMON_SUBCOMMANDS.has(positional[1] ?? "") ? positional[2] : positional[1];
|
|
32674
|
-
const fleetWide = command === "inbox" || command === "connect" || command === "disconnect" || command === "deprovision" || command === "agents" || command === "skills" || command === "logbook" || command === "repos" || command === "ship" || command === "projects" || command === "periscope" || command === "whoami" || command === "sandbox" || releaseFleetWide ||
|
|
32678
|
+
const fleetWide = command === "inbox" || command === "connect" || command === "disconnect" || command === "deprovision" || command === "agents" || command === "skills" || command === "logbook" || command === "repos" || command === "ship" || command === "projects" || command === "periscope" || command === "whoami" || command === "sandbox" || releaseFleetWide || // CREW-3875: the scheduler units are per ship and name no route, so a route given is ignored.
|
|
32679
|
+
command === "install" || command === "uninstall" || command === "pause" || command === "resume" || command === "reload" || FLEET_CAPABLE.has(command) && !named && cfg.routes.length > 1 || worktreeArgs !== void 0 && !named && cfg.routes.length > 1;
|
|
32675
32680
|
let route2;
|
|
32676
32681
|
try {
|
|
32677
32682
|
route2 = fleetWide ? cfg.routes[0] : findRoute(cfg, named);
|
package/package.json
CHANGED