prisma-next 0.11.0-dev.70 → 0.11.0-dev.71

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.
Files changed (81) hide show
  1. package/dist/cli.mjs +10 -10
  2. package/dist/{client-6WehTnUh.mjs → client-KgJorIvG.mjs} +4 -4
  3. package/dist/{client-6WehTnUh.mjs.map → client-KgJorIvG.mjs.map} +1 -1
  4. package/dist/{command-helpers-CoceqqMl.mjs → command-helpers-Bbw1GbwL.mjs} +3 -3
  5. package/dist/{command-helpers-CoceqqMl.mjs.map → command-helpers-Bbw1GbwL.mjs.map} +1 -1
  6. package/dist/commands/contract-emit.mjs +1 -1
  7. package/dist/commands/contract-infer.mjs +1 -1
  8. package/dist/commands/db-init.mjs +4 -4
  9. package/dist/commands/db-schema.mjs +3 -3
  10. package/dist/commands/db-sign.mjs +4 -4
  11. package/dist/commands/db-update.mjs +5 -5
  12. package/dist/commands/db-verify.mjs +1 -1
  13. package/dist/commands/migrate.d.mts +1 -1
  14. package/dist/commands/migrate.mjs +5 -5
  15. package/dist/commands/migration-check.mjs +1 -1
  16. package/dist/commands/migration-graph.d.mts +4 -4
  17. package/dist/commands/migration-graph.mjs +1 -1
  18. package/dist/commands/migration-list.d.mts +3 -6
  19. package/dist/commands/migration-list.d.mts.map +1 -1
  20. package/dist/commands/migration-list.mjs +189 -1
  21. package/dist/commands/migration-list.mjs.map +1 -0
  22. package/dist/commands/migration-log.d.mts +3 -3
  23. package/dist/commands/migration-log.mjs +3 -3
  24. package/dist/commands/migration-new.mjs +3 -3
  25. package/dist/commands/migration-plan.d.mts +1 -1
  26. package/dist/commands/migration-plan.mjs +1 -1
  27. package/dist/commands/migration-show.d.mts +1 -1
  28. package/dist/commands/migration-show.mjs +3 -3
  29. package/dist/commands/migration-status.d.mts +1 -1
  30. package/dist/commands/migration-status.mjs +3 -3
  31. package/dist/commands/ref.d.mts +1 -1
  32. package/dist/commands/ref.mjs +2 -2
  33. package/dist/{contract-at-errors-Bhf2jnkp.mjs → contract-at-errors-BxP-TOMl.mjs} +2 -2
  34. package/dist/{contract-at-errors-Bhf2jnkp.mjs.map → contract-at-errors-BxP-TOMl.mjs.map} +1 -1
  35. package/dist/{contract-emit-DxEfEc-M.mjs → contract-emit-D-4jrNve.mjs} +3 -3
  36. package/dist/{contract-emit-DxEfEc-M.mjs.map → contract-emit-D-4jrNve.mjs.map} +1 -1
  37. package/dist/{contract-emit-C47r1loe.mjs → contract-emit-DxcGl4Uq.mjs} +3 -3
  38. package/dist/{contract-emit-C47r1loe.mjs.map → contract-emit-DxcGl4Uq.mjs.map} +1 -1
  39. package/dist/{contract-infer-BLiomU8g.mjs → contract-infer-D8uEbJuu.mjs} +3 -3
  40. package/dist/{contract-infer-BLiomU8g.mjs.map → contract-infer-D8uEbJuu.mjs.map} +1 -1
  41. package/dist/{contract-space-aggregate-loader-lafgkTwG.mjs → contract-space-aggregate-loader-DvZwdkrr.mjs} +2 -2
  42. package/dist/{contract-space-aggregate-loader-lafgkTwG.mjs.map → contract-space-aggregate-loader-DvZwdkrr.mjs.map} +1 -1
  43. package/dist/{db-verify-D44Qj3w9.mjs → db-verify-v_vUKXTU.mjs} +4 -4
  44. package/dist/{db-verify-D44Qj3w9.mjs.map → db-verify-v_vUKXTU.mjs.map} +1 -1
  45. package/dist/exports/control-api.d.mts +1 -1
  46. package/dist/exports/control-api.mjs +2 -2
  47. package/dist/exports/index.mjs +1 -1
  48. package/dist/exports/init-output.mjs +1 -1
  49. package/dist/{framework-components-R_O3y5IW.mjs → framework-components-fYXjz_in.mjs} +2 -2
  50. package/dist/{framework-components-R_O3y5IW.mjs.map → framework-components-fYXjz_in.mjs.map} +1 -1
  51. package/dist/{global-flags-DG4uY5tV.d.mts → global-flags-DEHjV8_s.d.mts} +1 -1
  52. package/dist/{global-flags-DG4uY5tV.d.mts.map → global-flags-DEHjV8_s.d.mts.map} +1 -1
  53. package/dist/{init-DE-phHWK.mjs → init-Dzi4_BFb.mjs} +4 -4
  54. package/dist/{init-DE-phHWK.mjs.map → init-Dzi4_BFb.mjs.map} +1 -1
  55. package/dist/{inspect-live-schema-Ccnmg5bz.mjs → inspect-live-schema-C6ohV_oQ.mjs} +3 -3
  56. package/dist/{inspect-live-schema-Ccnmg5bz.mjs.map → inspect-live-schema-C6ohV_oQ.mjs.map} +1 -1
  57. package/dist/{migration-check-CKfQlAWR.mjs → migration-check-BiBJoYYW.mjs} +2 -2
  58. package/dist/{migration-check-CKfQlAWR.mjs.map → migration-check-BiBJoYYW.mjs.map} +1 -1
  59. package/dist/{migration-command-scaffold-C_KuV0Gm.mjs → migration-command-scaffold-CjvwO6at.mjs} +3 -3
  60. package/dist/{migration-command-scaffold-C_KuV0Gm.mjs.map → migration-command-scaffold-CjvwO6at.mjs.map} +1 -1
  61. package/dist/{migration-graph-kPluRdF2.mjs → migration-graph-D7DVUElV.mjs} +4 -4
  62. package/dist/{migration-graph-kPluRdF2.mjs.map → migration-graph-D7DVUElV.mjs.map} +1 -1
  63. package/dist/{migration-list-styler-DeAwACt3.mjs → migration-list-styler-BRwF4-gy.mjs} +2 -5
  64. package/dist/{migration-list-styler-DeAwACt3.mjs.map → migration-list-styler-BRwF4-gy.mjs.map} +1 -1
  65. package/dist/{migration-plan-DHLa2Khm.mjs → migration-plan-9DJ7q7_z.mjs} +5 -5
  66. package/dist/{migration-plan-DHLa2Khm.mjs.map → migration-plan-9DJ7q7_z.mjs.map} +1 -1
  67. package/dist/{migration-types-CAQ-0TEE.d.mts → migration-types-D2FW63pr.d.mts} +1 -1
  68. package/dist/{migration-types-CAQ-0TEE.d.mts.map → migration-types-D2FW63pr.d.mts.map} +1 -1
  69. package/dist/{migrations-CjO1DsYe.mjs → migrations-Cv2jxNNK.mjs} +2 -2
  70. package/dist/{migrations-CjO1DsYe.mjs.map → migrations-Cv2jxNNK.mjs.map} +1 -1
  71. package/dist/{output-CF_hqzI-.mjs → output-B60Gw5fu.mjs} +1 -1
  72. package/dist/{output-CF_hqzI-.mjs.map → output-B60Gw5fu.mjs.map} +1 -1
  73. package/dist/{terminal-ui-BbtqsQYY.d.mts → terminal-ui-5Y6mrg93.d.mts} +3 -3
  74. package/dist/{terminal-ui-BbtqsQYY.d.mts.map → terminal-ui-5Y6mrg93.d.mts.map} +1 -1
  75. package/dist/{types-Ci7TndCS.d.mts → types-Dt_SfqFm.d.mts} +1 -1
  76. package/dist/{types-Ci7TndCS.d.mts.map → types-Dt_SfqFm.d.mts.map} +1 -1
  77. package/dist/{verify-vl983Ed-.mjs → verify-DCA9Sldu.mjs} +2 -2
  78. package/dist/{verify-vl983Ed-.mjs.map → verify-DCA9Sldu.mjs.map} +1 -1
  79. package/package.json +11 -11
  80. package/dist/migration-list-CE35R5Ag.mjs +0 -505
  81. package/dist/migration-list-CE35R5Ag.mjs.map +0 -1
@@ -1,11 +1,11 @@
1
1
  import { t as loadConfig } from "../config-loader-B6sJjXTv.mjs";
2
- import { $ as errorTargetMigrationNotSupported, A as CliStructuredError, F as errorDatabaseConnectionRequired, L as errorDriverRequired, P as errorContractValidationFailed, R as errorFileNotFound, T as formatStyledHeader, V as errorMarkerMismatch, W as errorPathUnreachable, X as errorRuntime, _ as createTerminalUI, f as targetSupportsMigrations, g as parseGlobalFlagsOrExit, i as maskConnectionUrl, l as setCommandDescriptions, n as collectDeclaredInvariants, nt as mapMigrationToolsError, o as resolveContractPath, rt as mapRefResolutionError, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, u as setCommandExamples, y as handleResult } from "../command-helpers-CoceqqMl.mjs";
3
- import { t as createControlClient } from "../client-6WehTnUh.mjs";
2
+ import { $ as errorTargetMigrationNotSupported, A as CliStructuredError, F as errorDatabaseConnectionRequired, L as errorDriverRequired, P as errorContractValidationFailed, R as errorFileNotFound, T as formatStyledHeader, V as errorMarkerMismatch, W as errorPathUnreachable, X as errorRuntime, _ as createTerminalUI, f as targetSupportsMigrations, g as parseGlobalFlagsOrExit, i as maskConnectionUrl, l as setCommandDescriptions, n as collectDeclaredInvariants, nt as mapMigrationToolsError, o as resolveContractPath, rt as mapRefResolutionError, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, u as setCommandExamples, y as handleResult } from "../command-helpers-Bbw1GbwL.mjs";
3
+ import { t as createControlClient } from "../client-KgJorIvG.mjs";
4
4
  import { t as toDeclaredExtensionsFromRaw } from "../extension-pack-inputs-IDvjRCi3.mjs";
5
- import { a as loadContractSpaceAggregateForCli, o as refuseContractSpaceIntegrity } from "../contract-space-aggregate-loader-lafgkTwG.mjs";
6
- import { t as formatMigrationApplyCommandOutput } from "../migrations-CjO1DsYe.mjs";
5
+ import { a as loadContractSpaceAggregateForCli, o as refuseContractSpaceIntegrity } from "../contract-space-aggregate-loader-DvZwdkrr.mjs";
6
+ import { t as formatMigrationApplyCommandOutput } from "../migrations-Cv2jxNNK.mjs";
7
7
  import { i as readContractIR, r as executeRefAdvancement } from "../ref-advancement-DUZqsue6.mjs";
8
- import { t as mapContractAtError } from "../contract-at-errors-Bhf2jnkp.mjs";
8
+ import { t as mapContractAtError } from "../contract-at-errors-BxP-TOMl.mjs";
9
9
  import { Command } from "commander";
10
10
  import { ifDefined } from "@prisma-next/utils/defined";
11
11
  import { notOk, ok } from "@prisma-next/utils/result";
@@ -1,2 +1,2 @@
1
- import { t as createMigrationCheckCommand } from "../migration-check-CKfQlAWR.mjs";
1
+ import { t as createMigrationCheckCommand } from "../migration-check-BiBJoYYW.mjs";
2
2
  export { createMigrationCheckCommand };
@@ -1,7 +1,7 @@
1
- import { N as CliStructuredError } from "../types-Ci7TndCS.mjs";
2
- import { n as GlobalFlags, t as CommonCommandOptions } from "../global-flags-DG4uY5tV.mjs";
3
- import { n as StatusRef } from "../migration-types-CAQ-0TEE.mjs";
4
- import { t as TerminalUI } from "../terminal-ui-BbtqsQYY.mjs";
1
+ import { N as CliStructuredError } from "../types-Dt_SfqFm.mjs";
2
+ import { n as GlobalFlags, t as CommonCommandOptions } from "../global-flags-DEHjV8_s.mjs";
3
+ import { n as StatusRef } from "../migration-types-D2FW63pr.mjs";
4
+ import { t as TerminalUI } from "../terminal-ui-5Y6mrg93.mjs";
5
5
  import { Command } from "commander";
6
6
  import { Result } from "@prisma-next/utils/result";
7
7
  import { MigrationGraph } from "@prisma-next/migration-tools/graph";
@@ -1,2 +1,2 @@
1
- import { n as executeMigrationGraphCommand, t as createMigrationGraphCommand } from "../migration-graph-kPluRdF2.mjs";
1
+ import { n as executeMigrationGraphCommand, t as createMigrationGraphCommand } from "../migration-graph-D7DVUElV.mjs";
2
2
  export { createMigrationGraphCommand, executeMigrationGraphCommand };
@@ -1,10 +1,9 @@
1
- import { N as CliStructuredError } from "../types-Ci7TndCS.mjs";
2
- import { n as GlobalFlags, t as CommonCommandOptions } from "../global-flags-DG4uY5tV.mjs";
3
- import { n as GlyphMode, t as TerminalUI } from "../terminal-ui-BbtqsQYY.mjs";
1
+ import { N as CliStructuredError } from "../types-Dt_SfqFm.mjs";
2
+ import { n as GlobalFlags, t as CommonCommandOptions } from "../global-flags-DEHjV8_s.mjs";
3
+ import { n as GlyphMode, t as TerminalUI } from "../terminal-ui-5Y6mrg93.mjs";
4
4
  import { Command } from "commander";
5
5
  import { Result } from "@prisma-next/utils/result";
6
6
  import { ContractSpaceAggregate } from "@prisma-next/migration-tools/aggregate";
7
- import { MigrationGraph } from "@prisma-next/migration-tools/graph";
8
7
 
9
8
  //#region src/utils/formatters/migration-list-types.d.ts
10
9
  interface MigrationListEntry {
@@ -40,11 +39,9 @@ declare function migrationSpaceListEntriesFromAggregate(aggregate: ContractSpace
40
39
  interface MigrationListOptions extends CommonCommandOptions {
41
40
  readonly config?: string;
42
41
  readonly space?: string;
43
- readonly graph?: boolean;
44
42
  readonly ascii?: boolean;
45
43
  }
46
44
  interface MigrationListHumanRenderOptions {
47
- readonly graph: boolean;
48
45
  readonly glyphMode: GlyphMode;
49
46
  readonly useColor: boolean;
50
47
  }
@@ -1 +1 @@
1
- {"version":3,"file":"migration-list.d.mts","names":[],"sources":["../../src/utils/formatters/migration-list-types.ts","../../src/commands/migration-list.ts"],"mappings":";;;;;;;;;UAAiB,kBAAA;EAAA,SACN,OAAA;EAAA,SACA,IAAA;EAAA,SACA,EAAA;EAAA,SACA,aAAA;EAAA,SACA,cAAA;EAAA,SACA,SAAA;EAAA,SACA,IAAA;EAAA,SACA,kBAAA;AAAA;AAAA,UAGM,uBAAA;EAAA,SACN,OAAA;EAAA,SACA,UAAA,WAAqB,kBAAkB;AAAA;AAAA,UAGjC,mBAAA;EAAA,SACN,EAAA;EAAA,SACA,MAAA,WAAiB,uBAAuB;EAAA,SACxC,OAAA;AAAA;;;AAnBX;;;;;;;;AAAA,iBCoGsB,sCAAA,CACpB,SAAA,EAAW,sBAAA,EACX,oBAAA,WACC,OAAA,UAAiB,uBAAA;AAAA,UA6BV,oBAAA,SAA6B,oBAAoB;EAAA,SAChD,MAAA;EAAA,SACA,KAAA;EAAA,SACA,KAAA;EAAA,SACA,KAAA;AAAA;AAAA,UAGM,+BAAA;EAAA,SACN,KAAA;EAAA,SACA,SAAA,EAAW,SAAS;EAAA,SACpB,QAAA;AAAA;AAAA,iBAGK,8BAAA,CACd,MAAA,EAAQ,mBAAA,EACR,OAAA,EAAS,+BAA+B;;ADtIQ;AAGlD;;;;;;UCqJiB,sBAAA;EAAA,SACN,MAAA,WAAiB,uBAAuB;EAAA,SACxC,WAAA;AAAA;;;;AAnEX;;;;;;iBAuFgB,gBAAA,CACd,MAAA,EAAQ,sBAAA,GACP,MAAA,CAAO,mBAAA,EAAqB,kBAAA;;;;;;iBA6BT,2BAAA,CACpB,OAAA,EAAS,oBAAA,EACT,KAAA,EAAO,WAAA,EACP,EAAA,EAAI,UAAA,GACH,OAAA,CAAQ,MAAA,CAAO,mBAAA,EAAqB,kBAAA;AAAA,iBAqCvB,0BAAA,CAAA,GAA8B,OAAO"}
1
+ {"version":3,"file":"migration-list.d.mts","names":[],"sources":["../../src/utils/formatters/migration-list-types.ts","../../src/commands/migration-list.ts"],"mappings":";;;;;;;;UAAiB,kBAAA;EAAA,SACN,OAAA;EAAA,SACA,IAAA;EAAA,SACA,EAAA;EAAA,SACA,aAAA;EAAA,SACA,cAAA;EAAA,SACA,SAAA;EAAA,SACA,IAAA;EAAA,SACA,kBAAA;AAAA;AAAA,UAGM,uBAAA;EAAA,SACN,OAAA;EAAA,SACA,UAAA,WAAqB,kBAAkB;AAAA;AAAA,UAGjC,mBAAA;EAAA,SACN,EAAA;EAAA,SACA,MAAA,WAAiB,uBAAuB;EAAA,SACxC,OAAA;AAAA;;;;;;;;;;;iBC8EW,sCAAA,CACpB,SAAA,EAAW,sBAAA,EACX,oBAAA,WACC,OAAA,UAAiB,uBAAA;AAAA,UA6BV,oBAAA,SAA6B,oBAAoB;EAAA,SAChD,MAAA;EAAA,SACA,KAAA;EAAA,SACA,KAAA;AAAA;AAAA,UAGM,+BAAA;EAAA,SACN,SAAA,EAAW,SAAS;EAAA,SACpB,QAAA;AAAA;AAAA,iBAGK,8BAAA,CACd,MAAA,EAAQ,mBAAA,EACR,OAAA,EAAS,+BAA+B;;;ADjIQ;AAGlD;;;;;UC6IiB,sBAAA;EAAA,SACN,MAAA,WAAiB,uBAAuB;EAAA,SACxC,WAAA;AAAA;AD5IO;;;;AC8ElB;;;;;AD9EkB,iBCgKF,gBAAA,CACd,MAAA,EAAQ,sBAAA,GACP,MAAA,CAAO,mBAAA,EAAqB,kBAAA;;;;;;iBA6BT,2BAAA,CACpB,OAAA,EAAS,oBAAA,EACT,KAAA,EAAO,WAAA,EACP,EAAA,EAAI,UAAA,GACH,OAAA,CAAQ,MAAA,CAAO,mBAAA,EAAqB,kBAAA;AAAA,iBAqCvB,0BAAA,CAAA,GAA8B,OAAO"}
@@ -1,2 +1,190 @@
1
- import { a as runMigrationList, i as renderMigrationListHumanOutput, n as executeMigrationListCommand, r as migrationSpaceListEntriesFromAggregate, t as createMigrationListCommand } from "../migration-list-CE35R5Ag.mjs";
1
+ import { t as loadConfig } from "../config-loader-B6sJjXTv.mjs";
2
+ import { B as errorInvalidSpaceId, Q as errorSpaceNotFound, T as formatStyledHeader, _ as createTerminalUI, d as setCommandSeeAlso, g as parseGlobalFlagsOrExit, l as setCommandDescriptions, s as resolveMigrationPaths, t as addGlobalOptions, u as setCommandExamples, y as handleResult } from "../command-helpers-Bbw1GbwL.mjs";
3
+ import { r as buildReadAggregate } from "../contract-space-aggregate-loader-DvZwdkrr.mjs";
4
+ import { i as renderMigrationListWithStyle, n as createAnsiMigrationListStyler, r as buildMigrationListTopologyBySpace } from "../migration-list-styler-BRwF4-gy.mjs";
5
+ import { Command } from "commander";
6
+ import { ifDefined } from "@prisma-next/utils/defined";
7
+ import { notOk, ok } from "@prisma-next/utils/result";
8
+ import { APP_SPACE_ID, RESERVED_SPACE_SUBDIR_NAMES, isValidSpaceId, listContractSpaceDirectories } from "@prisma-next/migration-tools/spaces";
9
+ import { HEAD_REF_NAME, refsByContractHash } from "@prisma-next/migration-tools/refs";
10
+ //#region src/commands/migration-list.ts
11
+ function compareSpaceIds(a, b) {
12
+ if (a === APP_SPACE_ID) return b === APP_SPACE_ID ? 0 : -1;
13
+ if (b === APP_SPACE_ID) return 1;
14
+ if (a < b) return -1;
15
+ if (a > b) return 1;
16
+ return 0;
17
+ }
18
+ function compareDirNamesDescending(a, b) {
19
+ if (a.dirName < b.dirName) return 1;
20
+ if (a.dirName > b.dirName) return -1;
21
+ return 0;
22
+ }
23
+ /**
24
+ * Ref names decorating a space's destination contract hashes. The
25
+ * tolerant `member.refs` deliberately omits the structural `head.json`;
26
+ * for extension spaces the old enumerator surfaced it as a `head`
27
+ * decoration on the tip migration, so fold `member.headRef` back in to
28
+ * keep that output. The app space synthesises its head, so it carries
29
+ * no on-disk `head` ref to restore.
30
+ */
31
+ function listRefsByContractHash(member) {
32
+ const byHash = new Map(refsByContractHash(member.refs));
33
+ if (member.spaceId !== APP_SPACE_ID && member.headRef !== null) {
34
+ const hash = member.headRef.hash;
35
+ const bucket = byHash.get(hash) ?? [];
36
+ if (!bucket.includes(HEAD_REF_NAME)) byHash.set(hash, [...bucket, HEAD_REF_NAME].sort());
37
+ }
38
+ return byHash;
39
+ }
40
+ async function orderedOnDiskSpaceIds(projectMigrationsDir) {
41
+ return (await listContractSpaceDirectories(projectMigrationsDir)).filter((name) => !RESERVED_SPACE_SUBDIR_NAMES.has(name)).filter(isValidSpaceId).sort(compareSpaceIds);
42
+ }
43
+ /**
44
+ * Project the loaded {@link ContractSpaceAggregate} into the render-ready
45
+ * {@link MigrationSpaceListEntry} rows `migration list` displays.
46
+ *
47
+ * Space membership matches the on-disk contract-space directories (not the
48
+ * aggregate's always-present synthesized app member when `migrations/app/`
49
+ * is absent); package and ref data come from `aggregate.space(id)`.
50
+ */
51
+ async function migrationSpaceListEntriesFromAggregate(aggregate, projectMigrationsDir) {
52
+ const spaceIds = await orderedOnDiskSpaceIds(projectMigrationsDir);
53
+ const spaces = [];
54
+ for (const spaceId of spaceIds) {
55
+ const member = aggregate.space(spaceId);
56
+ if (member === void 0) continue;
57
+ const refsByHash = listRefsByContractHash(member);
58
+ const migrations = member.packages.map((pkg) => ({
59
+ dirName: pkg.dirName,
60
+ from: pkg.metadata.from,
61
+ to: pkg.metadata.to,
62
+ migrationHash: pkg.metadata.migrationHash,
63
+ operationCount: pkg.ops.length,
64
+ createdAt: pkg.metadata.createdAt,
65
+ refs: refsByHash.get(pkg.metadata.to) ?? [],
66
+ providedInvariants: pkg.metadata.providedInvariants
67
+ })).sort(compareDirNamesDescending);
68
+ spaces.push({
69
+ spaceId,
70
+ migrations
71
+ });
72
+ }
73
+ return spaces;
74
+ }
75
+ function renderMigrationListHumanOutput(result, options) {
76
+ const styler = createAnsiMigrationListStyler({ useColor: options.useColor });
77
+ const topologyBySpaceId = buildMigrationListTopologyBySpace(result);
78
+ return renderMigrationListWithStyle(result, styler, options.glyphMode, topologyBySpaceId);
79
+ }
80
+ function computeSummary(spaces) {
81
+ const totalMigrations = spaces.reduce((count, space) => count + space.migrations.length, 0);
82
+ if (spaces.length <= 1) return `${totalMigrations} migration(s) on disk`;
83
+ return `${totalMigrations} migration(s) across ${spaces.length} contract space(s)`;
84
+ }
85
+ /**
86
+ * Policy core of `migration list`: validates `--space`, narrows the
87
+ * pre-enumerated spaces, and assembles a {@link MigrationListResult}.
88
+ *
89
+ * - `migrations/` missing or contains no valid space directories →
90
+ * caller passes `spaces: []`; this synthesizes `[{ spaceId: APP_SPACE_ID, migrations: [] }]`.
91
+ * - `--space <id>` on an existing-but-empty space → `{ spaceId, migrations: [] }` in the input.
92
+ * - `--space <id>` on a non-existent (or reserved) space → `SPACE_NOT_FOUND`.
93
+ */
94
+ function runMigrationList(inputs) {
95
+ const { spaces, spaceFilter } = inputs;
96
+ if (spaceFilter !== void 0 && !isValidSpaceId(spaceFilter)) return notOk(errorInvalidSpaceId(spaceFilter));
97
+ if (spaceFilter !== void 0 && !spaces.some((s) => s.spaceId === spaceFilter)) return notOk(errorSpaceNotFound(spaceFilter, spaces.map((s) => s.spaceId).sort()));
98
+ const scopedSpaces = spaceFilter !== void 0 ? spaces.filter((s) => s.spaceId === spaceFilter) : spaces;
99
+ const resultSpaces = scopedSpaces.length === 0 ? [{
100
+ spaceId: APP_SPACE_ID,
101
+ migrations: []
102
+ }] : scopedSpaces;
103
+ return ok({
104
+ ok: true,
105
+ spaces: resultSpaces,
106
+ summary: computeSummary(resultSpaces)
107
+ });
108
+ }
109
+ /**
110
+ * CLI shell: loads config, resolves paths, prints the styled header on
111
+ * stderr (interactive mode only), and delegates to {@link runMigrationList}.
112
+ * Kept intentionally thin so the unit-testable surface lives in the core.
113
+ */
114
+ async function executeMigrationListCommand(options, flags, ui) {
115
+ const config = await loadConfig(options.config);
116
+ const { configPath, migrationsDir, migrationsRelative } = resolveMigrationPaths(options.config, config);
117
+ if (!flags.json && !flags.quiet) {
118
+ const header = formatStyledHeader({
119
+ command: "migration list",
120
+ description: "List on-disk migrations, latest first, per contract space",
121
+ details: [
122
+ {
123
+ label: "config",
124
+ value: configPath
125
+ },
126
+ {
127
+ label: "migrations",
128
+ value: migrationsRelative
129
+ },
130
+ ...options.space !== void 0 ? [{
131
+ label: "space",
132
+ value: options.space
133
+ }] : []
134
+ ],
135
+ flags
136
+ });
137
+ ui.stderr(header);
138
+ }
139
+ const loaded = await buildReadAggregate(config, { migrationsDir });
140
+ if (!loaded.ok) return notOk(loaded.failure);
141
+ return runMigrationList({
142
+ spaces: await migrationSpaceListEntriesFromAggregate(loaded.value.aggregate, migrationsDir),
143
+ ...ifDefined("spaceFilter", options.space)
144
+ });
145
+ }
146
+ function createMigrationListCommand() {
147
+ const command = new Command("list");
148
+ 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. --ascii forces ASCII kind glyphs\n(orthogonal to --no-color).");
149
+ setCommandExamples(command, [
150
+ "prisma-next migration list",
151
+ "prisma-next migration list --space app",
152
+ "prisma-next migration list --ascii",
153
+ "prisma-next migration list --json"
154
+ ]);
155
+ setCommandSeeAlso(command, [
156
+ {
157
+ verb: "migration status",
158
+ oneLiner: "Show migration path and pending status"
159
+ },
160
+ {
161
+ verb: "migration log",
162
+ oneLiner: "Show executed migration history"
163
+ },
164
+ {
165
+ verb: "migration graph",
166
+ oneLiner: "Show the migration graph topology"
167
+ },
168
+ {
169
+ verb: "migration show",
170
+ oneLiner: "Display migration package contents"
171
+ }
172
+ ]);
173
+ addGlobalOptions(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)").action(async (options) => {
174
+ const flags = parseGlobalFlagsOrExit(options);
175
+ const ui = createTerminalUI(flags);
176
+ const exitCode = handleResult(await executeMigrationListCommand(options, flags, ui), flags, ui, (listResult) => {
177
+ if (flags.json) ui.output(JSON.stringify(listResult, null, 2));
178
+ else if (!flags.quiet) ui.output(renderMigrationListHumanOutput(listResult, {
179
+ glyphMode: ui.resolveGlyphMode(options.ascii === true),
180
+ useColor: ui.useColor
181
+ }));
182
+ });
183
+ process.exit(exitCode);
184
+ });
185
+ return command;
186
+ }
187
+ //#endregion
2
188
  export { createMigrationListCommand, executeMigrationListCommand, migrationSpaceListEntriesFromAggregate, renderMigrationListHumanOutput, runMigrationList };
189
+
190
+ //# sourceMappingURL=migration-list.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"migration-list.mjs","names":[],"sources":["../../src/commands/migration-list.ts"],"sourcesContent":["import type {\n ContractSpaceAggregate,\n ContractSpaceMember,\n} from '@prisma-next/migration-tools/aggregate';\nimport { HEAD_REF_NAME, refsByContractHash } from '@prisma-next/migration-tools/refs';\nimport {\n APP_SPACE_ID,\n isValidSpaceId,\n listContractSpaceDirectories,\n RESERVED_SPACE_SUBDIR_NAMES,\n} 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} from '../utils/cli-errors';\nimport {\n addGlobalOptions,\n resolveMigrationPaths,\n setCommandDescriptions,\n setCommandExamples,\n setCommandSeeAlso,\n} from '../utils/command-helpers';\nimport { buildReadAggregate } from '../utils/contract-space-aggregate-loader';\nimport {\n buildMigrationListTopologyBySpace,\n renderMigrationListWithStyle,\n} from '../utils/formatters/migration-list-render';\nimport { createAnsiMigrationListStyler } from '../utils/formatters/migration-list-styler';\nimport type {\n MigrationListEntry,\n MigrationListResult,\n MigrationSpaceListEntry,\n} from '../utils/formatters/migration-list-types';\nimport { formatStyledHeader } from '../utils/formatters/styled';\nimport type { CommonCommandOptions } from '../utils/global-flags';\nimport { type GlobalFlags, parseGlobalFlagsOrExit } from '../utils/global-flags';\nimport type { GlyphMode } from '../utils/glyph-mode';\nimport { handleResult } from '../utils/result-handler';\nimport { createTerminalUI, type TerminalUI } from '../utils/terminal-ui';\n\nfunction compareSpaceIds(a: string, b: string): number {\n if (a === APP_SPACE_ID) return b === APP_SPACE_ID ? 0 : -1;\n if (b === APP_SPACE_ID) return 1;\n if (a < b) return -1;\n if (a > b) return 1;\n return 0;\n}\n\nfunction compareDirNamesDescending(a: MigrationListEntry, b: MigrationListEntry): number {\n if (a.dirName < b.dirName) return 1;\n if (a.dirName > b.dirName) return -1;\n return 0;\n}\n\n/**\n * Ref names decorating a space's destination contract hashes. The\n * tolerant `member.refs` deliberately omits the structural `head.json`;\n * for extension spaces the old enumerator surfaced it as a `head`\n * decoration on the tip migration, so fold `member.headRef` back in to\n * keep that output. The app space synthesises its head, so it carries\n * no on-disk `head` ref to restore.\n */\nfunction listRefsByContractHash(\n member: ContractSpaceMember,\n): ReadonlyMap<string, readonly string[]> {\n const byHash = new Map(refsByContractHash(member.refs));\n if (member.spaceId !== APP_SPACE_ID && member.headRef !== null) {\n const hash = member.headRef.hash;\n const bucket = byHash.get(hash) ?? [];\n if (!bucket.includes(HEAD_REF_NAME)) {\n byHash.set(hash, [...bucket, HEAD_REF_NAME].sort());\n }\n }\n return byHash;\n}\n\nasync function orderedOnDiskSpaceIds(projectMigrationsDir: string): Promise<readonly string[]> {\n const candidateDirs = await listContractSpaceDirectories(projectMigrationsDir);\n return candidateDirs\n .filter((name) => !RESERVED_SPACE_SUBDIR_NAMES.has(name))\n .filter(isValidSpaceId)\n .sort(compareSpaceIds);\n}\n\n/**\n * Project the loaded {@link ContractSpaceAggregate} into the render-ready\n * {@link MigrationSpaceListEntry} rows `migration list` displays.\n *\n * Space membership matches the on-disk contract-space directories (not the\n * aggregate's always-present synthesized app member when `migrations/app/`\n * is absent); package and ref data come from `aggregate.space(id)`.\n */\nexport async function migrationSpaceListEntriesFromAggregate(\n aggregate: ContractSpaceAggregate,\n projectMigrationsDir: string,\n): Promise<readonly MigrationSpaceListEntry[]> {\n const spaceIds = await orderedOnDiskSpaceIds(projectMigrationsDir);\n const spaces: MigrationSpaceListEntry[] = [];\n\n for (const spaceId of spaceIds) {\n const member = aggregate.space(spaceId);\n if (member === undefined) {\n continue;\n }\n const refsByHash = listRefsByContractHash(member);\n const migrations: MigrationListEntry[] = member.packages\n .map((pkg) => ({\n dirName: pkg.dirName,\n from: pkg.metadata.from,\n to: pkg.metadata.to,\n migrationHash: pkg.metadata.migrationHash,\n operationCount: pkg.ops.length,\n createdAt: pkg.metadata.createdAt,\n refs: refsByHash.get(pkg.metadata.to) ?? [],\n providedInvariants: pkg.metadata.providedInvariants,\n }))\n .sort(compareDirNamesDescending);\n\n spaces.push({ spaceId, migrations });\n }\n\n return spaces;\n}\n\ninterface MigrationListOptions extends CommonCommandOptions {\n readonly config?: string;\n readonly space?: string;\n readonly ascii?: boolean;\n}\n\nexport interface MigrationListHumanRenderOptions {\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 const topologyBySpaceId = buildMigrationListTopologyBySpace(result);\n return renderMigrationListWithStyle(result, styler, options.glyphMode, topologyBySpaceId);\n}\n\n/**\n * Inputs for {@link runMigrationList} — the policy core of `migration list`\n * that tests exercise directly.\n *\n * The core does not call `loadConfig`, parse CLI flags, render a styled\n * header, or write to any stream. Enumeration is supplied by the caller\n * (the CLI shell builds it from {@link migrationSpaceListEntriesFromAggregate}).\n */\nexport interface RunMigrationListInputs {\n readonly spaces: readonly MigrationSpaceListEntry[];\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 * Policy core of `migration list`: validates `--space`, narrows the\n * pre-enumerated spaces, and assembles a {@link MigrationListResult}.\n *\n * - `migrations/` missing or contains no valid space directories →\n * caller passes `spaces: []`; this synthesizes `[{ spaceId: APP_SPACE_ID, migrations: [] }]`.\n * - `--space <id>` on an existing-but-empty space → `{ spaceId, migrations: [] }` in the input.\n * - `--space <id>` on a non-existent (or reserved) space → `SPACE_NOT_FOUND`.\n */\nexport function runMigrationList(\n inputs: RunMigrationListInputs,\n): Result<MigrationListResult, CliStructuredError> {\n const { spaces, spaceFilter } = inputs;\n\n if (spaceFilter !== undefined && !isValidSpaceId(spaceFilter)) {\n return notOk(errorInvalidSpaceId(spaceFilter));\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 */\nexport async 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 const loaded = await buildReadAggregate(config, { migrationsDir });\n if (!loaded.ok) {\n return notOk(loaded.failure);\n }\n\n const spaces = await migrationSpaceListEntriesFromAggregate(\n loaded.value.aggregate,\n migrationsDir,\n );\n\n return runMigrationList({\n spaces,\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. --ascii forces ASCII kind glyphs\\n' +\n '(orthogonal to --no-color).',\n );\n setCommandExamples(command, [\n 'prisma-next migration list',\n 'prisma-next migration list --space app',\n 'prisma-next migration list --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('--ascii', 'Use ASCII kind glyphs (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 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":"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"}
@@ -1,6 +1,6 @@
1
- import { N as CliStructuredError } from "../types-Ci7TndCS.mjs";
2
- import { n as GlobalFlags, t as CommonCommandOptions } from "../global-flags-DG4uY5tV.mjs";
3
- import { t as TerminalUI } from "../terminal-ui-BbtqsQYY.mjs";
1
+ import { N as CliStructuredError } from "../types-Dt_SfqFm.mjs";
2
+ import { n as GlobalFlags, t as CommonCommandOptions } from "../global-flags-DEHjV8_s.mjs";
3
+ import { t as TerminalUI } from "../terminal-ui-5Y6mrg93.mjs";
4
4
  import { Command } from "commander";
5
5
  import { Result } from "@prisma-next/utils/result";
6
6
 
@@ -1,7 +1,7 @@
1
1
  import { t as loadConfig } from "../config-loader-B6sJjXTv.mjs";
2
- import { A as CliStructuredError, F as errorDatabaseConnectionRequired, L as errorDriverRequired, T as formatStyledHeader, _ as createTerminalUI, d as setCommandSeeAlso, f as targetSupportsMigrations, g as parseGlobalFlagsOrExit, i as maskConnectionUrl, l as setCommandDescriptions, nt as mapMigrationToolsError, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, u as setCommandExamples, y as handleResult } from "../command-helpers-CoceqqMl.mjs";
3
- import { t as createControlClient } from "../client-6WehTnUh.mjs";
4
- import { r as buildReadAggregate } from "../contract-space-aggregate-loader-lafgkTwG.mjs";
2
+ import { A as CliStructuredError, F as errorDatabaseConnectionRequired, L as errorDriverRequired, T as formatStyledHeader, _ as createTerminalUI, d as setCommandSeeAlso, f as targetSupportsMigrations, g as parseGlobalFlagsOrExit, i as maskConnectionUrl, l as setCommandDescriptions, nt as mapMigrationToolsError, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, u as setCommandExamples, y as handleResult } from "../command-helpers-Bbw1GbwL.mjs";
3
+ import { t as createControlClient } from "../client-KgJorIvG.mjs";
4
+ import { r as buildReadAggregate } from "../contract-space-aggregate-loader-DvZwdkrr.mjs";
5
5
  import { Command } from "commander";
6
6
  import { notOk, ok } from "@prisma-next/utils/result";
7
7
  import { cyan, dim } from "colorette";
@@ -1,7 +1,7 @@
1
1
  import { t as loadConfig } from "../config-loader-B6sJjXTv.mjs";
2
- import { $ as errorTargetMigrationNotSupported, A as CliStructuredError, R as errorFileNotFound, T as formatStyledHeader, X as errorRuntime, _ as createTerminalUI, g as parseGlobalFlagsOrExit, l as setCommandDescriptions, o as resolveContractPath, r as getTargetMigrations, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, u as setCommandExamples, y as handleResult } from "../command-helpers-CoceqqMl.mjs";
3
- import { t as assertFrameworkComponentsCompatible } from "../framework-components-R_O3y5IW.mjs";
4
- import { s as refusePackageCorruptionOnAggregate } from "../contract-space-aggregate-loader-lafgkTwG.mjs";
2
+ import { $ as errorTargetMigrationNotSupported, A as CliStructuredError, R as errorFileNotFound, T as formatStyledHeader, X as errorRuntime, _ as createTerminalUI, g as parseGlobalFlagsOrExit, l as setCommandDescriptions, o as resolveContractPath, r as getTargetMigrations, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, u as setCommandExamples, y as handleResult } from "../command-helpers-Bbw1GbwL.mjs";
3
+ import { t as assertFrameworkComponentsCompatible } from "../framework-components-fYXjz_in.mjs";
4
+ import { s as refusePackageCorruptionOnAggregate } from "../contract-space-aggregate-loader-DvZwdkrr.mjs";
5
5
  import { Command } from "commander";
6
6
  import { getEmittedArtifactPaths } from "@prisma-next/emitter";
7
7
  import { notOk, ok } from "@prisma-next/utils/result";
@@ -1,4 +1,4 @@
1
- import { n as GlobalFlags } from "../global-flags-DG4uY5tV.mjs";
1
+ import { n as GlobalFlags } from "../global-flags-DEHjV8_s.mjs";
2
2
  import { Command } from "commander";
3
3
  import { Result } from "@prisma-next/utils/result";
4
4
  import { OperationPreview } from "@prisma-next/framework-components/control";
@@ -1,2 +1,2 @@
1
- import { n as formatMigrationPlanOutput, r as resolveBundleByPrefix, t as createMigrationPlanCommand } from "../migration-plan-DHLa2Khm.mjs";
1
+ import { n as formatMigrationPlanOutput, r as resolveBundleByPrefix, t as createMigrationPlanCommand } from "../migration-plan-9DJ7q7_z.mjs";
2
2
  export { createMigrationPlanCommand, formatMigrationPlanOutput, resolveBundleByPrefix };
@@ -1,4 +1,4 @@
1
- import { N as CliStructuredError } from "../types-Ci7TndCS.mjs";
1
+ import { N as CliStructuredError } from "../types-Dt_SfqFm.mjs";
2
2
  import { Command } from "commander";
3
3
  import { Result } from "@prisma-next/utils/result";
4
4
  import { OperationPreview } from "@prisma-next/framework-components/control";
@@ -1,7 +1,7 @@
1
1
  import { t as loadConfig } from "../config-loader-B6sJjXTv.mjs";
2
- import { P as errorContractValidationFailed, R as errorFileNotFound, T as formatStyledHeader, X as errorRuntime, _ as createTerminalUI, d as setCommandSeeAlso, g as parseGlobalFlagsOrExit, l as setCommandDescriptions, o as resolveContractPath, rt as mapRefResolutionError, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, u as setCommandExamples, y as handleResult } from "../command-helpers-CoceqqMl.mjs";
3
- import { t as createControlClient } from "../client-6WehTnUh.mjs";
4
- import { a as formatMigrationShowOutput } from "../migrations-CjO1DsYe.mjs";
2
+ import { P as errorContractValidationFailed, R as errorFileNotFound, T as formatStyledHeader, X as errorRuntime, _ as createTerminalUI, d as setCommandSeeAlso, g as parseGlobalFlagsOrExit, l as setCommandDescriptions, o as resolveContractPath, rt as mapRefResolutionError, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, u as setCommandExamples, y as handleResult } from "../command-helpers-Bbw1GbwL.mjs";
3
+ import { t as createControlClient } from "../client-KgJorIvG.mjs";
4
+ import { a as formatMigrationShowOutput } from "../migrations-Cv2jxNNK.mjs";
5
5
  import { Command } from "commander";
6
6
  import { ifDefined } from "@prisma-next/utils/defined";
7
7
  import { notOk, ok } from "@prisma-next/utils/result";
@@ -1,4 +1,4 @@
1
- import { n as StatusRef, t as StatusDiagnostic } from "../migration-types-CAQ-0TEE.mjs";
1
+ import { n as StatusRef, t as StatusDiagnostic } from "../migration-types-D2FW63pr.mjs";
2
2
  import { Command } from "commander";
3
3
  import { ContractMarkerRecordLike, ContractSpaceAggregate } from "@prisma-next/migration-tools/aggregate";
4
4
  import { MigrationGraph } from "@prisma-next/migration-tools/graph";
@@ -1,8 +1,8 @@
1
1
  import { t as loadConfig } from "../config-loader-B6sJjXTv.mjs";
2
- import { A as CliStructuredError, T as formatStyledHeader, X as errorRuntime, _ as createTerminalUI, a as readContractEnvelope, d as setCommandSeeAlso, g as parseGlobalFlagsOrExit, i as maskConnectionUrl, l as setCommandDescriptions, m as toStructuralEdge, n as collectDeclaredInvariants, nt as mapMigrationToolsError, p as toPathDecisionResult, rt as mapRefResolutionError, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, u as setCommandExamples, y as handleResult } from "../command-helpers-CoceqqMl.mjs";
3
- import { t as createControlClient } from "../client-6WehTnUh.mjs";
2
+ import { A as CliStructuredError, T as formatStyledHeader, X as errorRuntime, _ as createTerminalUI, a as readContractEnvelope, d as setCommandSeeAlso, g as parseGlobalFlagsOrExit, i as maskConnectionUrl, l as setCommandDescriptions, m as toStructuralEdge, n as collectDeclaredInvariants, nt as mapMigrationToolsError, p as toPathDecisionResult, rt as mapRefResolutionError, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, u as setCommandExamples, y as handleResult } from "../command-helpers-Bbw1GbwL.mjs";
3
+ import { t as createControlClient } from "../client-KgJorIvG.mjs";
4
4
  import { t as toDeclaredExtensionsFromRaw } from "../extension-pack-inputs-IDvjRCi3.mjs";
5
- import { i as loadContractRawSafely, o as refuseContractSpaceIntegrity, s as refusePackageCorruptionOnAggregate, t as appContractStandInFromIdentity } from "../contract-space-aggregate-loader-lafgkTwG.mjs";
5
+ import { i as loadContractRawSafely, o as refuseContractSpaceIntegrity, s as refusePackageCorruptionOnAggregate, t as appContractStandInFromIdentity } from "../contract-space-aggregate-loader-DvZwdkrr.mjs";
6
6
  import { i as migrationGraphToRenderInput, n as graphRenderer, r as isLinearGraph, t as extractRelevantSubgraph } from "../graph-render-rFAqZujX.mjs";
7
7
  import { Command } from "commander";
8
8
  import { ifDefined } from "@prisma-next/utils/defined";
@@ -1,4 +1,4 @@
1
- import { N as CliStructuredError } from "../types-Ci7TndCS.mjs";
1
+ import { N as CliStructuredError } from "../types-Dt_SfqFm.mjs";
2
2
  import { Command } from "commander";
3
3
  import { Result } from "@prisma-next/utils/result";
4
4
  import { RefEntry } from "@prisma-next/migration-tools/refs";
@@ -1,6 +1,6 @@
1
1
  import { t as loadConfig } from "../config-loader-B6sJjXTv.mjs";
2
- import { A as CliStructuredError, C as formatCommandHelp, J as errorRefSetHashNotInGraph, K as errorRefSetBundleNotFound, R as errorFileNotFound, X as errorRuntime, _ as createTerminalUI, g as parseGlobalFlagsOrExit, h as parseGlobalFlags, l as setCommandDescriptions, nt as mapMigrationToolsError, q as errorRefSetEmptySentinel, rt as mapRefResolutionError, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, y as handleResult } from "../command-helpers-CoceqqMl.mjs";
3
- import { r as buildReadAggregate } from "../contract-space-aggregate-loader-lafgkTwG.mjs";
2
+ import { A as CliStructuredError, C as formatCommandHelp, J as errorRefSetHashNotInGraph, K as errorRefSetBundleNotFound, R as errorFileNotFound, X as errorRuntime, _ as createTerminalUI, g as parseGlobalFlagsOrExit, h as parseGlobalFlags, l as setCommandDescriptions, nt as mapMigrationToolsError, q as errorRefSetEmptySentinel, rt as mapRefResolutionError, s as resolveMigrationPaths, t as addGlobalOptions, tt as errorUnexpected, y as handleResult } from "../command-helpers-Bbw1GbwL.mjs";
3
+ import { r as buildReadAggregate } from "../contract-space-aggregate-loader-DvZwdkrr.mjs";
4
4
  import { i as readContractIR } from "../ref-advancement-DUZqsue6.mjs";
5
5
  import { Command } from "commander";
6
6
  import { notOk, ok } from "@prisma-next/utils/result";
@@ -1,4 +1,4 @@
1
- import { A as CliStructuredError, P as errorContractValidationFailed, R as errorFileNotFound, Z as errorSnapshotMissing, nt as mapMigrationToolsError, tt as errorUnexpected } from "./command-helpers-CoceqqMl.mjs";
1
+ import { A as CliStructuredError, P as errorContractValidationFailed, R as errorFileNotFound, Z as errorSnapshotMissing, nt as mapMigrationToolsError, tt as errorUnexpected } from "./command-helpers-Bbw1GbwL.mjs";
2
2
  import { notOk } from "@prisma-next/utils/result";
3
3
  import { join } from "pathe";
4
4
  import { MigrationToolsError } from "@prisma-next/migration-tools/errors";
@@ -39,4 +39,4 @@ function mapContractAtError(error, options) {
39
39
  //#endregion
40
40
  export { mapContractAtError as t };
41
41
 
42
- //# sourceMappingURL=contract-at-errors-Bhf2jnkp.mjs.map
42
+ //# sourceMappingURL=contract-at-errors-BxP-TOMl.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract-at-errors-Bhf2jnkp.mjs","names":[],"sources":["../src/utils/contract-at-errors.ts"],"sourcesContent":["import { MigrationToolsError } from '@prisma-next/migration-tools/errors';\nimport { notOk, type Result } from '@prisma-next/utils/result';\nimport { join } from 'pathe';\nimport {\n CliStructuredError,\n errorContractValidationFailed,\n errorFileNotFound,\n errorSnapshotMissing,\n errorUnexpected,\n mapMigrationToolsError,\n} from './cli-errors';\n\nexport function mapContractAtError(\n error: unknown,\n options?: { readonly artifactRole?: 'from' | 'to' },\n): Result<never, CliStructuredError> {\n if (MigrationToolsError.is(error)) {\n switch (error.code) {\n case 'MIGRATION.SNAPSHOT_MISSING': {\n const refName =\n typeof error.details?.['refName'] === 'string'\n ? error.details['refName']\n : typeof error.details?.['identifier'] === 'string'\n ? error.details['identifier']\n : 'unknown';\n return notOk(errorSnapshotMissing(refName));\n }\n case 'MIGRATION.CONTRACT_DESERIALIZATION_FAILED': {\n const filePath =\n typeof error.details?.['filePath'] === 'string'\n ? error.details['filePath']\n : 'ref-snapshot';\n const message =\n typeof error.details?.['message'] === 'string' ? error.details['message'] : error.message;\n const isRefSnapshot = filePath.endsWith('.contract.json');\n return notOk(\n errorContractValidationFailed(\n isRefSnapshot\n ? `Ref snapshot contract failed to deserialize: ${message}`\n : `Predecessor contract at ${filePath} failed to deserialize: ${message}`,\n { where: { path: isRefSnapshot ? 'ref-snapshot' : filePath } },\n ),\n );\n }\n case 'MIGRATION.INVALID_JSON': {\n const filePath =\n typeof error.details?.['filePath'] === 'string' ? error.details['filePath'] : 'unknown';\n const message =\n typeof error.details?.['parseError'] === 'string'\n ? error.details['parseError']\n : error.message;\n const role = options?.artifactRole ?? 'from';\n return notOk(\n errorContractValidationFailed(\n role === 'to'\n ? `Target contract at ${filePath} failed to deserialize: ${message}`\n : `Predecessor contract at ${filePath} failed to deserialize: ${message}`,\n { where: { path: filePath } },\n ),\n );\n }\n case 'MIGRATION.BUNDLE_NOT_FOUND_FOR_GRAPH_NODE':\n return notOk(\n errorUnexpected(error.message, {\n why: error.why,\n fix: error.fix,\n }),\n );\n case 'MIGRATION.FILE_MISSING': {\n const file =\n typeof error.details?.['file'] === 'string' ? error.details['file'] : 'end-contract.json';\n const dir = typeof error.details?.['dir'] === 'string' ? error.details['dir'] : '';\n const jsonPath = dir ? join(dir, 'end-contract.json') : file;\n const role = options?.artifactRole ?? 'from';\n return notOk(\n errorFileNotFound(jsonPath, {\n why:\n role === 'to'\n ? `Target migration is missing its destination contract snapshot at ${jsonPath}`\n : `Predecessor migration is missing its destination contract snapshot at ${jsonPath}`,\n fix:\n role === 'to'\n ? 'Re-emit the target migration so its sibling `end-contract.json` / `end-contract.d.ts` are restored, then re-run this command.'\n : 'Re-emit the predecessor migration (`prisma-next migration plan` from its source) so its sibling `end-contract.json` is restored, then re-run this command.',\n }),\n );\n }\n default:\n return notOk(mapMigrationToolsError(error));\n }\n }\n if (CliStructuredError.is(error)) {\n return notOk(error);\n }\n throw error;\n}\n"],"mappings":";;;;;AAYA,SAAgB,mBACd,OACA,SACmC;CACnC,IAAI,oBAAoB,GAAG,KAAK,GAC9B,QAAQ,MAAM,MAAd;EACE,KAAK,8BAOH,OAAO,MAAM,qBALX,OAAO,MAAM,UAAU,eAAe,WAClC,MAAM,QAAQ,aACd,OAAO,MAAM,UAAU,kBAAkB,WACvC,MAAM,QAAQ,gBACd,SACiC,CAAC;EAE5C,KAAK,6CAA6C;GAChD,MAAM,WACJ,OAAO,MAAM,UAAU,gBAAgB,WACnC,MAAM,QAAQ,cACd;GACN,MAAM,UACJ,OAAO,MAAM,UAAU,eAAe,WAAW,MAAM,QAAQ,aAAa,MAAM;GACpF,MAAM,gBAAgB,SAAS,SAAS,gBAAgB;GACxD,OAAO,MACL,8BACE,gBACI,gDAAgD,YAChD,2BAA2B,SAAS,0BAA0B,WAClE,EAAE,OAAO,EAAE,MAAM,gBAAgB,iBAAiB,SAAS,EAAE,CAC/D,CACF;EACF;EACA,KAAK,0BAA0B;GAC7B,MAAM,WACJ,OAAO,MAAM,UAAU,gBAAgB,WAAW,MAAM,QAAQ,cAAc;GAChF,MAAM,UACJ,OAAO,MAAM,UAAU,kBAAkB,WACrC,MAAM,QAAQ,gBACd,MAAM;GAEZ,OAAO,MACL,+BAFW,SAAS,gBAAgB,YAGzB,OACL,sBAAsB,SAAS,0BAA0B,YACzD,2BAA2B,SAAS,0BAA0B,WAClE,EAAE,OAAO,EAAE,MAAM,SAAS,EAAE,CAC9B,CACF;EACF;EACA,KAAK,6CACH,OAAO,MACL,gBAAgB,MAAM,SAAS;GAC7B,KAAK,MAAM;GACX,KAAK,MAAM;EACb,CAAC,CACH;EACF,KAAK,0BAA0B;GAC7B,MAAM,OACJ,OAAO,MAAM,UAAU,YAAY,WAAW,MAAM,QAAQ,UAAU;GACxE,MAAM,MAAM,OAAO,MAAM,UAAU,WAAW,WAAW,MAAM,QAAQ,SAAS;GAChF,MAAM,WAAW,MAAM,KAAK,KAAK,mBAAmB,IAAI;GACxD,MAAM,OAAO,SAAS,gBAAgB;GACtC,OAAO,MACL,kBAAkB,UAAU;IAC1B,KACE,SAAS,OACL,oEAAoE,aACpE,yEAAyE;IAC/E,KACE,SAAS,OACL,kIACA;GACR,CAAC,CACH;EACF;EACA,SACE,OAAO,MAAM,uBAAuB,KAAK,CAAC;CAC9C;CAEF,IAAI,mBAAmB,GAAG,KAAK,GAC7B,OAAO,MAAM,KAAK;CAEpB,MAAM;AACR"}
1
+ {"version":3,"file":"contract-at-errors-BxP-TOMl.mjs","names":[],"sources":["../src/utils/contract-at-errors.ts"],"sourcesContent":["import { MigrationToolsError } from '@prisma-next/migration-tools/errors';\nimport { notOk, type Result } from '@prisma-next/utils/result';\nimport { join } from 'pathe';\nimport {\n CliStructuredError,\n errorContractValidationFailed,\n errorFileNotFound,\n errorSnapshotMissing,\n errorUnexpected,\n mapMigrationToolsError,\n} from './cli-errors';\n\nexport function mapContractAtError(\n error: unknown,\n options?: { readonly artifactRole?: 'from' | 'to' },\n): Result<never, CliStructuredError> {\n if (MigrationToolsError.is(error)) {\n switch (error.code) {\n case 'MIGRATION.SNAPSHOT_MISSING': {\n const refName =\n typeof error.details?.['refName'] === 'string'\n ? error.details['refName']\n : typeof error.details?.['identifier'] === 'string'\n ? error.details['identifier']\n : 'unknown';\n return notOk(errorSnapshotMissing(refName));\n }\n case 'MIGRATION.CONTRACT_DESERIALIZATION_FAILED': {\n const filePath =\n typeof error.details?.['filePath'] === 'string'\n ? error.details['filePath']\n : 'ref-snapshot';\n const message =\n typeof error.details?.['message'] === 'string' ? error.details['message'] : error.message;\n const isRefSnapshot = filePath.endsWith('.contract.json');\n return notOk(\n errorContractValidationFailed(\n isRefSnapshot\n ? `Ref snapshot contract failed to deserialize: ${message}`\n : `Predecessor contract at ${filePath} failed to deserialize: ${message}`,\n { where: { path: isRefSnapshot ? 'ref-snapshot' : filePath } },\n ),\n );\n }\n case 'MIGRATION.INVALID_JSON': {\n const filePath =\n typeof error.details?.['filePath'] === 'string' ? error.details['filePath'] : 'unknown';\n const message =\n typeof error.details?.['parseError'] === 'string'\n ? error.details['parseError']\n : error.message;\n const role = options?.artifactRole ?? 'from';\n return notOk(\n errorContractValidationFailed(\n role === 'to'\n ? `Target contract at ${filePath} failed to deserialize: ${message}`\n : `Predecessor contract at ${filePath} failed to deserialize: ${message}`,\n { where: { path: filePath } },\n ),\n );\n }\n case 'MIGRATION.BUNDLE_NOT_FOUND_FOR_GRAPH_NODE':\n return notOk(\n errorUnexpected(error.message, {\n why: error.why,\n fix: error.fix,\n }),\n );\n case 'MIGRATION.FILE_MISSING': {\n const file =\n typeof error.details?.['file'] === 'string' ? error.details['file'] : 'end-contract.json';\n const dir = typeof error.details?.['dir'] === 'string' ? error.details['dir'] : '';\n const jsonPath = dir ? join(dir, 'end-contract.json') : file;\n const role = options?.artifactRole ?? 'from';\n return notOk(\n errorFileNotFound(jsonPath, {\n why:\n role === 'to'\n ? `Target migration is missing its destination contract snapshot at ${jsonPath}`\n : `Predecessor migration is missing its destination contract snapshot at ${jsonPath}`,\n fix:\n role === 'to'\n ? 'Re-emit the target migration so its sibling `end-contract.json` / `end-contract.d.ts` are restored, then re-run this command.'\n : 'Re-emit the predecessor migration (`prisma-next migration plan` from its source) so its sibling `end-contract.json` is restored, then re-run this command.',\n }),\n );\n }\n default:\n return notOk(mapMigrationToolsError(error));\n }\n }\n if (CliStructuredError.is(error)) {\n return notOk(error);\n }\n throw error;\n}\n"],"mappings":";;;;;AAYA,SAAgB,mBACd,OACA,SACmC;CACnC,IAAI,oBAAoB,GAAG,KAAK,GAC9B,QAAQ,MAAM,MAAd;EACE,KAAK,8BAOH,OAAO,MAAM,qBALX,OAAO,MAAM,UAAU,eAAe,WAClC,MAAM,QAAQ,aACd,OAAO,MAAM,UAAU,kBAAkB,WACvC,MAAM,QAAQ,gBACd,SACiC,CAAC;EAE5C,KAAK,6CAA6C;GAChD,MAAM,WACJ,OAAO,MAAM,UAAU,gBAAgB,WACnC,MAAM,QAAQ,cACd;GACN,MAAM,UACJ,OAAO,MAAM,UAAU,eAAe,WAAW,MAAM,QAAQ,aAAa,MAAM;GACpF,MAAM,gBAAgB,SAAS,SAAS,gBAAgB;GACxD,OAAO,MACL,8BACE,gBACI,gDAAgD,YAChD,2BAA2B,SAAS,0BAA0B,WAClE,EAAE,OAAO,EAAE,MAAM,gBAAgB,iBAAiB,SAAS,EAAE,CAC/D,CACF;EACF;EACA,KAAK,0BAA0B;GAC7B,MAAM,WACJ,OAAO,MAAM,UAAU,gBAAgB,WAAW,MAAM,QAAQ,cAAc;GAChF,MAAM,UACJ,OAAO,MAAM,UAAU,kBAAkB,WACrC,MAAM,QAAQ,gBACd,MAAM;GAEZ,OAAO,MACL,+BAFW,SAAS,gBAAgB,YAGzB,OACL,sBAAsB,SAAS,0BAA0B,YACzD,2BAA2B,SAAS,0BAA0B,WAClE,EAAE,OAAO,EAAE,MAAM,SAAS,EAAE,CAC9B,CACF;EACF;EACA,KAAK,6CACH,OAAO,MACL,gBAAgB,MAAM,SAAS;GAC7B,KAAK,MAAM;GACX,KAAK,MAAM;EACb,CAAC,CACH;EACF,KAAK,0BAA0B;GAC7B,MAAM,OACJ,OAAO,MAAM,UAAU,YAAY,WAAW,MAAM,QAAQ,UAAU;GACxE,MAAM,MAAM,OAAO,MAAM,UAAU,WAAW,WAAW,MAAM,QAAQ,SAAS;GAChF,MAAM,WAAW,MAAM,KAAK,KAAK,mBAAmB,IAAI;GACxD,MAAM,OAAO,SAAS,gBAAgB;GACtC,OAAO,MACL,kBAAkB,UAAU;IAC1B,KACE,SAAS,OACL,oEAAoE,aACpE,yEAAyE;IAC/E,KACE,SAAS,OACL,kIACA;GACR,CAAC,CACH;EACF;EACA,SACE,OAAO,MAAM,uBAAuB,KAAK,CAAC;CAC9C;CAEF,IAAI,mBAAmB,GAAG,KAAK,GAC7B,OAAO,MAAM,KAAK;CAEpB,MAAM;AACR"}
@@ -1,6 +1,6 @@
1
1
  import { t as loadConfig } from "./config-loader-B6sJjXTv.mjs";
2
- import { N as errorContractConfigMissing, X as errorRuntime } from "./command-helpers-CoceqqMl.mjs";
3
- import { t as assertFrameworkComponentsCompatible } from "./framework-components-R_O3y5IW.mjs";
2
+ import { N as errorContractConfigMissing, X as errorRuntime } from "./command-helpers-Bbw1GbwL.mjs";
3
+ import { t as assertFrameworkComponentsCompatible } from "./framework-components-fYXjz_in.mjs";
4
4
  import { t as enrichContract } from "./contract-enrichment-a0V5Y_mL.mjs";
5
5
  import { createRequire } from "node:module";
6
6
  import { emit, getEmittedArtifactPaths } from "@prisma-next/emitter";
@@ -343,4 +343,4 @@ async function executeContractEmit(options) {
343
343
  //#endregion
344
344
  export { executeContractEmit as n, disposeEmitQueue as r, contract_emit_exports as t };
345
345
 
346
- //# sourceMappingURL=contract-emit-DxEfEc-M.mjs.map
346
+ //# sourceMappingURL=contract-emit-D-4jrNve.mjs.map