diff --git a/src/graph/construction.ts b/src/graph/construction.ts index 87800f8..b648604 100644 --- a/src/graph/construction.ts +++ b/src/graph/construction.ts @@ -1,14 +1,12 @@ import { DirectedGraph } from "graphology"; import type { TSchema, Static } from "@alkdev/typebox"; -import { willCreateCycle } from "graphology-dag"; +import { willCreateCycle, topologicalSort, hasCycle } from "graphology-dag"; import { DuplicateNodeError, DuplicateEdgeError, NodeNotFoundError, CycleError, } 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 { findCycles, @@ -162,7 +160,6 @@ export class FlowGraph< return this._graph.outNeighbors(nodeId) ?? []; } -<<<<<<< HEAD topologicalOrder(): string[] { if (hasCycle(this._graph)) { const cycles = findCycles(this._graph); @@ -294,7 +291,6 @@ export class FlowGraph< validate(schema: TSchema): AnyValidationError[] { return _validate(this, schema as NodeAttrs); } - } static fromSpecs( _specs: unknown[],