@prisma/internals 6.6.0-integration-push-spwsqpvywlkl.10 → 6.6.0-integration-push-ytsqyomrunkq.1
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/WasmSchemaEngineLoader.d.ts +5 -0
- package/dist/WasmSchemaEngineLoader.js +25 -0
- package/dist/{chunk-UTJGRVMG.js → chunk-2IP7H3BQ.js} +4 -4
- package/dist/{chunk-IRTBJKYB.js → chunk-4VIAG7E6.js} +5 -5
- package/dist/{chunk-W3HQUCF3.js → chunk-5K2DX665.js} +12 -12
- package/dist/{chunk-U6ZCSHHC.js → chunk-6T2DVBXP.js} +10 -7
- package/dist/{chunk-JXJ5T5JM.js → chunk-AAJH3SMZ.js} +13 -13
- package/dist/{chunk-O3X5PEOU.js → chunk-EZNJLU5T.js} +12 -12
- package/dist/{chunk-2QMPBMR2.js → chunk-F4K3GWXT.js} +5 -5
- package/dist/{chunk-R3J2O23S.js → chunk-FCYHZHVW.js} +4 -4
- package/dist/{chunk-IFS6DFRE.js → chunk-FYGIYYHZ.js} +11 -11
- package/dist/{chunk-FRNDDXVT.js → chunk-FZIKMPAP.js} +50 -27
- package/dist/{chunk-YKMFYZPB.js → chunk-HF43IL4T.js} +11 -11
- package/dist/{chunk-TXJI6MQX.js → chunk-JITJ56AJ.js} +5 -5
- package/dist/{chunk-C4WKSMX5.js → chunk-JZ3G534A.js} +5 -5
- package/dist/{chunk-TWSSYOC7.js → chunk-KLLJM353.js} +6 -4
- package/dist/{chunk-AXYQWZXV.js → chunk-OWBVIV57.js} +11 -11
- package/dist/{chunk-N6H26BQE.js → chunk-PPWS5TOR.js} +5 -5
- package/dist/{chunk-LKR4OOFJ.js → chunk-RHXDDTTE.js} +5 -5
- package/dist/{chunk-FGPLTNY4.js → chunk-S5MIDUOL.js} +11 -11
- package/dist/{chunk-XR4RJTDM.js → chunk-S6Z7TU3K.js} +5 -5
- package/dist/{chunk-WSZXPLJQ.js → chunk-TZJROXB3.js} +4 -4
- package/dist/{chunk-P4A2WSHJ.js → chunk-VCQCFPLO.js} +7 -5
- package/dist/{chunk-MX3RXVBB.js → chunk-VSYNCHIW.js} +50 -27
- package/dist/chunk-WPX2HKUE.js +64 -0
- package/dist/{chunk-XF3D7LPL.js → chunk-X4F27I5S.js} +10 -7
- package/dist/{chunk-OESCEI3R.js → chunk-ZVGR37KW.js} +13 -13
- package/dist/cli/checkUnsupportedDataProxy.js +34 -33
- package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +22 -0
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +134 -0
- package/dist/cli/getSchema.js +37 -36
- package/dist/cli/hashes.js +34 -33
- package/dist/cli/schemaContext.js +34 -33
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +33 -32
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +1 -1
- package/dist/engine-commands/getEnginesMetaInfo.js +1 -1
- package/dist/engine-commands/index.js +42 -41
- package/dist/engine-commands/lintSchema.js +9 -9
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +6 -6
- package/dist/engine-commands/validate.js +10 -10
- package/dist/get-generators/getGenerators.js +36 -35
- package/dist/index.d.ts +3 -1
- package/dist/index.js +67 -62
- package/dist/migrateTypes.d.ts +1 -1
- package/dist/utils/canPrompt.js +3 -3
- package/dist/utils/getEnvPaths.js +33 -32
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +5 -5
- package/dist/utils/loadEnvFile.js +33 -32
- package/dist/utils/tryLoadEnvs.js +6 -6
- package/dist/wasm.d.ts +3 -1
- package/dist/wasm.js +5 -4
- package/package.json +13 -11
@@ -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_HF43IL4T_exports = {};
|
30
|
+
__export(chunk_HF43IL4T_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
36
|
-
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
34
|
+
module.exports = __toCommonJS(chunk_HF43IL4T_exports);
|
35
|
+
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
37
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
39
|
-
var
|
37
|
+
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
38
|
+
var import_chunk_RHXDDTTE = require("./chunk-RHXDDTTE.js");
|
39
|
+
var import_chunk_X4F27I5S = require("./chunk-X4F27I5S.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,12 +59,12 @@ ${detailsHeader} ${message}`;
|
|
59
59
|
}).exhaustive();
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
61
61
|
[Context: mergeSchemas]`;
|
62
|
-
super((0,
|
62
|
+
super((0, import_chunk_RHXDDTTE.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
63
63
|
this.name = "MergeSchemasError";
|
64
64
|
}
|
65
65
|
};
|
66
66
|
function mergeSchemas(options) {
|
67
|
-
const debugErrorType = (0,
|
67
|
+
const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "mergeSchemasWasm");
|
68
68
|
debug(`Using mergeSchemas Wasm`);
|
69
69
|
const mergeSchemasEither = (0, import_function.pipe)(
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
@@ -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_X4F27I5S.prismaSchemaWasm.merge_schemas(params);
|
76
76
|
},
|
77
77
|
(e) => ({
|
78
78
|
type: "wasm-error",
|
@@ -104,7 +104,7 @@ function mergeSchemas(options) {
|
|
104
104
|
return panic;
|
105
105
|
}
|
106
106
|
const errorOutput = e.error.message;
|
107
|
-
return new MergeSchemasError((0,
|
107
|
+
return new MergeSchemasError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
108
108
|
}).exhaustive();
|
109
109
|
throw error;
|
110
110
|
}
|
@@ -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_JITJ56AJ_exports = {};
|
20
|
+
__export(chunk_JITJ56AJ_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_JITJ56AJ_exports);
|
28
|
+
var import_chunk_6T2DVBXP = require("./chunk-6T2DVBXP.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_6T2DVBXP.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
34
34
|
return lintDiagnostics;
|
35
35
|
}
|
@@ -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_JZ3G534A_exports = {};
|
20
|
+
__export(chunk_JZ3G534A_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_JZ3G534A_exports);
|
24
|
+
var import_chunk_PPWS5TOR = require("./chunk-PPWS5TOR.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_PPWS5TOR.version]];
|
28
28
|
return `${message}
|
29
29
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
@@ -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_KLLJM353_exports = {};
|
20
|
+
__export(chunk_KLLJM353_exports, {
|
21
21
|
require_package: () => require_package
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_KLLJM353_exports);
|
24
24
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
25
25
|
var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
26
26
|
"package.json"(exports, module2) {
|
@@ -107,12 +107,14 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
107
107
|
"@prisma/config": "workspace:*",
|
108
108
|
"@prisma/debug": "workspace:*",
|
109
109
|
"@prisma/dmmf": "workspace:*",
|
110
|
+
"@prisma/driver-adapter-utils": "workspace:*",
|
110
111
|
"@prisma/engines": "workspace:*",
|
111
112
|
"@prisma/fetch-engine": "workspace:*",
|
112
113
|
"@prisma/generator": "workspace:*",
|
113
114
|
"@prisma/generator-helper": "workspace:*",
|
114
115
|
"@prisma/get-platform": "workspace:*",
|
115
|
-
"@prisma/prisma-schema-wasm": "6.6.0-
|
116
|
+
"@prisma/prisma-schema-wasm": "6.6.0-46.dc2c1279f201ab67d96815a69b3a831a2f89c207",
|
117
|
+
"@prisma/schema-engine-wasm": "6.6.0-46.dc2c1279f201ab67d96815a69b3a831a2f89c207",
|
116
118
|
"@prisma/schema-files-loader": "workspace:*",
|
117
119
|
arg: "5.0.2",
|
118
120
|
prompts: "2.4.2"
|
@@ -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_OWBVIV57_exports = {};
|
30
|
+
__export(chunk_OWBVIV57_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
34
|
+
module.exports = __toCommonJS(chunk_OWBVIV57_exports);
|
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_JZ3G534A = require("./chunk-JZ3G534A.js");
|
38
|
+
var import_chunk_6T2DVBXP = require("./chunk-6T2DVBXP.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,25 +58,25 @@ ${detailsHeader} ${message}`;
|
|
58
58
|
}).exhaustive();
|
59
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
60
60
|
[Context: getDmmf]`;
|
61
|
-
super((0,
|
61
|
+
super((0, import_chunk_JZ3G534A.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
62
62
|
this.name = "GetDmmfError";
|
63
63
|
}
|
64
64
|
};
|
65
65
|
async function getDMMF(options) {
|
66
|
-
const debugErrorType = (0,
|
66
|
+
const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "getDmmfWasm");
|
67
67
|
debug(`Using getDmmf Wasm`);
|
68
68
|
const dmmfPipeline = (0, import_function.pipe)(
|
69
69
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
70
70
|
() => {
|
71
71
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
72
72
|
debug("Triggering a Rust panic...");
|
73
|
-
|
73
|
+
import_chunk_6T2DVBXP.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_6T2DVBXP.prismaSchemaWasm.get_dmmf(params);
|
80
80
|
return data;
|
81
81
|
},
|
82
82
|
(e) => ({
|
@@ -124,7 +124,7 @@ async function getDMMF(options) {
|
|
124
124
|
return panic;
|
125
125
|
}
|
126
126
|
const errorOutput = e.error.message;
|
127
|
-
return new GetDmmfError((0,
|
127
|
+
return new GetDmmfError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
128
128
|
}).with({ type: "parse-json" }, (e) => {
|
129
129
|
debugErrorType(e);
|
130
130
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
|
@@ -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_PPWS5TOR_exports = {};
|
20
|
+
__export(chunk_PPWS5TOR_exports, {
|
21
21
|
version: () => version
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
25
|
-
var packageJson = (0,
|
23
|
+
module.exports = __toCommonJS(chunk_PPWS5TOR_exports);
|
24
|
+
var import_chunk_VCQCFPLO = require("./chunk-VCQCFPLO.js");
|
25
|
+
var packageJson = (0, import_chunk_VCQCFPLO.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_RHXDDTTE_exports = {};
|
20
|
+
__export(chunk_RHXDDTTE_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_RHXDDTTE_exports);
|
24
|
+
var import_chunk_F4K3GWXT = require("./chunk-F4K3GWXT.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_F4K3GWXT.version]];
|
28
28
|
return `${message}
|
29
29
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
@@ -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_S5MIDUOL_exports = {};
|
30
|
+
__export(chunk_S5MIDUOL_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
36
|
-
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
34
|
+
module.exports = __toCommonJS(chunk_S5MIDUOL_exports);
|
35
|
+
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
37
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
39
|
-
var
|
37
|
+
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
38
|
+
var import_chunk_JZ3G534A = require("./chunk-JZ3G534A.js");
|
39
|
+
var import_chunk_6T2DVBXP = require("./chunk-6T2DVBXP.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,12 +59,12 @@ ${detailsHeader} ${message}`;
|
|
59
59
|
}).exhaustive();
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
61
61
|
[Context: mergeSchemas]`;
|
62
|
-
super((0,
|
62
|
+
super((0, import_chunk_JZ3G534A.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
63
63
|
this.name = "MergeSchemasError";
|
64
64
|
}
|
65
65
|
};
|
66
66
|
function mergeSchemas(options) {
|
67
|
-
const debugErrorType = (0,
|
67
|
+
const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "mergeSchemasWasm");
|
68
68
|
debug(`Using mergeSchemas Wasm`);
|
69
69
|
const mergeSchemasEither = (0, import_function.pipe)(
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
@@ -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_6T2DVBXP.prismaSchemaWasm.merge_schemas(params);
|
76
76
|
},
|
77
77
|
(e) => ({
|
78
78
|
type: "wasm-error",
|
@@ -104,7 +104,7 @@ function mergeSchemas(options) {
|
|
104
104
|
return panic;
|
105
105
|
}
|
106
106
|
const errorOutput = e.error.message;
|
107
|
-
return new MergeSchemasError((0,
|
107
|
+
return new MergeSchemasError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
108
108
|
}).exhaustive();
|
109
109
|
throw error;
|
110
110
|
}
|
@@ -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_S6Z7TU3K_exports = {};
|
30
|
+
__export(chunk_S6Z7TU3K_exports, {
|
31
31
|
handlePanic: () => handlePanic
|
32
32
|
});
|
33
|
-
module.exports = __toCommonJS(
|
33
|
+
module.exports = __toCommonJS(chunk_S6Z7TU3K_exports);
|
34
34
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
35
35
|
var import_chunk_FXMGS3L5 = require("./chunk-FXMGS3L5.js");
|
36
|
-
var
|
36
|
+
var import_chunk_FCYHZHVW = require("./chunk-FCYHZHVW.js");
|
37
37
|
var import_chunk_YR5KNFKN = require("./chunk-YR5KNFKN.js");
|
38
38
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
39
39
|
var import_prompts = __toESM(require("prompts"));
|
40
40
|
async function handlePanic(args) {
|
41
|
-
if (!(0,
|
41
|
+
if (!(0, import_chunk_FCYHZHVW.canPrompt)()) {
|
42
42
|
throw args.error;
|
43
43
|
}
|
44
44
|
await panicDialog(args);
|
@@ -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_TZJROXB3_exports = {};
|
30
|
+
__export(chunk_TZJROXB3_exports, {
|
31
31
|
createDebugErrorType: () => createDebugErrorType,
|
32
32
|
createSchemaValidationError: () => createSchemaValidationError,
|
33
33
|
parseQueryEngineError: () => parseQueryEngineError,
|
34
34
|
unlinkTempDatamodelPath: () => unlinkTempDatamodelPath
|
35
35
|
});
|
36
|
-
module.exports = __toCommonJS(
|
37
|
-
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
36
|
+
module.exports = __toCommonJS(chunk_TZJROXB3_exports);
|
38
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
+
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.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_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -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_VCQCFPLO_exports = {};
|
20
|
+
__export(chunk_VCQCFPLO_exports, {
|
21
21
|
require_package: () => require_package
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_VCQCFPLO_exports);
|
24
24
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
25
25
|
var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
26
26
|
"package.json"(exports, module2) {
|
27
27
|
module2.exports = {
|
28
28
|
name: "@prisma/internals",
|
29
|
-
version: "6.6.0-integration-push-
|
29
|
+
version: "6.6.0-integration-push-ytsqyomrunkq.1",
|
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",
|
@@ -107,12 +107,14 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
107
107
|
"@prisma/config": "workspace:*",
|
108
108
|
"@prisma/debug": "workspace:*",
|
109
109
|
"@prisma/dmmf": "workspace:*",
|
110
|
+
"@prisma/driver-adapter-utils": "workspace:*",
|
110
111
|
"@prisma/engines": "workspace:*",
|
111
112
|
"@prisma/fetch-engine": "workspace:*",
|
112
113
|
"@prisma/generator": "workspace:*",
|
113
114
|
"@prisma/generator-helper": "workspace:*",
|
114
115
|
"@prisma/get-platform": "workspace:*",
|
115
|
-
"@prisma/prisma-schema-wasm": "6.6.0-
|
116
|
+
"@prisma/prisma-schema-wasm": "6.6.0-46.dc2c1279f201ab67d96815a69b3a831a2f89c207",
|
117
|
+
"@prisma/schema-engine-wasm": "6.6.0-46.dc2c1279f201ab67d96815a69b3a831a2f89c207",
|
116
118
|
"@prisma/schema-files-loader": "workspace:*",
|
117
119
|
arg: "5.0.2",
|
118
120
|
prompts: "2.4.2"
|
@@ -26,9 +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_VSYNCHIW_exports = {};
|
30
|
+
__export(chunk_VSYNCHIW_exports, {
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
32
|
+
checkUnsupportedSchemaEngineWasm: () => checkUnsupportedSchemaEngineWasm,
|
33
|
+
forbiddenCmdFlagWithSchemaEngineWasm: () => forbiddenCmdFlagWithSchemaEngineWasm,
|
32
34
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
33
35
|
formatSchema: () => formatSchema,
|
34
36
|
getBinaryTargetForCurrentPlatform: () => import_get_platform2.getBinaryTargetForCurrentPlatform,
|
@@ -49,33 +51,33 @@ __export(chunk_MX3RXVBB_exports, {
|
|
49
51
|
processSchemaResult: () => processSchemaResult,
|
50
52
|
skipIndex: () => skipIndex
|
51
53
|
});
|
52
|
-
module.exports = __toCommonJS(
|
54
|
+
module.exports = __toCommonJS(chunk_VSYNCHIW_exports);
|
55
|
+
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
56
|
+
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
57
|
+
var import_chunk_2IP7H3BQ = require("./chunk-2IP7H3BQ.js");
|
53
58
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
54
59
|
var import_chunk_EPXBOIA5 = require("./chunk-EPXBOIA5.js");
|
55
60
|
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
56
|
-
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
57
|
-
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
58
|
-
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
59
|
-
var import_chunk_UTJGRVMG = require("./chunk-UTJGRVMG.js");
|
60
|
-
var import_chunk_AX5N26KG = require("./chunk-AX5N26KG.js");
|
61
61
|
var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
|
62
|
+
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
62
63
|
var import_chunk_7QC5VORA = require("./chunk-7QC5VORA.js");
|
64
|
+
var import_chunk_AX5N26KG = require("./chunk-AX5N26KG.js");
|
63
65
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
64
66
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
65
|
-
var
|
66
|
-
var
|
67
|
-
var
|
68
|
-
var
|
69
|
-
var
|
67
|
+
var import_chunk_AAJH3SMZ = require("./chunk-AAJH3SMZ.js");
|
68
|
+
var import_chunk_FYGIYYHZ = require("./chunk-FYGIYYHZ.js");
|
69
|
+
var import_chunk_4VIAG7E6 = require("./chunk-4VIAG7E6.js");
|
70
|
+
var import_chunk_HF43IL4T = require("./chunk-HF43IL4T.js");
|
71
|
+
var import_chunk_X4F27I5S = require("./chunk-X4F27I5S.js");
|
72
|
+
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
70
73
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
71
74
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
72
75
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
73
76
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
74
77
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
75
78
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
76
|
-
var import_chunk_MJIP3FY5 = require("./chunk-MJIP3FY5.js");
|
77
|
-
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
78
79
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
80
|
+
var import_chunk_MJIP3FY5 = require("./chunk-MJIP3FY5.js");
|
79
81
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
80
82
|
var import_debug = require("@prisma/debug");
|
81
83
|
var import_schema_files_loader = require("@prisma/schema-files-loader");
|
@@ -100,11 +102,32 @@ var import_node_fs2 = __toESM2(require("node:fs"));
|
|
100
102
|
var import_fs2 = __toESM2(require("fs"));
|
101
103
|
var import_path4 = __toESM2(require("path"));
|
102
104
|
var import_get_platform2 = require("@prisma/get-platform");
|
105
|
+
var forbiddenCmdFlagWithSchemaEngineWasm = ({ cmd, flag }) => `
|
106
|
+
Passing the ${(0, import_chunk_PG5FDKSF.green)(`${flag}`)} flag to the ${(0, import_chunk_PG5FDKSF.green)(`prisma ${cmd}`)} command is not supported when
|
107
|
+
defining a ${(0, import_chunk_PG5FDKSF.green)(`migrate.adapter`)} in ${(0, import_chunk_PG5FDKSF.green)(`prisma.config.ts`)}.
|
108
|
+
|
109
|
+
More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/schema-engine-limitations")}
|
110
|
+
`;
|
111
|
+
function checkUnsupportedSchemaEngineWasm({
|
112
|
+
cmd,
|
113
|
+
config,
|
114
|
+
args,
|
115
|
+
flags
|
116
|
+
}) {
|
117
|
+
if (!config.migrate?.adapter) {
|
118
|
+
return;
|
119
|
+
}
|
120
|
+
for (const flag of flags) {
|
121
|
+
if (args[flag] !== void 0) {
|
122
|
+
throw new Error(forbiddenCmdFlagWithSchemaEngineWasm({ cmd, flag }));
|
123
|
+
}
|
124
|
+
}
|
125
|
+
}
|
103
126
|
var debug = (0, import_debug2.default)("prisma:format");
|
104
127
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
105
128
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
106
129
|
handleFormatPanic(() => {
|
107
|
-
|
130
|
+
import_chunk_X4F27I5S.prismaSchemaWasm.debug_panic();
|
108
131
|
});
|
109
132
|
}
|
110
133
|
const defaultFormattingOptions = {
|
@@ -121,10 +144,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
121
144
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
122
145
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
123
146
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
124
|
-
const lintDiagnostics2 = (0,
|
147
|
+
const lintDiagnostics2 = (0, import_chunk_4VIAG7E6.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
125
148
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
126
149
|
});
|
127
|
-
const lintWarnings = (0,
|
150
|
+
const lintWarnings = (0, import_chunk_4VIAG7E6.getLintWarningsAsText)(lintDiagnostics);
|
128
151
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
129
152
|
console.warn(lintWarnings);
|
130
153
|
}
|
@@ -151,7 +174,7 @@ function handleFormatPanic(tryCb) {
|
|
151
174
|
}
|
152
175
|
}
|
153
176
|
function formatWasm(schema, documentFormattingParams) {
|
154
|
-
const formattedSchema =
|
177
|
+
const formattedSchema = import_chunk_X4F27I5S.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
155
178
|
return formattedSchema;
|
156
179
|
}
|
157
180
|
var readFile = (0, import_util.promisify)(import_fs.default.readFile);
|
@@ -195,7 +218,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
195
218
|
}
|
196
219
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
197
220
|
debug2("Loading config");
|
198
|
-
const config = await (0,
|
221
|
+
const config = await (0, import_chunk_AAJH3SMZ.getConfig)({
|
199
222
|
datamodel: files,
|
200
223
|
ignoreEnvVarErrors: true
|
201
224
|
});
|
@@ -405,7 +428,7 @@ async function processSchemaResult({
|
|
405
428
|
if (printLoadMessage) {
|
406
429
|
printSchemaLoadedMessage(loadedFromPathForLogMessages);
|
407
430
|
}
|
408
|
-
const configFromPsl = await (0,
|
431
|
+
const configFromPsl = await (0, import_chunk_AAJH3SMZ.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
|
409
432
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
410
433
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
411
434
|
return {
|
@@ -483,7 +506,7 @@ async function getGenerators(options) {
|
|
483
506
|
}
|
484
507
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
485
508
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
486
|
-
const dmmf = await (0,
|
509
|
+
const dmmf = await (0, import_chunk_FYGIYYHZ.getDMMF)({
|
487
510
|
datamodel: schemaContext.schemaFiles,
|
488
511
|
previewFeatures
|
489
512
|
});
|
@@ -534,7 +557,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
534
557
|
fromEnvVar: null
|
535
558
|
};
|
536
559
|
}
|
537
|
-
const datamodel = (0,
|
560
|
+
const datamodel = (0, import_chunk_HF43IL4T.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
538
561
|
const envPaths = await getEnvPaths(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
|
539
562
|
const options2 = {
|
540
563
|
datamodel,
|
@@ -618,7 +641,7 @@ generator gen {
|
|
618
641
|
debug3({ generatorBinaryPaths });
|
619
642
|
generator.setBinaryPaths(generatorBinaryPaths);
|
620
643
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
621
|
-
const customDmmf = await (0,
|
644
|
+
const customDmmf = await (0, import_chunk_FYGIYYHZ.getDMMF)({
|
622
645
|
datamodel: schemaContext.schemaFiles,
|
623
646
|
previewFeatures
|
624
647
|
});
|
@@ -817,7 +840,7 @@ async function getEnvPaths(schemaPath2, opts = { cwd: process.cwd() }) {
|
|
817
840
|
"./.env"
|
818
841
|
// 4 - Check cwd for .env
|
819
842
|
];
|
820
|
-
const schemaEnvPath = schemaEnvPaths.find(
|
843
|
+
const schemaEnvPath = schemaEnvPaths.find(import_chunk_2IP7H3BQ.exists);
|
821
844
|
return { rootEnvPath, schemaEnvPath };
|
822
845
|
}
|
823
846
|
async function readSchemaPathFromPkgJson() {
|
@@ -871,7 +894,7 @@ async function loadEnvFile({
|
|
871
894
|
return;
|
872
895
|
}
|
873
896
|
const envPaths = await getEnvPaths(schemaPath2);
|
874
|
-
const envData = (0,
|
897
|
+
const envData = (0, import_chunk_2IP7H3BQ.tryLoadEnvs)(envPaths, { conflictCheck: "error" });
|
875
898
|
if (printMessage && envData && envData.message) {
|
876
899
|
process.stdout.write(envData.message + "\n");
|
877
900
|
}
|
@@ -893,7 +916,7 @@ function checkUnsupportedDataProxy({
|
|
893
916
|
}
|
894
917
|
}
|
895
918
|
if (!schemaContext2?.primaryDatasource) return;
|
896
|
-
const url = (0,
|
919
|
+
const url = (0, import_chunk_AAJH3SMZ.resolveUrl)((0, import_chunk_AAJH3SMZ.getEffectiveUrl)(schemaContext2.primaryDatasource));
|
897
920
|
if (url?.startsWith("prisma://")) {
|
898
921
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
899
922
|
}
|
@@ -0,0 +1,64 @@
|
|
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_WPX2HKUE_exports = {};
|
30
|
+
__export(chunk_WPX2HKUE_exports, {
|
31
|
+
wasmSchemaEngineLoader: () => wasmSchemaEngineLoader
|
32
|
+
});
|
33
|
+
module.exports = __toCommonJS(chunk_WPX2HKUE_exports);
|
34
|
+
var import_promises = __toESM(require("node:fs/promises"));
|
35
|
+
var import_node_path = __toESM(require("node:path"));
|
36
|
+
async function getSchemaEngineWasModule() {
|
37
|
+
const runtimeBase = import_node_path.default.join(__dirname, "..", "build");
|
38
|
+
const schemaEngineWasmFilePath = import_node_path.default.join(runtimeBase, `schema_engine_bg.wasm`);
|
39
|
+
const schemaEngineWasmFileBytes = await import_promises.default.readFile(schemaEngineWasmFilePath);
|
40
|
+
return new WebAssembly.Module(schemaEngineWasmFileBytes);
|
41
|
+
}
|
42
|
+
var loadedWasmInstance;
|
43
|
+
var wasmSchemaEngineLoader = {
|
44
|
+
async loadSchemaEngine(adapter) {
|
45
|
+
if (loadedWasmInstance === void 0) {
|
46
|
+
loadedWasmInstance = (async () => {
|
47
|
+
const runtime = await import("@prisma/schema-engine-wasm/schema_engine_bg");
|
48
|
+
const wasmModule = await getSchemaEngineWasModule();
|
49
|
+
console.log("[runtime]", runtime);
|
50
|
+
console.log("[runtime]", runtime.default);
|
51
|
+
const instance = new WebAssembly.Instance(wasmModule, {
|
52
|
+
// @ts-ignore
|
53
|
+
"./schema_engine_bg.js": runtime
|
54
|
+
});
|
55
|
+
const wbindgen_start = instance.exports.__wbindgen_start;
|
56
|
+
runtime.__wbg_set_wasm(instance.exports);
|
57
|
+
wbindgen_start();
|
58
|
+
const engine = await runtime.SchemaEngine.new(adapter);
|
59
|
+
return engine;
|
60
|
+
})();
|
61
|
+
}
|
62
|
+
return await loadedWasmInstance;
|
63
|
+
}
|
64
|
+
};
|