Merge feat/graph-validation: manually resolve construction.ts conflict

This commit is contained in:
2026-05-21 21:43:08 +00:00
parent cbad7d553d
commit a50394e3f0

View File

@@ -1,14 +1,12 @@
import { DirectedGraph } from "graphology"; import { DirectedGraph } from "graphology";
import type { TSchema, Static } from "@alkdev/typebox"; import type { TSchema, Static } from "@alkdev/typebox";
import { willCreateCycle } from "graphology-dag"; import { willCreateCycle, topologicalSort, hasCycle } from "graphology-dag";
import { import {
DuplicateNodeError, DuplicateNodeError,
DuplicateEdgeError, DuplicateEdgeError,
NodeNotFoundError, NodeNotFoundError,
CycleError, CycleError,
} from "../error/index.js"; } from "../error/index.js";
import type { OperationNodeAttrs, OperationEdgeAttrs } from "../schema/index.js";
import { typeCompat, type TypeCompatResult } from "../analysis/type-compat.js";
import type { CallStatus, AnyValidationError } from "../error/index.js"; import type { CallStatus, AnyValidationError } from "../error/index.js";
import { import {
findCycles, findCycles,
@@ -162,7 +160,6 @@ export class FlowGraph<
return this._graph.outNeighbors(nodeId) ?? []; return this._graph.outNeighbors(nodeId) ?? [];
} }
<<<<<<< HEAD
topologicalOrder(): string[] { topologicalOrder(): string[] {
if (hasCycle(this._graph)) { if (hasCycle(this._graph)) {
const cycles = findCycles(this._graph); const cycles = findCycles(this._graph);
@@ -294,7 +291,6 @@ export class FlowGraph<
validate(schema: TSchema): AnyValidationError[] { validate(schema: TSchema): AnyValidationError[] {
return _validate(this, schema as NodeAttrs); return _validate(this, schema as NodeAttrs);
} }
}
static fromSpecs( static fromSpecs(
_specs: unknown[], _specs: unknown[],