@prisma/internals 6.19.0-integration-engines-6-19-0-22-integration-aijeyomah-feature-support-enum-ignore-directive-a33c542ee31e90995b9fcadac76fd478110e58ef.2 → 6.19.0-integration-next.9
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-6PZJ6RII.js → chunk-2GEJOE2N.js} +8 -8
- package/dist/{chunk-VK2VDFBF.js → chunk-4BCEID7N.js} +5 -5
- package/dist/{chunk-2HP4CSXL.js → chunk-5DXI4ZJR.js} +5 -5
- package/dist/{chunk-HO5HRHFZ.js → chunk-5W3BSMTH.js} +3 -6
- package/dist/{chunk-F2OZV76L.js → chunk-5XFNC2RY.js} +7 -7
- package/dist/{chunk-46ABODUM.js → chunk-6QTN4DDB.js} +6 -21
- package/dist/{chunk-CLRLZ46O.js → chunk-6ZX55FN5.js} +5 -5
- package/dist/{chunk-G3LOIH3Q.js → chunk-7RGUIF3Z.js} +5 -5
- package/dist/{chunk-WFNB7VRA.js → chunk-ARC7TW3L.js} +4 -14
- package/dist/{chunk-RS2R7COT.js → chunk-B22EOFPW.js} +3 -6
- package/dist/{chunk-Q4UYDW46.js → chunk-DUUFKGFP.js} +7 -7
- package/dist/{chunk-7SWFAW4B.js → chunk-EMP67BTC.js} +5 -5
- package/dist/{chunk-GMW36QQF.js → chunk-FC6CQUSK.js} +5 -5
- package/dist/{chunk-YXIWQFD6.js → chunk-FOO6EUZS.js} +8 -8
- package/dist/{chunk-PZMRR772.js → chunk-FURGECAD.js} +6 -6
- package/dist/{chunk-ERSH2BQA.js → chunk-FUYRCYVL.js} +3 -8
- package/dist/{chunk-4JCVHBYR.js → chunk-GL7OANR6.js} +5 -5
- package/dist/{chunk-HFFWZTVM.js → chunk-GSH4BXBI.js} +4 -6
- package/dist/{chunk-AOCRNXJL.js → chunk-HIAAJXPV.js} +8 -8
- package/dist/{chunk-MULODFYO.js → chunk-HUV2D26A.js} +7 -7
- package/dist/{chunk-DGLBZT44.js → chunk-J2YXGOYG.js} +8 -8
- package/dist/{chunk-UQUWZJVN.js → chunk-KIFFN3IT.js} +5 -5
- package/dist/{chunk-BGAFAVZF.js → chunk-KIYO3VQ7.js} +7 -7
- package/dist/{chunk-FRCKNT3Y.js → chunk-KXMVR5ZR.js} +28 -41
- package/dist/{chunk-EYVG6XQS.js → chunk-OKVM3CW4.js} +3 -39
- package/dist/{chunk-JYB4VMYJ.js → chunk-OYFBNBGP.js} +8 -8
- package/dist/{chunk-TW66KVSO.js → chunk-PWN3VIGB.js} +28 -41
- package/dist/{chunk-IIDMXGQL.js → chunk-QXSXJWOH.js} +5 -5
- package/dist/{chunk-OAT7ZJED.js → chunk-SRZLJFU4.js} +4 -8
- package/dist/{chunk-IWJXJNLL.js → chunk-SX6LLPZE.js} +8 -8
- package/dist/{chunk-4CGPN5SR.js → chunk-VRGMXDRD.js} +3 -6
- package/dist/{chunk-KPDPBG2H.js → chunk-W5QLNOYH.js} +5 -5
- package/dist/{chunk-NYE4XBHV.js → chunk-XY77TFUW.js} +8 -8
- package/dist/{chunk-J6Q6VC5X.js → chunk-ZX5ACO4F.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +26 -26
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +26 -26
- package/dist/cli/getGeneratorSuccessMessage.js +2 -3
- package/dist/cli/getSchema.d.ts +1 -15
- package/dist/cli/getSchema.js +4 -5
- package/dist/cli/hashes.js +4 -4
- package/dist/cli/schemaContext.js +26 -26
- package/dist/client/getClientEngineType.d.ts +0 -1
- package/dist/client/getClientEngineType.js +3 -3
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +25 -25
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/getEngineVersion.js +3 -3
- package/dist/engine-commands/getEnginesInfo.d.ts +0 -1
- package/dist/engine-commands/getEnginesInfo.js +4 -4
- package/dist/engine-commands/index.js +37 -37
- 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/getGenerators.d.ts +0 -1
- package/dist/get-generators/getGenerators.js +28 -28
- package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
- package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
- package/dist/index.js +61 -61
- package/dist/sendPanic.js +2 -2
- package/dist/utils/getEnvPaths.d.ts +1 -1
- package/dist/utils/getEnvPaths.js +2 -3
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +3 -3
- package/dist/utils/loadEnvFile.d.ts +1 -1
- package/dist/utils/loadEnvFile.js +3 -4
- package/dist/utils/serializeQueryEngineName.js +2 -2
- package/dist/wasm.js +5 -5
- package/package.json +15 -15
|
@@ -26,16 +26,16 @@ 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_2GEJOE2N_exports = {};
|
|
30
|
+
__export(chunk_2GEJOE2N_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_2GEJOE2N_exports);
|
|
35
35
|
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var import_chunk_5DXI4ZJR = require("./chunk-5DXI4ZJR.js");
|
|
38
|
+
var import_chunk_ZX5ACO4F = require("./chunk-ZX5ACO4F.js");
|
|
39
39
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -58,7 +58,7 @@ ${detailsHeader} ${message}`;
|
|
|
58
58
|
}).exhaustive();
|
|
59
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
60
60
|
[Context: getDmmf]`;
|
|
61
|
-
super((0,
|
|
61
|
+
super((0, import_chunk_5DXI4ZJR.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
62
62
|
this.name = "GetDmmfError";
|
|
63
63
|
}
|
|
64
64
|
};
|
|
@@ -70,13 +70,13 @@ async function getDMMF(options) {
|
|
|
70
70
|
() => {
|
|
71
71
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
|
72
72
|
debug("Triggering a Rust panic...");
|
|
73
|
-
|
|
73
|
+
import_chunk_ZX5ACO4F.prismaSchemaWasm.debug_panic();
|
|
74
74
|
}
|
|
75
75
|
const params = JSON.stringify({
|
|
76
76
|
prismaSchema: options.datamodel,
|
|
77
77
|
noColor: Boolean(process.env.NO_COLOR)
|
|
78
78
|
});
|
|
79
|
-
const data =
|
|
79
|
+
const data = import_chunk_ZX5ACO4F.prismaSchemaWasm.get_dmmf(params);
|
|
80
80
|
return data;
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_4BCEID7N_exports = {};
|
|
20
|
+
__export(chunk_4BCEID7N_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_4BCEID7N_exports);
|
|
24
|
+
var import_chunk_XY77TFUW = require("./chunk-XY77TFUW.js");
|
|
25
|
+
var packageJson = (0, import_chunk_XY77TFUW.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_5DXI4ZJR_exports = {};
|
|
20
|
+
__export(chunk_5DXI4ZJR_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_5DXI4ZJR_exports);
|
|
24
|
+
var import_chunk_W5QLNOYH = require("./chunk-W5QLNOYH.js");
|
|
25
25
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_W5QLNOYH.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -16,15 +16,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_5W3BSMTH_exports = {};
|
|
20
|
+
__export(chunk_5W3BSMTH_exports, {
|
|
21
21
|
serializeQueryEngineName: () => serializeQueryEngineName
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_5W3BSMTH_exports);
|
|
24
24
|
function serializeQueryEngineName(message) {
|
|
25
25
|
const normalizedName = "query-engine-NORMALIZED";
|
|
26
|
-
if (process.env.PRISMA_CLI_QUERY_ENGINE_TYPE === "binary") {
|
|
27
|
-
return message.replace(/query-engine binary/g, normalizedName);
|
|
28
|
-
}
|
|
29
26
|
return message.replace(/query-engine-node-api library/g, normalizedName);
|
|
30
27
|
}
|
|
@@ -26,13 +26,13 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_5XFNC2RY_exports = {};
|
|
30
|
+
__export(chunk_5XFNC2RY_exports, {
|
|
31
31
|
getBinaryPathsByVersion: () => getBinaryPathsByVersion
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
35
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_5XFNC2RY_exports);
|
|
34
|
+
var import_chunk_B22EOFPW = require("./chunk-B22EOFPW.js");
|
|
35
|
+
var import_chunk_VRGMXDRD = require("./chunk-VRGMXDRD.js");
|
|
36
36
|
var import_chunk_2SDPW6AX = require("./chunk-2SDPW6AX.js");
|
|
37
37
|
var import_chunk_7B5PXS6N = require("./chunk-7B5PXS6N.js");
|
|
38
38
|
var import_chunk_IDINCQMN = require("./chunk-IDINCQMN.js");
|
|
@@ -91,7 +91,7 @@ async function getBinaryPathsByVersion({
|
|
|
91
91
|
}
|
|
92
92
|
const binariesConfig = neededVersion.engines.reduce((acc, curr) => {
|
|
93
93
|
if (!binaryPathsOverride?.[curr]) {
|
|
94
|
-
acc[(0,
|
|
94
|
+
acc[(0, import_chunk_VRGMXDRD.engineTypeToBinaryType)(curr)] = binaryTargetBaseDir;
|
|
95
95
|
}
|
|
96
96
|
return acc;
|
|
97
97
|
}, /* @__PURE__ */ Object.create(null));
|
|
@@ -107,7 +107,7 @@ async function getBinaryPathsByVersion({
|
|
|
107
107
|
skipDownload
|
|
108
108
|
};
|
|
109
109
|
const binaryPathsWithEngineType = await (0, import_fetch_engine.download)(downloadParams);
|
|
110
|
-
const binaryPaths = (0, import_chunk_7B5PXS6N.mapKeys)(binaryPathsWithEngineType,
|
|
110
|
+
const binaryPaths = (0, import_chunk_7B5PXS6N.mapKeys)(binaryPathsWithEngineType, import_chunk_B22EOFPW.binaryTypeToEngineType);
|
|
111
111
|
binaryPathsByVersion[currentVersion] = binaryPaths;
|
|
112
112
|
}
|
|
113
113
|
if (binaryPathsOverride) {
|
|
@@ -26,13 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_6QTN4DDB_exports = {};
|
|
30
|
+
__export(chunk_6QTN4DDB_exports, {
|
|
31
31
|
getEnvPaths: () => getEnvPaths
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_6QTN4DDB_exports);
|
|
34
34
|
var import_chunk_3FP46GUV = require("./chunk-3FP46GUV.js");
|
|
35
|
-
var import_chunk_EYVG6XQS = require("./chunk-EYVG6XQS.js");
|
|
36
35
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
37
36
|
var import_node_path = __toESM(require("node:path"));
|
|
38
37
|
var import_node_process = __toESM(require("node:process"));
|
|
@@ -127,34 +126,20 @@ function findUpSync(name, options = {}) {
|
|
|
127
126
|
return matches[0];
|
|
128
127
|
}
|
|
129
128
|
var debug = (0, import_debug.default)("prisma:loadEnv");
|
|
130
|
-
|
|
129
|
+
function getEnvPaths(schemaPath, opts = { cwd: process.cwd() }) {
|
|
131
130
|
const rootEnvPath = getProjectRootEnvPath({ cwd: opts.cwd }) ?? null;
|
|
132
131
|
const schemaEnvPathFromArgs = schemaPathToEnvPath(schemaPath);
|
|
133
|
-
const schemaEnvPathFromPkgJson = schemaPathToEnvPath(await readSchemaPathFromPkgJson());
|
|
134
132
|
const schemaEnvPaths = [
|
|
135
133
|
schemaEnvPathFromArgs,
|
|
136
134
|
// 1 - Check --schema directory for .env
|
|
137
|
-
schemaEnvPathFromPkgJson,
|
|
138
|
-
// 2 - Check package.json schema directory for .env
|
|
139
135
|
"./prisma/.env",
|
|
140
|
-
//
|
|
136
|
+
// 2 - Check ./prisma directory for .env
|
|
141
137
|
"./.env"
|
|
142
|
-
//
|
|
138
|
+
// 3 - Check cwd for .env
|
|
143
139
|
];
|
|
144
140
|
const schemaEnvPath = schemaEnvPaths.find(import_chunk_3FP46GUV.exists);
|
|
145
141
|
return { rootEnvPath, schemaEnvPath };
|
|
146
142
|
}
|
|
147
|
-
async function readSchemaPathFromPkgJson() {
|
|
148
|
-
try {
|
|
149
|
-
const pkgJsonSchema = await (0, import_chunk_EYVG6XQS.getSchemaFromPackageJson)(process.cwd());
|
|
150
|
-
if (pkgJsonSchema.ok) {
|
|
151
|
-
pkgJsonSchema.schema.schemaPath;
|
|
152
|
-
}
|
|
153
|
-
return null;
|
|
154
|
-
} catch {
|
|
155
|
-
return null;
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
143
|
function getProjectRootEnvPath(opts) {
|
|
159
144
|
const pkgJsonPath = findUpSync((dir) => {
|
|
160
145
|
const pkgPath = import_path.default.join(dir, "package.json");
|
|
@@ -16,20 +16,20 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_6ZX55FN5_exports = {};
|
|
20
|
+
__export(chunk_6ZX55FN5_exports, {
|
|
21
21
|
getLintWarnings: () => getLintWarnings,
|
|
22
22
|
getLintWarningsAsText: () => getLintWarningsAsText,
|
|
23
23
|
handleLintPanic: () => handleLintPanic,
|
|
24
24
|
lintSchema: () => lintSchema,
|
|
25
25
|
warningToString: () => warningToString
|
|
26
26
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
28
|
-
var
|
|
27
|
+
module.exports = __toCommonJS(chunk_6ZX55FN5_exports);
|
|
28
|
+
var import_chunk_ZX5ACO4F = require("./chunk-ZX5ACO4F.js");
|
|
29
29
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
30
30
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
31
31
|
function lintSchema({ schemas }) {
|
|
32
|
-
const lintResult =
|
|
32
|
+
const lintResult = import_chunk_ZX5ACO4F.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -16,20 +16,20 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_7RGUIF3Z_exports = {};
|
|
20
|
+
__export(chunk_7RGUIF3Z_exports, {
|
|
21
21
|
getLintWarnings: () => getLintWarnings,
|
|
22
22
|
getLintWarningsAsText: () => getLintWarningsAsText,
|
|
23
23
|
handleLintPanic: () => handleLintPanic,
|
|
24
24
|
lintSchema: () => lintSchema,
|
|
25
25
|
warningToString: () => warningToString
|
|
26
26
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
28
|
-
var
|
|
27
|
+
module.exports = __toCommonJS(chunk_7RGUIF3Z_exports);
|
|
28
|
+
var import_chunk_QXSXJWOH = require("./chunk-QXSXJWOH.js");
|
|
29
29
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
30
30
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
31
31
|
function lintSchema({ schemas }) {
|
|
32
|
-
const lintResult =
|
|
32
|
+
const lintResult = import_chunk_QXSXJWOH.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -26,13 +26,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_ARC7TW3L_exports = {};
|
|
30
|
+
__export(chunk_ARC7TW3L_exports, {
|
|
31
31
|
getGeneratorSuccessMessage: () => getGeneratorSuccessMessage
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_ARC7TW3L_exports);
|
|
34
34
|
var import_chunk_XYCIH36R = require("./chunk-XYCIH36R.js");
|
|
35
|
-
var import_chunk_ERSH2BQA = require("./chunk-ERSH2BQA.js");
|
|
36
35
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
37
36
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
38
37
|
var import_path = __toESM(require("path"));
|
|
@@ -45,16 +44,7 @@ function getGeneratorSuccessMessage(generator, time) {
|
|
|
45
44
|
function formatVersion(generator) {
|
|
46
45
|
const version = generator.manifest?.version;
|
|
47
46
|
if (generator.getProvider() === "prisma-client-js") {
|
|
48
|
-
|
|
49
|
-
let engineHint = "";
|
|
50
|
-
if (generator.options?.noEngine) {
|
|
51
|
-
engineHint = ", engine=none";
|
|
52
|
-
} else if (engineType === "binary") {
|
|
53
|
-
engineHint = ", engine=binary";
|
|
54
|
-
} else if (engineType === "library") {
|
|
55
|
-
engineHint = "";
|
|
56
|
-
}
|
|
57
|
-
return `v${version ?? "?.?.?"}${engineHint}`;
|
|
47
|
+
return `v${version ?? "?.?.?"}`;
|
|
58
48
|
}
|
|
59
49
|
return version;
|
|
60
50
|
}
|
|
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_B22EOFPW_exports = {};
|
|
20
|
+
__export(chunk_B22EOFPW_exports, {
|
|
21
21
|
binaryTypeToEngineType: () => binaryTypeToEngineType
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_B22EOFPW_exports);
|
|
24
24
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
25
25
|
function binaryTypeToEngineType(binaryType) {
|
|
26
26
|
if (binaryType === import_fetch_engine.BinaryType.SchemaEngineBinary) {
|
|
@@ -29,8 +29,5 @@ function binaryTypeToEngineType(binaryType) {
|
|
|
29
29
|
if (binaryType === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
|
30
30
|
return "libqueryEngine";
|
|
31
31
|
}
|
|
32
|
-
if (binaryType === import_fetch_engine.BinaryType.QueryEngineBinary) {
|
|
33
|
-
return "queryEngine";
|
|
34
|
-
}
|
|
35
32
|
throw new Error(`Could not convert binary type ${binaryType}`);
|
|
36
33
|
}
|
|
@@ -26,17 +26,17 @@ 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_DUUFKGFP_exports = {};
|
|
30
|
+
__export(chunk_DUUFKGFP_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_DUUFKGFP_exports);
|
|
35
35
|
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
|
36
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_EMP67BTC = require("./chunk-EMP67BTC.js");
|
|
39
|
+
var import_chunk_QXSXJWOH = require("./chunk-QXSXJWOH.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: mergeSchemas]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_EMP67BTC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "MergeSchemasError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -72,7 +72,7 @@ function mergeSchemas(options) {
|
|
|
72
72
|
const params = JSON.stringify({
|
|
73
73
|
schema: options.schemas
|
|
74
74
|
});
|
|
75
|
-
return
|
|
75
|
+
return import_chunk_QXSXJWOH.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -16,15 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_EMP67BTC_exports = {};
|
|
20
|
+
__export(chunk_EMP67BTC_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_EMP67BTC_exports);
|
|
24
|
+
var import_chunk_4BCEID7N = require("./chunk-4BCEID7N.js");
|
|
25
25
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_4BCEID7N.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -26,13 +26,13 @@ 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_FC6CQUSK_exports = {};
|
|
30
|
+
__export(chunk_FC6CQUSK_exports, {
|
|
31
31
|
getEnginesInfo: () => getEnginesInfo,
|
|
32
32
|
resolveEngine: () => resolveEngine
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_FC6CQUSK_exports);
|
|
35
|
+
var import_chunk_SRZLJFU4 = require("./chunk-SRZLJFU4.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_FYZCPL2Z = require("./chunk-FYZCPL2Z.js");
|
|
38
38
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
@@ -139,7 +139,7 @@ async function resolveEngine(binaryName) {
|
|
|
139
139
|
enginePathEither,
|
|
140
140
|
import_chunk_5DBOS77Y.fromEither,
|
|
141
141
|
(0, import_chunk_5DBOS77Y.chain)((enginePath) => {
|
|
142
|
-
return (0,
|
|
142
|
+
return (0, import_chunk_SRZLJFU4.safeGetEngineVersion)(enginePath, binaryName);
|
|
143
143
|
})
|
|
144
144
|
)();
|
|
145
145
|
const engineInfo = {
|
|
@@ -26,17 +26,17 @@ 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_FOO6EUZS_exports = {};
|
|
30
|
+
__export(chunk_FOO6EUZS_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_FOO6EUZS_exports);
|
|
35
35
|
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
|
36
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_EMP67BTC = require("./chunk-EMP67BTC.js");
|
|
39
|
+
var import_chunk_QXSXJWOH = require("./chunk-QXSXJWOH.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
41
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: validate]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_EMP67BTC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "ValidateError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -71,13 +71,13 @@ function validate(options) {
|
|
|
71
71
|
() => {
|
|
72
72
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
|
73
73
|
debug("Triggering a Rust panic...");
|
|
74
|
-
|
|
74
|
+
import_chunk_QXSXJWOH.prismaSchemaWasm.debug_panic();
|
|
75
75
|
}
|
|
76
76
|
const params = JSON.stringify({
|
|
77
77
|
prismaSchema: options.schemas,
|
|
78
78
|
noColor: Boolean(process.env.NO_COLOR)
|
|
79
79
|
});
|
|
80
|
-
|
|
80
|
+
import_chunk_QXSXJWOH.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -16,14 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_FURGECAD_exports = {};
|
|
20
|
+
__export(chunk_FURGECAD_exports, {
|
|
21
21
|
loadEnvFile: () => loadEnvFile
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_FURGECAD_exports);
|
|
24
|
+
var import_chunk_6QTN4DDB = require("./chunk-6QTN4DDB.js");
|
|
25
25
|
var import_chunk_3FP46GUV = require("./chunk-3FP46GUV.js");
|
|
26
|
-
|
|
26
|
+
function loadEnvFile({
|
|
27
27
|
schemaPath,
|
|
28
28
|
config,
|
|
29
29
|
printMessage = false
|
|
@@ -33,7 +33,7 @@ async function loadEnvFile({
|
|
|
33
33
|
`);
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
|
-
const envPaths =
|
|
36
|
+
const envPaths = (0, import_chunk_6QTN4DDB.getEnvPaths)(schemaPath);
|
|
37
37
|
const envData = (0, import_chunk_3FP46GUV.tryLoadEnvs)(envPaths, { conflictCheck: "error" });
|
|
38
38
|
if (printMessage && envData && envData.message) {
|
|
39
39
|
process.stderr.write(envData.message + "\n");
|
|
@@ -16,15 +16,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_FUYRCYVL_exports = {};
|
|
20
|
+
__export(chunk_FUYRCYVL_exports, {
|
|
21
21
|
ClientEngineType: () => ClientEngineType,
|
|
22
22
|
getClientEngineType: () => getClientEngineType
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_FUYRCYVL_exports);
|
|
25
25
|
var ClientEngineType = /* @__PURE__ */ ((ClientEngineType2) => {
|
|
26
26
|
ClientEngineType2["Library"] = "library";
|
|
27
|
-
ClientEngineType2["Binary"] = "binary";
|
|
28
27
|
ClientEngineType2["Client"] = "client";
|
|
29
28
|
return ClientEngineType2;
|
|
30
29
|
})(ClientEngineType || {});
|
|
@@ -33,8 +32,6 @@ function getClientEngineType(generatorConfig) {
|
|
|
33
32
|
if (engineTypeFromEnvVar) return engineTypeFromEnvVar;
|
|
34
33
|
if (generatorConfig?.config.engineType === "library") {
|
|
35
34
|
return "library";
|
|
36
|
-
} else if (generatorConfig?.config.engineType === "binary") {
|
|
37
|
-
return "binary";
|
|
38
35
|
} else if (generatorConfig?.config.engineType === "client") {
|
|
39
36
|
return "client";
|
|
40
37
|
} else {
|
|
@@ -45,8 +42,6 @@ function getEngineTypeFromEnvVar() {
|
|
|
45
42
|
const engineType = process.env.PRISMA_CLIENT_ENGINE_TYPE;
|
|
46
43
|
if (engineType === "library") {
|
|
47
44
|
return "library";
|
|
48
|
-
} else if (engineType === "binary") {
|
|
49
|
-
return "binary";
|
|
50
45
|
} else if (engineType === "client") {
|
|
51
46
|
return "client";
|
|
52
47
|
} else {
|
|
@@ -26,16 +26,16 @@ 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_GL7OANR6_exports = {};
|
|
30
|
+
__export(chunk_GL7OANR6_exports, {
|
|
31
31
|
getCLIPathHash: () => getCLIPathHash,
|
|
32
32
|
getProjectHash: () => getProjectHash
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_GL7OANR6_exports);
|
|
35
|
+
var import_chunk_OKVM3CW4 = require("./chunk-OKVM3CW4.js");
|
|
36
36
|
var import_crypto = __toESM(require("crypto"));
|
|
37
37
|
async function getProjectHash(schemaPathFromArgs, schemaPathFromConfig) {
|
|
38
|
-
const projectPath = (await (0,
|
|
38
|
+
const projectPath = (await (0, import_chunk_OKVM3CW4.getSchemaWithPath)(schemaPathFromArgs, schemaPathFromConfig))?.schemaPath ?? process.cwd();
|
|
39
39
|
return import_crypto.default.createHash("sha256").update(projectPath).digest("hex").substring(0, 8);
|
|
40
40
|
}
|
|
41
41
|
function getCLIPathHash() {
|
|
@@ -26,11 +26,11 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_GSH4BXBI_exports = {};
|
|
30
|
+
__export(chunk_GSH4BXBI_exports, {
|
|
31
31
|
sendPanic: () => sendPanic
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_GSH4BXBI_exports);
|
|
34
34
|
var import_chunk_KDHESRKE = require("./chunk-KDHESRKE.js");
|
|
35
35
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
36
36
|
var import_chunk_5AI4FIZ3 = require("./chunk-5AI4FIZ3.js");
|
|
@@ -1813,9 +1813,7 @@ async function sendPanic({
|
|
|
1813
1813
|
return id;
|
|
1814
1814
|
}
|
|
1815
1815
|
function getCommand() {
|
|
1816
|
-
if (process.argv[2] === "
|
|
1817
|
-
return "introspect";
|
|
1818
|
-
} else if (process.argv[2] === "db" && process.argv[3] === "pull") {
|
|
1816
|
+
if (process.argv[2] === "db" && process.argv[3] === "pull") {
|
|
1819
1817
|
return "db pull";
|
|
1820
1818
|
}
|
|
1821
1819
|
return process.argv.slice(2).join(" ");
|
|
@@ -26,20 +26,20 @@ 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_HIAAJXPV_exports = {};
|
|
30
|
+
__export(chunk_HIAAJXPV_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig,
|
|
33
33
|
getDirectUrl: () => getDirectUrl,
|
|
34
34
|
getEffectiveUrl: () => getEffectiveUrl,
|
|
35
35
|
resolveUrl: () => resolveUrl
|
|
36
36
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
37
|
+
module.exports = __toCommonJS(chunk_HIAAJXPV_exports);
|
|
38
38
|
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
|
39
39
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
40
40
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
41
|
-
var
|
|
42
|
-
var
|
|
41
|
+
var import_chunk_EMP67BTC = require("./chunk-EMP67BTC.js");
|
|
42
|
+
var import_chunk_QXSXJWOH = require("./chunk-QXSXJWOH.js");
|
|
43
43
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
44
44
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
45
45
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -64,7 +64,7 @@ ${detailsHeader} ${message}`;
|
|
|
64
64
|
}).exhaustive();
|
|
65
65
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
66
66
|
[Context: getConfig]`;
|
|
67
|
-
super((0,
|
|
67
|
+
super((0, import_chunk_EMP67BTC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
68
68
|
this.name = "GetConfigError";
|
|
69
69
|
}
|
|
70
70
|
};
|
|
@@ -89,7 +89,7 @@ async function getConfig(options) {
|
|
|
89
89
|
() => {
|
|
90
90
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
|
91
91
|
debug("Triggering a Rust panic...");
|
|
92
|
-
|
|
92
|
+
import_chunk_QXSXJWOH.prismaSchemaWasm.debug_panic();
|
|
93
93
|
}
|
|
94
94
|
const params = JSON.stringify({
|
|
95
95
|
prismaSchema: options.datamodel,
|
|
@@ -97,7 +97,7 @@ async function getConfig(options) {
|
|
|
97
97
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
|
98
98
|
env: process.env
|
|
99
99
|
});
|
|
100
|
-
const data =
|
|
100
|
+
const data = import_chunk_QXSXJWOH.prismaSchemaWasm.get_config(params);
|
|
101
101
|
return data;
|
|
102
102
|
},
|
|
103
103
|
(e) => ({
|