@prisma/migrate 6.3.0-integration-simpler-typeinfo-query.1 → 6.3.0-integration-studio-ux-refinements.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/dist/Migrate.js +5 -5
  2. package/dist/SchemaEngine.js +5 -5
  3. package/dist/bin.js +41 -42
  4. package/dist/{chunk-LLGEQ76N.js → chunk-33HVTIBE.js} +15 -15
  5. package/dist/{chunk-BAVMZZAR.js → chunk-4BFDHH3U.js} +12 -12
  6. package/dist/{chunk-XLLUFIQK.js → chunk-7MUF3HLX.js} +9 -8
  7. package/dist/{chunk-SV5GANSI.js → chunk-7TICHBC5.js} +10 -10
  8. package/dist/{chunk-GJN3CSXW.js → chunk-AOCCG7RR.js} +6 -6
  9. package/dist/{chunk-ZLGLVUFD.js → chunk-E2XKFV2C.js} +8 -8
  10. package/dist/{chunk-LVFPGUOH.js → chunk-E3UZYEGF.js} +92 -87
  11. package/dist/{chunk-BAFPAACN.js → chunk-ILJRJJ3S.js} +4 -4
  12. package/dist/{chunk-E3KHFUFQ.js → chunk-J77IRNPE.js} +9 -124
  13. package/dist/{chunk-RYWEOVLN.js → chunk-KHICE54Q.js} +6 -6
  14. package/dist/{chunk-5VYRCIVT.js → chunk-MQQLTARC.js} +100 -182
  15. package/dist/{chunk-MWEO3VUS.js → chunk-NCDRH4BH.js} +7 -7
  16. package/dist/{chunk-VWV2NY26.js → chunk-NKQGJ3AE.js} +7 -3
  17. package/dist/{chunk-XVL5RF2T.js → chunk-OANG4W7W.js} +15 -15
  18. package/dist/{chunk-55NRLWME.js → chunk-PSSOKBLN.js} +1029 -339
  19. package/dist/{chunk-EXUBPCXZ.js → chunk-TFIFMCN4.js} +18 -18
  20. package/dist/{chunk-76XWADEV.js → chunk-TJZ4FW7K.js} +10 -10
  21. package/dist/{chunk-ZBOJAYON.js → chunk-UI76O6B2.js} +6 -6
  22. package/dist/{chunk-KEBB7UIB.js → chunk-UQQQ6HXZ.js} +5 -3
  23. package/dist/{chunk-W3ROQKBN.js → chunk-V7DE6JTG.js} +4 -4
  24. package/dist/{chunk-UJWMQPUH.js → chunk-XQEPG5ZX.js} +10 -10
  25. package/dist/{chunk-YOW3VBYS.js → chunk-XQJTDY7A.js} +6 -6
  26. package/dist/{chunk-WIZM7TFT.js → chunk-YKUZUAXA.js} +443 -55
  27. package/dist/commands/DbDrop.js +3 -3
  28. package/dist/commands/DbExecute.js +6 -6
  29. package/dist/commands/DbPull.js +8 -8
  30. package/dist/commands/DbPush.js +7 -7
  31. package/dist/commands/DbSeed.js +4 -5
  32. package/dist/commands/MigrateDeploy.js +7 -7
  33. package/dist/commands/MigrateDev.js +8 -9
  34. package/dist/commands/MigrateDiff.js +7 -8
  35. package/dist/commands/MigrateReset.js +8 -9
  36. package/dist/commands/MigrateResolve.js +7 -7
  37. package/dist/commands/MigrateStatus.js +7 -7
  38. package/dist/index.js +52 -53
  39. package/dist/internals/src/cli/getTypescriptVersion.d.ts +1 -0
  40. package/dist/internals/src/index.d.ts +1 -0
  41. package/dist/internals/src/tracing/types.d.ts +26 -16
  42. package/dist/internals/src/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
  43. package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +1 -1
  44. package/dist/migrate/src/utils/printDatasources.d.ts +2 -1
  45. package/dist/{multipart-parser-KKECAI5D.js → multipart-parser-73VM3J4A.js} +10 -7
  46. package/dist/{multipart-parser-47FFAP42-P3F6TPHJ.js → multipart-parser-ITART6UP-FFJAMHWE.js} +25 -22
  47. package/dist/typescript-AILDXN3I.js +205230 -0
  48. package/dist/typescript-WN4QH2CP.js +205192 -0
  49. package/dist/utils/ensureDatabaseExists.js +7 -7
  50. package/dist/utils/getDatabaseVersionSafe.js +5 -5
  51. package/dist/utils/introspectSql.js +4 -4
  52. package/dist/utils/removeSchemaFiles.js +3 -3
  53. package/dist/utils/saveSchemaFiles.js +3 -3
  54. package/dist/utils/seed.js +6 -7
  55. package/dist/utils/setupMSSQL.js +62 -59
  56. package/dist/utils/setupMongo.js +17608 -14119
  57. package/dist/utils/setupMysql.js +45 -0
  58. package/dist/views/handleViewsIO.js +3 -3
  59. package/package.json +14 -15
  60. package/dist/chunk-EFPE3Q7J.js +0 -424
  61. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +0 -9
@@ -26,39 +26,38 @@ 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_5VYRCIVT_exports = {};
30
- __export(chunk_5VYRCIVT_exports, {
29
+ var chunk_MQQLTARC_exports = {};
30
+ __export(chunk_MQQLTARC_exports, {
31
31
  MigrateDiff: () => MigrateDiff,
32
32
  init_MigrateDiff: () => init_MigrateDiff
33
33
  });
34
- module.exports = __toCommonJS(chunk_5VYRCIVT_exports);
35
- var import_chunk_VWV2NY26 = require("./chunk-VWV2NY26.js");
34
+ module.exports = __toCommonJS(chunk_MQQLTARC_exports);
35
+ var import_chunk_NKQGJ3AE = require("./chunk-NKQGJ3AE.js");
36
36
  var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
37
37
  var import_chunk_TKAGMA5K = require("./chunk-TKAGMA5K.js");
38
- var import_chunk_WIZM7TFT = require("./chunk-WIZM7TFT.js");
39
- var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
40
- var import_chunk_LVFPGUOH = require("./chunk-LVFPGUOH.js");
38
+ var import_chunk_NCDRH4BH = require("./chunk-NCDRH4BH.js");
39
+ var import_chunk_E3UZYEGF = require("./chunk-E3UZYEGF.js");
41
40
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
42
41
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
43
- var import_process = __toESM(require("process"));
44
- var import_promises = __toESM(require("fs/promises"));
45
- var import_url = require("url");
46
- var import_path = __toESM(require("path"));
47
- var import_url2 = require("url");
48
- var import_promises2 = __toESM(require("fs/promises"));
49
- var import_path2 = __toESM(require("path"));
50
- var import_path3 = __toESM(require("path"));
42
+ var import_node_process = __toESM(require("node:process"));
43
+ var import_promises = __toESM(require("node:fs/promises"));
44
+ var import_node_url = require("node:url");
45
+ var import_node_path = __toESM(require("node:path"));
46
+ var import_node_url2 = require("node:url");
47
+ var import_promises2 = __toESM(require("node:fs/promises"));
48
+ var import_node_path2 = __toESM(require("node:path"));
49
+ var import_node_path3 = __toESM(require("node:path"));
51
50
  var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
52
- var import_path4 = __toESM(require("path"));
51
+ var import_node_path4 = __toESM(require("node:path"));
53
52
  var import_debug = __toESM(require("@prisma/debug"));
54
53
  var import_get_platform = require("@prisma/get-platform");
55
54
  var import_debug2 = require("@prisma/debug");
56
55
  var import_fs = __toESM(require("fs"));
57
- var import_path5 = __toESM(require("path"));
56
+ var import_path = __toESM(require("path"));
58
57
  var import_util = require("util");
59
58
  var import_debug3 = __toESM(require("@prisma/debug"));
60
59
  var import_internals = require("@prisma/internals");
61
- var import_path6 = __toESM(require("path"));
60
+ var import_path2 = __toESM(require("path"));
62
61
  var require_promisify = (0, import_chunk_WWAWV7DQ.__commonJS)({
63
62
  "../../node_modules/.pnpm/fs-jetpack@5.1.0/node_modules/fs-jetpack/lib/utils/promisify.js"(exports, module2) {
64
63
  "use strict";
@@ -1315,11 +1314,11 @@ var require_brace_expansion = (0, import_chunk_WWAWV7DQ.__commonJS)({
1315
1314
  if (pad) {
1316
1315
  var need = width - c.length;
1317
1316
  if (need > 0) {
1318
- var z = new Array(need + 1).join("0");
1317
+ var z2 = new Array(need + 1).join("0");
1319
1318
  if (i < 0)
1320
- c = "-" + z + c.slice(1);
1319
+ c = "-" + z2 + c.slice(1);
1321
1320
  else
1322
- c = z + c;
1321
+ c = z2 + c;
1323
1322
  }
1324
1323
  }
1325
1324
  }
@@ -1615,6 +1614,7 @@ var require_minimatch = (0, import_chunk_WWAWV7DQ.__commonJS)({
1615
1614
  continue;
1616
1615
  }
1617
1616
  switch (c) {
1617
+ /* istanbul ignore next */
1618
1618
  case "/": {
1619
1619
  return false;
1620
1620
  }
@@ -1622,6 +1622,8 @@ var require_minimatch = (0, import_chunk_WWAWV7DQ.__commonJS)({
1622
1622
  clearStateChar();
1623
1623
  escaping = true;
1624
1624
  continue;
1625
+ // the various stateChar values
1626
+ // for the "extglob" stuff.
1625
1627
  case "?":
1626
1628
  case "*":
1627
1629
  case "+":
@@ -1681,6 +1683,7 @@ var require_minimatch = (0, import_chunk_WWAWV7DQ.__commonJS)({
1681
1683
  clearStateChar();
1682
1684
  re += "|";
1683
1685
  continue;
1686
+ // these are mostly the same in regexp and glob
1684
1687
  case "[":
1685
1688
  clearStateChar();
1686
1689
  if (inClass) {
@@ -6157,8 +6160,8 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
6157
6160
  mod
6158
6161
  ));
6159
6162
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
6160
- var src_exports = {};
6161
- __export2(src_exports, {
6163
+ var index_exports = {};
6164
+ __export2(index_exports, {
6162
6165
  CompositeFilesResolver: () => CompositeFilesResolver,
6163
6166
  InMemoryFilesResolver: () => InMemoryFilesResolver,
6164
6167
  loadRelatedSchemaFiles: () => loadRelatedSchemaFiles,
@@ -6166,10 +6169,10 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
6166
6169
  realFsResolver: () => realFsResolver,
6167
6170
  usesPrismaSchemaFolder: () => usesPrismaSchemaFolder2
6168
6171
  });
6169
- module2.exports = __toCommonJS2(src_exports);
6170
- var import_node_path22 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("path"));
6172
+ module2.exports = __toCommonJS2(index_exports);
6173
+ var import_node_path22 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("node:path"));
6171
6174
  var import_prisma_schema_wasm2 = (0, import_chunk_WWAWV7DQ.__require)("@prisma/prisma-schema-wasm");
6172
- var import_node_path5 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("path"));
6175
+ var import_node_path5 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("node:path"));
6173
6176
  function createFileNameToKeyMapper(options) {
6174
6177
  if (options.caseSensitive) {
6175
6178
  return (fileName) => fileName;
@@ -6394,15 +6397,15 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
6394
6397
  }
6395
6398
  });
6396
6399
  async function findUp(name, {
6397
- cwd = import_process.default.cwd(),
6400
+ cwd = import_node_process.default.cwd(),
6398
6401
  type = "file",
6399
6402
  stopAt
6400
6403
  } = {}) {
6401
- let directory = import_path.default.resolve(toPath(cwd) ?? "");
6402
- const { root } = import_path.default.parse(directory);
6403
- stopAt = import_path.default.resolve(directory, toPath(stopAt ?? root));
6404
+ let directory = import_node_path.default.resolve(toPath(cwd) ?? "");
6405
+ const { root } = import_node_path.default.parse(directory);
6406
+ stopAt = import_node_path.default.resolve(directory, toPath(stopAt ?? root));
6404
6407
  while (directory && directory !== stopAt && directory !== root) {
6405
- const filePath = import_path.default.isAbsolute(name) ? name : import_path.default.join(directory, name);
6408
+ const filePath = import_node_path.default.isAbsolute(name) ? name : import_node_path.default.join(directory, name);
6406
6409
  try {
6407
6410
  const stats = await import_promises.default.stat(filePath);
6408
6411
  if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) {
@@ -6410,14 +6413,14 @@ async function findUp(name, {
6410
6413
  }
6411
6414
  } catch {
6412
6415
  }
6413
- directory = import_path.default.dirname(directory);
6416
+ directory = import_node_path.default.dirname(directory);
6414
6417
  }
6415
6418
  }
6416
6419
  var toPath;
6417
6420
  var init_find_up_simple = (0, import_chunk_WWAWV7DQ.__esm)({
6418
6421
  "../../node_modules/.pnpm/find-up-simple@1.0.0/node_modules/find-up-simple/index.js"() {
6419
6422
  "use strict";
6420
- toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
6423
+ toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
6421
6424
  }
6422
6425
  });
6423
6426
  var require_js_tokens = (0, import_chunk_WWAWV7DQ.__commonJS)({
@@ -6953,26 +6956,26 @@ var require_conversions = (0, import_chunk_WWAWV7DQ.__commonJS)({
6953
6956
  b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
6954
6957
  var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
6955
6958
  var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
6956
- var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
6957
- return [x * 100, y * 100, z * 100];
6959
+ var z2 = r * 0.0193 + g * 0.1192 + b * 0.9505;
6960
+ return [x * 100, y * 100, z2 * 100];
6958
6961
  };
6959
6962
  convert.rgb.lab = function(rgb) {
6960
6963
  var xyz = convert.rgb.xyz(rgb);
6961
6964
  var x = xyz[0];
6962
6965
  var y = xyz[1];
6963
- var z = xyz[2];
6966
+ var z2 = xyz[2];
6964
6967
  var l;
6965
6968
  var a;
6966
6969
  var b;
6967
6970
  x /= 95.047;
6968
6971
  y /= 100;
6969
- z /= 108.883;
6972
+ z2 /= 108.883;
6970
6973
  x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
6971
6974
  y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
6972
- z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
6975
+ z2 = z2 > 8856e-6 ? Math.pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
6973
6976
  l = 116 * y - 16;
6974
6977
  a = 500 * (x - y);
6975
- b = 200 * (y - z);
6978
+ b = 200 * (y - z2);
6976
6979
  return [l, a, b];
6977
6980
  };
6978
6981
  convert.hsl.rgb = function(hsl) {
@@ -7147,13 +7150,13 @@ var require_conversions = (0, import_chunk_WWAWV7DQ.__commonJS)({
7147
7150
  convert.xyz.rgb = function(xyz) {
7148
7151
  var x = xyz[0] / 100;
7149
7152
  var y = xyz[1] / 100;
7150
- var z = xyz[2] / 100;
7153
+ var z2 = xyz[2] / 100;
7151
7154
  var r;
7152
7155
  var g;
7153
7156
  var b;
7154
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
7155
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
7156
- b = x * 0.0557 + y * -0.204 + z * 1.057;
7157
+ r = x * 3.2406 + y * -1.5372 + z2 * -0.4986;
7158
+ g = x * -0.9689 + y * 1.8758 + z2 * 0.0415;
7159
+ b = x * 0.0557 + y * -0.204 + z2 * 1.057;
7157
7160
  r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
7158
7161
  g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
7159
7162
  b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
@@ -7165,19 +7168,19 @@ var require_conversions = (0, import_chunk_WWAWV7DQ.__commonJS)({
7165
7168
  convert.xyz.lab = function(xyz) {
7166
7169
  var x = xyz[0];
7167
7170
  var y = xyz[1];
7168
- var z = xyz[2];
7171
+ var z2 = xyz[2];
7169
7172
  var l;
7170
7173
  var a;
7171
7174
  var b;
7172
7175
  x /= 95.047;
7173
7176
  y /= 100;
7174
- z /= 108.883;
7177
+ z2 /= 108.883;
7175
7178
  x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
7176
7179
  y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
7177
- z = z > 8856e-6 ? Math.pow(z, 1 / 3) : 7.787 * z + 16 / 116;
7180
+ z2 = z2 > 8856e-6 ? Math.pow(z2, 1 / 3) : 7.787 * z2 + 16 / 116;
7178
7181
  l = 116 * y - 16;
7179
7182
  a = 500 * (x - y);
7180
- b = 200 * (y - z);
7183
+ b = 200 * (y - z2);
7181
7184
  return [l, a, b];
7182
7185
  };
7183
7186
  convert.lab.xyz = function(lab) {
@@ -7186,20 +7189,20 @@ var require_conversions = (0, import_chunk_WWAWV7DQ.__commonJS)({
7186
7189
  var b = lab[2];
7187
7190
  var x;
7188
7191
  var y;
7189
- var z;
7192
+ var z2;
7190
7193
  y = (l + 16) / 116;
7191
7194
  x = a / 500 + y;
7192
- z = y - b / 200;
7195
+ z2 = y - b / 200;
7193
7196
  var y2 = Math.pow(y, 3);
7194
7197
  var x2 = Math.pow(x, 3);
7195
- var z2 = Math.pow(z, 3);
7198
+ var z22 = Math.pow(z2, 3);
7196
7199
  y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
7197
7200
  x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
7198
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
7201
+ z2 = z22 > 8856e-6 ? z22 : (z2 - 16 / 116) / 7.787;
7199
7202
  x *= 95.047;
7200
7203
  y *= 100;
7201
- z *= 108.883;
7202
- return [x, y, z];
7204
+ z2 *= 108.883;
7205
+ return [x, y, z2];
7203
7206
  };
7204
7207
  convert.lab.lch = function(lab) {
7205
7208
  var l = lab[0];
@@ -10689,8 +10692,8 @@ var require_typos = (0, import_chunk_WWAWV7DQ.__commonJS)({
10689
10692
  var require_fixer = (0, import_chunk_WWAWV7DQ.__commonJS)({
10690
10693
  "../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
10691
10694
  "use strict";
10692
- var isValidSemver = (0, import_chunk_VWV2NY26.require_valid)();
10693
- var cleanSemver = (0, import_chunk_VWV2NY26.require_clean)();
10695
+ var isValidSemver = (0, import_chunk_NKQGJ3AE.require_valid)();
10696
+ var cleanSemver = (0, import_chunk_NKQGJ3AE.require_clean)();
10694
10697
  var validateLicense = require_validate_npm_package_license();
10695
10698
  var hostedGitInfo = require_lib5();
10696
10699
  var isBuiltinModule = require_is_core_module();
@@ -11238,7 +11241,7 @@ var init_default = (0, import_chunk_WWAWV7DQ.__esm)({
11238
11241
  }
11239
11242
  });
11240
11243
  function toPath2(urlOrPath) {
11241
- return urlOrPath instanceof URL ? (0, import_url2.fileURLToPath)(urlOrPath) : urlOrPath;
11244
+ return urlOrPath instanceof URL ? (0, import_node_url2.fileURLToPath)(urlOrPath) : urlOrPath;
11242
11245
  }
11243
11246
  var init_node = (0, import_chunk_WWAWV7DQ.__esm)({
11244
11247
  "../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js"() {
@@ -11257,7 +11260,7 @@ var init_read_pkg = (0, import_chunk_WWAWV7DQ.__esm)({
11257
11260
  init_parse_json();
11258
11261
  import_normalize_package_data = (0, import_chunk_WWAWV7DQ.__toESM)(require_normalize(), 1);
11259
11262
  init_node();
11260
- getPackagePath = (cwd) => import_path2.default.resolve(toPath2(cwd) ?? ".", "package.json");
11263
+ getPackagePath = (cwd) => import_node_path2.default.resolve(toPath2(cwd) ?? ".", "package.json");
11261
11264
  _readPackage = (file, normalize) => {
11262
11265
  const json = typeof file === "string" ? parseJson(file) : file;
11263
11266
  if (normalize) {
@@ -11273,7 +11276,7 @@ async function readPackageUp(options) {
11273
11276
  return;
11274
11277
  }
11275
11278
  return {
11276
- packageJson: await readPackage({ ...options, cwd: import_path3.default.dirname(filePath) }),
11279
+ packageJson: await readPackage({ ...options, cwd: import_node_path3.default.dirname(filePath) }),
11277
11280
  path: filePath
11278
11281
  };
11279
11282
  }
@@ -11557,16 +11560,16 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
11557
11560
  "@babel/helper-validator-identifier": "7.24.7",
11558
11561
  "@opentelemetry/api": "1.9.0",
11559
11562
  "@swc/core": "1.2.204",
11560
- "@swc/jest": "0.2.36",
11563
+ "@swc/jest": "0.2.37",
11561
11564
  "@types/babel__helper-validator-identifier": "7.15.2",
11562
- "@types/jest": "29.5.12",
11565
+ "@types/jest": "29.5.14",
11563
11566
  "@types/node": "18.19.31",
11564
11567
  "@types/resolve": "1.20.6",
11565
11568
  archiver: "6.0.2",
11566
11569
  "checkpoint-client": "1.1.33",
11567
11570
  "cli-truncate": "2.1.0",
11568
- dotenv: "16.0.3",
11569
- esbuild: "0.23.0",
11571
+ dotenv: "16.4.7",
11572
+ esbuild: "0.24.2",
11570
11573
  "escape-string-regexp": "4.0.0",
11571
11574
  execa: "5.1.1",
11572
11575
  "fast-glob": "3.3.2",
@@ -11600,7 +11603,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
11600
11603
  "terminal-link": "2.1.1",
11601
11604
  tmp: "0.2.3",
11602
11605
  "ts-node": "10.9.2",
11603
- "ts-pattern": "5.2.0",
11606
+ "ts-pattern": "5.6.0",
11604
11607
  "ts-toolbelt": "9.6.0",
11605
11608
  typescript: "5.4.5",
11606
11609
  yarn: "1.22.22"
@@ -11611,7 +11614,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
11611
11614
  "@prisma/fetch-engine": "workspace:*",
11612
11615
  "@prisma/generator-helper": "workspace:*",
11613
11616
  "@prisma/get-platform": "workspace:*",
11614
- "@prisma/prisma-schema-wasm": "6.3.0-6.integration-5-22-0-with-simplified-typeinfo-c7d99d9db5129d8b35986b8518c7f10bc8580e03",
11617
+ "@prisma/prisma-schema-wasm": "6.3.0-13.1635fdddbcd54b9f4b16ffcd9eb726b58d5408da",
11615
11618
  "@prisma/schema-files-loader": "workspace:*",
11616
11619
  arg: "5.0.2",
11617
11620
  prompts: "2.4.2"
@@ -11671,7 +11674,7 @@ var init_errorHelpers = (0, import_chunk_WWAWV7DQ.__esm)({
11671
11674
  }
11672
11675
  });
11673
11676
  function relativizePathInPSLError(error) {
11674
- return error.replaceAll(process.cwd() + import_path4.default.sep, "");
11677
+ return error.replaceAll(process.cwd() + import_node_path4.default.sep, "");
11675
11678
  }
11676
11679
  var init_relativizePathInPSLError = (0, import_chunk_WWAWV7DQ.__esm)({
11677
11680
  "../internals/src/engine-commands/relativizePathInPSLError.ts"() {
@@ -11689,12 +11692,12 @@ function parseQueryEngineError({ errorOutput, reason }) {
11689
11692
  ),
11690
11693
  map((errorOutputAsJSON) => {
11691
11694
  const defaultMessage = (0, import_chunk_6TE2RIPN.red)((0, import_chunk_6TE2RIPN.bold)(relativizePathInPSLError(errorOutputAsJSON.message)));
11692
- const getConfigErrorInit = (0, import_chunk_LVFPGUOH.$)(errorOutputAsJSON).with({ error_code: "P1012" }, (eJSON) => {
11695
+ const getConfigErrorInit = (0, import_chunk_E3UZYEGF.z)(errorOutputAsJSON).with({ error_code: "P1012" }, (eJSON) => {
11693
11696
  return {
11694
11697
  reason: createSchemaValidationError(reason),
11695
11698
  errorCode: eJSON.error_code
11696
11699
  };
11697
- }).with({ error_code: import_chunk_LVFPGUOH.N.string }, (eJSON) => {
11700
+ }).with({ error_code: import_chunk_E3UZYEGF.N.string }, (eJSON) => {
11698
11701
  return {
11699
11702
  reason,
11700
11703
  errorCode: eJSON.error_code
@@ -11715,9 +11718,9 @@ var init_queryEngineCommons = (0, import_chunk_WWAWV7DQ.__esm)({
11715
11718
  "../internals/src/engine-commands/queryEngineCommons.ts"() {
11716
11719
  "use strict";
11717
11720
  init_Either();
11718
- import_function2 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_LVFPGUOH.require_function)());
11721
+ import_function2 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_E3UZYEGF.require_function)());
11719
11722
  (0, import_chunk_6TE2RIPN.init_colors)();
11720
- (0, import_chunk_LVFPGUOH.init_dist)();
11723
+ (0, import_chunk_E3UZYEGF.init_dist)();
11721
11724
  init_relativizePathInPSLError();
11722
11725
  createDebugErrorType = (debug4, fnName) => ({ type, reason, error }) => {
11723
11726
  debug4(`error of type "${type}" in ${fnName}:
@@ -11783,7 +11786,7 @@ async function getConfig(options) {
11783
11786
  }
11784
11787
  return Promise.resolve(data);
11785
11788
  }
11786
- const error = (0, import_chunk_LVFPGUOH.$)(configEither.left).with({ type: "wasm-error" }, (e) => {
11789
+ const error = (0, import_chunk_E3UZYEGF.z)(configEither.left).with({ type: "wasm-error" }, (e) => {
11787
11790
  debugErrorType(e);
11788
11791
  if (isWasmPanic(e.error)) {
11789
11792
  const { message, stack } = getWasmError(e.error);
@@ -11848,9 +11851,9 @@ var init_getConfig = (0, import_chunk_WWAWV7DQ.__esm)({
11848
11851
  "../internals/src/engine-commands/getConfig.ts"() {
11849
11852
  "use strict";
11850
11853
  init_Either();
11851
- import_function3 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_LVFPGUOH.require_function)());
11854
+ import_function3 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_E3UZYEGF.require_function)());
11852
11855
  (0, import_chunk_6TE2RIPN.init_colors)();
11853
- (0, import_chunk_LVFPGUOH.init_dist)();
11856
+ (0, import_chunk_E3UZYEGF.init_dist)();
11854
11857
  init_panic();
11855
11858
  init_schemaFileInput();
11856
11859
  init_wasm();
@@ -11861,7 +11864,7 @@ var init_getConfig = (0, import_chunk_WWAWV7DQ.__esm)({
11861
11864
  SCHEMA_VALIDATION_ERROR_CODE = "P1012";
11862
11865
  GetConfigError = class extends Error {
11863
11866
  constructor(params) {
11864
- const constructedErrorMessage = (0, import_chunk_LVFPGUOH.$)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
11867
+ const constructedErrorMessage = (0, import_chunk_E3UZYEGF.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
11865
11868
  const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
11866
11869
  return `${reason}
11867
11870
  ${errorCodeMessage}
@@ -11902,7 +11905,7 @@ async function readSchemaFromSingleFile(schemaPath) {
11902
11905
  const schemaTuple = [schemaPath, file];
11903
11906
  return {
11904
11907
  ok: true,
11905
- schema: { schemaPath, schemaRootDir: import_path5.default.dirname(schemaPath), schemas: [schemaTuple] }
11908
+ schema: { schemaPath, schemaRootDir: import_path.default.dirname(schemaPath), schemas: [schemaTuple] }
11906
11909
  };
11907
11910
  }
11908
11911
  async function readSchemaFromDirectory(schemaPath) {
@@ -11960,10 +11963,10 @@ async function readSchemaFromFileOrDirectory(schemaPath) {
11960
11963
  }
11961
11964
  async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName }) {
11962
11965
  if (schemaPathFromArgs) {
11963
- const absPath = import_path5.default.resolve(cwd, schemaPathFromArgs);
11966
+ const absPath = import_path.default.resolve(cwd, schemaPathFromArgs);
11964
11967
  const customSchemaResult = await readSchemaFromFileOrDirectory(absPath);
11965
11968
  if (!customSchemaResult.ok) {
11966
- const relPath = import_path5.default.relative(cwd, absPath);
11969
+ const relPath = import_path.default.relative(cwd, absPath);
11967
11970
  throw new Error(
11968
11971
  `Could not load \`${argumentName}\` from provided path \`${relPath}\`: ${renderLookupError(
11969
11972
  customSchemaResult.error
@@ -11980,14 +11983,9 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName
11980
11983
  if (defaultResult.ok) {
11981
11984
  return defaultResult;
11982
11985
  }
11983
- const yarnResult = await getSchemaFromYarn1Workspace(cwd, defaultResult.error.failures);
11984
- if (yarnResult.ok) {
11985
- return yarnResult;
11986
- }
11987
- const finalError = yarnResult.error.kind === "Yarn1WorkspaceSchemaNotFound" ? defaultResult.error : yarnResult.error;
11988
11986
  return {
11989
11987
  ok: false,
11990
- error: finalError
11988
+ error: defaultResult.error
11991
11989
  };
11992
11990
  }
11993
11991
  function renderLookupError(error) {
@@ -12014,7 +12012,7 @@ function renderDefaultLookupError(error, cwd) {
12014
12012
  for (const failure of error.failures) {
12015
12013
  const filePath = failure.rule.schemaPath.path;
12016
12014
  if (!printedPaths.has(failure.rule.schemaPath.path)) {
12017
- parts.push(`${import_path5.default.relative(cwd, filePath)}: ${renderLookupError(failure.error)}`);
12015
+ parts.push(`${import_path.default.relative(cwd, filePath)}: ${renderLookupError(failure.error)}`);
12018
12016
  printedPaths.add(filePath);
12019
12017
  }
12020
12018
  }
@@ -12041,20 +12039,20 @@ async function getSchemaFromPackageJson(cwd) {
12041
12039
  const schemaPathFromPkgJson = prismaConfig.data.schema;
12042
12040
  if (typeof schemaPathFromPkgJson !== "string") {
12043
12041
  throw new Error(
12044
- `Provided schema path \`${schemaPathFromPkgJson}\` from \`${import_path5.default.relative(
12042
+ `Provided schema path \`${schemaPathFromPkgJson}\` from \`${import_path.default.relative(
12045
12043
  cwd,
12046
12044
  prismaConfig.packagePath
12047
12045
  )}\` must be of type string`
12048
12046
  );
12049
12047
  }
12050
- const absoluteSchemaPath = import_path5.default.isAbsolute(schemaPathFromPkgJson) ? schemaPathFromPkgJson : import_path5.default.resolve(import_path5.default.dirname(prismaConfig.packagePath), schemaPathFromPkgJson);
12048
+ const absoluteSchemaPath = import_path.default.isAbsolute(schemaPathFromPkgJson) ? schemaPathFromPkgJson : import_path.default.resolve(import_path.default.dirname(prismaConfig.packagePath), schemaPathFromPkgJson);
12051
12049
  const lookupResult = await readSchemaFromFileOrDirectory(absoluteSchemaPath);
12052
12050
  if (!lookupResult.ok) {
12053
12051
  throw new Error(
12054
- `Could not load schema from \`${import_path5.default.relative(
12052
+ `Could not load schema from \`${import_path.default.relative(
12055
12053
  cwd,
12056
12054
  absoluteSchemaPath
12057
- )}\` provided by "prisma.schema" config of \`${import_path5.default.relative(
12055
+ )}\` provided by "prisma.schema" config of \`${import_path.default.relative(
12058
12056
  cwd,
12059
12057
  prismaConfig.packagePath
12060
12058
  )}\`: ${renderLookupError(lookupResult.error)}`
@@ -12062,71 +12060,30 @@ async function getSchemaFromPackageJson(cwd) {
12062
12060
  }
12063
12061
  return lookupResult;
12064
12062
  }
12065
- async function getSchemaFromYarn1Workspace(cwd, pastFailures) {
12066
- if (!process.env.npm_config_user_agent?.includes("yarn")) {
12067
- return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
12068
- }
12069
- let workspaces;
12070
- try {
12071
- const { stdout: version2 } = await import_execa.default.command("yarn --version", {
12072
- cwd
12073
- });
12074
- if (version2.startsWith("2")) {
12075
- return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
12076
- }
12077
- const { stdout } = await import_execa.default.command("yarn workspaces info --json", {
12078
- cwd
12079
- });
12080
- const json = getJson(stdout);
12081
- workspaces = Object.values(json);
12082
- } catch {
12083
- return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
12084
- }
12085
- const workspaceRootDir = await findWorkspaceRoot(cwd);
12086
- if (!workspaceRootDir) {
12087
- return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
12088
- }
12089
- for (const workspace of workspaces) {
12090
- const workspacePath = import_path5.default.join(workspaceRootDir, workspace.location);
12091
- const workspaceSchema = await tryWorkspacePath(workspacePath, pastFailures);
12092
- if (workspaceSchema.ok) {
12093
- return workspaceSchema;
12094
- }
12095
- }
12096
- const rootPathSchema = await tryWorkspacePath(workspaceRootDir, pastFailures);
12097
- return rootPathSchema;
12098
- }
12099
- async function tryWorkspacePath(cwd, pastFailures) {
12100
- const pkgJson = await getSchemaFromPackageJson(cwd);
12101
- if (pkgJson.ok) {
12102
- return pkgJson;
12103
- }
12104
- return getDefaultSchema(cwd, pastFailures);
12105
- }
12106
12063
  async function getDefaultSchema(cwd, failures = []) {
12107
12064
  const schemaPrisma = {
12108
12065
  schemaPath: {
12109
- path: import_path5.default.join(cwd, "schema.prisma"),
12066
+ path: import_path.default.join(cwd, "schema.prisma"),
12110
12067
  kind: "file"
12111
12068
  }
12112
12069
  };
12113
12070
  const prismaSchemaFile = {
12114
12071
  schemaPath: {
12115
- path: import_path5.default.join(cwd, "prisma", "schema.prisma"),
12072
+ path: import_path.default.join(cwd, "prisma", "schema.prisma"),
12116
12073
  kind: "file"
12117
12074
  },
12118
12075
  conflictsWith: {
12119
- path: import_path5.default.join(cwd, "prisma", "schema"),
12076
+ path: import_path.default.join(cwd, "prisma", "schema"),
12120
12077
  kind: "directory"
12121
12078
  }
12122
12079
  };
12123
12080
  const prismaSchemaFolder = {
12124
12081
  schemaPath: {
12125
- path: import_path5.default.join(cwd, "prisma", "schema"),
12082
+ path: import_path.default.join(cwd, "prisma", "schema"),
12126
12083
  kind: "directory"
12127
12084
  },
12128
12085
  conflictsWith: {
12129
- path: import_path5.default.join(cwd, "prisma", "schema.prisma"),
12086
+ path: import_path.default.join(cwd, "prisma", "schema.prisma"),
12130
12087
  kind: "file"
12131
12088
  }
12132
12089
  };
@@ -12142,7 +12099,7 @@ async function getDefaultSchema(cwd, failures = []) {
12142
12099
  const conflictingSchema = await loadSchemaFromDefaultLocation(rule.conflictsWith);
12143
12100
  if (conflictingSchema.ok) {
12144
12101
  throw new Error(
12145
- `Found Prisma Schemas at both \`${import_path5.default.relative(cwd, rule.schemaPath.path)}\` and \`${import_path5.default.relative(
12102
+ `Found Prisma Schemas at both \`${import_path.default.relative(cwd, rule.schemaPath.path)}\` and \`${import_path.default.relative(
12146
12103
  cwd,
12147
12104
  rule.conflictsWith.path
12148
12105
  )}\`. Please remove one.`
@@ -12167,50 +12124,11 @@ async function loadSchemaFromDefaultLocation(lookupPath) {
12167
12124
  return readSchemaFromDirectory(lookupPath.path);
12168
12125
  }
12169
12126
  }
12170
- function getJson(stdout) {
12171
- const firstCurly = stdout.indexOf("{");
12172
- const lastCurly = stdout.lastIndexOf("}");
12173
- const sliced = stdout.slice(firstCurly, lastCurly + 1);
12174
- return JSON.parse(sliced);
12175
- }
12176
- function isPkgJsonWorkspaceRoot(pkgJson) {
12177
- const workspaces = pkgJson.workspaces;
12178
- if (!workspaces) {
12179
- return false;
12180
- }
12181
- return Array.isArray(workspaces) || workspaces.packages !== void 0;
12182
- }
12183
- async function isNearestPkgJsonWorkspaceRoot(cwd) {
12184
- const pkgJson = await readPackageUp({ cwd, normalize: false });
12185
- if (!pkgJson) {
12186
- return null;
12187
- }
12188
- return {
12189
- isRoot: isPkgJsonWorkspaceRoot(pkgJson.packageJson),
12190
- path: pkgJson.path
12191
- };
12192
- }
12193
- async function findWorkspaceRoot(cwd) {
12194
- let pkgJson = await isNearestPkgJsonWorkspaceRoot(cwd);
12195
- if (!pkgJson) {
12196
- return null;
12197
- }
12198
- if (pkgJson.isRoot === true) {
12199
- return import_path5.default.dirname(pkgJson.path);
12200
- }
12201
- const pkgJsonParentDir = import_path5.default.dirname(import_path5.default.dirname(pkgJson.path));
12202
- pkgJson = await isNearestPkgJsonWorkspaceRoot(pkgJsonParentDir);
12203
- if (!pkgJson || pkgJson.isRoot === false) {
12204
- return null;
12205
- }
12206
- return import_path5.default.dirname(pkgJson.path);
12207
- }
12208
- var import_schema_files_loader, import_execa, readFile, stat, debug2;
12127
+ var import_schema_files_loader, readFile, stat, debug2;
12209
12128
  var init_getSchema = (0, import_chunk_WWAWV7DQ.__esm)({
12210
12129
  "../internals/src/cli/getSchema.ts"() {
12211
12130
  "use strict";
12212
12131
  import_schema_files_loader = (0, import_chunk_WWAWV7DQ.__toESM)(require_dist());
12213
- import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_WIZM7TFT.require_execa)());
12214
12132
  (0, import_chunk_6TE2RIPN.init_colors)();
12215
12133
  init_read_package_up();
12216
12134
  init_engine_commands();
@@ -12225,7 +12143,7 @@ var init_MigrateDiff = (0, import_chunk_WWAWV7DQ.__esm)({
12225
12143
  import_fs_jetpack = (0, import_chunk_WWAWV7DQ.__toESM)(require_main());
12226
12144
  (0, import_chunk_6TE2RIPN.init_colors)();
12227
12145
  init_getSchema();
12228
- (0, import_chunk_MWEO3VUS.init_Migrate)();
12146
+ (0, import_chunk_NCDRH4BH.init_Migrate)();
12229
12147
  (0, import_chunk_TKAGMA5K.init_captureStdout)();
12230
12148
  debug3 = (0, import_debug3.default)("prisma:migrate:diff");
12231
12149
  helpOptions = (0, import_internals.format)(
@@ -12330,7 +12248,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
12330
12248
  };
12331
12249
  } else if (args["--from-schema-datasource"]) {
12332
12250
  await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false });
12333
- const schema = await getSchemaWithPath(import_path6.default.resolve(args["--from-schema-datasource"]), {
12251
+ const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datasource"]), {
12334
12252
  argumentName: "--from-schema-datasource"
12335
12253
  });
12336
12254
  const config = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
@@ -12339,7 +12257,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
12339
12257
  ...(0, import_internals.toSchemasWithConfigDir)(schema, config)
12340
12258
  };
12341
12259
  } else if (args["--from-schema-datamodel"]) {
12342
- const schema = await getSchemaWithPath(import_path6.default.resolve(args["--from-schema-datamodel"]), {
12260
+ const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datamodel"]), {
12343
12261
  argumentName: "--from-schema-datamodel"
12344
12262
  });
12345
12263
  from = {
@@ -12354,7 +12272,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
12354
12272
  } else if (args["--from-migrations"]) {
12355
12273
  from = {
12356
12274
  tag: "migrations",
12357
- path: import_path6.default.resolve(args["--from-migrations"])
12275
+ path: import_path2.default.resolve(args["--from-migrations"])
12358
12276
  };
12359
12277
  } else if (args["--from-local-d1"]) {
12360
12278
  const d1Database = await (0, import_internals.locateLocalCloudflareD1)({ arg: "--from-local-d1" });
@@ -12370,7 +12288,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
12370
12288
  };
12371
12289
  } else if (args["--to-schema-datasource"]) {
12372
12290
  await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false });
12373
- const schema = await getSchemaWithPath(import_path6.default.resolve(args["--to-schema-datasource"]), {
12291
+ const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datasource"]), {
12374
12292
  argumentName: "--to-schema-datasource"
12375
12293
  });
12376
12294
  const config = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
@@ -12379,7 +12297,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
12379
12297
  ...(0, import_internals.toSchemasWithConfigDir)(schema, config)
12380
12298
  };
12381
12299
  } else if (args["--to-schema-datamodel"]) {
12382
- const schema = await getSchemaWithPath(import_path6.default.resolve(args["--to-schema-datamodel"]), {
12300
+ const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datamodel"]), {
12383
12301
  argumentName: "--to-schema-datamodel"
12384
12302
  });
12385
12303
  to = {
@@ -12394,7 +12312,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
12394
12312
  } else if (args["--to-migrations"]) {
12395
12313
  to = {
12396
12314
  tag: "migrations",
12397
- path: import_path6.default.resolve(args["--to-migrations"])
12315
+ path: import_path2.default.resolve(args["--to-migrations"])
12398
12316
  };
12399
12317
  } else if (args["--to-local-d1"]) {
12400
12318
  const d1Database = await (0, import_internals.locateLocalCloudflareD1)({ arg: "--to-local-d1" });
@@ -12403,7 +12321,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
12403
12321
  url: `file:${d1Database}`
12404
12322
  };
12405
12323
  }
12406
- const migrate = new import_chunk_MWEO3VUS.Migrate();
12324
+ const migrate = new import_chunk_NCDRH4BH.Migrate();
12407
12325
  const captureStdout = new import_chunk_TKAGMA5K.CaptureStdout();
12408
12326
  const outputPath = args["--output"];
12409
12327
  const isOutputDefined = Boolean(outputPath);