@prisma/migrate 6.5.0-dev.1 → 6.5.0-dev.2

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 (102) hide show
  1. package/dist/CLI.js +3 -4
  2. package/dist/Migrate.js +6 -7
  3. package/dist/SchemaEngine.js +6 -7
  4. package/dist/bin.js +116 -146
  5. package/dist/{chunk-WOOPRG54.js → chunk-255BRND3.js} +7 -14
  6. package/dist/{chunk-75EIHNAH.js → chunk-2NMFKGXM.js} +5 -6
  7. package/dist/chunk-3WC4XD74.js +98 -0
  8. package/dist/chunk-4EV2RVXY.js +226 -0
  9. package/dist/{chunk-YWWOSXMY.js → chunk-4JQIX6O7.js} +7 -15
  10. package/dist/{chunk-M5YNQ2NP.js → chunk-6DFJIBJX.js} +5 -12
  11. package/dist/{chunk-SGCF5OHF.js → chunk-7CQBDP4H.js} +6 -13
  12. package/dist/{chunk-7IT2ZO3D.js → chunk-AHJ2N6BJ.js} +3 -9
  13. package/dist/chunk-C2PR6JQR.js +266 -0
  14. package/dist/chunk-CTPONE6G.js +65 -0
  15. package/dist/{chunk-DUCG3NRP.js → chunk-D74DU52C.js} +633 -806
  16. package/dist/{chunk-UVNSK22K.js → chunk-DDHPSYC4.js} +122 -130
  17. package/dist/{chunk-CUDKD32S.js → chunk-DIAO4W7O.js} +11 -17
  18. package/dist/{chunk-XJQP3B4W.js → chunk-DJMFXNR4.js} +7 -15
  19. package/dist/{chunk-YD7GG4WS.js → chunk-FRTPDRF2.js} +66 -74
  20. package/dist/chunk-HIFVDK2U.js +96 -0
  21. package/dist/chunk-I4EY55DC.js +195 -0
  22. package/dist/{chunk-WLJHGKMK.js → chunk-IHDN3L3R.js} +7 -8
  23. package/dist/{chunk-V5LEZ5BX.js → chunk-IIBRYI63.js} +634 -807
  24. package/dist/{chunk-INC2OACE.js → chunk-JFKDSUIE.js} +3 -9
  25. package/dist/{chunk-V7DE6JTG.js → chunk-JZ75RIMZ.js} +3 -9
  26. package/dist/{chunk-AAATUOV6.js → chunk-L6KOIJJ5.js} +53 -59
  27. package/dist/{chunk-GN5BY5N2.js → chunk-LGYRZ6CV.js} +4 -10
  28. package/dist/chunk-LVLRGTYH.js +148 -0
  29. package/dist/{chunk-CQQQ436N.js → chunk-MATFO4ZW.js} +186 -200
  30. package/dist/{chunk-IFCV5MY4.js → chunk-OCQGHQED.js} +5 -11
  31. package/dist/chunk-ORL3LJOT.js +470 -0
  32. package/dist/{chunk-Q7ACZDDT.js → chunk-QOPTDDIH.js} +5 -12
  33. package/dist/chunk-QTAIWPLH.js +78 -0
  34. package/dist/{chunk-35LAJN5S.js → chunk-RP2N6UXA.js} +23 -29
  35. package/dist/chunk-RQFGRXJI.js +174 -0
  36. package/dist/{chunk-QBK5XTJE.js → chunk-RR6BKMNO.js} +3 -9
  37. package/dist/{chunk-ILJRJJ3S.js → chunk-RTGQXNX6.js} +3 -9
  38. package/dist/chunk-SKRR5WT4.js +76 -0
  39. package/dist/chunk-TM3ETZES.js +153 -0
  40. package/dist/{chunk-KPUNMK5W.js → chunk-TWPTG4XS.js} +5 -12
  41. package/dist/{chunk-6QFE3AWR.js → chunk-UP6FVCDK.js} +6 -13
  42. package/dist/{chunk-YKUZUAXA.js → chunk-V3ZMNXZC.js} +16 -23
  43. package/dist/chunk-WLPX3672.js +365 -0
  44. package/dist/chunk-WNH2ACJS.js +122 -0
  45. package/dist/chunk-XSNOKQTD.js +347 -0
  46. package/dist/{chunk-X6XGFLEF.js → chunk-YZVZCC3I.js} +25 -30
  47. package/dist/commands/DbCommand.js +3 -4
  48. package/dist/commands/DbDrop.js +9 -9
  49. package/dist/commands/DbExecute.js +7 -8
  50. package/dist/commands/DbPull.js +18 -19
  51. package/dist/commands/DbPush.js +12 -13
  52. package/dist/commands/DbSeed.js +4 -5
  53. package/dist/commands/MigrateCommand.js +3 -4
  54. package/dist/commands/MigrateDeploy.js +13 -14
  55. package/dist/commands/MigrateDev.js +17 -18
  56. package/dist/commands/MigrateDiff.js +8 -9
  57. package/dist/commands/MigrateReset.js +15 -16
  58. package/dist/commands/MigrateResolve.js +11 -12
  59. package/dist/commands/MigrateStatus.js +11 -12
  60. package/dist/index.js +60 -77
  61. package/dist/{multipart-parser-73VM3J4A.js → multipart-parser-NDLECNMN.js} +527 -561
  62. package/dist/utils/byline.js +5 -6
  63. package/dist/utils/captureStdout.js +2 -3
  64. package/dist/utils/countModelsAndTypes.js +2 -3
  65. package/dist/utils/ensureDatabaseExists.js +8 -9
  66. package/dist/utils/errors.js +8 -9
  67. package/dist/utils/flagErrors.js +5 -5
  68. package/dist/utils/getDatabaseVersionSafe.js +6 -7
  69. package/dist/utils/getSchemaPathAndPrint.js +4 -5
  70. package/dist/utils/handleEvaluateDataloss.js +3 -4
  71. package/dist/utils/introspectSql.js +6 -6
  72. package/dist/utils/isSchemaEmpty.js +2 -3
  73. package/dist/utils/printDatasource.js +3 -4
  74. package/dist/utils/printDatasources.js +3 -4
  75. package/dist/utils/printFiles.js +5 -6
  76. package/dist/utils/printIntrospectedSchema.js +2 -3
  77. package/dist/utils/printMigrationId.js +4 -5
  78. package/dist/utils/promptForMigrationName.js +2 -3
  79. package/dist/utils/removeSchemaFiles.js +2 -3
  80. package/dist/utils/replaceOrAddDatasource.js +2 -3
  81. package/dist/utils/replaceOrAddDatasource.test.js +7 -8
  82. package/dist/utils/saveSchemaFiles.js +2 -3
  83. package/dist/utils/seed.js +6 -7
  84. package/dist/utils/spinner.js +2 -3
  85. package/dist/utils/unixSocket.js +2 -3
  86. package/dist/views/handleViewsIO.js +2 -3
  87. package/package.json +6 -6
  88. package/dist/chunk-26XQQ4AG.js +0 -386
  89. package/dist/chunk-2RSEPJFX.js +0 -165
  90. package/dist/chunk-4B2LXK4R.js +0 -207
  91. package/dist/chunk-4UJBOCZJ.js +0 -130
  92. package/dist/chunk-5HZLCY6X.js +0 -161
  93. package/dist/chunk-6TE2RIPN.js +0 -80
  94. package/dist/chunk-7S3Q4MCN.js +0 -480
  95. package/dist/chunk-AOX7CJAS.js +0 -234
  96. package/dist/chunk-FF3526PX.js +0 -279
  97. package/dist/chunk-FUSFURVP.js +0 -86
  98. package/dist/chunk-GCTCQLOF.js +0 -365
  99. package/dist/chunk-K44VNAFW.js +0 -189
  100. package/dist/chunk-O4BT6W33.js +0 -104
  101. package/dist/chunk-TKAGMA5K.js +0 -72
  102. package/dist/chunk-U374EXYQ.js +0 -106
@@ -26,16 +26,14 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_CQQQ436N_exports = {};
30
- __export(chunk_CQQQ436N_exports, {
29
+ var chunk_MATFO4ZW_exports = {};
30
+ __export(chunk_MATFO4ZW_exports, {
31
31
  N: () => N,
32
32
  handleViewsIO: () => handleViewsIO,
33
- init_dist: () => init_dist,
34
- init_handleViewsIO: () => init_handleViewsIO,
35
33
  require_function: () => require_function,
36
34
  z: () => z
37
35
  });
38
- module.exports = __toCommonJS(chunk_CQQQ436N_exports);
36
+ module.exports = __toCommonJS(chunk_MATFO4ZW_exports);
39
37
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
40
38
  var import_internals = require("@prisma/internals");
41
39
  var import_path = __toESM(require("path"));
@@ -4253,6 +4251,50 @@ var require_TaskEither = (0, import_chunk_WWAWV7DQ.__commonJS)({
4253
4251
  }
4254
4252
  }
4255
4253
  });
4254
+ var E2 = (0, import_chunk_WWAWV7DQ.__toESM)(require_Either());
4255
+ var import_function = (0, import_chunk_WWAWV7DQ.__toESM)(require_function());
4256
+ var T2 = (0, import_chunk_WWAWV7DQ.__toESM)(require_Task());
4257
+ var TE = (0, import_chunk_WWAWV7DQ.__toESM)(require_TaskEither());
4258
+ var t = Symbol.for("@ts-pattern/matcher");
4259
+ var e = Symbol.for("@ts-pattern/isVariadic");
4260
+ var n = "@ts-pattern/anonymous-select-key";
4261
+ var r = (t2) => Boolean(t2 && "object" == typeof t2);
4262
+ var i = (e2) => e2 && !!e2[t];
4263
+ var s = (n2, o2, c2) => {
4264
+ if (i(n2)) {
4265
+ const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(o2);
4266
+ return r2 && i2 && Object.keys(i2).forEach((t2) => c2(t2, i2[t2])), r2;
4267
+ }
4268
+ if (r(n2)) {
4269
+ if (!r(o2)) return false;
4270
+ if (Array.isArray(n2)) {
4271
+ if (!Array.isArray(o2)) return false;
4272
+ let t2 = [], r2 = [], a2 = [];
4273
+ for (const s2 of n2.keys()) {
4274
+ const o3 = n2[s2];
4275
+ i(o3) && o3[e] ? a2.push(o3) : a2.length ? r2.push(o3) : t2.push(o3);
4276
+ }
4277
+ if (a2.length) {
4278
+ if (a2.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
4279
+ if (o2.length < t2.length + r2.length) return false;
4280
+ const e2 = o2.slice(0, t2.length), n3 = 0 === r2.length ? [] : o2.slice(-r2.length), i2 = o2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
4281
+ return t2.every((t3, n4) => s(t3, e2[n4], c2)) && r2.every((t3, e3) => s(t3, n3[e3], c2)) && (0 === a2.length || s(a2[0], i2, c2));
4282
+ }
4283
+ return n2.length === o2.length && n2.every((t3, e2) => s(t3, o2[e2], c2));
4284
+ }
4285
+ return Reflect.ownKeys(n2).every((e2) => {
4286
+ const r2 = n2[e2];
4287
+ return (e2 in o2 || i(a2 = r2) && "optional" === a2[t]().matcherType) && s(r2, o2[e2], c2);
4288
+ var a2;
4289
+ });
4290
+ }
4291
+ return Object.is(o2, n2);
4292
+ };
4293
+ var o = (e2) => {
4294
+ var n2, s2, a2;
4295
+ return r(e2) ? i(e2) ? null != (n2 = null == (s2 = (a2 = e2[t]()).getSelectionKeys) ? void 0 : s2.call(a2)) ? n2 : [] : Array.isArray(e2) ? c(e2, o) : c(Object.values(e2), o) : [];
4296
+ };
4297
+ var c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
4256
4298
  function a(...t2) {
4257
4299
  if (1 === t2.length) {
4258
4300
  const [e2] = t2;
@@ -4288,6 +4330,14 @@ function h(e2) {
4288
4330
  return void 0 === t2 ? (o(e2).forEach((t3) => r2(t3, void 0)), { matched: true, selections: n2 }) : { matched: s(e2, t2, r2), selections: n2 };
4289
4331
  }, getSelectionKeys: () => o(e2), matcherType: "optional" }) });
4290
4332
  }
4333
+ var f = (t2, e2) => {
4334
+ for (const n2 of t2) if (!e2(n2)) return false;
4335
+ return true;
4336
+ };
4337
+ var g = (t2, e2) => {
4338
+ for (const [n2, r2] of t2.entries()) if (!e2(r2, n2)) return false;
4339
+ return true;
4340
+ };
4291
4341
  function m(...e2) {
4292
4342
  return u({ [t]: () => ({ match: (t2) => {
4293
4343
  let n2 = {};
@@ -4327,195 +4377,141 @@ function b(t2) {
4327
4377
  function w(t2) {
4328
4378
  return "bigint" == typeof t2;
4329
4379
  }
4380
+ var S = u(p(function(t2) {
4381
+ return true;
4382
+ }));
4383
+ var O = S;
4384
+ var j = (t2) => Object.assign(u(t2), { startsWith: (e2) => {
4385
+ return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.startsWith(n2)))));
4386
+ var n2;
4387
+ }, endsWith: (e2) => {
4388
+ return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.endsWith(n2)))));
4389
+ var n2;
4390
+ }, minLength: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length >= t3))(e2))), length: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length === t3))(e2))), maxLength: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length <= t3))(e2))), includes: (e2) => {
4391
+ return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.includes(n2)))));
4392
+ var n2;
4393
+ }, regex: (e2) => {
4394
+ return j(m(t2, (n2 = e2, p((t3) => b(t3) && Boolean(t3.match(n2))))));
4395
+ var n2;
4396
+ } });
4397
+ var K = j(p(b));
4398
+ var x = (t2) => Object.assign(u(t2), { between: (e2, n2) => x(m(t2, ((t3, e3) => p((n3) => v(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 < t3))(e2))), gt: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 > t3))(e2))), lte: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 <= t3))(e2))), gte: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 >= t3))(e2))), int: () => x(m(t2, p((t3) => v(t3) && Number.isInteger(t3)))), finite: () => x(m(t2, p((t3) => v(t3) && Number.isFinite(t3)))), positive: () => x(m(t2, p((t3) => v(t3) && t3 > 0))), negative: () => x(m(t2, p((t3) => v(t3) && t3 < 0))) });
4399
+ var E = x(p(v));
4400
+ var A = (t2) => Object.assign(u(t2), { between: (e2, n2) => A(m(t2, ((t3, e3) => p((n3) => w(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 < t3))(e2))), gt: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 > t3))(e2))), lte: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 <= t3))(e2))), gte: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 >= t3))(e2))), positive: () => A(m(t2, p((t3) => w(t3) && t3 > 0))), negative: () => A(m(t2, p((t3) => w(t3) && t3 < 0))) });
4401
+ var P = A(p(w));
4402
+ var T = u(p(function(t2) {
4403
+ return "boolean" == typeof t2;
4404
+ }));
4405
+ var B = u(p(function(t2) {
4406
+ return "symbol" == typeof t2;
4407
+ }));
4408
+ var _ = u(p(function(t2) {
4409
+ return null == t2;
4410
+ }));
4411
+ var k = u(p(function(t2) {
4412
+ return null != t2;
4413
+ }));
4414
+ var N = { __proto__: null, matcher: t, optional: h, array: function(...e2) {
4415
+ return l({ [t]: () => ({ match: (t2) => {
4416
+ if (!Array.isArray(t2)) return { matched: false };
4417
+ if (0 === e2.length) return { matched: true };
4418
+ const n2 = e2[0];
4419
+ let r2 = {};
4420
+ if (0 === t2.length) return o(n2).forEach((t3) => {
4421
+ r2[t3] = [];
4422
+ }), { matched: true, selections: r2 };
4423
+ const i2 = (t3, e3) => {
4424
+ r2[t3] = (r2[t3] || []).concat([e3]);
4425
+ };
4426
+ return { matched: t2.every((t3) => s(n2, t3, i2)), selections: r2 };
4427
+ }, getSelectionKeys: () => 0 === e2.length ? [] : o(e2[0]) }) });
4428
+ }, set: function(...e2) {
4429
+ return u({ [t]: () => ({ match: (t2) => {
4430
+ if (!(t2 instanceof Set)) return { matched: false };
4431
+ let n2 = {};
4432
+ if (0 === t2.size) return { matched: true, selections: n2 };
4433
+ if (0 === e2.length) return { matched: true };
4434
+ const r2 = (t3, e3) => {
4435
+ n2[t3] = (n2[t3] || []).concat([e3]);
4436
+ }, i2 = e2[0];
4437
+ return { matched: f(t2, (t3) => s(i2, t3, r2)), selections: n2 };
4438
+ }, getSelectionKeys: () => 0 === e2.length ? [] : o(e2[0]) }) });
4439
+ }, map: function(...e2) {
4440
+ return u({ [t]: () => ({ match: (t2) => {
4441
+ if (!(t2 instanceof Map)) return { matched: false };
4442
+ let n2 = {};
4443
+ if (0 === t2.size) return { matched: true, selections: n2 };
4444
+ const r2 = (t3, e3) => {
4445
+ n2[t3] = (n2[t3] || []).concat([e3]);
4446
+ };
4447
+ if (0 === e2.length) return { matched: true };
4448
+ var i2;
4449
+ if (1 === e2.length) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${null == (i2 = e2[0]) ? void 0 : i2.toString()}`);
4450
+ const [o2, c2] = e2;
4451
+ return { matched: g(t2, (t3, e3) => {
4452
+ const n3 = s(o2, e3, r2), i3 = s(c2, t3, r2);
4453
+ return n3 && i3;
4454
+ }), selections: n2 };
4455
+ }, getSelectionKeys: () => 0 === e2.length ? [] : [...o(e2[0]), ...o(e2[1])] }) });
4456
+ }, intersection: m, union: d, not: function(e2) {
4457
+ return u({ [t]: () => ({ match: (t2) => ({ matched: !s(e2, t2, () => {
4458
+ }) }), getSelectionKeys: () => [], matcherType: "not" }) });
4459
+ }, when: p, select: y, any: S, _: O, string: K, number: E, bigint: P, boolean: T, symbol: B, nullish: _, nonNullable: k, instanceOf: function(t2) {
4460
+ return u(p(/* @__PURE__ */ function(t3) {
4461
+ return (e2) => e2 instanceof t3;
4462
+ }(t2)));
4463
+ }, shape: function(t2) {
4464
+ return u(p(a(t2)));
4465
+ } };
4466
+ var W = class extends Error {
4467
+ constructor(t2) {
4468
+ let e2;
4469
+ try {
4470
+ e2 = JSON.stringify(t2);
4471
+ } catch (n2) {
4472
+ e2 = t2;
4473
+ }
4474
+ super(`Pattern matching error: no pattern matches value ${e2}`), this.input = void 0, this.input = t2;
4475
+ }
4476
+ };
4477
+ var $ = { matched: false, value: void 0 };
4330
4478
  function z(t2) {
4331
4479
  return new I(t2, $);
4332
4480
  }
4333
- var t, e, n, r, i, s, o, c, f, g, S, O, j, K, x, E, A, P, T, B, _, k, N, W, $, I;
4334
- var init_dist = (0, import_chunk_WWAWV7DQ.__esm)({
4335
- "../../node_modules/.pnpm/ts-pattern@5.6.2/node_modules/ts-pattern/dist/index.js"() {
4336
- "use strict";
4337
- t = Symbol.for("@ts-pattern/matcher");
4338
- e = Symbol.for("@ts-pattern/isVariadic");
4339
- n = "@ts-pattern/anonymous-select-key";
4340
- r = (t2) => Boolean(t2 && "object" == typeof t2);
4341
- i = (e2) => e2 && !!e2[t];
4342
- s = (n2, o2, c2) => {
4343
- if (i(n2)) {
4344
- const e2 = n2[t](), { matched: r2, selections: i2 } = e2.match(o2);
4345
- return r2 && i2 && Object.keys(i2).forEach((t2) => c2(t2, i2[t2])), r2;
4346
- }
4347
- if (r(n2)) {
4348
- if (!r(o2)) return false;
4349
- if (Array.isArray(n2)) {
4350
- if (!Array.isArray(o2)) return false;
4351
- let t2 = [], r2 = [], a2 = [];
4352
- for (const s2 of n2.keys()) {
4353
- const o3 = n2[s2];
4354
- i(o3) && o3[e] ? a2.push(o3) : a2.length ? r2.push(o3) : t2.push(o3);
4355
- }
4356
- if (a2.length) {
4357
- if (a2.length > 1) throw new Error("Pattern error: Using `...P.array(...)` several times in a single pattern is not allowed.");
4358
- if (o2.length < t2.length + r2.length) return false;
4359
- const e2 = o2.slice(0, t2.length), n3 = 0 === r2.length ? [] : o2.slice(-r2.length), i2 = o2.slice(t2.length, 0 === r2.length ? Infinity : -r2.length);
4360
- return t2.every((t3, n4) => s(t3, e2[n4], c2)) && r2.every((t3, e3) => s(t3, n3[e3], c2)) && (0 === a2.length || s(a2[0], i2, c2));
4361
- }
4362
- return n2.length === o2.length && n2.every((t3, e2) => s(t3, o2[e2], c2));
4363
- }
4364
- return Reflect.ownKeys(n2).every((e2) => {
4365
- const r2 = n2[e2];
4366
- return (e2 in o2 || i(a2 = r2) && "optional" === a2[t]().matcherType) && s(r2, o2[e2], c2);
4367
- var a2;
4368
- });
4369
- }
4370
- return Object.is(o2, n2);
4371
- };
4372
- o = (e2) => {
4373
- var n2, s2, a2;
4374
- return r(e2) ? i(e2) ? null != (n2 = null == (s2 = (a2 = e2[t]()).getSelectionKeys) ? void 0 : s2.call(a2)) ? n2 : [] : Array.isArray(e2) ? c(e2, o) : c(Object.values(e2), o) : [];
4375
- };
4376
- c = (t2, e2) => t2.reduce((t3, n2) => t3.concat(e2(n2)), []);
4377
- f = (t2, e2) => {
4378
- for (const n2 of t2) if (!e2(n2)) return false;
4379
- return true;
4380
- };
4381
- g = (t2, e2) => {
4382
- for (const [n2, r2] of t2.entries()) if (!e2(r2, n2)) return false;
4383
- return true;
4384
- };
4385
- S = u(p(function(t2) {
4386
- return true;
4387
- }));
4388
- O = S;
4389
- j = (t2) => Object.assign(u(t2), { startsWith: (e2) => {
4390
- return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.startsWith(n2)))));
4391
- var n2;
4392
- }, endsWith: (e2) => {
4393
- return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.endsWith(n2)))));
4394
- var n2;
4395
- }, minLength: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length >= t3))(e2))), length: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length === t3))(e2))), maxLength: (e2) => j(m(t2, ((t3) => p((e3) => b(e3) && e3.length <= t3))(e2))), includes: (e2) => {
4396
- return j(m(t2, (n2 = e2, p((t3) => b(t3) && t3.includes(n2)))));
4397
- var n2;
4398
- }, regex: (e2) => {
4399
- return j(m(t2, (n2 = e2, p((t3) => b(t3) && Boolean(t3.match(n2))))));
4400
- var n2;
4401
- } });
4402
- K = j(p(b));
4403
- x = (t2) => Object.assign(u(t2), { between: (e2, n2) => x(m(t2, ((t3, e3) => p((n3) => v(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 < t3))(e2))), gt: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 > t3))(e2))), lte: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 <= t3))(e2))), gte: (e2) => x(m(t2, ((t3) => p((e3) => v(e3) && e3 >= t3))(e2))), int: () => x(m(t2, p((t3) => v(t3) && Number.isInteger(t3)))), finite: () => x(m(t2, p((t3) => v(t3) && Number.isFinite(t3)))), positive: () => x(m(t2, p((t3) => v(t3) && t3 > 0))), negative: () => x(m(t2, p((t3) => v(t3) && t3 < 0))) });
4404
- E = x(p(v));
4405
- A = (t2) => Object.assign(u(t2), { between: (e2, n2) => A(m(t2, ((t3, e3) => p((n3) => w(n3) && t3 <= n3 && e3 >= n3))(e2, n2))), lt: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 < t3))(e2))), gt: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 > t3))(e2))), lte: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 <= t3))(e2))), gte: (e2) => A(m(t2, ((t3) => p((e3) => w(e3) && e3 >= t3))(e2))), positive: () => A(m(t2, p((t3) => w(t3) && t3 > 0))), negative: () => A(m(t2, p((t3) => w(t3) && t3 < 0))) });
4406
- P = A(p(w));
4407
- T = u(p(function(t2) {
4408
- return "boolean" == typeof t2;
4409
- }));
4410
- B = u(p(function(t2) {
4411
- return "symbol" == typeof t2;
4412
- }));
4413
- _ = u(p(function(t2) {
4414
- return null == t2;
4415
- }));
4416
- k = u(p(function(t2) {
4417
- return null != t2;
4418
- }));
4419
- N = { __proto__: null, matcher: t, optional: h, array: function(...e2) {
4420
- return l({ [t]: () => ({ match: (t2) => {
4421
- if (!Array.isArray(t2)) return { matched: false };
4422
- if (0 === e2.length) return { matched: true };
4423
- const n2 = e2[0];
4424
- let r2 = {};
4425
- if (0 === t2.length) return o(n2).forEach((t3) => {
4426
- r2[t3] = [];
4427
- }), { matched: true, selections: r2 };
4428
- const i2 = (t3, e3) => {
4429
- r2[t3] = (r2[t3] || []).concat([e3]);
4430
- };
4431
- return { matched: t2.every((t3) => s(n2, t3, i2)), selections: r2 };
4432
- }, getSelectionKeys: () => 0 === e2.length ? [] : o(e2[0]) }) });
4433
- }, set: function(...e2) {
4434
- return u({ [t]: () => ({ match: (t2) => {
4435
- if (!(t2 instanceof Set)) return { matched: false };
4436
- let n2 = {};
4437
- if (0 === t2.size) return { matched: true, selections: n2 };
4438
- if (0 === e2.length) return { matched: true };
4439
- const r2 = (t3, e3) => {
4440
- n2[t3] = (n2[t3] || []).concat([e3]);
4441
- }, i2 = e2[0];
4442
- return { matched: f(t2, (t3) => s(i2, t3, r2)), selections: n2 };
4443
- }, getSelectionKeys: () => 0 === e2.length ? [] : o(e2[0]) }) });
4444
- }, map: function(...e2) {
4445
- return u({ [t]: () => ({ match: (t2) => {
4446
- if (!(t2 instanceof Map)) return { matched: false };
4447
- let n2 = {};
4448
- if (0 === t2.size) return { matched: true, selections: n2 };
4449
- const r2 = (t3, e3) => {
4450
- n2[t3] = (n2[t3] || []).concat([e3]);
4451
- };
4452
- if (0 === e2.length) return { matched: true };
4453
- var i2;
4454
- if (1 === e2.length) throw new Error(`\`P.map\` wasn't given enough arguments. Expected (key, value), received ${null == (i2 = e2[0]) ? void 0 : i2.toString()}`);
4455
- const [o2, c2] = e2;
4456
- return { matched: g(t2, (t3, e3) => {
4457
- const n3 = s(o2, e3, r2), i3 = s(c2, t3, r2);
4458
- return n3 && i3;
4459
- }), selections: n2 };
4460
- }, getSelectionKeys: () => 0 === e2.length ? [] : [...o(e2[0]), ...o(e2[1])] }) });
4461
- }, intersection: m, union: d, not: function(e2) {
4462
- return u({ [t]: () => ({ match: (t2) => ({ matched: !s(e2, t2, () => {
4463
- }) }), getSelectionKeys: () => [], matcherType: "not" }) });
4464
- }, when: p, select: y, any: S, _: O, string: K, number: E, bigint: P, boolean: T, symbol: B, nullish: _, nonNullable: k, instanceOf: function(t2) {
4465
- return u(p(/* @__PURE__ */ function(t3) {
4466
- return (e2) => e2 instanceof t3;
4467
- }(t2)));
4468
- }, shape: function(t2) {
4469
- return u(p(a(t2)));
4470
- } };
4471
- W = class extends Error {
4472
- constructor(t2) {
4473
- let e2;
4474
- try {
4475
- e2 = JSON.stringify(t2);
4476
- } catch (n2) {
4477
- e2 = t2;
4478
- }
4479
- super(`Pattern matching error: no pattern matches value ${e2}`), this.input = void 0, this.input = t2;
4480
- }
4481
- };
4482
- $ = { matched: false, value: void 0 };
4483
- I = class _I {
4484
- constructor(t2, e2) {
4485
- this.input = void 0, this.state = void 0, this.input = t2, this.state = e2;
4486
- }
4487
- with(...t2) {
4488
- if (this.state.matched) return this;
4489
- const e2 = t2[t2.length - 1], r2 = [t2[0]];
4490
- let i2;
4491
- 3 === t2.length && "function" == typeof t2[1] ? i2 = t2[1] : t2.length > 2 && r2.push(...t2.slice(1, t2.length - 1));
4492
- let o2 = false, c2 = {};
4493
- const a2 = (t3, e3) => {
4494
- o2 = true, c2[t3] = e3;
4495
- }, u2 = !r2.some((t3) => s(t3, this.input, a2)) || i2 && !Boolean(i2(this.input)) ? $ : { matched: true, value: e2(o2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
4496
- return new _I(this.input, u2);
4497
- }
4498
- when(t2, e2) {
4499
- if (this.state.matched) return this;
4500
- const n2 = Boolean(t2(this.input));
4501
- return new _I(this.input, n2 ? { matched: true, value: e2(this.input, this.input) } : $);
4502
- }
4503
- otherwise(t2) {
4504
- return this.state.matched ? this.state.value : t2(this.input);
4505
- }
4506
- exhaustive() {
4507
- if (this.state.matched) return this.state.value;
4508
- throw new W(this.input);
4509
- }
4510
- run() {
4511
- return this.exhaustive();
4512
- }
4513
- returnType() {
4514
- return this;
4515
- }
4516
- };
4481
+ var I = class _I {
4482
+ constructor(t2, e2) {
4483
+ this.input = void 0, this.state = void 0, this.input = t2, this.state = e2;
4517
4484
  }
4518
- });
4485
+ with(...t2) {
4486
+ if (this.state.matched) return this;
4487
+ const e2 = t2[t2.length - 1], r2 = [t2[0]];
4488
+ let i2;
4489
+ 3 === t2.length && "function" == typeof t2[1] ? i2 = t2[1] : t2.length > 2 && r2.push(...t2.slice(1, t2.length - 1));
4490
+ let o2 = false, c2 = {};
4491
+ const a2 = (t3, e3) => {
4492
+ o2 = true, c2[t3] = e3;
4493
+ }, u2 = !r2.some((t3) => s(t3, this.input, a2)) || i2 && !Boolean(i2(this.input)) ? $ : { matched: true, value: e2(o2 ? n in c2 ? c2[n] : c2 : this.input, this.input) };
4494
+ return new _I(this.input, u2);
4495
+ }
4496
+ when(t2, e2) {
4497
+ if (this.state.matched) return this;
4498
+ const n2 = Boolean(t2(this.input));
4499
+ return new _I(this.input, n2 ? { matched: true, value: e2(this.input, this.input) } : $);
4500
+ }
4501
+ otherwise(t2) {
4502
+ return this.state.matched ? this.state.value : t2(this.input);
4503
+ }
4504
+ exhaustive() {
4505
+ if (this.state.matched) return this.state.value;
4506
+ throw new W(this.input);
4507
+ }
4508
+ run() {
4509
+ return this.exhaustive();
4510
+ }
4511
+ returnType() {
4512
+ return this;
4513
+ }
4514
+ };
4519
4515
  async function handleViewsIO({ views, schemaPath }) {
4520
4516
  const prismaDir = import_path.default.dirname((0, import_internals.pathToPosix)(schemaPath));
4521
4517
  const viewsDir = import_path.default.posix.join(prismaDir, "views");
@@ -4585,13 +4581,3 @@ ${e2.error}.`);
4585
4581
  await pipeline();
4586
4582
  throw error;
4587
4583
  }
4588
- var E2, import_function, T2, TE;
4589
- var init_handleViewsIO = (0, import_chunk_WWAWV7DQ.__esm)({
4590
- "src/views/handleViewsIO.ts"() {
4591
- E2 = (0, import_chunk_WWAWV7DQ.__toESM)(require_Either());
4592
- import_function = (0, import_chunk_WWAWV7DQ.__toESM)(require_function());
4593
- T2 = (0, import_chunk_WWAWV7DQ.__toESM)(require_Task());
4594
- TE = (0, import_chunk_WWAWV7DQ.__toESM)(require_TaskEither());
4595
- init_dist();
4596
- }
4597
- });
@@ -16,12 +16,11 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_IFCV5MY4_exports = {};
20
- __export(chunk_IFCV5MY4_exports, {
21
- getMigrationName: () => getMigrationName,
22
- init_promptForMigrationName: () => init_promptForMigrationName
19
+ var chunk_OCQGHQED_exports = {};
20
+ __export(chunk_OCQGHQED_exports, {
21
+ getMigrationName: () => getMigrationName
23
22
  });
24
- module.exports = __toCommonJS(chunk_IFCV5MY4_exports);
23
+ module.exports = __toCommonJS(chunk_OCQGHQED_exports);
25
24
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
26
25
  var import_internals = require("@prisma/internals");
27
26
  var import_prompts = require("prompts");
@@ -1184,6 +1183,7 @@ var require_slugify = (0, import_chunk_WWAWV7DQ.__commonJS)({
1184
1183
  module2.exports.counter = counter;
1185
1184
  }
1186
1185
  });
1186
+ var import_slugify = (0, import_chunk_WWAWV7DQ.__toESM)(require_slugify());
1187
1187
  async function getMigrationName(name) {
1188
1188
  const maxMigrationNameLength = 200;
1189
1189
  if (name) {
@@ -1213,9 +1213,3 @@ async function getMigrationName(name) {
1213
1213
  name: (0, import_slugify.default)(response.name, { separator: "_" }).substring(0, maxMigrationNameLength) || ""
1214
1214
  };
1215
1215
  }
1216
- var import_slugify;
1217
- var init_promptForMigrationName = (0, import_chunk_WWAWV7DQ.__esm)({
1218
- "src/utils/promptForMigrationName.ts"() {
1219
- import_slugify = (0, import_chunk_WWAWV7DQ.__toESM)(require_slugify());
1220
- }
1221
- });