@indigoai-us/hq-cli 5.223.0 → 5.224.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/CHANGELOG.md +12 -1
- package/dist/command-catalog.generated.d.ts +24 -0
- package/dist/command-catalog.generated.js +31 -0
- package/dist/commands/lanes-import.d.ts +15 -0
- package/dist/commands/lanes-import.js +1213 -0
- package/dist/commands/lanes.js +8 -0
- package/dist/lib/daemon/hq-cloud.d.ts +2 -0
- package/dist/lib/daemon/hq-cloud.js +7 -1
- package/dist/lib/daemon/run.js +8 -0
- package/package.json +1 -1
package/dist/commands/lanes.js
CHANGED
|
@@ -15,6 +15,7 @@ import { Option } from "commander";
|
|
|
15
15
|
import { registerOutpostPrunerCommand } from "./outpost-pruner.js";
|
|
16
16
|
import { registerLaneChecksCommand } from "./lanes-checks.js";
|
|
17
17
|
import { registerLaneReportCommands } from "./lanes-report.js";
|
|
18
|
+
import { registerLaneTrackerImportCommand } from "./lanes-import.js";
|
|
18
19
|
import { ensureCognitoToken } from "../utils/cognito-session.js";
|
|
19
20
|
import { resolveLanesHqRoot } from "../lib/lanes/hq-root.js";
|
|
20
21
|
import { isSsmRunCommandProcess } from "../lib/lanes/ssm-command-context.js";
|
|
@@ -8611,6 +8612,13 @@ export function registerLanesCommand(parent, deps = {}) {
|
|
|
8611
8612
|
now: ctx.now,
|
|
8612
8613
|
actor: ctx.trackerActor,
|
|
8613
8614
|
}, wrap);
|
|
8615
|
+
registerLaneTrackerImportCommand(lanes, {
|
|
8616
|
+
hqRoot: ctx.hqRoot,
|
|
8617
|
+
resolveCompany: ctx.resolveCompany,
|
|
8618
|
+
trackerEnabled: ctx.laneTrackerEnabled,
|
|
8619
|
+
trackerMeshEnabled: ctx.laneTrackerMeshEnabled,
|
|
8620
|
+
now: ctx.now,
|
|
8621
|
+
}, wrap);
|
|
8614
8622
|
registerLaneChecksCommand(lanes, {
|
|
8615
8623
|
hqRoot: ctx.hqRoot,
|
|
8616
8624
|
resolveCompany: ctx.resolveCompany,
|
|
@@ -14,6 +14,8 @@ export interface HqCloudCopy {
|
|
|
14
14
|
}
|
|
15
15
|
export interface PickedHqCloud extends HqCloudCopy {
|
|
16
16
|
source: "bundled" | "managed";
|
|
17
|
+
/** Set when a version is pinned but that version is not the installed managed copy. */
|
|
18
|
+
pinnedVersionMissing?: string;
|
|
17
19
|
}
|
|
18
20
|
export declare function managedHqCloudDir(daemonRoot: string): string;
|
|
19
21
|
/** The package folder inside the updater's install prefix. */
|
|
@@ -44,8 +44,14 @@ export function pickHqCloud(bundled, managed, usable = () => true, pinnedVersion
|
|
|
44
44
|
if (managed && managed.version === pinnedVersion && b && m && m[0] === b[0] && usable(managed)) {
|
|
45
45
|
return { ...managed, source: "managed" };
|
|
46
46
|
}
|
|
47
|
-
|
|
47
|
+
// The pinned version is not installed yet (the updater installs it). Keep
|
|
48
|
+
// running the newest usable copy meanwhile instead of dropping to an older
|
|
49
|
+
// bundled one, and report the missing pin.
|
|
50
|
+
return { ...pickNewest(bundled, managed, b, m, usable), pinnedVersionMissing: pinnedVersion };
|
|
48
51
|
}
|
|
52
|
+
return pickNewest(bundled, managed, b, m, usable);
|
|
53
|
+
}
|
|
54
|
+
function pickNewest(bundled, managed, b, m, usable) {
|
|
49
55
|
if (managed && b && m && m[0] === b[0] && newer(m, b) && usable(managed))
|
|
50
56
|
return { ...managed, source: "managed" };
|
|
51
57
|
return { ...bundled, source: "bundled" };
|
package/dist/lib/daemon/run.js
CHANGED
|
@@ -243,6 +243,7 @@ export async function runDaemon(opts) {
|
|
|
243
243
|
}
|
|
244
244
|
return legacyCache.units;
|
|
245
245
|
};
|
|
246
|
+
let warnedMissingPin = null;
|
|
246
247
|
const plan = () => {
|
|
247
248
|
const config = readDaemonConfig(paths.configPath);
|
|
248
249
|
const legacy = legacyUnits();
|
|
@@ -250,6 +251,13 @@ export async function runDaemon(opts) {
|
|
|
250
251
|
const hqRoot = configured && fs.existsSync(configured) ? configured : undefined;
|
|
251
252
|
// Re-picked every reconcile, so a newer hq-cloud from the updater is used as soon as it lands.
|
|
252
253
|
const hqCloud = currentHqCloud(paths.root);
|
|
254
|
+
const missingPin = hqCloud?.pinnedVersionMissing ?? null;
|
|
255
|
+
if (missingPin !== warnedMissingPin) {
|
|
256
|
+
warnedMissingPin = missingPin;
|
|
257
|
+
if (missingPin && hqCloud) {
|
|
258
|
+
log("warn", `hq-cloud is pinned to ${missingPin}, which is not installed; running ${hqCloud.version} (${hqCloud.source}) until the updater installs it`);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
253
261
|
const runners = hqCloud ? hqCloudRunners(hqCloud.root) : { syncRunner: null, heartbeat: null, sessionHost: null };
|
|
254
262
|
return planUnits(enabledServices(machineType, config), {
|
|
255
263
|
machineType,
|