prisma-next 0.11.0-dev.47 → 0.11.0-dev.49
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/cli.mjs +9 -9
- package/dist/{command-helpers-CI8P5Xyd.mjs → command-helpers-4UNsRRc4.mjs} +3 -181
- package/dist/command-helpers-4UNsRRc4.mjs.map +1 -0
- package/dist/commands/contract-emit.mjs +1 -1
- package/dist/commands/contract-infer.mjs +1 -1
- package/dist/commands/db-init.mjs +3 -3
- package/dist/commands/db-schema.mjs +3 -3
- package/dist/commands/db-sign.mjs +2 -2
- package/dist/commands/db-update.mjs +3 -3
- package/dist/commands/db-verify.mjs +1 -1
- package/dist/commands/migrate.mjs +2 -2
- package/dist/commands/migration-check.mjs +1 -1
- package/dist/commands/migration-graph.mjs +1 -1
- package/dist/commands/migration-list.d.mts +1 -1
- package/dist/commands/migration-list.d.mts.map +1 -1
- package/dist/commands/migration-list.mjs +1 -1
- package/dist/commands/migration-log.mjs +1 -1
- package/dist/commands/migration-new.mjs +1 -1
- package/dist/commands/migration-plan.mjs +1 -1
- package/dist/commands/migration-show.mjs +2 -2
- package/dist/commands/migration-status.mjs +2 -2
- package/dist/commands/ref.mjs +1 -1
- package/dist/{contract-emit-DmBG2Nnc.mjs → contract-emit-Bbdnpcjl.mjs} +2 -2
- package/dist/{contract-emit-DmBG2Nnc.mjs.map → contract-emit-Bbdnpcjl.mjs.map} +1 -1
- package/dist/{contract-infer-BSWFKgI1.mjs → contract-infer-C98ZaRhp.mjs} +3 -3
- package/dist/{contract-infer-BSWFKgI1.mjs.map → contract-infer-C98ZaRhp.mjs.map} +1 -1
- package/dist/{db-verify-BzpwFyLg.mjs → db-verify-BWl1Yxi-.mjs} +3 -3
- package/dist/{db-verify-BzpwFyLg.mjs.map → db-verify-BWl1Yxi-.mjs.map} +1 -1
- package/dist/exports/index.mjs +1 -1
- package/dist/exports/init-output.d.mts.map +1 -1
- package/dist/glyph-mode-CBB4emzO.d.mts +5 -0
- package/dist/glyph-mode-CBB4emzO.d.mts.map +1 -0
- package/dist/{init-DEssiJ8j.mjs → init-C3Swd5QB.mjs} +2 -2
- package/dist/{init-DEssiJ8j.mjs.map → init-C3Swd5QB.mjs.map} +1 -1
- package/dist/{inspect-live-schema-DlBM84nh.mjs → inspect-live-schema-BRCWQ-Sr.mjs} +2 -2
- package/dist/{inspect-live-schema-DlBM84nh.mjs.map → inspect-live-schema-BRCWQ-Sr.mjs.map} +1 -1
- package/dist/{migration-check-CzLbAqIQ.mjs → migration-check-DoskM1nB.mjs} +2 -2
- package/dist/{migration-check-CzLbAqIQ.mjs.map → migration-check-DoskM1nB.mjs.map} +1 -1
- package/dist/{migration-command-scaffold-Bp8UHnvJ.mjs → migration-command-scaffold-CXLkoIJx.mjs} +2 -2
- package/dist/{migration-command-scaffold-Bp8UHnvJ.mjs.map → migration-command-scaffold-CXLkoIJx.mjs.map} +1 -1
- package/dist/migration-list-B2-iQ5Jd.mjs +646 -0
- package/dist/migration-list-B2-iQ5Jd.mjs.map +1 -0
- package/dist/{migration-plan-BLvOmNCu.mjs → migration-plan-BqmIKQpZ.mjs} +2 -2
- package/dist/{migration-plan-BLvOmNCu.mjs.map → migration-plan-BqmIKQpZ.mjs.map} +1 -1
- package/dist/{migrations-vzQt9LI2.mjs → migrations-BcVTutso.mjs} +2 -2
- package/dist/{migrations-vzQt9LI2.mjs.map → migrations-BcVTutso.mjs.map} +1 -1
- package/dist/{verify-ktSRQvIS.mjs → verify-DOHbbrub.mjs} +2 -2
- package/dist/{verify-ktSRQvIS.mjs.map → verify-DOHbbrub.mjs.map} +1 -1
- package/package.json +11 -11
- package/dist/command-helpers-CI8P5Xyd.mjs.map +0 -1
- package/dist/migration-list-C2xnaYsT.mjs +0 -279
- package/dist/migration-list-C2xnaYsT.mjs.map +0 -1
- package/dist/migration-list-graph-render-DKw1AT-e.d.mts +0 -7
- package/dist/migration-list-graph-render-DKw1AT-e.d.mts.map +0 -1
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
import { t as loadConfig } from "./config-loader-B6sJjXTv.mjs";
|
|
2
|
-
import { O as errorUnexpected, T as errorSpaceNotFound, f as errorInvalidSpaceId, k as mapMigrationToolsError } from "./cli-errors-DFF1LlfU.mjs";
|
|
3
|
-
import { A as formatStyledHeader, C as formatMigrationDataColumn, S as computeMigrationDirNameWidth, d as setCommandDescriptions, f as setCommandExamples, l as resolveMigrationPaths, p as setCommandSeeAlso, t as addGlobalOptions, v as parseGlobalFlagsOrExit, w as handleResult, x as renderMigrationListGraphResult, y as createTerminalUI } from "./command-helpers-CI8P5Xyd.mjs";
|
|
4
|
-
import { Command } from "commander";
|
|
5
|
-
import { ifDefined } from "@prisma-next/utils/defined";
|
|
6
|
-
import { notOk, ok } from "@prisma-next/utils/result";
|
|
7
|
-
import { APP_SPACE_ID, isValidSpaceId } from "@prisma-next/migration-tools/spaces";
|
|
8
|
-
import { bold, cyan, cyanBright, dim, green, greenBright, yellow } from "colorette";
|
|
9
|
-
import { MigrationToolsError } from "@prisma-next/migration-tools/errors";
|
|
10
|
-
import { enumerateMigrationSpaces } from "@prisma-next/migration-tools/enumerate-migration-spaces";
|
|
11
|
-
import { classifyMigrationListGraphTopology } from "@prisma-next/migration-tools/migration-list-graph-topology";
|
|
12
|
-
//#region src/utils/formatters/migration-list-render.ts
|
|
13
|
-
const KIND_GLYPH = {
|
|
14
|
-
forward: "*",
|
|
15
|
-
rollback: "↩",
|
|
16
|
-
self: "⟲"
|
|
17
|
-
};
|
|
18
|
-
const IDENTITY_MIGRATION_LIST_STYLER = {
|
|
19
|
-
kind: (text) => text,
|
|
20
|
-
dirName: (text) => text,
|
|
21
|
-
sourceHash: (text) => text,
|
|
22
|
-
destHash: (text) => text,
|
|
23
|
-
glyph: (text) => text,
|
|
24
|
-
lane: (text) => text,
|
|
25
|
-
invariants: (ids) => `{${ids.join(", ")}}`,
|
|
26
|
-
refs: (names) => `(${names.join(", ")})`,
|
|
27
|
-
spaceHeading: (text) => text,
|
|
28
|
-
summary: (text) => text,
|
|
29
|
-
emptyState: (text) => text
|
|
30
|
-
};
|
|
31
|
-
function resolveEdgeKind(migrationHash, kindByMigrationHash) {
|
|
32
|
-
return kindByMigrationHash.get(migrationHash) ?? "forward";
|
|
33
|
-
}
|
|
34
|
-
function formatMigrationRow(migration, dirNameWidth, edgeKind, style) {
|
|
35
|
-
return `${`${style.kind(KIND_GLYPH[edgeKind])} `}${formatMigrationDataColumn(migration, {
|
|
36
|
-
dirNameWidth,
|
|
37
|
-
edgeKind,
|
|
38
|
-
style,
|
|
39
|
-
forwardArrow: "→"
|
|
40
|
-
})}`;
|
|
41
|
-
}
|
|
42
|
-
function formatEmptyStateLine(spaceId, style) {
|
|
43
|
-
return style.emptyState(`There are no migrations in migrations/${spaceId}/ yet`);
|
|
44
|
-
}
|
|
45
|
-
function renderSpaceBlock(spaceId, migrations, multiSpace, style) {
|
|
46
|
-
if (migrations.length === 0) {
|
|
47
|
-
const emptyLine = formatEmptyStateLine(spaceId, style);
|
|
48
|
-
if (!multiSpace) return [emptyLine];
|
|
49
|
-
return [style.spaceHeading(`${spaceId}:`), ` ${emptyLine}`];
|
|
50
|
-
}
|
|
51
|
-
const kindByMigrationHash = classifyMigrationListGraphTopology(migrations).kindByMigrationHash;
|
|
52
|
-
const dirNameWidth = computeMigrationDirNameWidth(migrations);
|
|
53
|
-
const rows = migrations.map((entry) => formatMigrationRow(entry, dirNameWidth, resolveEdgeKind(entry.migrationHash, kindByMigrationHash), style));
|
|
54
|
-
if (!multiSpace) return rows;
|
|
55
|
-
return [style.spaceHeading(`${spaceId}:`), ...rows.map((row) => ` ${row}`)];
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Compose the styled `migration list` output. The renderer is
|
|
59
|
-
* presentation-neutral — every token passes through `style` before
|
|
60
|
-
* landing in the output, so the same composition serves the pure-text
|
|
61
|
-
* path ({@link renderMigrationList} via
|
|
62
|
-
* {@link IDENTITY_MIGRATION_LIST_STYLER}) and the ANSI-styled CLI path
|
|
63
|
-
* (via the ANSI styler the CLI shell wires up).
|
|
64
|
-
*/
|
|
65
|
-
function renderMigrationListWithStyle(result, style) {
|
|
66
|
-
const multiSpace = result.spaces.length > 1;
|
|
67
|
-
const lines = [];
|
|
68
|
-
for (let index = 0; index < result.spaces.length; index++) {
|
|
69
|
-
const space = result.spaces[index];
|
|
70
|
-
if (index > 0) lines.push("");
|
|
71
|
-
lines.push(...renderSpaceBlock(space.spaceId, space.migrations, multiSpace, style));
|
|
72
|
-
}
|
|
73
|
-
if (result.spaces.reduce((count, space) => count + space.migrations.length, 0) > 0) {
|
|
74
|
-
lines.push("");
|
|
75
|
-
lines.push(style.summary(result.summary));
|
|
76
|
-
}
|
|
77
|
-
return lines.join("\n");
|
|
78
|
-
}
|
|
79
|
-
//#endregion
|
|
80
|
-
//#region src/utils/formatters/migration-list-styler.ts
|
|
81
|
-
/**
|
|
82
|
-
* The reserved ref name for the live-database marker. Treated as a
|
|
83
|
-
* structurally distinct token from user-named refs so the styler can
|
|
84
|
-
* make it visually pop in `(refs)` decorations.
|
|
85
|
-
*/
|
|
86
|
-
const DB_REF_NAME = "db";
|
|
87
|
-
function styleRefName(name) {
|
|
88
|
-
return name === DB_REF_NAME ? bold(greenBright(name)) : green(name);
|
|
89
|
-
}
|
|
90
|
-
/**
|
|
91
|
-
* Build a {@link MigrationListStyler} that decorates `migration list`
|
|
92
|
-
* tokens with ANSI SGR codes. When `useColor` is `false` (non-TTY,
|
|
93
|
-
* `--no-color`, `NO_COLOR=1`, piped output) the function returns the
|
|
94
|
-
* shared identity styler so callers get plain text with zero ANSI
|
|
95
|
-
* bytes — pipe-friendly by construction.
|
|
96
|
-
*
|
|
97
|
-
* Palette:
|
|
98
|
-
*
|
|
99
|
-
* - `dirName`: bold
|
|
100
|
-
* - `sourceHash`: dim cyan
|
|
101
|
-
* - `destHash`: bright cyan
|
|
102
|
-
* - `glyph` (`→` / `⟲` / `∅`): dim
|
|
103
|
-
* - `lane` (graph gutter lines `│` and fan/join connectors `├─┐` / `├─┘`): dim
|
|
104
|
-
* - `invariants` (`{...}`): yellow
|
|
105
|
-
* - `refs` (`(...)`): green; the live-DB `db` marker inside is green-bold
|
|
106
|
-
* - `spaceHeading` (`<spaceId>:`): bold
|
|
107
|
-
* - `summary`: dim
|
|
108
|
-
* - `emptyState`: dim
|
|
109
|
-
*/
|
|
110
|
-
function createAnsiMigrationListStyler(opts) {
|
|
111
|
-
if (!opts.useColor) return IDENTITY_MIGRATION_LIST_STYLER;
|
|
112
|
-
return {
|
|
113
|
-
kind: (text) => dim(text),
|
|
114
|
-
dirName: (text) => bold(text),
|
|
115
|
-
sourceHash: (text) => dim(cyan(text)),
|
|
116
|
-
destHash: (text) => cyanBright(text),
|
|
117
|
-
glyph: (text) => dim(text),
|
|
118
|
-
lane: (text) => dim(text),
|
|
119
|
-
invariants: (ids) => yellow(`{${ids.join(", ")}}`),
|
|
120
|
-
refs: (names) => {
|
|
121
|
-
const open = green("(");
|
|
122
|
-
const close = green(")");
|
|
123
|
-
const separator = green(", ");
|
|
124
|
-
return open + names.map(styleRefName).join(separator) + close;
|
|
125
|
-
},
|
|
126
|
-
spaceHeading: (text) => bold(text),
|
|
127
|
-
summary: (text) => dim(text),
|
|
128
|
-
emptyState: (text) => dim(text)
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
//#endregion
|
|
132
|
-
//#region src/commands/migration-list.ts
|
|
133
|
-
function renderMigrationListHumanOutput(result, options) {
|
|
134
|
-
const styler = createAnsiMigrationListStyler({ useColor: options.useColor });
|
|
135
|
-
if (options.graph) return renderMigrationListGraphResult(result, styler, options.glyphMode);
|
|
136
|
-
return renderMigrationListWithStyle(result, styler);
|
|
137
|
-
}
|
|
138
|
-
function computeSummary(spaces) {
|
|
139
|
-
const totalMigrations = spaces.reduce((count, space) => count + space.migrations.length, 0);
|
|
140
|
-
if (spaces.length <= 1) return `${totalMigrations} migration(s) on disk`;
|
|
141
|
-
return `${totalMigrations} migration(s) across ${spaces.length} contract space(s)`;
|
|
142
|
-
}
|
|
143
|
-
/**
|
|
144
|
-
* The unit-testable core of `migration list`. Given an absolute
|
|
145
|
-
* `migrationsDir` and an optional `spaceFilter`, enumerates every
|
|
146
|
-
* on-disk migration (via {@link enumerateMigrationSpaces}), narrows to
|
|
147
|
-
* the requested space if any, and assembles a {@link MigrationListResult}
|
|
148
|
-
* ready for the renderer or JSON serializer.
|
|
149
|
-
*
|
|
150
|
-
* The enumerator is the single source of truth for "what is a contract
|
|
151
|
-
* space": existence, the `--space` candidate-suggestion list, and
|
|
152
|
-
* scoping are all derived from one {@link enumerateMigrationSpaces}
|
|
153
|
-
* traversal. This means the reserved-name exclusion the enumerator
|
|
154
|
-
* applies (e.g. the per-space `refs/` subdirectory) is honoured here for
|
|
155
|
-
* free — a `--space refs` request resolves to `SPACE_NOT_FOUND`, not a
|
|
156
|
-
* synthesized empty-state.
|
|
157
|
-
*
|
|
158
|
-
* Distinct empty-state paths:
|
|
159
|
-
*
|
|
160
|
-
* - `migrations/` missing or contains no valid space directories →
|
|
161
|
-
* synthesizes `[{ spaceId: APP_SPACE_ID, migrations: [] }]` so the
|
|
162
|
-
* renderer's empty-state path can name a directory (spec § Empty-state +
|
|
163
|
-
* the `migrations/` missing edge case).
|
|
164
|
-
* - `--space <id>` on an existing-but-empty space dir → the enumerator
|
|
165
|
-
* surfaces `{ spaceId, migrations: [] }`; `<id>` is in the set, so it
|
|
166
|
-
* scopes to that entry and renders the empty-state the same way.
|
|
167
|
-
* - `--space <id>` on a non-existent (or reserved) space → structured
|
|
168
|
-
* `MIGRATION.SPACE_NOT_FOUND` error (NOT empty-state).
|
|
169
|
-
*
|
|
170
|
-
* Errors caught here:
|
|
171
|
-
*
|
|
172
|
-
* - {@link MigrationToolsError} from the enumerator → mapped through
|
|
173
|
-
* {@link mapMigrationToolsError} so callers see the catalogue code.
|
|
174
|
-
* - Anything else (filesystem etc.) → wrapped via {@link errorUnexpected}.
|
|
175
|
-
*/
|
|
176
|
-
async function runMigrationList(inputs) {
|
|
177
|
-
const { migrationsDir, spaceFilter } = inputs;
|
|
178
|
-
if (spaceFilter !== void 0 && !isValidSpaceId(spaceFilter)) return notOk(errorInvalidSpaceId(spaceFilter));
|
|
179
|
-
let spaces;
|
|
180
|
-
try {
|
|
181
|
-
spaces = await enumerateMigrationSpaces({ projectMigrationsDir: migrationsDir });
|
|
182
|
-
} catch (error) {
|
|
183
|
-
if (MigrationToolsError.is(error)) return notOk(mapMigrationToolsError(error));
|
|
184
|
-
return notOk(errorUnexpected(error instanceof Error ? error.message : String(error), { why: `Failed to enumerate migrations: ${error instanceof Error ? error.message : String(error)}` }));
|
|
185
|
-
}
|
|
186
|
-
if (spaceFilter !== void 0 && !spaces.some((s) => s.spaceId === spaceFilter)) return notOk(errorSpaceNotFound(spaceFilter, spaces.map((s) => s.spaceId).sort()));
|
|
187
|
-
const scopedSpaces = spaceFilter !== void 0 ? spaces.filter((s) => s.spaceId === spaceFilter) : spaces;
|
|
188
|
-
const resultSpaces = scopedSpaces.length === 0 ? [{
|
|
189
|
-
spaceId: APP_SPACE_ID,
|
|
190
|
-
migrations: []
|
|
191
|
-
}] : scopedSpaces;
|
|
192
|
-
return ok({
|
|
193
|
-
ok: true,
|
|
194
|
-
spaces: resultSpaces,
|
|
195
|
-
summary: computeSummary(resultSpaces)
|
|
196
|
-
});
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* CLI shell: loads config, resolves paths, prints the styled header on
|
|
200
|
-
* stderr (interactive mode only), and delegates to {@link runMigrationList}.
|
|
201
|
-
* Kept intentionally thin so the unit-testable surface lives in the core.
|
|
202
|
-
*/
|
|
203
|
-
async function executeMigrationListCommand(options, flags, ui) {
|
|
204
|
-
const config = await loadConfig(options.config);
|
|
205
|
-
const { configPath, migrationsDir, migrationsRelative } = resolveMigrationPaths(options.config, config);
|
|
206
|
-
if (!flags.json && !flags.quiet) {
|
|
207
|
-
const header = formatStyledHeader({
|
|
208
|
-
command: "migration list",
|
|
209
|
-
description: "List on-disk migrations, latest first, per contract space",
|
|
210
|
-
details: [
|
|
211
|
-
{
|
|
212
|
-
label: "config",
|
|
213
|
-
value: configPath
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
label: "migrations",
|
|
217
|
-
value: migrationsRelative
|
|
218
|
-
},
|
|
219
|
-
...options.space !== void 0 ? [{
|
|
220
|
-
label: "space",
|
|
221
|
-
value: options.space
|
|
222
|
-
}] : []
|
|
223
|
-
],
|
|
224
|
-
flags
|
|
225
|
-
});
|
|
226
|
-
ui.stderr(header);
|
|
227
|
-
}
|
|
228
|
-
return runMigrationList({
|
|
229
|
-
migrationsDir,
|
|
230
|
-
...ifDefined("spaceFilter", options.space)
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
function createMigrationListCommand() {
|
|
234
|
-
const command = new Command("list");
|
|
235
|
-
setCommandDescriptions(command, "List on-disk migrations, latest first, per contract space", "Enumerates every on-disk migration under migrations/<space>/ for every\ncontract space found on disk, latest first. Offline — does not consult\nthe database. Each row leads with a kind glyph (* forward, ↩ rollback,\n⟲ self), then dirName, then source → destination contract hashes\n(7-char git-style). Self-edges show a single hash. Invariants render as\n{...}; refs on the destination as (production, db). Pass --space <id>\nto narrow to one contract space. --graph draws the forward spine with\nlane gutters; --ascii forces ASCII glyphs (orthogonal to --no-color).");
|
|
236
|
-
setCommandExamples(command, [
|
|
237
|
-
"prisma-next migration list",
|
|
238
|
-
"prisma-next migration list --graph",
|
|
239
|
-
"prisma-next migration list --space app",
|
|
240
|
-
"prisma-next migration list --graph --ascii",
|
|
241
|
-
"prisma-next migration list --json"
|
|
242
|
-
]);
|
|
243
|
-
setCommandSeeAlso(command, [
|
|
244
|
-
{
|
|
245
|
-
verb: "migration status",
|
|
246
|
-
oneLiner: "Show migration path and pending status"
|
|
247
|
-
},
|
|
248
|
-
{
|
|
249
|
-
verb: "migration log",
|
|
250
|
-
oneLiner: "Show executed migration history"
|
|
251
|
-
},
|
|
252
|
-
{
|
|
253
|
-
verb: "migration graph",
|
|
254
|
-
oneLiner: "Show the migration graph topology"
|
|
255
|
-
},
|
|
256
|
-
{
|
|
257
|
-
verb: "migration show",
|
|
258
|
-
oneLiner: "Display migration package contents"
|
|
259
|
-
}
|
|
260
|
-
]);
|
|
261
|
-
addGlobalOptions(command).option("--config <path>", "Path to prisma-next.config.ts").option("--space <id>", "Narrow output to a single contract space").option("--graph", "Draw migration relationships as an annotated tree").option("--ascii", "Use ASCII glyphs for --graph (pipe-friendly)").action(async (options) => {
|
|
262
|
-
const flags = parseGlobalFlagsOrExit(options);
|
|
263
|
-
const ui = createTerminalUI(flags);
|
|
264
|
-
const exitCode = handleResult(await executeMigrationListCommand(options, flags, ui), flags, ui, (listResult) => {
|
|
265
|
-
if (flags.json) ui.output(JSON.stringify(listResult, null, 2));
|
|
266
|
-
else if (!flags.quiet) ui.output(renderMigrationListHumanOutput(listResult, {
|
|
267
|
-
graph: options.graph === true,
|
|
268
|
-
glyphMode: ui.resolveGlyphMode(options.ascii === true),
|
|
269
|
-
useColor: ui.useColor
|
|
270
|
-
}));
|
|
271
|
-
});
|
|
272
|
-
process.exit(exitCode);
|
|
273
|
-
});
|
|
274
|
-
return command;
|
|
275
|
-
}
|
|
276
|
-
//#endregion
|
|
277
|
-
export { renderMigrationListHumanOutput as n, runMigrationList as r, createMigrationListCommand as t };
|
|
278
|
-
|
|
279
|
-
//# sourceMappingURL=migration-list-C2xnaYsT.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migration-list-C2xnaYsT.mjs","names":[],"sources":["../src/utils/formatters/migration-list-render.ts","../src/utils/formatters/migration-list-styler.ts","../src/commands/migration-list.ts"],"sourcesContent":["import {\n classifyMigrationListGraphTopology,\n type EdgeKind,\n} from '@prisma-next/migration-tools/migration-list-graph-topology';\nimport type {\n MigrationListEntry,\n MigrationListResult,\n} from '@prisma-next/migration-tools/migration-list-types';\nimport {\n computeMigrationDirNameWidth,\n formatMigrationDataColumn,\n MIGRATION_LIST_FORWARD_EDGE_GLYPH,\n} from './migration-list-data-column';\n\nexport type { EdgeKind } from '@prisma-next/migration-tools/migration-list-graph-topology';\n\nexport type {\n MigrationListEntry,\n MigrationListResult,\n MigrationSpaceListEntry,\n} from '@prisma-next/migration-tools/migration-list-types';\n\nconst KIND_GLYPH: Record<EdgeKind, string> = {\n forward: '*',\n rollback: '↩',\n self: '⟲',\n};\n\n/**\n * Semantic styler for `migration list` output tokens. Token-typed so\n * the renderer composes presentation-neutral fragments and the styler\n * decides how each token kind is decorated (ANSI codes, plain text,\n * etc.). The renderer pads with raw spaces *outside* styled tokens so\n * visible column widths stay stable regardless of what the styler\n * emits — adding ANSI escape sequences never disturbs alignment.\n *\n * `invariants` and `refs` receive the underlying string arrays rather\n * than a pre-joined string so per-element styling (e.g. distinguishing\n * the live-DB `db` marker from user-named refs) is possible without\n * having to re-parse a joined block.\n */\nexport interface MigrationListStyler {\n kind(text: string): string;\n dirName(text: string): string;\n sourceHash(text: string): string;\n destHash(text: string): string;\n glyph(text: string): string;\n lane(text: string): string;\n invariants(ids: readonly string[]): string;\n refs(names: readonly string[]): string;\n spaceHeading(text: string): string;\n summary(text: string): string;\n emptyState(text: string): string;\n}\n\nexport const IDENTITY_MIGRATION_LIST_STYLER: MigrationListStyler = {\n kind: (text) => text,\n dirName: (text) => text,\n sourceHash: (text) => text,\n destHash: (text) => text,\n glyph: (text) => text,\n lane: (text) => text,\n invariants: (ids) => `{${ids.join(', ')}}`,\n refs: (names) => `(${names.join(', ')})`,\n spaceHeading: (text) => text,\n summary: (text) => text,\n emptyState: (text) => text,\n};\n\nfunction resolveEdgeKind(\n migrationHash: string,\n kindByMigrationHash: ReadonlyMap<string, EdgeKind>,\n): EdgeKind {\n return kindByMigrationHash.get(migrationHash) ?? 'forward';\n}\n\nfunction formatMigrationRow(\n migration: MigrationListEntry,\n dirNameWidth: number,\n edgeKind: EdgeKind,\n style: MigrationListStyler,\n): string {\n const kindColumn = `${style.kind(KIND_GLYPH[edgeKind])} `;\n const data = formatMigrationDataColumn(migration, {\n dirNameWidth,\n edgeKind,\n style,\n forwardArrow: MIGRATION_LIST_FORWARD_EDGE_GLYPH,\n });\n return `${kindColumn}${data}`;\n}\n\nfunction formatEmptyStateLine(spaceId: string, style: MigrationListStyler): string {\n return style.emptyState(`There are no migrations in migrations/${spaceId}/ yet`);\n}\n\nfunction renderSpaceBlock(\n spaceId: string,\n migrations: readonly MigrationListEntry[],\n multiSpace: boolean,\n style: MigrationListStyler,\n): readonly string[] {\n if (migrations.length === 0) {\n const emptyLine = formatEmptyStateLine(spaceId, style);\n if (!multiSpace) {\n return [emptyLine];\n }\n return [style.spaceHeading(`${spaceId}:`), ` ${emptyLine}`];\n }\n\n const kindByMigrationHash = classifyMigrationListGraphTopology(migrations).kindByMigrationHash;\n const dirNameWidth = computeMigrationDirNameWidth(migrations);\n const rows = migrations.map((entry) =>\n formatMigrationRow(\n entry,\n dirNameWidth,\n resolveEdgeKind(entry.migrationHash, kindByMigrationHash),\n style,\n ),\n );\n if (!multiSpace) {\n return rows;\n }\n return [style.spaceHeading(`${spaceId}:`), ...rows.map((row) => ` ${row}`)];\n}\n\n/**\n * Compose the styled `migration list` output. The renderer is\n * presentation-neutral — every token passes through `style` before\n * landing in the output, so the same composition serves the pure-text\n * path ({@link renderMigrationList} via\n * {@link IDENTITY_MIGRATION_LIST_STYLER}) and the ANSI-styled CLI path\n * (via the ANSI styler the CLI shell wires up).\n */\nexport function renderMigrationListWithStyle(\n result: MigrationListResult,\n style: MigrationListStyler,\n): string {\n const multiSpace = result.spaces.length > 1;\n const lines: string[] = [];\n\n for (let index = 0; index < result.spaces.length; index++) {\n const space = result.spaces[index]!;\n if (index > 0) {\n lines.push('');\n }\n lines.push(...renderSpaceBlock(space.spaceId, space.migrations, multiSpace, style));\n }\n\n const totalMigrations = result.spaces.reduce(\n (count, space) => count + space.migrations.length,\n 0,\n );\n if (totalMigrations > 0) {\n lines.push('');\n lines.push(style.summary(result.summary));\n }\n\n return lines.join('\\n');\n}\n\nexport function renderMigrationList(result: MigrationListResult): string {\n return renderMigrationListWithStyle(result, IDENTITY_MIGRATION_LIST_STYLER);\n}\n","import { bold, cyan, cyanBright, dim, green, greenBright, yellow } from 'colorette';\nimport { IDENTITY_MIGRATION_LIST_STYLER, type MigrationListStyler } from './migration-list-render';\n\n/**\n * The reserved ref name for the live-database marker. Treated as a\n * structurally distinct token from user-named refs so the styler can\n * make it visually pop in `(refs)` decorations.\n */\nconst DB_REF_NAME = 'db';\n\nfunction styleRefName(name: string): string {\n return name === DB_REF_NAME ? bold(greenBright(name)) : green(name);\n}\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 * - `glyph` (`→` / `⟲` / `∅`): dim\n * - `lane` (graph gutter lines `│` and fan/join connectors `├─┐` / `├─┘`): dim\n * - `invariants` (`{...}`): yellow\n * - `refs` (`(...)`): green; the live-DB `db` marker inside is green-bold\n * - `spaceHeading` (`<spaceId>:`): bold\n * - `summary`: dim\n * - `emptyState`: dim\n */\nexport function createAnsiMigrationListStyler(opts: {\n readonly useColor: boolean;\n}): MigrationListStyler {\n if (!opts.useColor) {\n return IDENTITY_MIGRATION_LIST_STYLER;\n }\n return {\n kind: (text) => dim(text),\n dirName: (text) => bold(text),\n sourceHash: (text) => dim(cyan(text)),\n destHash: (text) => cyanBright(text),\n glyph: (text) => dim(text),\n lane: (text) => dim(text),\n invariants: (ids) => yellow(`{${ids.join(', ')}}`),\n refs: (names) => {\n const open = green('(');\n const close = green(')');\n const separator = green(', ');\n return open + names.map(styleRefName).join(separator) + close;\n },\n spaceHeading: (text) => bold(text),\n summary: (text) => dim(text),\n emptyState: (text) => dim(text),\n };\n}\n","import { enumerateMigrationSpaces } from '@prisma-next/migration-tools/enumerate-migration-spaces';\nimport { MigrationToolsError } from '@prisma-next/migration-tools/errors';\nimport type {\n MigrationListResult,\n MigrationSpaceListEntry,\n} from '@prisma-next/migration-tools/migration-list-types';\nimport { APP_SPACE_ID, isValidSpaceId } from '@prisma-next/migration-tools/spaces';\nimport { ifDefined } from '@prisma-next/utils/defined';\nimport { notOk, ok, type Result } from '@prisma-next/utils/result';\nimport { Command } from 'commander';\nimport { loadConfig } from '../config-loader';\nimport {\n type CliStructuredError,\n errorInvalidSpaceId,\n errorSpaceNotFound,\n errorUnexpected,\n mapMigrationToolsError,\n} from '../utils/cli-errors';\nimport {\n addGlobalOptions,\n resolveMigrationPaths,\n setCommandDescriptions,\n setCommandExamples,\n setCommandSeeAlso,\n} from '../utils/command-helpers';\nimport {\n type GlyphMode,\n renderMigrationListGraphResult,\n} from '../utils/formatters/migration-list-graph-render';\nimport { renderMigrationListWithStyle } from '../utils/formatters/migration-list-render';\nimport { createAnsiMigrationListStyler } from '../utils/formatters/migration-list-styler';\nimport { formatStyledHeader } from '../utils/formatters/styled';\nimport type { CommonCommandOptions } from '../utils/global-flags';\nimport { type GlobalFlags, parseGlobalFlagsOrExit } from '../utils/global-flags';\nimport { handleResult } from '../utils/result-handler';\nimport { createTerminalUI, type TerminalUI } from '../utils/terminal-ui';\n\ninterface MigrationListOptions extends CommonCommandOptions {\n readonly config?: string;\n readonly space?: string;\n readonly graph?: boolean;\n readonly ascii?: boolean;\n}\n\nexport interface MigrationListHumanRenderOptions {\n readonly graph: boolean;\n readonly glyphMode: GlyphMode;\n readonly useColor: boolean;\n}\n\nexport function renderMigrationListHumanOutput(\n result: MigrationListResult,\n options: MigrationListHumanRenderOptions,\n): string {\n const styler = createAnsiMigrationListStyler({ useColor: options.useColor });\n if (options.graph) {\n return renderMigrationListGraphResult(result, styler, options.glyphMode);\n }\n return renderMigrationListWithStyle(result, styler);\n}\n\n/**\n * Inputs for {@link runMigrationList} — the pure-ish data-and-policy core\n * of `migration list` that tests exercise directly.\n *\n * The core depends only on the filesystem rooted at `migrationsDir`. It\n * does NOT call `loadConfig`, parse CLI flags, render a styled header,\n * or write to any stream. Output rendering is the caller's concern (the\n * CLI shell renders via {@link renderMigrationList}; JSON callers\n * serialize the {@link MigrationListResult} directly).\n */\nexport interface RunMigrationListInputs {\n /** Absolute path to the project's `migrations/` directory. */\n readonly migrationsDir: string;\n /**\n * Optional contract-space id to narrow the result to a single space.\n * Same validation rules as {@link isValidSpaceId}. When absent, every\n * on-disk space contributes.\n */\n readonly spaceFilter?: string;\n}\n\nfunction computeSummary(spaces: readonly MigrationSpaceListEntry[]): string {\n const totalMigrations = spaces.reduce((count, space) => count + space.migrations.length, 0);\n if (spaces.length <= 1) {\n return `${totalMigrations} migration(s) on disk`;\n }\n return `${totalMigrations} migration(s) across ${spaces.length} contract space(s)`;\n}\n\n/**\n * The unit-testable core of `migration list`. Given an absolute\n * `migrationsDir` and an optional `spaceFilter`, enumerates every\n * on-disk migration (via {@link enumerateMigrationSpaces}), narrows to\n * the requested space if any, and assembles a {@link MigrationListResult}\n * ready for the renderer or JSON serializer.\n *\n * The enumerator is the single source of truth for \"what is a contract\n * space\": existence, the `--space` candidate-suggestion list, and\n * scoping are all derived from one {@link enumerateMigrationSpaces}\n * traversal. This means the reserved-name exclusion the enumerator\n * applies (e.g. the per-space `refs/` subdirectory) is honoured here for\n * free — a `--space refs` request resolves to `SPACE_NOT_FOUND`, not a\n * synthesized empty-state.\n *\n * Distinct empty-state paths:\n *\n * - `migrations/` missing or contains no valid space directories →\n * synthesizes `[{ spaceId: APP_SPACE_ID, migrations: [] }]` so the\n * renderer's empty-state path can name a directory (spec § Empty-state +\n * the `migrations/` missing edge case).\n * - `--space <id>` on an existing-but-empty space dir → the enumerator\n * surfaces `{ spaceId, migrations: [] }`; `<id>` is in the set, so it\n * scopes to that entry and renders the empty-state the same way.\n * - `--space <id>` on a non-existent (or reserved) space → structured\n * `MIGRATION.SPACE_NOT_FOUND` error (NOT empty-state).\n *\n * Errors caught here:\n *\n * - {@link MigrationToolsError} from the enumerator → mapped through\n * {@link mapMigrationToolsError} so callers see the catalogue code.\n * - Anything else (filesystem etc.) → wrapped via {@link errorUnexpected}.\n */\nexport async function runMigrationList(\n inputs: RunMigrationListInputs,\n): Promise<Result<MigrationListResult, CliStructuredError>> {\n const { migrationsDir, spaceFilter } = inputs;\n\n if (spaceFilter !== undefined && !isValidSpaceId(spaceFilter)) {\n return notOk(errorInvalidSpaceId(spaceFilter));\n }\n\n let spaces: readonly MigrationSpaceListEntry[];\n try {\n spaces = await enumerateMigrationSpaces({ projectMigrationsDir: migrationsDir });\n } catch (error) {\n if (MigrationToolsError.is(error)) return notOk(mapMigrationToolsError(error));\n return notOk(\n errorUnexpected(error instanceof Error ? error.message : String(error), {\n why: `Failed to enumerate migrations: ${error instanceof Error ? error.message : String(error)}`,\n }),\n );\n }\n\n if (spaceFilter !== undefined && !spaces.some((s) => s.spaceId === spaceFilter)) {\n return notOk(errorSpaceNotFound(spaceFilter, spaces.map((s) => s.spaceId).sort()));\n }\n\n const scopedSpaces =\n spaceFilter !== undefined ? spaces.filter((s) => s.spaceId === spaceFilter) : spaces;\n\n const resultSpaces: readonly MigrationSpaceListEntry[] =\n scopedSpaces.length === 0 ? [{ spaceId: APP_SPACE_ID, migrations: [] }] : scopedSpaces;\n\n return ok({\n ok: true,\n spaces: resultSpaces,\n summary: computeSummary(resultSpaces),\n });\n}\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(\n options: MigrationListOptions,\n flags: GlobalFlags,\n ui: TerminalUI,\n): Promise<Result<MigrationListResult, CliStructuredError>> {\n const config = await loadConfig(options.config);\n const { configPath, migrationsDir, migrationsRelative } = resolveMigrationPaths(\n options.config,\n config,\n );\n\n if (!flags.json && !flags.quiet) {\n const header = formatStyledHeader({\n command: 'migration list',\n description: 'List on-disk migrations, latest first, per contract space',\n details: [\n { label: 'config', value: configPath },\n { label: 'migrations', value: migrationsRelative },\n ...(options.space !== undefined ? [{ label: 'space', value: options.space }] : []),\n ],\n flags,\n });\n ui.stderr(header);\n }\n\n return runMigrationList({\n migrationsDir,\n ...ifDefined('spaceFilter', options.space),\n });\n}\n\nexport function createMigrationListCommand(): Command {\n const command = new Command('list');\n setCommandDescriptions(\n command,\n 'List on-disk migrations, latest first, per contract space',\n 'Enumerates every on-disk migration under migrations/<space>/ for every\\n' +\n 'contract space found on disk, latest first. Offline — does not consult\\n' +\n 'the database. Each row leads with a kind glyph (* forward, ↩ rollback,\\n' +\n '⟲ self), then dirName, then source → destination contract hashes\\n' +\n '(7-char git-style). Self-edges show a single hash. Invariants render as\\n' +\n '{...}; refs on the destination as (production, db). Pass --space <id>\\n' +\n 'to narrow to one contract space. --graph draws the forward spine with\\n' +\n 'lane gutters; --ascii forces ASCII glyphs (orthogonal to --no-color).',\n );\n setCommandExamples(command, [\n 'prisma-next migration list',\n 'prisma-next migration list --graph',\n 'prisma-next migration list --space app',\n 'prisma-next migration list --graph --ascii',\n 'prisma-next migration list --json',\n ]);\n setCommandSeeAlso(command, [\n { verb: 'migration status', oneLiner: 'Show migration path and pending status' },\n { verb: 'migration log', oneLiner: 'Show executed migration history' },\n { verb: 'migration graph', oneLiner: 'Show the migration graph topology' },\n { verb: 'migration show', oneLiner: 'Display migration package contents' },\n ]);\n addGlobalOptions(command)\n .option('--config <path>', 'Path to prisma-next.config.ts')\n .option('--space <id>', 'Narrow output to a single contract space')\n .option('--graph', 'Draw migration relationships as an annotated tree')\n .option('--ascii', 'Use ASCII glyphs for --graph (pipe-friendly)')\n .action(async (options: MigrationListOptions) => {\n const flags = parseGlobalFlagsOrExit(options);\n const ui = createTerminalUI(flags);\n const result = await executeMigrationListCommand(options, flags, ui);\n const exitCode = handleResult(result, flags, ui, (listResult) => {\n if (flags.json) {\n ui.output(JSON.stringify(listResult, null, 2));\n } else if (!flags.quiet) {\n ui.output(\n renderMigrationListHumanOutput(listResult, {\n graph: options.graph === true,\n glyphMode: ui.resolveGlyphMode(options.ascii === true),\n useColor: ui.useColor,\n }),\n );\n }\n });\n process.exit(exitCode);\n });\n return command;\n}\n"],"mappings":";;;;;;;;;;;;AAsBA,MAAM,aAAuC;CAC3C,SAAS;CACT,UAAU;CACV,MAAM;AACR;AA6BA,MAAa,iCAAsD;CACjE,OAAO,SAAS;CAChB,UAAU,SAAS;CACnB,aAAa,SAAS;CACtB,WAAW,SAAS;CACpB,QAAQ,SAAS;CACjB,OAAO,SAAS;CAChB,aAAa,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE;CACxC,OAAO,UAAU,IAAI,MAAM,KAAK,IAAI,EAAE;CACtC,eAAe,SAAS;CACxB,UAAU,SAAS;CACnB,aAAa,SAAS;AACxB;AAEA,SAAS,gBACP,eACA,qBACU;CACV,OAAO,oBAAoB,IAAI,aAAa,KAAK;AACnD;AAEA,SAAS,mBACP,WACA,cACA,UACA,OACQ;CAQR,OAAO,GAAG,GAPY,MAAM,KAAK,WAAW,SAAS,EAAE,KAC1C,0BAA0B,WAAW;EAChD;EACA;EACA;EACA,cAAA;CACF,CAC0B;AAC5B;AAEA,SAAS,qBAAqB,SAAiB,OAAoC;CACjF,OAAO,MAAM,WAAW,yCAAyC,QAAQ,MAAM;AACjF;AAEA,SAAS,iBACP,SACA,YACA,YACA,OACmB;CACnB,IAAI,WAAW,WAAW,GAAG;EAC3B,MAAM,YAAY,qBAAqB,SAAS,KAAK;EACrD,IAAI,CAAC,YACH,OAAO,CAAC,SAAS;EAEnB,OAAO,CAAC,MAAM,aAAa,GAAG,QAAQ,EAAE,GAAG,KAAK,WAAW;CAC7D;CAEA,MAAM,sBAAsB,mCAAmC,UAAU,EAAE;CAC3E,MAAM,eAAe,6BAA6B,UAAU;CAC5D,MAAM,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;GAAE,MAAM;GAAkB,UAAU;EAAqC;CAC3E,CAAC;CACD,iBAAiB,OAAO,EACrB,OAAO,mBAAmB,+BAA+B,EACzD,OAAO,gBAAgB,0CAA0C,EACjE,OAAO,WAAW,mDAAmD,EACrE,OAAO,WAAW,8CAA8C,EAChE,OAAO,OAAO,YAAkC;EAC/C,MAAM,QAAQ,uBAAuB,OAAO;EAC5C,MAAM,KAAK,iBAAiB,KAAK;EAEjC,MAAM,WAAW,aAAa,MADT,4BAA4B,SAAS,OAAO,EAAE,GAC7B,OAAO,KAAK,eAAe;GAC/D,IAAI,MAAM,MACR,GAAG,OAAO,KAAK,UAAU,YAAY,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,MAAM,OAChB,GAAG,OACD,+BAA+B,YAAY;IACzC,OAAO,QAAQ,UAAU;IACzB,WAAW,GAAG,iBAAiB,QAAQ,UAAU,IAAI;IACrD,UAAU,GAAG;GACf,CAAC,CACH;EAEJ,CAAC;EACD,QAAQ,KAAK,QAAQ;CACvB,CAAC;CACH,OAAO;AACT"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MigrationListResult } from "@prisma-next/migration-tools/migration-list-types";
|
|
2
|
-
|
|
3
|
-
//#region src/utils/formatters/migration-list-graph-render.d.ts
|
|
4
|
-
type GlyphMode = 'unicode' | 'ascii';
|
|
5
|
-
//#endregion
|
|
6
|
-
export { GlyphMode as t };
|
|
7
|
-
//# sourceMappingURL=migration-list-graph-render-DKw1AT-e.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"migration-list-graph-render-DKw1AT-e.d.mts","names":[],"sources":["../src/utils/formatters/migration-list-graph-render.ts"],"mappings":";;;KAuBY,SAAA"}
|