@indigoai-us/hq-cloud 6.17.1 → 6.18.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/bin/outpost-session-host.d.ts +6 -0
- package/dist/bin/outpost-session-host.d.ts.map +1 -0
- package/dist/bin/outpost-session-host.js +39 -0
- package/dist/bin/outpost-session-host.js.map +1 -0
- package/dist/bin/outpost-session-host.test.d.ts +7 -0
- package/dist/bin/outpost-session-host.test.d.ts.map +1 -0
- package/dist/bin/outpost-session-host.test.js +37 -0
- package/dist/bin/outpost-session-host.test.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { Command } from "commander";
|
|
3
|
+
import { type SessionHostCommandDeps } from "../outposts/session-host-command.js";
|
|
4
|
+
/** The session-host command on its own, parsed from the bin's arguments. */
|
|
5
|
+
export declare function createOutpostSessionHostProgram(deps: SessionHostCommandDeps): Command;
|
|
6
|
+
//# sourceMappingURL=outpost-session-host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outpost-session-host.d.ts","sourceRoot":"","sources":["../../src/bin/outpost-session-host.ts"],"names":[],"mappings":";AASA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAA8B,KAAK,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAG9G,4EAA4E;AAC5E,wBAAgB,+BAA+B,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAMrF"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* `hq-outpost-session-host` — the desktop session host as its own bin.
|
|
4
|
+
*
|
|
5
|
+
* Same service and flags as `hq outposts session-host`. The hq daemon runs this
|
|
6
|
+
* one from the newest hq-cloud it installed, so session-host fixes reach boxes
|
|
7
|
+
* without waiting for an hq CLI release.
|
|
8
|
+
*/
|
|
9
|
+
import { readFileSync } from "node:fs";
|
|
10
|
+
import { Command } from "commander";
|
|
11
|
+
import { registerSessionHostCommand } from "../outposts/session-host-command.js";
|
|
12
|
+
import { isDirectInvocation } from "./outpost-heartbeat.js";
|
|
13
|
+
/** The session-host command on its own, parsed from the bin's arguments. */
|
|
14
|
+
export function createOutpostSessionHostProgram(deps) {
|
|
15
|
+
const parent = new Command("hq-outpost-session-host");
|
|
16
|
+
registerSessionHostCommand(parent, deps);
|
|
17
|
+
const command = parent.commands.find((c) => c.name() === "session-host");
|
|
18
|
+
if (!command)
|
|
19
|
+
throw new Error("session-host command was not registered");
|
|
20
|
+
return command.name("hq-outpost-session-host");
|
|
21
|
+
}
|
|
22
|
+
function packageVersion() {
|
|
23
|
+
try {
|
|
24
|
+
const pkg = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf8"));
|
|
25
|
+
return pkg.version ?? "unknown";
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return "unknown";
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
if (isDirectInvocation(process.argv[1], import.meta.url)) {
|
|
32
|
+
createOutpostSessionHostProgram({ version: packageVersion() })
|
|
33
|
+
.parseAsync(process.argv.slice(2), { from: "user" })
|
|
34
|
+
.catch((err) => {
|
|
35
|
+
process.stderr.write(`hq-outpost-session-host: ${err instanceof Error ? err.message : String(err)}\n`);
|
|
36
|
+
process.exitCode = 1;
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=outpost-session-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outpost-session-host.js","sourceRoot":"","sources":["../../src/bin/outpost-session-host.ts"],"names":[],"mappings":";AACA;;;;;;GAMG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,0BAA0B,EAA+B,MAA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Y,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvG,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `hq-outpost-session-host` — the desktop session host as its own bin, so the
|
|
3
|
+
* hq daemon can run it from the newest hq-cloud it installed instead of the
|
|
4
|
+
* copy bundled inside the hq CLI. Same flags as `hq outposts session-host`.
|
|
5
|
+
*/
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=outpost-session-host.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outpost-session-host.test.d.ts","sourceRoot":"","sources":["../../src/bin/outpost-session-host.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `hq-outpost-session-host` — the desktop session host as its own bin, so the
|
|
3
|
+
* hq daemon can run it from the newest hq-cloud it installed instead of the
|
|
4
|
+
* copy bundled inside the hq CLI. Same flags as `hq outposts session-host`.
|
|
5
|
+
*/
|
|
6
|
+
import { readFileSync } from "node:fs";
|
|
7
|
+
import { afterEach, describe, expect, it, vi } from "vitest";
|
|
8
|
+
import { createOutpostSessionHostProgram } from "./outpost-session-host.js";
|
|
9
|
+
describe("hq-outpost-session-host bin", () => {
|
|
10
|
+
afterEach(() => {
|
|
11
|
+
process.exitCode = undefined;
|
|
12
|
+
vi.restoreAllMocks();
|
|
13
|
+
});
|
|
14
|
+
it("is published as a bin", () => {
|
|
15
|
+
const pkg = JSON.parse(readFileSync(new URL("../../package.json", import.meta.url), "utf8"));
|
|
16
|
+
expect(pkg.bin["hq-outpost-session-host"]).toBe("dist/bin/outpost-session-host.js");
|
|
17
|
+
});
|
|
18
|
+
it("runs the session host with the same flags, refusing to start when the box is not signed in", async () => {
|
|
19
|
+
const errors = [];
|
|
20
|
+
vi.spyOn(console, "error").mockImplementation((line) => {
|
|
21
|
+
errors.push(String(line));
|
|
22
|
+
});
|
|
23
|
+
const program = createOutpostSessionHostProgram({ version: "test", loadIdToken: () => undefined });
|
|
24
|
+
await program.parseAsync(["--port", "47900", "--cwd", "/home/ec2-user/hq", "--claude-bin", "/usr/bin/claude"], {
|
|
25
|
+
from: "user",
|
|
26
|
+
});
|
|
27
|
+
expect(process.exitCode).toBe(1);
|
|
28
|
+
expect(errors.join("\n")).toMatch(/not signed in/);
|
|
29
|
+
});
|
|
30
|
+
it("rejects an unknown flag", async () => {
|
|
31
|
+
const program = createOutpostSessionHostProgram({ version: "test", loadIdToken: () => undefined });
|
|
32
|
+
program.exitOverride();
|
|
33
|
+
program.configureOutput({ writeErr: () => { } });
|
|
34
|
+
await expect(program.parseAsync(["--bogus"], { from: "user" })).rejects.toThrow(/--bogus/);
|
|
35
|
+
});
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=outpost-session-host.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outpost-session-host.test.js","sourceRoot":"","sources":["../../src/bin/outpost-session-host.test.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAE5E,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC7B,EAAE,CAAC,eAAe,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAC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OAAO,CAAC,YAAY,EAAE,CAAC;QACvB,OAAO,CAAC,eAAe,CAAC,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,CAAC,CAAC;QAEhD,MAAM,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAC7F,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indigoai-us/hq-cloud",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.18.0",
|
|
4
4
|
"description": "HQ by Indigo cloud sync engine — bidirectional S3 sync for mobile access",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"hq-backup-prune": "dist/bin/backup-prune-runner.js",
|
|
37
37
|
"hq-area-ledger-migration": "dist/bin/area-ledger-migration.js",
|
|
38
38
|
"hq-layout-compatibility": "dist/bin/layout-compatibility.js",
|
|
39
|
-
"hq-outpost-heartbeat": "dist/bin/outpost-heartbeat.js"
|
|
39
|
+
"hq-outpost-heartbeat": "dist/bin/outpost-heartbeat.js",
|
|
40
|
+
"hq-outpost-session-host": "dist/bin/outpost-session-host.js"
|
|
40
41
|
},
|
|
41
42
|
"scripts": {
|
|
42
43
|
"build": "tsc && node scripts/fix-bin-modes.mjs",
|