@prisma/migrate 6.19.0-integration-engines-6-19-0-30-push-otuqumlrponx-17ff4a7bd0bffdf0b40b58a399869660f7f0e368.1 → 6.19.0-integration-feat-remove-library-engine.4

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 (51) hide show
  1. package/dist/Migrate.js +3 -3
  2. package/dist/bin.js +27 -28
  3. package/dist/{chunk-J33EXHZB.js → chunk-2Z63R7HP.js} +10 -12
  4. package/dist/{chunk-F2XCBEZ4.js → chunk-3VYHMV3C.js} +10 -12
  5. package/dist/{chunk-Z27SI4AV.js → chunk-43R3GFIU.js} +4 -4
  6. package/dist/{chunk-3AKRTEIK.js → chunk-45NSU26W.js} +7 -7
  7. package/dist/{chunk-OP2BDF75.js → chunk-FRY7T46S.js} +10 -11
  8. package/dist/{chunk-O35BTK6Y.js → chunk-JVGKTJYZ.js} +5 -5
  9. package/dist/{chunk-VV4M6AN7.js → chunk-JX2HIV7V.js} +10 -10
  10. package/dist/{chunk-PHXLQVPT.js → chunk-L7EZFBB4.js} +40 -68
  11. package/dist/{chunk-R4IWP35Z.js → chunk-L7EZXEMS.js} +6 -6
  12. package/dist/{chunk-NB4FRYRQ.js → chunk-LNQIFWXN.js} +5 -5
  13. package/dist/{chunk-ZTIS675B.js → chunk-O57XJHDD.js} +64 -76
  14. package/dist/{chunk-BHJMJSM4.js → chunk-PJYHZKCF.js} +6 -6
  15. package/dist/{chunk-6ORQRJLP.js → chunk-QZUMMKCI.js} +16 -47
  16. package/dist/{chunk-VU5BLQUI.js → chunk-T2ACIU5M.js} +14 -8
  17. package/dist/{chunk-7TVX3D4W.js → chunk-TCBZUTEL.js} +27 -65
  18. package/dist/{chunk-TW22Y3AA.js → chunk-URVKYSZJ.js} +7 -7
  19. package/dist/{chunk-D6LYHB65.js → chunk-V5D5NSLS.js} +33 -25
  20. package/dist/{chunk-D4TRX77Y.js → chunk-W2NKGYXF.js} +7 -9
  21. package/dist/{chunk-QVMYNWAN.js → chunk-XA2JOJS2.js} +157 -70
  22. package/dist/commands/DbDrop.js +2 -2
  23. package/dist/commands/DbExecute.js +4 -4
  24. package/dist/commands/DbPull.js +5 -6
  25. package/dist/commands/DbPush.js +4 -4
  26. package/dist/commands/DbSeed.js +3 -3
  27. package/dist/commands/MigrateDeploy.js +4 -4
  28. package/dist/commands/MigrateDev.js +5 -5
  29. package/dist/commands/MigrateDiff.js +4 -4
  30. package/dist/commands/MigrateReset.js +5 -5
  31. package/dist/commands/MigrateResolve.js +4 -4
  32. package/dist/commands/MigrateStatus.js +4 -4
  33. package/dist/index.js +31 -32
  34. package/dist/internals/src/cli/getSchema.d.ts +1 -15
  35. package/dist/migrate/src/Migrate.d.ts +1 -2
  36. package/dist/migrate/src/utils/seed.d.ts +0 -6
  37. package/dist/open-GFNXULGD.js +593 -0
  38. package/dist/utils/getDatabaseVersionSafe.js +4 -4
  39. package/dist/utils/introspectSql.js +4 -4
  40. package/dist/utils/seed.js +2 -3
  41. package/dist/utils/setupCockroach.js +2 -2
  42. package/dist/utils/setupMSSQL.js +30734 -30124
  43. package/dist/utils/setupMongo.js +2048 -768
  44. package/dist/utils/setupPostgres.js +2 -2
  45. package/dist/utils/spinner.js +3 -3
  46. package/package.json +11 -11
  47. package/dist/chunk-RR6BKMNO.js +0 -80
  48. package/dist/migrate/src/utils/replaceOrAddDatasource.d.ts +0 -2
  49. package/dist/migrate/src/utils/replaceOrAddDatasource.test.d.ts +0 -1
  50. package/dist/utils/replaceOrAddDatasource.js +0 -25
  51. package/dist/utils/replaceOrAddDatasource.test.js +0 -207
@@ -26,20 +26,19 @@ 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_ZTIS675B_exports = {};
30
- __export(chunk_ZTIS675B_exports, {
29
+ var chunk_O57XJHDD_exports = {};
30
+ __export(chunk_O57XJHDD_exports, {
31
31
  MigrateDiff: () => MigrateDiff
32
32
  });
33
- module.exports = __toCommonJS(chunk_ZTIS675B_exports);
33
+ module.exports = __toCommonJS(chunk_O57XJHDD_exports);
34
34
  var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
35
- var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
35
+ var import_chunk_V5D5NSLS = require("./chunk-V5D5NSLS.js");
36
36
  var import_chunk_GGA2F64G = require("./chunk-GGA2F64G.js");
37
37
  var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
38
38
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
39
39
  var import_debug = __toESM(require("@prisma/debug"));
40
40
  var import_internals = require("@prisma/internals");
41
41
  var import_path = __toESM(require("path"));
42
- var import_config = require("@prisma/config");
43
42
  var import_debug2 = require("@prisma/debug");
44
43
  var import_fs = __toESM(require("fs"));
45
44
  var import_path2 = __toESM(require("path"));
@@ -1117,7 +1116,7 @@ var require_tree_walker = (0, import_chunk_2ESYSVXG.__commonJS)({
1117
1116
  }
1118
1117
  });
1119
1118
  var require_path = (0, import_chunk_2ESYSVXG.__commonJS)({
1120
- "../../node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/lib/path.js"(exports, module2) {
1119
+ "../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js"(exports, module2) {
1121
1120
  "use strict";
1122
1121
  var isWindows = typeof process === "object" && process && process.platform === "win32";
1123
1122
  module2.exports = isWindows ? { sep: "\\" } : { sep: "/" };
@@ -1180,7 +1179,7 @@ var require_balanced_match = (0, import_chunk_2ESYSVXG.__commonJS)({
1180
1179
  }
1181
1180
  });
1182
1181
  var require_brace_expansion = (0, import_chunk_2ESYSVXG.__commonJS)({
1183
- "../../node_modules/.pnpm/brace-expansion@2.0.1/node_modules/brace-expansion/index.js"(exports, module2) {
1182
+ "../../node_modules/.pnpm/brace-expansion@2.0.2/node_modules/brace-expansion/index.js"(exports, module2) {
1184
1183
  "use strict";
1185
1184
  var balanced = require_balanced_match();
1186
1185
  module2.exports = expandTop;
@@ -1255,7 +1254,7 @@ var require_brace_expansion = (0, import_chunk_2ESYSVXG.__commonJS)({
1255
1254
  var isSequence = isNumericSequence || isAlphaSequence;
1256
1255
  var isOptions = m.body.indexOf(",") >= 0;
1257
1256
  if (!isSequence && !isOptions) {
1258
- if (m.post.match(/,.*\}/)) {
1257
+ if (m.post.match(/,(?!,).*\}/)) {
1259
1258
  str = m.pre + "{" + m.body + escClose + m.post;
1260
1259
  return expand(str);
1261
1260
  }
@@ -1329,7 +1328,7 @@ var require_brace_expansion = (0, import_chunk_2ESYSVXG.__commonJS)({
1329
1328
  }
1330
1329
  });
1331
1330
  var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
1332
- "../../node_modules/.pnpm/minimatch@5.1.0/node_modules/minimatch/minimatch.js"(exports, module2) {
1331
+ "../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/minimatch.js"(exports, module2) {
1333
1332
  "use strict";
1334
1333
  var minimatch = module2.exports = (p, pattern, options = {}) => {
1335
1334
  assertValidPattern(pattern);
@@ -1416,7 +1415,9 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
1416
1415
  return list;
1417
1416
  };
1418
1417
  var globUnescape = (s) => s.replace(/\\(.)/g, "$1");
1418
+ var charUnescape = (s) => s.replace(/\\([^-\]])/g, "$1");
1419
1419
  var regExpEscape = (s) => s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&");
1420
+ var braExpEscape = (s) => s.replace(/[[\]\\]/g, "\\$&");
1420
1421
  var Minimatch = class {
1421
1422
  constructor(pattern, options) {
1422
1423
  assertValidPattern(pattern);
@@ -1469,7 +1470,7 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
1469
1470
  negate = !negate;
1470
1471
  negateOffset++;
1471
1472
  }
1472
- if (negateOffset) this.pattern = pattern.substr(negateOffset);
1473
+ if (negateOffset) this.pattern = pattern.slice(negateOffset);
1473
1474
  this.negate = negate;
1474
1475
  }
1475
1476
  // set partial to true to test if, for example,
@@ -1555,7 +1556,7 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
1555
1556
  }
1556
1557
  if (pattern === "") return "";
1557
1558
  let re = "";
1558
- let hasMagic = !!options.nocase;
1559
+ let hasMagic = false;
1559
1560
  let escaping = false;
1560
1561
  const patternListStack = [];
1561
1562
  const negativeLists = [];
@@ -1566,7 +1567,10 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
1566
1567
  let cs;
1567
1568
  let pl;
1568
1569
  let sp;
1569
- const patternStart = pattern.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
1570
+ let dotTravAllowed = pattern.charAt(0) === ".";
1571
+ let dotFileAllowed = options.dot || dotTravAllowed;
1572
+ const patternStart = () => dotTravAllowed ? "" : dotFileAllowed ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
1573
+ const subPatternStart = (p) => p.charAt(0) === "." ? "" : options.dot ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" : "(?!\\.)";
1570
1574
  const clearStateChar = () => {
1571
1575
  if (stateChar) {
1572
1576
  switch (stateChar) {
@@ -1605,6 +1609,10 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
1605
1609
  return false;
1606
1610
  }
1607
1611
  case "\\":
1612
+ if (inClass && pattern.charAt(i + 1) === "-") {
1613
+ re += c;
1614
+ continue;
1615
+ }
1608
1616
  clearStateChar();
1609
1617
  escaping = true;
1610
1618
  continue;
@@ -1627,7 +1635,7 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
1627
1635
  stateChar = c;
1628
1636
  if (options.noext) clearStateChar();
1629
1637
  continue;
1630
- case "(":
1638
+ case "(": {
1631
1639
  if (inClass) {
1632
1640
  re += "(";
1633
1641
  continue;
@@ -1636,39 +1644,54 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
1636
1644
  re += "\\(";
1637
1645
  continue;
1638
1646
  }
1639
- patternListStack.push({
1647
+ const plEntry = {
1640
1648
  type: stateChar,
1641
1649
  start: i - 1,
1642
1650
  reStart: re.length,
1643
1651
  open: plTypes[stateChar].open,
1644
1652
  close: plTypes[stateChar].close
1645
- });
1646
- re += stateChar === "!" ? "(?:(?!(?:" : "(?:";
1653
+ };
1654
+ this.debug(this.pattern, " ", plEntry);
1655
+ patternListStack.push(plEntry);
1656
+ re += plEntry.open;
1657
+ if (plEntry.start === 0 && plEntry.type !== "!") {
1658
+ dotTravAllowed = true;
1659
+ re += subPatternStart(pattern.slice(i + 1));
1660
+ }
1647
1661
  this.debug("plType %j %j", stateChar, re);
1648
1662
  stateChar = false;
1649
1663
  continue;
1650
- case ")":
1651
- if (inClass || !patternListStack.length) {
1664
+ }
1665
+ case ")": {
1666
+ const plEntry = patternListStack[patternListStack.length - 1];
1667
+ if (inClass || !plEntry) {
1652
1668
  re += "\\)";
1653
1669
  continue;
1654
1670
  }
1671
+ patternListStack.pop();
1655
1672
  clearStateChar();
1656
1673
  hasMagic = true;
1657
- pl = patternListStack.pop();
1674
+ pl = plEntry;
1658
1675
  re += pl.close;
1659
1676
  if (pl.type === "!") {
1660
- negativeLists.push(pl);
1677
+ negativeLists.push(Object.assign(pl, { reEnd: re.length }));
1661
1678
  }
1662
- pl.reEnd = re.length;
1663
1679
  continue;
1664
- case "|":
1665
- if (inClass || !patternListStack.length) {
1680
+ }
1681
+ case "|": {
1682
+ const plEntry = patternListStack[patternListStack.length - 1];
1683
+ if (inClass || !plEntry) {
1666
1684
  re += "\\|";
1667
1685
  continue;
1668
1686
  }
1669
1687
  clearStateChar();
1670
1688
  re += "|";
1689
+ if (plEntry.start === 0 && plEntry.type !== "!") {
1690
+ dotTravAllowed = true;
1691
+ re += subPatternStart(pattern.slice(i + 1));
1692
+ }
1671
1693
  continue;
1694
+ }
1672
1695
  // these are mostly the same in regexp and glob
1673
1696
  case "[":
1674
1697
  clearStateChar();
@@ -1688,17 +1711,13 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
1688
1711
  }
1689
1712
  cs = pattern.substring(classStart + 1, i);
1690
1713
  try {
1691
- RegExp("[" + cs + "]");
1714
+ RegExp("[" + braExpEscape(charUnescape(cs)) + "]");
1715
+ re += c;
1692
1716
  } catch (er) {
1693
- sp = this.parse(cs, SUBPARSE);
1694
- re = re.substr(0, reClassStart) + "\\[" + sp[0] + "\\]";
1695
- hasMagic = hasMagic || sp[1];
1696
- inClass = false;
1697
- continue;
1717
+ re = re.substring(0, reClassStart) + "(?:$.)";
1698
1718
  }
1699
1719
  hasMagic = true;
1700
1720
  inClass = false;
1701
- re += c;
1702
1721
  continue;
1703
1722
  default:
1704
1723
  clearStateChar();
@@ -1710,9 +1729,9 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
1710
1729
  }
1711
1730
  }
1712
1731
  if (inClass) {
1713
- cs = pattern.substr(classStart + 1);
1732
+ cs = pattern.slice(classStart + 1);
1714
1733
  sp = this.parse(cs, SUBPARSE);
1715
- re = re.substr(0, reClassStart) + "\\[" + sp[0];
1734
+ re = re.substring(0, reClassStart) + "\\[" + sp[0];
1716
1735
  hasMagic = hasMagic || sp[1];
1717
1736
  }
1718
1737
  for (pl = patternListStack.pop(); pl; pl = patternListStack.pop()) {
@@ -1741,24 +1760,28 @@ var require_minimatch = (0, import_chunk_2ESYSVXG.__commonJS)({
1741
1760
  const nlFirst = re.slice(nl.reStart, nl.reEnd - 8);
1742
1761
  let nlAfter = re.slice(nl.reEnd);
1743
1762
  const nlLast = re.slice(nl.reEnd - 8, nl.reEnd) + nlAfter;
1744
- const openParensBefore = nlBefore.split("(").length - 1;
1763
+ const closeParensBefore = nlBefore.split(")").length;
1764
+ const openParensBefore = nlBefore.split("(").length - closeParensBefore;
1745
1765
  let cleanAfter = nlAfter;
1746
1766
  for (let i = 0; i < openParensBefore; i++) {
1747
1767
  cleanAfter = cleanAfter.replace(/\)[+*?]?/, "");
1748
1768
  }
1749
1769
  nlAfter = cleanAfter;
1750
- const dollar = nlAfter === "" && isSub !== SUBPARSE ? "$" : "";
1770
+ const dollar = nlAfter === "" && isSub !== SUBPARSE ? "(?:$|\\/)" : "";
1751
1771
  re = nlBefore + nlFirst + nlAfter + dollar + nlLast;
1752
1772
  }
1753
1773
  if (re !== "" && hasMagic) {
1754
1774
  re = "(?=.)" + re;
1755
1775
  }
1756
1776
  if (addPatternStart) {
1757
- re = patternStart + re;
1777
+ re = patternStart() + re;
1758
1778
  }
1759
1779
  if (isSub === SUBPARSE) {
1760
1780
  return [re, hasMagic];
1761
1781
  }
1782
+ if (options.nocase && !hasMagic) {
1783
+ hasMagic = pattern.toUpperCase() !== pattern.toLowerCase();
1784
+ }
1762
1785
  if (!hasMagic) {
1763
1786
  return globUnescape(pattern);
1764
1787
  }
@@ -4939,7 +4962,7 @@ var require_ensure = (0, import_chunk_2ESYSVXG.__commonJS)({
4939
4962
  }
4940
4963
  });
4941
4964
  var require_utils2 = (0, import_chunk_2ESYSVXG.__commonJS)({
4942
- "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module2) {
4965
+ "../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/utils.js"(exports, module2) {
4943
4966
  "use strict";
4944
4967
  function stringify(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
4945
4968
  const EOF = finalEOL ? EOL : "";
@@ -4954,7 +4977,7 @@ var require_utils2 = (0, import_chunk_2ESYSVXG.__commonJS)({
4954
4977
  }
4955
4978
  });
4956
4979
  var require_jsonfile = (0, import_chunk_2ESYSVXG.__commonJS)({
4957
- "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js"(exports, module2) {
4980
+ "../../node_modules/.pnpm/jsonfile@6.2.0/node_modules/jsonfile/index.js"(exports, module2) {
4958
4981
  "use strict";
4959
4982
  var _fs;
4960
4983
  try {
@@ -5016,13 +5039,12 @@ var require_jsonfile = (0, import_chunk_2ESYSVXG.__commonJS)({
5016
5039
  const str = stringify(obj, options);
5017
5040
  return fs3.writeFileSync(file, str, options);
5018
5041
  }
5019
- var jsonfile = {
5042
+ module2.exports = {
5020
5043
  readFile: readFile2,
5021
5044
  readFileSync,
5022
5045
  writeFile,
5023
5046
  writeFileSync
5024
5047
  };
5025
- module2.exports = jsonfile;
5026
5048
  }
5027
5049
  });
5028
5050
  var require_jsonfile2 = (0, import_chunk_2ESYSVXG.__commonJS)({
@@ -5569,10 +5591,6 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, schemaPathFromConfi
5569
5591
  if (prismaConfigResult.ok) {
5570
5592
  return prismaConfigResult;
5571
5593
  }
5572
- const pkgJsonResult = await getSchemaFromPackageJson(cwd);
5573
- if (pkgJsonResult.ok) {
5574
- return pkgJsonResult;
5575
- }
5576
5594
  const defaultResult = await getDefaultSchema(cwd);
5577
5595
  if (defaultResult.ok) {
5578
5596
  return defaultResult;
@@ -5629,36 +5647,6 @@ async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
5629
5647
  }
5630
5648
  return schemaResult;
5631
5649
  }
5632
- async function getSchemaFromPackageJson(cwd) {
5633
- const prismaConfig = await (0, import_config.loadConfigFromPackageJson)(cwd);
5634
- debug("prismaConfig", prismaConfig);
5635
- if (!prismaConfig || !prismaConfig.config?.schema) {
5636
- return { ok: false, error: { kind: "PackageJsonNotConfigured" } };
5637
- }
5638
- const schemaPathFromPkgJson = prismaConfig.config.schema;
5639
- if (typeof schemaPathFromPkgJson !== "string") {
5640
- throw new Error(
5641
- `Provided schema path \`${schemaPathFromPkgJson}\` from \`${import_path2.default.relative(
5642
- cwd,
5643
- prismaConfig.loadedFromFile
5644
- )}\` must be of type string`
5645
- );
5646
- }
5647
- const absoluteSchemaPath = import_path2.default.isAbsolute(schemaPathFromPkgJson) ? schemaPathFromPkgJson : import_path2.default.resolve(import_path2.default.dirname(prismaConfig.loadedFromFile), schemaPathFromPkgJson);
5648
- const lookupResult = await readSchemaFromFileOrDirectory(absoluteSchemaPath);
5649
- if (!lookupResult.ok) {
5650
- throw new Error(
5651
- `Could not load schema from \`${import_path2.default.relative(
5652
- cwd,
5653
- absoluteSchemaPath
5654
- )}\` provided by "prisma.schema" config of \`${import_path2.default.relative(
5655
- cwd,
5656
- prismaConfig.loadedFromFile
5657
- )}\`: ${renderLookupError(lookupResult.error)}`
5658
- );
5659
- }
5660
- return lookupResult;
5661
- }
5662
5650
  async function getDefaultSchema(cwd, failures = []) {
5663
5651
  const lookupPaths = [import_path2.default.join(cwd, "schema.prisma"), import_path2.default.join(cwd, "prisma", "schema.prisma")];
5664
5652
  for (const path3 of lookupPaths) {
@@ -5873,7 +5861,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
5873
5861
  tag: "empty"
5874
5862
  };
5875
5863
  } else if (args["--from-schema-datasource"]) {
5876
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false, config });
5864
+ (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false, config });
5877
5865
  const schemaContext = await (0, import_internals.loadSchemaContext)({
5878
5866
  schemaPathFromArg: args["--from-schema-datasource"],
5879
5867
  schemaPathArgumentName: "--from-schema-datasource",
@@ -5916,7 +5904,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
5916
5904
  tag: "empty"
5917
5905
  };
5918
5906
  } else if (args["--to-schema-datasource"]) {
5919
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false, config });
5907
+ (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false, config });
5920
5908
  const schemaContext = await (0, import_internals.loadSchemaContext)({
5921
5909
  schemaPathFromArg: args["--to-schema-datasource"],
5922
5910
  schemaPathArgumentName: "--to-schema-datasource",
@@ -5956,7 +5944,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
5956
5944
  externalTables: config.tables?.external ?? [],
5957
5945
  externalEnums: config.enums?.external ?? []
5958
5946
  };
5959
- const migrate = await import_chunk_D6LYHB65.Migrate.setup({
5947
+ const migrate = await import_chunk_V5D5NSLS.Migrate.setup({
5960
5948
  schemaEngineConfig: config,
5961
5949
  schemaFilter,
5962
5950
  extensions: config["extensions"]
@@ -26,15 +26,15 @@ 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_BHJMJSM4_exports = {};
30
- __export(chunk_BHJMJSM4_exports, {
29
+ var chunk_PJYHZKCF_exports = {};
30
+ __export(chunk_PJYHZKCF_exports, {
31
31
  MigrateDeploy: () => MigrateDeploy
32
32
  });
33
- module.exports = __toCommonJS(chunk_BHJMJSM4_exports);
33
+ module.exports = __toCommonJS(chunk_PJYHZKCF_exports);
34
34
  var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
35
35
  var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
36
36
  var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
37
- var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
37
+ var import_chunk_V5D5NSLS = require("./chunk-V5D5NSLS.js");
38
38
  var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
39
39
  var import_debug = __toESM(require("@prisma/debug"));
40
40
  var import_internals = require("@prisma/internals");
@@ -83,7 +83,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
83
83
  if (args["--help"]) {
84
84
  return this.help();
85
85
  }
86
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
86
+ (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
87
87
  const schemaContext = await (0, import_internals.loadSchemaContext)({
88
88
  schemaPathFromArg: args["--schema"],
89
89
  schemaPathFromConfig: config.schema,
@@ -97,7 +97,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
97
97
  externalTables: config.tables?.external ?? [],
98
98
  externalEnums: config.enums?.external ?? []
99
99
  };
100
- const migrate = await import_chunk_D6LYHB65.Migrate.setup({
100
+ const migrate = await import_chunk_V5D5NSLS.Migrate.setup({
101
101
  schemaEngineConfig: config,
102
102
  migrationsDirPath,
103
103
  schemaContext,
@@ -26,15 +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_6ORQRJLP_exports = {};
30
- __export(chunk_6ORQRJLP_exports, {
29
+ var chunk_QZUMMKCI_exports = {};
30
+ __export(chunk_QZUMMKCI_exports, {
31
31
  DbPull: () => DbPull
32
32
  });
33
- module.exports = __toCommonJS(chunk_6ORQRJLP_exports);
34
- var import_chunk_VU5BLQUI = require("./chunk-VU5BLQUI.js");
33
+ module.exports = __toCommonJS(chunk_QZUMMKCI_exports);
34
+ var import_chunk_T2ACIU5M = require("./chunk-T2ACIU5M.js");
35
35
  var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
36
36
  var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
37
- var import_chunk_RR6BKMNO = require("./chunk-RR6BKMNO.js");
38
37
  var import_chunk_RTGQXNX6 = require("./chunk-RTGQXNX6.js");
39
38
  var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
40
39
  var import_chunk_AI6DH66U = require("./chunk-AI6DH66U.js");
@@ -42,7 +41,7 @@ var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
42
41
  var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
43
42
  var import_chunk_2FXU5NZQ = require("./chunk-2FXU5NZQ.js");
44
43
  var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
45
- var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
44
+ var import_chunk_V5D5NSLS = require("./chunk-V5D5NSLS.js");
46
45
  var import_chunk_AXR7LS2N = require("./chunk-AXR7LS2N.js");
47
46
  var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
48
47
  var import_debug = __toESM(require("@prisma/debug"));
@@ -107,7 +106,6 @@ Set composite types introspection depth to 2 levels
107
106
  const args = (0, import_internals.arg)(argv, {
108
107
  "--help": Boolean,
109
108
  "-h": "--help",
110
- "--url": String,
111
109
  "--print": Boolean,
112
110
  "--schema": String,
113
111
  "--config": String,
@@ -118,15 +116,14 @@ Set composite types introspection depth to 2 levels
118
116
  "--local-d1": Boolean
119
117
  // optional, only on cloudflare D1
120
118
  });
121
- const spinnerFactory = (0, import_chunk_VU5BLQUI.createSpinner)(!args["--print"]);
119
+ const spinnerFactory = (0, import_chunk_T2ACIU5M.createSpinner)(!args["--print"]);
122
120
  if (args instanceof Error) {
123
121
  return this.help(args.message);
124
122
  }
125
123
  if (args["--help"]) {
126
124
  return this.help();
127
125
  }
128
- const url = args["--url"];
129
- await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: !args["--print"], config });
126
+ (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: !args["--print"], config });
130
127
  const schemaContext = await (0, import_internals.loadSchemaContext)({
131
128
  schemaPathFromArg: args["--schema"],
132
129
  schemaPathFromConfig: config.schema,
@@ -137,14 +134,13 @@ Set composite types introspection depth to 2 levels
137
134
  const cmd = "db pull";
138
135
  (0, import_internals.checkUnsupportedDataProxy)({
139
136
  cmd,
140
- schemaContext: schemaContext && !url ? schemaContext : void 0,
141
- urls: [url]
137
+ schemaContext: schemaContext ?? void 0
142
138
  });
143
139
  (0, import_internals.checkUnsupportedSchemaEngineWasm)({
144
140
  cmd,
145
141
  config,
146
142
  args,
147
- flags: ["--url", "--local-d1"]
143
+ flags: ["--local-d1"]
148
144
  });
149
145
  const adapter = config.engine === "js" ? await config.adapter() : void 0;
150
146
  if (schemaContext && !args["--print"]) {
@@ -152,30 +148,14 @@ Set composite types introspection depth to 2 levels
152
148
  (0, import_chunk_2FXU5NZQ.printDatasource)({ datasourceInfo: (0, import_chunk_74LUB4XX.parseDatasourceInfo)(schemaContext?.primaryDatasource), adapter });
153
149
  }
154
150
  const fromD1 = Boolean(args["--local-d1"]);
155
- if (!url && !schemaContext && !fromD1) {
151
+ if (!schemaContext && !fromD1) {
156
152
  throw new import_chunk_3WC4XD74.NoSchemaFoundError();
157
153
  }
158
- const { firstDatasource, schema, validationWarning } = await (0, import_chunk_AXR7LS2N.z)({ url, schemaContext, fromD1 }).when(
154
+ const { firstDatasource, schema, validationWarning } = await (0, import_chunk_AXR7LS2N.z)({ schemaContext, fromD1 }).when(
159
155
  (input) => input.schemaContext !== null,
160
156
  async (input) => {
161
157
  const firstDatasource2 = input.schemaContext.primaryDatasource ? input.schemaContext.primaryDatasource : void 0;
162
- if (input.url) {
163
- let providerFromSchema = firstDatasource2?.provider;
164
- if (providerFromSchema === "postgres") {
165
- providerFromSchema = "postgresql";
166
- }
167
- const providerFromUrl = (0, import_internals.protocolToConnectorType)(`${input.url.split(":")[0]}:`);
168
- const schema2 = (0, import_chunk_RR6BKMNO.replaceOrAddDatasource)(
169
- this.urlToDatasource(input.url, providerFromSchema),
170
- input.schemaContext.schemaFiles
171
- );
172
- if (providerFromSchema && providerFromUrl && providerFromSchema !== providerFromUrl && Boolean(providerFromSchema === "cockroachdb" && providerFromUrl === "postgresql") === false) {
173
- throw new Error(
174
- `The database provider found in --url (${providerFromUrl}) is different from the provider found in the Prisma schema (${providerFromSchema}).`
175
- );
176
- }
177
- return { firstDatasource: firstDatasource2, schema: schema2, validationWarning: void 0 };
178
- } else if (input.fromD1) {
158
+ if (input.fromD1) {
179
159
  const d1Database = await (0, import_internals.locateLocalCloudflareD1)({ arg: "--from-local-d1" });
180
160
  const pathToSQLiteFile = import_path.default.relative(input.schemaContext.schemaRootDir, d1Database);
181
161
  const schema2 = [
@@ -210,17 +190,6 @@ ${this.urlToDatasource(`file:${pathToSQLiteFile}`, "sqlite")}`;
210
190
  });
211
191
  return { firstDatasource: config2.datasources[0], schema: schema2, validationWarning: void 0 };
212
192
  }
213
- ).when(
214
- (input) => input.url !== void 0,
215
- async (input) => {
216
- (0, import_internals.protocolToConnectorType)(`${input.url.split(":")[0]}:`);
217
- const schema2 = [["schema.prisma", this.urlToDatasource(input.url)]];
218
- const config2 = await (0, import_internals.getConfig)({
219
- datamodel: schema2,
220
- ignoreEnvVarErrors: true
221
- });
222
- return { firstDatasource: config2.datasources[0], schema: schema2, validationWarning: void 0 };
223
- }
224
193
  ).run();
225
194
  if (schemaContext) {
226
195
  const modelRegex = /\s*model\s*(\w+)\s*{/;
@@ -235,13 +204,13 @@ Some information will be lost (relations, comments, mapped fields, @ignore...),
235
204
  )} for more info.`);
236
205
  }
237
206
  }
238
- const migrate = await import_chunk_D6LYHB65.Migrate.setup({
207
+ const migrate = await import_chunk_V5D5NSLS.Migrate.setup({
239
208
  schemaEngineConfig: config,
240
209
  schemaContext: schemaContext ?? void 0,
241
210
  extensions: config["extensions"]
242
211
  });
243
212
  const engine = migrate.engine;
244
- const basedOn = !args["--url"] && schemaContext?.primaryDatasource ? ` based on datasource defined in ${(0, import_chunk_SKRR5WT4.underline)(schemaContext.loadedFromPathForLogMessages)}` : "";
213
+ const basedOn = schemaContext?.primaryDatasource ? ` based on datasource defined in ${(0, import_chunk_SKRR5WT4.underline)(schemaContext.loadedFromPathForLogMessages)}` : "";
245
214
  const introspectionSpinner = spinnerFactory(`Introspecting${basedOn}`);
246
215
  const before = Math.round(performance.now());
247
216
  let introspectionSchema = void 0;
@@ -278,7 +247,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("To fix this, you have two options:")}
278
247
  "schema.prisma"
279
248
  )} points to a database that is not empty (it must contain at least one table).
280
249
 
281
- Then you can run ${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExecutor)("prisma db pull"))} again.
250
+ Then you can run ${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExecutor)("prisma db pull"))} again.
282
251
  `);
283
252
  } else if (e.code === "P1003") {
284
253
  throw new Error(`
@@ -297,7 +266,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("To fix this, you have two options:")}
297
266
  "schema.prisma"
298
267
  )} points to an existing database.
299
268
 
300
- Then you can run ${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExecutor)("prisma db pull"))} again.
269
+ Then you can run ${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExecutor)("prisma db pull"))} again.
301
270
  `);
302
271
  } else if (e.code === "P1012") {
303
272
  process.stdout.write("\n");
@@ -26,12 +26,12 @@ 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_VU5BLQUI_exports = {};
30
- __export(chunk_VU5BLQUI_exports, {
29
+ var chunk_T2ACIU5M_exports = {};
30
+ __export(chunk_T2ACIU5M_exports, {
31
31
  createSpinner: () => createSpinner
32
32
  });
33
- module.exports = __toCommonJS(chunk_VU5BLQUI_exports);
34
- var import_chunk_VV4M6AN7 = require("./chunk-VV4M6AN7.js");
33
+ module.exports = __toCommonJS(chunk_T2ACIU5M_exports);
34
+ var import_chunk_JX2HIV7V = require("./chunk-JX2HIV7V.js");
35
35
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
36
36
  var import_node_process = __toESM(require("node:process"));
37
37
  var import_node_process2 = __toESM(require("node:process"));
@@ -1952,6 +1952,12 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
1952
1952
  if (env.TERM === "xterm-kitty") {
1953
1953
  return 3;
1954
1954
  }
1955
+ if (env.TERM === "xterm-ghostty") {
1956
+ return 3;
1957
+ }
1958
+ if (env.TERM === "wezterm") {
1959
+ return 3;
1960
+ }
1955
1961
  if ("TERM_PROGRAM" in env) {
1956
1962
  const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
1957
1963
  switch (env.TERM_PROGRAM) {
@@ -2382,8 +2388,8 @@ var Ora = class {
2382
2388
  const fullSuffixText = this.#getFullSuffixText(this.#suffixText, "-");
2383
2389
  const fullText = " ".repeat(this.#indent) + fullPrefixText + "--" + this.#text + "--" + fullSuffixText;
2384
2390
  this.#lineCount = 0;
2385
- for (const line of (0, import_chunk_VV4M6AN7.stripAnsi)(fullText).split("\n")) {
2386
- this.#lineCount += Math.max(1, Math.ceil((0, import_chunk_VV4M6AN7.stringWidth)(line, { countAnsiEscapeCodes: true }) / columns));
2391
+ for (const line of (0, import_chunk_JX2HIV7V.stripAnsi)(fullText).split("\n")) {
2392
+ this.#lineCount += Math.max(1, Math.ceil((0, import_chunk_JX2HIV7V.stringWidth)(line, { countAnsiEscapeCodes: true }) / columns));
2387
2393
  }
2388
2394
  }
2389
2395
  get isEnabled() {
@@ -2465,7 +2471,7 @@ var Ora = class {
2465
2471
  return this;
2466
2472
  }
2467
2473
  if (this.#options.hideCursor) {
2468
- import_chunk_VV4M6AN7.cli_cursor_default.hide(this.#stream);
2474
+ import_chunk_JX2HIV7V.cli_cursor_default.hide(this.#stream);
2469
2475
  }
2470
2476
  if (this.#options.discardStdin && import_node_process.default.stdin.isTTY) {
2471
2477
  this.#isDiscardingStdin = true;
@@ -2484,7 +2490,7 @@ var Ora = class {
2484
2490
  this.#frameIndex = 0;
2485
2491
  this.clear();
2486
2492
  if (this.#options.hideCursor) {
2487
- import_chunk_VV4M6AN7.cli_cursor_default.show(this.#stream);
2493
+ import_chunk_JX2HIV7V.cli_cursor_default.show(this.#stream);
2488
2494
  }
2489
2495
  if (this.#options.discardStdin && import_node_process.default.stdin.isTTY && this.#isDiscardingStdin) {
2490
2496
  stdin_discarder_default.stop();