@prisma/internals 6.6.0-integration-push-xmzqvqxpztks.11 → 6.6.0-integration-mcp.2
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/Generator.d.ts +5 -23
- package/dist/Generator.js +2 -4
- package/dist/{chunk-EPXBOIA5.js → chunk-2I3VYCA7.js} +5 -5
- package/dist/{chunk-2QTAK7KO.js → chunk-2LDG4PID.js} +5 -5
- package/dist/{chunk-JOIIWB3U.js → chunk-2LOGW45F.js} +68 -33
- package/dist/{chunk-KB5DKCI4.js → chunk-3GYXMWBM.js} +7 -7
- package/dist/{chunk-C36XBSRA.js → chunk-4KCLNFE4.js} +5 -5
- package/dist/{chunk-Y4ZCEXKJ.js → chunk-5CBAXTAF.js} +5 -5
- package/dist/chunk-72UZXEBG.js +28 -0
- package/dist/{chunk-2HN7FYKA.js → chunk-AP52B62F.js} +5 -5
- package/dist/{chunk-HG3YOAAE.js → chunk-AXD7KB4D.js} +5 -5
- package/dist/chunk-BWGDP6B5.js +4948 -0
- package/dist/chunk-DYV47NUW.js +796 -0
- package/dist/{chunk-BPDMLM32.js → chunk-DYVL6P7F.js} +13 -46
- package/dist/{chunk-DKSUHQGA.js → chunk-EKESIUIK.js} +7 -7
- package/dist/chunk-EUTJYQDW.js +46 -0
- package/dist/{chunk-3EGV6JCZ.js → chunk-FAPPXX7W.js} +8 -8
- package/dist/chunk-GHHABGYW.js +28 -0
- package/dist/{chunk-FJR5JRC2.js → chunk-GV244NDE.js} +7 -7
- package/dist/{chunk-D4VDA2TZ.js → chunk-IRWX4FCC.js} +6 -6
- package/dist/{chunk-IDINCQMN.js → chunk-IWTEX7EE.js} +9 -780
- package/dist/{chunk-NVNI2SRU.js → chunk-KNNTV7IN.js} +687 -213
- package/dist/{chunk-AO5ASZAS.js → chunk-LWBLVV7Y.js} +8 -8
- package/dist/{chunk-5AI4FIZ3.js → chunk-MEOOYUIZ.js} +10 -10
- package/dist/{chunk-TQFONRJP.js → chunk-MXAUURHG.js} +5 -5
- package/dist/chunk-OQ2NRV2Y.js +35 -0
- package/dist/{chunk-YNDF56XR.js → chunk-ORPBIAE5.js} +8 -8
- package/dist/{chunk-SHHALVIQ.js → chunk-OUQPIJFQ.js} +5 -5
- package/dist/chunk-PE6DXWOX.js +52 -0
- package/dist/{chunk-3BVB3DTJ.js → chunk-PING5S2U.js} +8 -8
- package/dist/{chunk-2R7JBGUP.js → chunk-PWGQKUJW.js} +200 -85
- package/dist/{chunk-CTAL72US.js → chunk-Q2IBLC6D.js} +5 -5
- package/dist/{chunk-XG33Y5QX.js → chunk-R45GQNKO.js} +200 -85
- package/dist/{chunk-MJIP3FY5.js → chunk-R4ZFFYJA.js} +238 -2502
- package/dist/{chunk-7UNYBZSU.js → chunk-RABVZXRU.js} +7 -7
- package/dist/{chunk-3DQANJMY.js → chunk-SAAMENIS.js} +7 -7
- package/dist/{chunk-57VS7LXW.js → chunk-SNSJWJTA.js} +5 -5
- package/dist/{chunk-YR5KNFKN.js → chunk-SUOMIRLO.js} +6 -6
- package/dist/{chunk-75BIJ5PX.js → chunk-UB2X7DGZ.js} +9 -9
- package/dist/{chunk-BWYO73FG.js → chunk-UFYFNNCN.js} +8 -8
- package/dist/{chunk-67I7CEQJ.js → chunk-URRVX2VQ.js} +6 -6
- package/dist/{chunk-FUC2LI24.js → chunk-VTJOX6HO.js} +5 -5
- package/dist/{chunk-EFNTOXMV.js → chunk-VYJSNZF3.js} +4 -3
- package/dist/{chunk-ETYWYJBX.js → chunk-WF5LZFJS.js} +12 -12
- package/dist/{chunk-7U7QD73Y.js → chunk-WOIJKMTZ.js} +8 -8
- package/dist/{chunk-D6EDE5WT.js → chunk-XMVJRTN5.js} +5 -5
- package/dist/{chunk-RSLFYIHN.js → chunk-XRBOJLES.js} +5 -4
- package/dist/cli/checkUnsupportedDataProxy.js +44 -37
- package/dist/cli/getSchema.js +47 -40
- package/dist/cli/hashes.js +44 -37
- package/dist/cli/schemaContext.js +44 -37
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +43 -36
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/getEngineVersion.js +7 -6
- package/dist/engine-commands/getEnginesMetaInfo.js +9 -8
- package/dist/engine-commands/index.js +54 -47
- 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/errorReporting.js +6 -6
- package/dist/get-generators/generatorResolvers/generatorResolvers.d.ts +15 -0
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +139 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +6 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +26 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +9 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +26 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +8 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +29 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +6 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +139 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +1 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +26 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +20 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +26 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +7 -0
- package/dist/{resolvePkg.js → get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js} +6 -6
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.d.ts +1 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +17 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +20 -0
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +140 -0
- package/dist/get-generators/getGenerators.d.ts +9 -18
- package/dist/get-generators/getGenerators.js +46 -39
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -3
- package/dist/getPackedPackage.js +5 -4
- package/dist/index.d.ts +4 -2
- package/dist/index.js +87 -80
- package/dist/{multipart-parser-3AFJFP6K.js → multipart-parser-UV3WZSWW.js} +6 -6
- package/dist/resolveBinary.js +8 -7
- package/dist/schemaEngineCommands.js +10 -9
- package/dist/sendPanic.js +4 -4
- package/dist/utils/cloudflareD1.js +3 -3
- package/dist/utils/fs-functional.js +10 -10
- package/dist/utils/fs-utils.js +8 -8
- package/dist/utils/getEnvPaths.js +43 -36
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +5 -5
- package/dist/utils/loadEnvFile.js +43 -36
- package/dist/wasm.js +4 -4
- package/package.json +11 -10
- package/dist/resolvePkg.d.ts +0 -7
@@ -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_LWBLVV7Y_exports = {};
|
30
|
+
__export(chunk_LWBLVV7Y_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_LWBLVV7Y_exports);
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
37
|
-
var
|
38
|
-
var
|
37
|
+
var import_chunk_AP52B62F = require("./chunk-AP52B62F.js");
|
38
|
+
var import_chunk_SNSJWJTA = require("./chunk-SNSJWJTA.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_AP52B62F.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_SNSJWJTA.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_SNSJWJTA.prismaSchemaWasm.get_dmmf(params);
|
80
80
|
return data;
|
81
81
|
},
|
82
82
|
(e) => ({
|
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_MEOOYUIZ_exports = {};
|
30
|
+
__export(chunk_MEOOYUIZ_exports, {
|
31
31
|
ErrorKind: () => ErrorKind,
|
32
32
|
createErrorReport: () => createErrorReport,
|
33
33
|
makeErrorReportCompleted: () => makeErrorReportCompleted,
|
34
34
|
uploadZip: () => uploadZip
|
35
35
|
});
|
36
|
-
module.exports = __toCommonJS(
|
37
|
-
var
|
36
|
+
module.exports = __toCommonJS(chunk_MEOOYUIZ_exports);
|
37
|
+
var import_chunk_KNNTV7IN = require("./chunk-KNNTV7IN.js");
|
38
38
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
39
39
|
var import_node_http = __toESM(require("node:http"));
|
40
40
|
var import_node_https = __toESM(require("node:https"));
|
@@ -151,8 +151,8 @@ var Body = class {
|
|
151
151
|
} else if (ArrayBuffer.isView(body)) {
|
152
152
|
body = import_node_buffer2.Buffer.from(body.buffer, body.byteOffset, body.byteLength);
|
153
153
|
} else if (body instanceof import_node_stream2.default) {
|
154
|
-
} else if (body instanceof
|
155
|
-
body = (0,
|
154
|
+
} else if (body instanceof import_chunk_KNNTV7IN.FormData) {
|
155
|
+
body = (0, import_chunk_KNNTV7IN.formDataToBlob)(body);
|
156
156
|
boundary = body.type.split("=")[1];
|
157
157
|
} else {
|
158
158
|
body = import_node_buffer2.Buffer.from(String(body));
|
@@ -196,14 +196,14 @@ var Body = class {
|
|
196
196
|
async formData() {
|
197
197
|
const ct = this.headers.get("content-type");
|
198
198
|
if (ct.startsWith("application/x-www-form-urlencoded")) {
|
199
|
-
const formData = new
|
199
|
+
const formData = new import_chunk_KNNTV7IN.FormData();
|
200
200
|
const parameters = new URLSearchParams(await this.text());
|
201
201
|
for (const [name, value] of parameters) {
|
202
202
|
formData.append(name, value);
|
203
203
|
}
|
204
204
|
return formData;
|
205
205
|
}
|
206
|
-
const { toFormData } = await import("./multipart-parser-
|
206
|
+
const { toFormData } = await import("./multipart-parser-UV3WZSWW.js");
|
207
207
|
return toFormData(this.body, ct);
|
208
208
|
}
|
209
209
|
/**
|
@@ -214,7 +214,7 @@ var Body = class {
|
|
214
214
|
async blob() {
|
215
215
|
const ct = this.headers && this.headers.get("content-type") || this[INTERNALS].body && this[INTERNALS].body.type || "";
|
216
216
|
const buf = await this.arrayBuffer();
|
217
|
-
return new
|
217
|
+
return new import_chunk_KNNTV7IN.fetch_blob_default([buf], {
|
218
218
|
type: ct
|
219
219
|
});
|
220
220
|
}
|
@@ -342,7 +342,7 @@ var extractContentType = (body, request2) => {
|
|
342
342
|
if (import_node_buffer2.Buffer.isBuffer(body) || import_node_util.types.isAnyArrayBuffer(body) || ArrayBuffer.isView(body)) {
|
343
343
|
return null;
|
344
344
|
}
|
345
|
-
if (body instanceof
|
345
|
+
if (body instanceof import_chunk_KNNTV7IN.FormData) {
|
346
346
|
return `multipart/form-data; boundary=${request2[INTERNALS].boundary}`;
|
347
347
|
}
|
348
348
|
if (body && typeof body.getBoundary === "function") {
|
@@ -26,8 +26,8 @@ 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_MXAUURHG_exports = {};
|
30
|
+
__export(chunk_MXAUURHG_exports, {
|
31
31
|
createDirIfNotExists: () => createDirIfNotExists,
|
32
32
|
fs_utils_exports: () => fs_utils_exports,
|
33
33
|
getFilesInDir: () => getFilesInDir,
|
@@ -36,9 +36,9 @@ __export(chunk_TQFONRJP_exports, {
|
|
36
36
|
removeEmptyDirs: () => removeEmptyDirs,
|
37
37
|
writeFile: () => writeFile
|
38
38
|
});
|
39
|
-
module.exports = __toCommonJS(
|
39
|
+
module.exports = __toCommonJS(chunk_MXAUURHG_exports);
|
40
40
|
var import_chunk_J77ZIDXB = require("./chunk-J77ZIDXB.js");
|
41
|
-
var
|
41
|
+
var import_chunk_2LOGW45F = require("./chunk-2LOGW45F.js");
|
42
42
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
43
43
|
var import_promises = __toESM(require("fs/promises"));
|
44
44
|
var import_path = __toESM(require("path"));
|
@@ -51,7 +51,7 @@ var fs_utils_exports = {};
|
|
51
51
|
removeEmptyDirs: () => removeEmptyDirs,
|
52
52
|
writeFile: () => writeFile
|
53
53
|
});
|
54
|
-
var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
54
|
+
var import_globby = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_2LOGW45F.require_globby)());
|
55
55
|
function createDirIfNotExists(dir) {
|
56
56
|
return import_promises.default.mkdir(dir, { recursive: true });
|
57
57
|
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
6
|
+
var __export = (target, all) => {
|
7
|
+
for (var name in all)
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
9
|
+
};
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
12
|
+
for (let key of __getOwnPropNames(from))
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
15
|
+
}
|
16
|
+
return to;
|
17
|
+
};
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
|
+
var chunk_OQ2NRV2Y_exports = {};
|
20
|
+
__export(chunk_OQ2NRV2Y_exports, {
|
21
|
+
runPackageCmd: () => runPackageCmd
|
22
|
+
});
|
23
|
+
module.exports = __toCommonJS(chunk_OQ2NRV2Y_exports);
|
24
|
+
var import_chunk_72UZXEBG = require("./chunk-72UZXEBG.js");
|
25
|
+
var import_chunk_WF5LZFJS = require("./chunk-WF5LZFJS.js");
|
26
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
27
|
+
var import_execa = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_WF5LZFJS.require_execa)());
|
28
|
+
async function runPackageCmd(cwd, cmd, ...args) {
|
29
|
+
await import_execa.default.command(await (0, import_chunk_72UZXEBG.getPackageCmd)(cwd, cmd, ...args), {
|
30
|
+
// we skip this because we are already in the generator
|
31
|
+
env: { PRISMA_SKIP_POSTINSTALL_GENERATE: "true" },
|
32
|
+
stdio: "inherit",
|
33
|
+
cwd
|
34
|
+
});
|
35
|
+
}
|
@@ -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_ORPBIAE5_exports = {};
|
30
|
+
__export(chunk_ORPBIAE5_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_ORPBIAE5_exports);
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
39
|
-
var
|
38
|
+
var import_chunk_XMVJRTN5 = require("./chunk-XMVJRTN5.js");
|
39
|
+
var import_chunk_4KCLNFE4 = require("./chunk-4KCLNFE4.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_XMVJRTN5.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_4KCLNFE4.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_4KCLNFE4.prismaSchemaWasm.validate(params);
|
81
81
|
},
|
82
82
|
(e) => ({
|
83
83
|
type: "wasm-error",
|
@@ -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_OUQPIJFQ_exports = {};
|
20
|
+
__export(chunk_OUQPIJFQ_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_OUQPIJFQ_exports);
|
28
|
+
var import_chunk_SNSJWJTA = require("./chunk-SNSJWJTA.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_SNSJWJTA.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
34
34
|
return lintDiagnostics;
|
35
35
|
}
|
@@ -0,0 +1,52 @@
|
|
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 __toESM = (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_PE6DXWOX_exports = {};
|
30
|
+
__export(chunk_PE6DXWOX_exports, {
|
31
|
+
findPrismaClientDir: () => findPrismaClientDir
|
32
|
+
});
|
33
|
+
module.exports = __toCommonJS(chunk_PE6DXWOX_exports);
|
34
|
+
var import_chunk_URRVX2VQ = require("./chunk-URRVX2VQ.js");
|
35
|
+
var import_debug = __toESM(require("@prisma/debug"));
|
36
|
+
var import_fs = __toESM(require("fs"));
|
37
|
+
var import_path = __toESM(require("path"));
|
38
|
+
var debug = (0, import_debug.default)("prisma:generator");
|
39
|
+
var realPath = import_fs.default.promises.realpath;
|
40
|
+
async function findPrismaClientDir(baseDir) {
|
41
|
+
const resolveOpts = { basedir: baseDir, preserveSymlinks: true };
|
42
|
+
const CLIDir = await (0, import_chunk_URRVX2VQ.resolvePkg)("prisma", resolveOpts);
|
43
|
+
const clientDir = await (0, import_chunk_URRVX2VQ.resolvePkg)("@prisma/client", resolveOpts);
|
44
|
+
const resolvedClientDir = clientDir && await realPath(clientDir);
|
45
|
+
debug("prismaCLIDir", CLIDir);
|
46
|
+
debug("prismaClientDir", clientDir);
|
47
|
+
if (CLIDir === void 0) return resolvedClientDir;
|
48
|
+
if (clientDir === void 0) return resolvedClientDir;
|
49
|
+
const relDir = import_path.default.relative(CLIDir, clientDir).split(import_path.default.sep);
|
50
|
+
if (relDir[0] !== ".." || relDir[1] === "..") return void 0;
|
51
|
+
return resolvedClientDir;
|
52
|
+
}
|
@@ -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_PING5S2U_exports = {};
|
30
|
+
__export(chunk_PING5S2U_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_PING5S2U_exports);
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
39
|
-
var
|
38
|
+
var import_chunk_AP52B62F = require("./chunk-AP52B62F.js");
|
39
|
+
var import_chunk_SNSJWJTA = require("./chunk-SNSJWJTA.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_AP52B62F.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_SNSJWJTA.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_SNSJWJTA.prismaSchemaWasm.validate(params);
|
81
81
|
},
|
82
82
|
(e) => ({
|
83
83
|
type: "wasm-error",
|