@prisma/internals 5.23.0-dev.11 → 5.23.0-dev.13
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.
- package/dist/chunk-2DXAGCPS.js +177 -0
- package/dist/{chunk-4W2DSZ5T.js → chunk-3K4SNDVD.js} +5 -5
- package/dist/{chunk-ZWE4ZB2B.js → chunk-3SAELKHS.js} +8 -8
- package/dist/{chunk-5I4BOTBV.js → chunk-5MCWLJSR.js} +3 -9
- package/dist/chunk-5XRQ7ONW.js +122 -0
- package/dist/{chunk-5DKKB5C6.js → chunk-DQYACGXW.js} +5 -5
- package/dist/{chunk-MD3IRB7G.js → chunk-HILKNKFT.js} +5 -5
- package/dist/{chunk-ZVDINYHR.js → chunk-IZNYY65K.js} +4 -4
- package/dist/{chunk-UHF2UAAB.js → chunk-NYOD36LM.js} +5 -5
- package/dist/{chunk-KPZSMAEH.js → chunk-P44JNV75.js} +8 -8
- package/dist/chunk-QIVUAERL.js +2202 -0
- package/dist/chunk-QJZIYUVB.js +110 -0
- package/dist/{chunk-GESBTLG4.js → chunk-SYSL54YI.js} +25 -915
- package/dist/chunk-TFSZCVKC.js +166 -0
- package/dist/{chunk-WAJCLWKG.js → chunk-UUHFDPCC.js} +8 -8
- package/dist/chunk-V2VWODV3.js +54 -0
- package/dist/{chunk-WZ6Y6B5S.js → chunk-VOQ4P7QQ.js} +7 -7
- package/dist/{chunk-RYI7N7LI.js → chunk-XCXZAI32.js} +20 -139
- package/dist/{chunk-ZA3RMW2P.js → chunk-ZKAW5JSN.js} +5 -8
- package/dist/cli/checkUnsupportedDataProxy.js +14 -14
- package/dist/cli/getSchema.js +19 -19
- package/dist/cli/hashes.js +14 -14
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +13 -13
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/index.js +22 -22
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +13 -13
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +13 -13
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +14 -14
- package/dist/get-generators/getGenerators.js +16 -16
- package/dist/index.js +43 -43
- package/dist/sendPanic.js +13 -13
- package/dist/utils/getCommandWithExecutor.js +3 -3
- package/dist/utils/getEnvPaths.js +13 -13
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +13 -13
- package/dist/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
- package/dist/utils/isCurrentBinInstalledGlobally.js +2 -2
- package/dist/utils/loadEnvFile.js +13 -13
- package/dist/wasm.js +4 -4
- package/package.json +7 -7
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +0 -9
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +0 -132
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var chunk_QJZIYUVB_exports = {};
|
|
30
|
+
__export(chunk_QJZIYUVB_exports, {
|
|
31
|
+
BinaryType: () => import_fetch_engine.BinaryType,
|
|
32
|
+
engineEnvVarMap: () => import_fetch_engine.engineEnvVarMap,
|
|
33
|
+
maybeCopyToTmp: () => maybeCopyToTmp,
|
|
34
|
+
resolveBinary: () => resolveBinary,
|
|
35
|
+
safeResolveBinary: () => safeResolveBinary
|
|
36
|
+
});
|
|
37
|
+
module.exports = __toCommonJS(chunk_QJZIYUVB_exports);
|
|
38
|
+
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
|
39
|
+
var import_chunk_QIVUAERL = require("./chunk-QIVUAERL.js");
|
|
40
|
+
var import_chunk_TWSLDIFL = require("./chunk-TWSLDIFL.js");
|
|
41
|
+
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
42
|
+
var import_chunk_TZCE3PWZ = require("./chunk-TZCE3PWZ.js");
|
|
43
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
44
|
+
var import_engines = require("@prisma/engines");
|
|
45
|
+
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
46
|
+
var import_get_platform = require("@prisma/get-platform");
|
|
47
|
+
var import_fs = __toESM2(require("fs"));
|
|
48
|
+
var import_path = __toESM2(require("path"));
|
|
49
|
+
var import_fs_extra = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QIVUAERL.require_lib)());
|
|
50
|
+
var import_temp_dir = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_TZCE3PWZ.require_temp_dir)());
|
|
51
|
+
async function getBinaryName(name) {
|
|
52
|
+
const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
|
|
53
|
+
const extension = binaryTarget === "windows" ? ".exe" : "";
|
|
54
|
+
if (name === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
|
55
|
+
return (0, import_get_platform.getNodeAPIName)(binaryTarget, "fs");
|
|
56
|
+
}
|
|
57
|
+
return `${name}-${binaryTarget}${extension}`;
|
|
58
|
+
}
|
|
59
|
+
async function resolveBinary(name, proposedPath) {
|
|
60
|
+
if (proposedPath && !proposedPath.match(import_chunk_M3GBKLGE.vercelPkgPathRegex) && import_fs.default.existsSync(proposedPath)) {
|
|
61
|
+
return proposedPath;
|
|
62
|
+
}
|
|
63
|
+
const pathFromEnvVar = (0, import_fetch_engine.getBinaryEnvVarPath)(name);
|
|
64
|
+
if (pathFromEnvVar !== null) {
|
|
65
|
+
return pathFromEnvVar.path;
|
|
66
|
+
}
|
|
67
|
+
const binaryName = await getBinaryName(name);
|
|
68
|
+
const prismaPath = import_path.default.join((0, import_engines.getEnginesPath)(), binaryName);
|
|
69
|
+
if (import_fs.default.existsSync(prismaPath)) {
|
|
70
|
+
return maybeCopyToTmp(prismaPath);
|
|
71
|
+
}
|
|
72
|
+
const prismaPath2 = import_path.default.join(__dirname, "..", binaryName);
|
|
73
|
+
if (import_fs.default.existsSync(prismaPath2)) {
|
|
74
|
+
return maybeCopyToTmp(prismaPath2);
|
|
75
|
+
}
|
|
76
|
+
const prismaPath3 = import_path.default.join(__dirname, "../..", binaryName);
|
|
77
|
+
if (import_fs.default.existsSync(prismaPath3)) {
|
|
78
|
+
return maybeCopyToTmp(prismaPath3);
|
|
79
|
+
}
|
|
80
|
+
const prismaPath4 = import_path.default.join(__dirname, "../runtime", binaryName);
|
|
81
|
+
if (import_fs.default.existsSync(prismaPath4)) {
|
|
82
|
+
return maybeCopyToTmp(prismaPath4);
|
|
83
|
+
}
|
|
84
|
+
throw new Error(
|
|
85
|
+
`Could not find ${name} binary. Searched in:
|
|
86
|
+
- ${prismaPath}
|
|
87
|
+
- ${prismaPath2}
|
|
88
|
+
- ${prismaPath3}
|
|
89
|
+
- ${prismaPath4}`
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
function safeResolveBinary(name, proposedPath) {
|
|
93
|
+
return (0, import_chunk_7MD6344A.tryCatch2)(
|
|
94
|
+
() => resolveBinary(name, proposedPath),
|
|
95
|
+
(error) => error
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
async function maybeCopyToTmp(file) {
|
|
99
|
+
const dir = eval("__dirname");
|
|
100
|
+
if (dir.match(import_chunk_M3GBKLGE.vercelPkgPathRegex)) {
|
|
101
|
+
const targetDir = import_path.default.join(import_temp_dir.default, "prisma-binaries");
|
|
102
|
+
await (0, import_fs_extra.ensureDir)(targetDir);
|
|
103
|
+
const target = import_path.default.join(targetDir, import_path.default.basename(file));
|
|
104
|
+
const data = await import_fs.default.promises.readFile(file);
|
|
105
|
+
await import_fs.default.promises.writeFile(target, data);
|
|
106
|
+
(0, import_chunk_TWSLDIFL.chmodPlusX)(target);
|
|
107
|
+
return target;
|
|
108
|
+
}
|
|
109
|
+
return file;
|
|
110
|
+
}
|