mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
Feature/more dynamic unions (#2972)
* with validators * more dynamic unions * fixes from v31 * better constructor for dynamic unions * version bump * fix build
This commit is contained in:
@@ -134,19 +134,15 @@ export class VersionGraph<CurrentVersion extends string>
|
||||
for (let rangeStr in version.options.migrations.other) {
|
||||
const range = VersionRange.parse(rangeStr)
|
||||
const vRange = graph.addVertex(range, [], [])
|
||||
graph.addEdge(
|
||||
version.options.migrations.other[rangeStr],
|
||||
vRange,
|
||||
vertex,
|
||||
)
|
||||
const migration = version.options.migrations.other[rangeStr]
|
||||
if (migration.up) graph.addEdge(migration.up, vRange, vertex)
|
||||
if (migration.down) graph.addEdge(migration.down, vertex, vRange)
|
||||
for (let matching of graph.findVertex(
|
||||
(v) => isExver(v.metadata) && v.metadata.satisfies(range),
|
||||
)) {
|
||||
graph.addEdge(
|
||||
version.options.migrations.other[rangeStr],
|
||||
matching,
|
||||
vertex,
|
||||
)
|
||||
if (migration.up) graph.addEdge(migration.up, matching, vertex)
|
||||
if (migration.down)
|
||||
graph.addEdge(migration.down, vertex, matching)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user