fix: proxmox guest sync, startup snippet sync, drop dead cloudflare ssh transport

This commit is contained in:
LukeGus committed 2026-09-28 21:59:37 -05:00
1 parent 44062e30d1
commit ffa872ebd3
19 files changed
+270 -292

No files matched your search

+24
View File
@@ -35,6 +35,7 @@ beforeEach(() => {
references: [
{ field: "parentId", syncField: "parentSyncId", entityType: "things" },
{ field: "hops[].thingId", entityType: "things" },
{ field: "config.startId", entityType: "things" },
{
field: "bindings[].action.snippetId",
entityType: "things",
@@ -111,6 +112,29 @@ describe("serializing references", () => {
expect(back.bindings).toEqual([{ action: { snippetId: "12" } }]);
});
it("rewrites an id nested in a JSON object column", async () => {
const wire = await serializeReferences(
entity("things"),
{ config: JSON.stringify({ theme: "dark", startId: 5 }) },
toSync,
);
expect(JSON.parse(wire.config as string)).toEqual({
theme: "dark",
startId: "sync-5",
});
const back = await deserializeReferences(
entity("things"),
wire,
toId,
null,
);
expect(JSON.parse(back.config as string)).toEqual({
theme: "dark",
startId: 5,
});
});
it("keeps the current value when a referenced row is not here", async () => {
const back = await deserializeReferences(
entity("things"),