@prisma/migrate 5.23.0-dev.3 → 5.23.0-dev.31
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Migrate.js +4 -4
- package/dist/SchemaEngine.js +4 -4
- package/dist/bin.js +39 -40
- package/dist/{chunk-EXUBPCXZ.js → chunk-3H4RLVCQ.js} +12 -12
- package/dist/{chunk-R3YJSFEV.js → chunk-AT457M2T.js} +64 -146
- package/dist/{chunk-NIFQA5SB.js → chunk-DXR4D3UN.js} +224 -1078
- package/dist/{chunk-ZLGLVUFD.js → chunk-E2XKFV2C.js} +8 -8
- package/dist/{chunk-XVL5RF2T.js → chunk-GUBDW6S7.js} +11 -11
- package/dist/{chunk-BAVMZZAR.js → chunk-HODZFC64.js} +7 -7
- package/dist/{chunk-BAFPAACN.js → chunk-ILJRJJ3S.js} +4 -4
- package/dist/{chunk-LLGEQ76N.js → chunk-ILQWQHQO.js} +11 -11
- package/dist/{chunk-E3KHFUFQ.js → chunk-J77IRNPE.js} +9 -124
- package/dist/{chunk-76XWADEV.js → chunk-KEPR65SW.js} +6 -6
- package/dist/{chunk-MWEO3VUS.js → chunk-LJOMIPJW.js} +7 -7
- package/dist/{chunk-GJN3CSXW.js → chunk-NKL64AIB.js} +6 -6
- package/dist/{chunk-VWV2NY26.js → chunk-NKQGJ3AE.js} +7 -3
- package/dist/{chunk-XLLUFIQK.js → chunk-PCJYN6LT.js} +6 -5
- package/dist/{chunk-SV5GANSI.js → chunk-PFEH6ILG.js} +6 -6
- package/dist/{chunk-ZBOJAYON.js → chunk-PNBMPQYH.js} +6 -6
- package/dist/{chunk-W3ROQKBN.js → chunk-V7DE6JTG.js} +4 -4
- package/dist/{chunk-UJWMQPUH.js → chunk-X6GGREJW.js} +6 -6
- package/dist/{chunk-WIZM7TFT.js → chunk-YKUZUAXA.js} +443 -55
- package/dist/{chunk-YOW3VBYS.js → chunk-Z4OLB2H4.js} +6 -6
- package/dist/commands/DbExecute.js +5 -5
- package/dist/commands/DbPull.js +6 -6
- package/dist/commands/DbPush.js +5 -5
- package/dist/commands/DbSeed.js +4 -5
- package/dist/commands/MigrateDeploy.js +5 -5
- package/dist/commands/MigrateDev.js +6 -7
- package/dist/commands/MigrateDiff.js +6 -7
- package/dist/commands/MigrateReset.js +6 -7
- package/dist/commands/MigrateResolve.js +5 -5
- package/dist/commands/MigrateStatus.js +5 -5
- package/dist/index.js +45 -46
- package/dist/internals/src/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
- package/dist/{multipart-parser-KKECAI5D.js → multipart-parser-73VM3J4A.js} +10 -7
- package/dist/{multipart-parser-47FFAP42-P3F6TPHJ.js → multipart-parser-ITART6UP-FFJAMHWE.js} +25 -22
- package/dist/utils/getDatabaseVersionSafe.js +4 -4
- package/dist/utils/introspectSql.js +3 -3
- package/dist/utils/removeSchemaFiles.js +3 -3
- package/dist/utils/saveSchemaFiles.js +3 -3
- package/dist/utils/seed.js +6 -7
- package/dist/utils/setupMSSQL.js +62 -59
- package/dist/utils/setupMongo.js +23084 -21202
- package/dist/utils/setupMysql.js +45 -0
- package/package.json +12 -13
- package/dist/chunk-EFPE3Q7J.js +0 -424
- 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
|
30
|
-
__export(
|
29
|
+
var chunk_DXR4D3UN_exports = {};
|
30
|
+
__export(chunk_DXR4D3UN_exports, {
|
31
31
|
MigrateDiff: () => MigrateDiff,
|
32
32
|
init_MigrateDiff: () => init_MigrateDiff
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
34
|
+
module.exports = __toCommonJS(chunk_DXR4D3UN_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
|
39
|
-
var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
|
38
|
+
var import_chunk_LJOMIPJW = require("./chunk-LJOMIPJW.js");
|
40
39
|
var import_chunk_LVFPGUOH = require("./chunk-LVFPGUOH.js");
|
41
40
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
42
41
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
43
|
-
var
|
44
|
-
var import_promises = __toESM(require("fs/promises"));
|
45
|
-
var
|
46
|
-
var
|
47
|
-
var
|
48
|
-
var import_promises2 = __toESM(require("fs/promises"));
|
49
|
-
var
|
50
|
-
var
|
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
|
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
|
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
|
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";
|
@@ -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) {
|
@@ -4854,950 +4857,178 @@ var require_symlink_paths = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
4854
4857
|
err2.message = err2.message.replace("lstat", "ensureSymlink");
|
4855
4858
|
return callback(err2);
|
4856
4859
|
}
|
4857
|
-
return callback(null, {
|
4858
|
-
toCwd: srcpath,
|
4859
|
-
toDst: path7.relative(dstdir, srcpath)
|
4860
|
-
});
|
4861
|
-
});
|
4862
|
-
}
|
4863
|
-
});
|
4864
|
-
}
|
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
|
-
};
|
4891
|
-
}
|
4892
|
-
}
|
4893
|
-
}
|
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
|
-
});
|
4913
|
-
}
|
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";
|
4921
|
-
}
|
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
|
-
});
|
4979
|
-
}
|
4980
|
-
function createSymlinkSync(srcpath, dstpath, type) {
|
4981
|
-
let stats;
|
4982
|
-
try {
|
4983
|
-
stats = fs3.lstatSync(dstpath);
|
4984
|
-
} catch {
|
4985
|
-
}
|
4986
|
-
if (stats && stats.isSymbolicLink()) {
|
4987
|
-
const srcStat = fs3.statSync(srcpath);
|
4988
|
-
const dstStat = fs3.statSync(dstpath);
|
4989
|
-
if (areIdentical(srcStat, dstStat)) return;
|
4990
|
-
}
|
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
|
-
}
|
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
|
-
}
|
5030
|
-
});
|
5031
|
-
var require_polyfills2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
5032
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module2) {
|
5033
|
-
"use strict";
|
5034
|
-
var constants = (0, import_chunk_WWAWV7DQ.__require)("constants");
|
5035
|
-
var origCwd = process.cwd;
|
5036
|
-
var cwd = null;
|
5037
|
-
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
5038
|
-
process.cwd = function() {
|
5039
|
-
if (!cwd)
|
5040
|
-
cwd = origCwd.call(process);
|
5041
|
-
return cwd;
|
5042
|
-
};
|
5043
|
-
try {
|
5044
|
-
process.cwd();
|
5045
|
-
} catch (er) {
|
5046
|
-
}
|
5047
|
-
if (typeof process.chdir === "function") {
|
5048
|
-
chdir = process.chdir;
|
5049
|
-
process.chdir = function(d) {
|
5050
|
-
cwd = null;
|
5051
|
-
chdir.call(process, d);
|
5052
|
-
};
|
5053
|
-
if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
|
5054
|
-
}
|
5055
|
-
var chdir;
|
5056
|
-
module2.exports = patch;
|
5057
|
-
function patch(fs3) {
|
5058
|
-
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
5059
|
-
patchLchmod(fs3);
|
5060
|
-
}
|
5061
|
-
if (!fs3.lutimes) {
|
5062
|
-
patchLutimes(fs3);
|
5063
|
-
}
|
5064
|
-
fs3.chown = chownFix(fs3.chown);
|
5065
|
-
fs3.fchown = chownFix(fs3.fchown);
|
5066
|
-
fs3.lchown = chownFix(fs3.lchown);
|
5067
|
-
fs3.chmod = chmodFix(fs3.chmod);
|
5068
|
-
fs3.fchmod = chmodFix(fs3.fchmod);
|
5069
|
-
fs3.lchmod = chmodFix(fs3.lchmod);
|
5070
|
-
fs3.chownSync = chownFixSync(fs3.chownSync);
|
5071
|
-
fs3.fchownSync = chownFixSync(fs3.fchownSync);
|
5072
|
-
fs3.lchownSync = chownFixSync(fs3.lchownSync);
|
5073
|
-
fs3.chmodSync = chmodFixSync(fs3.chmodSync);
|
5074
|
-
fs3.fchmodSync = chmodFixSync(fs3.fchmodSync);
|
5075
|
-
fs3.lchmodSync = chmodFixSync(fs3.lchmodSync);
|
5076
|
-
fs3.stat = statFix(fs3.stat);
|
5077
|
-
fs3.fstat = statFix(fs3.fstat);
|
5078
|
-
fs3.lstat = statFix(fs3.lstat);
|
5079
|
-
fs3.statSync = statFixSync(fs3.statSync);
|
5080
|
-
fs3.fstatSync = statFixSync(fs3.fstatSync);
|
5081
|
-
fs3.lstatSync = statFixSync(fs3.lstatSync);
|
5082
|
-
if (fs3.chmod && !fs3.lchmod) {
|
5083
|
-
fs3.lchmod = function(path7, mode, cb) {
|
5084
|
-
if (cb) process.nextTick(cb);
|
5085
|
-
};
|
5086
|
-
fs3.lchmodSync = function() {
|
5087
|
-
};
|
5088
|
-
}
|
5089
|
-
if (fs3.chown && !fs3.lchown) {
|
5090
|
-
fs3.lchown = function(path7, uid, gid, cb) {
|
5091
|
-
if (cb) process.nextTick(cb);
|
5092
|
-
};
|
5093
|
-
fs3.lchownSync = function() {
|
5094
|
-
};
|
5095
|
-
}
|
5096
|
-
if (platform === "win32") {
|
5097
|
-
fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
|
5098
|
-
function rename(from, to, cb) {
|
5099
|
-
var start = Date.now();
|
5100
|
-
var backoff = 0;
|
5101
|
-
fs$rename(from, to, function CB(er) {
|
5102
|
-
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
5103
|
-
setTimeout(function() {
|
5104
|
-
fs3.stat(to, function(stater, st) {
|
5105
|
-
if (stater && stater.code === "ENOENT")
|
5106
|
-
fs$rename(from, to, CB);
|
5107
|
-
else
|
5108
|
-
cb(er);
|
5109
|
-
});
|
5110
|
-
}, backoff);
|
5111
|
-
if (backoff < 100)
|
5112
|
-
backoff += 10;
|
5113
|
-
return;
|
5114
|
-
}
|
5115
|
-
if (cb) cb(er);
|
5116
|
-
});
|
5117
|
-
}
|
5118
|
-
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
5119
|
-
return rename;
|
5120
|
-
}(fs3.rename);
|
5121
|
-
}
|
5122
|
-
fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
|
5123
|
-
function read(fd, buffer, offset, length, position, callback_) {
|
5124
|
-
var callback;
|
5125
|
-
if (callback_ && typeof callback_ === "function") {
|
5126
|
-
var eagCounter = 0;
|
5127
|
-
callback = function(er, _, __) {
|
5128
|
-
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
5129
|
-
eagCounter++;
|
5130
|
-
return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
|
5131
|
-
}
|
5132
|
-
callback_.apply(this, arguments);
|
5133
|
-
};
|
5134
|
-
}
|
5135
|
-
return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
|
5136
|
-
}
|
5137
|
-
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
5138
|
-
return read;
|
5139
|
-
}(fs3.read);
|
5140
|
-
fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
|
5141
|
-
return function(fd, buffer, offset, length, position) {
|
5142
|
-
var eagCounter = 0;
|
5143
|
-
while (true) {
|
5144
|
-
try {
|
5145
|
-
return fs$readSync.call(fs3, fd, buffer, offset, length, position);
|
5146
|
-
} catch (er) {
|
5147
|
-
if (er.code === "EAGAIN" && eagCounter < 10) {
|
5148
|
-
eagCounter++;
|
5149
|
-
continue;
|
5150
|
-
}
|
5151
|
-
throw er;
|
5152
|
-
}
|
5153
|
-
}
|
5154
|
-
};
|
5155
|
-
}(fs3.readSync);
|
5156
|
-
function patchLchmod(fs4) {
|
5157
|
-
fs4.lchmod = function(path7, mode, callback) {
|
5158
|
-
fs4.open(
|
5159
|
-
path7,
|
5160
|
-
constants.O_WRONLY | constants.O_SYMLINK,
|
5161
|
-
mode,
|
5162
|
-
function(err, fd) {
|
5163
|
-
if (err) {
|
5164
|
-
if (callback) callback(err);
|
5165
|
-
return;
|
5166
|
-
}
|
5167
|
-
fs4.fchmod(fd, mode, function(err2) {
|
5168
|
-
fs4.close(fd, function(err22) {
|
5169
|
-
if (callback) callback(err2 || err22);
|
5170
|
-
});
|
5171
|
-
});
|
5172
|
-
}
|
5173
|
-
);
|
5174
|
-
};
|
5175
|
-
fs4.lchmodSync = function(path7, mode) {
|
5176
|
-
var fd = fs4.openSync(path7, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
5177
|
-
var threw = true;
|
5178
|
-
var ret;
|
5179
|
-
try {
|
5180
|
-
ret = fs4.fchmodSync(fd, mode);
|
5181
|
-
threw = false;
|
5182
|
-
} finally {
|
5183
|
-
if (threw) {
|
5184
|
-
try {
|
5185
|
-
fs4.closeSync(fd);
|
5186
|
-
} catch (er) {
|
5187
|
-
}
|
5188
|
-
} else {
|
5189
|
-
fs4.closeSync(fd);
|
5190
|
-
}
|
5191
|
-
}
|
5192
|
-
return ret;
|
5193
|
-
};
|
5194
|
-
}
|
5195
|
-
function patchLutimes(fs4) {
|
5196
|
-
if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) {
|
5197
|
-
fs4.lutimes = function(path7, at, mt, cb) {
|
5198
|
-
fs4.open(path7, constants.O_SYMLINK, function(er, fd) {
|
5199
|
-
if (er) {
|
5200
|
-
if (cb) cb(er);
|
5201
|
-
return;
|
5202
|
-
}
|
5203
|
-
fs4.futimes(fd, at, mt, function(er2) {
|
5204
|
-
fs4.close(fd, function(er22) {
|
5205
|
-
if (cb) cb(er2 || er22);
|
5206
|
-
});
|
5207
|
-
});
|
5208
|
-
});
|
5209
|
-
};
|
5210
|
-
fs4.lutimesSync = function(path7, at, mt) {
|
5211
|
-
var fd = fs4.openSync(path7, constants.O_SYMLINK);
|
5212
|
-
var ret;
|
5213
|
-
var threw = true;
|
5214
|
-
try {
|
5215
|
-
ret = fs4.futimesSync(fd, at, mt);
|
5216
|
-
threw = false;
|
5217
|
-
} finally {
|
5218
|
-
if (threw) {
|
5219
|
-
try {
|
5220
|
-
fs4.closeSync(fd);
|
5221
|
-
} catch (er) {
|
5222
|
-
}
|
5223
|
-
} else {
|
5224
|
-
fs4.closeSync(fd);
|
5225
|
-
}
|
5226
|
-
}
|
5227
|
-
return ret;
|
5228
|
-
};
|
5229
|
-
} else if (fs4.futimes) {
|
5230
|
-
fs4.lutimes = function(_a, _b, _c, cb) {
|
5231
|
-
if (cb) process.nextTick(cb);
|
5232
|
-
};
|
5233
|
-
fs4.lutimesSync = function() {
|
5234
|
-
};
|
5235
|
-
}
|
5236
|
-
}
|
5237
|
-
function chmodFix(orig) {
|
5238
|
-
if (!orig) return orig;
|
5239
|
-
return function(target, mode, cb) {
|
5240
|
-
return orig.call(fs3, target, mode, function(er) {
|
5241
|
-
if (chownErOk(er)) er = null;
|
5242
|
-
if (cb) cb.apply(this, arguments);
|
5243
|
-
});
|
5244
|
-
};
|
5245
|
-
}
|
5246
|
-
function chmodFixSync(orig) {
|
5247
|
-
if (!orig) return orig;
|
5248
|
-
return function(target, mode) {
|
5249
|
-
try {
|
5250
|
-
return orig.call(fs3, target, mode);
|
5251
|
-
} catch (er) {
|
5252
|
-
if (!chownErOk(er)) throw er;
|
5253
|
-
}
|
5254
|
-
};
|
5255
|
-
}
|
5256
|
-
function chownFix(orig) {
|
5257
|
-
if (!orig) return orig;
|
5258
|
-
return function(target, uid, gid, cb) {
|
5259
|
-
return orig.call(fs3, target, uid, gid, function(er) {
|
5260
|
-
if (chownErOk(er)) er = null;
|
5261
|
-
if (cb) cb.apply(this, arguments);
|
5262
|
-
});
|
5263
|
-
};
|
5264
|
-
}
|
5265
|
-
function chownFixSync(orig) {
|
5266
|
-
if (!orig) return orig;
|
5267
|
-
return function(target, uid, gid) {
|
5268
|
-
try {
|
5269
|
-
return orig.call(fs3, target, uid, gid);
|
5270
|
-
} catch (er) {
|
5271
|
-
if (!chownErOk(er)) throw er;
|
5272
|
-
}
|
5273
|
-
};
|
5274
|
-
}
|
5275
|
-
function statFix(orig) {
|
5276
|
-
if (!orig) return orig;
|
5277
|
-
return function(target, options, cb) {
|
5278
|
-
if (typeof options === "function") {
|
5279
|
-
cb = options;
|
5280
|
-
options = null;
|
5281
|
-
}
|
5282
|
-
function callback(er, stats) {
|
5283
|
-
if (stats) {
|
5284
|
-
if (stats.uid < 0) stats.uid += 4294967296;
|
5285
|
-
if (stats.gid < 0) stats.gid += 4294967296;
|
5286
|
-
}
|
5287
|
-
if (cb) cb.apply(this, arguments);
|
5288
|
-
}
|
5289
|
-
return options ? orig.call(fs3, target, options, callback) : orig.call(fs3, target, callback);
|
5290
|
-
};
|
5291
|
-
}
|
5292
|
-
function statFixSync(orig) {
|
5293
|
-
if (!orig) return orig;
|
5294
|
-
return function(target, options) {
|
5295
|
-
var stats = options ? orig.call(fs3, target, options) : orig.call(fs3, target);
|
5296
|
-
if (stats) {
|
5297
|
-
if (stats.uid < 0) stats.uid += 4294967296;
|
5298
|
-
if (stats.gid < 0) stats.gid += 4294967296;
|
5299
|
-
}
|
5300
|
-
return stats;
|
5301
|
-
};
|
5302
|
-
}
|
5303
|
-
function chownErOk(er) {
|
5304
|
-
if (!er)
|
5305
|
-
return true;
|
5306
|
-
if (er.code === "ENOSYS")
|
5307
|
-
return true;
|
5308
|
-
var nonroot = !process.getuid || process.getuid() !== 0;
|
5309
|
-
if (nonroot) {
|
5310
|
-
if (er.code === "EINVAL" || er.code === "EPERM")
|
5311
|
-
return true;
|
5312
|
-
}
|
5313
|
-
return false;
|
5314
|
-
}
|
5315
|
-
}
|
5316
|
-
}
|
5317
|
-
});
|
5318
|
-
var require_legacy_streams2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
5319
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module2) {
|
5320
|
-
"use strict";
|
5321
|
-
var Stream = (0, import_chunk_WWAWV7DQ.__require)("stream").Stream;
|
5322
|
-
module2.exports = legacy;
|
5323
|
-
function legacy(fs3) {
|
5324
|
-
return {
|
5325
|
-
ReadStream,
|
5326
|
-
WriteStream
|
5327
|
-
};
|
5328
|
-
function ReadStream(path7, options) {
|
5329
|
-
if (!(this instanceof ReadStream)) return new ReadStream(path7, options);
|
5330
|
-
Stream.call(this);
|
5331
|
-
var self = this;
|
5332
|
-
this.path = path7;
|
5333
|
-
this.fd = null;
|
5334
|
-
this.readable = true;
|
5335
|
-
this.paused = false;
|
5336
|
-
this.flags = "r";
|
5337
|
-
this.mode = 438;
|
5338
|
-
this.bufferSize = 64 * 1024;
|
5339
|
-
options = options || {};
|
5340
|
-
var keys = Object.keys(options);
|
5341
|
-
for (var index = 0, length = keys.length; index < length; index++) {
|
5342
|
-
var key = keys[index];
|
5343
|
-
this[key] = options[key];
|
5344
|
-
}
|
5345
|
-
if (this.encoding) this.setEncoding(this.encoding);
|
5346
|
-
if (this.start !== void 0) {
|
5347
|
-
if ("number" !== typeof this.start) {
|
5348
|
-
throw TypeError("start must be a Number");
|
5349
|
-
}
|
5350
|
-
if (this.end === void 0) {
|
5351
|
-
this.end = Infinity;
|
5352
|
-
} else if ("number" !== typeof this.end) {
|
5353
|
-
throw TypeError("end must be a Number");
|
5354
|
-
}
|
5355
|
-
if (this.start > this.end) {
|
5356
|
-
throw new Error("start must be <= end");
|
5357
|
-
}
|
5358
|
-
this.pos = this.start;
|
5359
|
-
}
|
5360
|
-
if (this.fd !== null) {
|
5361
|
-
process.nextTick(function() {
|
5362
|
-
self._read();
|
5363
|
-
});
|
5364
|
-
return;
|
5365
|
-
}
|
5366
|
-
fs3.open(this.path, this.flags, this.mode, function(err, fd) {
|
5367
|
-
if (err) {
|
5368
|
-
self.emit("error", err);
|
5369
|
-
self.readable = false;
|
5370
|
-
return;
|
5371
|
-
}
|
5372
|
-
self.fd = fd;
|
5373
|
-
self.emit("open", fd);
|
5374
|
-
self._read();
|
5375
|
-
});
|
5376
|
-
}
|
5377
|
-
function WriteStream(path7, options) {
|
5378
|
-
if (!(this instanceof WriteStream)) return new WriteStream(path7, options);
|
5379
|
-
Stream.call(this);
|
5380
|
-
this.path = path7;
|
5381
|
-
this.fd = null;
|
5382
|
-
this.writable = true;
|
5383
|
-
this.flags = "w";
|
5384
|
-
this.encoding = "binary";
|
5385
|
-
this.mode = 438;
|
5386
|
-
this.bytesWritten = 0;
|
5387
|
-
options = options || {};
|
5388
|
-
var keys = Object.keys(options);
|
5389
|
-
for (var index = 0, length = keys.length; index < length; index++) {
|
5390
|
-
var key = keys[index];
|
5391
|
-
this[key] = options[key];
|
5392
|
-
}
|
5393
|
-
if (this.start !== void 0) {
|
5394
|
-
if ("number" !== typeof this.start) {
|
5395
|
-
throw TypeError("start must be a Number");
|
5396
|
-
}
|
5397
|
-
if (this.start < 0) {
|
5398
|
-
throw new Error("start must be >= zero");
|
5399
|
-
}
|
5400
|
-
this.pos = this.start;
|
5401
|
-
}
|
5402
|
-
this.busy = false;
|
5403
|
-
this._queue = [];
|
5404
|
-
if (this.fd === null) {
|
5405
|
-
this._open = fs3.open;
|
5406
|
-
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
5407
|
-
this.flush();
|
5408
|
-
}
|
5409
|
-
}
|
5410
|
-
}
|
5411
|
-
}
|
5412
|
-
});
|
5413
|
-
var require_clone2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
5414
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module2) {
|
5415
|
-
"use strict";
|
5416
|
-
module2.exports = clone;
|
5417
|
-
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
|
5418
|
-
return obj.__proto__;
|
5419
|
-
};
|
5420
|
-
function clone(obj) {
|
5421
|
-
if (obj === null || typeof obj !== "object")
|
5422
|
-
return obj;
|
5423
|
-
if (obj instanceof Object)
|
5424
|
-
var copy = { __proto__: getPrototypeOf(obj) };
|
5425
|
-
else
|
5426
|
-
var copy = /* @__PURE__ */ Object.create(null);
|
5427
|
-
Object.getOwnPropertyNames(obj).forEach(function(key) {
|
5428
|
-
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
|
5429
|
-
});
|
5430
|
-
return copy;
|
5431
|
-
}
|
5432
|
-
}
|
5433
|
-
});
|
5434
|
-
var require_graceful_fs2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
5435
|
-
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
|
5436
|
-
"use strict";
|
5437
|
-
var fs3 = (0, import_chunk_WWAWV7DQ.__require)("fs");
|
5438
|
-
var polyfills = require_polyfills2();
|
5439
|
-
var legacy = require_legacy_streams2();
|
5440
|
-
var clone = require_clone2();
|
5441
|
-
var util = (0, import_chunk_WWAWV7DQ.__require)("util");
|
5442
|
-
var gracefulQueue;
|
5443
|
-
var previousSymbol;
|
5444
|
-
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
5445
|
-
gracefulQueue = Symbol.for("graceful-fs.queue");
|
5446
|
-
previousSymbol = Symbol.for("graceful-fs.previous");
|
5447
|
-
} else {
|
5448
|
-
gracefulQueue = "___graceful-fs.queue";
|
5449
|
-
previousSymbol = "___graceful-fs.previous";
|
5450
|
-
}
|
5451
|
-
function noop() {
|
5452
|
-
}
|
5453
|
-
function publishQueue(context, queue2) {
|
5454
|
-
Object.defineProperty(context, gracefulQueue, {
|
5455
|
-
get: function() {
|
5456
|
-
return queue2;
|
5457
|
-
}
|
5458
|
-
});
|
5459
|
-
}
|
5460
|
-
var debug4 = noop;
|
5461
|
-
if (util.debuglog)
|
5462
|
-
debug4 = util.debuglog("gfs4");
|
5463
|
-
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
5464
|
-
debug4 = function() {
|
5465
|
-
var m = util.format.apply(util, arguments);
|
5466
|
-
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
5467
|
-
console.error(m);
|
5468
|
-
};
|
5469
|
-
if (!fs3[gracefulQueue]) {
|
5470
|
-
queue = global[gracefulQueue] || [];
|
5471
|
-
publishQueue(fs3, queue);
|
5472
|
-
fs3.close = function(fs$close) {
|
5473
|
-
function close(fd, cb) {
|
5474
|
-
return fs$close.call(fs3, fd, function(err) {
|
5475
|
-
if (!err) {
|
5476
|
-
resetQueue();
|
5477
|
-
}
|
5478
|
-
if (typeof cb === "function")
|
5479
|
-
cb.apply(this, arguments);
|
5480
|
-
});
|
5481
|
-
}
|
5482
|
-
Object.defineProperty(close, previousSymbol, {
|
5483
|
-
value: fs$close
|
5484
|
-
});
|
5485
|
-
return close;
|
5486
|
-
}(fs3.close);
|
5487
|
-
fs3.closeSync = function(fs$closeSync) {
|
5488
|
-
function closeSync(fd) {
|
5489
|
-
fs$closeSync.apply(fs3, arguments);
|
5490
|
-
resetQueue();
|
5491
|
-
}
|
5492
|
-
Object.defineProperty(closeSync, previousSymbol, {
|
5493
|
-
value: fs$closeSync
|
5494
|
-
});
|
5495
|
-
return closeSync;
|
5496
|
-
}(fs3.closeSync);
|
5497
|
-
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
5498
|
-
process.on("exit", function() {
|
5499
|
-
debug4(fs3[gracefulQueue]);
|
5500
|
-
(0, import_chunk_WWAWV7DQ.__require)("assert").equal(fs3[gracefulQueue].length, 0);
|
5501
|
-
});
|
5502
|
-
}
|
5503
|
-
}
|
5504
|
-
var queue;
|
5505
|
-
if (!global[gracefulQueue]) {
|
5506
|
-
publishQueue(global, fs3[gracefulQueue]);
|
5507
|
-
}
|
5508
|
-
module2.exports = patch(clone(fs3));
|
5509
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs3.__patched) {
|
5510
|
-
module2.exports = patch(fs3);
|
5511
|
-
fs3.__patched = true;
|
5512
|
-
}
|
5513
|
-
function patch(fs4) {
|
5514
|
-
polyfills(fs4);
|
5515
|
-
fs4.gracefulify = patch;
|
5516
|
-
fs4.createReadStream = createReadStream;
|
5517
|
-
fs4.createWriteStream = createWriteStream;
|
5518
|
-
var fs$readFile = fs4.readFile;
|
5519
|
-
fs4.readFile = readFile2;
|
5520
|
-
function readFile2(path7, options, cb) {
|
5521
|
-
if (typeof options === "function")
|
5522
|
-
cb = options, options = null;
|
5523
|
-
return go$readFile(path7, options, cb);
|
5524
|
-
function go$readFile(path8, options2, cb2, startTime) {
|
5525
|
-
return fs$readFile(path8, options2, function(err) {
|
5526
|
-
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
5527
|
-
enqueue([go$readFile, [path8, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
5528
|
-
else {
|
5529
|
-
if (typeof cb2 === "function")
|
5530
|
-
cb2.apply(this, arguments);
|
5531
|
-
}
|
5532
|
-
});
|
5533
|
-
}
|
5534
|
-
}
|
5535
|
-
var fs$writeFile = fs4.writeFile;
|
5536
|
-
fs4.writeFile = writeFile;
|
5537
|
-
function writeFile(path7, data, options, cb) {
|
5538
|
-
if (typeof options === "function")
|
5539
|
-
cb = options, options = null;
|
5540
|
-
return go$writeFile(path7, data, options, cb);
|
5541
|
-
function go$writeFile(path8, data2, options2, cb2, startTime) {
|
5542
|
-
return fs$writeFile(path8, data2, options2, function(err) {
|
5543
|
-
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
5544
|
-
enqueue([go$writeFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
5545
|
-
else {
|
5546
|
-
if (typeof cb2 === "function")
|
5547
|
-
cb2.apply(this, arguments);
|
5548
|
-
}
|
5549
|
-
});
|
5550
|
-
}
|
5551
|
-
}
|
5552
|
-
var fs$appendFile = fs4.appendFile;
|
5553
|
-
if (fs$appendFile)
|
5554
|
-
fs4.appendFile = appendFile;
|
5555
|
-
function appendFile(path7, data, options, cb) {
|
5556
|
-
if (typeof options === "function")
|
5557
|
-
cb = options, options = null;
|
5558
|
-
return go$appendFile(path7, data, options, cb);
|
5559
|
-
function go$appendFile(path8, data2, options2, cb2, startTime) {
|
5560
|
-
return fs$appendFile(path8, data2, options2, function(err) {
|
5561
|
-
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
5562
|
-
enqueue([go$appendFile, [path8, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
5563
|
-
else {
|
5564
|
-
if (typeof cb2 === "function")
|
5565
|
-
cb2.apply(this, arguments);
|
5566
|
-
}
|
5567
|
-
});
|
5568
|
-
}
|
5569
|
-
}
|
5570
|
-
var fs$copyFile = fs4.copyFile;
|
5571
|
-
if (fs$copyFile)
|
5572
|
-
fs4.copyFile = copyFile;
|
5573
|
-
function copyFile(src, dest, flags, cb) {
|
5574
|
-
if (typeof flags === "function") {
|
5575
|
-
cb = flags;
|
5576
|
-
flags = 0;
|
5577
|
-
}
|
5578
|
-
return go$copyFile(src, dest, flags, cb);
|
5579
|
-
function go$copyFile(src2, dest2, flags2, cb2, startTime) {
|
5580
|
-
return fs$copyFile(src2, dest2, flags2, function(err) {
|
5581
|
-
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
5582
|
-
enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
|
5583
|
-
else {
|
5584
|
-
if (typeof cb2 === "function")
|
5585
|
-
cb2.apply(this, arguments);
|
5586
|
-
}
|
5587
|
-
});
|
5588
|
-
}
|
5589
|
-
}
|
5590
|
-
var fs$readdir = fs4.readdir;
|
5591
|
-
fs4.readdir = readdir;
|
5592
|
-
var noReaddirOptionVersions = /^v[0-5]\./;
|
5593
|
-
function readdir(path7, options, cb) {
|
5594
|
-
if (typeof options === "function")
|
5595
|
-
cb = options, options = null;
|
5596
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path8, options2, cb2, startTime) {
|
5597
|
-
return fs$readdir(path8, fs$readdirCallback(
|
5598
|
-
path8,
|
5599
|
-
options2,
|
5600
|
-
cb2,
|
5601
|
-
startTime
|
5602
|
-
));
|
5603
|
-
} : function go$readdir2(path8, options2, cb2, startTime) {
|
5604
|
-
return fs$readdir(path8, options2, fs$readdirCallback(
|
5605
|
-
path8,
|
5606
|
-
options2,
|
5607
|
-
cb2,
|
5608
|
-
startTime
|
5609
|
-
));
|
5610
|
-
};
|
5611
|
-
return go$readdir(path7, options, cb);
|
5612
|
-
function fs$readdirCallback(path8, options2, cb2, startTime) {
|
5613
|
-
return function(err, files) {
|
5614
|
-
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
5615
|
-
enqueue([
|
5616
|
-
go$readdir,
|
5617
|
-
[path8, options2, cb2],
|
5618
|
-
err,
|
5619
|
-
startTime || Date.now(),
|
5620
|
-
Date.now()
|
5621
|
-
]);
|
5622
|
-
else {
|
5623
|
-
if (files && files.sort)
|
5624
|
-
files.sort();
|
5625
|
-
if (typeof cb2 === "function")
|
5626
|
-
cb2.call(this, err, files);
|
5627
|
-
}
|
5628
|
-
};
|
5629
|
-
}
|
5630
|
-
}
|
5631
|
-
if (process.version.substr(0, 4) === "v0.8") {
|
5632
|
-
var legStreams = legacy(fs4);
|
5633
|
-
ReadStream = legStreams.ReadStream;
|
5634
|
-
WriteStream = legStreams.WriteStream;
|
5635
|
-
}
|
5636
|
-
var fs$ReadStream = fs4.ReadStream;
|
5637
|
-
if (fs$ReadStream) {
|
5638
|
-
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
5639
|
-
ReadStream.prototype.open = ReadStream$open;
|
5640
|
-
}
|
5641
|
-
var fs$WriteStream = fs4.WriteStream;
|
5642
|
-
if (fs$WriteStream) {
|
5643
|
-
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
5644
|
-
WriteStream.prototype.open = WriteStream$open;
|
5645
|
-
}
|
5646
|
-
Object.defineProperty(fs4, "ReadStream", {
|
5647
|
-
get: function() {
|
5648
|
-
return ReadStream;
|
5649
|
-
},
|
5650
|
-
set: function(val) {
|
5651
|
-
ReadStream = val;
|
5652
|
-
},
|
5653
|
-
enumerable: true,
|
5654
|
-
configurable: true
|
5655
|
-
});
|
5656
|
-
Object.defineProperty(fs4, "WriteStream", {
|
5657
|
-
get: function() {
|
5658
|
-
return WriteStream;
|
5659
|
-
},
|
5660
|
-
set: function(val) {
|
5661
|
-
WriteStream = val;
|
5662
|
-
},
|
5663
|
-
enumerable: true,
|
5664
|
-
configurable: true
|
5665
|
-
});
|
5666
|
-
var FileReadStream = ReadStream;
|
5667
|
-
Object.defineProperty(fs4, "FileReadStream", {
|
5668
|
-
get: function() {
|
5669
|
-
return FileReadStream;
|
5670
|
-
},
|
5671
|
-
set: function(val) {
|
5672
|
-
FileReadStream = val;
|
5673
|
-
},
|
5674
|
-
enumerable: true,
|
5675
|
-
configurable: true
|
5676
|
-
});
|
5677
|
-
var FileWriteStream = WriteStream;
|
5678
|
-
Object.defineProperty(fs4, "FileWriteStream", {
|
5679
|
-
get: function() {
|
5680
|
-
return FileWriteStream;
|
5681
|
-
},
|
5682
|
-
set: function(val) {
|
5683
|
-
FileWriteStream = val;
|
5684
|
-
},
|
5685
|
-
enumerable: true,
|
5686
|
-
configurable: true
|
5687
|
-
});
|
5688
|
-
function ReadStream(path7, options) {
|
5689
|
-
if (this instanceof ReadStream)
|
5690
|
-
return fs$ReadStream.apply(this, arguments), this;
|
5691
|
-
else
|
5692
|
-
return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
|
5693
|
-
}
|
5694
|
-
function ReadStream$open() {
|
5695
|
-
var that = this;
|
5696
|
-
open(that.path, that.flags, that.mode, function(err, fd) {
|
5697
|
-
if (err) {
|
5698
|
-
if (that.autoClose)
|
5699
|
-
that.destroy();
|
5700
|
-
that.emit("error", err);
|
5701
|
-
} else {
|
5702
|
-
that.fd = fd;
|
5703
|
-
that.emit("open", fd);
|
5704
|
-
that.read();
|
5705
|
-
}
|
5706
|
-
});
|
5707
|
-
}
|
5708
|
-
function WriteStream(path7, options) {
|
5709
|
-
if (this instanceof WriteStream)
|
5710
|
-
return fs$WriteStream.apply(this, arguments), this;
|
5711
|
-
else
|
5712
|
-
return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
5713
|
-
}
|
5714
|
-
function WriteStream$open() {
|
5715
|
-
var that = this;
|
5716
|
-
open(that.path, that.flags, that.mode, function(err, fd) {
|
5717
|
-
if (err) {
|
5718
|
-
that.destroy();
|
5719
|
-
that.emit("error", err);
|
5720
|
-
} else {
|
5721
|
-
that.fd = fd;
|
5722
|
-
that.emit("open", fd);
|
4860
|
+
return callback(null, {
|
4861
|
+
toCwd: srcpath,
|
4862
|
+
toDst: path7.relative(dstdir, srcpath)
|
4863
|
+
});
|
4864
|
+
});
|
5723
4865
|
}
|
5724
4866
|
});
|
5725
4867
|
}
|
5726
|
-
|
5727
|
-
|
5728
|
-
|
5729
|
-
|
5730
|
-
|
5731
|
-
|
5732
|
-
|
5733
|
-
|
5734
|
-
|
5735
|
-
|
5736
|
-
|
5737
|
-
|
5738
|
-
|
5739
|
-
|
5740
|
-
|
5741
|
-
|
5742
|
-
|
5743
|
-
|
5744
|
-
|
5745
|
-
|
5746
|
-
|
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
|
+
};
|
5747
4894
|
}
|
5748
4895
|
}
|
5749
|
-
return fs4;
|
5750
4896
|
}
|
5751
|
-
|
5752
|
-
|
5753
|
-
|
5754
|
-
|
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
|
+
});
|
5755
4916
|
}
|
5756
|
-
|
5757
|
-
|
5758
|
-
|
5759
|
-
|
5760
|
-
|
5761
|
-
|
5762
|
-
|
5763
|
-
}
|
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";
|
5764
4924
|
}
|
5765
|
-
|
4925
|
+
return stats && stats.isDirectory() ? "dir" : "file";
|
5766
4926
|
}
|
5767
|
-
|
5768
|
-
|
5769
|
-
|
5770
|
-
|
5771
|
-
|
5772
|
-
|
5773
|
-
|
5774
|
-
|
5775
|
-
|
5776
|
-
|
5777
|
-
|
5778
|
-
|
5779
|
-
|
5780
|
-
|
5781
|
-
|
5782
|
-
|
5783
|
-
|
5784
|
-
|
5785
|
-
|
5786
|
-
|
5787
|
-
|
5788
|
-
|
5789
|
-
|
5790
|
-
|
5791
|
-
|
5792
|
-
|
5793
|
-
|
5794
|
-
|
5795
|
-
|
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 {
|
5796
4988
|
}
|
5797
|
-
if (
|
5798
|
-
|
4989
|
+
if (stats && stats.isSymbolicLink()) {
|
4990
|
+
const srcStat = fs3.statSync(srcpath);
|
4991
|
+
const dstStat = fs3.statSync(dstpath);
|
4992
|
+
if (areIdentical(srcStat, dstStat)) return;
|
5799
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);
|
5800
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
|
+
};
|
5801
5032
|
}
|
5802
5033
|
});
|
5803
5034
|
var require_utils2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
@@ -5820,7 +5051,7 @@ var require_jsonfile = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
5820
5051
|
"use strict";
|
5821
5052
|
var _fs;
|
5822
5053
|
try {
|
5823
|
-
_fs =
|
5054
|
+
_fs = require_graceful_fs();
|
5824
5055
|
} catch (_) {
|
5825
5056
|
_fs = (0, import_chunk_WWAWV7DQ.__require)("fs");
|
5826
5057
|
}
|
@@ -6167,9 +5398,9 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6167
5398
|
usesPrismaSchemaFolder: () => usesPrismaSchemaFolder2
|
6168
5399
|
});
|
6169
5400
|
module2.exports = __toCommonJS2(src_exports);
|
6170
|
-
var import_node_path22 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("path"));
|
5401
|
+
var import_node_path22 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("node:path"));
|
6171
5402
|
var import_prisma_schema_wasm2 = (0, import_chunk_WWAWV7DQ.__require)("@prisma/prisma-schema-wasm");
|
6172
|
-
var import_node_path5 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("path"));
|
5403
|
+
var import_node_path5 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("node:path"));
|
6173
5404
|
function createFileNameToKeyMapper(options) {
|
6174
5405
|
if (options.caseSensitive) {
|
6175
5406
|
return (fileName) => fileName;
|
@@ -6394,15 +5625,15 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
6394
5625
|
}
|
6395
5626
|
});
|
6396
5627
|
async function findUp(name, {
|
6397
|
-
cwd =
|
5628
|
+
cwd = import_node_process.default.cwd(),
|
6398
5629
|
type = "file",
|
6399
5630
|
stopAt
|
6400
5631
|
} = {}) {
|
6401
|
-
let directory =
|
6402
|
-
const { root } =
|
6403
|
-
stopAt =
|
5632
|
+
let directory = import_node_path.default.resolve(toPath(cwd) ?? "");
|
5633
|
+
const { root } = import_node_path.default.parse(directory);
|
5634
|
+
stopAt = import_node_path.default.resolve(directory, toPath(stopAt ?? root));
|
6404
5635
|
while (directory && directory !== stopAt && directory !== root) {
|
6405
|
-
const filePath =
|
5636
|
+
const filePath = import_node_path.default.isAbsolute(name) ? name : import_node_path.default.join(directory, name);
|
6406
5637
|
try {
|
6407
5638
|
const stats = await import_promises.default.stat(filePath);
|
6408
5639
|
if (type === "file" && stats.isFile() || type === "directory" && stats.isDirectory()) {
|
@@ -6410,14 +5641,14 @@ async function findUp(name, {
|
|
6410
5641
|
}
|
6411
5642
|
} catch {
|
6412
5643
|
}
|
6413
|
-
directory =
|
5644
|
+
directory = import_node_path.default.dirname(directory);
|
6414
5645
|
}
|
6415
5646
|
}
|
6416
5647
|
var toPath;
|
6417
5648
|
var init_find_up_simple = (0, import_chunk_WWAWV7DQ.__esm)({
|
6418
5649
|
"../../node_modules/.pnpm/find-up-simple@1.0.0/node_modules/find-up-simple/index.js"() {
|
6419
5650
|
"use strict";
|
6420
|
-
toPath = (urlOrPath) => urlOrPath instanceof URL ? (0,
|
5651
|
+
toPath = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
6421
5652
|
}
|
6422
5653
|
});
|
6423
5654
|
var require_js_tokens = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
@@ -10689,8 +9920,8 @@ var require_typos = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10689
9920
|
var require_fixer = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
10690
9921
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
|
10691
9922
|
"use strict";
|
10692
|
-
var isValidSemver = (0,
|
10693
|
-
var cleanSemver = (0,
|
9923
|
+
var isValidSemver = (0, import_chunk_NKQGJ3AE.require_valid)();
|
9924
|
+
var cleanSemver = (0, import_chunk_NKQGJ3AE.require_clean)();
|
10694
9925
|
var validateLicense = require_validate_npm_package_license();
|
10695
9926
|
var hostedGitInfo = require_lib5();
|
10696
9927
|
var isBuiltinModule = require_is_core_module();
|
@@ -11238,7 +10469,7 @@ var init_default = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
11238
10469
|
}
|
11239
10470
|
});
|
11240
10471
|
function toPath2(urlOrPath) {
|
11241
|
-
return urlOrPath instanceof URL ? (0,
|
10472
|
+
return urlOrPath instanceof URL ? (0, import_node_url2.fileURLToPath)(urlOrPath) : urlOrPath;
|
11242
10473
|
}
|
11243
10474
|
var init_node = (0, import_chunk_WWAWV7DQ.__esm)({
|
11244
10475
|
"../../node_modules/.pnpm/unicorn-magic@0.1.0/node_modules/unicorn-magic/node.js"() {
|
@@ -11257,7 +10488,7 @@ var init_read_pkg = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
11257
10488
|
init_parse_json();
|
11258
10489
|
import_normalize_package_data = (0, import_chunk_WWAWV7DQ.__toESM)(require_normalize(), 1);
|
11259
10490
|
init_node();
|
11260
|
-
getPackagePath = (cwd) =>
|
10491
|
+
getPackagePath = (cwd) => import_node_path2.default.resolve(toPath2(cwd) ?? ".", "package.json");
|
11261
10492
|
_readPackage = (file, normalize) => {
|
11262
10493
|
const json = typeof file === "string" ? parseJson(file) : file;
|
11263
10494
|
if (normalize) {
|
@@ -11273,7 +10504,7 @@ async function readPackageUp(options) {
|
|
11273
10504
|
return;
|
11274
10505
|
}
|
11275
10506
|
return {
|
11276
|
-
packageJson: await readPackage({ ...options, cwd:
|
10507
|
+
packageJson: await readPackage({ ...options, cwd: import_node_path3.default.dirname(filePath) }),
|
11277
10508
|
path: filePath
|
11278
10509
|
};
|
11279
10510
|
}
|
@@ -11557,16 +10788,16 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11557
10788
|
"@babel/helper-validator-identifier": "7.24.7",
|
11558
10789
|
"@opentelemetry/api": "1.9.0",
|
11559
10790
|
"@swc/core": "1.2.204",
|
11560
|
-
"@swc/jest": "0.2.
|
10791
|
+
"@swc/jest": "0.2.37",
|
11561
10792
|
"@types/babel__helper-validator-identifier": "7.15.2",
|
11562
|
-
"@types/jest": "29.5.
|
10793
|
+
"@types/jest": "29.5.14",
|
11563
10794
|
"@types/node": "18.19.31",
|
11564
10795
|
"@types/resolve": "1.20.6",
|
11565
10796
|
archiver: "6.0.2",
|
11566
10797
|
"checkpoint-client": "1.1.33",
|
11567
10798
|
"cli-truncate": "2.1.0",
|
11568
10799
|
dotenv: "16.0.3",
|
11569
|
-
esbuild: "0.
|
10800
|
+
esbuild: "0.24.0",
|
11570
10801
|
"escape-string-regexp": "4.0.0",
|
11571
10802
|
execa: "5.1.1",
|
11572
10803
|
"fast-glob": "3.3.2",
|
@@ -11611,7 +10842,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11611
10842
|
"@prisma/fetch-engine": "workspace:*",
|
11612
10843
|
"@prisma/generator-helper": "workspace:*",
|
11613
10844
|
"@prisma/get-platform": "workspace:*",
|
11614
|
-
"@prisma/prisma-schema-wasm": "5.
|
10845
|
+
"@prisma/prisma-schema-wasm": "5.23.0-25.1886abc311c2408082a16615b21bdb872116351c",
|
11615
10846
|
"@prisma/schema-files-loader": "workspace:*",
|
11616
10847
|
arg: "5.0.2",
|
11617
10848
|
prompts: "2.4.2"
|
@@ -11671,7 +10902,7 @@ var init_errorHelpers = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
11671
10902
|
}
|
11672
10903
|
});
|
11673
10904
|
function relativizePathInPSLError(error) {
|
11674
|
-
return error.replaceAll(process.cwd() +
|
10905
|
+
return error.replaceAll(process.cwd() + import_node_path4.default.sep, "");
|
11675
10906
|
}
|
11676
10907
|
var init_relativizePathInPSLError = (0, import_chunk_WWAWV7DQ.__esm)({
|
11677
10908
|
"../internals/src/engine-commands/relativizePathInPSLError.ts"() {
|
@@ -11902,7 +11133,7 @@ async function readSchemaFromSingleFile(schemaPath) {
|
|
11902
11133
|
const schemaTuple = [schemaPath, file];
|
11903
11134
|
return {
|
11904
11135
|
ok: true,
|
11905
|
-
schema: { schemaPath, schemaRootDir:
|
11136
|
+
schema: { schemaPath, schemaRootDir: import_path.default.dirname(schemaPath), schemas: [schemaTuple] }
|
11906
11137
|
};
|
11907
11138
|
}
|
11908
11139
|
async function readSchemaFromDirectory(schemaPath) {
|
@@ -11960,10 +11191,10 @@ async function readSchemaFromFileOrDirectory(schemaPath) {
|
|
11960
11191
|
}
|
11961
11192
|
async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName }) {
|
11962
11193
|
if (schemaPathFromArgs) {
|
11963
|
-
const absPath =
|
11194
|
+
const absPath = import_path.default.resolve(cwd, schemaPathFromArgs);
|
11964
11195
|
const customSchemaResult = await readSchemaFromFileOrDirectory(absPath);
|
11965
11196
|
if (!customSchemaResult.ok) {
|
11966
|
-
const relPath =
|
11197
|
+
const relPath = import_path.default.relative(cwd, absPath);
|
11967
11198
|
throw new Error(
|
11968
11199
|
`Could not load \`${argumentName}\` from provided path \`${relPath}\`: ${renderLookupError(
|
11969
11200
|
customSchemaResult.error
|
@@ -11980,14 +11211,9 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName
|
|
11980
11211
|
if (defaultResult.ok) {
|
11981
11212
|
return defaultResult;
|
11982
11213
|
}
|
11983
|
-
const yarnResult = await getSchemaFromYarn1Workspace(cwd, defaultResult.error.failures);
|
11984
|
-
if (yarnResult.ok) {
|
11985
|
-
return yarnResult;
|
11986
|
-
}
|
11987
|
-
const finalError = yarnResult.error.kind === "Yarn1WorkspaceSchemaNotFound" ? defaultResult.error : yarnResult.error;
|
11988
11214
|
return {
|
11989
11215
|
ok: false,
|
11990
|
-
error:
|
11216
|
+
error: defaultResult.error
|
11991
11217
|
};
|
11992
11218
|
}
|
11993
11219
|
function renderLookupError(error) {
|
@@ -12014,7 +11240,7 @@ function renderDefaultLookupError(error, cwd) {
|
|
12014
11240
|
for (const failure of error.failures) {
|
12015
11241
|
const filePath = failure.rule.schemaPath.path;
|
12016
11242
|
if (!printedPaths.has(failure.rule.schemaPath.path)) {
|
12017
|
-
parts.push(`${
|
11243
|
+
parts.push(`${import_path.default.relative(cwd, filePath)}: ${renderLookupError(failure.error)}`);
|
12018
11244
|
printedPaths.add(filePath);
|
12019
11245
|
}
|
12020
11246
|
}
|
@@ -12041,20 +11267,20 @@ async function getSchemaFromPackageJson(cwd) {
|
|
12041
11267
|
const schemaPathFromPkgJson = prismaConfig.data.schema;
|
12042
11268
|
if (typeof schemaPathFromPkgJson !== "string") {
|
12043
11269
|
throw new Error(
|
12044
|
-
`Provided schema path \`${schemaPathFromPkgJson}\` from \`${
|
11270
|
+
`Provided schema path \`${schemaPathFromPkgJson}\` from \`${import_path.default.relative(
|
12045
11271
|
cwd,
|
12046
11272
|
prismaConfig.packagePath
|
12047
11273
|
)}\` must be of type string`
|
12048
11274
|
);
|
12049
11275
|
}
|
12050
|
-
const absoluteSchemaPath =
|
11276
|
+
const absoluteSchemaPath = import_path.default.isAbsolute(schemaPathFromPkgJson) ? schemaPathFromPkgJson : import_path.default.resolve(import_path.default.dirname(prismaConfig.packagePath), schemaPathFromPkgJson);
|
12051
11277
|
const lookupResult = await readSchemaFromFileOrDirectory(absoluteSchemaPath);
|
12052
11278
|
if (!lookupResult.ok) {
|
12053
11279
|
throw new Error(
|
12054
|
-
`Could not load schema from \`${
|
11280
|
+
`Could not load schema from \`${import_path.default.relative(
|
12055
11281
|
cwd,
|
12056
11282
|
absoluteSchemaPath
|
12057
|
-
)}\` provided by "prisma.schema" config of \`${
|
11283
|
+
)}\` provided by "prisma.schema" config of \`${import_path.default.relative(
|
12058
11284
|
cwd,
|
12059
11285
|
prismaConfig.packagePath
|
12060
11286
|
)}\`: ${renderLookupError(lookupResult.error)}`
|
@@ -12062,71 +11288,30 @@ async function getSchemaFromPackageJson(cwd) {
|
|
12062
11288
|
}
|
12063
11289
|
return lookupResult;
|
12064
11290
|
}
|
12065
|
-
async function getSchemaFromYarn1Workspace(cwd, pastFailures) {
|
12066
|
-
if (!process.env.npm_config_user_agent?.includes("yarn")) {
|
12067
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
12068
|
-
}
|
12069
|
-
let workspaces;
|
12070
|
-
try {
|
12071
|
-
const { stdout: version2 } = await import_execa.default.command("yarn --version", {
|
12072
|
-
cwd
|
12073
|
-
});
|
12074
|
-
if (version2.startsWith("2")) {
|
12075
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
12076
|
-
}
|
12077
|
-
const { stdout } = await import_execa.default.command("yarn workspaces info --json", {
|
12078
|
-
cwd
|
12079
|
-
});
|
12080
|
-
const json = getJson(stdout);
|
12081
|
-
workspaces = Object.values(json);
|
12082
|
-
} catch {
|
12083
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
12084
|
-
}
|
12085
|
-
const workspaceRootDir = await findWorkspaceRoot(cwd);
|
12086
|
-
if (!workspaceRootDir) {
|
12087
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
12088
|
-
}
|
12089
|
-
for (const workspace of workspaces) {
|
12090
|
-
const workspacePath = import_path5.default.join(workspaceRootDir, workspace.location);
|
12091
|
-
const workspaceSchema = await tryWorkspacePath(workspacePath, pastFailures);
|
12092
|
-
if (workspaceSchema.ok) {
|
12093
|
-
return workspaceSchema;
|
12094
|
-
}
|
12095
|
-
}
|
12096
|
-
const rootPathSchema = await tryWorkspacePath(workspaceRootDir, pastFailures);
|
12097
|
-
return rootPathSchema;
|
12098
|
-
}
|
12099
|
-
async function tryWorkspacePath(cwd, pastFailures) {
|
12100
|
-
const pkgJson = await getSchemaFromPackageJson(cwd);
|
12101
|
-
if (pkgJson.ok) {
|
12102
|
-
return pkgJson;
|
12103
|
-
}
|
12104
|
-
return getDefaultSchema(cwd, pastFailures);
|
12105
|
-
}
|
12106
11291
|
async function getDefaultSchema(cwd, failures = []) {
|
12107
11292
|
const schemaPrisma = {
|
12108
11293
|
schemaPath: {
|
12109
|
-
path:
|
11294
|
+
path: import_path.default.join(cwd, "schema.prisma"),
|
12110
11295
|
kind: "file"
|
12111
11296
|
}
|
12112
11297
|
};
|
12113
11298
|
const prismaSchemaFile = {
|
12114
11299
|
schemaPath: {
|
12115
|
-
path:
|
11300
|
+
path: import_path.default.join(cwd, "prisma", "schema.prisma"),
|
12116
11301
|
kind: "file"
|
12117
11302
|
},
|
12118
11303
|
conflictsWith: {
|
12119
|
-
path:
|
11304
|
+
path: import_path.default.join(cwd, "prisma", "schema"),
|
12120
11305
|
kind: "directory"
|
12121
11306
|
}
|
12122
11307
|
};
|
12123
11308
|
const prismaSchemaFolder = {
|
12124
11309
|
schemaPath: {
|
12125
|
-
path:
|
11310
|
+
path: import_path.default.join(cwd, "prisma", "schema"),
|
12126
11311
|
kind: "directory"
|
12127
11312
|
},
|
12128
11313
|
conflictsWith: {
|
12129
|
-
path:
|
11314
|
+
path: import_path.default.join(cwd, "prisma", "schema.prisma"),
|
12130
11315
|
kind: "file"
|
12131
11316
|
}
|
12132
11317
|
};
|
@@ -12142,7 +11327,7 @@ async function getDefaultSchema(cwd, failures = []) {
|
|
12142
11327
|
const conflictingSchema = await loadSchemaFromDefaultLocation(rule.conflictsWith);
|
12143
11328
|
if (conflictingSchema.ok) {
|
12144
11329
|
throw new Error(
|
12145
|
-
`Found Prisma Schemas at both \`${
|
11330
|
+
`Found Prisma Schemas at both \`${import_path.default.relative(cwd, rule.schemaPath.path)}\` and \`${import_path.default.relative(
|
12146
11331
|
cwd,
|
12147
11332
|
rule.conflictsWith.path
|
12148
11333
|
)}\`. Please remove one.`
|
@@ -12167,50 +11352,11 @@ async function loadSchemaFromDefaultLocation(lookupPath) {
|
|
12167
11352
|
return readSchemaFromDirectory(lookupPath.path);
|
12168
11353
|
}
|
12169
11354
|
}
|
12170
|
-
|
12171
|
-
const firstCurly = stdout.indexOf("{");
|
12172
|
-
const lastCurly = stdout.lastIndexOf("}");
|
12173
|
-
const sliced = stdout.slice(firstCurly, lastCurly + 1);
|
12174
|
-
return JSON.parse(sliced);
|
12175
|
-
}
|
12176
|
-
function isPkgJsonWorkspaceRoot(pkgJson) {
|
12177
|
-
const workspaces = pkgJson.workspaces;
|
12178
|
-
if (!workspaces) {
|
12179
|
-
return false;
|
12180
|
-
}
|
12181
|
-
return Array.isArray(workspaces) || workspaces.packages !== void 0;
|
12182
|
-
}
|
12183
|
-
async function isNearestPkgJsonWorkspaceRoot(cwd) {
|
12184
|
-
const pkgJson = await readPackageUp({ cwd, normalize: false });
|
12185
|
-
if (!pkgJson) {
|
12186
|
-
return null;
|
12187
|
-
}
|
12188
|
-
return {
|
12189
|
-
isRoot: isPkgJsonWorkspaceRoot(pkgJson.packageJson),
|
12190
|
-
path: pkgJson.path
|
12191
|
-
};
|
12192
|
-
}
|
12193
|
-
async function findWorkspaceRoot(cwd) {
|
12194
|
-
let pkgJson = await isNearestPkgJsonWorkspaceRoot(cwd);
|
12195
|
-
if (!pkgJson) {
|
12196
|
-
return null;
|
12197
|
-
}
|
12198
|
-
if (pkgJson.isRoot === true) {
|
12199
|
-
return import_path5.default.dirname(pkgJson.path);
|
12200
|
-
}
|
12201
|
-
const pkgJsonParentDir = import_path5.default.dirname(import_path5.default.dirname(pkgJson.path));
|
12202
|
-
pkgJson = await isNearestPkgJsonWorkspaceRoot(pkgJsonParentDir);
|
12203
|
-
if (!pkgJson || pkgJson.isRoot === false) {
|
12204
|
-
return null;
|
12205
|
-
}
|
12206
|
-
return import_path5.default.dirname(pkgJson.path);
|
12207
|
-
}
|
12208
|
-
var import_schema_files_loader, import_execa, readFile, stat, debug2;
|
11355
|
+
var import_schema_files_loader, readFile, stat, debug2;
|
12209
11356
|
var init_getSchema = (0, import_chunk_WWAWV7DQ.__esm)({
|
12210
11357
|
"../internals/src/cli/getSchema.ts"() {
|
12211
11358
|
"use strict";
|
12212
11359
|
import_schema_files_loader = (0, import_chunk_WWAWV7DQ.__toESM)(require_dist());
|
12213
|
-
import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_WIZM7TFT.require_execa)());
|
12214
11360
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
12215
11361
|
init_read_package_up();
|
12216
11362
|
init_engine_commands();
|
@@ -12225,7 +11371,7 @@ var init_MigrateDiff = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
12225
11371
|
import_fs_jetpack = (0, import_chunk_WWAWV7DQ.__toESM)(require_main());
|
12226
11372
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
12227
11373
|
init_getSchema();
|
12228
|
-
(0,
|
11374
|
+
(0, import_chunk_LJOMIPJW.init_Migrate)();
|
12229
11375
|
(0, import_chunk_TKAGMA5K.init_captureStdout)();
|
12230
11376
|
debug3 = (0, import_debug3.default)("prisma:migrate:diff");
|
12231
11377
|
helpOptions = (0, import_internals.format)(
|
@@ -12330,7 +11476,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
12330
11476
|
};
|
12331
11477
|
} else if (args["--from-schema-datasource"]) {
|
12332
11478
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false });
|
12333
|
-
const schema = await getSchemaWithPath(
|
11479
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datasource"]), {
|
12334
11480
|
argumentName: "--from-schema-datasource"
|
12335
11481
|
});
|
12336
11482
|
const config = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
@@ -12339,7 +11485,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
12339
11485
|
...(0, import_internals.toSchemasWithConfigDir)(schema, config)
|
12340
11486
|
};
|
12341
11487
|
} else if (args["--from-schema-datamodel"]) {
|
12342
|
-
const schema = await getSchemaWithPath(
|
11488
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datamodel"]), {
|
12343
11489
|
argumentName: "--from-schema-datamodel"
|
12344
11490
|
});
|
12345
11491
|
from = {
|
@@ -12354,7 +11500,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
12354
11500
|
} else if (args["--from-migrations"]) {
|
12355
11501
|
from = {
|
12356
11502
|
tag: "migrations",
|
12357
|
-
path:
|
11503
|
+
path: import_path2.default.resolve(args["--from-migrations"])
|
12358
11504
|
};
|
12359
11505
|
} else if (args["--from-local-d1"]) {
|
12360
11506
|
const d1Database = await (0, import_internals.locateLocalCloudflareD1)({ arg: "--from-local-d1" });
|
@@ -12370,7 +11516,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
12370
11516
|
};
|
12371
11517
|
} else if (args["--to-schema-datasource"]) {
|
12372
11518
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false });
|
12373
|
-
const schema = await getSchemaWithPath(
|
11519
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datasource"]), {
|
12374
11520
|
argumentName: "--to-schema-datasource"
|
12375
11521
|
});
|
12376
11522
|
const config = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
@@ -12379,7 +11525,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
12379
11525
|
...(0, import_internals.toSchemasWithConfigDir)(schema, config)
|
12380
11526
|
};
|
12381
11527
|
} else if (args["--to-schema-datamodel"]) {
|
12382
|
-
const schema = await getSchemaWithPath(
|
11528
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datamodel"]), {
|
12383
11529
|
argumentName: "--to-schema-datamodel"
|
12384
11530
|
});
|
12385
11531
|
to = {
|
@@ -12394,7 +11540,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
12394
11540
|
} else if (args["--to-migrations"]) {
|
12395
11541
|
to = {
|
12396
11542
|
tag: "migrations",
|
12397
|
-
path:
|
11543
|
+
path: import_path2.default.resolve(args["--to-migrations"])
|
12398
11544
|
};
|
12399
11545
|
} else if (args["--to-local-d1"]) {
|
12400
11546
|
const d1Database = await (0, import_internals.locateLocalCloudflareD1)({ arg: "--to-local-d1" });
|
@@ -12403,7 +11549,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
12403
11549
|
url: `file:${d1Database}`
|
12404
11550
|
};
|
12405
11551
|
}
|
12406
|
-
const migrate = new
|
11552
|
+
const migrate = new import_chunk_LJOMIPJW.Migrate();
|
12407
11553
|
const captureStdout = new import_chunk_TKAGMA5K.CaptureStdout();
|
12408
11554
|
const outputPath = args["--output"];
|
12409
11555
|
const isOutputDefined = Boolean(outputPath);
|