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

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 (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_55NRLWME_exports = {};
30
- __export(chunk_55NRLWME_exports, {
29
+ var chunk_PSSOKBLN_exports = {};
30
+ __export(chunk_PSSOKBLN_exports, {
31
31
  MigrateDiff: () => MigrateDiff,
32
32
  init_MigrateDiff: () => init_MigrateDiff
33
33
  });
34
- module.exports = __toCommonJS(chunk_55NRLWME_exports);
35
- var import_chunk_VWV2NY26 = require("./chunk-VWV2NY26.js");
34
+ module.exports = __toCommonJS(chunk_PSSOKBLN_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) {
@@ -4862,170 +4865,942 @@ var require_symlink_paths = (0, import_chunk_WWAWV7DQ.__commonJS)({
4862
4865
  }
4863
4866
  });
4864
4867
  }
4865
- }
4866
- function symlinkPathsSync(srcpath, dstpath) {
4867
- let exists;
4868
- if (path7.isAbsolute(srcpath)) {
4869
- exists = fs3.existsSync(srcpath);
4870
- if (!exists) throw new Error("absolute srcpath does not exist");
4871
- return {
4872
- toCwd: srcpath,
4873
- toDst: srcpath
4874
- };
4875
- } else {
4876
- const dstdir = path7.dirname(dstpath);
4877
- const relativeToDst = path7.join(dstdir, srcpath);
4878
- exists = fs3.existsSync(relativeToDst);
4879
- if (exists) {
4880
- return {
4881
- toCwd: relativeToDst,
4882
- toDst: srcpath
4883
- };
4884
- } else {
4885
- exists = fs3.existsSync(srcpath);
4886
- if (!exists) throw new Error("relative srcpath does not exist");
4887
- return {
4888
- toCwd: srcpath,
4889
- toDst: path7.relative(dstdir, srcpath)
4890
- };
4868
+ }
4869
+ function symlinkPathsSync(srcpath, dstpath) {
4870
+ let exists;
4871
+ if (path7.isAbsolute(srcpath)) {
4872
+ exists = fs3.existsSync(srcpath);
4873
+ if (!exists) throw new Error("absolute srcpath does not exist");
4874
+ return {
4875
+ toCwd: srcpath,
4876
+ toDst: srcpath
4877
+ };
4878
+ } else {
4879
+ const dstdir = path7.dirname(dstpath);
4880
+ const relativeToDst = path7.join(dstdir, srcpath);
4881
+ exists = fs3.existsSync(relativeToDst);
4882
+ if (exists) {
4883
+ return {
4884
+ toCwd: relativeToDst,
4885
+ toDst: srcpath
4886
+ };
4887
+ } else {
4888
+ exists = fs3.existsSync(srcpath);
4889
+ if (!exists) throw new Error("relative srcpath does not exist");
4890
+ return {
4891
+ toCwd: srcpath,
4892
+ toDst: path7.relative(dstdir, srcpath)
4893
+ };
4894
+ }
4895
+ }
4896
+ }
4897
+ module2.exports = {
4898
+ symlinkPaths,
4899
+ symlinkPathsSync
4900
+ };
4901
+ }
4902
+ });
4903
+ var require_symlink_type = (0, import_chunk_WWAWV7DQ.__commonJS)({
4904
+ "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
4905
+ "use strict";
4906
+ var fs3 = require_graceful_fs();
4907
+ function symlinkType(srcpath, type, callback) {
4908
+ callback = typeof type === "function" ? type : callback;
4909
+ type = typeof type === "function" ? false : type;
4910
+ if (type) return callback(null, type);
4911
+ fs3.lstat(srcpath, (err, stats) => {
4912
+ if (err) return callback(null, "file");
4913
+ type = stats && stats.isDirectory() ? "dir" : "file";
4914
+ callback(null, type);
4915
+ });
4916
+ }
4917
+ function symlinkTypeSync(srcpath, type) {
4918
+ let stats;
4919
+ if (type) return type;
4920
+ try {
4921
+ stats = fs3.lstatSync(srcpath);
4922
+ } catch {
4923
+ return "file";
4924
+ }
4925
+ return stats && stats.isDirectory() ? "dir" : "file";
4926
+ }
4927
+ module2.exports = {
4928
+ symlinkType,
4929
+ symlinkTypeSync
4930
+ };
4931
+ }
4932
+ });
4933
+ var require_symlink2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
4934
+ "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
4935
+ "use strict";
4936
+ var u = require_universalify().fromCallback;
4937
+ var path7 = (0, import_chunk_WWAWV7DQ.__require)("path");
4938
+ var fs3 = require_fs2();
4939
+ var _mkdirs = require_mkdirs();
4940
+ var mkdirs = _mkdirs.mkdirs;
4941
+ var mkdirsSync = _mkdirs.mkdirsSync;
4942
+ var _symlinkPaths = require_symlink_paths();
4943
+ var symlinkPaths = _symlinkPaths.symlinkPaths;
4944
+ var symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
4945
+ var _symlinkType = require_symlink_type();
4946
+ var symlinkType = _symlinkType.symlinkType;
4947
+ var symlinkTypeSync = _symlinkType.symlinkTypeSync;
4948
+ var pathExists = require_path_exists().pathExists;
4949
+ var { areIdentical } = require_stat();
4950
+ function createSymlink(srcpath, dstpath, type, callback) {
4951
+ callback = typeof type === "function" ? type : callback;
4952
+ type = typeof type === "function" ? false : type;
4953
+ fs3.lstat(dstpath, (err, stats) => {
4954
+ if (!err && stats.isSymbolicLink()) {
4955
+ Promise.all([
4956
+ fs3.stat(srcpath),
4957
+ fs3.stat(dstpath)
4958
+ ]).then(([srcStat, dstStat]) => {
4959
+ if (areIdentical(srcStat, dstStat)) return callback(null);
4960
+ _createSymlink(srcpath, dstpath, type, callback);
4961
+ });
4962
+ } else _createSymlink(srcpath, dstpath, type, callback);
4963
+ });
4964
+ }
4965
+ function _createSymlink(srcpath, dstpath, type, callback) {
4966
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
4967
+ if (err) return callback(err);
4968
+ srcpath = relative.toDst;
4969
+ symlinkType(relative.toCwd, type, (err2, type2) => {
4970
+ if (err2) return callback(err2);
4971
+ const dir = path7.dirname(dstpath);
4972
+ pathExists(dir, (err3, dirExists) => {
4973
+ if (err3) return callback(err3);
4974
+ if (dirExists) return fs3.symlink(srcpath, dstpath, type2, callback);
4975
+ mkdirs(dir, (err4) => {
4976
+ if (err4) return callback(err4);
4977
+ fs3.symlink(srcpath, dstpath, type2, callback);
4978
+ });
4979
+ });
4980
+ });
4981
+ });
4982
+ }
4983
+ function createSymlinkSync(srcpath, dstpath, type) {
4984
+ let stats;
4985
+ try {
4986
+ stats = fs3.lstatSync(dstpath);
4987
+ } catch {
4988
+ }
4989
+ if (stats && stats.isSymbolicLink()) {
4990
+ const srcStat = fs3.statSync(srcpath);
4991
+ const dstStat = fs3.statSync(dstpath);
4992
+ if (areIdentical(srcStat, dstStat)) return;
4993
+ }
4994
+ const relative = symlinkPathsSync(srcpath, dstpath);
4995
+ srcpath = relative.toDst;
4996
+ type = symlinkTypeSync(relative.toCwd, type);
4997
+ const dir = path7.dirname(dstpath);
4998
+ const exists = fs3.existsSync(dir);
4999
+ if (exists) return fs3.symlinkSync(srcpath, dstpath, type);
5000
+ mkdirsSync(dir);
5001
+ return fs3.symlinkSync(srcpath, dstpath, type);
5002
+ }
5003
+ module2.exports = {
5004
+ createSymlink: u(createSymlink),
5005
+ createSymlinkSync
5006
+ };
5007
+ }
5008
+ });
5009
+ var require_ensure = (0, import_chunk_WWAWV7DQ.__commonJS)({
5010
+ "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
5011
+ "use strict";
5012
+ var { createFile, createFileSync } = require_file2();
5013
+ var { createLink, createLinkSync } = require_link();
5014
+ var { createSymlink, createSymlinkSync } = require_symlink2();
5015
+ module2.exports = {
5016
+ // file
5017
+ createFile,
5018
+ createFileSync,
5019
+ ensureFile: createFile,
5020
+ ensureFileSync: createFileSync,
5021
+ // link
5022
+ createLink,
5023
+ createLinkSync,
5024
+ ensureLink: createLink,
5025
+ ensureLinkSync: createLinkSync,
5026
+ // symlink
5027
+ createSymlink,
5028
+ createSymlinkSync,
5029
+ ensureSymlink: createSymlink,
5030
+ ensureSymlinkSync: createSymlinkSync
5031
+ };
5032
+ }
5033
+ });
5034
+ var require_polyfills2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
5035
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module2) {
5036
+ "use strict";
5037
+ var constants = (0, import_chunk_WWAWV7DQ.__require)("constants");
5038
+ var origCwd = process.cwd;
5039
+ var cwd = null;
5040
+ var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
5041
+ process.cwd = function() {
5042
+ if (!cwd)
5043
+ cwd = origCwd.call(process);
5044
+ return cwd;
5045
+ };
5046
+ try {
5047
+ process.cwd();
5048
+ } catch (er) {
5049
+ }
5050
+ if (typeof process.chdir === "function") {
5051
+ chdir = process.chdir;
5052
+ process.chdir = function(d) {
5053
+ cwd = null;
5054
+ chdir.call(process, d);
5055
+ };
5056
+ if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
5057
+ }
5058
+ var chdir;
5059
+ module2.exports = patch;
5060
+ function patch(fs3) {
5061
+ if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
5062
+ patchLchmod(fs3);
5063
+ }
5064
+ if (!fs3.lutimes) {
5065
+ patchLutimes(fs3);
5066
+ }
5067
+ fs3.chown = chownFix(fs3.chown);
5068
+ fs3.fchown = chownFix(fs3.fchown);
5069
+ fs3.lchown = chownFix(fs3.lchown);
5070
+ fs3.chmod = chmodFix(fs3.chmod);
5071
+ fs3.fchmod = chmodFix(fs3.fchmod);
5072
+ fs3.lchmod = chmodFix(fs3.lchmod);
5073
+ fs3.chownSync = chownFixSync(fs3.chownSync);
5074
+ fs3.fchownSync = chownFixSync(fs3.fchownSync);
5075
+ fs3.lchownSync = chownFixSync(fs3.lchownSync);
5076
+ fs3.chmodSync = chmodFixSync(fs3.chmodSync);
5077
+ fs3.fchmodSync = chmodFixSync(fs3.fchmodSync);
5078
+ fs3.lchmodSync = chmodFixSync(fs3.lchmodSync);
5079
+ fs3.stat = statFix(fs3.stat);
5080
+ fs3.fstat = statFix(fs3.fstat);
5081
+ fs3.lstat = statFix(fs3.lstat);
5082
+ fs3.statSync = statFixSync(fs3.statSync);
5083
+ fs3.fstatSync = statFixSync(fs3.fstatSync);
5084
+ fs3.lstatSync = statFixSync(fs3.lstatSync);
5085
+ if (fs3.chmod && !fs3.lchmod) {
5086
+ fs3.lchmod = function(path7, mode, cb) {
5087
+ if (cb) process.nextTick(cb);
5088
+ };
5089
+ fs3.lchmodSync = function() {
5090
+ };
5091
+ }
5092
+ if (fs3.chown && !fs3.lchown) {
5093
+ fs3.lchown = function(path7, uid, gid, cb) {
5094
+ if (cb) process.nextTick(cb);
5095
+ };
5096
+ fs3.lchownSync = function() {
5097
+ };
5098
+ }
5099
+ if (platform === "win32") {
5100
+ fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
5101
+ function rename(from, to, cb) {
5102
+ var start = Date.now();
5103
+ var backoff = 0;
5104
+ fs$rename(from, to, function CB(er) {
5105
+ if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
5106
+ setTimeout(function() {
5107
+ fs3.stat(to, function(stater, st) {
5108
+ if (stater && stater.code === "ENOENT")
5109
+ fs$rename(from, to, CB);
5110
+ else
5111
+ cb(er);
5112
+ });
5113
+ }, backoff);
5114
+ if (backoff < 100)
5115
+ backoff += 10;
5116
+ return;
5117
+ }
5118
+ if (cb) cb(er);
5119
+ });
5120
+ }
5121
+ if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
5122
+ return rename;
5123
+ }(fs3.rename);
5124
+ }
5125
+ fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
5126
+ function read(fd, buffer, offset, length, position, callback_) {
5127
+ var callback;
5128
+ if (callback_ && typeof callback_ === "function") {
5129
+ var eagCounter = 0;
5130
+ callback = function(er, _, __) {
5131
+ if (er && er.code === "EAGAIN" && eagCounter < 10) {
5132
+ eagCounter++;
5133
+ return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
5134
+ }
5135
+ callback_.apply(this, arguments);
5136
+ };
5137
+ }
5138
+ return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
5139
+ }
5140
+ if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
5141
+ return read;
5142
+ }(fs3.read);
5143
+ fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
5144
+ return function(fd, buffer, offset, length, position) {
5145
+ var eagCounter = 0;
5146
+ while (true) {
5147
+ try {
5148
+ return fs$readSync.call(fs3, fd, buffer, offset, length, position);
5149
+ } catch (er) {
5150
+ if (er.code === "EAGAIN" && eagCounter < 10) {
5151
+ eagCounter++;
5152
+ continue;
5153
+ }
5154
+ throw er;
5155
+ }
5156
+ }
5157
+ };
5158
+ }(fs3.readSync);
5159
+ function patchLchmod(fs4) {
5160
+ fs4.lchmod = function(path7, mode, callback) {
5161
+ fs4.open(
5162
+ path7,
5163
+ constants.O_WRONLY | constants.O_SYMLINK,
5164
+ mode,
5165
+ function(err, fd) {
5166
+ if (err) {
5167
+ if (callback) callback(err);
5168
+ return;
5169
+ }
5170
+ fs4.fchmod(fd, mode, function(err2) {
5171
+ fs4.close(fd, function(err22) {
5172
+ if (callback) callback(err2 || err22);
5173
+ });
5174
+ });
5175
+ }
5176
+ );
5177
+ };
5178
+ fs4.lchmodSync = function(path7, mode) {
5179
+ var fd = fs4.openSync(path7, constants.O_WRONLY | constants.O_SYMLINK, mode);
5180
+ var threw = true;
5181
+ var ret;
5182
+ try {
5183
+ ret = fs4.fchmodSync(fd, mode);
5184
+ threw = false;
5185
+ } finally {
5186
+ if (threw) {
5187
+ try {
5188
+ fs4.closeSync(fd);
5189
+ } catch (er) {
5190
+ }
5191
+ } else {
5192
+ fs4.closeSync(fd);
5193
+ }
5194
+ }
5195
+ return ret;
5196
+ };
5197
+ }
5198
+ function patchLutimes(fs4) {
5199
+ if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) {
5200
+ fs4.lutimes = function(path7, at, mt, cb) {
5201
+ fs4.open(path7, constants.O_SYMLINK, function(er, fd) {
5202
+ if (er) {
5203
+ if (cb) cb(er);
5204
+ return;
5205
+ }
5206
+ fs4.futimes(fd, at, mt, function(er2) {
5207
+ fs4.close(fd, function(er22) {
5208
+ if (cb) cb(er2 || er22);
5209
+ });
5210
+ });
5211
+ });
5212
+ };
5213
+ fs4.lutimesSync = function(path7, at, mt) {
5214
+ var fd = fs4.openSync(path7, constants.O_SYMLINK);
5215
+ var ret;
5216
+ var threw = true;
5217
+ try {
5218
+ ret = fs4.futimesSync(fd, at, mt);
5219
+ threw = false;
5220
+ } finally {
5221
+ if (threw) {
5222
+ try {
5223
+ fs4.closeSync(fd);
5224
+ } catch (er) {
5225
+ }
5226
+ } else {
5227
+ fs4.closeSync(fd);
5228
+ }
5229
+ }
5230
+ return ret;
5231
+ };
5232
+ } else if (fs4.futimes) {
5233
+ fs4.lutimes = function(_a, _b, _c, cb) {
5234
+ if (cb) process.nextTick(cb);
5235
+ };
5236
+ fs4.lutimesSync = function() {
5237
+ };
5238
+ }
5239
+ }
5240
+ function chmodFix(orig) {
5241
+ if (!orig) return orig;
5242
+ return function(target, mode, cb) {
5243
+ return orig.call(fs3, target, mode, function(er) {
5244
+ if (chownErOk(er)) er = null;
5245
+ if (cb) cb.apply(this, arguments);
5246
+ });
5247
+ };
5248
+ }
5249
+ function chmodFixSync(orig) {
5250
+ if (!orig) return orig;
5251
+ return function(target, mode) {
5252
+ try {
5253
+ return orig.call(fs3, target, mode);
5254
+ } catch (er) {
5255
+ if (!chownErOk(er)) throw er;
5256
+ }
5257
+ };
5258
+ }
5259
+ function chownFix(orig) {
5260
+ if (!orig) return orig;
5261
+ return function(target, uid, gid, cb) {
5262
+ return orig.call(fs3, target, uid, gid, function(er) {
5263
+ if (chownErOk(er)) er = null;
5264
+ if (cb) cb.apply(this, arguments);
5265
+ });
5266
+ };
5267
+ }
5268
+ function chownFixSync(orig) {
5269
+ if (!orig) return orig;
5270
+ return function(target, uid, gid) {
5271
+ try {
5272
+ return orig.call(fs3, target, uid, gid);
5273
+ } catch (er) {
5274
+ if (!chownErOk(er)) throw er;
5275
+ }
5276
+ };
5277
+ }
5278
+ function statFix(orig) {
5279
+ if (!orig) return orig;
5280
+ return function(target, options, cb) {
5281
+ if (typeof options === "function") {
5282
+ cb = options;
5283
+ options = null;
5284
+ }
5285
+ function callback(er, stats) {
5286
+ if (stats) {
5287
+ if (stats.uid < 0) stats.uid += 4294967296;
5288
+ if (stats.gid < 0) stats.gid += 4294967296;
5289
+ }
5290
+ if (cb) cb.apply(this, arguments);
5291
+ }
5292
+ return options ? orig.call(fs3, target, options, callback) : orig.call(fs3, target, callback);
5293
+ };
5294
+ }
5295
+ function statFixSync(orig) {
5296
+ if (!orig) return orig;
5297
+ return function(target, options) {
5298
+ var stats = options ? orig.call(fs3, target, options) : orig.call(fs3, target);
5299
+ if (stats) {
5300
+ if (stats.uid < 0) stats.uid += 4294967296;
5301
+ if (stats.gid < 0) stats.gid += 4294967296;
5302
+ }
5303
+ return stats;
5304
+ };
5305
+ }
5306
+ function chownErOk(er) {
5307
+ if (!er)
5308
+ return true;
5309
+ if (er.code === "ENOSYS")
5310
+ return true;
5311
+ var nonroot = !process.getuid || process.getuid() !== 0;
5312
+ if (nonroot) {
5313
+ if (er.code === "EINVAL" || er.code === "EPERM")
5314
+ return true;
5315
+ }
5316
+ return false;
5317
+ }
5318
+ }
5319
+ }
5320
+ });
5321
+ var require_legacy_streams2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
5322
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module2) {
5323
+ "use strict";
5324
+ var Stream = (0, import_chunk_WWAWV7DQ.__require)("stream").Stream;
5325
+ module2.exports = legacy;
5326
+ function legacy(fs3) {
5327
+ return {
5328
+ ReadStream,
5329
+ WriteStream
5330
+ };
5331
+ function ReadStream(path7, options) {
5332
+ if (!(this instanceof ReadStream)) return new ReadStream(path7, options);
5333
+ Stream.call(this);
5334
+ var self = this;
5335
+ this.path = path7;
5336
+ this.fd = null;
5337
+ this.readable = true;
5338
+ this.paused = false;
5339
+ this.flags = "r";
5340
+ this.mode = 438;
5341
+ this.bufferSize = 64 * 1024;
5342
+ options = options || {};
5343
+ var keys = Object.keys(options);
5344
+ for (var index = 0, length = keys.length; index < length; index++) {
5345
+ var key = keys[index];
5346
+ this[key] = options[key];
5347
+ }
5348
+ if (this.encoding) this.setEncoding(this.encoding);
5349
+ if (this.start !== void 0) {
5350
+ if ("number" !== typeof this.start) {
5351
+ throw TypeError("start must be a Number");
5352
+ }
5353
+ if (this.end === void 0) {
5354
+ this.end = Infinity;
5355
+ } else if ("number" !== typeof this.end) {
5356
+ throw TypeError("end must be a Number");
5357
+ }
5358
+ if (this.start > this.end) {
5359
+ throw new Error("start must be <= end");
5360
+ }
5361
+ this.pos = this.start;
5362
+ }
5363
+ if (this.fd !== null) {
5364
+ process.nextTick(function() {
5365
+ self._read();
5366
+ });
5367
+ return;
5368
+ }
5369
+ fs3.open(this.path, this.flags, this.mode, function(err, fd) {
5370
+ if (err) {
5371
+ self.emit("error", err);
5372
+ self.readable = false;
5373
+ return;
5374
+ }
5375
+ self.fd = fd;
5376
+ self.emit("open", fd);
5377
+ self._read();
5378
+ });
5379
+ }
5380
+ function WriteStream(path7, options) {
5381
+ if (!(this instanceof WriteStream)) return new WriteStream(path7, options);
5382
+ Stream.call(this);
5383
+ this.path = path7;
5384
+ this.fd = null;
5385
+ this.writable = true;
5386
+ this.flags = "w";
5387
+ this.encoding = "binary";
5388
+ this.mode = 438;
5389
+ this.bytesWritten = 0;
5390
+ options = options || {};
5391
+ var keys = Object.keys(options);
5392
+ for (var index = 0, length = keys.length; index < length; index++) {
5393
+ var key = keys[index];
5394
+ this[key] = options[key];
5395
+ }
5396
+ if (this.start !== void 0) {
5397
+ if ("number" !== typeof this.start) {
5398
+ throw TypeError("start must be a Number");
5399
+ }
5400
+ if (this.start < 0) {
5401
+ throw new Error("start must be >= zero");
5402
+ }
5403
+ this.pos = this.start;
5404
+ }
5405
+ this.busy = false;
5406
+ this._queue = [];
5407
+ if (this.fd === null) {
5408
+ this._open = fs3.open;
5409
+ this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
5410
+ this.flush();
5411
+ }
5412
+ }
5413
+ }
5414
+ }
5415
+ });
5416
+ var require_clone2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
5417
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module2) {
5418
+ "use strict";
5419
+ module2.exports = clone;
5420
+ var getPrototypeOf = Object.getPrototypeOf || function(obj) {
5421
+ return obj.__proto__;
5422
+ };
5423
+ function clone(obj) {
5424
+ if (obj === null || typeof obj !== "object")
5425
+ return obj;
5426
+ if (obj instanceof Object)
5427
+ var copy = { __proto__: getPrototypeOf(obj) };
5428
+ else
5429
+ var copy = /* @__PURE__ */ Object.create(null);
5430
+ Object.getOwnPropertyNames(obj).forEach(function(key) {
5431
+ Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
5432
+ });
5433
+ return copy;
5434
+ }
5435
+ }
5436
+ });
5437
+ var require_graceful_fs2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
5438
+ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
5439
+ "use strict";
5440
+ var fs3 = (0, import_chunk_WWAWV7DQ.__require)("fs");
5441
+ var polyfills = require_polyfills2();
5442
+ var legacy = require_legacy_streams2();
5443
+ var clone = require_clone2();
5444
+ var util = (0, import_chunk_WWAWV7DQ.__require)("util");
5445
+ var gracefulQueue;
5446
+ var previousSymbol;
5447
+ if (typeof Symbol === "function" && typeof Symbol.for === "function") {
5448
+ gracefulQueue = Symbol.for("graceful-fs.queue");
5449
+ previousSymbol = Symbol.for("graceful-fs.previous");
5450
+ } else {
5451
+ gracefulQueue = "___graceful-fs.queue";
5452
+ previousSymbol = "___graceful-fs.previous";
5453
+ }
5454
+ function noop() {
5455
+ }
5456
+ function publishQueue(context, queue2) {
5457
+ Object.defineProperty(context, gracefulQueue, {
5458
+ get: function() {
5459
+ return queue2;
5460
+ }
5461
+ });
5462
+ }
5463
+ var debug4 = noop;
5464
+ if (util.debuglog)
5465
+ debug4 = util.debuglog("gfs4");
5466
+ else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
5467
+ debug4 = function() {
5468
+ var m = util.format.apply(util, arguments);
5469
+ m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
5470
+ console.error(m);
5471
+ };
5472
+ if (!fs3[gracefulQueue]) {
5473
+ queue = global[gracefulQueue] || [];
5474
+ publishQueue(fs3, queue);
5475
+ fs3.close = function(fs$close) {
5476
+ function close(fd, cb) {
5477
+ return fs$close.call(fs3, fd, function(err) {
5478
+ if (!err) {
5479
+ resetQueue();
5480
+ }
5481
+ if (typeof cb === "function")
5482
+ cb.apply(this, arguments);
5483
+ });
5484
+ }
5485
+ Object.defineProperty(close, previousSymbol, {
5486
+ value: fs$close
5487
+ });
5488
+ return close;
5489
+ }(fs3.close);
5490
+ fs3.closeSync = function(fs$closeSync) {
5491
+ function closeSync(fd) {
5492
+ fs$closeSync.apply(fs3, arguments);
5493
+ resetQueue();
5494
+ }
5495
+ Object.defineProperty(closeSync, previousSymbol, {
5496
+ value: fs$closeSync
5497
+ });
5498
+ return closeSync;
5499
+ }(fs3.closeSync);
5500
+ if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
5501
+ process.on("exit", function() {
5502
+ debug4(fs3[gracefulQueue]);
5503
+ (0, import_chunk_WWAWV7DQ.__require)("assert").equal(fs3[gracefulQueue].length, 0);
5504
+ });
5505
+ }
5506
+ }
5507
+ var queue;
5508
+ if (!global[gracefulQueue]) {
5509
+ publishQueue(global, fs3[gracefulQueue]);
5510
+ }
5511
+ module2.exports = patch(clone(fs3));
5512
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs3.__patched) {
5513
+ module2.exports = patch(fs3);
5514
+ fs3.__patched = true;
5515
+ }
5516
+ function patch(fs4) {
5517
+ polyfills(fs4);
5518
+ fs4.gracefulify = patch;
5519
+ fs4.createReadStream = createReadStream;
5520
+ fs4.createWriteStream = createWriteStream;
5521
+ var fs$readFile = fs4.readFile;
5522
+ fs4.readFile = readFile2;
5523
+ function readFile2(path7, options, cb) {
5524
+ if (typeof options === "function")
5525
+ cb = options, options = null;
5526
+ return go$readFile(path7, options, cb);
5527
+ function go$readFile(path8, options2, cb2, startTime) {
5528
+ return fs$readFile(path8, options2, function(err) {
5529
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
5530
+ enqueue([go$readFile, [path8, options2, cb2], err, startTime || Date.now(), Date.now()]);
5531
+ else {
5532
+ if (typeof cb2 === "function")
5533
+ cb2.apply(this, arguments);
5534
+ }
5535
+ });
5536
+ }
5537
+ }
5538
+ var fs$writeFile = fs4.writeFile;
5539
+ fs4.writeFile = writeFile;
5540
+ function writeFile(path7, data, options, cb) {
5541
+ if (typeof options === "function")
5542
+ cb = options, options = null;
5543
+ return go$writeFile(path7, data, options, cb);
5544
+ function go$writeFile(path8, data2, options2, cb2, startTime) {
5545
+ return fs$writeFile(path8, data2, options2, function(err) {
5546
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
5547
+ enqueue([go$writeFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
5548
+ else {
5549
+ if (typeof cb2 === "function")
5550
+ cb2.apply(this, arguments);
5551
+ }
5552
+ });
5553
+ }
5554
+ }
5555
+ var fs$appendFile = fs4.appendFile;
5556
+ if (fs$appendFile)
5557
+ fs4.appendFile = appendFile;
5558
+ function appendFile(path7, data, options, cb) {
5559
+ if (typeof options === "function")
5560
+ cb = options, options = null;
5561
+ return go$appendFile(path7, data, options, cb);
5562
+ function go$appendFile(path8, data2, options2, cb2, startTime) {
5563
+ return fs$appendFile(path8, data2, options2, function(err) {
5564
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
5565
+ enqueue([go$appendFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
5566
+ else {
5567
+ if (typeof cb2 === "function")
5568
+ cb2.apply(this, arguments);
5569
+ }
5570
+ });
5571
+ }
5572
+ }
5573
+ var fs$copyFile = fs4.copyFile;
5574
+ if (fs$copyFile)
5575
+ fs4.copyFile = copyFile;
5576
+ function copyFile(src, dest, flags, cb) {
5577
+ if (typeof flags === "function") {
5578
+ cb = flags;
5579
+ flags = 0;
5580
+ }
5581
+ return go$copyFile(src, dest, flags, cb);
5582
+ function go$copyFile(src2, dest2, flags2, cb2, startTime) {
5583
+ return fs$copyFile(src2, dest2, flags2, function(err) {
5584
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
5585
+ enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
5586
+ else {
5587
+ if (typeof cb2 === "function")
5588
+ cb2.apply(this, arguments);
5589
+ }
5590
+ });
5591
+ }
5592
+ }
5593
+ var fs$readdir = fs4.readdir;
5594
+ fs4.readdir = readdir;
5595
+ var noReaddirOptionVersions = /^v[0-5]\./;
5596
+ function readdir(path7, options, cb) {
5597
+ if (typeof options === "function")
5598
+ cb = options, options = null;
5599
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path8, options2, cb2, startTime) {
5600
+ return fs$readdir(path8, fs$readdirCallback(
5601
+ path8,
5602
+ options2,
5603
+ cb2,
5604
+ startTime
5605
+ ));
5606
+ } : function go$readdir2(path8, options2, cb2, startTime) {
5607
+ return fs$readdir(path8, options2, fs$readdirCallback(
5608
+ path8,
5609
+ options2,
5610
+ cb2,
5611
+ startTime
5612
+ ));
5613
+ };
5614
+ return go$readdir(path7, options, cb);
5615
+ function fs$readdirCallback(path8, options2, cb2, startTime) {
5616
+ return function(err, files) {
5617
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
5618
+ enqueue([
5619
+ go$readdir,
5620
+ [path8, options2, cb2],
5621
+ err,
5622
+ startTime || Date.now(),
5623
+ Date.now()
5624
+ ]);
5625
+ else {
5626
+ if (files && files.sort)
5627
+ files.sort();
5628
+ if (typeof cb2 === "function")
5629
+ cb2.call(this, err, files);
5630
+ }
5631
+ };
5632
+ }
5633
+ }
5634
+ if (process.version.substr(0, 4) === "v0.8") {
5635
+ var legStreams = legacy(fs4);
5636
+ ReadStream = legStreams.ReadStream;
5637
+ WriteStream = legStreams.WriteStream;
5638
+ }
5639
+ var fs$ReadStream = fs4.ReadStream;
5640
+ if (fs$ReadStream) {
5641
+ ReadStream.prototype = Object.create(fs$ReadStream.prototype);
5642
+ ReadStream.prototype.open = ReadStream$open;
5643
+ }
5644
+ var fs$WriteStream = fs4.WriteStream;
5645
+ if (fs$WriteStream) {
5646
+ WriteStream.prototype = Object.create(fs$WriteStream.prototype);
5647
+ WriteStream.prototype.open = WriteStream$open;
5648
+ }
5649
+ Object.defineProperty(fs4, "ReadStream", {
5650
+ get: function() {
5651
+ return ReadStream;
5652
+ },
5653
+ set: function(val) {
5654
+ ReadStream = val;
5655
+ },
5656
+ enumerable: true,
5657
+ configurable: true
5658
+ });
5659
+ Object.defineProperty(fs4, "WriteStream", {
5660
+ get: function() {
5661
+ return WriteStream;
5662
+ },
5663
+ set: function(val) {
5664
+ WriteStream = val;
5665
+ },
5666
+ enumerable: true,
5667
+ configurable: true
5668
+ });
5669
+ var FileReadStream = ReadStream;
5670
+ Object.defineProperty(fs4, "FileReadStream", {
5671
+ get: function() {
5672
+ return FileReadStream;
5673
+ },
5674
+ set: function(val) {
5675
+ FileReadStream = val;
5676
+ },
5677
+ enumerable: true,
5678
+ configurable: true
5679
+ });
5680
+ var FileWriteStream = WriteStream;
5681
+ Object.defineProperty(fs4, "FileWriteStream", {
5682
+ get: function() {
5683
+ return FileWriteStream;
5684
+ },
5685
+ set: function(val) {
5686
+ FileWriteStream = val;
5687
+ },
5688
+ enumerable: true,
5689
+ configurable: true
5690
+ });
5691
+ function ReadStream(path7, options) {
5692
+ if (this instanceof ReadStream)
5693
+ return fs$ReadStream.apply(this, arguments), this;
5694
+ else
5695
+ return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
5696
+ }
5697
+ function ReadStream$open() {
5698
+ var that = this;
5699
+ open(that.path, that.flags, that.mode, function(err, fd) {
5700
+ if (err) {
5701
+ if (that.autoClose)
5702
+ that.destroy();
5703
+ that.emit("error", err);
5704
+ } else {
5705
+ that.fd = fd;
5706
+ that.emit("open", fd);
5707
+ that.read();
5708
+ }
5709
+ });
5710
+ }
5711
+ function WriteStream(path7, options) {
5712
+ if (this instanceof WriteStream)
5713
+ return fs$WriteStream.apply(this, arguments), this;
5714
+ else
5715
+ return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
5716
+ }
5717
+ function WriteStream$open() {
5718
+ var that = this;
5719
+ open(that.path, that.flags, that.mode, function(err, fd) {
5720
+ if (err) {
5721
+ that.destroy();
5722
+ that.emit("error", err);
5723
+ } else {
5724
+ that.fd = fd;
5725
+ that.emit("open", fd);
5726
+ }
5727
+ });
5728
+ }
5729
+ function createReadStream(path7, options) {
5730
+ return new fs4.ReadStream(path7, options);
5731
+ }
5732
+ function createWriteStream(path7, options) {
5733
+ return new fs4.WriteStream(path7, options);
5734
+ }
5735
+ var fs$open = fs4.open;
5736
+ fs4.open = open;
5737
+ function open(path7, flags, mode, cb) {
5738
+ if (typeof mode === "function")
5739
+ cb = mode, mode = null;
5740
+ return go$open(path7, flags, mode, cb);
5741
+ function go$open(path8, flags2, mode2, cb2, startTime) {
5742
+ return fs$open(path8, flags2, mode2, function(err, fd) {
5743
+ if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
5744
+ enqueue([go$open, [path8, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
5745
+ else {
5746
+ if (typeof cb2 === "function")
5747
+ cb2.apply(this, arguments);
5748
+ }
5749
+ });
4891
5750
  }
4892
5751
  }
5752
+ return fs4;
4893
5753
  }
4894
- module2.exports = {
4895
- symlinkPaths,
4896
- symlinkPathsSync
4897
- };
4898
- }
4899
- });
4900
- var require_symlink_type = (0, import_chunk_WWAWV7DQ.__commonJS)({
4901
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module2) {
4902
- "use strict";
4903
- var fs3 = require_graceful_fs();
4904
- function symlinkType(srcpath, type, callback) {
4905
- callback = typeof type === "function" ? type : callback;
4906
- type = typeof type === "function" ? false : type;
4907
- if (type) return callback(null, type);
4908
- fs3.lstat(srcpath, (err, stats) => {
4909
- if (err) return callback(null, "file");
4910
- type = stats && stats.isDirectory() ? "dir" : "file";
4911
- callback(null, type);
4912
- });
5754
+ function enqueue(elem) {
5755
+ debug4("ENQUEUE", elem[0].name, elem[1]);
5756
+ fs3[gracefulQueue].push(elem);
5757
+ retry();
4913
5758
  }
4914
- function symlinkTypeSync(srcpath, type) {
4915
- let stats;
4916
- if (type) return type;
4917
- try {
4918
- stats = fs3.lstatSync(srcpath);
4919
- } catch {
4920
- return "file";
5759
+ var retryTimer;
5760
+ function resetQueue() {
5761
+ var now = Date.now();
5762
+ for (var i = 0; i < fs3[gracefulQueue].length; ++i) {
5763
+ if (fs3[gracefulQueue][i].length > 2) {
5764
+ fs3[gracefulQueue][i][3] = now;
5765
+ fs3[gracefulQueue][i][4] = now;
5766
+ }
4921
5767
  }
4922
- return stats && stats.isDirectory() ? "dir" : "file";
4923
- }
4924
- module2.exports = {
4925
- symlinkType,
4926
- symlinkTypeSync
4927
- };
4928
- }
4929
- });
4930
- var require_symlink2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
4931
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module2) {
4932
- "use strict";
4933
- var u = require_universalify().fromCallback;
4934
- var path7 = (0, import_chunk_WWAWV7DQ.__require)("path");
4935
- var fs3 = require_fs2();
4936
- var _mkdirs = require_mkdirs();
4937
- var mkdirs = _mkdirs.mkdirs;
4938
- var mkdirsSync = _mkdirs.mkdirsSync;
4939
- var _symlinkPaths = require_symlink_paths();
4940
- var symlinkPaths = _symlinkPaths.symlinkPaths;
4941
- var symlinkPathsSync = _symlinkPaths.symlinkPathsSync;
4942
- var _symlinkType = require_symlink_type();
4943
- var symlinkType = _symlinkType.symlinkType;
4944
- var symlinkTypeSync = _symlinkType.symlinkTypeSync;
4945
- var pathExists = require_path_exists().pathExists;
4946
- var { areIdentical } = require_stat();
4947
- function createSymlink(srcpath, dstpath, type, callback) {
4948
- callback = typeof type === "function" ? type : callback;
4949
- type = typeof type === "function" ? false : type;
4950
- fs3.lstat(dstpath, (err, stats) => {
4951
- if (!err && stats.isSymbolicLink()) {
4952
- Promise.all([
4953
- fs3.stat(srcpath),
4954
- fs3.stat(dstpath)
4955
- ]).then(([srcStat, dstStat]) => {
4956
- if (areIdentical(srcStat, dstStat)) return callback(null);
4957
- _createSymlink(srcpath, dstpath, type, callback);
4958
- });
4959
- } else _createSymlink(srcpath, dstpath, type, callback);
4960
- });
4961
- }
4962
- function _createSymlink(srcpath, dstpath, type, callback) {
4963
- symlinkPaths(srcpath, dstpath, (err, relative) => {
4964
- if (err) return callback(err);
4965
- srcpath = relative.toDst;
4966
- symlinkType(relative.toCwd, type, (err2, type2) => {
4967
- if (err2) return callback(err2);
4968
- const dir = path7.dirname(dstpath);
4969
- pathExists(dir, (err3, dirExists) => {
4970
- if (err3) return callback(err3);
4971
- if (dirExists) return fs3.symlink(srcpath, dstpath, type2, callback);
4972
- mkdirs(dir, (err4) => {
4973
- if (err4) return callback(err4);
4974
- fs3.symlink(srcpath, dstpath, type2, callback);
4975
- });
4976
- });
4977
- });
4978
- });
5768
+ retry();
4979
5769
  }
4980
- function createSymlinkSync(srcpath, dstpath, type) {
4981
- let stats;
4982
- try {
4983
- stats = fs3.lstatSync(dstpath);
4984
- } catch {
5770
+ function retry() {
5771
+ clearTimeout(retryTimer);
5772
+ retryTimer = void 0;
5773
+ if (fs3[gracefulQueue].length === 0)
5774
+ return;
5775
+ var elem = fs3[gracefulQueue].shift();
5776
+ var fn = elem[0];
5777
+ var args = elem[1];
5778
+ var err = elem[2];
5779
+ var startTime = elem[3];
5780
+ var lastTime = elem[4];
5781
+ if (startTime === void 0) {
5782
+ debug4("RETRY", fn.name, args);
5783
+ fn.apply(null, args);
5784
+ } else if (Date.now() - startTime >= 6e4) {
5785
+ debug4("TIMEOUT", fn.name, args);
5786
+ var cb = args.pop();
5787
+ if (typeof cb === "function")
5788
+ cb.call(null, err);
5789
+ } else {
5790
+ var sinceAttempt = Date.now() - lastTime;
5791
+ var sinceStart = Math.max(lastTime - startTime, 1);
5792
+ var desiredDelay = Math.min(sinceStart * 1.2, 100);
5793
+ if (sinceAttempt >= desiredDelay) {
5794
+ debug4("RETRY", fn.name, args);
5795
+ fn.apply(null, args.concat([startTime]));
5796
+ } else {
5797
+ fs3[gracefulQueue].push(elem);
5798
+ }
4985
5799
  }
4986
- if (stats && stats.isSymbolicLink()) {
4987
- const srcStat = fs3.statSync(srcpath);
4988
- const dstStat = fs3.statSync(dstpath);
4989
- if (areIdentical(srcStat, dstStat)) return;
5800
+ if (retryTimer === void 0) {
5801
+ retryTimer = setTimeout(retry, 0);
4990
5802
  }
4991
- const relative = symlinkPathsSync(srcpath, dstpath);
4992
- srcpath = relative.toDst;
4993
- type = symlinkTypeSync(relative.toCwd, type);
4994
- const dir = path7.dirname(dstpath);
4995
- const exists = fs3.existsSync(dir);
4996
- if (exists) return fs3.symlinkSync(srcpath, dstpath, type);
4997
- mkdirsSync(dir);
4998
- return fs3.symlinkSync(srcpath, dstpath, type);
4999
5803
  }
5000
- module2.exports = {
5001
- createSymlink: u(createSymlink),
5002
- createSymlinkSync
5003
- };
5004
- }
5005
- });
5006
- var require_ensure = (0, import_chunk_WWAWV7DQ.__commonJS)({
5007
- "../../node_modules/.pnpm/fs-extra@11.1.1/node_modules/fs-extra/lib/ensure/index.js"(exports, module2) {
5008
- "use strict";
5009
- var { createFile, createFileSync } = require_file2();
5010
- var { createLink, createLinkSync } = require_link();
5011
- var { createSymlink, createSymlinkSync } = require_symlink2();
5012
- module2.exports = {
5013
- // file
5014
- createFile,
5015
- createFileSync,
5016
- ensureFile: createFile,
5017
- ensureFileSync: createFileSync,
5018
- // link
5019
- createLink,
5020
- createLinkSync,
5021
- ensureLink: createLink,
5022
- ensureLinkSync: createLinkSync,
5023
- // symlink
5024
- createSymlink,
5025
- createSymlinkSync,
5026
- ensureSymlink: createSymlink,
5027
- ensureSymlinkSync: createSymlinkSync
5028
- };
5029
5804
  }
5030
5805
  });
5031
5806
  var require_utils2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
@@ -5048,7 +5823,7 @@ var require_jsonfile = (0, import_chunk_WWAWV7DQ.__commonJS)({
5048
5823
  "use strict";
5049
5824
  var _fs;
5050
5825
  try {
5051
- _fs = require_graceful_fs();
5826
+ _fs = require_graceful_fs2();
5052
5827
  } catch (_) {
5053
5828
  _fs = (0, import_chunk_WWAWV7DQ.__require)("fs");
5054
5829
  }
@@ -5385,8 +6160,8 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
5385
6160
  mod
5386
6161
  ));
5387
6162
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
5388
- var src_exports = {};
5389
- __export2(src_exports, {
6163
+ var index_exports = {};
6164
+ __export2(index_exports, {
5390
6165
  CompositeFilesResolver: () => CompositeFilesResolver,
5391
6166
  InMemoryFilesResolver: () => InMemoryFilesResolver,
5392
6167
  loadRelatedSchemaFiles: () => loadRelatedSchemaFiles,
@@ -5394,10 +6169,10 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
5394
6169
  realFsResolver: () => realFsResolver,
5395
6170
  usesPrismaSchemaFolder: () => usesPrismaSchemaFolder2
5396
6171
  });
5397
- module2.exports = __toCommonJS2(src_exports);
5398
- 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"));
5399
6174
  var import_prisma_schema_wasm2 = (0, import_chunk_WWAWV7DQ.__require)("@prisma/prisma-schema-wasm");
5400
- var import_node_path5 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("path"));
6175
+ var import_node_path5 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("node:path"));
5401
6176
  function createFileNameToKeyMapper(options) {
5402
6177
  if (options.caseSensitive) {
5403
6178
  return (fileName) => fileName;
@@ -5622,15 +6397,15 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
5622
6397
  }
5623
6398
  });
5624
6399
  async function findUp(name, {
5625
- cwd = import_process.default.cwd(),
6400
+ cwd = import_node_process.default.cwd(),
5626
6401
  type = "file",
5627
6402
  stopAt
5628
6403
  } = {}) {
5629
- let directory = import_path.default.resolve(toPath(cwd) ?? "");
5630
- const { root } = import_path.default.parse(directory);
5631
- 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));
5632
6407
  while (directory && directory !== stopAt && directory !== root) {
5633
- 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);
5634
6409
  try {
5635
6410
  const stats = await import_promises.default.stat(filePath);
5636
6411
  if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) {
@@ -5638,14 +6413,14 @@ async function findUp(name, {
5638
6413
  }
5639
6414
  } catch {
5640
6415
  }
5641
- directory = import_path.default.dirname(directory);
6416
+ directory = import_node_path.default.dirname(directory);
5642
6417
  }
5643
6418
  }
5644
6419
  var toPath;
5645
6420
  var init_find_up_simple = (0, import_chunk_WWAWV7DQ.__esm)({
5646
6421
  "../../node_modules/.pnpm/find-up-simple@1.0.0/node_modules/find-up-simple/index.js"() {
5647
6422
  "use strict";
5648
- toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_url.fileURLToPath)(urlOrPath) : urlOrPath;
6423
+ toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
5649
6424
  }
5650
6425
  });
5651
6426
  var require_js_tokens = (0, import_chunk_WWAWV7DQ.__commonJS)({
@@ -6181,26 +6956,26 @@ var require_conversions = (0, import_chunk_WWAWV7DQ.__commonJS)({
6181
6956
  b = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92;
6182
6957
  var x = r * 0.4124 + g * 0.3576 + b * 0.1805;
6183
6958
  var y = r * 0.2126 + g * 0.7152 + b * 0.0722;
6184
- var z = r * 0.0193 + g * 0.1192 + b * 0.9505;
6185
- 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];
6186
6961
  };
6187
6962
  convert.rgb.lab = function(rgb) {
6188
6963
  var xyz = convert.rgb.xyz(rgb);
6189
6964
  var x = xyz[0];
6190
6965
  var y = xyz[1];
6191
- var z = xyz[2];
6966
+ var z2 = xyz[2];
6192
6967
  var l;
6193
6968
  var a;
6194
6969
  var b;
6195
6970
  x /= 95.047;
6196
6971
  y /= 100;
6197
- z /= 108.883;
6972
+ z2 /= 108.883;
6198
6973
  x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
6199
6974
  y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
6200
- 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;
6201
6976
  l = 116 * y - 16;
6202
6977
  a = 500 * (x - y);
6203
- b = 200 * (y - z);
6978
+ b = 200 * (y - z2);
6204
6979
  return [l, a, b];
6205
6980
  };
6206
6981
  convert.hsl.rgb = function(hsl) {
@@ -6375,13 +7150,13 @@ var require_conversions = (0, import_chunk_WWAWV7DQ.__commonJS)({
6375
7150
  convert.xyz.rgb = function(xyz) {
6376
7151
  var x = xyz[0] / 100;
6377
7152
  var y = xyz[1] / 100;
6378
- var z = xyz[2] / 100;
7153
+ var z2 = xyz[2] / 100;
6379
7154
  var r;
6380
7155
  var g;
6381
7156
  var b;
6382
- r = x * 3.2406 + y * -1.5372 + z * -0.4986;
6383
- g = x * -0.9689 + y * 1.8758 + z * 0.0415;
6384
- 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;
6385
7160
  r = r > 31308e-7 ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 : r * 12.92;
6386
7161
  g = g > 31308e-7 ? 1.055 * Math.pow(g, 1 / 2.4) - 0.055 : g * 12.92;
6387
7162
  b = b > 31308e-7 ? 1.055 * Math.pow(b, 1 / 2.4) - 0.055 : b * 12.92;
@@ -6393,19 +7168,19 @@ var require_conversions = (0, import_chunk_WWAWV7DQ.__commonJS)({
6393
7168
  convert.xyz.lab = function(xyz) {
6394
7169
  var x = xyz[0];
6395
7170
  var y = xyz[1];
6396
- var z = xyz[2];
7171
+ var z2 = xyz[2];
6397
7172
  var l;
6398
7173
  var a;
6399
7174
  var b;
6400
7175
  x /= 95.047;
6401
7176
  y /= 100;
6402
- z /= 108.883;
7177
+ z2 /= 108.883;
6403
7178
  x = x > 8856e-6 ? Math.pow(x, 1 / 3) : 7.787 * x + 16 / 116;
6404
7179
  y = y > 8856e-6 ? Math.pow(y, 1 / 3) : 7.787 * y + 16 / 116;
6405
- 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;
6406
7181
  l = 116 * y - 16;
6407
7182
  a = 500 * (x - y);
6408
- b = 200 * (y - z);
7183
+ b = 200 * (y - z2);
6409
7184
  return [l, a, b];
6410
7185
  };
6411
7186
  convert.lab.xyz = function(lab) {
@@ -6414,20 +7189,20 @@ var require_conversions = (0, import_chunk_WWAWV7DQ.__commonJS)({
6414
7189
  var b = lab[2];
6415
7190
  var x;
6416
7191
  var y;
6417
- var z;
7192
+ var z2;
6418
7193
  y = (l + 16) / 116;
6419
7194
  x = a / 500 + y;
6420
- z = y - b / 200;
7195
+ z2 = y - b / 200;
6421
7196
  var y2 = Math.pow(y, 3);
6422
7197
  var x2 = Math.pow(x, 3);
6423
- var z2 = Math.pow(z, 3);
7198
+ var z22 = Math.pow(z2, 3);
6424
7199
  y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
6425
7200
  x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
6426
- z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
7201
+ z2 = z22 > 8856e-6 ? z22 : (z2 - 16 / 116) / 7.787;
6427
7202
  x *= 95.047;
6428
7203
  y *= 100;
6429
- z *= 108.883;
6430
- return [x, y, z];
7204
+ z2 *= 108.883;
7205
+ return [x, y, z2];
6431
7206
  };
6432
7207
  convert.lab.lch = function(lab) {
6433
7208
  var l = lab[0];
@@ -9917,8 +10692,8 @@ var require_typos = (0, import_chunk_WWAWV7DQ.__commonJS)({
9917
10692
  var require_fixer = (0, import_chunk_WWAWV7DQ.__commonJS)({
9918
10693
  "../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
9919
10694
  "use strict";
9920
- var isValidSemver = (0, import_chunk_VWV2NY26.require_valid)();
9921
- 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)();
9922
10697
  var validateLicense = require_validate_npm_package_license();
9923
10698
  var hostedGitInfo = require_lib5();
9924
10699
  var isBuiltinModule = require_is_core_module();
@@ -10466,7 +11241,7 @@ var init_default = (0, import_chunk_WWAWV7DQ.__esm)({
10466
11241
  }
10467
11242
  });
10468
11243
  function toPath2(urlOrPath) {
10469
- return urlOrPath instanceof URL ? (0, import_url2.fileURLToPath)(urlOrPath) : urlOrPath;
11244
+ return urlOrPath instanceof URL ? (0, import_node_url2.fileURLToPath)(urlOrPath) : urlOrPath;
10470
11245
  }
10471
11246
  var init_node = (0, import_chunk_WWAWV7DQ.__esm)({
10472
11247
  "../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js"() {
@@ -10485,7 +11260,7 @@ var init_read_pkg = (0, import_chunk_WWAWV7DQ.__esm)({
10485
11260
  init_parse_json();
10486
11261
  import_normalize_package_data = (0, import_chunk_WWAWV7DQ.__toESM)(require_normalize(), 1);
10487
11262
  init_node();
10488
- getPackagePath = (cwd) => import_path2.default.resolve(toPath2(cwd) ?? ".", "package.json");
11263
+ getPackagePath = (cwd) => import_node_path2.default.resolve(toPath2(cwd) ?? ".", "package.json");
10489
11264
  _readPackage = (file, normalize) => {
10490
11265
  const json = typeof file === "string" ? parseJson(file) : file;
10491
11266
  if (normalize) {
@@ -10501,7 +11276,7 @@ async function readPackageUp(options) {
10501
11276
  return;
10502
11277
  }
10503
11278
  return {
10504
- packageJson: await readPackage({ ...options, cwd: import_path3.default.dirname(filePath) }),
11279
+ packageJson: await readPackage({ ...options, cwd: import_node_path3.default.dirname(filePath) }),
10505
11280
  path: filePath
10506
11281
  };
10507
11282
  }
@@ -10754,7 +11529,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
10754
11529
  "../internals/package.json"(exports, module2) {
10755
11530
  module2.exports = {
10756
11531
  name: "@prisma/internals",
10757
- version: "6.3.0-integration-simpler-typeinfo-query.1",
11532
+ version: "6.3.0-integration-studio-ux-refinements.1",
10758
11533
  description: "This package is intended for Prisma's internal use",
10759
11534
  main: "dist/index.js",
10760
11535
  types: "dist/index.d.ts",
@@ -10785,16 +11560,16 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
10785
11560
  "@babel/helper-validator-identifier": "7.24.7",
10786
11561
  "@opentelemetry/api": "1.9.0",
10787
11562
  "@swc/core": "1.2.204",
10788
- "@swc/jest": "0.2.36",
11563
+ "@swc/jest": "0.2.37",
10789
11564
  "@types/babel__helper-validator-identifier": "7.15.2",
10790
- "@types/jest": "29.5.12",
11565
+ "@types/jest": "29.5.14",
10791
11566
  "@types/node": "18.19.31",
10792
11567
  "@types/resolve": "1.20.6",
10793
11568
  archiver: "6.0.2",
10794
11569
  "checkpoint-client": "1.1.33",
10795
11570
  "cli-truncate": "2.1.0",
10796
- dotenv: "16.0.3",
10797
- esbuild: "0.23.0",
11571
+ dotenv: "16.4.7",
11572
+ esbuild: "0.24.2",
10798
11573
  "escape-string-regexp": "4.0.0",
10799
11574
  execa: "5.1.1",
10800
11575
  "fast-glob": "3.3.2",
@@ -10828,7 +11603,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
10828
11603
  "terminal-link": "2.1.1",
10829
11604
  tmp: "0.2.3",
10830
11605
  "ts-node": "10.9.2",
10831
- "ts-pattern": "5.2.0",
11606
+ "ts-pattern": "5.6.0",
10832
11607
  "ts-toolbelt": "9.6.0",
10833
11608
  typescript: "5.4.5",
10834
11609
  yarn: "1.22.22"
@@ -10839,7 +11614,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
10839
11614
  "@prisma/fetch-engine": "workspace:*",
10840
11615
  "@prisma/generator-helper": "workspace:*",
10841
11616
  "@prisma/get-platform": "workspace:*",
10842
- "@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",
10843
11618
  "@prisma/schema-files-loader": "workspace:*",
10844
11619
  arg: "5.0.2",
10845
11620
  prompts: "2.4.2"
@@ -10899,7 +11674,7 @@ var init_errorHelpers = (0, import_chunk_WWAWV7DQ.__esm)({
10899
11674
  }
10900
11675
  });
10901
11676
  function relativizePathInPSLError(error) {
10902
- return error.replaceAll(process.cwd() + import_path4.default.sep, "");
11677
+ return error.replaceAll(process.cwd() + import_node_path4.default.sep, "");
10903
11678
  }
10904
11679
  var init_relativizePathInPSLError = (0, import_chunk_WWAWV7DQ.__esm)({
10905
11680
  "../internals/src/engine-commands/relativizePathInPSLError.ts"() {
@@ -10917,12 +11692,12 @@ function parseQueryEngineError({ errorOutput, reason }) {
10917
11692
  ),
10918
11693
  map((errorOutputAsJSON) => {
10919
11694
  const defaultMessage = (0, import_chunk_6TE2RIPN.red)((0, import_chunk_6TE2RIPN.bold)(relativizePathInPSLError(errorOutputAsJSON.message)));
10920
- 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) => {
10921
11696
  return {
10922
11697
  reason: createSchemaValidationError(reason),
10923
11698
  errorCode: eJSON.error_code
10924
11699
  };
10925
- }).with({ error_code: import_chunk_LVFPGUOH.N.string }, (eJSON) => {
11700
+ }).with({ error_code: import_chunk_E3UZYEGF.N.string }, (eJSON) => {
10926
11701
  return {
10927
11702
  reason,
10928
11703
  errorCode: eJSON.error_code
@@ -10943,9 +11718,9 @@ var init_queryEngineCommons = (0, import_chunk_WWAWV7DQ.__esm)({
10943
11718
  "../internals/src/engine-commands/queryEngineCommons.ts"() {
10944
11719
  "use strict";
10945
11720
  init_Either();
10946
- 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)());
10947
11722
  (0, import_chunk_6TE2RIPN.init_colors)();
10948
- (0, import_chunk_LVFPGUOH.init_dist)();
11723
+ (0, import_chunk_E3UZYEGF.init_dist)();
10949
11724
  init_relativizePathInPSLError();
10950
11725
  createDebugErrorType = (debug4, fnName) => ({ type, reason, error }) => {
10951
11726
  debug4(`error of type "${type}" in ${fnName}:
@@ -11011,7 +11786,7 @@ async function getConfig(options) {
11011
11786
  }
11012
11787
  return Promise.resolve(data);
11013
11788
  }
11014
- 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) => {
11015
11790
  debugErrorType(e);
11016
11791
  if (isWasmPanic(e.error)) {
11017
11792
  const { message, stack } = getWasmError(e.error);
@@ -11076,9 +11851,9 @@ var init_getConfig = (0, import_chunk_WWAWV7DQ.__esm)({
11076
11851
  "../internals/src/engine-commands/getConfig.ts"() {
11077
11852
  "use strict";
11078
11853
  init_Either();
11079
- 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)());
11080
11855
  (0, import_chunk_6TE2RIPN.init_colors)();
11081
- (0, import_chunk_LVFPGUOH.init_dist)();
11856
+ (0, import_chunk_E3UZYEGF.init_dist)();
11082
11857
  init_panic();
11083
11858
  init_schemaFileInput();
11084
11859
  init_wasm();
@@ -11089,7 +11864,7 @@ var init_getConfig = (0, import_chunk_WWAWV7DQ.__esm)({
11089
11864
  SCHEMA_VALIDATION_ERROR_CODE = "P1012";
11090
11865
  GetConfigError = class extends Error {
11091
11866
  constructor(params) {
11092
- 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 }) => {
11093
11868
  const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
11094
11869
  return `${reason}
11095
11870
  ${errorCodeMessage}
@@ -11130,7 +11905,7 @@ async function readSchemaFromSingleFile(schemaPath) {
11130
11905
  const schemaTuple = [schemaPath, file];
11131
11906
  return {
11132
11907
  ok: true,
11133
- schema: { schemaPath, schemaRootDir: import_path5.default.dirname(schemaPath), schemas: [schemaTuple] }
11908
+ schema: { schemaPath, schemaRootDir: import_path.default.dirname(schemaPath), schemas: [schemaTuple] }
11134
11909
  };
11135
11910
  }
11136
11911
  async function readSchemaFromDirectory(schemaPath) {
@@ -11188,10 +11963,10 @@ async function readSchemaFromFileOrDirectory(schemaPath) {
11188
11963
  }
11189
11964
  async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName }) {
11190
11965
  if (schemaPathFromArgs) {
11191
- const absPath = import_path5.default.resolve(cwd, schemaPathFromArgs);
11966
+ const absPath = import_path.default.resolve(cwd, schemaPathFromArgs);
11192
11967
  const customSchemaResult = await readSchemaFromFileOrDirectory(absPath);
11193
11968
  if (!customSchemaResult.ok) {
11194
- const relPath = import_path5.default.relative(cwd, absPath);
11969
+ const relPath = import_path.default.relative(cwd, absPath);
11195
11970
  throw new Error(
11196
11971
  `Could not load \`${argumentName}\` from provided path \`${relPath}\`: ${renderLookupError(
11197
11972
  customSchemaResult.error
@@ -11208,14 +11983,9 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName
11208
11983
  if (defaultResult.ok) {
11209
11984
  return defaultResult;
11210
11985
  }
11211
- const yarnResult = await getSchemaFromYarn1Workspace(cwd, defaultResult.error.failures);
11212
- if (yarnResult.ok) {
11213
- return yarnResult;
11214
- }
11215
- const finalError = yarnResult.error.kind === "Yarn1WorkspaceSchemaNotFound" ? defaultResult.error : yarnResult.error;
11216
11986
  return {
11217
11987
  ok: false,
11218
- error: finalError
11988
+ error: defaultResult.error
11219
11989
  };
11220
11990
  }
11221
11991
  function renderLookupError(error) {
@@ -11242,7 +12012,7 @@ function renderDefaultLookupError(error, cwd) {
11242
12012
  for (const failure of error.failures) {
11243
12013
  const filePath = failure.rule.schemaPath.path;
11244
12014
  if (!printedPaths.has(failure.rule.schemaPath.path)) {
11245
- parts.push(`${import_path5.default.relative(cwd, filePath)}: ${renderLookupError(failure.error)}`);
12015
+ parts.push(`${import_path.default.relative(cwd, filePath)}: ${renderLookupError(failure.error)}`);
11246
12016
  printedPaths.add(filePath);
11247
12017
  }
11248
12018
  }
@@ -11269,20 +12039,20 @@ async function getSchemaFromPackageJson(cwd) {
11269
12039
  const schemaPathFromPkgJson = prismaConfig.data.schema;
11270
12040
  if (typeof schemaPathFromPkgJson !== "string") {
11271
12041
  throw new Error(
11272
- `Provided schema path \`${schemaPathFromPkgJson}\` from \`${import_path5.default.relative(
12042
+ `Provided schema path \`${schemaPathFromPkgJson}\` from \`${import_path.default.relative(
11273
12043
  cwd,
11274
12044
  prismaConfig.packagePath
11275
12045
  )}\` must be of type string`
11276
12046
  );
11277
12047
  }
11278
- 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);
11279
12049
  const lookupResult = await readSchemaFromFileOrDirectory(absoluteSchemaPath);
11280
12050
  if (!lookupResult.ok) {
11281
12051
  throw new Error(
11282
- `Could not load schema from \`${import_path5.default.relative(
12052
+ `Could not load schema from \`${import_path.default.relative(
11283
12053
  cwd,
11284
12054
  absoluteSchemaPath
11285
- )}\` provided by "prisma.schema" config of \`${import_path5.default.relative(
12055
+ )}\` provided by "prisma.schema" config of \`${import_path.default.relative(
11286
12056
  cwd,
11287
12057
  prismaConfig.packagePath
11288
12058
  )}\`: ${renderLookupError(lookupResult.error)}`
@@ -11290,71 +12060,30 @@ async function getSchemaFromPackageJson(cwd) {
11290
12060
  }
11291
12061
  return lookupResult;
11292
12062
  }
11293
- async function getSchemaFromYarn1Workspace(cwd, pastFailures) {
11294
- if (!process.env.npm_config_user_agent?.includes("yarn")) {
11295
- return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
11296
- }
11297
- let workspaces;
11298
- try {
11299
- const { stdout: version2 } = await import_execa.default.command("yarn --version", {
11300
- cwd
11301
- });
11302
- if (version2.startsWith("2")) {
11303
- return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
11304
- }
11305
- const { stdout } = await import_execa.default.command("yarn workspaces info --json", {
11306
- cwd
11307
- });
11308
- const json = getJson(stdout);
11309
- workspaces = Object.values(json);
11310
- } catch {
11311
- return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
11312
- }
11313
- const workspaceRootDir = await findWorkspaceRoot(cwd);
11314
- if (!workspaceRootDir) {
11315
- return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
11316
- }
11317
- for (const workspace of workspaces) {
11318
- const workspacePath = import_path5.default.join(workspaceRootDir, workspace.location);
11319
- const workspaceSchema = await tryWorkspacePath(workspacePath, pastFailures);
11320
- if (workspaceSchema.ok) {
11321
- return workspaceSchema;
11322
- }
11323
- }
11324
- const rootPathSchema = await tryWorkspacePath(workspaceRootDir, pastFailures);
11325
- return rootPathSchema;
11326
- }
11327
- async function tryWorkspacePath(cwd, pastFailures) {
11328
- const pkgJson = await getSchemaFromPackageJson(cwd);
11329
- if (pkgJson.ok) {
11330
- return pkgJson;
11331
- }
11332
- return getDefaultSchema(cwd, pastFailures);
11333
- }
11334
12063
  async function getDefaultSchema(cwd, failures = []) {
11335
12064
  const schemaPrisma = {
11336
12065
  schemaPath: {
11337
- path: import_path5.default.join(cwd, "schema.prisma"),
12066
+ path: import_path.default.join(cwd, "schema.prisma"),
11338
12067
  kind: "file"
11339
12068
  }
11340
12069
  };
11341
12070
  const prismaSchemaFile = {
11342
12071
  schemaPath: {
11343
- path: import_path5.default.join(cwd, "prisma", "schema.prisma"),
12072
+ path: import_path.default.join(cwd, "prisma", "schema.prisma"),
11344
12073
  kind: "file"
11345
12074
  },
11346
12075
  conflictsWith: {
11347
- path: import_path5.default.join(cwd, "prisma", "schema"),
12076
+ path: import_path.default.join(cwd, "prisma", "schema"),
11348
12077
  kind: "directory"
11349
12078
  }
11350
12079
  };
11351
12080
  const prismaSchemaFolder = {
11352
12081
  schemaPath: {
11353
- path: import_path5.default.join(cwd, "prisma", "schema"),
12082
+ path: import_path.default.join(cwd, "prisma", "schema"),
11354
12083
  kind: "directory"
11355
12084
  },
11356
12085
  conflictsWith: {
11357
- path: import_path5.default.join(cwd, "prisma", "schema.prisma"),
12086
+ path: import_path.default.join(cwd, "prisma", "schema.prisma"),
11358
12087
  kind: "file"
11359
12088
  }
11360
12089
  };
@@ -11370,7 +12099,7 @@ async function getDefaultSchema(cwd, failures = []) {
11370
12099
  const conflictingSchema = await loadSchemaFromDefaultLocation(rule.conflictsWith);
11371
12100
  if (conflictingSchema.ok) {
11372
12101
  throw new Error(
11373
- `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(
11374
12103
  cwd,
11375
12104
  rule.conflictsWith.path
11376
12105
  )}\`. Please remove one.`
@@ -11395,50 +12124,11 @@ async function loadSchemaFromDefaultLocation(lookupPath) {
11395
12124
  return readSchemaFromDirectory(lookupPath.path);
11396
12125
  }
11397
12126
  }
11398
- function getJson(stdout) {
11399
- const firstCurly = stdout.indexOf("{");
11400
- const lastCurly = stdout.lastIndexOf("}");
11401
- const sliced = stdout.slice(firstCurly, lastCurly + 1);
11402
- return JSON.parse(sliced);
11403
- }
11404
- function isPkgJsonWorkspaceRoot(pkgJson) {
11405
- const workspaces = pkgJson.workspaces;
11406
- if (!workspaces) {
11407
- return false;
11408
- }
11409
- return Array.isArray(workspaces) || workspaces.packages !== void 0;
11410
- }
11411
- async function isNearestPkgJsonWorkspaceRoot(cwd) {
11412
- const pkgJson = await readPackageUp({ cwd, normalize: false });
11413
- if (!pkgJson) {
11414
- return null;
11415
- }
11416
- return {
11417
- isRoot: isPkgJsonWorkspaceRoot(pkgJson.packageJson),
11418
- path: pkgJson.path
11419
- };
11420
- }
11421
- async function findWorkspaceRoot(cwd) {
11422
- let pkgJson = await isNearestPkgJsonWorkspaceRoot(cwd);
11423
- if (!pkgJson) {
11424
- return null;
11425
- }
11426
- if (pkgJson.isRoot === true) {
11427
- return import_path5.default.dirname(pkgJson.path);
11428
- }
11429
- const pkgJsonParentDir = import_path5.default.dirname(import_path5.default.dirname(pkgJson.path));
11430
- pkgJson = await isNearestPkgJsonWorkspaceRoot(pkgJsonParentDir);
11431
- if (!pkgJson || pkgJson.isRoot === false) {
11432
- return null;
11433
- }
11434
- return import_path5.default.dirname(pkgJson.path);
11435
- }
11436
- var import_schema_files_loader, import_execa, readFile, stat, debug2;
12127
+ var import_schema_files_loader, readFile, stat, debug2;
11437
12128
  var init_getSchema = (0, import_chunk_WWAWV7DQ.__esm)({
11438
12129
  "../internals/src/cli/getSchema.ts"() {
11439
12130
  "use strict";
11440
12131
  import_schema_files_loader = (0, import_chunk_WWAWV7DQ.__toESM)(require_dist());
11441
- import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_WIZM7TFT.require_execa)());
11442
12132
  (0, import_chunk_6TE2RIPN.init_colors)();
11443
12133
  init_read_package_up();
11444
12134
  init_engine_commands();
@@ -11453,7 +12143,7 @@ var init_MigrateDiff = (0, import_chunk_WWAWV7DQ.__esm)({
11453
12143
  import_fs_jetpack = (0, import_chunk_WWAWV7DQ.__toESM)(require_main());
11454
12144
  (0, import_chunk_6TE2RIPN.init_colors)();
11455
12145
  init_getSchema();
11456
- (0, import_chunk_MWEO3VUS.init_Migrate)();
12146
+ (0, import_chunk_NCDRH4BH.init_Migrate)();
11457
12147
  (0, import_chunk_TKAGMA5K.init_captureStdout)();
11458
12148
  debug3 = (0, import_debug3.default)("prisma:migrate:diff");
11459
12149
  helpOptions = (0, import_internals.format)(
@@ -11558,7 +12248,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
11558
12248
  };
11559
12249
  } else if (args["--from-schema-datasource"]) {
11560
12250
  await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false });
11561
- 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"]), {
11562
12252
  argumentName: "--from-schema-datasource"
11563
12253
  });
11564
12254
  const config = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
@@ -11567,7 +12257,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
11567
12257
  ...(0, import_internals.toSchemasWithConfigDir)(schema, config)
11568
12258
  };
11569
12259
  } else if (args["--from-schema-datamodel"]) {
11570
- 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"]), {
11571
12261
  argumentName: "--from-schema-datamodel"
11572
12262
  });
11573
12263
  from = {
@@ -11582,7 +12272,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
11582
12272
  } else if (args["--from-migrations"]) {
11583
12273
  from = {
11584
12274
  tag: "migrations",
11585
- path: import_path6.default.resolve(args["--from-migrations"])
12275
+ path: import_path2.default.resolve(args["--from-migrations"])
11586
12276
  };
11587
12277
  } else if (args["--from-local-d1"]) {
11588
12278
  const d1Database = await (0, import_internals.locateLocalCloudflareD1)({ arg: "--from-local-d1" });
@@ -11598,7 +12288,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
11598
12288
  };
11599
12289
  } else if (args["--to-schema-datasource"]) {
11600
12290
  await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false });
11601
- 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"]), {
11602
12292
  argumentName: "--to-schema-datasource"
11603
12293
  });
11604
12294
  const config = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
@@ -11607,7 +12297,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
11607
12297
  ...(0, import_internals.toSchemasWithConfigDir)(schema, config)
11608
12298
  };
11609
12299
  } else if (args["--to-schema-datamodel"]) {
11610
- 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"]), {
11611
12301
  argumentName: "--to-schema-datamodel"
11612
12302
  });
11613
12303
  to = {
@@ -11622,7 +12312,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
11622
12312
  } else if (args["--to-migrations"]) {
11623
12313
  to = {
11624
12314
  tag: "migrations",
11625
- path: import_path6.default.resolve(args["--to-migrations"])
12315
+ path: import_path2.default.resolve(args["--to-migrations"])
11626
12316
  };
11627
12317
  } else if (args["--to-local-d1"]) {
11628
12318
  const d1Database = await (0, import_internals.locateLocalCloudflareD1)({ arg: "--to-local-d1" });
@@ -11631,7 +12321,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
11631
12321
  url: `file:${d1Database}`
11632
12322
  };
11633
12323
  }
11634
- const migrate = new import_chunk_MWEO3VUS.Migrate();
12324
+ const migrate = new import_chunk_NCDRH4BH.Migrate();
11635
12325
  const captureStdout = new import_chunk_TKAGMA5K.CaptureStdout();
11636
12326
  const outputPath = args["--output"];
11637
12327
  const isOutputDefined = Boolean(outputPath);