fix: plugin sdk 1.0.5 with optional ui peers, safer timeouts and validate checks

This commit is contained in:
LukeGus committed 2026-10-09 07:37:42 -05:00
1 parent af09aa1028
commit b0a0ee3e00
10 files changed
+113 -12

No files matched your search

@@ -6,6 +6,7 @@ import {
isValidPackageName,
buildSudoCommand,
parseUpgradable,
execCommand,
} from "@termix-ssh/plugin-sdk/host-commands";
describe("parsePlatformProbe", () => {
@@ -114,3 +115,13 @@ describe("parseUpgradable", () => {
expect(parseUpgradable(null, "anything")).toEqual([]);
});
});
describe("execCommand", () => {
it("leaves the command out of the timeout error", async () => {
const client = { exec: () => {} } as never;
const command = buildSudoCommand("apt update", "hunter2");
await expect(execCommand(client, command, 5)).rejects.toThrow(
/^Command timeout after 5ms$/,
);
});
});