@prisma/internals 5.19.0-dev.13 → 5.19.0-dev.15
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-WO5ENZU5.js → chunk-2MWIMEFK.js} +7 -7
- package/dist/{chunk-QQJZI2CR.js → chunk-3BGFTG6S.js} +8 -8
- package/dist/{chunk-CYKOCRN3.js → chunk-3BPQHI4U.js} +7 -7
- package/dist/{chunk-KBVBWTBF.js → chunk-3PGKH52K.js} +8 -8
- package/dist/{chunk-G4BGJ6IP.js → chunk-4RWCRJYD.js} +5 -5
- package/dist/{chunk-D3G3WRZU.js → chunk-5LEVB4CZ.js} +5 -5
- package/dist/{chunk-YIJ776AZ.js → chunk-7EYXPHZ4.js} +47 -45
- package/dist/{chunk-JPEBIQUM.js → chunk-7VJ4E7IJ.js} +823 -50
- package/dist/{chunk-NK2ML3NJ.js → chunk-BATANHVC.js} +5 -5
- package/dist/{chunk-OEXSUUW2.js → chunk-BGFWFIPR.js} +5 -5
- package/dist/{chunk-IY43XBPH.js → chunk-BVQBWOXN.js} +8 -8
- package/dist/{chunk-IB5PDCFO.js → chunk-E56I7IH3.js} +5 -5
- package/dist/chunk-FHXAG4A2.js +29 -0
- package/dist/{chunk-7SPHTPDV.js → chunk-FPHZVRV4.js} +4 -4
- package/dist/{chunk-TZ2WAB57.js → chunk-G456GF4D.js} +8 -8
- package/dist/{chunk-244YD7SK.js → chunk-G7LL2H2O.js} +5 -5
- package/dist/{chunk-EBLDSWRI.js → chunk-J3JE5NVO.js} +14 -178
- package/dist/{chunk-NDEGWMVS.js → chunk-JMZHUHCC.js} +7 -7
- package/dist/{chunk-CNKDIKWK.js → chunk-JUYCPLGZ.js} +8 -8
- package/dist/{chunk-IJUVQMZY.js → chunk-L7365XMK.js} +5 -5
- package/dist/{chunk-KK64NLNR.js → chunk-NACVCIVP.js} +5 -5
- package/dist/{chunk-DQMYNBP3.js → chunk-RM7X45II.js} +5 -5
- package/dist/{chunk-7KXMQZFT.js → chunk-RME2Y7TQ.js} +5 -5
- package/dist/chunk-T5RACBRF.js +189 -0
- package/dist/{chunk-VNIE2AZB.js → chunk-TQCLUNM2.js} +4 -4
- package/dist/{chunk-42K3GPYJ.js → chunk-TWPJ7ZJ2.js} +7 -4
- package/dist/{chunk-34FTC6KK.js → chunk-UJN33GSS.js} +5 -5
- package/dist/{chunk-I3YDYYM2.js → chunk-VYSSB3YM.js} +7 -7
- package/dist/{chunk-6GTQHWWT.js → chunk-YSOLUZHL.js} +8 -5
- package/dist/{chunk-XKRUNUS5.js → chunk-ZWQVHKXW.js} +8 -8
- package/dist/cli/checkUnsupportedDataProxy.js +28 -26
- package/dist/cli/getSchema.js +33 -31
- package/dist/cli/hashes.js +28 -26
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +27 -25
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/getEngineVersion.js +5 -5
- package/dist/engine-commands/getEnginesMetaInfo.js +7 -7
- package/dist/engine-commands/index.js +38 -36
- 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 +27 -25
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +27 -25
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +27 -25
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +28 -26
- package/dist/get-generators/getGenerators.d.ts +2 -1
- package/dist/get-generators/getGenerators.js +30 -28
- package/dist/getPackedPackage.js +3 -2
- package/dist/highlight/highlight.js +5 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +70 -67
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +27 -25
- package/dist/utils/getEnvPaths.js +27 -25
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +27 -25
- package/dist/utils/isValidJsIdentifier.d.ts +1 -0
- package/dist/utils/isValidJsIdentifier.js +26 -0
- package/dist/utils/loadEnvFile.js +27 -25
- package/dist/utils/missingDatasource.js +4 -4
- package/dist/utils/missingGeneratorMessage.js +6 -6
- package/dist/wasm.js +4 -4
- package/package.json +11 -8
- package/dist/chunk-5XRQ7ONW.js +0 -122
- package/dist/chunk-HD4N22SB.js +0 -177
- package/dist/chunk-NXIWDQBF.js +0 -110
- package/dist/chunk-QIVUAERL.js +0 -2202
- package/dist/chunk-X4GRUQLB.js +0 -166
- package/dist/chunk-X6M256IK.js +0 -54
|
@@ -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_2MWIMEFK_exports = {};
|
|
20
|
+
__export(chunk_2MWIMEFK_exports, {
|
|
21
21
|
missingGeneratorMessage: () => missingGeneratorMessage,
|
|
22
22
|
missingModelMessage: () => missingModelMessage,
|
|
23
23
|
missingModelMessageMongoDB: () => missingModelMessageMongoDB
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(chunk_2MWIMEFK_exports);
|
|
26
26
|
var import_chunk_L6GBFCXG = require("./chunk-L6GBFCXG.js");
|
|
27
|
-
var
|
|
27
|
+
var import_chunk_TQCLUNM2 = require("./chunk-TQCLUNM2.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_TQCLUNM2.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_TQCLUNM2.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_TQCLUNM2.highlightDatamodel)(`model User {
|
|
65
65
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
66
66
|
email String @unique
|
|
67
67
|
name String?
|
|
@@ -26,18 +26,18 @@ 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_3BGFTG6S_exports = {};
|
|
30
|
+
__export(chunk_3BGFTG6S_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_3BGFTG6S_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
36
|
var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
|
|
37
|
-
var
|
|
37
|
+
var import_chunk_BATANHVC = require("./chunk-BATANHVC.js");
|
|
38
38
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
39
39
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
40
|
-
var
|
|
40
|
+
var import_chunk_NACVCIVP = require("./chunk-NACVCIVP.js");
|
|
41
41
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
42
42
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
|
60
60
|
}).exhaustive();
|
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
62
62
|
[Context: getDmmf]`;
|
|
63
|
-
super((0,
|
|
63
|
+
super((0, import_chunk_BATANHVC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
64
64
|
this.name = "GetDmmfError";
|
|
65
65
|
}
|
|
66
66
|
};
|
|
@@ -91,13 +91,13 @@ async function getDMMF(options) {
|
|
|
91
91
|
() => {
|
|
92
92
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
|
93
93
|
debug("Triggering a Rust panic...");
|
|
94
|
-
|
|
94
|
+
import_chunk_NACVCIVP.prismaSchemaWasm.debug_panic();
|
|
95
95
|
}
|
|
96
96
|
const params = JSON.stringify({
|
|
97
97
|
prismaSchema: datamodel,
|
|
98
98
|
noColor: Boolean(process.env.NO_COLOR)
|
|
99
99
|
});
|
|
100
|
-
const data =
|
|
100
|
+
const data = import_chunk_NACVCIVP.prismaSchemaWasm.get_dmmf(params);
|
|
101
101
|
return data;
|
|
102
102
|
},
|
|
103
103
|
(e) => ({
|
|
@@ -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_3BPQHI4U_exports = {};
|
|
30
|
+
__export(chunk_3BPQHI4U_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_3BPQHI4U_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
36
|
var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
|
|
37
37
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_BATANHVC = require("./chunk-BATANHVC.js");
|
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_NACVCIVP = require("./chunk-NACVCIVP.js");
|
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
|
60
60
|
}).exhaustive();
|
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
62
62
|
[Context: mergeSchemas]`;
|
|
63
|
-
super((0,
|
|
63
|
+
super((0, import_chunk_BATANHVC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
64
64
|
this.name = "MergeSchemasError";
|
|
65
65
|
}
|
|
66
66
|
};
|
|
@@ -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_NACVCIVP.prismaSchemaWasm.merge_schemas(params);
|
|
77
77
|
},
|
|
78
78
|
(e) => ({
|
|
79
79
|
type: "wasm-error",
|
|
@@ -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_3PGKH52K_exports = {};
|
|
30
|
+
__export(chunk_3PGKH52K_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_3PGKH52K_exports);
|
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
39
39
|
var import_chunk_IAEMHQAC = require("./chunk-IAEMHQAC.js");
|
|
40
40
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_BATANHVC = require("./chunk-BATANHVC.js");
|
|
42
42
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
|
43
43
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
44
|
-
var
|
|
44
|
+
var import_chunk_NACVCIVP = require("./chunk-NACVCIVP.js");
|
|
45
45
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.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_BATANHVC.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
69
69
|
this.name = "GetConfigError";
|
|
70
70
|
}
|
|
71
71
|
};
|
|
@@ -90,7 +90,7 @@ async function getConfig(options) {
|
|
|
90
90
|
() => {
|
|
91
91
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
|
92
92
|
debug("Triggering a Rust panic...");
|
|
93
|
-
|
|
93
|
+
import_chunk_NACVCIVP.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_NACVCIVP.prismaSchemaWasm.get_config(params);
|
|
102
102
|
return data;
|
|
103
103
|
},
|
|
104
104
|
(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_4RWCRJYD_exports = {};
|
|
20
|
+
__export(chunk_4RWCRJYD_exports, {
|
|
21
21
|
SchemaEngineExitCode: () => SchemaEngineExitCode,
|
|
22
22
|
canConnectToDatabase: () => canConnectToDatabase,
|
|
23
23
|
createDatabase: () => createDatabase,
|
|
24
24
|
dropDatabase: () => dropDatabase,
|
|
25
25
|
execaCommand: () => execaCommand
|
|
26
26
|
});
|
|
27
|
-
module.exports = __toCommonJS(
|
|
27
|
+
module.exports = __toCommonJS(chunk_4RWCRJYD_exports);
|
|
28
28
|
var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
|
|
29
|
-
var
|
|
29
|
+
var import_chunk_FPHZVRV4 = require("./chunk-FPHZVRV4.js");
|
|
30
30
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
31
31
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
32
32
|
var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_7XNZDY2V.require_execa)());
|
|
@@ -141,7 +141,7 @@ async function execaCommand({
|
|
|
141
141
|
schemaEnginePath,
|
|
142
142
|
engineCommandName
|
|
143
143
|
}) {
|
|
144
|
-
schemaEnginePath = schemaEnginePath || await (0,
|
|
144
|
+
schemaEnginePath = schemaEnginePath || await (0, import_chunk_FPHZVRV4.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
|
|
145
145
|
try {
|
|
146
146
|
return await (0, import_execa.default)(schemaEnginePath, ["cli", "--datasource", connectionString, engineCommandName], {
|
|
147
147
|
cwd,
|
|
@@ -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_5LEVB4CZ_exports = {};
|
|
20
|
+
__export(chunk_5LEVB4CZ_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_5LEVB4CZ_exports);
|
|
24
|
+
var import_chunk_TWPJ7ZJ2 = require("./chunk-TWPJ7ZJ2.js");
|
|
25
|
+
var packageJson = (0, import_chunk_TWPJ7ZJ2.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -26,8 +26,8 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export2(
|
|
29
|
+
var chunk_7EYXPHZ4_exports = {};
|
|
30
|
+
__export2(chunk_7EYXPHZ4_exports, {
|
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
33
33
|
checkYarnVersion: () => checkYarnVersion,
|
|
@@ -56,38 +56,38 @@ __export2(chunk_YIJ776AZ_exports, {
|
|
|
56
56
|
sendPanic: () => sendPanic,
|
|
57
57
|
skipIndex: () => skipIndex
|
|
58
58
|
});
|
|
59
|
-
module.exports = __toCommonJS2(
|
|
59
|
+
module.exports = __toCommonJS2(chunk_7EYXPHZ4_exports);
|
|
60
60
|
var import_chunk_IABMG3F4 = require("./chunk-IABMG3F4.js");
|
|
61
|
+
var import_chunk_3U2ANLD3 = require("./chunk-3U2ANLD3.js");
|
|
61
62
|
var import_chunk_FTS2IEWX = require("./chunk-FTS2IEWX.js");
|
|
62
63
|
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
|
63
64
|
var import_chunk_IPKE37QC = require("./chunk-IPKE37QC.js");
|
|
64
65
|
var import_chunk_KEBDP2C3 = require("./chunk-KEBDP2C3.js");
|
|
65
|
-
var import_chunk_3U2ANLD3 = require("./chunk-3U2ANLD3.js");
|
|
66
66
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
67
67
|
var import_chunk_D4MCOTL5 = require("./chunk-D4MCOTL5.js");
|
|
68
68
|
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
|
69
69
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
70
70
|
var import_chunk_ONHKZPSV = require("./chunk-ONHKZPSV.js");
|
|
71
|
+
var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
|
|
71
72
|
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
72
73
|
var import_chunk_JHQHVXIR = require("./chunk-JHQHVXIR.js");
|
|
73
74
|
var import_chunk_HMGEWJDY = require("./chunk-HMGEWJDY.js");
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var import_chunk_KDHESRKE = require("./chunk-KDHESRKE.js");
|
|
77
|
-
var import_chunk_OEXSUUW2 = require("./chunk-OEXSUUW2.js");
|
|
75
|
+
var import_chunk_BGFWFIPR = require("./chunk-BGFWFIPR.js");
|
|
76
|
+
var import_chunk_2MWIMEFK = require("./chunk-2MWIMEFK.js");
|
|
78
77
|
var import_chunk_L6GBFCXG = require("./chunk-L6GBFCXG.js");
|
|
78
|
+
var import_chunk_KDHESRKE = require("./chunk-KDHESRKE.js");
|
|
79
79
|
var import_chunk_J77ZIDXB = require("./chunk-J77ZIDXB.js");
|
|
80
80
|
var import_chunk_XLYQ6PQW = require("./chunk-XLYQ6PQW.js");
|
|
81
81
|
var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
|
|
82
82
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
|
83
83
|
var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
84
|
+
var import_chunk_E56I7IH3 = require("./chunk-E56I7IH3.js");
|
|
85
|
+
var import_chunk_3BPQHI4U = require("./chunk-3BPQHI4U.js");
|
|
86
|
+
var import_chunk_3PGKH52K = require("./chunk-3PGKH52K.js");
|
|
87
|
+
var import_chunk_3BGFTG6S = require("./chunk-3BGFTG6S.js");
|
|
88
88
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
89
89
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
90
|
-
var
|
|
90
|
+
var import_chunk_NACVCIVP = require("./chunk-NACVCIVP.js");
|
|
91
91
|
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
|
92
92
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
93
93
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
@@ -96,7 +96,7 @@ var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
|
|
96
96
|
var import_chunk_635TMBAP = require("./chunk-635TMBAP.js");
|
|
97
97
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
98
98
|
var import_chunk_4NFLAUKD = require("./chunk-4NFLAUKD.js");
|
|
99
|
-
var
|
|
99
|
+
var import_chunk_J3JE5NVO = require("./chunk-J3JE5NVO.js");
|
|
100
100
|
var import_chunk_FUUQ6FJ4 = require("./chunk-FUUQ6FJ4.js");
|
|
101
101
|
var import_chunk_KKMREGHN = require("./chunk-KKMREGHN.js");
|
|
102
102
|
var import_chunk_AZNLB67U = require("./chunk-AZNLB67U.js");
|
|
@@ -440,7 +440,7 @@ var require_readdir_glob = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
440
440
|
module2.exports = readdirGlob;
|
|
441
441
|
var fs8 = (0, import_chunk_WWAWV7DQ.__require)("fs");
|
|
442
442
|
var { EventEmitter } = (0, import_chunk_WWAWV7DQ.__require)("events");
|
|
443
|
-
var { Minimatch } = (0,
|
|
443
|
+
var { Minimatch } = (0, import_chunk_J3JE5NVO.require_minimatch)();
|
|
444
444
|
var { resolve } = (0, import_chunk_WWAWV7DQ.__require)("path");
|
|
445
445
|
function readdir(dir2, strict) {
|
|
446
446
|
return new Promise((resolve2, reject2) => {
|
|
@@ -3619,7 +3619,7 @@ var require_stream_writable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3619
3619
|
var Duplex;
|
|
3620
3620
|
Writable.WritableState = WritableState;
|
|
3621
3621
|
var util = Object.create(require_util());
|
|
3622
|
-
util.inherits = (0,
|
|
3622
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
|
3623
3623
|
var internalUtil = {
|
|
3624
3624
|
deprecate: require_node()
|
|
3625
3625
|
};
|
|
@@ -4057,7 +4057,7 @@ var require_stream_duplex = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
4057
4057
|
};
|
|
4058
4058
|
module2.exports = Duplex;
|
|
4059
4059
|
var util = Object.create(require_util());
|
|
4060
|
-
util.inherits = (0,
|
|
4060
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
|
4061
4061
|
var Readable = require_stream_readable();
|
|
4062
4062
|
var Writable = require_stream_writable();
|
|
4063
4063
|
util.inherits(Duplex, Readable);
|
|
@@ -4378,7 +4378,7 @@ var require_stream_readable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
4378
4378
|
return Buffer2.isBuffer(obj) || obj instanceof OurUint8Array;
|
|
4379
4379
|
}
|
|
4380
4380
|
var util = Object.create(require_util());
|
|
4381
|
-
util.inherits = (0,
|
|
4381
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
|
4382
4382
|
var debugUtil = (0, import_chunk_WWAWV7DQ.__require)("util");
|
|
4383
4383
|
var debug8 = void 0;
|
|
4384
4384
|
if (debugUtil && debugUtil.debuglog) {
|
|
@@ -5045,7 +5045,7 @@ var require_stream_transform = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5045
5045
|
module2.exports = Transform;
|
|
5046
5046
|
var Duplex = require_stream_duplex();
|
|
5047
5047
|
var util = Object.create(require_util());
|
|
5048
|
-
util.inherits = (0,
|
|
5048
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
|
5049
5049
|
util.inherits(Transform, Duplex);
|
|
5050
5050
|
function afterTransform(er, data) {
|
|
5051
5051
|
var ts = this._transformState;
|
|
@@ -5143,7 +5143,7 @@ var require_stream_passthrough = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
5143
5143
|
module2.exports = PassThrough;
|
|
5144
5144
|
var Transform = require_stream_transform();
|
|
5145
5145
|
var util = Object.create(require_util());
|
|
5146
|
-
util.inherits = (0,
|
|
5146
|
+
util.inherits = (0, import_chunk_J3JE5NVO.require_inherits)();
|
|
5147
5147
|
util.inherits(PassThrough, Transform);
|
|
5148
5148
|
function PassThrough(options2) {
|
|
5149
5149
|
if (!(this instanceof PassThrough)) return new PassThrough(options2);
|
|
@@ -6429,7 +6429,7 @@ var require_stream_writable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
6429
6429
|
var ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END;
|
|
6430
6430
|
var ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
|
|
6431
6431
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
6432
|
-
(0,
|
|
6432
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Writable, Stream);
|
|
6433
6433
|
function nop() {
|
|
6434
6434
|
}
|
|
6435
6435
|
function WritableState(options2, stream, isDuplex) {
|
|
@@ -6871,7 +6871,7 @@ var require_stream_duplex2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
6871
6871
|
module2.exports = Duplex;
|
|
6872
6872
|
var Readable = require_stream_readable2();
|
|
6873
6873
|
var Writable = require_stream_writable2();
|
|
6874
|
-
(0,
|
|
6874
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Duplex, Readable);
|
|
6875
6875
|
{
|
|
6876
6876
|
keys = objectKeys(Writable.prototype);
|
|
6877
6877
|
for (v = 0; v < keys.length; v++) {
|
|
@@ -7648,7 +7648,7 @@ var require_stream_readable2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
7648
7648
|
var StringDecoder;
|
|
7649
7649
|
var createReadableStreamAsyncIterator;
|
|
7650
7650
|
var from;
|
|
7651
|
-
(0,
|
|
7651
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Readable, Stream);
|
|
7652
7652
|
var errorOrDestroy = destroyImpl.errorOrDestroy;
|
|
7653
7653
|
var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
|
|
7654
7654
|
function prependListener(emitter, event, fn) {
|
|
@@ -8353,7 +8353,7 @@ var require_stream_transform2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
8353
8353
|
var ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING;
|
|
8354
8354
|
var ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
|
|
8355
8355
|
var Duplex = require_stream_duplex2();
|
|
8356
|
-
(0,
|
|
8356
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(Transform, Duplex);
|
|
8357
8357
|
function afterTransform(er, data) {
|
|
8358
8358
|
var ts = this._transformState;
|
|
8359
8359
|
ts.transforming = false;
|
|
@@ -8447,7 +8447,7 @@ var require_stream_passthrough2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
8447
8447
|
"use strict";
|
|
8448
8448
|
module2.exports = PassThrough;
|
|
8449
8449
|
var Transform = require_stream_transform2();
|
|
8450
|
-
(0,
|
|
8450
|
+
(0, import_chunk_J3JE5NVO.require_inherits)()(PassThrough, Transform);
|
|
8451
8451
|
function PassThrough(options2) {
|
|
8452
8452
|
if (!(this instanceof PassThrough)) return new PassThrough(options2);
|
|
8453
8453
|
Transform.call(this, options2);
|
|
@@ -9321,7 +9321,7 @@ var require_file = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
9321
9321
|
var difference = require_difference();
|
|
9322
9322
|
var union = require_union();
|
|
9323
9323
|
var isPlainObject = require_isPlainObject();
|
|
9324
|
-
var glob = (0,
|
|
9324
|
+
var glob = (0, import_chunk_J3JE5NVO.require_glob)();
|
|
9325
9325
|
var file = module2.exports = {};
|
|
9326
9326
|
var pathSeparatorRe = /[\/\\]/g;
|
|
9327
9327
|
var processPatterns = function(patterns, fn) {
|
|
@@ -15517,7 +15517,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
|
15517
15517
|
}
|
|
15518
15518
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
|
15519
15519
|
debug2("Loading config");
|
|
15520
|
-
const config2 = await (0,
|
|
15520
|
+
const config2 = await (0, import_chunk_3PGKH52K.getConfig)({
|
|
15521
15521
|
datamodel: files,
|
|
15522
15522
|
ignoreEnvVarErrors: true
|
|
15523
15523
|
});
|
|
@@ -15626,7 +15626,7 @@ function renderDefaultLookupError(error, cwd) {
|
|
|
15626
15626
|
return parts.join("\n");
|
|
15627
15627
|
}
|
|
15628
15628
|
async function getPrismaConfigFromPackageJson(cwd) {
|
|
15629
|
-
const pkgJson = await (0,
|
|
15629
|
+
const pkgJson = await (0, import_chunk_J3JE5NVO.readPackageUp)({ cwd, normalize: false });
|
|
15630
15630
|
const prismaPropertyFromPkgJson = pkgJson?.packageJson?.prisma;
|
|
15631
15631
|
if (!pkgJson) {
|
|
15632
15632
|
return null;
|
|
@@ -15799,7 +15799,7 @@ function isPkgJsonWorkspaceRoot(pkgJson) {
|
|
|
15799
15799
|
return Array.isArray(workspaces) || workspaces.packages !== void 0;
|
|
15800
15800
|
}
|
|
15801
15801
|
async function isNearestPkgJsonWorkspaceRoot(cwd) {
|
|
15802
|
-
const pkgJson = await (0,
|
|
15802
|
+
const pkgJson = await (0, import_chunk_J3JE5NVO.readPackageUp)({ cwd, normalize: false });
|
|
15803
15803
|
if (!pkgJson) {
|
|
15804
15804
|
return null;
|
|
15805
15805
|
}
|
|
@@ -15909,8 +15909,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
|
15909
15909
|
if (argName.includes("schema")) {
|
|
15910
15910
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
|
15911
15911
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
|
15912
|
-
const config2 = await (0,
|
|
15913
|
-
const url = (0,
|
|
15912
|
+
const config2 = await (0, import_chunk_3PGKH52K.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
|
15913
|
+
const url = (0, import_chunk_3PGKH52K.resolveUrl)((0, import_chunk_3PGKH52K.getEffectiveUrl)(config2.datasources[0]));
|
|
15914
15914
|
if (url?.startsWith("prisma://")) {
|
|
15915
15915
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
|
15916
15916
|
}
|
|
@@ -15931,7 +15931,7 @@ function getCLIPathHash() {
|
|
|
15931
15931
|
const cliPath = process.argv[1];
|
|
15932
15932
|
return import_crypto.default.createHash("sha256").update(cliPath).digest("hex").substring(0, 8);
|
|
15933
15933
|
}
|
|
15934
|
-
var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
15934
|
+
var import_p_map = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_J3JE5NVO.require_p_map)());
|
|
15935
15935
|
var debug4 = (0, import_debug6.default)("prisma:generator");
|
|
15936
15936
|
async function checkTypeScriptVersion() {
|
|
15937
15937
|
const minVersion = "4.1.0";
|
|
@@ -16081,7 +16081,8 @@ async function getGenerators(options) {
|
|
|
16081
16081
|
generatorNames = [],
|
|
16082
16082
|
postinstall,
|
|
16083
16083
|
noEngine,
|
|
16084
|
-
allowNoModels
|
|
16084
|
+
allowNoModels,
|
|
16085
|
+
typedSql
|
|
16085
16086
|
} = options;
|
|
16086
16087
|
if (!schemaPath) {
|
|
16087
16088
|
throw new Error(`schemaPath for getGenerators got invalid value ${schemaPath}`);
|
|
@@ -16113,18 +16114,18 @@ async function getGenerators(options) {
|
|
|
16113
16114
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
|
16114
16115
|
}
|
|
16115
16116
|
}
|
|
16116
|
-
const config = await (0,
|
|
16117
|
+
const config = await (0, import_chunk_3PGKH52K.getConfig)({
|
|
16117
16118
|
datamodel: schemas,
|
|
16118
16119
|
datamodelPath: schemaPath,
|
|
16119
16120
|
prismaPath,
|
|
16120
16121
|
ignoreEnvVarErrors: true
|
|
16121
16122
|
});
|
|
16122
16123
|
if (config.datasources.length === 0) {
|
|
16123
|
-
throw new Error(
|
|
16124
|
+
throw new Error(import_chunk_BGFWFIPR.missingDatasource);
|
|
16124
16125
|
}
|
|
16125
16126
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
|
16126
16127
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
|
16127
|
-
const dmmf = await (0,
|
|
16128
|
+
const dmmf = await (0, import_chunk_3BGFTG6S.getDMMF)({
|
|
16128
16129
|
datamodel: schemas,
|
|
16129
16130
|
datamodelPath: schemaPath,
|
|
16130
16131
|
prismaPath,
|
|
@@ -16132,9 +16133,9 @@ async function getGenerators(options) {
|
|
|
16132
16133
|
});
|
|
16133
16134
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
16134
16135
|
if (config.datasources.some((d2) => d2.provider === "mongodb")) {
|
|
16135
|
-
throw new Error(
|
|
16136
|
+
throw new Error(import_chunk_2MWIMEFK.missingModelMessageMongoDB);
|
|
16136
16137
|
}
|
|
16137
|
-
throw new Error(
|
|
16138
|
+
throw new Error(import_chunk_2MWIMEFK.missingModelMessage);
|
|
16138
16139
|
}
|
|
16139
16140
|
(0, import_chunk_IPKE37QC.checkFeatureFlags)(config, options);
|
|
16140
16141
|
const generatorConfigs = filterGenerators(overrideGenerators || config.generators, generatorNames);
|
|
@@ -16185,7 +16186,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
|
16185
16186
|
fromEnvVar: "null"
|
|
16186
16187
|
};
|
|
16187
16188
|
}
|
|
16188
|
-
const datamodel = (0,
|
|
16189
|
+
const datamodel = (0, import_chunk_3BPQHI4U.mergeSchemas)({ schemas });
|
|
16189
16190
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
|
16190
16191
|
const options2 = {
|
|
16191
16192
|
datamodel,
|
|
@@ -16199,7 +16200,8 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
|
16199
16200
|
postinstall,
|
|
16200
16201
|
noEngine,
|
|
16201
16202
|
allowNoModels,
|
|
16202
|
-
envPaths: envPaths2
|
|
16203
|
+
envPaths: envPaths2,
|
|
16204
|
+
typedSql
|
|
16203
16205
|
};
|
|
16204
16206
|
generatorInstance.setOptions(options2);
|
|
16205
16207
|
runningGenerators.push(generatorInstance);
|
|
@@ -16267,7 +16269,7 @@ generator gen {
|
|
|
16267
16269
|
debug6({ generatorBinaryPaths });
|
|
16268
16270
|
generator.setBinaryPaths(generatorBinaryPaths);
|
|
16269
16271
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
|
16270
|
-
const customDmmf = await (0,
|
|
16272
|
+
const customDmmf = await (0, import_chunk_3BGFTG6S.getDMMF)({
|
|
16271
16273
|
datamodel: schemas,
|
|
16272
16274
|
datamodelPath: schemaPath,
|
|
16273
16275
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
|
@@ -16565,7 +16567,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
16565
16567
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
16566
16568
|
handleFormatPanic(
|
|
16567
16569
|
() => {
|
|
16568
|
-
|
|
16570
|
+
import_chunk_NACVCIVP.prismaSchemaWasm.debug_panic();
|
|
16569
16571
|
},
|
|
16570
16572
|
{ schemas: schemas2 }
|
|
16571
16573
|
);
|
|
@@ -16585,12 +16587,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
16585
16587
|
() => {
|
|
16586
16588
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
|
16587
16589
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
16588
|
-
const lintDiagnostics2 = (0,
|
|
16590
|
+
const lintDiagnostics2 = (0, import_chunk_E56I7IH3.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
16589
16591
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
16590
16592
|
},
|
|
16591
16593
|
{ schemas: schemas2 }
|
|
16592
16594
|
);
|
|
16593
|
-
const lintWarnings = (0,
|
|
16595
|
+
const lintWarnings = (0, import_chunk_E56I7IH3.getLintWarningsAsText)(lintDiagnostics);
|
|
16594
16596
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
|
16595
16597
|
console.warn(lintWarnings);
|
|
16596
16598
|
}
|
|
@@ -16620,7 +16622,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
|
16620
16622
|
}
|
|
16621
16623
|
}
|
|
16622
16624
|
function formatWasm(schema, documentFormattingParams) {
|
|
16623
|
-
const formattedSchema =
|
|
16625
|
+
const formattedSchema = import_chunk_NACVCIVP.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
16624
16626
|
return formattedSchema;
|
|
16625
16627
|
}
|
|
16626
16628
|
/*! Bundled license information:
|