@prisma/internals 6.6.0-dev.27 → 6.6.0-dev.28
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-GJTVX7D7.js → chunk-3EPHRVO3.js} +7 -7
- package/dist/{chunk-OYDGDQKS.js → chunk-4DBHGLDX.js} +13 -13
- package/dist/{chunk-SXXEVLXO.js → chunk-4QFYMU5Q.js} +4 -4
- package/dist/{chunk-FIQCRCUE.js → chunk-7W7UYM7C.js} +11 -11
- package/dist/{chunk-Z4ALPGAK.js → chunk-DB2ZXQNZ.js} +7 -7
- package/dist/{chunk-UJ725NXW.js → chunk-EDPM4TAT.js} +5 -5
- package/dist/{chunk-LXE3T6RS.js → chunk-FBHWUFLM.js} +131 -86
- package/dist/{chunk-JIWNUGZM.js → chunk-IOF3PJAC.js} +5 -5
- package/dist/{chunk-7WZO4C7P.js → chunk-IU6TJYZC.js} +125 -80
- package/dist/{chunk-GSUMZPVL.js → chunk-JPTRXV36.js} +7 -7
- package/dist/{chunk-CDL6HTAV.js → chunk-JTWCAWGS.js} +5 -5
- package/dist/{chunk-FA73SMDO.js → chunk-LMHOWT5I.js} +8 -8
- package/dist/{chunk-JTWAYHDZ.js → chunk-MXMNTCC5.js} +12 -12
- package/dist/{chunk-IVUMKFGZ.js → chunk-NWX4DSMZ.js} +7 -7
- package/dist/{chunk-35GKAHSZ.js → chunk-OCYZOJRG.js} +5 -5
- package/dist/{chunk-4URMCTG6.js → chunk-PSYMCJ4B.js} +4 -4
- package/dist/{chunk-NVH7RTDD.js → chunk-PVHEBSDI.js} +11 -11
- package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
- package/dist/{chunk-ZSMNFBKT.js → chunk-RZCTV2U3.js} +5 -5
- package/dist/{chunk-TQCLUNM2.js → chunk-VNIE2AZB.js} +4 -4
- package/dist/cli/checkUnsupportedDataProxy.js +27 -27
- package/dist/cli/getSchema.js +31 -31
- package/dist/cli/hashes.js +27 -27
- package/dist/cli/schemaContext.d.ts +43 -0
- package/dist/cli/schemaContext.js +135 -0
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +26 -26
- package/dist/engine-commands/getConfig.js +12 -12
- package/dist/engine-commands/getDmmf.js +9 -9
- package/dist/engine-commands/index.js +35 -35
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +9 -9
- package/dist/engine-commands/queryEngineCommons.js +6 -6
- package/dist/engine-commands/validate.js +9 -9
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +26 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +26 -26
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +27 -27
- package/dist/get-generators/getGenerators.js +29 -29
- package/dist/highlight/highlight.js +5 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +60 -59
- package/dist/sendPanic.js +26 -26
- package/dist/utils/canPrompt.js +3 -3
- package/dist/utils/getEnvPaths.js +26 -26
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +26 -26
- package/dist/utils/loadEnvFile.js +26 -26
- package/dist/utils/missingDatasource.js +4 -4
- package/dist/utils/missingGeneratorMessage.js +6 -6
- package/dist/wasm.js +4 -4
- package/package.json +8 -8
@@ -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_3EPHRVO3_exports = {};
|
30
|
+
__export(chunk_3EPHRVO3_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_3EPHRVO3_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
36
|
+
var import_chunk_PSYMCJ4B = require("./chunk-PSYMCJ4B.js");
|
37
|
+
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
37
38
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
39
|
var import_chunk_EZQCZVUB = require("./chunk-EZQCZVUB.js");
|
39
|
-
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
41
|
var import_chunk_JRVJL4KD = require("./chunk-JRVJL4KD.js");
|
42
42
|
var import_chunk_CCQRDM7X = require("./chunk-CCQRDM7X.js");
|
@@ -65,7 +65,7 @@ ${detailsHeader} ${message}`;
|
|
65
65
|
}
|
66
66
|
};
|
67
67
|
function mergeSchemas(options) {
|
68
|
-
const debugErrorType = (0,
|
68
|
+
const debugErrorType = (0, import_chunk_PSYMCJ4B.createDebugErrorType)(debug, "mergeSchemasWasm");
|
69
69
|
debug(`Using mergeSchemas Wasm`);
|
70
70
|
const mergeSchemasEither = (0, import_function.pipe)(
|
71
71
|
(0, import_chunk_7MD6344A.tryCatch)(
|
@@ -108,7 +108,7 @@ function mergeSchemas(options) {
|
|
108
108
|
return panic;
|
109
109
|
}
|
110
110
|
const errorOutput = e.error.message;
|
111
|
-
return new MergeSchemasError((0,
|
111
|
+
return new MergeSchemasError((0, import_chunk_PSYMCJ4B.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
112
112
|
}).exhaustive();
|
113
113
|
throw error;
|
114
114
|
}
|
@@ -26,22 +26,22 @@ 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_4DBHGLDX_exports = {};
|
30
|
+
__export(chunk_4DBHGLDX_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_4DBHGLDX_exports);
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
39
|
-
var
|
40
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
41
|
-
var import_chunk_CDL6HTAV = require("./chunk-CDL6HTAV.js");
|
39
|
+
var import_chunk_PSYMCJ4B = require("./chunk-PSYMCJ4B.js");
|
42
40
|
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
41
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
42
|
+
var import_chunk_JTWCAWGS = require("./chunk-JTWCAWGS.js");
|
43
43
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
44
|
-
var
|
44
|
+
var import_chunk_IOF3PJAC = require("./chunk-IOF3PJAC.js");
|
45
45
|
var import_chunk_CCQRDM7X = require("./chunk-CCQRDM7X.js");
|
46
46
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
47
47
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -65,7 +65,7 @@ ${detailsHeader} ${message}`;
|
|
65
65
|
}).exhaustive();
|
66
66
|
const errorMessageWithContext = `${constructedErrorMessage}
|
67
67
|
[Context: getConfig]`;
|
68
|
-
super((0,
|
68
|
+
super((0, import_chunk_JTWCAWGS.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
69
69
|
this.name = "GetConfigError";
|
70
70
|
}
|
71
71
|
};
|
@@ -83,14 +83,14 @@ function resolveUrl(envValue) {
|
|
83
83
|
return urlFromValue ?? urlEnvVarValue;
|
84
84
|
}
|
85
85
|
async function getConfig(options) {
|
86
|
-
const debugErrorType = (0,
|
86
|
+
const debugErrorType = (0, import_chunk_PSYMCJ4B.createDebugErrorType)(debug, "getConfigWasm");
|
87
87
|
debug(`Using getConfig Wasm`);
|
88
88
|
const configEither = (0, import_function.pipe)(
|
89
89
|
(0, import_chunk_7MD6344A.tryCatch)(
|
90
90
|
() => {
|
91
91
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
92
92
|
debug("Triggering a Rust panic...");
|
93
|
-
|
93
|
+
import_chunk_IOF3PJAC.prismaSchemaWasm.debug_panic();
|
94
94
|
}
|
95
95
|
const params = JSON.stringify({
|
96
96
|
prismaSchema: options.datamodel,
|
@@ -98,7 +98,7 @@ async function getConfig(options) {
|
|
98
98
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
99
99
|
env: process.env
|
100
100
|
});
|
101
|
-
const data =
|
101
|
+
const data = import_chunk_IOF3PJAC.prismaSchemaWasm.get_config(params);
|
102
102
|
return data;
|
103
103
|
},
|
104
104
|
(e) => ({
|
@@ -160,12 +160,12 @@ async function getConfig(options) {
|
|
160
160
|
return panic;
|
161
161
|
}
|
162
162
|
const errorOutput = e.error.message;
|
163
|
-
return new GetConfigError((0,
|
163
|
+
return new GetConfigError((0, import_chunk_PSYMCJ4B.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
164
164
|
}).with({ type: "validation-error" }, (e) => {
|
165
165
|
return new GetConfigError({
|
166
166
|
_tag: "parsed",
|
167
167
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
168
|
-
reason: (0,
|
168
|
+
reason: (0, import_chunk_PSYMCJ4B.createSchemaValidationError)(e.reason),
|
169
169
|
message: formatErrors(e.error)
|
170
170
|
});
|
171
171
|
}).otherwise((e) => {
|
@@ -16,17 +16,17 @@ 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_4QFYMU5Q_exports = {};
|
20
|
+
__export(chunk_4QFYMU5Q_exports, {
|
21
21
|
require_package: () => require_package
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_4QFYMU5Q_exports);
|
24
24
|
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
25
25
|
var require_package = (0, import_chunk_2ESYSVXG.__commonJS)({
|
26
26
|
"package.json"(exports, module2) {
|
27
27
|
module2.exports = {
|
28
28
|
name: "@prisma/internals",
|
29
|
-
version: "6.6.0-dev.
|
29
|
+
version: "6.6.0-dev.28",
|
30
30
|
description: "This package is intended for Prisma's internal use",
|
31
31
|
main: "dist/index.js",
|
32
32
|
types: "dist/index.d.ts",
|
@@ -26,19 +26,19 @@ 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_7W7UYM7C_exports = {};
|
30
|
+
__export(chunk_7W7UYM7C_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_7W7UYM7C_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
37
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var import_chunk_CDL6HTAV = require("./chunk-CDL6HTAV.js");
|
36
|
+
var import_chunk_PSYMCJ4B = require("./chunk-PSYMCJ4B.js");
|
39
37
|
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
38
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
39
|
+
var import_chunk_JTWCAWGS = require("./chunk-JTWCAWGS.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
|
-
var
|
41
|
+
var import_chunk_IOF3PJAC = require("./chunk-IOF3PJAC.js");
|
42
42
|
var import_chunk_CCQRDM7X = require("./chunk-CCQRDM7X.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -60,12 +60,12 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: mergeSchemas]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_JTWCAWGS.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "MergeSchemasError";
|
65
65
|
}
|
66
66
|
};
|
67
67
|
function mergeSchemas(options) {
|
68
|
-
const debugErrorType = (0,
|
68
|
+
const debugErrorType = (0, import_chunk_PSYMCJ4B.createDebugErrorType)(debug, "mergeSchemasWasm");
|
69
69
|
debug(`Using mergeSchemas Wasm`);
|
70
70
|
const mergeSchemasEither = (0, import_function.pipe)(
|
71
71
|
(0, import_chunk_7MD6344A.tryCatch)(
|
@@ -73,7 +73,7 @@ function mergeSchemas(options) {
|
|
73
73
|
const params = JSON.stringify({
|
74
74
|
schema: options.schemas
|
75
75
|
});
|
76
|
-
return
|
76
|
+
return import_chunk_IOF3PJAC.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
type: "wasm-error",
|
@@ -108,7 +108,7 @@ function mergeSchemas(options) {
|
|
108
108
|
return panic;
|
109
109
|
}
|
110
110
|
const errorOutput = e.error.message;
|
111
|
-
return new MergeSchemasError((0,
|
111
|
+
return new MergeSchemasError((0, import_chunk_PSYMCJ4B.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
112
112
|
}).exhaustive();
|
113
113
|
throw error;
|
114
114
|
}
|
@@ -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_DB2ZXQNZ_exports = {};
|
20
|
+
__export(chunk_DB2ZXQNZ_exports, {
|
21
21
|
missingGeneratorMessage: () => missingGeneratorMessage,
|
22
22
|
missingModelMessage: () => missingModelMessage,
|
23
23
|
missingModelMessageMongoDB: () => missingModelMessageMongoDB
|
24
24
|
});
|
25
|
-
module.exports = __toCommonJS(
|
25
|
+
module.exports = __toCommonJS(chunk_DB2ZXQNZ_exports);
|
26
26
|
var import_chunk_XXDGZSJ4 = require("./chunk-XXDGZSJ4.js");
|
27
|
-
var
|
27
|
+
var import_chunk_VNIE2AZB = require("./chunk-VNIE2AZB.js");
|
28
28
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
29
29
|
var missingGeneratorMessage = `
|
30
30
|
${(0, import_chunk_PG5FDKSF.blue)("info")} You don't have any generators defined in your ${(0, import_chunk_PG5FDKSF.bold)(
|
@@ -33,7 +33,7 @@ ${(0, import_chunk_PG5FDKSF.blue)("info")} You don't have any generators defined
|
|
33
33
|
You can define them like this:
|
34
34
|
|
35
35
|
${(0, import_chunk_PG5FDKSF.bold)(
|
36
|
-
(0,
|
36
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`generator client {
|
37
37
|
provider = "prisma-client-js"
|
38
38
|
}`)
|
39
39
|
)}`;
|
@@ -44,7 +44,7 @@ You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your
|
|
44
44
|
You can define a model like this:
|
45
45
|
|
46
46
|
${(0, import_chunk_PG5FDKSF.bold)(
|
47
|
-
(0,
|
47
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`model User {
|
48
48
|
id Int @id @default(autoincrement())
|
49
49
|
email String @unique
|
50
50
|
name String?
|
@@ -61,7 +61,7 @@ You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your
|
|
61
61
|
You can define a model like this:
|
62
62
|
|
63
63
|
${(0, import_chunk_PG5FDKSF.bold)(
|
64
|
-
(0,
|
64
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`model User {
|
65
65
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
66
66
|
email String @unique
|
67
67
|
name String?
|
@@ -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_EDPM4TAT_exports = {};
|
20
|
+
__export(chunk_EDPM4TAT_exports, {
|
21
21
|
missingDatasource: () => missingDatasource
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_EDPM4TAT_exports);
|
24
24
|
var import_chunk_XXDGZSJ4 = require("./chunk-XXDGZSJ4.js");
|
25
|
-
var
|
25
|
+
var import_chunk_VNIE2AZB = require("./chunk-VNIE2AZB.js");
|
26
26
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
27
27
|
var missingDatasource = `
|
28
28
|
You don't have any ${(0, import_chunk_PG5FDKSF.bold)("datasource")} defined in your ${(0, import_chunk_PG5FDKSF.bold)("schema.prisma")}.
|
29
29
|
You can define a datasource like this:
|
30
30
|
|
31
31
|
${(0, import_chunk_PG5FDKSF.bold)(
|
32
|
-
(0,
|
32
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`datasource db {
|
33
33
|
provider = "postgresql"
|
34
34
|
url = env("DB_URL")
|
35
35
|
}`)
|