feat: replace mesh queries with typed predicates

Amp-Thread-ID: https://ampcode.com/threads/T-019f9d91-77c1-7206-a60f-ed6554ce92ab

Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
Amp
2026-07-28 20:37:44 +00:00
co-authored by heaust
parent c7ffb0543e
commit f6d6af7a17
36 changed files with 2793 additions and 6973 deletions
+19 -2
View File
@@ -36,13 +36,30 @@ test("production render graph composition passes fxnode's public validator", asy
result.ok ? undefined : JSON.stringify(result.issues, null, 2),
);
assert.equal(fxNodeComposition.schemaVersion, 2);
assert.equal(fxNodeComposition.version, 7);
assert.equal(Object.keys(fxNodeComposition.nodes).length, 16);
assert.equal(fxNodeComposition.version, 8);
assert.equal(Object.keys(fxNodeComposition.nodes).length, 42);
assert.ok(
Object.values(fxNodeComposition.nodes).every(
(definition) => definition.migrations.length === 0,
),
);
for (const [type, descriptor] of Object.entries(fxNodeComposition.nodes)) {
const socketKeys = Object.keys(descriptor.sockets);
assert.equal(
socketKeys.length,
new Set(socketKeys).size,
`${type} has colliding input and output socket names`,
);
}
assert.deepEqual(fxNodeComposition.nodes.not.sockets.operand, {
title: "operand",
direction: "input",
type: "bool",
maxIncomingLinks: 1,
visible: true,
value: { type: "boolean", default: { kind: "boolean", value: false } },
showValue: true,
});
} finally {
await rm(directory, { recursive: true, force: true });
}