@prisma/orm-toolchain 8.0.0-rc.1-dev.38 → 8.0.0-rc.1-dev.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin__prisma-next.mjs +8 -301
- package/dist/bin__prisma-next.mjs.map +1 -1
- package/dist/cli.mjs +1944 -256
- package/dist/cli.mjs.map +1 -1
- package/dist/cli__commands__migrate.mjs +1 -1
- package/dist/cli__commands__migration-check.d.mts +1 -1
- package/dist/cli__commands__migration-check.mjs +1 -1
- package/dist/cli__commands__migration-graph.d.mts +1 -1
- package/dist/cli__commands__migration-graph.mjs +1 -1
- package/dist/cli__commands__migration-list.d.mts +1 -1
- package/dist/cli__commands__migration-list.mjs +1 -1
- package/dist/cli__commands__migration-log.d.mts +1 -1
- package/dist/cli__commands__migration-log.mjs +1 -1
- package/dist/cli__commands__migration-show.d.mts +1 -1
- package/dist/cli__commands__migration-status.d.mts +1 -1
- package/dist/cli__commands__migration-status.mjs +2 -2
- package/dist/cli__control-api.d.mts +1 -1
- package/dist/cli__control-api.mjs +1 -1
- package/dist/cli__init-output.d.mts +1 -1
- package/dist/cli__init-output.mjs +1 -1
- package/dist/code-templates-CSLH8721-CWRA4Lru.mjs +295 -0
- package/dist/code-templates-CSLH8721-CWRA4Lru.mjs.map +1 -0
- package/dist/init-CcJxAIeS-CITTa8YU.mjs +800 -0
- package/dist/init-CcJxAIeS-CITTa8YU.mjs.map +1 -0
- package/dist/{migrate-CgSnzAUm-aGstaO5N.mjs → migrate-BVEyoBor-CN_EOCzx.mjs} +3 -3
- package/dist/{migrate-CgSnzAUm-aGstaO5N.mjs.map → migrate-BVEyoBor-CN_EOCzx.mjs.map} +1 -1
- package/dist/{migrate-failure-CnoUcDms-taa9pfd7.mjs → migrate-failure-CKMEnA_x-ByHkYjn5.mjs} +3 -3
- package/dist/{migrate-failure-CnoUcDms-taa9pfd7.mjs.map → migrate-failure-CKMEnA_x-ByHkYjn5.mjs.map} +1 -1
- package/dist/{migration-graph-D2dbLCkl-CCHL0aDA.mjs → migration-graph-D4sgTiXa-BLtiLIk7.mjs} +4 -4
- package/dist/{migration-graph-D2dbLCkl-CCHL0aDA.mjs.map → migration-graph-D4sgTiXa-BLtiLIk7.mjs.map} +1 -1
- package/dist/{migration-graph-command-render-BeuEyf2B-BNH9oUB_.mjs → migration-graph-command-render-h0VdTkSM-C3rPZEw1.mjs} +17 -3
- package/dist/migration-graph-command-render-h0VdTkSM-C3rPZEw1.mjs.map +1 -0
- package/dist/{migration-graph-sections-0lKA5l1b-CTHQquu7.mjs → migration-graph-sections-B8WSWSkJ-CyaRo0T6.mjs} +3 -3
- package/dist/{migration-graph-sections-0lKA5l1b-CTHQquu7.mjs.map → migration-graph-sections-B8WSWSkJ-CyaRo0T6.mjs.map} +1 -1
- package/dist/{migration-list-DCx0KOFp-B3MiGnpa.mjs → migration-list-BIL-re1m-CZY4m3d0.mjs} +3 -3
- package/dist/{migration-list-DCx0KOFp-B3MiGnpa.mjs.map → migration-list-BIL-re1m-CZY4m3d0.mjs.map} +1 -1
- package/dist/{migration-log-CJ6_9_uj-uWyc3vlC.mjs → migration-log-BdBKYAUW-DTPxKZtD.mjs} +4 -4
- package/dist/{migration-log-CJ6_9_uj-uWyc3vlC.mjs.map → migration-log-BdBKYAUW-DTPxKZtD.mjs.map} +1 -1
- package/dist/{migration-log-table-DRiOnvzf-zTQBThqe.mjs → migration-log-table-eES9lPjv-BCFm8qJr.mjs} +3 -3
- package/dist/{migration-log-table-DRiOnvzf-zTQBThqe.mjs.map → migration-log-table-eES9lPjv-BCFm8qJr.mjs.map} +1 -1
- package/dist/{migration-status-S88DjM8c-DLHnCKfW.mjs → migration-status-DzPVkkB3-BA7jjITd.mjs} +5 -4
- package/dist/{migration-status-S88DjM8c-DLHnCKfW.mjs.map → migration-status-DzPVkkB3-BA7jjITd.mjs.map} +1 -1
- package/dist/{output-DWNYqZGc-D2sRgLAm.mjs → output-DP3woAjV-BxCr9nHA.mjs} +21 -11
- package/dist/output-DP3woAjV-BxCr9nHA.mjs.map +1 -0
- package/dist/{init-Bco4QkKJ-DqUZVrBU.mjs → redact-secrets-kQ0KKV1u-MnVSKe-u.mjs} +740 -1516
- package/dist/redact-secrets-kQ0KKV1u-MnVSKe-u.mjs.map +1 -0
- package/dist/{schemas-Bm2e3Hk1-qLKF0B36.d.mts → schemas-BGgjiKV0-Rh8RlMCl.d.mts} +4 -2
- package/dist/schemas-BGgjiKV0-Rh8RlMCl.d.mts.map +1 -0
- package/dist/{schemas-BMkqaqvM-CLaqlat4.mjs → schemas-CYSD83Cu-Bff4PPoi.mjs} +3 -2
- package/dist/schemas-CYSD83Cu-Bff4PPoi.mjs.map +1 -0
- package/package.json +13 -13
- package/dist/init-Bco4QkKJ-DqUZVrBU.mjs.map +0 -1
- package/dist/migration-graph-command-render-BeuEyf2B-BNH9oUB_.mjs.map +0 -1
- package/dist/output-DWNYqZGc-D2sRgLAm.mjs.map +0 -1
- package/dist/schemas-BMkqaqvM-CLaqlat4.mjs.map +0 -1
- package/dist/schemas-Bm2e3Hk1-qLKF0B36.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"migration-graph-command-render-h0VdTkSM-C3rPZEw1.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-graph-command-render-h0VdTkSM.mjs"],"sourcesContent":["import { ifDefined } from \"@internal/utils/defined\";\nimport { bold, createColors, cyan, cyanBright, dim, green, yellow } from \"colorette\";\nimport stringWidth from \"string-width\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { EMPTY_CONTRACT_HASH } from \"@internal/migration-tools/constants\";\n//#region src/utils/formatters/tone-markup.ts\n/**\n* The drawing formatters compose one string per line, measuring display widths\n* with `string-width` as they go. To carry colour through that pipeline without\n* disturbing a single width, a tone is marked with an SGR escape sequence:\n* `string-width` and `strip-ansi` already treat those as zero-width, so every\n* existing width calculation keeps its answer.\n*\n* The marks are a transport, not output. {@link toneDrawing} turns a marked\n* string into the engine's spans, and it drops every escape sequence it sees —\n* so no escape sequence can reach the engine, which does the painting itself.\n*/\nconst TONE_MARK_BASE = 900;\n/** The escape character every SGR sequence opens with. */\nconst ESCAPE = String.fromCharCode(27);\n/** Ends the innermost open mark. */\nconst TONE_MARK_END = `${ESCAPE}[${TONE_MARK_BASE}m`;\n/**\n* Every tone, in the order their marks are numbered. Exported so a test can\n* hold it against a compiler-checked list of the engine's tones: a tone\n* missing from here would silently lose its colour.\n*/\nconst TONE_ORDER = [\n\t\"ok\",\n\t\"warn\",\n\t\"error\",\n\t\"info\",\n\t\"heading\",\n\t\"identifier\",\n\t\"ref\",\n\t\"placeholder\",\n\t\"link\",\n\t\"emphasis\",\n\t\"muted\",\n\t\"structure\",\n\t\"highlight\",\n\t\"color-1\",\n\t\"color-2\",\n\t\"color-3\",\n\t\"color-4\",\n\t\"color-5\",\n\t\"color-6\"\n];\nconst MARK_BY_TONE = new Map(TONE_ORDER.map((tone, index) => [tone, TONE_MARK_BASE + index + 1]));\nconst TONE_BY_MARK = new Map(TONE_ORDER.map((tone, index) => [TONE_MARK_BASE + index + 1, tone]));\n/** Marks `text` as carrying `tone`. Marks nest; the innermost one wins. */\nfunction toned(tone, text) {\n\treturn `${ESCAPE}[${MARK_BY_TONE.get(tone)}m${text}${TONE_MARK_END}`;\n}\n/** The painter shape the formatters take, bound to one tone. */\nfunction tonePainter(tone) {\n\treturn (text) => toned(tone, text);\n}\nconst SGR_SEQUENCE = new RegExp(`${ESCAPE}\\\\[([\\\\d;]*)m`, \"g\");\nfunction pushSpan(spans, text, tone) {\n\tif (text.length === 0) return;\n\tconst previous = spans.at(-1);\n\tif (previous !== void 0 && previous.tone === tone) {\n\t\tspans[spans.length - 1] = {\n\t\t\ttext: previous.text + text,\n\t\t\t...tone === void 0 ? {} : { tone }\n\t\t};\n\t\treturn;\n\t}\n\tspans.push({\n\t\ttext,\n\t\t...tone === void 0 ? {} : { tone }\n\t});\n}\n/** One marked line as spans. Text carrying no mark becomes an untoned span. */\nfunction toneSpans(line) {\n\tconst spans = [];\n\tconst open = [];\n\tlet cursor = 0;\n\tSGR_SEQUENCE.lastIndex = 0;\n\tfor (let match = SGR_SEQUENCE.exec(line); match !== null; match = SGR_SEQUENCE.exec(line)) {\n\t\tpushSpan(spans, line.slice(cursor, match.index), open.at(-1));\n\t\tcursor = match.index + match[0].length;\n\t\tfor (const parameter of (match[1] ?? \"\").split(\";\")) {\n\t\t\tconst code = Number(parameter);\n\t\t\tif (code === TONE_MARK_BASE) {\n\t\t\t\topen.pop();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst tone = TONE_BY_MARK.get(code);\n\t\t\tif (tone !== void 0) open.push(tone);\n\t\t}\n\t}\n\tpushSpan(spans, line.slice(cursor), open.at(-1));\n\treturn spans;\n}\n/**\n* A marked block as the lines of a `drawing` block. A line with no marks stays\n* a plain string, which is what the engine's `Text` wants for untoned text.\n*/\nfunction toneDrawing(block) {\n\treturn block.split(\"\\n\").map((line) => {\n\t\tconst spans = toneSpans(line);\n\t\tif (spans.length === 0) return \"\";\n\t\tconst only = spans.length === 1 ? spans[0] : void 0;\n\t\treturn only !== void 0 && only.tone === void 0 ? only.text : spans;\n\t});\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-palette.ts\nconst LANE_COUNT = 6;\nconst forced = createColors({ useColor: true });\nconst ANSI_LANES = [\n\tforced.white,\n\tforced.cyan,\n\tforced.yellow,\n\tforced.blueBright,\n\tforced.magenta,\n\tforced.green\n];\n/** The palette the commander CLI paints with: ANSI SGR straight into the line. */\nconst ANSI_MIGRATION_GRAPH_PALETTE = {\n\tlane: (lane, text) => (ANSI_LANES[lane % LANE_COUNT] ?? ((value) => value))(text),\n\trole: (role, text) => role === \"on-path\" ? forced.greenBright(text) : forced.dim(text),\n\temphasis: (text) => bold(text),\n\tstatus: (status, text) => status === \"applied\" ? green(text) : yellow(text)\n};\nconst TONE_LANES = [\n\t\"color-1\",\n\t\"color-2\",\n\t\"color-3\",\n\t\"color-4\",\n\t\"color-5\",\n\t\"color-6\"\n];\n/**\n* The palette the engine shell marks with: each run of text carries the tone\n* it means, and the engine chooses the bytes. The lane series maps onto the\n* engine's indexed colours in order, which is the same rotation.\n*/\nconst TONE_MIGRATION_GRAPH_PALETTE = {\n\tlane: (lane, text) => tonePainter(TONE_LANES[lane % LANE_COUNT] ?? \"color-1\")(text),\n\trole: (role, text) => tonePainter(role === \"on-path\" ? \"highlight\" : \"muted\")(text),\n\temphasis: tonePainter(\"emphasis\"),\n\tstatus: (status, text) => tonePainter(status === \"applied\" ? \"ok\" : \"warn\")(text)\n};\n/** The palette a plain, uncoloured render uses: none of it. */\nconst PLAIN_MIGRATION_GRAPH_PALETTE = {\n\tlane: (_lane, text) => text,\n\trole: (_role, text) => text,\n\temphasis: (text) => text,\n\tstatus: (_status, text) => text\n};\nfunction migrationListForwardArrow(glyphMode) {\n\treturn glyphMode === \"ascii\" ? \"->\" : \"→\";\n}\nfunction migrationListEmptySource(glyphMode) {\n\treturn glyphMode === \"ascii\" ? \"-\" : \"∅\";\n}\nfunction abbreviateContractHash(hash) {\n\treturn hash.slice(0, 7);\n}\nfunction padFromHashColumn(text, width) {\n\tconst padding = Math.max(0, width - stringWidth(text));\n\treturn `${\" \".repeat(padding)}${text}`;\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-grid-layout.ts\n/**\n* Grid layout for the line/plane/occlusion migration-graph renderer.\n*\n* Produces a Grid (rows × cells) from a MigrationGraphRowModel. Each node\n* emits: fork connector, self-loop rows, node row, merge connector, and\n* inbound migration rows — in display order (tips first, then roots).\n*/\nfunction buildLaneAssignment(nodes, edges) {\n\tconst fwdEdges = edges.filter((e) => e.kind === \"forward\" && e.from !== e.to);\n\tconst outbound = /* @__PURE__ */ new Map();\n\tconst inbound = /* @__PURE__ */ new Map();\n\tfor (const edge of fwdEdges) {\n\t\tconst ob = outbound.get(edge.from);\n\t\tif (ob) ob.push(edge);\n\t\telse outbound.set(edge.from, [edge]);\n\t\tconst ib = inbound.get(edge.to);\n\t\tif (ib) ib.push(edge);\n\t\telse inbound.set(edge.to, [edge]);\n\t}\n\tfor (const list of outbound.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tfor (const list of inbound.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tconst components = [];\n\tlet current = [];\n\tfor (const n of nodes) if (n === null) {\n\t\tif (current.length > 0) components.push(current);\n\t\tcurrent = [];\n\t} else current.push(n);\n\tif (current.length > 0) components.push(current);\n\tconst allNodes = /* @__PURE__ */ new Set();\n\tfor (const n of nodes) if (n !== null) allNodes.add(n);\n\tconst nodeRank = /* @__PURE__ */ new Map();\n\tfor (const n of allNodes) nodeRank.set(n, 0);\n\tfor (let pass = 0; pass < allNodes.size; pass++) {\n\t\tlet changed = false;\n\t\tfor (const [from, es] of outbound) {\n\t\t\tconst base = nodeRank.get(from) ?? 0;\n\t\t\tfor (const e of es) {\n\t\t\t\tconst next = base + 1;\n\t\t\t\tif (next > (nodeRank.get(e.to) ?? 0)) {\n\t\t\t\t\tnodeRank.set(e.to, next);\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!changed) break;\n\t}\n\tconst nodeLane = /* @__PURE__ */ new Map();\n\tconst edgeLane = /* @__PURE__ */ new Map();\n\tlet totalLanes = 0;\n\tfor (const componentNodes of components) {\n\t\tconst componentSet = new Set(componentNodes);\n\t\tlet nextLane = 0;\n\t\tconst roots = [];\n\t\tfor (const n of componentNodes) if ((inbound.get(n) ?? []).length === 0) roots.push(n);\n\t\troots.sort((a, b) => {\n\t\t\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\t\t\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\t\t\treturn a.localeCompare(b);\n\t\t});\n\t\tconst bfsQueue = [];\n\t\tfor (const root of roots) if (!nodeLane.has(root)) {\n\t\t\tnodeLane.set(root, nextLane++);\n\t\t\tbfsQueue.push({\n\t\t\t\tnode: root,\n\t\t\t\tlane: nodeLane.get(root)\n\t\t\t});\n\t\t}\n\t\tlet head = 0;\n\t\twhile (head < bfsQueue.length) {\n\t\t\tconst { node, lane } = bfsQueue[head++];\n\t\t\tconst children = outbound.get(node) ?? [];\n\t\t\tlet first = true;\n\t\t\tfor (const childEdge of children) {\n\t\t\t\tconst child = childEdge.to;\n\t\t\t\tif (!componentSet.has(child)) continue;\n\t\t\t\tif (!nodeLane.has(child)) {\n\t\t\t\t\tconst childLane = first ? lane : nextLane++;\n\t\t\t\t\tnodeLane.set(child, childLane);\n\t\t\t\t\tbfsQueue.push({\n\t\t\t\t\t\tnode: child,\n\t\t\t\t\t\tlane: childLane\n\t\t\t\t\t});\n\t\t\t\t\tedgeLane.set(childEdge.migrationHash, childLane);\n\t\t\t\t} else edgeLane.set(childEdge.migrationHash, Math.max(lane, nodeLane.get(child)));\n\t\t\t\tfirst = false;\n\t\t\t}\n\t\t}\n\t\tfor (const n of componentNodes) if (!nodeLane.has(n)) nodeLane.set(n, nextLane++);\n\t\tfor (const n of componentNodes) {\n\t\t\tconst parents = inbound.get(n);\n\t\t\tif (!parents || parents.length <= 1) continue;\n\t\t\tlet trunkParent = parents[0].from;\n\t\t\tlet trunkRank = nodeRank.get(trunkParent) ?? 0;\n\t\t\tlet trunkLane = nodeLane.get(trunkParent) ?? 0;\n\t\t\tfor (let i = 1; i < parents.length; i++) {\n\t\t\t\tconst parent = parents[i].from;\n\t\t\t\tconst rank = nodeRank.get(parent) ?? 0;\n\t\t\t\tconst lane = nodeLane.get(parent) ?? 0;\n\t\t\t\tif (rank > trunkRank || rank === trunkRank && lane < trunkLane) {\n\t\t\t\t\ttrunkParent = parent;\n\t\t\t\t\ttrunkRank = rank;\n\t\t\t\t\ttrunkLane = lane;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst trunkParentLane = nodeLane.get(trunkParent) ?? 0;\n\t\t\tconst currentNodeLane = nodeLane.get(n) ?? 0;\n\t\t\tif (currentNodeLane === trunkParentLane) continue;\n\t\t\tnodeLane.set(n, trunkParentLane);\n\t\t\tfor (const parentEdge of parents) if (parentEdge.from === trunkParent) edgeLane.set(parentEdge.migrationHash, trunkParentLane);\n\t\t\tconst bfsDescendants = [n];\n\t\t\tlet descHead = 0;\n\t\t\twhile (descHead < bfsDescendants.length) {\n\t\t\t\tconst current = bfsDescendants[descHead++];\n\t\t\t\tconst children = outbound.get(current) ?? [];\n\t\t\t\tfor (const childEdge of children) {\n\t\t\t\t\tconst child = childEdge.to;\n\t\t\t\t\tif (!componentSet.has(child)) continue;\n\t\t\t\t\tif ((nodeLane.get(child) ?? 0) !== currentNodeLane) continue;\n\t\t\t\t\tnodeLane.set(child, trunkParentLane);\n\t\t\t\t\tconst existingEdgeLane = edgeLane.get(childEdge.migrationHash);\n\t\t\t\t\tif (existingEdgeLane !== void 0 && existingEdgeLane === currentNodeLane) edgeLane.set(childEdge.migrationHash, trunkParentLane);\n\t\t\t\t\tbfsDescendants.push(child);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (nextLane > totalLanes) totalLanes = nextLane;\n\t}\n\treturn {\n\t\tnodeLane,\n\t\tnodeRank,\n\t\tedgeLane,\n\t\tnumLanes: totalLanes\n\t};\n}\nfunction computeDisplayOrder(nodes, nodeLane, nodeRank) {\n\tconst seen = /* @__PURE__ */ new Set();\n\tconst result = [];\n\tlet componentBuffer = [];\n\tfunction flushComponent() {\n\t\tcomponentBuffer.sort((a, b) => b.rank - a.rank || a.lane - b.lane);\n\t\tfor (const d of componentBuffer) result.push(d);\n\t\tcomponentBuffer = [];\n\t}\n\tfor (const n of nodes) {\n\t\tif (n === null) {\n\t\t\tflushComponent();\n\t\t\tresult.push(null);\n\t\t\tcontinue;\n\t\t}\n\t\tif (seen.has(n)) continue;\n\t\tseen.add(n);\n\t\tcomponentBuffer.push({\n\t\t\thash: n,\n\t\t\tlane: nodeLane.get(n) ?? 0,\n\t\t\trank: nodeRank.get(n) ?? 0\n\t\t});\n\t}\n\tflushComponent();\n\treturn result;\n}\n/** Create an empty cell. */\nfunction emptyCell() {\n\treturn { lines: [] };\n}\nfunction buildGrid(rowModel, opts = {}, highlight = {\n\tmode: \"flat\",\n\tonPath: /* @__PURE__ */ new Set()\n}) {\n\tconst colsPerLane = opts.colsPerLane ?? 2;\n\tconst isFocus = highlight.mode === \"focus\";\n\tconst { nodeLane, nodeRank, edgeLane, numLanes } = buildLaneAssignment(rowModel.nodes, rowModel.edges);\n\tconst displayOrder = computeDisplayOrder(rowModel.nodes, nodeLane, nodeRank);\n\tconst displayIndex = /* @__PURE__ */ new Map();\n\tlet nodeIdx = 0;\n\tfor (const d of displayOrder) if (d !== null) displayIndex.set(d.hash, nodeIdx++);\n\tconst rollbackEdges = rowModel.edges.filter((e) => e.kind === \"rollback\" && e.from !== e.to);\n\tconst adjacentRollbacks = [];\n\tconst skippingRollbacks = [];\n\tfor (const e of rollbackEdges) {\n\t\tconst si = displayIndex.get(e.from);\n\t\tconst ti = displayIndex.get(e.to);\n\t\tif (si === void 0 || ti === void 0) continue;\n\t\tif (ti === si + 1) adjacentRollbacks.push(e);\n\t\telse skippingRollbacks.push(e);\n\t}\n\tconst targetGroups = /* @__PURE__ */ new Map();\n\tfor (const e of skippingRollbacks) {\n\t\tconst group = targetGroups.get(e.to);\n\t\tif (group) group.push(e);\n\t\telse targetGroups.set(e.to, [e]);\n\t}\n\tconst sortedTargetKeys = [...targetGroups.keys()].sort((a, b) => {\n\t\tconst ta = displayIndex.get(a) ?? 0;\n\t\treturn (displayIndex.get(b) ?? 0) - ta;\n\t});\n\tconst numTargetGroups = sortedTargetKeys.length;\n\tconst geomLaneOf = /* @__PURE__ */ new Map();\n\tconst outermostGroup = numLanes + numTargetGroups - 1;\n\tsortedTargetKeys.forEach((targetHash, i) => {\n\t\tconst groupGeomLane = outermostGroup - i;\n\t\tfor (const e of targetGroups.get(targetHash)) geomLaneOf.set(e.migrationHash, groupGeomLane);\n\t});\n\tconst totalDisplayNodes = displayOrder.filter((d) => d !== null).length;\n\tconst planeLaneOf = /* @__PURE__ */ new Map();\n\tfor (const e of skippingRollbacks) {\n\t\tconst si = displayIndex.get(e.from) ?? 0;\n\t\tplaneLaneOf.set(e.migrationHash, totalDisplayNodes - si);\n\t}\n\tconst PALETTE_SIZE = 6;\n\tconst GREEN_PALETTE_IDX = 5;\n\tconst arcSourceIndex = /* @__PURE__ */ new Map();\n\tconst arcTargetIndex = /* @__PURE__ */ new Map();\n\tfor (const e of skippingRollbacks) {\n\t\tarcSourceIndex.set(e.migrationHash, displayIndex.get(e.from) ?? 0);\n\t\tarcTargetIndex.set(e.migrationHash, displayIndex.get(e.to) ?? 0);\n\t}\n\tconst arcsByTarget = /* @__PURE__ */ new Map();\n\tconst arcsBySource = /* @__PURE__ */ new Map();\n\tfor (const e of skippingRollbacks) {\n\t\tconst tb = arcsByTarget.get(e.to);\n\t\tif (tb) tb.push(e);\n\t\telse arcsByTarget.set(e.to, [e]);\n\t\tconst sb = arcsBySource.get(e.from);\n\t\tif (sb) sb.push(e);\n\t\telse arcsBySource.set(e.from, [e]);\n\t}\n\tconst colourLaneOf = /* @__PURE__ */ new Map();\n\tconst activeArcColours = /* @__PURE__ */ new Map();\n\tconst activeFwdLaneColours = /* @__PURE__ */ new Set();\n\tfor (let i = displayOrder.length - 1; i >= 0; i--) {\n\t\tconst nd = displayOrder[i];\n\t\tif (nd === null || nd === void 0) continue;\n\t\tconst { hash: nodeHash } = nd;\n\t\tconst nodeFwdLane = nodeLane.get(nodeHash) ?? 0;\n\t\tactiveFwdLaneColours.add(nodeFwdLane % PALETTE_SIZE);\n\t\tconst sortedIncoming = [...arcsByTarget.get(nodeHash) ?? []].sort((a, b) => a.dirName.localeCompare(b.dirName));\n\t\tfor (const arc of sortedIncoming) {\n\t\t\tconst originLaneColour = (nodeLane.get(arc.from) ?? 0) % PALETTE_SIZE;\n\t\t\tconst occupied = new Set(activeFwdLaneColours);\n\t\t\tfor (const c of activeArcColours.values()) occupied.add(c);\n\t\t\toccupied.add(GREEN_PALETTE_IDX);\n\t\t\toccupied.add(originLaneColour);\n\t\t\tlet chosen = -1;\n\t\t\tfor (let ci = 0; ci < PALETTE_SIZE; ci++) if (!occupied.has(ci)) {\n\t\t\t\tchosen = ci;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (chosen === -1) {\n\t\t\t\tfor (let ci = 0; ci < PALETTE_SIZE; ci++) if (ci !== GREEN_PALETTE_IDX) {\n\t\t\t\t\tchosen = ci;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcolourLaneOf.set(arc.migrationHash, chosen === -1 ? 0 : chosen);\n\t\t\tactiveArcColours.set(arc.migrationHash, chosen === -1 ? 0 : chosen);\n\t\t}\n\t\tfor (const arc of arcsBySource.get(nodeHash) ?? []) activeArcColours.delete(arc.migrationHash);\n\t}\n\tconst routedBackArcs = skippingRollbacks.map((e) => ({\n\t\tedge: e,\n\t\tsourceIndex: displayIndex.get(e.from) ?? 0,\n\t\ttargetIndex: displayIndex.get(e.to) ?? 0,\n\t\tgeomLane: geomLaneOf.get(e.migrationHash) ?? numLanes,\n\t\tcolourLane: colourLaneOf.get(e.migrationHash) ?? 0,\n\t\tplaneLane: planeLaneOf.get(e.migrationHash) ?? numLanes\n\t}));\n\tconst backArcsBySource = /* @__PURE__ */ new Map();\n\tconst backArcsByTarget = /* @__PURE__ */ new Map();\n\tfor (const arc of routedBackArcs) {\n\t\tconst sb = backArcsBySource.get(arc.edge.from);\n\t\tif (sb) sb.push(arc);\n\t\telse backArcsBySource.set(arc.edge.from, [arc]);\n\t\tconst tb = backArcsByTarget.get(arc.edge.to);\n\t\tif (tb) tb.push(arc);\n\t\telse backArcsByTarget.set(arc.edge.to, [arc]);\n\t}\n\tconst adjacentBySource = /* @__PURE__ */ new Map();\n\tconst adjacentByTarget = /* @__PURE__ */ new Map();\n\tfor (const e of adjacentRollbacks) {\n\t\tconst b = adjacentBySource.get(e.from);\n\t\tif (b) b.push(e);\n\t\telse adjacentBySource.set(e.from, [e]);\n\t\tconst t = adjacentByTarget.get(e.to);\n\t\tif (t) t.push(e);\n\t\telse adjacentByTarget.set(e.to, [e]);\n\t}\n\tfor (const list of adjacentBySource.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tconst totalCols = (numLanes + numTargetGroups) * colsPerLane;\n\tconst fwdEdges = rowModel.edges.filter((e) => e.kind === \"forward\" && e.from !== e.to);\n\tconst selfEdges = rowModel.edges.filter((e) => e.kind === \"self\");\n\tconst outboundFwd = /* @__PURE__ */ new Map();\n\tconst inboundFwd = /* @__PURE__ */ new Map();\n\tfor (const e of fwdEdges) {\n\t\tconst ob = outboundFwd.get(e.from);\n\t\tif (ob) ob.push(e);\n\t\telse outboundFwd.set(e.from, [e]);\n\t\tconst ib = inboundFwd.get(e.to);\n\t\tif (ib) ib.push(e);\n\t\telse inboundFwd.set(e.to, [e]);\n\t}\n\tfor (const list of outboundFwd.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tfor (const list of inboundFwd.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tconst selfEdgesByNode = /* @__PURE__ */ new Map();\n\tfor (const e of selfEdges) {\n\t\tconst bucket = selfEdgesByNode.get(e.from);\n\t\tif (bucket) bucket.push(e);\n\t\telse selfEdgesByNode.set(e.from, [e]);\n\t}\n\tfor (const list of selfEdgesByNode.values()) list.sort((a, b) => a.dirName.localeCompare(b.dirName));\n\tfunction roleOf(migrationHash) {\n\t\tif (!isFocus) return void 0;\n\t\treturn highlight.onPath.has(migrationHash) ? \"on-path\" : \"off-path\";\n\t}\n\tconst onPathNodes = /* @__PURE__ */ new Set();\n\tif (isFocus) {\n\t\tfor (const e of [\n\t\t\t...fwdEdges,\n\t\t\t...selfEdges,\n\t\t\t...rollbackEdges\n\t\t]) if (highlight.onPath.has(e.migrationHash)) {\n\t\t\tonPathNodes.add(e.from);\n\t\t\tonPathNodes.add(e.to);\n\t\t}\n\t}\n\tfunction nodeRoleOf(hash) {\n\t\tif (!isFocus) return void 0;\n\t\treturn onPathNodes.has(hash) ? \"on-path\" : \"off-path\";\n\t}\n\tfunction planeOf(lane, role) {\n\t\tif (!isFocus) return lane;\n\t\treturn role === \"on-path\" ? 0 : lane + 1;\n\t}\n\tfunction lineRefFor(edge, lane) {\n\t\treturn {\n\t\t\tmigrationHash: edge.migrationHash,\n\t\t\tdirName: edge.dirName,\n\t\t\tlane,\n\t\t\trole: roleOf(edge.migrationHash)\n\t\t};\n\t}\n\t/** Synthetic LineRef for a lane carrying a representative edge's role (pass-through). */\n\tfunction passLineRef(lane, dirName, migHash) {\n\t\treturn {\n\t\t\tmigrationHash: migHash,\n\t\t\tdirName,\n\t\t\tlane,\n\t\t\trole: roleOf(migHash)\n\t\t};\n\t}\n\tfunction vertCell(line) {\n\t\treturn { lines: [{\n\t\t\tline,\n\t\t\tdirections: /* @__PURE__ */ new Set([\"up\", \"down\"]),\n\t\t\tplane: planeOf(line.lane, line.role)\n\t\t}] };\n\t}\n\tfunction dirCell(line, dirs) {\n\t\treturn { lines: [{\n\t\t\tline,\n\t\t\tdirections: dirs,\n\t\t\tplane: planeOf(line.lane, line.role)\n\t\t}] };\n\t}\n\tfunction nodeCell(nodeRef) {\n\t\treturn {\n\t\t\tnode: nodeRef,\n\t\t\tlines: []\n\t\t};\n\t}\n\tconst laneCurrentEdge = /* @__PURE__ */ new Map();\n\tfunction getRepLine(lane) {\n\t\tconst e = laneCurrentEdge.get(lane);\n\t\tif (e) return lineRefFor(e, lane);\n\t\treturn passLineRef(lane, `lane${lane}`, `lane${lane}`);\n\t}\n\tconst activeLanes = /* @__PURE__ */ new Set();\n\tconst grid = [];\n\tfunction makeRow() {\n\t\treturn Array.from({ length: totalCols }, () => emptyCell());\n\t}\n\tfunction placeVerticals(row, skip) {\n\t\tfor (const lane of activeLanes) {\n\t\t\tif (skip.has(lane)) continue;\n\t\t\tconst railCol = lane * colsPerLane;\n\t\t\tconst cell = row[railCol];\n\t\t\tif (cell !== void 0 && cell.lines.length === 0 && !cell.node) row[railCol] = vertCell(getRepLine(lane));\n\t\t}\n\t}\n\tconst activeBackArcs = /* @__PURE__ */ new Set();\n\tfunction backArcLine(arc) {\n\t\treturn {\n\t\t\tmigrationHash: arc.edge.migrationHash,\n\t\t\tdirName: arc.edge.dirName,\n\t\t\tlane: arc.colourLane,\n\t\t\trole: roleOf(arc.edge.migrationHash)\n\t\t};\n\t}\n\tfunction backArcPlane(arc) {\n\t\tconst role = roleOf(arc.edge.migrationHash);\n\t\tif (!isFocus) return arc.planeLane;\n\t\treturn role === \"on-path\" ? 0 : arc.planeLane + 1;\n\t}\n\tfunction composeLine(row, col, line, dirs, plane, extra) {\n\t\tconst existing = row[col];\n\t\tconst cellLine = {\n\t\t\tline,\n\t\t\tdirections: dirs,\n\t\t\tplane,\n\t\t\t...extra?.landingArrow ? { landingArrow: true } : {}\n\t\t};\n\t\tif (existing && (existing.lines.length > 0 || existing.node)) row[col] = {\n\t\t\t...existing,\n\t\t\tlines: [...existing.lines, cellLine]\n\t\t};\n\t\telse row[col] = { lines: [cellLine] };\n\t}\n\tfunction placeBackVerticals(row) {\n\t\tfor (const arc of activeBackArcs) composeLine(row, arc.geomLane * colsPerLane, backArcLine(arc), /* @__PURE__ */ new Set([\"up\", \"down\"]), backArcPlane(arc));\n\t\tplaceAdjacentOverlays(row);\n\t}\n\tconst activeAdjacent = /* @__PURE__ */ new Set();\n\tfunction placeAdjacentOverlays(row) {\n\t\tfor (const adj of activeAdjacent) {\n\t\t\tconst railCol = adj.lane * colsPerLane;\n\t\t\tif (row[railCol]?.node) continue;\n\t\t\tconst line = lineRefFor(adj.edge, adj.lane);\n\t\t\tcomposeLine(row, railCol, line, /* @__PURE__ */ new Set([\"up\", \"down\"]), planeOf(adj.lane, line.role));\n\t\t}\n\t}\n\tfunction emitBackArcTee(row, nodeLaneNum, arc) {\n\t\tconst nodeRail = nodeLaneNum * colsPerLane;\n\t\tconst geomRail = arc.geomLane * colsPerLane;\n\t\tconst line = backArcLine(arc);\n\t\tconst plane = backArcPlane(arc);\n\t\tfor (let col = nodeRail + 1; col < geomRail; col++) composeLine(row, col, line, /* @__PURE__ */ new Set([\"left\", \"right\"]), plane);\n\t\tcomposeLine(row, geomRail, line, /* @__PURE__ */ new Set([\"down\", \"left\"]), plane);\n\t}\n\tfunction emitBackArcLanding(row, nodeLaneNum, arc) {\n\t\tconst nodeRail = nodeLaneNum * colsPerLane;\n\t\tconst geomRail = arc.geomLane * colsPerLane;\n\t\tconst line = backArcLine(arc);\n\t\tconst plane = backArcPlane(arc);\n\t\tcomposeLine(row, nodeRail + 1, line, /* @__PURE__ */ new Set([\"left\", \"right\"]), plane, { landingArrow: true });\n\t\tfor (let col = nodeRail + 2; col < geomRail; col++) composeLine(row, col, line, /* @__PURE__ */ new Set([\"left\", \"right\"]), plane);\n\t\tcomposeLine(row, geomRail, line, /* @__PURE__ */ new Set([\"up\", \"left\"]), plane);\n\t}\n\tfunction emitConnectorRow(trunkLane, branchEntries, connectorType, trunkEdge) {\n\t\tconst row = makeRow();\n\t\tconst sorted = [...branchEntries].sort((a, b) => a.lane - b.lane);\n\t\tif (sorted.length === 0) return row;\n\t\tconst branchByLane = /* @__PURE__ */ new Map();\n\t\tfor (const b of sorted) branchByLane.set(b.lane, b.edge);\n\t\tlet continuousLane = trunkLane;\n\t\tif (isFocus) if (trunkEdge && highlight.onPath.has(trunkEdge.migrationHash)) continuousLane = trunkLane;\n\t\telse {\n\t\t\tconst onPathBranch = sorted.find((b) => highlight.onPath.has(b.edge.migrationHash));\n\t\t\tif (onPathBranch) continuousLane = onPathBranch.lane;\n\t\t}\n\t\tconst trunkRailCol = trunkLane * colsPerLane;\n\t\tconst continuousRailCol = continuousLane * colsPerLane;\n\t\tfunction addLine(col, line, dirs) {\n\t\t\tconst existing = row[col];\n\t\t\tconst cellLine = {\n\t\t\t\tline,\n\t\t\t\tdirections: dirs,\n\t\t\t\tplane: planeOf(line.lane, line.role)\n\t\t\t};\n\t\t\trow[col] = existing && existing.lines.length > 0 ? {\n\t\t\t\t...existing,\n\t\t\t\tlines: [...existing.lines, cellLine]\n\t\t\t} : { lines: [cellLine] };\n\t\t}\n\t\tconst cornerLeftDown = connectorType === \"merge\" ? /* @__PURE__ */ new Set([\"left\", \"down\"]) : /* @__PURE__ */ new Set([\"left\", \"up\"]);\n\t\tfor (let i = 0; i < sorted.length; i++) {\n\t\t\tconst b = sorted[i];\n\t\t\tif (b.lane === continuousLane) continue;\n\t\t\tconst branchLine = lineRefFor(b.edge, b.lane);\n\t\t\tconst railCol = b.lane * colsPerLane;\n\t\t\taddLine(railCol, branchLine, cornerLeftDown);\n\t\t\tconst leftBound = i === 0 ? trunkRailCol + 1 : sorted[i - 1].lane * colsPerLane + 1;\n\t\t\tfor (let col = leftBound; col < railCol; col++) addLine(col, branchLine, /* @__PURE__ */ new Set([\"left\", \"right\"]));\n\t\t}\n\t\tconst continuousLine = continuousLane === trunkLane ? trunkEdge ? lineRefFor(trunkEdge, trunkLane) : getRepLine(trunkLane) : lineRefFor(branchByLane.get(continuousLane), continuousLane);\n\t\tif (continuousLane === trunkLane) addLine(trunkRailCol, continuousLine, /* @__PURE__ */ new Set([\"up\", \"down\"]));\n\t\telse {\n\t\t\taddLine(trunkRailCol, continuousLine, connectorType === \"merge\" ? /* @__PURE__ */ new Set([\"up\", \"right\"]) : /* @__PURE__ */ new Set([\"down\", \"right\"]));\n\t\t\tfor (let col = trunkRailCol + 1; col < continuousRailCol; col++) addLine(col, continuousLine, /* @__PURE__ */ new Set([\"left\", \"right\"]));\n\t\t\taddLine(continuousRailCol, continuousLine, cornerLeftDown);\n\t\t}\n\t\tplaceVerticals(row, /* @__PURE__ */ new Set([trunkLane, ...sorted.map((b) => b.lane)]));\n\t\tplaceBackVerticals(row);\n\t\treturn row;\n\t}\n\tfor (const nodeDisplay of displayOrder) {\n\t\tif (nodeDisplay === null) {\n\t\t\tconst sepRow = makeRow();\n\t\t\tsepRow[0] = {\n\t\t\t\tlines: [],\n\t\t\t\tseparator: true\n\t\t\t};\n\t\t\tgrid.push(sepRow);\n\t\t\tcontinue;\n\t\t}\n\t\tconst { hash: nodeHash } = nodeDisplay;\n\t\tconst nodeLaneNum = nodeLane.get(nodeHash) ?? 0;\n\t\tactiveLanes.add(nodeLaneNum);\n\t\tconst outEdges = outboundFwd.get(nodeHash) ?? [];\n\t\tif (outEdges.length > 1) {\n\t\t\tconst trunkEdgeForFork = outEdges[0];\n\t\t\tconst trunkChildLane = edgeLane.get(trunkEdgeForFork.migrationHash) ?? nodeLane.get(trunkEdgeForFork.to) ?? nodeLaneNum;\n\t\t\tconst branchEntries = outEdges.slice(1).map((e) => ({\n\t\t\t\tlane: edgeLane.get(e.migrationHash) ?? nodeLane.get(e.to) ?? 0,\n\t\t\t\tedge: e\n\t\t\t})).filter((b) => b.lane !== trunkChildLane && activeLanes.has(b.lane));\n\t\t\tif (branchEntries.length > 0) {\n\t\t\t\tconst trunkEdge = outEdges[0];\n\t\t\t\tconst connRow = emitConnectorRow(nodeLaneNum, branchEntries, \"fork\", trunkEdge);\n\t\t\t\tgrid.push(connRow);\n\t\t\t\tassertSingleOwner(connRow, isFocus);\n\t\t\t\tfor (const b of branchEntries) activeLanes.delete(b.lane);\n\t\t\t}\n\t\t}\n\t\tconst selfMigrations = selfEdgesByNode.get(nodeHash) ?? [];\n\t\tfor (const selfEdge of selfMigrations) {\n\t\t\tconst row = makeRow();\n\t\t\tconst railCol = nodeLaneNum * colsPerLane;\n\t\t\tconst connCol = nodeLaneNum * colsPerLane + 1;\n\t\t\tconst line = lineRefFor(selfEdge, nodeLaneNum);\n\t\t\trow[railCol] = vertCell(line);\n\t\t\trow[connCol] = { lines: [{\n\t\t\t\tline,\n\t\t\t\tdirections: /* @__PURE__ */ new Set(),\n\t\t\t\tplane: planeOf(nodeLaneNum, line.role),\n\t\t\t\tselfLoop: true\n\t\t\t}] };\n\t\t\tplaceVerticals(row, /* @__PURE__ */ new Set([nodeLaneNum]));\n\t\t\tplaceBackVerticals(row);\n\t\t\tgrid.push(row);\n\t\t}\n\t\t{\n\t\t\tconst row = makeRow();\n\t\t\tconst railCol = nodeLaneNum * colsPerLane;\n\t\t\trow[railCol] = nodeCell({\n\t\t\t\tcontractHash: nodeHash,\n\t\t\t\tisEmpty: nodeHash === EMPTY_CONTRACT_HASH,\n\t\t\t\tlane: nodeLaneNum,\n\t\t\t\trole: nodeRoleOf(nodeHash)\n\t\t\t});\n\t\t\tplaceVerticals(row, /* @__PURE__ */ new Set([nodeLaneNum]));\n\t\t\tconst landingArcs = backArcsByTarget.get(nodeHash) ?? [];\n\t\t\tfor (const arc of landingArcs) activeBackArcs.delete(arc);\n\t\t\tfor (const adj of [...activeAdjacent]) if (adj.edge.to === nodeHash) activeAdjacent.delete(adj);\n\t\t\tplaceBackVerticals(row);\n\t\t\tfor (const arc of landingArcs) emitBackArcLanding(row, nodeLaneNum, arc);\n\t\t\tconst teeArcs = backArcsBySource.get(nodeHash) ?? [];\n\t\t\tfor (const arc of teeArcs) emitBackArcTee(row, nodeLaneNum, arc);\n\t\t\tgrid.push(row);\n\t\t\tfor (const arc of teeArcs) activeBackArcs.add(arc);\n\t\t\tfor (const adj of adjacentBySource.get(nodeHash) ?? []) activeAdjacent.add({\n\t\t\t\tlane: nodeLaneNum,\n\t\t\t\tedge: adj\n\t\t\t});\n\t\t}\n\t\tfunction edgeLaneFor(edge) {\n\t\t\tconst override = edgeLane.get(edge.migrationHash);\n\t\t\tif (override !== void 0) return override;\n\t\t\treturn Math.max(nodeLane.get(edge.from) ?? 0, nodeLane.get(edge.to) ?? 0);\n\t\t}\n\t\tconst inEdges = inboundFwd.get(nodeHash) ?? [];\n\t\tinEdges.sort((a, b) => {\n\t\t\tconst aLane = edgeLaneFor(a);\n\t\t\tconst bLane = edgeLaneFor(b);\n\t\t\tif (aLane !== bLane) return aLane - bLane;\n\t\t\treturn a.dirName.localeCompare(b.dirName);\n\t\t});\n\t\tfor (const edge of inEdges) laneCurrentEdge.set(edgeLaneFor(edge), edge);\n\t\t{\n\t\t\tconst teeArcs = backArcsBySource.get(nodeHash) ?? [];\n\t\t\tfor (const arc of teeArcs) {\n\t\t\t\tconst row = makeRow();\n\t\t\t\tconst railCol = arc.geomLane * colsPerLane;\n\t\t\t\tconst connCol = railCol + 1;\n\t\t\t\tconst line = backArcLine(arc);\n\t\t\t\tconst plane = backArcPlane(arc);\n\t\t\t\tcomposeLine(row, railCol, line, /* @__PURE__ */ new Set([\"up\", \"down\"]), plane);\n\t\t\t\tcomposeLine(row, connCol, line, /* @__PURE__ */ new Set([\"down\"]), plane);\n\t\t\t\tplaceVerticals(row, /* @__PURE__ */ new Set());\n\t\t\t\tplaceBackVerticals(row);\n\t\t\t\tgrid.push(row);\n\t\t\t}\n\t\t}\n\t\tif (inEdges.length > 1) {\n\t\t\tconst branchEntries = inEdges.slice(1).map((e) => ({\n\t\t\t\tlane: edgeLaneFor(e),\n\t\t\t\tedge: e\n\t\t\t}));\n\t\t\tconst trunkEdge = inEdges[0];\n\t\t\tconst connRow = emitConnectorRow(nodeLaneNum, branchEntries, \"merge\", trunkEdge);\n\t\t\tgrid.push(connRow);\n\t\t\tassertSingleOwner(connRow, isFocus);\n\t\t\tfor (const b of branchEntries) activeLanes.add(b.lane);\n\t\t}\n\t\tfor (const edge of inEdges) {\n\t\t\tconst eLane = edgeLaneFor(edge);\n\t\t\tconst row = makeRow();\n\t\t\tconst railCol = eLane * colsPerLane;\n\t\t\tconst connCol = eLane * colsPerLane + 1;\n\t\t\tconst line = lineRefFor(edge, eLane);\n\t\t\trow[railCol] = vertCell(line);\n\t\t\trow[connCol] = dirCell(line, /* @__PURE__ */ new Set([\"up\"]));\n\t\t\tplaceVerticals(row, /* @__PURE__ */ new Set([eLane]));\n\t\t\tplaceBackVerticals(row);\n\t\t\tgrid.push(row);\n\t\t}\n\t\t{\n\t\t\tconst adjacents = adjacentBySource.get(nodeHash) ?? [];\n\t\t\tfor (const adj of adjacents) {\n\t\t\t\tconst row = makeRow();\n\t\t\t\tconst connCol = nodeLaneNum * colsPerLane + 1;\n\t\t\t\tconst line = lineRefFor(adj, nodeLaneNum);\n\t\t\t\tconst plane = planeOf(nodeLaneNum, line.role);\n\t\t\t\tcomposeLine(row, connCol, line, /* @__PURE__ */ new Set([\"down\"]), plane);\n\t\t\t\tplaceVerticals(row, /* @__PURE__ */ new Set());\n\t\t\t\tplaceBackVerticals(row);\n\t\t\t\tgrid.push(row);\n\t\t\t}\n\t\t}\n\t\tif (inEdges.length === 0) activeLanes.delete(nodeLaneNum);\n\t}\n\treturn grid;\n}\nfunction assertSingleOwner(row, isFocus) {\n\tfor (const cell of row) {\n\t\tif (cell.lines.length <= 1) continue;\n\t\tlet topPlane = Number.POSITIVE_INFINITY;\n\t\tfor (const cl of cell.lines) if (cl.plane < topPlane) topPlane = cl.plane;\n\t\tconst top = cell.lines.filter((cl) => cl.plane === topPlane);\n\t\tif (top.length > 1) {\n\t\t\tif (isFocus) {\n\t\t\t\tif (new Set(top.map((cl) => cl.line.role)).size > 1) throw new InternalError(\"migration-graph layout: single-owner invariant violated — two differently-roled lines share the top plane in one cell\");\n\t\t\t}\n\t\t}\n\t}\n}\n//#endregion\n//#region src/utils/formatters/migration-list-graph-topology.ts\nfunction compareDirNameDesc(a, b) {\n\treturn b.dirName.localeCompare(a.dirName);\n}\nfunction bumpDegree(map, key) {\n\tmap.set(key, (map.get(key) ?? 0) + 1);\n}\nfunction compareNodesRootFirst(a, b) {\n\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\treturn a.localeCompare(b);\n}\n/**\n* Shortest-path distance of each node from the forward roots, over the given\n* candidate edges. Roots are the in-degree-0 nodes (baseline first, then lex);\n* a rooted component therefore distances every node by how many forward steps\n* it sits from a root. A component with no root (a pure cycle) is seeded from\n* its single lexically-smallest node so the cycle still gets a stable layering.\n*\n* Crucially this is *shortest* path, not longest: a backward (rollback) edge\n* `deep → shallow` never offers a shorter route to the already-shallower\n* target, so it is inert here. Distances are thus stable whether or not the\n* rollbacks are still in the candidate set — which is what lets the peel below\n* tell a genuine back-edge (target strictly shallower than source) apart from a\n* forward edge that merely happens to share the back-edge's cycle.\n*/\nfunction forwardDistances(nodes, candidates) {\n\tconst inDegree = /* @__PURE__ */ new Map();\n\tfor (const node of nodes) inDegree.set(node, 0);\n\tfor (const edge of candidates) bumpDegree(inDegree, edge.to);\n\tconst roots = [...nodes].filter((node) => (inDegree.get(node) ?? 0) === 0);\n\troots.sort(compareNodesRootFirst);\n\tconst seeds = roots.length > 0 ? roots : [...nodes].sort(compareNodesRootFirst).slice(0, 1);\n\tconst dist = /* @__PURE__ */ new Map();\n\tfor (const seed of seeds) dist.set(seed, 0);\n\tconst maxPasses = nodes.size;\n\tfor (let pass = 0; pass < maxPasses; pass++) {\n\t\tlet changed = false;\n\t\tfor (const edge of candidates) {\n\t\t\tconst base = dist.get(edge.from);\n\t\t\tif (base === void 0) continue;\n\t\t\tconst next = base + 1;\n\t\t\tif (next < (dist.get(edge.to) ?? Number.POSITIVE_INFINITY)) {\n\t\t\t\tdist.set(edge.to, next);\n\t\t\t\tchanged = true;\n\t\t\t}\n\t\t}\n\t\tif (!changed) break;\n\t}\n\tfor (const node of nodes) if (!dist.has(node)) dist.set(node, 0);\n\treturn dist;\n}\nfunction canReachForward(start, goal, candidates) {\n\tif (start === goal) return true;\n\tconst outgoing = /* @__PURE__ */ new Map();\n\tfor (const edge of candidates) {\n\t\tconst bucket = outgoing.get(edge.from);\n\t\tif (bucket) bucket.push(edge.to);\n\t\telse outgoing.set(edge.from, [edge.to]);\n\t}\n\tconst visited = /* @__PURE__ */ new Set([start]);\n\tconst queue = [start];\n\twhile (queue.length > 0) {\n\t\tconst node = queue.shift();\n\t\tif (node === void 0) continue;\n\t\tfor (const next of outgoing.get(node) ?? []) {\n\t\t\tif (next === goal) return true;\n\t\t\tif (!visited.has(next)) {\n\t\t\t\tvisited.add(next);\n\t\t\t\tqueue.push(next);\n\t\t\t}\n\t\t}\n\t}\n\treturn false;\n}\n/**\n* Demote node-skipping rollbacks left forward by the DFS. An edge `from → to`\n* is a rollback exactly when both hold:\n* 1. `to` is a forward-ancestor of `from` — `to` can still reach `from` over\n* the other forward edges, so the edge closes a cycle; and\n* 2. `to` is strictly shallower than `from` (smaller forward distance) — the\n* edge points back toward the root rather than advancing history.\n*\n* Condition 2 is the discriminator: in a cycle created by a rollback every edge\n* satisfies condition 1, but only the rollback itself runs deep → shallow. The\n* forward chain edges run shallow → deep and are never peeled, however many\n* rollbacks converge on the same target. Tight back-edges whose source and\n* target sit at the same distance (mutual two-node cycles) are already resolved\n* by the DFS immediate-parent rule, so they never reach this pass. One edge is\n* peeled per iteration (dirName-descending tie-break) and distances/reachability\n* are recomputed, making the outcome independent of edge input order.\n*/\nfunction peelNodeSkippingRollbacks(nodes, kindByMigrationHash, nonSelf) {\n\tlet candidates = nonSelf.filter((edge) => kindByMigrationHash.get(edge.hash) === \"forward\");\n\twhile (candidates.length > 0) {\n\t\tconst dist = forwardDistances(nodes, candidates);\n\t\tconst backEdges = candidates.filter((edge) => {\n\t\t\tif ((dist.get(edge.to) ?? 0) >= (dist.get(edge.from) ?? 0)) return false;\n\t\t\tconst without = candidates.filter((candidate) => candidate !== edge);\n\t\t\treturn canReachForward(edge.to, edge.from, without);\n\t\t});\n\t\tif (backEdges.length === 0) break;\n\t\tbackEdges.sort(compareDirNameDesc);\n\t\tconst rollback = backEdges[0];\n\t\tif (rollback === void 0) break;\n\t\tkindByMigrationHash.set(rollback.hash, \"rollback\");\n\t\tcandidates = candidates.filter((edge) => edge !== rollback);\n\t}\n}\n/**\n* DFS with dirName-descending traversal. A GRAY target is a rollback only when it\n* is the immediate DFS parent of the source — cross-links to other GRAY nodes\n* stay forward. A follow-up peel pass demotes node-skipping rollbacks (target is\n* a forward-ancestor of the source and sits strictly shallower than it).\n*/\nfunction classifyNormalizedEdges(edges) {\n\tconst nodes = /* @__PURE__ */ new Set();\n\tconst kindByMigrationHash = /* @__PURE__ */ new Map();\n\tconst outgoingByFrom = /* @__PURE__ */ new Map();\n\tconst nonSelf = [];\n\tfor (const edge of edges) {\n\t\tnodes.add(edge.from);\n\t\tnodes.add(edge.to);\n\t\tif (edge.from === edge.to) {\n\t\t\tkindByMigrationHash.set(edge.hash, \"self\");\n\t\t\tcontinue;\n\t\t}\n\t\tnonSelf.push(edge);\n\t\tconst bucket = outgoingByFrom.get(edge.from);\n\t\tif (bucket) bucket.push(edge);\n\t\telse outgoingByFrom.set(edge.from, [edge]);\n\t}\n\tfor (const bucket of outgoingByFrom.values()) bucket.sort(compareDirNameDesc);\n\tconst nonSelfInDegree = /* @__PURE__ */ new Map();\n\tfor (const node of nodes) nonSelfInDegree.set(node, 0);\n\tfor (const bucket of outgoingByFrom.values()) for (const edge of bucket) bumpDegree(nonSelfInDegree, edge.to);\n\tconst dfsRoots = [];\n\tfor (const node of nodes) if ((nonSelfInDegree.get(node) ?? 0) === 0) dfsRoots.push(node);\n\tdfsRoots.sort((a, b) => {\n\t\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\t\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\t\treturn a.localeCompare(b);\n\t});\n\tif (dfsRoots.length === 0) dfsRoots.push(...[...nodes].sort((a, b) => a.localeCompare(b)));\n\tconst WHITE = 0;\n\tconst GRAY = 1;\n\tconst BLACK = 2;\n\tconst color = /* @__PURE__ */ new Map();\n\tconst dfsParent = /* @__PURE__ */ new Map();\n\tfor (const node of nodes) color.set(node, WHITE);\n\tconst stack = [];\n\tfunction isImmediateDfsParent(ancestor, node) {\n\t\treturn dfsParent.get(node) === ancestor;\n\t}\n\tfunction pushFrame(node, parent) {\n\t\tcolor.set(node, GRAY);\n\t\tdfsParent.set(node, parent);\n\t\tstack.push({\n\t\t\tnode,\n\t\t\toutgoing: outgoingByFrom.get(node) ?? [],\n\t\t\tindex: 0\n\t\t});\n\t}\n\tfunction runDfsFrom(root) {\n\t\tif (color.get(root) !== WHITE) return;\n\t\tpushFrame(root, void 0);\n\t\twhile (stack.length > 0) {\n\t\t\tconst frame = stack[stack.length - 1];\n\t\t\tif (frame === void 0) break;\n\t\t\tif (frame.index >= frame.outgoing.length) {\n\t\t\t\tcolor.set(frame.node, BLACK);\n\t\t\t\tstack.pop();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst edge = frame.outgoing[frame.index];\n\t\t\tframe.index += 1;\n\t\t\tif (edge === void 0) continue;\n\t\t\tconst v = edge.to;\n\t\t\tconst vColor = color.get(v);\n\t\t\tif (vColor === GRAY && isImmediateDfsParent(v, frame.node)) kindByMigrationHash.set(edge.hash, \"rollback\");\n\t\t\telse {\n\t\t\t\tkindByMigrationHash.set(edge.hash, \"forward\");\n\t\t\t\tif (vColor === WHITE) pushFrame(v, frame.node);\n\t\t\t}\n\t\t}\n\t}\n\tfor (const root of dfsRoots) runDfsFrom(root);\n\tconst remainingWhite = [...nodes].filter((node) => color.get(node) === WHITE);\n\tremainingWhite.sort((a, b) => a.localeCompare(b));\n\tfor (const root of remainingWhite) runDfsFrom(root);\n\tpeelNodeSkippingRollbacks(nodes, kindByMigrationHash, nonSelf);\n\tconst forwardInDegree = /* @__PURE__ */ new Map();\n\tconst forwardOutDegree = /* @__PURE__ */ new Map();\n\tfor (const edge of edges) {\n\t\tif (kindByMigrationHash.get(edge.hash) !== \"forward\") continue;\n\t\tbumpDegree(forwardOutDegree, edge.from);\n\t\tbumpDegree(forwardInDegree, edge.to);\n\t}\n\treturn {\n\t\tkindByMigrationHash,\n\t\tforwardInDegree,\n\t\tforwardOutDegree\n\t};\n}\n/**\n* Classify forward/rollback/self for a `MigrationGraph` edge set (Tier-3).\n*/\nfunction classifyMigrationGraphTopology(graph) {\n\tconst normalized = [];\n\tfor (const edges of graph.forwardChain.values()) for (const edge of edges) normalized.push({\n\t\thash: edge.migrationHash,\n\t\tfrom: edge.from,\n\t\tto: edge.to,\n\t\tdirName: edge.dirName\n\t});\n\treturn classifyNormalizedEdges(normalized);\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-rows.ts\n/**\n* Return the weakly-connected components of `graph` as an array of node sets,\n* ordered so the component containing EMPTY_CONTRACT_HASH comes first (if\n* present), with remaining components sorted by their lex-smallest node hash.\n*/\nfunction weaklyConnectedComponents(graph) {\n\tconst visited = /* @__PURE__ */ new Set();\n\tconst adjacency = /* @__PURE__ */ new Map();\n\tfunction addAdjacent(a, b) {\n\t\tconst aList = adjacency.get(a);\n\t\tif (aList) aList.push(b);\n\t\telse adjacency.set(a, [b]);\n\t\tconst bList = adjacency.get(b);\n\t\tif (bList) bList.push(a);\n\t\telse adjacency.set(b, [a]);\n\t}\n\tfor (const edges of graph.forwardChain.values()) for (const edge of edges) if (edge.from !== edge.to) addAdjacent(edge.from, edge.to);\n\tfor (const node of graph.nodes) if (!adjacency.has(node)) adjacency.set(node, []);\n\tconst components = [];\n\tfunction bfsComponent(start) {\n\t\tconst component = /* @__PURE__ */ new Set();\n\t\tconst queue = [start];\n\t\twhile (queue.length > 0) {\n\t\t\tconst node = queue.shift();\n\t\t\tif (node === void 0 || visited.has(node)) continue;\n\t\t\tvisited.add(node);\n\t\t\tcomponent.add(node);\n\t\t\tfor (const neighbor of adjacency.get(node) ?? []) if (!visited.has(neighbor)) queue.push(neighbor);\n\t\t}\n\t\treturn component;\n\t}\n\tconst allNodes = [...graph.nodes].sort((a, b) => {\n\t\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\t\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\t\treturn a.localeCompare(b);\n\t});\n\tfor (const node of allNodes) if (!visited.has(node)) components.push(bfsComponent(node));\n\tcomponents.sort((a, b) => {\n\t\tconst aHasEmpty = a.has(EMPTY_CONTRACT_HASH);\n\t\tconst bHasEmpty = b.has(EMPTY_CONTRACT_HASH);\n\t\tif (aHasEmpty && !bHasEmpty) return -1;\n\t\tif (!aHasEmpty && bHasEmpty) return 1;\n\t\tconst aMin = [...a].sort((x, y) => x.localeCompare(y))[0] ?? \"\";\n\t\tconst bMin = [...b].sort((x, y) => x.localeCompare(y))[0] ?? \"\";\n\t\treturn aMin.localeCompare(bMin);\n\t});\n\treturn components;\n}\nfunction forwardRootsInComponent(componentNodes, topology) {\n\tconst roots = [];\n\tfor (const node of componentNodes) if ((topology.forwardInDegree.get(node) ?? 0) === 0) roots.push(node);\n\troots.sort((a, b) => {\n\t\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\t\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\t\treturn a.localeCompare(b);\n\t});\n\tif (roots.length > 0) return roots;\n\treturn [...componentNodes].sort((a, b) => {\n\t\tif (a === EMPTY_CONTRACT_HASH) return -1;\n\t\tif (b === EMPTY_CONTRACT_HASH) return 1;\n\t\treturn a.localeCompare(b);\n\t});\n}\nfunction compareNodesTipsFirst(a, b, rank) {\n\tconst rankA = rank.get(a) ?? 0;\n\tconst rankB = rank.get(b) ?? 0;\n\tif (rankA !== rankB) return rankB - rankA;\n\tif (a === EMPTY_CONTRACT_HASH) return 1;\n\tif (b === EMPTY_CONTRACT_HASH) return -1;\n\treturn a.localeCompare(b);\n}\n/**\n* Layer nodes by longest forward-path rank from forward roots within the\n* component. Rank 0 is the root (bottom row); the maximum rank is the tip\n* (top row). Emits rank-descending with lex-ascending tie-break among siblings\n* at the same rank — stable across edge-insertion order and correct under\n* diamonds, cross-links, and rollbacks.\n*/\nfunction maxRank(rank) {\n\tlet max = 0;\n\tfor (const value of rank.values()) if (value > max) max = value;\n\treturn max;\n}\nfunction layerNodesByLongestForwardPath(componentNodes, topology, graph, contractHash) {\n\tconst forwardOut = /* @__PURE__ */ new Map();\n\tfor (const node of componentNodes) forwardOut.set(node, []);\n\tfor (const edges of graph.forwardChain.values()) for (const edge of edges) {\n\t\tif (!componentNodes.has(edge.from) || !componentNodes.has(edge.to)) continue;\n\t\tif (edge.from === edge.to) continue;\n\t\tif (topology.kindByMigrationHash.get(edge.migrationHash) !== \"forward\") continue;\n\t\tconst bucket = forwardOut.get(edge.from);\n\t\tif (bucket) bucket.push(edge.to);\n\t}\n\tconst roots = forwardRootsInComponent(componentNodes, topology);\n\tconst rank = /* @__PURE__ */ new Map();\n\tfor (const root of roots) rank.set(root, 0);\n\tconst maxPasses = componentNodes.size;\n\tfor (let pass = 0; pass < maxPasses; pass++) {\n\t\tlet changed = false;\n\t\tfor (const node of componentNodes) {\n\t\t\tconst base = rank.get(node);\n\t\t\tif (base === void 0) continue;\n\t\t\tfor (const to of forwardOut.get(node) ?? []) {\n\t\t\t\tconst next = base + 1;\n\t\t\t\tif (next > (rank.get(to) ?? -1)) {\n\t\t\t\t\trank.set(to, next);\n\t\t\t\t\tchanged = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (!changed) break;\n\t}\n\tfor (const node of componentNodes) if (!rank.has(node)) rank.set(node, 0);\n\tif (contractHash !== void 0 && contractHash !== EMPTY_CONTRACT_HASH && componentNodes.has(contractHash) && (forwardOut.get(contractHash) ?? []).length === 0) rank.set(contractHash, maxRank(rank) + 1);\n\treturn [...componentNodes].sort((a, b) => compareNodesTipsFirst(a, b, rank));\n}\n/**\n* Build the row model from a tolerant `MigrationGraph`.\n*\n* The row model is the first pure-data stage of the `migration graph` render\n* pipeline. It:\n* - classifies every edge as `forward`, `rollback`, or `self`;\n* - produces a deterministic vertical node ordering (tips at index 0, roots\n* at the end) within each weakly-connected component;\n* - separates disjoint components with `null` sentinels;\n* - optionally prepends a detached current contract as its own single-node\n* component when `contractHash` is not already in the graph.\n*\n* No columns, no lane allocation, no glyphs, no rendering.\n*/\n/**\n* Resolve the detached current contract, if any: a real contract (not the\n* empty baseline) that no migration on disk produces, so it is absent from\n* the graph. Such a contract renders as a floating node rather than\n* decorating an existing one. Returns the hash when detached, else undefined.\n*/\nfunction detachedContractHash(graph, contractHash) {\n\treturn contractHash !== void 0 && contractHash !== EMPTY_CONTRACT_HASH && !graph.nodes.has(contractHash) ? contractHash : void 0;\n}\nfunction isForwardLeaf(node, edges) {\n\treturn !edges.some((e) => e.kind === \"forward\" && e.from === node && e.from !== e.to);\n}\nfunction forwardReachableFrom(start, forwardTo) {\n\tconst reachable = /* @__PURE__ */ new Set([start]);\n\tconst queue = [start];\n\twhile (queue.length > 0) {\n\t\tconst node = queue.shift();\n\t\tif (node === void 0) continue;\n\t\tfor (const next of forwardTo.get(node) ?? []) if (!reachable.has(next)) {\n\t\t\treachable.add(next);\n\t\t\tqueue.push(next);\n\t\t}\n\t}\n\treturn reachable;\n}\nfunction buildForwardToMap(edges) {\n\tconst forwardTo = /* @__PURE__ */ new Map();\n\tfor (const edge of edges) {\n\t\tif (edge.kind !== \"forward\" || edge.from === edge.to) continue;\n\t\tconst bucket = forwardTo.get(edge.from);\n\t\tif (bucket) bucket.push(edge.to);\n\t\telse forwardTo.set(edge.from, [edge.to]);\n\t}\n\treturn forwardTo;\n}\nfunction sortEdgesForContractHashTrunk(edges, contractHash) {\n\tif (contractHash === void 0 || contractHash === EMPTY_CONTRACT_HASH || !isForwardLeaf(contractHash, edges)) return edges;\n\tconst preferredLeaf = contractHash;\n\tconst forwardTo = buildForwardToMap(edges);\n\tconst reachability = /* @__PURE__ */ new Map();\n\tfunction canReachContractHash(from) {\n\t\tlet cached = reachability.get(from);\n\t\tif (cached === void 0) {\n\t\t\tcached = forwardReachableFrom(from, forwardTo);\n\t\t\treachability.set(from, cached);\n\t\t}\n\t\treturn cached.has(preferredLeaf);\n\t}\n\tfunction trunkBias(edge) {\n\t\tif (edge.kind !== \"forward\" || edge.from === edge.to) return 0;\n\t\tif (edge.to === preferredLeaf) return 2;\n\t\tif (canReachContractHash(edge.to)) return 1;\n\t\treturn 0;\n\t}\n\treturn edges.map((edge, index) => ({\n\t\tedge,\n\t\tindex,\n\t\tbias: trunkBias(edge)\n\t})).sort((a, b) => {\n\t\tif (a.edge.from !== b.edge.from) return a.index - b.index;\n\t\tif (a.bias !== b.bias) return b.bias - a.bias;\n\t\treturn a.index - b.index;\n\t}).map(({ edge }) => edge);\n}\nfunction rebuildEdgeLookupMaps(edges) {\n\tconst edgesByFrom = /* @__PURE__ */ new Map();\n\tconst edgesByTo = /* @__PURE__ */ new Map();\n\tfor (const classified of edges) {\n\t\tconst fromBucket = edgesByFrom.get(classified.from);\n\t\tif (fromBucket) fromBucket.push(classified);\n\t\telse edgesByFrom.set(classified.from, [classified]);\n\t\tconst toBucket = edgesByTo.get(classified.to);\n\t\tif (toBucket) toBucket.push(classified);\n\t\telse edgesByTo.set(classified.to, [classified]);\n\t}\n\treturn {\n\t\tedgesByFrom,\n\t\tedgesByTo\n\t};\n}\nfunction buildMigrationGraphRows(graph, options = {}) {\n\tconst emptyModel = {\n\t\tnodes: [],\n\t\tedges: [],\n\t\tedgesByFrom: /* @__PURE__ */ new Map(),\n\t\tedgesByTo: /* @__PURE__ */ new Map()\n\t};\n\tif (graph.nodes.size === 0) {\n\t\tconst detached = detachedContractHash(graph, options.contractHash);\n\t\treturn detached !== void 0 ? {\n\t\t\t...emptyModel,\n\t\t\tnodes: [detached]\n\t\t} : emptyModel;\n\t}\n\tconst topology = classifyMigrationGraphTopology(graph);\n\tconst edges = [];\n\tfor (const edgeList of graph.forwardChain.values()) for (const edge of edgeList) {\n\t\tconst kind = topology.kindByMigrationHash.get(edge.migrationHash) ?? \"forward\";\n\t\tedges.push({\n\t\t\tmigrationHash: edge.migrationHash,\n\t\t\tfrom: edge.from,\n\t\t\tto: edge.to,\n\t\t\tdirName: edge.dirName,\n\t\t\tkind\n\t\t});\n\t}\n\tconst sortedEdges = sortEdgesForContractHashTrunk(edges, options.contractHash);\n\tconst { edgesByFrom, edgesByTo } = rebuildEdgeLookupMaps(sortedEdges);\n\tconst components = weaklyConnectedComponents(graph);\n\tconst nodes = [];\n\tfor (let i = 0; i < components.length; i++) {\n\t\tif (i > 0) nodes.push(null);\n\t\tconst component = components[i];\n\t\tif (component === void 0) continue;\n\t\tconst ordered = layerNodesByLongestForwardPath(component, topology, graph, options.contractHash);\n\t\tfor (const node of ordered) nodes.push(node);\n\t}\n\tconst detached = detachedContractHash(graph, options.contractHash);\n\tif (detached !== void 0) {\n\t\tif (nodes.length > 0) nodes.unshift(null);\n\t\tnodes.unshift(detached);\n\t}\n\treturn {\n\t\tnodes,\n\t\tedges: sortedEdges,\n\t\tedgesByFrom,\n\t\tedgesByTo\n\t};\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-space-render.ts\nfunction mergeMigrationEdgeAnnotations(listOverlay, statusOverlay) {\n\tconst merged = /* @__PURE__ */ new Map();\n\tfor (const [migrationHash, listAnnotation] of listOverlay) {\n\t\tconst statusAnnotation = statusOverlay.get(migrationHash);\n\t\tmerged.set(migrationHash, {\n\t\t\t...listAnnotation,\n\t\t\t...statusAnnotation?.status !== void 0 ? { status: statusAnnotation.status } : {}\n\t\t});\n\t}\n\treturn merged;\n}\n/**\n* Translate `migrate --show` per-edge path-highlight annotations into a\n* {@link Highlight}. With any `pathHighlight` present the result is focus mode\n* (on-path lifted green, off-path dim); otherwise flat (lane-rotation colour).\n*/\nfunction highlightFromEdgeAnnotations(edgeAnnotationsByHash) {\n\tconst onPath = /* @__PURE__ */ new Set();\n\tlet anyPathHighlight = false;\n\tfor (const [migrationHash, annotation] of edgeAnnotationsByHash) {\n\t\tif (annotation.pathHighlight === void 0) continue;\n\t\tanyPathHighlight = true;\n\t\tif (annotation.pathHighlight === \"on-path\") onPath.add(migrationHash);\n\t}\n\treturn anyPathHighlight ? {\n\t\tmode: \"focus\",\n\t\tonPath\n\t} : {\n\t\tmode: \"flat\",\n\t\tonPath: /* @__PURE__ */ new Set()\n\t};\n}\nfunction buildGridForInput(input) {\n\tconst rowModel = buildMigrationGraphRows(input.graph, { contractHash: input.liveContractHash });\n\treturn {\n\t\tgrid: buildGrid(rowModel, {}, {\n\t\t\tmode: \"flat\",\n\t\t\tonPath: /* @__PURE__ */ new Set()\n\t\t}),\n\t\trowModel\n\t};\n}\n/**\n* The widest gutter→label column across the given space layouts. Cross-space\n* callers pass this back in so every section's labels share one column.\n*/\nfunction computeGlobalMaxEdgeTreePrefixWidth(inputs, glyphMode = \"unicode\") {\n\tlet globalMax = 0;\n\tfor (const input of inputs) {\n\t\tconst { grid } = buildGridForInput(input);\n\t\tglobalMax = Math.max(globalMax, computeLabelColumn(grid, glyphMode));\n\t}\n\treturn globalMax;\n}\nfunction computeGlobalMaxDirNameWidth(inputs) {\n\tlet globalMax = 0;\n\tfor (const input of inputs) {\n\t\tconst { rowModel } = buildGridForInput(input);\n\t\tglobalMax = Math.max(globalMax, computeMaxDirNameWidth(rowModel));\n\t}\n\treturn globalMax;\n}\nfunction renderMigrationGraphSpaceTreeInternal(input) {\n\tconst appSpace = input.isAppSpace !== false;\n\tconst rowModel = buildMigrationGraphRows(input.graph, { ...appSpace ? { contractHash: input.liveContractHash } : {} });\n\tconst listOverlay = buildEdgeAnnotationsByHashFromListEntries(input.migrations);\n\tconst edgeAnnotationsByHash = input.statusOverlayByHash === void 0 ? listOverlay : mergeMigrationEdgeAnnotations(listOverlay, input.statusOverlayByHash);\n\treturn renderMigrationGraphCommand({\n\t\tgrid: buildGrid(rowModel, {}, highlightFromEdgeAnnotations(edgeAnnotationsByHash)),\n\t\trowModel,\n\t\tcolorize: input.colorize,\n\t\tglyphMode: input.glyphMode,\n\t\tcontractHash: input.liveContractHash,\n\t\tisAppSpace: appSpace,\n\t\tedgeAnnotationsByHash,\n\t\trefsByHash: input.refsByHash ?? buildRefsByHashFromListEntries(input.migrations),\n\t\t...input.dbHash !== void 0 ? { dbHash: input.dbHash } : {},\n\t\t...input.styler !== void 0 ? { styler: input.styler } : {},\n\t\t...input.palette !== void 0 ? { palette: input.palette } : {},\n\t\t...input.globalMaxEdgeTreePrefixWidth !== void 0 ? { globalLabelColumn: input.globalMaxEdgeTreePrefixWidth } : {},\n\t\t...input.globalMaxDirNameWidth !== void 0 ? { globalMaxDirNameWidth: input.globalMaxDirNameWidth } : {}\n\t});\n}\nfunction renderMigrationGraphSpaceTree(input) {\n\treturn renderMigrationGraphSpaceTreeInternal(input);\n}\nfunction renderMigrationGraphSpaceTrees(inputs) {\n\tconst globalInputs = inputs.map((input) => ({\n\t\tgraph: input.graph,\n\t\tliveContractHash: input.liveContractHash\n\t}));\n\tconst glyphMode = inputs[0]?.glyphMode ?? \"unicode\";\n\tconst globalLabelColumn = inputs.length > 1 ? computeGlobalMaxEdgeTreePrefixWidth(globalInputs, glyphMode) : void 0;\n\tconst globalMaxDirName = inputs.length > 1 ? computeGlobalMaxDirNameWidth(globalInputs) : void 0;\n\treturn inputs.map((input) => renderMigrationGraphSpaceTreeInternal({\n\t\t...input,\n\t\t...globalLabelColumn !== void 0 ? { globalMaxEdgeTreePrefixWidth: globalLabelColumn } : {},\n\t\t...globalMaxDirName !== void 0 ? { globalMaxDirNameWidth: globalMaxDirName } : {}\n\t}));\n}\nfunction indentMigrationGraphTreeBlock(treeOutput, indent) {\n\tif (treeOutput.length === 0) return treeOutput;\n\treturn treeOutput.split(\"\\n\").map((line) => line.length === 0 ? line : `${indent}${line}`).join(\"\\n\");\n}\n//#endregion\n//#region src/utils/formatters/migration-list-render.ts\nconst IDENTITY_MIGRATION_LIST_STYLER = {\n\tkind: (text) => text,\n\tdirName: (text) => text,\n\tsourceHash: (text) => text,\n\tdestHash: (text) => text,\n\tglyph: (text) => text,\n\tlane: (text) => text,\n\tinvariants: (ids) => `{${ids.join(\", \")}}`,\n\trefs: (names) => `(${names.join(\", \")})`,\n\tspaceHeading: (text) => text,\n\tsummary: (text) => text,\n\temptyState: (text) => text\n};\nfunction canonicalFrom(from) {\n\treturn from ?? EMPTY_CONTRACT_HASH;\n}\nfunction migrationGraphFromListEntries(entries) {\n\tconst nodes = /* @__PURE__ */ new Set();\n\tconst forwardChain = /* @__PURE__ */ new Map();\n\tconst reverseChain = /* @__PURE__ */ new Map();\n\tconst migrationByHash = /* @__PURE__ */ new Map();\n\tfor (const entry of entries) {\n\t\tconst from = canonicalFrom(entry.fromContract);\n\t\tconst edge = {\n\t\t\tfrom,\n\t\t\tto: entry.toContract,\n\t\t\tmigrationHash: entry.hash,\n\t\t\tdirName: entry.name,\n\t\t\tcreatedAt: entry.createdAt,\n\t\t\tinvariants: entry.providedInvariants\n\t\t};\n\t\tnodes.add(from);\n\t\tnodes.add(entry.toContract);\n\t\tconst forward = forwardChain.get(from);\n\t\tif (forward) forward.push(edge);\n\t\telse forwardChain.set(from, [edge]);\n\t\tconst reverse = reverseChain.get(entry.toContract);\n\t\tif (reverse) reverse.push(edge);\n\t\telse reverseChain.set(entry.toContract, [edge]);\n\t\tmigrationByHash.set(entry.hash, edge);\n\t}\n\treturn {\n\t\tnodes,\n\t\tforwardChain,\n\t\treverseChain,\n\t\tmigrationByHash\n\t};\n}\nfunction buildEdgeAnnotationsByHashFromListEntries(entries) {\n\tconst annotations = /* @__PURE__ */ new Map();\n\tfor (const entry of entries) annotations.set(entry.hash, {\n\t\toperationCount: entry.operationCount,\n\t\tinvariants: entry.providedInvariants\n\t});\n\treturn annotations;\n}\nfunction buildRefsByHashFromListEntries(entries) {\n\tconst refsByHash = /* @__PURE__ */ new Map();\n\tfor (const entry of entries) if (entry.refs.length > 0) refsByHash.set(entry.toContract, entry.refs);\n\treturn refsByHash;\n}\nfunction formatEmptyStateLine(spaceId, style) {\n\treturn style.emptyState(`There are no migrations in migrations/${spaceId}/ yet`);\n}\nfunction renderSpaceTreeBlock(input) {\n\tconst { spaceId, migrations, multiSpace, glyphMode, style, colorize, liveContractHash, graphForSpace, appSpaceId, palette, globalMaxEdgeTreePrefixWidth, globalMaxDirNameWidth } = input;\n\tif (migrations.length === 0) {\n\t\tconst emptyLine = formatEmptyStateLine(spaceId, style);\n\t\tif (!multiSpace) return [emptyLine];\n\t\treturn [style.spaceHeading(`${spaceId}:`), ` ${emptyLine}`];\n\t}\n\tconst graph = graphForSpace(spaceId) ?? migrationGraphFromListEntries(migrations);\n\tconst isAppSpace = appSpaceId === void 0 ? void 0 : spaceId === appSpaceId;\n\tconst treeOutput = renderMigrationGraphSpaceTree({\n\t\tgraph,\n\t\tmigrations,\n\t\tliveContractHash,\n\t\tglyphMode,\n\t\tcolorize,\n\t\trefsByHash: buildRefsByHashFromListEntries(migrations),\n\t\tstyler: style,\n\t\t...palette !== void 0 ? { palette } : {},\n\t\t...isAppSpace !== void 0 ? { isAppSpace } : {},\n\t\t...globalMaxEdgeTreePrefixWidth !== void 0 ? { globalMaxEdgeTreePrefixWidth } : {},\n\t\t...globalMaxDirNameWidth !== void 0 ? { globalMaxDirNameWidth } : {}\n\t});\n\tif (!multiSpace) return treeOutput.length === 0 ? [] : [treeOutput];\n\tconst indented = indentMigrationGraphTreeBlock(treeOutput, \" \");\n\treturn [style.spaceHeading(`${spaceId}:`), indented];\n}\n/**\n* Compose the styled `migration list` human output via the shared tree\n* renderer. Each on-disk migration is one edge row with package-fact\n* annotations; refs decorate destination contract nodes.\n*\n* `options.colorize` must match whether `style` emits ANSI (e.g. both true for\n* `createAnsiMigrationListStyler({ useColor: true })`).\n*/\nfunction renderMigrationListWithStyle(result, style, glyphMode = \"unicode\", options = {}) {\n\tconst multiSpace = result.spaces.length > 1;\n\tconst colorize = options.colorize ?? false;\n\tconst liveContractHash = options.liveContractHash ?? EMPTY_CONTRACT_HASH;\n\tconst graphForSpace = options.graphForSpace ?? (() => void 0);\n\tconst appSpaceId = options.appSpaceId;\n\tconst globalLayoutInputs = multiSpace ? result.spaces.filter((space) => space.migrations.length > 0).map((space) => ({\n\t\tgraph: graphForSpace(space.space) ?? migrationGraphFromListEntries(space.migrations),\n\t\tliveContractHash\n\t})) : [];\n\tconst globalMaxEdgeTreePrefixWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxEdgeTreePrefixWidth(globalLayoutInputs) : void 0;\n\tconst globalMaxDirNameWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxDirNameWidth(globalLayoutInputs) : void 0;\n\tconst lines = [];\n\tfor (let index = 0; index < result.spaces.length; index++) {\n\t\tconst space = result.spaces[index];\n\t\tif (index > 0) lines.push(\"\");\n\t\tlines.push(...renderSpaceTreeBlock({\n\t\t\tspaceId: space.space,\n\t\t\tmigrations: space.migrations,\n\t\t\tmultiSpace,\n\t\t\tglyphMode,\n\t\t\tstyle,\n\t\t\tcolorize,\n\t\t\tliveContractHash,\n\t\t\tgraphForSpace,\n\t\t\tappSpaceId,\n\t\t\tpalette: options.palette,\n\t\t\tglobalMaxEdgeTreePrefixWidth,\n\t\t\tglobalMaxDirNameWidth\n\t\t}));\n\t}\n\tif (result.spaces.reduce((count, space) => count + space.migrations.length, 0) > 0) {\n\t\tlines.push(\"\");\n\t\tlines.push(style.summary(result.summary));\n\t}\n\treturn lines.join(\"\\n\");\n}\n//#endregion\n//#region src/utils/formatters/migration-list-styler.ts\nfunction hasMarkersFormatter(styler) {\n\treturn \"markers\" in styler && typeof styler.markers === \"function\";\n}\nfunction styleMarkerName(name) {\n\treturn name === \"contract\" ? bold(green(name)) : green(name);\n}\nfunction plainMarkers(names) {\n\treturn names.map((name) => `@${name}`).join(\" \");\n}\nfunction formatContractNodeOverlays(styler, markers, refs) {\n\tconst parts = [];\n\tif (markers.length > 0) parts.push(hasMarkersFormatter(styler) ? styler.markers(markers) : plainMarkers(markers));\n\tif (refs.length > 0) parts.push(styler.refs(refs));\n\treturn parts.join(\" \");\n}\n/**\n* The current contract overlay marker. Unlike user refs, this names the user's\n* declared desired state — the implicit base/target for `plan` / `migrate` —\n* not a stored label. It is emphasized (bold) so it stands out from plain refs\n* (including the live-database `db` marker, which is just another ref).\n*/\nconst CONTRACT_MARKER_NAME = \"contract\";\nfunction styleRefName(name) {\n\treturn green(name);\n}\n/**\n* Build a {@link MigrationListStyler} that decorates `migration list`\n* tokens with ANSI SGR codes. When `useColor` is `false` (non-TTY,\n* `--no-color`, `NO_COLOR=1`, piped output) the function returns the\n* shared identity styler so callers get plain text with zero ANSI\n* bytes — pipe-friendly by construction.\n*\n* Palette:\n*\n* - `dirName`: bold\n* - `sourceHash`: dim cyan\n* - `destHash`: bright cyan\n* - `kind` (`*` / `↩` / `⟲`): bright — the signal; lanes and arrows dim\n* - `glyph` (`→` / `⟲` / `∅`): dim\n* - `lane` (graph gutter lines `│` and fan/join connectors `├─┐` / `├─┘`): dim\n* - `invariants` (`{...}`): yellow\n* - `markers` (`@contract @db`): green; the `contract` desired-state marker is\n* green-bold (`db` is plain green); the `@` sigil is applied to each name\n* - `refs` (`(...)`): green (the active ref is bolded separately by the tree styler)\n* - `spaceHeading` (`<spaceId>:`): bold\n* - `summary`: dim\n* - `emptyState`: dim\n*/\nfunction createAnsiMigrationListStyler(opts) {\n\tif (!opts.useColor) return {\n\t\t...IDENTITY_MIGRATION_LIST_STYLER,\n\t\tmarkers: plainMarkers\n\t};\n\treturn {\n\t\tkind: (text) => text,\n\t\tdirName: (text) => bold(text),\n\t\tsourceHash: (text) => dim(cyan(text)),\n\t\tdestHash: (text) => cyanBright(text),\n\t\tglyph: (text) => dim(text),\n\t\tlane: (text) => dim(text),\n\t\tinvariants: (ids) => yellow(`{${ids.join(\", \")}}`),\n\t\tmarkers: (names) => {\n\t\t\tconst sigil = green(\"@\");\n\t\t\treturn names.map((name) => sigil + styleMarkerName(name)).join(\" \");\n\t\t},\n\t\trefs: (names) => {\n\t\t\tconst open = green(\"(\");\n\t\t\tconst close = green(\")\");\n\t\t\tconst separator = green(\", \");\n\t\t\treturn open + names.map(styleRefName).join(separator) + close;\n\t\t},\n\t\tspaceHeading: (text) => bold(text),\n\t\tsummary: (text) => dim(text),\n\t\temptyState: (text) => dim(text)\n\t};\n}\n/**\n* The same vocabulary, said as meaning rather than as colour: each token is\n* marked with the tone it carries and the CLI engine chooses the bytes.\n*\n* Two distinctions the ANSI styler draws by shade do not survive, because a\n* span carries exactly one tone: the source and destination hashes are both\n* `identifier` (the ANSI styler dims the source and brightens the\n* destination), and the `contract` marker is `emphasis` rather than bold\n* green, which is what tells it apart from a plain marker such as `db`.\n*/\nfunction createToneMigrationListStyler() {\n\treturn {\n\t\tkind: (text) => text,\n\t\tdirName: (text) => toned(\"emphasis\", text),\n\t\tsourceHash: (text) => toned(\"identifier\", text),\n\t\tdestHash: (text) => toned(\"identifier\", text),\n\t\tglyph: (text) => toned(\"structure\", text),\n\t\tlane: (text) => toned(\"structure\", text),\n\t\tinvariants: (ids) => toned(\"warn\", `{${ids.join(\", \")}}`),\n\t\tmarkers: (names) => names.map((name) => toned(\"ref\", \"@\") + (name === \"contract\" ? toned(\"emphasis\", name) : toned(\"ref\", name))).join(\" \"),\n\t\trefs: (names) => toned(\"ref\", `(${names.join(\", \")})`),\n\t\tspaceHeading: (text) => toned(\"heading\", text),\n\t\tsummary: (text) => toned(\"muted\", text),\n\t\temptyState: (text) => toned(\"muted\", text)\n\t};\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-labels.ts\n/**\n* Per-row label formatting for the command graph renderer.\n*\n* The command graph renderer ({@link renderMigrationGraphCommand}) derives the\n* graph structure — rows, gutter, lane colours — from the grid pipeline. The\n* per-row LABEL (contract hash + markers + refs for node rows;\n* migration name + `from → to` + ops/status/will-run for migration rows) is\n* formatted here. This module owns ONLY label text + styling; it knows nothing\n* about lanes, gutters, or grid geometry.\n*\n* The label format (hash abbreviation, `from → to` arrow column, `@contract`/\n* `@db` markers, `(refs)`, ops/status/will-run suffix, the legend) is the same\n* as the previous renderer — that part was never the bug.\n*/\n/**\n* The live-database overlay marker. Just another ref as far as styling goes —\n* the only emphasized markers are the active ref and the `contract`\n* desired-state marker (see {@link CONTRACT_MARKER_NAME}).\n*/\nconst DB_MARKER_NAME = \"db\";\nfunction paletteFor(opts) {\n\treturn opts.palette ?? ANSI_MIGRATION_GRAPH_PALETTE;\n}\nconst identity = (text) => text;\n/** A palette painter bound to a path role, or a no-op when colour is off. */\nfunction rolePainter(palette, colorize, role) {\n\treturn colorize ? (text) => palette.role(role, text) : identity;\n}\n/**\n* The two label styles used in `migrate --show` path-highlight mode.\n*\n* - `onPath`: emphasized name, neutral hashes (the on-path lane glyphs are\n* coloured by the grid renderer, not here).\n* - `offPath`: the off-path role reaches the name and the whole hash field.\n*\n* To change the on-path / off-path label colour in future, edit this object.\n*/\nconst PATH_HIGHLIGHT_STYLES = {\n\tonPath: (_style, colorize, palette = ANSI_MIGRATION_GRAPH_PALETTE) => ({\n\t\tlane: rolePainter(palette, colorize, \"on-path\"),\n\t\tarrow: identity,\n\t\tdirName: colorize ? (text) => palette.emphasis(text) : identity,\n\t\thashOverride: void 0\n\t}),\n\toffPath: (colorize, palette = ANSI_MIGRATION_GRAPH_PALETTE) => ({\n\t\tlane: rolePainter(palette, colorize, \"off-path\"),\n\t\tarrow: rolePainter(palette, colorize, \"off-path\"),\n\t\tdirName: rolePainter(palette, colorize, \"off-path\"),\n\t\thashOverride: colorize ? rolePainter(palette, colorize, \"off-path\") : void 0\n\t})\n};\nfunction abbreviateHash(hash, hashLength, emptySource) {\n\tif (hash === EMPTY_CONTRACT_HASH) return emptySource;\n\treturn hash.slice(0, hashLength);\n}\nfunction overlayNamesForContract(contractHash, opts) {\n\tconst markers = [];\n\tconst refs = [];\n\tconst userRefs = opts.refsByHash?.get(contractHash);\n\tif (userRefs) refs.push(...[...userRefs].sort((a, b) => a.localeCompare(b)));\n\tif (opts.isAppSpace !== false && opts.contractHash === contractHash && contractHash !== EMPTY_CONTRACT_HASH) markers.push(CONTRACT_MARKER_NAME);\n\tif (opts.dbHash === contractHash) markers.push(DB_MARKER_NAME);\n\tmarkers.sort((a, b) => {\n\t\tif (a === \"contract\") return -1;\n\t\tif (b === \"contract\") return 1;\n\t\treturn a.localeCompare(b);\n\t});\n\treturn {\n\t\tmarkers,\n\t\trefs\n\t};\n}\nfunction createLabelStyler(opts) {\n\tconst base = opts.styler ?? createAnsiMigrationListStyler({ useColor: opts.colorize });\n\tconst activeRefName = opts.activeRefName;\n\tif (!opts.colorize || activeRefName === void 0) return base;\n\tconst palette = paletteFor(opts);\n\treturn {\n\t\t...base,\n\t\trefs: (names) => {\n\t\t\tconst styledNames = names.map((name) => name === activeRefName ? palette.emphasis(name) : name);\n\t\t\treturn base.refs(styledNames);\n\t\t}\n\t};\n}\nfunction overlayStatusGlyphs(mode) {\n\treturn mode === \"ascii\" ? {\n\t\tapplied: \"+\",\n\t\tpending: \">\"\n\t} : {\n\t\tapplied: \"✓\",\n\t\tpending: \"⧗\"\n\t};\n}\nfunction formatEdgeAnnotationSuffix(migrationHash, opts, style) {\n\tconst annotation = opts.edgeAnnotationsByHash?.get(migrationHash);\n\tif (annotation === void 0) return \"\";\n\tconst isOffPath = annotation.pathHighlight === \"off-path\";\n\tconst segments = [];\n\tif (annotation.operationCount !== void 0) segments.push(`${annotation.operationCount} ops`);\n\tif (annotation.invariants !== void 0 && annotation.invariants.length > 0) segments.push(style.invariants(annotation.invariants));\n\tconst status = annotation.status;\n\tif (status !== void 0) {\n\t\tconst glyphs = overlayStatusGlyphs(opts.glyphMode ?? \"unicode\");\n\t\tconst glyph = status === \"applied\" ? glyphs.applied : glyphs.pending;\n\t\tconst label = status === \"applied\" ? \"applied\" : \"pending\";\n\t\tif (!opts.colorize) segments.push(`${glyph} ${label}`);\n\t\telse segments.push(paletteFor(opts).status(status, `${glyph} ${label}`));\n\t}\n\tif (annotation.pathHighlight === \"on-path\") {\n\t\tconst glyph = opts.glyphMode === \"ascii\" ? \">\" : \"↑\";\n\t\tsegments.push(`${glyph} will run`);\n\t}\n\tif (segments.length === 0) return \"\";\n\tconst suffix = ` ${segments.join(\" \")}`;\n\treturn opts.colorize && isOffPath ? paletteFor(opts).role(\"off-path\", suffix) : suffix;\n}\n/**\n* Format the `from → to` hash data column for an edge row.\n*\n* When `hashOverride` is provided (off-path → `dim`), it replaces ALL sub-stylers\n* so dim reaches every character without inner ANSI codes overriding it.\n*/\nfunction formatEdgeHashColumn(edge, style, hashLength, glyphMode, hashOverride) {\n\tconst emptySource = migrationListEmptySource(glyphMode);\n\tconst forwardArrow = migrationListForwardArrow(glyphMode);\n\tconst src = hashOverride ?? style.sourceHash;\n\tconst dst = hashOverride ?? style.destHash;\n\tconst glyph = hashOverride ?? style.glyph;\n\tif (edge.kind === \"self\") {\n\t\tconst hash = abbreviateHash(edge.from, hashLength, emptySource);\n\t\treturn `${padFromHashColumn(src(hash), hashLength)} ${glyph(forwardArrow)} ${dst(hash)}`;\n\t}\n\treturn `${edge.from === EMPTY_CONTRACT_HASH ? padFromHashColumn(glyph(emptySource), hashLength) : padFromHashColumn(src(abbreviateHash(edge.from, hashLength, emptySource)), hashLength)} ${glyph(forwardArrow)} ${dst(abbreviateHash(edge.to, hashLength, emptySource))}`;\n}\n/**\n* The label text for a contract node row: the abbreviated hash (or the `∅`\n* empty-source token for the baseline) followed by its `@contract`/`@db` markers\n* and `(refs)`, with two spaces between the hash and the overlay block.\n*/\nfunction formatNodeLabel(contractHash, opts, nodeHighlight) {\n\tconst style = createLabelStyler(opts);\n\tconst hashLength = opts.hashLength ?? 7;\n\tconst emptySource = migrationListEmptySource(opts.glyphMode ?? \"unicode\");\n\tconst overlays = overlayNamesForContract(contractHash, opts);\n\tconst hasOverlays = overlays.markers.length > 0 || overlays.refs.length > 0;\n\tconst offPath = nodeHighlight === \"off-path\" && opts.colorize;\n\tconst dimmed = (text) => paletteFor(opts).role(\"off-path\", text);\n\tconst hashText = contractHash === EMPTY_CONTRACT_HASH ? (offPath ? dimmed : style.glyph)(emptySource) : (offPath ? dimmed : style.sourceHash)(abbreviateHash(contractHash, hashLength, emptySource));\n\tif (!hasOverlays) return hashText;\n\treturn `${hashText} ${formatContractNodeOverlays(style, overlays.markers, overlays.refs)}`;\n}\n/**\n* The label text for a migration row: the migration name (padded to\n* `dirNameWidth`) followed by the `from → to` hash column and the annotation\n* suffix (ops / status / will-run).\n*\n* In flat mode the name is tinted with its lane's hue (`lane` ≥ 0), so the node\n* `○`, the edges/arrows in the gutter, and the name all read in one colour. In\n* focus mode the on-path/off-path role overrides the lane hue (bold / dim).\n*/\nfunction formatMigrationLabel(edge, dirNameWidth, opts, lane) {\n\tconst style = createLabelStyler(opts);\n\tconst hashLength = opts.hashLength ?? 7;\n\tconst glyphMode = opts.glyphMode ?? \"unicode\";\n\tconst highlight = opts.edgeAnnotationsByHash?.get(edge.migrationHash)?.pathHighlight;\n\tconst palette = paletteFor(opts);\n\tlet dirNameStyler;\n\tlet hashOverride;\n\tif (highlight === \"on-path\") {\n\t\tdirNameStyler = rolePainter(palette, opts.colorize, \"on-path\");\n\t\thashOverride = void 0;\n\t} else if (highlight === \"off-path\") {\n\t\tdirNameStyler = opts.colorize ? rolePainter(palette, true, \"off-path\") : style.dirName;\n\t\thashOverride = opts.colorize ? rolePainter(palette, true, \"off-path\") : void 0;\n\t} else if (opts.colorize && lane !== void 0) {\n\t\tdirNameStyler = (text) => palette.lane(lane, text);\n\t\thashOverride = void 0;\n\t} else {\n\t\tdirNameStyler = style.dirName;\n\t\thashOverride = void 0;\n\t}\n\tconst dirNamePadding = \" \".repeat(Math.max(0, dirNameWidth - edge.dirName.length));\n\treturn `${`${dirNameStyler(edge.dirName)}${dirNamePadding}`}${formatEdgeHashColumn(edge, style, hashLength, glyphMode, hashOverride)}${formatEdgeAnnotationSuffix(edge.migrationHash, opts, style)}`;\n}\n/**\n* Format a single on-path migration row for the `migrate --show` run-list.\n* Shares PATH_HIGHLIGHT_STYLES.onPath with the graph tree so the run-list and\n* the graph are byte-for-byte identical in their name/hash columns.\n*/\nfunction formatOnPathMigrationRow(dirName, from, to, dirNameWidth, colorize, glyphMode, paint) {\n\tconst style = paint?.styler ?? createAnsiMigrationListStyler({ useColor: colorize });\n\tconst styledDirName = `${PATH_HIGHLIGHT_STYLES.onPath(style, colorize, paint?.palette).dirName(dirName)}${\" \".repeat(Math.max(0, dirNameWidth - dirName.length))}`;\n\tconst hashLength = 7;\n\tconst emptySource = migrationListEmptySource(glyphMode);\n\tconst forwardArrow = migrationListForwardArrow(glyphMode);\n\tconst fromAbbr = from === EMPTY_CONTRACT_HASH ? padFromHashColumn(style.glyph(emptySource), hashLength) : padFromHashColumn(style.sourceHash(abbreviateHash(from, hashLength, emptySource)), hashLength);\n\tconst toAbbr = to === EMPTY_CONTRACT_HASH ? style.glyph(emptySource) : style.destHash(abbreviateHash(to, hashLength, emptySource));\n\treturn `${styledDirName} ${fromAbbr} ${style.glyph(forwardArrow)} ${toAbbr}`;\n}\nfunction legendGlyphs(mode) {\n\treturn mode === \"ascii\" ? {\n\t\tnode: \"*\",\n\t\tforward: \"^\",\n\t\trollback: \"v\",\n\t\tself: \"@\"\n\t} : {\n\t\tnode: \"○\",\n\t\tforward: \"↑\",\n\t\trollback: \"↓\",\n\t\tself: \"⟲\"\n\t};\n}\n/**\n* A compact key for the tree visual language: the contract node glyph, the\n* in-lane direction arrows, the empty baseline, the system-marker `@…` and\n* user-ref `(…)` conventions, and a worked sample of the data-column hash arrow.\n*/\nfunction renderMigrationGraphLegend(opts) {\n\tconst glyphMode = opts.glyphMode ?? \"unicode\";\n\tconst style = opts.styler ?? createAnsiMigrationListStyler({ useColor: opts.colorize });\n\tconst palette = opts.palette ?? ANSI_MIGRATION_GRAPH_PALETTE;\n\tconst glyphs = legendGlyphs(glyphMode);\n\tconst emptySource = migrationListEmptySource(glyphMode);\n\tconst forwardArrow = migrationListForwardArrow(glyphMode);\n\tconst sampleArrow = `${style.sourceHash(\"aaaaaa\")} ${style.glyph(forwardArrow)} ${style.destHash(\"bbbbbb\")}`;\n\tconst statusGlyphs = overlayStatusGlyphs(glyphMode);\n\tconst appliedGlyph = opts.colorize ? palette.status(\"applied\", statusGlyphs.applied) : statusGlyphs.applied;\n\tconst pendingGlyph = opts.colorize ? palette.status(\"pending\", statusGlyphs.pending) : statusGlyphs.pending;\n\tconst appliedPending = ` ${appliedGlyph} ${style.summary(\"applied\")} ${pendingGlyph} ${style.summary(\"pending\")}`;\n\tconst exampleMarkers = style.markers([CONTRACT_MARKER_NAME, DB_MARKER_NAME]);\n\tconst exampleRefs = style.refs([\"prod\", \"staging\"]);\n\treturn [\n\t\t\"Legend:\",\n\t\t` ${style.kind(glyphs.node)} ${style.summary(\"contract\")} ${style.kind(glyphs.forward)} ${style.summary(\"forward\")} ${style.kind(glyphs.rollback)} ${style.summary(\"rollback\")}`,\n\t\t` ${style.kind(glyphs.self)} ${style.summary(\"migration without schema change\")}`,\n\t\tappliedPending,\n\t\t` ${style.kind(emptySource)} ${style.summary(\"empty database (baseline)\")}`,\n\t\t` ${exampleMarkers} ${style.summary(\"reserved markers — also typeable as --from/--to tokens\")}`,\n\t\t` ${exampleRefs} ${style.summary(\"user-defined refs\")}`,\n\t\t` ${sampleArrow} ${style.summary(\"migration from contract aaaaaa to bbbbbb\")}`\n\t].join(\"\\n\");\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-occlusion-render.ts\n/**\n* Occlusion renderer for the line/plane/occlusion migration-graph.\n*\n* Per cell: pick the topmost-plane line (lowest plane number = drawn on top),\n* look up its glyph, apply colour from the line's lane or role. Lower-plane\n* lines are occluded (not drawn).\n*\n* Colour comes from the palette the caller hands in; see migration-graph-palette.\n*/\nconst UNICODE_ALPHABET = {\n\tvertical: \"│\",\n\thorizontal: \"─\",\n\tcornerUpRight: \"╰\",\n\tcornerDownRight: \"╭\",\n\tcornerUpLeft: \"╯\",\n\tcornerDownLeft: \"╮\",\n\tarrowUp: \"↑\",\n\tarrowDown: \"↓\",\n\tnode: \"○\",\n\tselfLoop: \"⟲\",\n\tlandingArrow: \"◂\",\n\tfallback: \"?\"\n};\nconst ASCII_ALPHABET = {\n\tvertical: \"|\",\n\thorizontal: \"-\",\n\tcornerUpRight: \"\\\\\",\n\tcornerDownRight: \"/\",\n\tcornerUpLeft: \"/\",\n\tcornerDownLeft: \"\\\\\",\n\tarrowUp: \"^\",\n\tarrowDown: \"v\",\n\tnode: \"*\",\n\tselfLoop: \"@\",\n\tlandingArrow: \"<\",\n\tfallback: \"?\"\n};\nfunction alphabetFor(mode) {\n\treturn mode === \"ascii\" ? ASCII_ALPHABET : UNICODE_ALPHABET;\n}\nfunction glyphFor(dirs, alphabet) {\n\tconst has = (d) => dirs.has(d);\n\tif (has(\"up\") && has(\"down\") && !has(\"left\") && !has(\"right\")) return alphabet.vertical;\n\tif (has(\"left\") && has(\"right\") && !has(\"up\") && !has(\"down\")) return alphabet.horizontal;\n\tif (has(\"up\") && has(\"right\") && !has(\"down\") && !has(\"left\")) return alphabet.cornerUpRight;\n\tif (has(\"down\") && has(\"right\") && !has(\"up\") && !has(\"left\")) return alphabet.cornerDownRight;\n\tif (has(\"up\") && has(\"left\") && !has(\"down\") && !has(\"right\")) return alphabet.cornerUpLeft;\n\tif (has(\"down\") && has(\"left\") && !has(\"up\") && !has(\"right\")) return alphabet.cornerDownLeft;\n\tif (has(\"up\") && !has(\"down\") && !has(\"left\") && !has(\"right\")) return alphabet.arrowUp;\n\tif (has(\"down\") && !has(\"up\") && !has(\"left\") && !has(\"right\")) return alphabet.arrowDown;\n\treturn alphabet.fallback;\n}\n/** A line or node is painted by its path role when it has one, else by its lane. */\nfunction paintByRoleOrLane(palette, role, lane) {\n\treturn role === void 0 ? (text) => palette.lane(lane, text) : (text) => palette.role(role, text);\n}\nfunction renderCell(cell, palette, alphabet) {\n\tconst node = cell.node;\n\tif (node !== void 0) return paintByRoleOrLane(palette, node.role, node.lane)(alphabet.node);\n\tif (cell.lines.length === 0) return \" \";\n\tconst topLine = cell.lines.reduce((best, current) => {\n\t\tif (current.plane < best.plane) return current;\n\t\tif (current.plane > best.plane) return best;\n\t\tif (current.line.role === \"on-path\" && best.line.role !== \"on-path\") return current;\n\t\treturn best;\n\t}, cell.lines[0]);\n\tconst glyph = topLine.selfLoop === true ? alphabet.selfLoop : topLine.landingArrow === true ? alphabet.landingArrow : glyphFor(topLine.directions, alphabet);\n\treturn paintByRoleOrLane(palette, topLine.line.role, topLine.line.lane)(glyph);\n}\n/**\n* Render a single grid row to a coloured string. A completely empty row returns\n* the empty string (the row is NOT dropped) so callers that pair grid rows with\n* an external per-row label list keep a 1:1 index correspondence. `renderGrid`\n* itself drops empty rows for its standalone output (but preserves separator rows).\n*/\nfunction renderGridRow(row, opts = {}) {\n\tif (row[0]?.separator === true) return \"\";\n\tlet lastNonEmpty = -1;\n\tfor (let i = row.length - 1; i >= 0; i--) {\n\t\tconst cell = row[i];\n\t\tif (cell !== void 0 && (cell.lines.length > 0 || cell.node !== void 0)) {\n\t\t\tlastNonEmpty = i;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (lastNonEmpty < 0) return \"\";\n\tconst colsPerLane = opts.colsPerLane ?? 2;\n\tconst palette = opts.colorize ?? true ? opts.palette ?? ANSI_MIGRATION_GRAPH_PALETTE : PLAIN_MIGRATION_GRAPH_PALETTE;\n\tconst alphabet = alphabetFor(opts.glyphMode ?? \"unicode\");\n\tconst lastConnectorCol = Math.floor(lastNonEmpty / colsPerLane) * colsPerLane + (colsPerLane - 1);\n\tconst renderThrough = Math.max(lastNonEmpty, lastConnectorCol);\n\tlet line = \"\";\n\tfor (let col = 0; col <= Math.min(renderThrough, row.length - 1); col++) {\n\t\tconst cell = row[col];\n\t\tline += cell === void 0 ? \" \" : renderCell(cell, palette, alphabet);\n\t}\n\treturn line;\n}\n//#endregion\n//#region src/utils/formatters/migration-graph-command-render.ts\n/**\n* Command graph renderer: composes the gutter (from the grid) with per-row labels.\n*\n* Pipeline: buildMigrationGraphRows → buildGrid → renderMigrationGraphCommand\n*\n* Each grid row is classified by its cells: a node row gets a contract label;\n* a migration arrow row gets a migration label; connector rows get no label.\n* Label format and styling live in `./migration-graph-labels`.\n*/\nconst LABEL_GAP = 2;\nconst MIN_HASH_DATA_COLUMN = 25;\n/**\n* Classify a grid row by its own cells:\n* - a cell carrying a NodeRef → node row (contract label);\n* - a cell whose top line is an arrow ({up}/{down}/self-loop) → migration row;\n* - otherwise → no label.\n*\n* A migration's arrow appears in exactly one grid row (the forward `↑` row, the\n* adjacent-rollback `↓` row, or the self-loop `⟲` row), so each migration gets\n* exactly one label, on the row that draws its arrow.\n*\n* Two distinct migrations with identical content (same from/to/ops) hash to the\n* SAME migration hash, so the arrow line is matched on BOTH its hash and its\n* `dirName` (which the LineRef carries per-row) — otherwise both rows would\n* resolve to one edge and the other migration's name would be lost.\n*/\nfunction classifyRow(row, edgesByHash) {\n\tfor (const cell of row) if (cell.node !== void 0) return {\n\t\tkind: \"node\",\n\t\tcontractHash: cell.node.contractHash\n\t};\n\tfor (const cell of row) {\n\t\tconst arrow = arrowLine(cell);\n\t\tif (arrow === void 0) continue;\n\t\tconst candidates = edgesByHash.get(arrow.line.migrationHash) ?? [];\n\t\tconst edge = candidates.find((e) => e.dirName === arrow.line.dirName) ?? candidates[0];\n\t\tif (edge !== void 0) return {\n\t\t\tkind: \"migration\",\n\t\t\tedge,\n\t\t\tlane: arrow.line.lane\n\t\t};\n\t}\n\treturn { kind: \"none\" };\n}\n/**\n* Return the cell's arrow line if it carries one — a self-loop, or a line whose\n* directions are exactly `{up}` or `{down}` (the migration-direction arrows).\n* Connector/corner/vertical lines are not arrows and yield `undefined`.\n*/\nfunction arrowLine(cell) {\n\tfor (const line of cell.lines) {\n\t\tif (line.selfLoop === true) return line;\n\t\tif (line.landingArrow === true) continue;\n\t\tconst dirs = line.directions;\n\t\tif (dirs.size !== 1) continue;\n\t\tif (dirs.has(\"up\") || dirs.has(\"down\")) return line;\n\t}\n}\n/**\n* Resolve each contract's path-highlight role from the edges incident on it.\n* On-path wins: a contract touched by any on-path edge is on-path. Empty unless\n* focus-mode annotations are present.\n*/\nfunction resolveNodeHighlights(rowModel, edgeAnnotationsByHash) {\n\tconst result = /* @__PURE__ */ new Map();\n\tif (edgeAnnotationsByHash === void 0) return result;\n\tfor (const edge of rowModel.edges) {\n\t\tconst highlight = edgeAnnotationsByHash.get(edge.migrationHash)?.pathHighlight;\n\t\tif (highlight === void 0) continue;\n\t\tfor (const hash of [edge.from, edge.to]) {\n\t\t\tif (hash === EMPTY_CONTRACT_HASH) continue;\n\t\t\tif (result.get(hash) !== \"on-path\") result.set(hash, highlight);\n\t\t}\n\t}\n\treturn result;\n}\nfunction maxDirNameLength(edges) {\n\tlet max = 0;\n\tfor (const edge of edges) max = Math.max(max, edge.dirName.length);\n\treturn max;\n}\n/**\n* The label column for a render: the widest gutter (visible width) across every\n* row, plus the label gap. Labels begin here so they line up regardless of how\n* deep the lane structure runs on any one row. A cross-space override widens it\n* so sibling space sections share one column.\n*/\nfunction computeLabelColumn(grid, glyphMode) {\n\tlet maxGutter = 0;\n\tfor (const row of grid) {\n\t\tconst gutter = renderGridRow(row, {\n\t\t\tcolorize: false,\n\t\t\tglyphMode\n\t\t});\n\t\tmaxGutter = Math.max(maxGutter, stringWidth(gutter));\n\t}\n\treturn maxGutter + LABEL_GAP;\n}\nfunction computeMaxDirNameWidth(rowModel) {\n\treturn maxDirNameLength(rowModel.edges);\n}\nfunction padVisible(text, targetWidth) {\n\tconst padding = Math.max(0, targetWidth - stringWidth(text));\n\treturn text + \" \".repeat(padding);\n}\nconst ANSI_ESCAPE = \"\\x1B\";\nfunction trimTrailingWhitespace(line) {\n\tconst trailingSpaceBeforeReset = new RegExp(`[\\\\t ]+((?:${ANSI_ESCAPE}\\\\[[0-9;]*m)+)$`);\n\treturn line.replace(trailingSpaceBeforeReset, \"$1\").replace(/\\s+$/, \"\");\n}\nfunction renderMigrationGraphCommand(input) {\n\tconst { grid, rowModel } = input;\n\tconst glyphMode = input.glyphMode;\n\tconst edgesByHash = /* @__PURE__ */ new Map();\n\tfor (const edge of rowModel.edges) {\n\t\tconst bucket = edgesByHash.get(edge.migrationHash);\n\t\tif (bucket) bucket.push(edge);\n\t\telse edgesByHash.set(edge.migrationHash, [edge]);\n\t}\n\tconst labelOpts = {\n\t\tcolorize: input.colorize,\n\t\tglyphMode,\n\t\t...ifDefined(\"refsByHash\", input.refsByHash),\n\t\t...ifDefined(\"edgeAnnotationsByHash\", input.edgeAnnotationsByHash),\n\t\t...ifDefined(\"dbHash\", input.dbHash),\n\t\t...ifDefined(\"contractHash\", input.contractHash),\n\t\t...ifDefined(\"isAppSpace\", input.isAppSpace),\n\t\t...ifDefined(\"activeRefName\", input.activeRefName),\n\t\t...ifDefined(\"styler\", input.styler),\n\t\t...ifDefined(\"palette\", input.palette)\n\t};\n\tconst nodeHighlights = resolveNodeHighlights(rowModel, input.edgeAnnotationsByHash);\n\tconst labelColumn = input.globalLabelColumn ?? computeLabelColumn(grid, glyphMode);\n\tconst maxDirNameLen = input.globalMaxDirNameWidth ?? maxDirNameLength(rowModel.edges);\n\tconst dirNameWidth = Math.max(maxDirNameLen + LABEL_GAP, MIN_HASH_DATA_COLUMN - labelColumn);\n\tconst lines = [];\n\tfor (const row of grid) {\n\t\tconst gutter = renderGridRow(row, {\n\t\t\tcolorize: input.colorize,\n\t\t\tglyphMode,\n\t\t\t...ifDefined(\"palette\", input.palette)\n\t\t});\n\t\tconst identity = classifyRow(row, edgesByHash);\n\t\tif (identity.kind === \"none\") {\n\t\t\tlines.push(trimTrailingWhitespace(gutter));\n\t\t\tcontinue;\n\t\t}\n\t\tconst gutterPad = padVisible(gutter, labelColumn);\n\t\tif (identity.kind === \"node\") {\n\t\t\tconst label = formatNodeLabel(identity.contractHash, labelOpts, nodeHighlights.get(identity.contractHash));\n\t\t\tlines.push(trimTrailingWhitespace(label.length === 0 ? gutter : `${gutterPad}${label}`));\n\t\t\tcontinue;\n\t\t}\n\t\tconst label = formatMigrationLabel(identity.edge, dirNameWidth, labelOpts, identity.lane);\n\t\tlines.push(trimTrailingWhitespace(`${gutterPad}${label}`));\n\t}\n\treturn lines.join(\"\\n\");\n}\n//#endregion\nexport { toneSpans as C, toneDrawing as S, buildGrid as _, renderMigrationGraphLegend as a, migrationListForwardArrow as b, IDENTITY_MIGRATION_LIST_STYLER as c, computeGlobalMaxEdgeTreePrefixWidth as d, highlightFromEdgeAnnotations as f, buildMigrationGraphRows as g, renderMigrationGraphSpaceTrees as h, formatOnPathMigrationRow as i, renderMigrationListWithStyle as l, renderMigrationGraphSpaceTree as m, computeMaxDirNameWidth as n, createAnsiMigrationListStyler as o, indentMigrationGraphTreeBlock as p, renderMigrationGraphCommand as r, createToneMigrationListStyler as s, computeLabelColumn as t, computeGlobalMaxDirNameWidth as u, abbreviateContractHash as v, TONE_MIGRATION_GRAPH_PALETTE as x, migrationListEmptySource as y };\n\n//# sourceMappingURL=migration-graph-command-render-h0VdTkSM.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAM,iBAAiB;;AAEvB,MAAM,SAAS,OAAO,aAAa,EAAE;;AAErC,MAAM,gBAAgB,GAAG,OAAO,GAAG,eAAe;;;;;;AAMlD,MAAM,aAAa;CAClB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD;AACA,MAAM,eAAe,IAAI,IAAI,WAAW,KAAK,MAAM,UAAU,CAAC,MAAM,iBAAiB,QAAQ,CAAC,CAAC,CAAC;AAChG,MAAM,eAAe,IAAI,IAAI,WAAW,KAAK,MAAM,UAAU,CAAC,iBAAiB,QAAQ,GAAG,IAAI,CAAC,CAAC;;AAEhG,SAAS,MAAM,MAAM,MAAM;CAC1B,OAAO,GAAG,OAAO,GAAG,aAAa,IAAI,IAAI,EAAE,GAAG,OAAO;AACtD;;AAEA,SAAS,YAAY,MAAM;CAC1B,QAAQ,SAAS,MAAM,MAAM,IAAI;AAClC;AACA,MAAM,eAAe,IAAI,OAAO,GAAG,OAAO,gBAAgB,GAAG;AAC7D,SAAS,SAAS,OAAO,MAAM,MAAM;CACpC,IAAI,KAAK,WAAW,GAAG;CACvB,MAAM,WAAW,MAAM,GAAG,EAAE;CAC5B,IAAI,aAAa,KAAK,KAAK,SAAS,SAAS,MAAM;EAClD,MAAM,MAAM,SAAS,KAAK;GACzB,MAAM,SAAS,OAAO;GACtB,GAAG,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK;EAClC;EACA;CACD;CACA,MAAM,KAAK;EACV;EACA,GAAG,SAAS,KAAK,IAAI,CAAC,IAAI,EAAE,KAAK;CAClC,CAAC;AACF;;AAEA,SAAS,UAAU,MAAM;CACxB,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KAAK,WAAW;EAC7C,IAAI,SAAS,SAAS,QAAQ;GAC7B,MAAM,KAAK,uBAAuB,MAAM,CAAC;GACzC;EACD;EACA,MAAM,YAAY,WAAW,QAAQ,WAAW;EAChD,IAAI,SAAS,SAAS,QAAQ;GAC7B,MAAM,QAAQ,gBAAgB,SAAS,cAAc,WAAW,eAAe,IAAI,SAAS,YAAY,CAAC;GACzG,MAAM,KAAK,uBAAuB,MAAM,WAAW,IAAI,SAAS,GAAG,YAAY,OAAO,CAAC;GACvF;EACD;EACA,MAAM,QAAQ,qBAAqB,SAAS,MAAM,cAAc,WAAW,SAAS,IAAI;EACxF,MAAM,KAAK,uBAAuB,GAAG,YAAY,OAAO,CAAC;CAC1D;CACA,OAAO,MAAM,KAAK,IAAI;AACvB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as listRefsByContractHash } from "./migration-list-BQTfSGbT-DoNqbNsu.mjs";
|
|
2
|
-
import { m as indentMigrationGraphTreeBlock, o as computeGlobalMaxDirNameWidth, s as computeGlobalMaxEdgeTreePrefixWidth, y as renderMigrationGraphSpaceTree } from "./migration-graph-command-render-
|
|
3
|
-
//#region ../../../1-framework/3-tooling/cli/dist/migration-graph-sections-
|
|
2
|
+
import { m as indentMigrationGraphTreeBlock, o as computeGlobalMaxDirNameWidth, s as computeGlobalMaxEdgeTreePrefixWidth, y as renderMigrationGraphSpaceTree } from "./migration-graph-command-render-h0VdTkSM-C3rPZEw1.mjs";
|
|
3
|
+
//#region ../../../1-framework/3-tooling/cli/dist/migration-graph-sections-B8WSWSkJ.mjs
|
|
4
4
|
/**
|
|
5
5
|
* One tree per in-scope contract space. Widths are computed across every space
|
|
6
6
|
* first so multi-space sections align with each other.
|
|
@@ -66,4 +66,4 @@ function renderMigrationGraphDot(graph) {
|
|
|
66
66
|
//#endregion
|
|
67
67
|
export { renderMigrationGraphDot as n, renderMigrationGraphSections as r, buildMigrationGraphTreeSections as t };
|
|
68
68
|
|
|
69
|
-
//# sourceMappingURL=migration-graph-sections-
|
|
69
|
+
//# sourceMappingURL=migration-graph-sections-B8WSWSkJ-CyaRo0T6.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-graph-sections-
|
|
1
|
+
{"version":3,"file":"migration-graph-sections-B8WSWSkJ-CyaRo0T6.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-graph-sections-B8WSWSkJ.mjs"],"sourcesContent":["import { t as listRefsByContractHash } from \"./migration-list-BQTfSGbT.mjs\";\nimport { d as computeGlobalMaxEdgeTreePrefixWidth, m as renderMigrationGraphSpaceTree, p as indentMigrationGraphTreeBlock, u as computeGlobalMaxDirNameWidth } from \"./migration-graph-command-render-h0VdTkSM.mjs\";\n//#region src/utils/formatters/migration-graph-sections.ts\n/**\n* One tree per in-scope contract space. Widths are computed across every space\n* first so multi-space sections align with each other.\n*/\nfunction buildMigrationGraphTreeSections(inputs) {\n\tconst { aggregate, scopedSpaces, liveContractHash, glyphMode, colorize } = inputs;\n\tconst showSpaceHeadings = scopedSpaces.length > 1;\n\tconst globalLayoutInputs = showSpaceHeadings ? scopedSpaces.filter((entry) => entry.migrations.length > 0).flatMap((entry) => {\n\t\tconst graph = aggregate.space(entry.space)?.graph();\n\t\treturn graph === void 0 ? [] : [{\n\t\t\tgraph,\n\t\t\tliveContractHash\n\t\t}];\n\t}) : [];\n\tconst globalMaxEdgeTreePrefixWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxEdgeTreePrefixWidth(globalLayoutInputs) : void 0;\n\tconst globalMaxDirNameWidth = globalLayoutInputs.length > 0 ? computeGlobalMaxDirNameWidth(globalLayoutInputs) : void 0;\n\tconst sections = [];\n\tfor (const entry of scopedSpaces) {\n\t\tconst space = aggregate.space(entry.space);\n\t\tif (space === void 0) continue;\n\t\tconst tree = entry.migrations.length === 0 ? \"\" : renderMigrationGraphSpaceTree({\n\t\t\tgraph: space.graph(),\n\t\t\tmigrations: entry.migrations,\n\t\t\tliveContractHash,\n\t\t\tglyphMode,\n\t\t\tcolorize,\n\t\t\tisAppSpace: entry.space === aggregate.app.spaceId,\n\t\t\trefsByHash: listRefsByContractHash(space),\n\t\t\t...inputs.styler !== void 0 ? { styler: inputs.styler } : {},\n\t\t\t...inputs.palette !== void 0 ? { palette: inputs.palette } : {},\n\t\t\t...globalMaxEdgeTreePrefixWidth !== void 0 ? { globalMaxEdgeTreePrefixWidth } : {},\n\t\t\t...globalMaxDirNameWidth !== void 0 ? { globalMaxDirNameWidth } : {}\n\t\t});\n\t\tsections.push({\n\t\t\tspace: entry.space,\n\t\t\ttree: showSpaceHeadings && tree.length > 0 ? indentMigrationGraphTreeBlock(tree, \" \") : tree,\n\t\t\tshowHeading: showSpaceHeadings\n\t\t});\n\t}\n\treturn sections;\n}\n/** The rendered tree, headings and summary as one block of lines. */\nfunction renderMigrationGraphSections(sections, summary) {\n\tconst lines = [];\n\tfor (const section of sections) {\n\t\tif (section.showHeading) lines.push(`${section.space}:`);\n\t\tlines.push(section.tree.length > 0 ? section.tree : \"(no migrations)\");\n\t\tlines.push(\"\");\n\t}\n\tlines.push(summary);\n\treturn lines.join(\"\\n\").trimEnd();\n}\n/**\n* Graphviz DOT for the app graph. Node ids are truncated to 12 characters,\n* which is a collision hazard recorded and preserved by the port.\n*/\nfunction renderMigrationGraphDot(graph) {\n\tconst lines = [\"digraph migrations {\"];\n\tfor (const edge of graph.migrationByHash.values()) lines.push(` \"${edge.from.slice(0, 12)}\" -> \"${edge.to.slice(0, 12)}\" [label=\"${edge.dirName}\"];`);\n\tlines.push(\"}\");\n\treturn lines.join(\"\\n\");\n}\n//#endregion\nexport { renderMigrationGraphDot as n, renderMigrationGraphSections as r, buildMigrationGraphTreeSections as t };\n\n//# sourceMappingURL=migration-graph-sections-B8WSWSkJ.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,gCAAgC,QAAQ;CAChD,MAAM,EAAE,WAAW,cAAc,kBAAkB,WAAW,aAAa;CAC3E,MAAM,oBAAoB,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AQ,aAAa,MAAM,KAAK,GAAG,QAAQ,MAAM,EAAE;EACvD,MAAM,KAAK,QAAQ,KAAK,SAAS,IAAI,QAAQ,OAAO,iBAAiB;EACrE,MAAM,KAAK,EAAE;CACd;CACA,MAAM,KAAK,OAAO;CAClB,OAAO,MAAM,KAAK,IAAI,CAAC,CAAC,QAAQ;AACjC;;;;;AAKA,SAAS,wBAAwB,OAAO;CACvC,MAAM,QAAQ,CAAC,sBAAsB;CACrC,KAAK,MAAM,QAAQ,MAAM,gBAAgB,OAAO,GAAG,MAAM,KAAK,MAAM,KAAK,KAAK,MAAM,GAAG,EAAE,EAAE,QAAQ,KAAK,GAAG,MAAM,GAAG,EAAE,EAAE,YAAY,KAAK,QAAQ,IAAI;CACrJ,MAAM,KAAK,GAAG;CACd,OAAO,MAAM,KAAK,IAAI;AACvB"}
|
|
@@ -3,12 +3,12 @@ import { r as createTerminalUI } from "./terminal-ui-Cqz4LVL7-B0mcVdLy.mjs";
|
|
|
3
3
|
import { _ as resolveMigrationPaths, b as setCommandExamples, m as parseGlobalFlagsOrExit, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, x as setCommandSeeAlso, y as setCommandDescriptions } from "./command-helpers-CwLvFwMB-BWwUQhlT.mjs";
|
|
4
4
|
import { r as buildReadAggregate } from "./contract-space-aggregate-loader-CoLTf3Ce-pQDru2w0.mjs";
|
|
5
5
|
import { n as migrationSpaceListEntriesFromAggregate, r as runMigrationList } from "./migration-list-BQTfSGbT-DoNqbNsu.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { u as createAnsiMigrationListStyler, v as renderMigrationGraphLegend, x as renderMigrationListWithStyle } from "./migration-graph-command-render-h0VdTkSM-C3rPZEw1.mjs";
|
|
7
7
|
import { n as validateLegendOptions, t as shouldShowLegend } from "./legend-BQcPKTLe-bn9e4_ZU.mjs";
|
|
8
8
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
9
9
|
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
10
10
|
import { Command } from "commander";
|
|
11
|
-
//#region ../../../1-framework/3-tooling/cli/dist/migration-list-
|
|
11
|
+
//#region ../../../1-framework/3-tooling/cli/dist/migration-list-BIL-re1m.mjs
|
|
12
12
|
function renderMigrationListHumanOutput(result, options) {
|
|
13
13
|
return renderMigrationListWithStyle(result, createAnsiMigrationListStyler({ useColor: options.useColor }), options.glyphMode, {
|
|
14
14
|
colorize: options.useColor,
|
|
@@ -127,4 +127,4 @@ function createMigrationListCommand() {
|
|
|
127
127
|
//#endregion
|
|
128
128
|
export { executeMigrationListCommand as n, renderMigrationListHumanOutput as r, createMigrationListCommand as t };
|
|
129
129
|
|
|
130
|
-
//# sourceMappingURL=migration-list-
|
|
130
|
+
//# sourceMappingURL=migration-list-BIL-re1m-CZY4m3d0.mjs.map
|
package/dist/{migration-list-DCx0KOFp-B3MiGnpa.mjs.map → migration-list-BIL-re1m-CZY4m3d0.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-list-
|
|
1
|
+
{"version":3,"file":"migration-list-BIL-re1m-CZY4m3d0.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-list-BIL-re1m.mjs"],"sourcesContent":["import { t as createTerminalUI } from \"./terminal-ui-Cqz4LVL7.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, c as resolveMigrationPaths, d as setCommandExamples, f as setCommandSeeAlso, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-CwLvFwMB.mjs\";\nimport { r as buildReadAggregate } from \"./contract-space-aggregate-loader-CoLTf3Ce.mjs\";\nimport { n as migrationSpaceListEntriesFromAggregate, r as runMigrationList } from \"./migration-list-BQTfSGbT.mjs\";\nimport { a as renderMigrationGraphLegend, l as renderMigrationListWithStyle, o as createAnsiMigrationListStyler } from \"./migration-graph-command-render-h0VdTkSM.mjs\";\nimport { n as validateLegendOptions, t as shouldShowLegend } from \"./legend-BQcPKTLe.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/commands/migration-list.ts\nfunction renderMigrationListHumanOutput(result, options) {\n\treturn renderMigrationListWithStyle(result, createAnsiMigrationListStyler({ useColor: options.useColor }), options.glyphMode, {\n\t\tcolorize: options.useColor,\n\t\tliveContractHash: options.liveContractHash,\n\t\tgraphForSpace: options.graphForSpace,\n\t\t...options.appSpaceId !== void 0 ? { appSpaceId: options.appSpaceId } : {}\n\t});\n}\n/**\n* CLI shell: loads config, resolves paths, prints the styled header on\n* stderr (interactive mode only), and delegates to {@link runMigrationList}.\n* Kept intentionally thin so the unit-testable surface lives in the core.\n*/\nasync function executeMigrationListCommand(options, flags, ui) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"extensions\",\n\t\t\"migrations\",\n\t\t\"contract\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst { configPath, migrationsDir, migrationsRelative } = resolveMigrationPaths(options.config, config, process.cwd());\n\tif (!flags.json && !flags.quiet) {\n\t\tconst header = formatStyledHeader({\n\t\t\tcommand: \"migration list\",\n\t\t\tdescription: \"List on-disk migrations per contract space\",\n\t\t\tdetails: [\n\t\t\t\t{\n\t\t\t\t\tlabel: \"config\",\n\t\t\t\t\tvalue: configPath\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tlabel: \"migrations\",\n\t\t\t\t\tvalue: migrationsRelative\n\t\t\t\t},\n\t\t\t\t...options.space !== void 0 ? [{\n\t\t\t\t\tlabel: \"space\",\n\t\t\t\t\tvalue: options.space\n\t\t\t\t}] : []\n\t\t\t],\n\t\t\tflags\n\t\t});\n\t\tui.stderr(header);\n\t\tif (shouldShowLegend(options, flags)) {\n\t\t\tui.stderr(renderMigrationGraphLegend({\n\t\t\t\tcolorize: flags.color !== false,\n\t\t\t\tglyphMode: ui.resolveGlyphMode(options.ascii === true)\n\t\t\t}));\n\t\t\tui.stderr(\"\");\n\t\t}\n\t}\n\tconst loaded = await buildReadAggregate(config, { migrationsDir });\n\tif (!loaded.ok) return notOk(loaded.failure);\n\tconst { aggregate, contractHash: liveContractHash } = loaded.value;\n\tconst listResult = runMigrationList({\n\t\tspaces: await migrationSpaceListEntriesFromAggregate(aggregate, migrationsDir),\n\t\t...ifDefined(\"spaceFilter\", options.space)\n\t});\n\tif (!listResult.ok) return listResult;\n\treturn ok({\n\t\tlist: listResult.value,\n\t\tliveContractHash,\n\t\taggregate\n\t});\n}\nfunction createMigrationListCommand() {\n\tconst command = new Command(\"list\");\n\tsetCommandDescriptions(command, \"List on-disk migrations per contract space\", \"Enumerates every on-disk migration under migrations/<space>/ for every\\ncontract space found on disk. Offline — does not consult the database.\\nHuman output draws the shared migration graph tree with operation counts,\\ninvariants on each migration row, and refs on destination contract nodes.\\nPass --space <id> to narrow to one contract space. --ascii forces ASCII\\ntree glyphs (orthogonal to --no-color).\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next migration list\",\n\t\t\"prisma-next migration list --space app\",\n\t\t\"prisma-next migration list --ascii\",\n\t\t\"prisma-next migration list --legend\",\n\t\t\"prisma-next migration list --json\"\n\t]);\n\tsetCommandSeeAlso(command, [\n\t\t{\n\t\t\tverb: \"migration status\",\n\t\t\toneLiner: \"Show migration path and pending status\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration log\",\n\t\t\toneLiner: \"Show executed migration history\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration graph\",\n\t\t\toneLiner: \"Show the migration graph topology\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration show\",\n\t\t\toneLiner: \"Display migration package contents\"\n\t\t}\n\t]);\n\taddGlobalOptions(command).option(\"--config <path>\", \"Path to prisma-next.config.ts\").option(\"--space <id>\", \"Narrow output to a single contract space\").option(\"--ascii\", \"Use ASCII kind glyphs (pipe-friendly)\").option(\"--legend\", \"Print a key for the tree glyphs and lane colors\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst legendValidation = validateLegendOptions(options, flags);\n\t\tif (!legendValidation.ok) process.exit(handleResult(legendValidation, flags, ui));\n\t\tconst exitCode = handleResult(await executeMigrationListCommand(options, flags, ui), flags, ui, ({ list, liveContractHash, aggregate }) => {\n\t\t\tif (flags.json) ui.output(JSON.stringify(list, null, 2));\n\t\t\telse if (!flags.quiet) ui.output(renderMigrationListHumanOutput(list, {\n\t\t\t\tglyphMode: ui.resolveGlyphMode(options.ascii === true),\n\t\t\t\tuseColor: ui.useColor,\n\t\t\t\tliveContractHash,\n\t\t\t\tgraphForSpace: (spaceId) => aggregate.space(spaceId)?.graph(),\n\t\t\t\tappSpaceId: aggregate.app.spaceId\n\t\t\t}));\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { executeMigrationListCommand as n, renderMigrationListHumanOutput as r, createMigrationListCommand as t };\n\n//# sourceMappingURL=migration-list-BIL-re1m.mjs.map"],"mappings":";;;;;;;;;;;AAWA,SAAS,+BAA+B,QAAQ,SAAS;CACxD,OAAO,6BAA6B,QAAQ,8BAA8B,EAAE,UAAU,QAAQ,SAAS,CAAC,GAAG,QAAQ,WAAW;EAC7H,UAAU,QAAQ;EAClB,kBAAkB,QAAQ;EAC1B,eAAe,QAAQ;EACvB,GAAG,QAAQ,eAAe,KAAK,IAAI,EAAE,YAAY,QAAQ,WAAW,IAAI,CAAC;CAC1E,CAAC;AACF;;;;;;AAMA,eAAe,4BAA4B,SAAS,OAAO,IAAI;CAC9D,MAAM,eAAe,MAAM,sBAAsB,QAAQ,QAAQ;EAChE;EACA;EACA;EACA;EACA;EACA;CACD,CAAC;CACD,IAAI,CAAC,aAAa,IAAI,OAAO;CAC7B,MAAM,SAAS,aAAa;CAC5B,MAAM,EAAE,YAAY,eAAe,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,CAAC;CACD,iBAAiB,OAAO,CAAC,CAAC,OAAO,mBAAmB,+BAA+B,CAAC,CAAC,OAAO,gBAAgB,0CAA0C,CAAC,CAAC,OAAO,WAAW,uCAAuC,CAAC,CAAC,OAAO,YAAY,iDAAiD,CAAC,CAAC,OAAO,OAAO,YAAY;EAClT,MAAM,QAAQ,uBAAuB,OAAO;EAC5C,MAAM,KAAK,iBAAiB,KAAK;EACjC,MAAM,mBAAmB,sBAAsB,SAAS,KAAK;EAC7D,IAAI,CAAC,iBAAiB,IAAI,QAAQ,KAAK,aAAa,kBAAkB,OAAO,EAAE,CAAC;EAChF,MAAM,WAAW,aAAa,MAAM,4BAA4B,SAAS,OAAO,EAAE,GAAG,OAAO,KAAK,EAAE,MAAM,kBAAkB,gBAAgB;GAC1I,IAAI,MAAM,MAAM,GAAG,OAAO,KAAK,UAAU,MAAM,MAAM,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,OAAO,GAAG,OAAO,+BAA+B,MAAM;IACrE,WAAW,GAAG,iBAAiB,QAAQ,UAAU,IAAI;IACrD,UAAU,GAAG;IACb;IACA,gBAAgB,YAAY,UAAU,MAAM,OAAO,CAAC,EAAE,MAAM;IAC5D,YAAY,UAAU,IAAI;GAC3B,CAAC,CAAC;EACH,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
|
|
@@ -4,12 +4,12 @@ import { r as createTerminalUI } from "./terminal-ui-Cqz4LVL7-B0mcVdLy.mjs";
|
|
|
4
4
|
import { S as targetSupportsMigrations, _ as resolveMigrationPaths, b as setCommandExamples, f as maskConnectionUrl, m as parseGlobalFlagsOrExit, n as closeQuietly, s as formatStyledHeader, t as addGlobalOptions, u as handleResult, x as setCommandSeeAlso, y as setCommandDescriptions } from "./command-helpers-CwLvFwMB-BWwUQhlT.mjs";
|
|
5
5
|
import { t as createControlClient } from "./client-DU9qtBxW-BjVHiKzE.mjs";
|
|
6
6
|
import { t as mapCaughtMigrationError } from "./caught-errors-DLPzfzIW-CQ9BoXD-.mjs";
|
|
7
|
-
import { u as createAnsiMigrationListStyler } from "./migration-graph-command-render-
|
|
8
|
-
import { i as serializeLedgerEntriesForJson, r as renderMigrationLogTable, t as MIGRATION_LOG_EMPTY_MESSAGE } from "./migration-log-table-
|
|
7
|
+
import { u as createAnsiMigrationListStyler } from "./migration-graph-command-render-h0VdTkSM-C3rPZEw1.mjs";
|
|
8
|
+
import { i as serializeLedgerEntriesForJson, r as renderMigrationLogTable, t as MIGRATION_LOG_EMPTY_MESSAGE } from "./migration-log-table-eES9lPjv-BCFm8qJr.mjs";
|
|
9
9
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
10
10
|
import { notOk, ok } from "@prisma/orm-framework/utils/result";
|
|
11
11
|
import { Command } from "commander";
|
|
12
|
-
//#region ../../../1-framework/3-tooling/cli/dist/migration-log-
|
|
12
|
+
//#region ../../../1-framework/3-tooling/cli/dist/migration-log-BdBKYAUW.mjs
|
|
13
13
|
async function executeMigrationLogCommand(options, flags, ui) {
|
|
14
14
|
const configResult = await loadConfigForSections(options.config, [
|
|
15
15
|
"family",
|
|
@@ -120,4 +120,4 @@ function createMigrationLogCommand() {
|
|
|
120
120
|
//#endregion
|
|
121
121
|
export { executeMigrationLogCommand as n, createMigrationLogCommand as t };
|
|
122
122
|
|
|
123
|
-
//# sourceMappingURL=migration-log-
|
|
123
|
+
//# sourceMappingURL=migration-log-BdBKYAUW-DTPxKZtD.mjs.map
|
package/dist/{migration-log-CJ6_9_uj-uWyc3vlC.mjs.map → migration-log-BdBKYAUW-DTPxKZtD.mjs.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-log-
|
|
1
|
+
{"version":3,"file":"migration-log-BdBKYAUW-DTPxKZtD.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-log-BdBKYAUW.mjs"],"sourcesContent":["import { F as requireLiveDatabase, N as errorUnexpected } from \"./cli-errors-BG6bItjG.mjs\";\nimport { t as createTerminalUI } from \"./terminal-ui-Cqz4LVL7.mjs\";\nimport { S as formatStyledHeader, _ as parseGlobalFlagsOrExit, a as maskConnectionUrl, c as resolveMigrationPaths, d as setCommandExamples, f as setCommandSeeAlso, n as closeQuietly, p as targetSupportsMigrations, t as addGlobalOptions, u as setCommandDescriptions, v as handleResult } from \"./command-helpers-CwLvFwMB.mjs\";\nimport { t as createControlClient } from \"./client-DU9qtBxW.mjs\";\nimport { t as mapCaughtMigrationError } from \"./caught-errors-DLPzfzIW.mjs\";\nimport { o as createAnsiMigrationListStyler } from \"./migration-graph-command-render-h0VdTkSM.mjs\";\nimport { i as serializeLedgerEntriesForJson, r as renderMigrationLogTable, t as MIGRATION_LOG_EMPTY_MESSAGE } from \"./migration-log-table-eES9lPjv.mjs\";\nimport { Command } from \"commander\";\nimport { loadConfigForSections } from \"@internal/config-loader\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/commands/migration-log.ts\nasync function executeMigrationLogCommand(options, flags, ui) {\n\tconst configResult = await loadConfigForSections(options.config, [\n\t\t\"family\",\n\t\t\"target\",\n\t\t\"adapter\",\n\t\t\"driver\",\n\t\t\"extensions\",\n\t\t\"db\",\n\t\t\"migrations\"\n\t]);\n\tif (!configResult.ok) return configResult;\n\tconst config = configResult.value;\n\tconst { configPath } = resolveMigrationPaths(options.config, config, process.cwd());\n\tconst dbConnection = options.db ?? config.db?.connection;\n\tconst missingDb = requireLiveDatabase({\n\t\tdbConnection,\n\t\thasDriver: !!config.driver,\n\t\twhy: `migration log needs a database connection and driver to read the ledger (set db.connection in ${configPath}, or pass --db <url>)`,\n\t\tcommandName: \"migration log\"\n\t});\n\tif (missingDb) return notOk(missingDb);\n\tif (!targetSupportsMigrations(config.target)) return notOk(errorUnexpected(\"Target does not support migrations\"));\n\tif (!flags.json && !flags.quiet) {\n\t\tconst header = formatStyledHeader({\n\t\t\tcommand: \"migration log\",\n\t\t\tdescription: \"Show executed migration history from the database ledger\",\n\t\t\tdetails: [{\n\t\t\t\tlabel: \"config\",\n\t\t\t\tvalue: configPath\n\t\t\t}, ...typeof dbConnection === \"string\" ? [{\n\t\t\t\tlabel: \"database\",\n\t\t\t\tvalue: maskConnectionUrl(dbConnection)\n\t\t\t}] : []],\n\t\t\tflags\n\t\t});\n\t\tui.stderr(header);\n\t}\n\tconst client = createControlClient({\n\t\tfamily: config.family,\n\t\ttarget: config.target,\n\t\tadapter: config.adapter,\n\t\t...ifDefined(\"driver\", config.driver),\n\t\textensions: config.extensions ?? []\n\t});\n\ttry {\n\t\tawait client.connect(dbConnection);\n\t\treturn ok(await client.readLedger());\n\t} catch (error) {\n\t\tconst mapped = mapCaughtMigrationError(error);\n\t\tif (mapped) return notOk(mapped);\n\t\treturn notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Failed to read migration log: ${error instanceof Error ? error.message : String(error)}` }));\n\t} finally {\n\t\tawait closeQuietly(client);\n\t}\n}\nfunction createMigrationLogCommand() {\n\tconst command = new Command(\"log\");\n\tsetCommandDescriptions(command, \"Show executed migration history\", \"Reads the database ledger and displays every applied migration edge\\nin chronological order, including rollbacks and re-applies, merged\\nacross all contract spaces. Requires a database connection.\");\n\tsetCommandExamples(command, [\n\t\t\"prisma-next migration log --db $DATABASE_URL\",\n\t\t\"prisma-next migration log --utc --db $DATABASE_URL\",\n\t\t\"prisma-next migration log --json --db $DATABASE_URL\"\n\t]);\n\tsetCommandSeeAlso(command, [\n\t\t{\n\t\t\tverb: \"migration status\",\n\t\t\toneLiner: \"Show migration path and pending status\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration list\",\n\t\t\toneLiner: \"List on-disk migrations\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration graph\",\n\t\t\toneLiner: \"Show the migration graph topology\"\n\t\t},\n\t\t{\n\t\t\tverb: \"migration show\",\n\t\t\toneLiner: \"Display migration package contents\"\n\t\t}\n\t]);\n\taddGlobalOptions(command).option(\"--db <url>\", \"Database connection string\").option(\"--config <path>\", \"Path to prisma-next.config.ts\").option(\"--utc\", \"Render human timestamps in UTC instead of local time\").option(\"--ascii\", \"Use ASCII glyphs (pipe-friendly)\").action(async (options) => {\n\t\tconst flags = parseGlobalFlagsOrExit(options);\n\t\tconst ui = createTerminalUI(flags);\n\t\tconst exitCode = handleResult(await executeMigrationLogCommand(options, flags, ui), flags, ui, (entries) => {\n\t\t\tif (flags.json) {\n\t\t\t\tconst records = serializeLedgerEntriesForJson(entries);\n\t\t\t\tconst result = {\n\t\t\t\t\tok: true,\n\t\t\t\t\trecords,\n\t\t\t\t\tsummary: `${records.length} migration(s) applied`\n\t\t\t\t};\n\t\t\t\tui.output(JSON.stringify(result, null, 2));\n\t\t\t} else if (!flags.quiet) if (entries.length === 0) ui.output(MIGRATION_LOG_EMPTY_MESSAGE);\n\t\t\telse {\n\t\t\t\tconst styler = createAnsiMigrationListStyler({ useColor: ui.useColor });\n\t\t\t\tui.output(renderMigrationLogTable(entries, {\n\t\t\t\t\tutc: options.utc === true,\n\t\t\t\t\tstyler,\n\t\t\t\t\tglyphMode: ui.resolveGlyphMode(options.ascii === true)\n\t\t\t\t}));\n\t\t\t}\n\t\t});\n\t\tprocess.exit(exitCode);\n\t});\n\treturn command;\n}\n//#endregion\nexport { executeMigrationLogCommand as n, createMigrationLogCommand as t };\n\n//# sourceMappingURL=migration-log-BdBKYAUW.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,eAAe,2BAA2B,SAAS,OAAO,IAAI;CAC7D,MAAM,eAAe,MAAM,sBAAsB,QAAQ,QAAQ;EAChE;EACA;EACA;EACA;EACA;EACA;EACA;CACD,CAAC;CACD,IAAI,CAAC,aAAa,IAAI,OAAO;CAC7B,MAAM,SAAS,aAAa;CAC5B,MAAM,EAAE,eAAe,sBAAsB,QAAQ,QAAQ,QAAQ,QAAQ,IAAI,CAAC;CAClF,MAAM,eAAe,QAAQ,MAAM,OAAO,IAAI;CAC9C,MAAM,YAAY,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MAAM;GACN,UAAU;EACX;EACA;GACC,MAAM;GACN,UAAU;EACX;EACA;GACC,MAAM;GACN,UAAU;EACX;CACD,CAAC;CACD,iBAAiB,OAAO,CAAC,CAAC,OAAO,cAAc,4BAA4B,CAAC,CAAC,OAAO,mBAAmB,+BAA+B,CAAC,CAAC,OAAO,SAAS,sDAAsD,CAAC,CAAC,OAAO,WAAW,kCAAkC,CAAC,CAAC,OAAO,OAAO,YAAY;EAC/R,MAAM,QAAQ,uBAAuB,OAAO;EAC5C,MAAM,KAAK,iBAAiB,KAAK;EACjC,MAAM,WAAW,aAAa,MAAM,2BAA2B,SAAS,OAAO,EAAE,GAAG,OAAO,KAAK,YAAY;GAC3G,IAAI,MAAM,MAAM;IACf,MAAM,UAAU,8BAA8B,OAAO;IACrD,MAAM,SAAS;KACd,IAAI;KACJ;KACA,SAAS,GAAG,QAAQ,OAAO;IAC5B;IACA,GAAG,OAAO,KAAK,UAAU,QAAQ,MAAM,CAAC,CAAC;GAC1C,OAAO,IAAI,CAAC,MAAM,OAAO,IAAI,QAAQ,WAAW,GAAG,GAAG,OAAO,2BAA2B;QACnF;IACJ,MAAM,SAAS,8BAA8B,EAAE,UAAU,GAAG,SAAS,CAAC;IACtE,GAAG,OAAO,wBAAwB,SAAS;KAC1C,KAAK,QAAQ,QAAQ;KACrB;KACA,WAAW,GAAG,iBAAiB,QAAQ,UAAU,IAAI;IACtD,CAAC,CAAC;GACH;EACD,CAAC;EACD,QAAQ,KAAK,QAAQ;CACtB,CAAC;CACD,OAAO;AACR"}
|
package/dist/{migration-log-table-DRiOnvzf-zTQBThqe.mjs → migration-log-table-eES9lPjv-BCFm8qJr.mjs}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { g as migrationListForwardArrow, h as migrationListEmptySource, r as abbreviateContractHash, t as IDENTITY_MIGRATION_LIST_STYLER } from "./migration-graph-command-render-
|
|
1
|
+
import { g as migrationListForwardArrow, h as migrationListEmptySource, r as abbreviateContractHash, t as IDENTITY_MIGRATION_LIST_STYLER } from "./migration-graph-command-render-h0VdTkSM-C3rPZEw1.mjs";
|
|
2
2
|
import stringWidth from "string-width";
|
|
3
|
-
//#region ../../../1-framework/3-tooling/cli/dist/migration-log-table-
|
|
3
|
+
//#region ../../../1-framework/3-tooling/cli/dist/migration-log-table-eES9lPjv.mjs
|
|
4
4
|
const HEADING_APPLIED_AT = "Applied at";
|
|
5
5
|
const HEADING_SPACE = "Space";
|
|
6
6
|
const HEADING_MIGRATION = "Migration";
|
|
@@ -113,4 +113,4 @@ const MIGRATION_LOG_EMPTY_MESSAGE = "No migrations have been applied to this dat
|
|
|
113
113
|
//#endregion
|
|
114
114
|
export { sortLedgerEntries as a, serializeLedgerEntriesForJson as i, formatLedgerAppliedAt as n, styleHashTransition as o, renderMigrationLogTable as r, MIGRATION_LOG_EMPTY_MESSAGE as t };
|
|
115
115
|
|
|
116
|
-
//# sourceMappingURL=migration-log-table-
|
|
116
|
+
//# sourceMappingURL=migration-log-table-eES9lPjv-BCFm8qJr.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-log-table-DRiOnvzf-zTQBThqe.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-log-table-DRiOnvzf.mjs"],"sourcesContent":["import { _ as abbreviateContractHash, c as IDENTITY_MIGRATION_LIST_STYLER, v as migrationListEmptySource, y as migrationListForwardArrow } from \"./migration-graph-command-render-BeuEyf2B.mjs\";\nimport stringWidth from \"string-width\";\n//#region src/utils/formatters/migration-log-table.ts\nconst HEADING_APPLIED_AT = \"Applied at\";\nconst HEADING_SPACE = \"Space\";\nconst HEADING_MIGRATION = \"Migration\";\nconst HEADING_CHANGE = \"Change\";\nconst HEADING_OPS = \"Ops\";\nconst COLUMN_SEPARATOR = \" \";\nconst DIVIDER_CHAR = \"─\";\nconst ASCII_DIVIDER_CHAR = \"-\";\nfunction sortLedgerEntries(entries) {\n\treturn [...entries].sort((left, right) => {\n\t\tconst timeDiff = left.appliedAt.getTime() - right.appliedAt.getTime();\n\t\tif (timeDiff !== 0) return timeDiff;\n\t\tconst spaceDiff = left.space.localeCompare(right.space);\n\t\tif (spaceDiff !== 0) return spaceDiff;\n\t\treturn left.migrationName.localeCompare(right.migrationName);\n\t});\n}\nfunction pad2(value) {\n\treturn String(value).padStart(2, \"0\");\n}\nfunction formatLedgerAppliedAt(date, mode) {\n\tif (mode === \"iso\") return date.toISOString();\n\tif (mode === \"utc\") return `${date.getUTCFullYear()}-${pad2(date.getUTCMonth() + 1)}-${pad2(date.getUTCDate())} ${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}:${pad2(date.getUTCSeconds())}Z`;\n\tconst offsetMinutes = -date.getTimezoneOffset();\n\tconst sign = offsetMinutes >= 0 ? \"+\" : \"-\";\n\tconst absoluteOffset = Math.abs(offsetMinutes);\n\tconst offsetHours = pad2(Math.floor(absoluteOffset / 60));\n\tconst offsetMins = pad2(absoluteOffset % 60);\n\treturn `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())} ${pad2(date.getHours())}:${pad2(date.getMinutes())}:${pad2(date.getSeconds())} ${sign}${offsetHours}:${offsetMins}`;\n}\nfunction formatHashEndpoint(hash, glyphMode = \"unicode\") {\n\tif (hash === null) return migrationListEmptySource(glyphMode);\n\treturn abbreviateContractHash(hash);\n}\nfunction formatHashTransition(from, to, glyphMode = \"unicode\") {\n\treturn `${formatHashEndpoint(from, glyphMode)} ${migrationListForwardArrow(glyphMode)} ${abbreviateContractHash(to)}`;\n}\nfunction styleHashTransition(from, to, styler, glyphMode = \"unicode\") {\n\treturn `${from === null ? styler.glyph(migrationListEmptySource(glyphMode)) : styler.sourceHash(abbreviateContractHash(from))} ${styler.glyph(migrationListForwardArrow(glyphMode))} ${styler.destHash(abbreviateContractHash(to))}`;\n}\nfunction padVisible(text, targetWidth) {\n\tconst padding = Math.max(0, targetWidth - stringWidth(text));\n\treturn text + \" \".repeat(padding);\n}\nfunction columnWidth(values) {\n\treturn values.reduce((max, value) => Math.max(max, stringWidth(value)), 0);\n}\nfunction padDividerCell(valueWidth, dividerChar) {\n\treturn dividerChar.repeat(valueWidth + 2);\n}\nfunction padTextCell(value, valueWidth) {\n\treturn ` ${padVisible(value, valueWidth)} `;\n}\nfunction padOpsCell(value, valueWidth) {\n\tconst padding = Math.max(0, valueWidth - stringWidth(value));\n\treturn ` ${\" \".repeat(padding)}${value} `;\n}\nfunction renderMigrationLogTable(entries, options = {}) {\n\tconst sorted = sortLedgerEntries(entries);\n\tif (sorted.length === 0) return \"\";\n\tconst styler = options.styler ?? IDENTITY_MIGRATION_LIST_STYLER;\n\tconst glyphMode = options.glyphMode ?? \"unicode\";\n\tconst dividerChar = glyphMode === \"ascii\" ? ASCII_DIVIDER_CHAR : DIVIDER_CHAR;\n\tconst showSpace = new Set(sorted.map((entry) => entry.space)).size > 1;\n\tconst timestampMode = options.utc ? \"utc\" : \"local\";\n\tconst rows = sorted.map((entry) => ({\n\t\tappliedAt: formatLedgerAppliedAt(entry.appliedAt, timestampMode),\n\t\tspace: entry.space,\n\t\tmigrationName: entry.migrationName,\n\t\ttransition: formatHashTransition(entry.from, entry.to, glyphMode),\n\t\tops: `${entry.operationCount} ops`,\n\t\tfrom: entry.from,\n\t\tto: entry.to\n\t}));\n\tconst appliedAtWidth = columnWidth([HEADING_APPLIED_AT, ...rows.map((row) => row.appliedAt)]);\n\tconst spaceWidth = showSpace ? columnWidth([HEADING_SPACE, ...rows.map((row) => row.space)]) : 0;\n\tconst nameWidth = columnWidth([HEADING_MIGRATION, ...rows.map((row) => row.migrationName)]);\n\tconst transitionWidth = columnWidth([HEADING_CHANGE, ...rows.map((row) => row.transition)]);\n\tconst opsWidth = columnWidth([HEADING_OPS, ...rows.map((row) => row.ops)]);\n\tconst headingParts = [padTextCell(HEADING_APPLIED_AT, appliedAtWidth)];\n\tif (showSpace) headingParts.push(padTextCell(HEADING_SPACE, spaceWidth));\n\theadingParts.push(padTextCell(HEADING_MIGRATION, nameWidth), padTextCell(HEADING_CHANGE, transitionWidth), padOpsCell(HEADING_OPS, opsWidth));\n\tconst heading = headingParts.join(COLUMN_SEPARATOR);\n\tconst dividerParts = [padDividerCell(appliedAtWidth, dividerChar)];\n\tif (showSpace) dividerParts.push(padDividerCell(spaceWidth, dividerChar));\n\tdividerParts.push(padDividerCell(nameWidth, dividerChar), padDividerCell(transitionWidth, dividerChar), padDividerCell(opsWidth, dividerChar));\n\treturn [\n\t\theading,\n\t\tdividerParts.map((cell) => styler.summary(cell)).join(COLUMN_SEPARATOR),\n\t\t...rows.map((row) => {\n\t\t\tconst parts = [padTextCell(row.appliedAt, appliedAtWidth)];\n\t\t\tif (showSpace) parts.push(padTextCell(row.space, spaceWidth));\n\t\t\tparts.push(padTextCell(styler.dirName(row.migrationName), nameWidth), padTextCell(styleHashTransition(row.from, row.to, styler, glyphMode), transitionWidth), padOpsCell(row.ops, opsWidth));\n\t\t\treturn parts.join(COLUMN_SEPARATOR);\n\t\t})\n\t].join(\"\\n\");\n}\nfunction serializeLedgerEntriesForJson(entries) {\n\treturn sortLedgerEntries(entries).map((entry) => ({\n\t\tspace: entry.space,\n\t\tname: entry.migrationName,\n\t\thash: entry.migrationHash,\n\t\tfromContract: entry.from,\n\t\ttoContract: entry.to,\n\t\tappliedAt: formatLedgerAppliedAt(entry.appliedAt, \"iso\"),\n\t\toperationCount: entry.operationCount\n\t}));\n}\nconst MIGRATION_LOG_EMPTY_MESSAGE = \"No migrations have been applied to this database.\";\n//#endregion\nexport { sortLedgerEntries as a, serializeLedgerEntriesForJson as i, formatLedgerAppliedAt as n, styleHashTransition as o, renderMigrationLogTable as r, MIGRATION_LOG_EMPTY_MESSAGE as t };\n\n//# sourceMappingURL=migration-log-table-DRiOnvzf.mjs.map"],"mappings":";;;AAGA,MAAM,qBAAqB;AAC3B,MAAM,gBAAgB;AACtB,MAAM,oBAAoB;AAC1B,MAAM,iBAAiB;AACvB,MAAM,cAAc;AACpB,MAAM,mBAA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,GAAG,eAAe,iBAAiB,WAAW,GAAG,eAAe,UAAU,WAAW,CAAC;CAC7I,OAAO;EACN;EACA,aAAa,KAAK,SAAS,OAAO,QAAQ,IAAI,CAAC,CAAC,CAAC,KAAK,gBAAgB;EACtE,GAAG,KAAK,KAAK,QAAQ;GACpB,MAAM,QAAQ,CAAC,YAAY,IAAI,WAAW,cAAc,CAAC;GACzD,IAAI,WAAW,MAAM,KAAK,YAAY,IAAI,OAAO,UAAU,CAAC;GAC5D,MAAM,KAAK,YAAY,OAAO,QAAQ,IAAI,aAAa,GAAG,SAAS,GAAG,YAAY,oBAAoB,IAAI,MAAM,IAAI,IAAI,QAAQ,SAAS,GAAG,eAAe,GAAG,WAAW,IAAI,KAAK,QAAQ,CAAC;GAC3L,OAAO,MAAM,KAAK,gBAAgB;EACnC,CAAC;CACF,CAAC,CAAC,KAAK,IAAI;AACZ;AACA,SAAS,8BAA8B,SAAS;CAC/C,OAAO,kBAAkB,OAAO,CAAC,CAAC,KAAK,WAAW;EACjD,OAAO,MAAM;EACb,MAAM,MAAM;EACZ,MAAM,MAAM;EACZ,cAAc,MAAM;EACpB,YAAY,MAAM;EAClB,WAAW,sBAAsB,MAAM,WAAW,KAAK;EACvD,gBAAgB,MAAM;CACvB,EAAE;AACH;AACA,MAAM,8BAA8B"}
|
|
1
|
+
{"version":3,"file":"migration-log-table-eES9lPjv-BCFm8qJr.mjs","names":[],"sources":["../../../../1-framework/3-tooling/cli/dist/migration-log-table-eES9lPjv.mjs"],"sourcesContent":["import { b as migrationListForwardArrow, c as IDENTITY_MIGRATION_LIST_STYLER, v as abbreviateContractHash, y as migrationListEmptySource } from \"./migration-graph-command-render-h0VdTkSM.mjs\";\nimport stringWidth from \"string-width\";\n//#region src/utils/formatters/migration-log-table.ts\nconst HEADING_APPLIED_AT = \"Applied at\";\nconst HEADING_SPACE = \"Space\";\nconst HEADING_MIGRATION = \"Migration\";\nconst HEADING_CHANGE = \"Change\";\nconst HEADING_OPS = \"Ops\";\nconst COLUMN_SEPARATOR = \" \";\nconst DIVIDER_CHAR = \"─\";\nconst ASCII_DIVIDER_CHAR = \"-\";\nfunction sortLedgerEntries(entries) {\n\treturn [...entries].sort((left, right) => {\n\t\tconst timeDiff = left.appliedAt.getTime() - right.appliedAt.getTime();\n\t\tif (timeDiff !== 0) return timeDiff;\n\t\tconst spaceDiff = left.space.localeCompare(right.space);\n\t\tif (spaceDiff !== 0) return spaceDiff;\n\t\treturn left.migrationName.localeCompare(right.migrationName);\n\t});\n}\nfunction pad2(value) {\n\treturn String(value).padStart(2, \"0\");\n}\nfunction formatLedgerAppliedAt(date, mode) {\n\tif (mode === \"iso\") return date.toISOString();\n\tif (mode === \"utc\") return `${date.getUTCFullYear()}-${pad2(date.getUTCMonth() + 1)}-${pad2(date.getUTCDate())} ${pad2(date.getUTCHours())}:${pad2(date.getUTCMinutes())}:${pad2(date.getUTCSeconds())}Z`;\n\tconst offsetMinutes = -date.getTimezoneOffset();\n\tconst sign = offsetMinutes >= 0 ? \"+\" : \"-\";\n\tconst absoluteOffset = Math.abs(offsetMinutes);\n\tconst offsetHours = pad2(Math.floor(absoluteOffset / 60));\n\tconst offsetMins = pad2(absoluteOffset % 60);\n\treturn `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())} ${pad2(date.getHours())}:${pad2(date.getMinutes())}:${pad2(date.getSeconds())} ${sign}${offsetHours}:${offsetMins}`;\n}\nfunction formatHashEndpoint(hash, glyphMode = \"unicode\") {\n\tif (hash === null) return migrationListEmptySource(glyphMode);\n\treturn abbreviateContractHash(hash);\n}\nfunction formatHashTransition(from, to, glyphMode = \"unicode\") {\n\treturn `${formatHashEndpoint(from, glyphMode)} ${migrationListForwardArrow(glyphMode)} ${abbreviateContractHash(to)}`;\n}\nfunction styleHashTransition(from, to, styler, glyphMode = \"unicode\") {\n\treturn `${from === null ? styler.glyph(migrationListEmptySource(glyphMode)) : styler.sourceHash(abbreviateContractHash(from))} ${styler.glyph(migrationListForwardArrow(glyphMode))} ${styler.destHash(abbreviateContractHash(to))}`;\n}\nfunction padVisible(text, targetWidth) {\n\tconst padding = Math.max(0, targetWidth - stringWidth(text));\n\treturn text + \" \".repeat(padding);\n}\nfunction columnWidth(values) {\n\treturn values.reduce((max, value) => Math.max(max, stringWidth(value)), 0);\n}\nfunction padDividerCell(valueWidth, dividerChar) {\n\treturn dividerChar.repeat(valueWidth + 2);\n}\nfunction padTextCell(value, valueWidth) {\n\treturn ` ${padVisible(value, valueWidth)} `;\n}\nfunction padOpsCell(value, valueWidth) {\n\tconst padding = Math.max(0, valueWidth - stringWidth(value));\n\treturn ` ${\" \".repeat(padding)}${value} `;\n}\nfunction renderMigrationLogTable(entries, options = {}) {\n\tconst sorted = sortLedgerEntries(entries);\n\tif (sorted.length === 0) return \"\";\n\tconst styler = options.styler ?? IDENTITY_MIGRATION_LIST_STYLER;\n\tconst glyphMode = options.glyphMode ?? \"unicode\";\n\tconst dividerChar = glyphMode === \"ascii\" ? ASCII_DIVIDER_CHAR : DIVIDER_CHAR;\n\tconst showSpace = new Set(sorted.map((entry) => entry.space)).size > 1;\n\tconst timestampMode = options.utc ? \"utc\" : \"local\";\n\tconst rows = sorted.map((entry) => ({\n\t\tappliedAt: formatLedgerAppliedAt(entry.appliedAt, timestampMode),\n\t\tspace: entry.space,\n\t\tmigrationName: entry.migrationName,\n\t\ttransition: formatHashTransition(entry.from, entry.to, glyphMode),\n\t\tops: `${entry.operationCount} ops`,\n\t\tfrom: entry.from,\n\t\tto: entry.to\n\t}));\n\tconst appliedAtWidth = columnWidth([HEADING_APPLIED_AT, ...rows.map((row) => row.appliedAt)]);\n\tconst spaceWidth = showSpace ? columnWidth([HEADING_SPACE, ...rows.map((row) => row.space)]) : 0;\n\tconst nameWidth = columnWidth([HEADING_MIGRATION, ...rows.map((row) => row.migrationName)]);\n\tconst transitionWidth = columnWidth([HEADING_CHANGE, ...rows.map((row) => row.transition)]);\n\tconst opsWidth = columnWidth([HEADING_OPS, ...rows.map((row) => row.ops)]);\n\tconst headingParts = [padTextCell(HEADING_APPLIED_AT, appliedAtWidth)];\n\tif (showSpace) headingParts.push(padTextCell(HEADING_SPACE, spaceWidth));\n\theadingParts.push(padTextCell(HEADING_MIGRATION, nameWidth), padTextCell(HEADING_CHANGE, transitionWidth), padOpsCell(HEADING_OPS, opsWidth));\n\tconst heading = headingParts.join(COLUMN_SEPARATOR);\n\tconst dividerParts = [padDividerCell(appliedAtWidth, dividerChar)];\n\tif (showSpace) dividerParts.push(padDividerCell(spaceWidth, dividerChar));\n\tdividerParts.push(padDividerCell(nameWidth, dividerChar), padDividerCell(transitionWidth, dividerChar), padDividerCell(opsWidth, dividerChar));\n\treturn [\n\t\theading,\n\t\tdividerParts.map((cell) => styler.summary(cell)).join(COLUMN_SEPARATOR),\n\t\t...rows.map((row) => {\n\t\t\tconst parts = [padTextCell(row.appliedAt, appliedAtWidth)];\n\t\t\tif (showSpace) parts.push(padTextCell(row.space, spaceWidth));\n\t\t\tparts.push(padTextCell(styler.dirName(row.migrationName), nameWidth), padTextCell(styleHashTransition(row.from, row.to, styler, glyphMode), transitionWidth), padOpsCell(row.ops, opsWidth));\n\t\t\treturn parts.join(COLUMN_SEPARATOR);\n\t\t})\n\t].join(\"\\n\");\n}\nfunction serializeLedgerEntriesForJson(entries) {\n\treturn sortLedgerEntries(entries).map((entry) => ({\n\t\tspace: entry.space,\n\t\tname: entry.migrationName,\n\t\thash: entry.migrationHash,\n\t\tfromContract: entry.from,\n\t\ttoContract: entry.to,\n\t\tappliedAt: formatLedgerAppliedAt(entry.appliedAt, \"iso\"),\n\t\toperationCount: entry.operationCount\n\t}));\n}\nconst MIGRATION_LOG_EMPTY_MESSAGE = \"No migrations have been applied to this database.\";\n//#endregion\nexport { sortLedgerEntries as a, serializeLedgerEntriesForJson as i, formatLedgerAppliedAt as n, styleHashTransition as o, renderMigrationLogTable as r, MIGRATION_LOG_EMPTY_MESSAGE as t };\n\n//# sourceMappingURL=migration-log-table-eES9lP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