Agent 1.5.0 + contracts 1.16.0: uninstall, export and purge one product of a church
crosscode uninstall/export/purge <church> [product ...]: with products named only those go and the church keeps the others; naming every product it still has removes the church (folder and app user), so the last product to go takes the church with it. The report gives products and remaining. Uninstalling cross-events-demo's Events removed its Accounts too, which the Hub still showed as live. Contracts 1.16.0: optional products on export/uninstall/purge, PRODUCT_UNINSTALL_MIN_AGENT. Agent 1.5.0 passes them to crosscode. The Website plan moves to contracts 1.17.0 / Hub 2.13.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -275,3 +275,17 @@ describe("frp config and free ports (1.15.0)", () => {
|
||||
expect(agent.probePortsResultSchema.safeParse({ ports: [{ port: 20000, free: false, reason: "in use" }], configPath: null }).success).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe("uninstalling one product (contracts 1.16.0)", () => {
|
||||
const ok = (type: "export" | "uninstall" | "purge", args: unknown) => agent.jobArgsSchemas[type].safeParse(args).success;
|
||||
it("export, uninstall and purge take the products, or none (the whole church)", () => {
|
||||
for (const type of ["uninstall", "purge"] as const) {
|
||||
expect(ok(type, { church: "hope" })).toBe(true);
|
||||
expect(ok(type, { church: "hope", products: ["events"] })).toBe(true);
|
||||
expect(ok(type, { church: "hope", products: [] })).toBe(false);
|
||||
expect(ok(type, { church: "hope", products: ["everything"] })).toBe(false);
|
||||
}
|
||||
expect(ok("export", { church: "hope", exportId: "exp_abcdefgh", products: ["accounts"] })).toBe(true);
|
||||
expect(agent.PRODUCT_UNINSTALL_MIN_AGENT).toBe("1.5.0");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user