@prisma/internals 6.6.0-integration-feat-introduce-schema-engine-wasm.1 → 6.6.0-integration-push-spwsqpvywlkl.10
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-VEAKCMMV.js → chunk-2QMPBMR2.js} +5 -5
- package/dist/{chunk-52GUTJNP.js → chunk-AXYQWZXV.js} +11 -11
- package/dist/{chunk-BEGR4E3N.js → chunk-C4WKSMX5.js} +5 -5
- package/dist/{chunk-4GEZGEMU.js → chunk-FGPLTNY4.js} +11 -11
- package/dist/{chunk-7M5XFADI.js → chunk-FRNDDXVT.js} +26 -26
- package/dist/{chunk-RMQRANHT.js → chunk-IFS6DFRE.js} +11 -11
- package/dist/{chunk-MWWACG5B.js → chunk-IRTBJKYB.js} +5 -5
- package/dist/{chunk-R26WU4VZ.js → chunk-JXJ5T5JM.js} +13 -13
- package/dist/{chunk-PIBOH27R.js → chunk-LKR4OOFJ.js} +5 -5
- package/dist/{chunk-X4HLMORZ.js → chunk-MX3RXVBB.js} +26 -26
- package/dist/{chunk-LYJWD54R.js → chunk-N6H26BQE.js} +5 -5
- package/dist/{chunk-YOD76CAF.js → chunk-O3X5PEOU.js} +12 -12
- package/dist/{chunk-CHVRY25M.js → chunk-OESCEI3R.js} +13 -13
- package/dist/{chunk-5FF5E366.js → chunk-P4A2WSHJ.js} +4 -6
- package/dist/{chunk-NW6CPMEZ.js → chunk-TWSSYOC7.js} +3 -5
- package/dist/{chunk-TJCWKHRP.js → chunk-TXJI6MQX.js} +5 -5
- package/dist/{chunk-Z4FQOJ2D.js → chunk-U6ZCSHHC.js} +7 -10
- package/dist/{chunk-2IP7H3BQ.js → chunk-UTJGRVMG.js} +4 -4
- package/dist/{chunk-ZSPCBCNE.js → chunk-W3HQUCF3.js} +12 -12
- package/dist/{chunk-TZJROXB3.js → chunk-WSZXPLJQ.js} +4 -4
- package/dist/{chunk-2N3DM23P.js → chunk-XF3D7LPL.js} +7 -10
- package/dist/{chunk-LAIBHSUR.js → chunk-YKMFYZPB.js} +11 -11
- package/dist/cli/checkUnsupportedDataProxy.js +24 -25
- package/dist/cli/getSchema.js +27 -28
- package/dist/cli/hashes.js +24 -25
- package/dist/cli/schemaContext.js +24 -25
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +23 -24
- 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 +32 -33
- 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 +26 -27
- package/dist/index.d.ts +1 -2
- package/dist/index.js +51 -55
- package/dist/migrateTypes.d.ts +1 -1
- package/dist/utils/getEnvPaths.js +23 -24
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +1 -1
- package/dist/utils/loadEnvFile.js +23 -24
- package/dist/utils/tryLoadEnvs.js +6 -6
- package/dist/wasm.d.ts +1 -3
- package/dist/wasm.js +4 -5
- package/package.json +10 -12
- package/dist/WasmSchemaEngineLoader.d.ts +0 -5
- package/dist/WasmSchemaEngineLoader.js +0 -25
- package/dist/chunk-WPX2HKUE.js +0 -64
@@ -26,8 +26,8 @@ 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_MX3RXVBB_exports = {};
|
30
|
+
__export(chunk_MX3RXVBB_exports, {
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
32
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
33
33
|
formatSchema: () => formatSchema,
|
@@ -49,33 +49,33 @@ __export(chunk_X4HLMORZ_exports, {
|
|
49
49
|
processSchemaResult: () => processSchemaResult,
|
50
50
|
skipIndex: () => skipIndex
|
51
51
|
});
|
52
|
-
module.exports = __toCommonJS(
|
53
|
-
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
54
|
-
var import_chunk_2IP7H3BQ = require("./chunk-2IP7H3BQ.js");
|
52
|
+
module.exports = __toCommonJS(chunk_MX3RXVBB_exports);
|
55
53
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
56
54
|
var import_chunk_EPXBOIA5 = require("./chunk-EPXBOIA5.js");
|
57
55
|
var import_chunk_RS2R7COT = require("./chunk-RS2R7COT.js");
|
58
56
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
59
|
-
var
|
57
|
+
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
60
58
|
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
61
|
-
var
|
59
|
+
var import_chunk_UTJGRVMG = require("./chunk-UTJGRVMG.js");
|
62
60
|
var import_chunk_AX5N26KG = require("./chunk-AX5N26KG.js");
|
61
|
+
var import_chunk_5V36RLCO = require("./chunk-5V36RLCO.js");
|
62
|
+
var import_chunk_7QC5VORA = require("./chunk-7QC5VORA.js");
|
63
63
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
64
64
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
65
|
-
var
|
66
|
-
var
|
67
|
-
var
|
68
|
-
var
|
69
|
-
var
|
70
|
-
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
65
|
+
var import_chunk_IFS6DFRE = require("./chunk-IFS6DFRE.js");
|
66
|
+
var import_chunk_TXJI6MQX = require("./chunk-TXJI6MQX.js");
|
67
|
+
var import_chunk_FGPLTNY4 = require("./chunk-FGPLTNY4.js");
|
68
|
+
var import_chunk_JXJ5T5JM = require("./chunk-JXJ5T5JM.js");
|
69
|
+
var import_chunk_U6ZCSHHC = require("./chunk-U6ZCSHHC.js");
|
71
70
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
72
71
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
73
72
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
74
73
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
75
74
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
76
75
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
77
|
-
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
78
76
|
var import_chunk_MJIP3FY5 = require("./chunk-MJIP3FY5.js");
|
77
|
+
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
78
|
+
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
79
79
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
80
80
|
var import_debug = require("@prisma/debug");
|
81
81
|
var import_schema_files_loader = require("@prisma/schema-files-loader");
|
@@ -104,7 +104,7 @@ var debug = (0, import_debug2.default)("prisma:format");
|
|
104
104
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
105
105
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
106
106
|
handleFormatPanic(() => {
|
107
|
-
|
107
|
+
import_chunk_U6ZCSHHC.prismaSchemaWasm.debug_panic();
|
108
108
|
});
|
109
109
|
}
|
110
110
|
const defaultFormattingOptions = {
|
@@ -121,10 +121,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
121
121
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
122
122
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
123
123
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
124
|
-
const lintDiagnostics2 = (0,
|
124
|
+
const lintDiagnostics2 = (0, import_chunk_TXJI6MQX.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
125
125
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
126
126
|
});
|
127
|
-
const lintWarnings = (0,
|
127
|
+
const lintWarnings = (0, import_chunk_TXJI6MQX.getLintWarningsAsText)(lintDiagnostics);
|
128
128
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
129
129
|
console.warn(lintWarnings);
|
130
130
|
}
|
@@ -151,7 +151,7 @@ function handleFormatPanic(tryCb) {
|
|
151
151
|
}
|
152
152
|
}
|
153
153
|
function formatWasm(schema, documentFormattingParams) {
|
154
|
-
const formattedSchema =
|
154
|
+
const formattedSchema = import_chunk_U6ZCSHHC.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
155
155
|
return formattedSchema;
|
156
156
|
}
|
157
157
|
var readFile = (0, import_util.promisify)(import_fs.default.readFile);
|
@@ -195,7 +195,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
195
195
|
}
|
196
196
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
197
197
|
debug2("Loading config");
|
198
|
-
const config = await (0,
|
198
|
+
const config = await (0, import_chunk_JXJ5T5JM.getConfig)({
|
199
199
|
datamodel: files,
|
200
200
|
ignoreEnvVarErrors: true
|
201
201
|
});
|
@@ -405,7 +405,7 @@ async function processSchemaResult({
|
|
405
405
|
if (printLoadMessage) {
|
406
406
|
printSchemaLoadedMessage(loadedFromPathForLogMessages);
|
407
407
|
}
|
408
|
-
const configFromPsl = await (0,
|
408
|
+
const configFromPsl = await (0, import_chunk_JXJ5T5JM.getConfig)({ datamodel: schemaResult.schemas, ignoreEnvVarErrors });
|
409
409
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
410
410
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
411
411
|
return {
|
@@ -483,7 +483,7 @@ async function getGenerators(options) {
|
|
483
483
|
}
|
484
484
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
485
485
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
486
|
-
const dmmf = await (0,
|
486
|
+
const dmmf = await (0, import_chunk_IFS6DFRE.getDMMF)({
|
487
487
|
datamodel: schemaContext.schemaFiles,
|
488
488
|
previewFeatures
|
489
489
|
});
|
@@ -534,7 +534,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
534
534
|
fromEnvVar: null
|
535
535
|
};
|
536
536
|
}
|
537
|
-
const datamodel = (0,
|
537
|
+
const datamodel = (0, import_chunk_FGPLTNY4.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
538
538
|
const envPaths = await getEnvPaths(schemaContext.schemaPath, { cwd: generatorConfig.output.value });
|
539
539
|
const options2 = {
|
540
540
|
datamodel,
|
@@ -618,7 +618,7 @@ generator gen {
|
|
618
618
|
debug3({ generatorBinaryPaths });
|
619
619
|
generator.setBinaryPaths(generatorBinaryPaths);
|
620
620
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
621
|
-
const customDmmf = await (0,
|
621
|
+
const customDmmf = await (0, import_chunk_IFS6DFRE.getDMMF)({
|
622
622
|
datamodel: schemaContext.schemaFiles,
|
623
623
|
previewFeatures
|
624
624
|
});
|
@@ -817,7 +817,7 @@ async function getEnvPaths(schemaPath2, opts = { cwd: process.cwd() }) {
|
|
817
817
|
"./.env"
|
818
818
|
// 4 - Check cwd for .env
|
819
819
|
];
|
820
|
-
const schemaEnvPath = schemaEnvPaths.find(
|
820
|
+
const schemaEnvPath = schemaEnvPaths.find(import_chunk_UTJGRVMG.exists);
|
821
821
|
return { rootEnvPath, schemaEnvPath };
|
822
822
|
}
|
823
823
|
async function readSchemaPathFromPkgJson() {
|
@@ -871,7 +871,7 @@ async function loadEnvFile({
|
|
871
871
|
return;
|
872
872
|
}
|
873
873
|
const envPaths = await getEnvPaths(schemaPath2);
|
874
|
-
const envData = (0,
|
874
|
+
const envData = (0, import_chunk_UTJGRVMG.tryLoadEnvs)(envPaths, { conflictCheck: "error" });
|
875
875
|
if (printMessage && envData && envData.message) {
|
876
876
|
process.stdout.write(envData.message + "\n");
|
877
877
|
}
|
@@ -893,7 +893,7 @@ function checkUnsupportedDataProxy({
|
|
893
893
|
}
|
894
894
|
}
|
895
895
|
if (!schemaContext2?.primaryDatasource) return;
|
896
|
-
const url = (0,
|
896
|
+
const url = (0, import_chunk_JXJ5T5JM.resolveUrl)((0, import_chunk_JXJ5T5JM.getEffectiveUrl)(schemaContext2.primaryDatasource));
|
897
897
|
if (url?.startsWith("prisma://")) {
|
898
898
|
throw new Error(forbiddenCmdWithDataProxyFlagMessage(cmd));
|
899
899
|
}
|
@@ -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_N6H26BQE_exports = {};
|
20
|
+
__export(chunk_N6H26BQE_exports, {
|
21
21
|
version: () => version
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
25
|
-
var packageJson = (0,
|
23
|
+
module.exports = __toCommonJS(chunk_N6H26BQE_exports);
|
24
|
+
var import_chunk_TWSSYOC7 = require("./chunk-TWSSYOC7.js");
|
25
|
+
var packageJson = (0, import_chunk_TWSSYOC7.require_package)();
|
26
26
|
var version = packageJson.version;
|
@@ -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_O3X5PEOU_exports = {};
|
30
|
+
__export(chunk_O3X5PEOU_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
36
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
34
|
+
module.exports = __toCommonJS(chunk_O3X5PEOU_exports);
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
37
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
38
|
-
var
|
39
|
-
var
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
+
var import_chunk_LKR4OOFJ = require("./chunk-LKR4OOFJ.js");
|
39
|
+
var import_chunk_XF3D7LPL = require("./chunk-XF3D7LPL.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,25 +59,25 @@ ${detailsHeader} ${message}`;
|
|
59
59
|
}).exhaustive();
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
61
61
|
[Context: validate]`;
|
62
|
-
super((0,
|
62
|
+
super((0, import_chunk_LKR4OOFJ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
63
63
|
this.name = "ValidateError";
|
64
64
|
}
|
65
65
|
};
|
66
66
|
function validate(options) {
|
67
|
-
const debugErrorType = (0,
|
67
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "validateWasm");
|
68
68
|
debug(`Using validate Wasm`);
|
69
69
|
const validateEither = (0, import_function.pipe)(
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
71
71
|
() => {
|
72
72
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
73
73
|
debug("Triggering a Rust panic...");
|
74
|
-
|
74
|
+
import_chunk_XF3D7LPL.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_XF3D7LPL.prismaSchemaWasm.validate(params);
|
81
81
|
},
|
82
82
|
(e) => ({
|
83
83
|
type: "wasm-error",
|
@@ -109,7 +109,7 @@ function validate(options) {
|
|
109
109
|
return panic;
|
110
110
|
}
|
111
111
|
const errorOutput = e.error.message;
|
112
|
-
return new ValidateError((0,
|
112
|
+
return new ValidateError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
113
113
|
}).exhaustive();
|
114
114
|
throw error;
|
115
115
|
}
|
@@ -26,20 +26,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_OESCEI3R_exports = {};
|
30
|
+
__export(chunk_OESCEI3R_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(
|
38
|
-
var
|
39
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
37
|
+
module.exports = __toCommonJS(chunk_OESCEI3R_exports);
|
38
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
40
39
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
41
|
-
var
|
42
|
-
var
|
40
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
41
|
+
var import_chunk_LKR4OOFJ = require("./chunk-LKR4OOFJ.js");
|
42
|
+
var import_chunk_XF3D7LPL = require("./chunk-XF3D7LPL.js");
|
43
43
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
44
44
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
45
45
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
@@ -64,7 +64,7 @@ ${detailsHeader} ${message}`;
|
|
64
64
|
}).exhaustive();
|
65
65
|
const errorMessageWithContext = `${constructedErrorMessage}
|
66
66
|
[Context: getConfig]`;
|
67
|
-
super((0,
|
67
|
+
super((0, import_chunk_LKR4OOFJ.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
68
68
|
this.name = "GetConfigError";
|
69
69
|
}
|
70
70
|
};
|
@@ -82,14 +82,14 @@ function resolveUrl(envValue) {
|
|
82
82
|
return urlFromValue ?? urlEnvVarValue;
|
83
83
|
}
|
84
84
|
async function getConfig(options) {
|
85
|
-
const debugErrorType = (0,
|
85
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "getConfigWasm");
|
86
86
|
debug(`Using getConfig Wasm`);
|
87
87
|
const configEither = (0, import_function.pipe)(
|
88
88
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
89
89
|
() => {
|
90
90
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
91
91
|
debug("Triggering a Rust panic...");
|
92
|
-
|
92
|
+
import_chunk_XF3D7LPL.prismaSchemaWasm.debug_panic();
|
93
93
|
}
|
94
94
|
const params = JSON.stringify({
|
95
95
|
prismaSchema: options.datamodel,
|
@@ -97,7 +97,7 @@ async function getConfig(options) {
|
|
97
97
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
98
98
|
env: process.env
|
99
99
|
});
|
100
|
-
const data =
|
100
|
+
const data = import_chunk_XF3D7LPL.prismaSchemaWasm.get_config(params);
|
101
101
|
return data;
|
102
102
|
},
|
103
103
|
(e) => ({
|
@@ -156,12 +156,12 @@ async function getConfig(options) {
|
|
156
156
|
return panic;
|
157
157
|
}
|
158
158
|
const errorOutput = e.error.message;
|
159
|
-
return new GetConfigError((0,
|
159
|
+
return new GetConfigError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
160
160
|
}).with({ type: "validation-error" }, (e) => {
|
161
161
|
return new GetConfigError({
|
162
162
|
_tag: "parsed",
|
163
163
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
164
|
-
reason: (0,
|
164
|
+
reason: (0, import_chunk_WSZXPLJQ.createSchemaValidationError)(e.reason),
|
165
165
|
message: formatErrors(e.error)
|
166
166
|
});
|
167
167
|
}).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_P4A2WSHJ_exports = {};
|
20
|
+
__export(chunk_P4A2WSHJ_exports, {
|
21
21
|
require_package: () => require_package
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_P4A2WSHJ_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-
|
29
|
+
version: "6.6.0-integration-push-spwsqpvywlkl.10",
|
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,13 +107,11 @@ 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:*",
|
111
110
|
"@prisma/engines": "workspace:*",
|
112
111
|
"@prisma/fetch-engine": "workspace:*",
|
113
112
|
"@prisma/generator": "workspace:*",
|
114
113
|
"@prisma/generator-helper": "workspace:*",
|
115
114
|
"@prisma/get-platform": "workspace:*",
|
116
|
-
"@prisma/schema-engine-wasm": "6.6.0-45.fbda4d61f6cc9c7361b803e72f3a0ffeb87db447",
|
117
115
|
"@prisma/prisma-schema-wasm": "6.6.0-45.fbda4d61f6cc9c7361b803e72f3a0ffeb87db447",
|
118
116
|
"@prisma/schema-files-loader": "workspace:*",
|
119
117
|
arg: "5.0.2",
|
@@ -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_TWSSYOC7_exports = {};
|
20
|
+
__export(chunk_TWSSYOC7_exports, {
|
21
21
|
require_package: () => require_package
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_TWSSYOC7_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,13 +107,11 @@ 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:*",
|
111
110
|
"@prisma/engines": "workspace:*",
|
112
111
|
"@prisma/fetch-engine": "workspace:*",
|
113
112
|
"@prisma/generator": "workspace:*",
|
114
113
|
"@prisma/generator-helper": "workspace:*",
|
115
114
|
"@prisma/get-platform": "workspace:*",
|
116
|
-
"@prisma/schema-engine-wasm": "6.6.0-45.fbda4d61f6cc9c7361b803e72f3a0ffeb87db447",
|
117
115
|
"@prisma/prisma-schema-wasm": "6.6.0-45.fbda4d61f6cc9c7361b803e72f3a0ffeb87db447",
|
118
116
|
"@prisma/schema-files-loader": "workspace:*",
|
119
117
|
arg: "5.0.2",
|
@@ -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_TXJI6MQX_exports = {};
|
20
|
+
__export(chunk_TXJI6MQX_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_TXJI6MQX_exports);
|
28
|
+
var import_chunk_U6ZCSHHC = require("./chunk-U6ZCSHHC.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_U6ZCSHHC.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
34
34
|
return lintDiagnostics;
|
35
35
|
}
|
@@ -26,25 +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_U6ZCSHHC_exports = {};
|
30
|
+
__export(chunk_U6ZCSHHC_exports, {
|
31
31
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
32
32
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
|
33
|
-
schemaEngineWasmVersion: () => schemaEngineWasmVersion,
|
34
33
|
wasm_exports: () => wasm_exports
|
35
34
|
});
|
36
|
-
module.exports = __toCommonJS(
|
37
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_U6ZCSHHC_exports);
|
36
|
+
var import_chunk_P4A2WSHJ = require("./chunk-P4A2WSHJ.js");
|
38
37
|
var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
|
39
38
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
40
39
|
var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
|
41
40
|
var wasm_exports = {};
|
42
41
|
(0, import_chunk_4VNS5WPM.__export)(wasm_exports, {
|
43
42
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
44
|
-
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
|
45
|
-
schemaEngineWasmVersion: () => schemaEngineWasmVersion
|
43
|
+
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
|
46
44
|
});
|
47
|
-
|
48
|
-
var { dependencies } = (0, import_chunk_5FF5E366.require_package)();
|
45
|
+
var { dependencies } = (0, import_chunk_P4A2WSHJ.require_package)();
|
49
46
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
50
|
-
|
47
|
+
globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
|
@@ -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_UTJGRVMG_exports = {};
|
30
|
+
__export(chunk_UTJGRVMG_exports, {
|
31
31
|
exists: () => exists,
|
32
32
|
loadEnv: () => loadEnv,
|
33
33
|
pathsEqual: () => pathsEqual,
|
34
34
|
tryLoadEnvs: () => tryLoadEnvs
|
35
35
|
});
|
36
|
-
module.exports = __toCommonJS(
|
37
|
-
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
36
|
+
module.exports = __toCommonJS(chunk_UTJGRVMG_exports);
|
38
37
|
var import_chunk_T2PM5TKT = require("./chunk-T2PM5TKT.js");
|
38
|
+
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
39
39
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
40
40
|
var import_debug = __toESM(require("@prisma/debug"));
|
41
41
|
var import_fs = __toESM(require("fs"));
|
@@ -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_W3HQUCF3_exports = {};
|
30
|
+
__export(chunk_W3HQUCF3_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
36
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
34
|
+
module.exports = __toCommonJS(chunk_W3HQUCF3_exports);
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
37
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
38
|
-
var
|
39
|
-
var
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
+
var import_chunk_C4WKSMX5 = require("./chunk-C4WKSMX5.js");
|
39
|
+
var import_chunk_U6ZCSHHC = require("./chunk-U6ZCSHHC.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,25 +59,25 @@ ${detailsHeader} ${message}`;
|
|
59
59
|
}).exhaustive();
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
61
61
|
[Context: validate]`;
|
62
|
-
super((0,
|
62
|
+
super((0, import_chunk_C4WKSMX5.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
63
63
|
this.name = "ValidateError";
|
64
64
|
}
|
65
65
|
};
|
66
66
|
function validate(options) {
|
67
|
-
const debugErrorType = (0,
|
67
|
+
const debugErrorType = (0, import_chunk_WSZXPLJQ.createDebugErrorType)(debug, "validateWasm");
|
68
68
|
debug(`Using validate Wasm`);
|
69
69
|
const validateEither = (0, import_function.pipe)(
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
71
71
|
() => {
|
72
72
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
73
73
|
debug("Triggering a Rust panic...");
|
74
|
-
|
74
|
+
import_chunk_U6ZCSHHC.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_U6ZCSHHC.prismaSchemaWasm.validate(params);
|
81
81
|
},
|
82
82
|
(e) => ({
|
83
83
|
type: "wasm-error",
|
@@ -109,7 +109,7 @@ function validate(options) {
|
|
109
109
|
return panic;
|
110
110
|
}
|
111
111
|
const errorOutput = e.error.message;
|
112
|
-
return new ValidateError((0,
|
112
|
+
return new ValidateError((0, import_chunk_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
113
113
|
}).exhaustive();
|
114
114
|
throw error;
|
115
115
|
}
|
@@ -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_WSZXPLJQ_exports = {};
|
30
|
+
__export(chunk_WSZXPLJQ_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_C47SCASR = require("./chunk-C47SCASR.js");
|
36
|
+
module.exports = __toCommonJS(chunk_WSZXPLJQ_exports);
|
38
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
38
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.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");
|
@@ -26,25 +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_XF3D7LPL_exports = {};
|
30
|
+
__export(chunk_XF3D7LPL_exports, {
|
31
31
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
32
32
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
|
33
|
-
schemaEngineWasmVersion: () => schemaEngineWasmVersion,
|
34
33
|
wasm_exports: () => wasm_exports
|
35
34
|
});
|
36
|
-
module.exports = __toCommonJS(
|
37
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_XF3D7LPL_exports);
|
36
|
+
var import_chunk_TWSSYOC7 = require("./chunk-TWSSYOC7.js");
|
38
37
|
var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
|
39
38
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
40
39
|
var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
|
41
40
|
var wasm_exports = {};
|
42
41
|
(0, import_chunk_4VNS5WPM.__export)(wasm_exports, {
|
43
42
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
44
|
-
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
|
45
|
-
schemaEngineWasmVersion: () => schemaEngineWasmVersion
|
43
|
+
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
|
46
44
|
});
|
47
|
-
|
48
|
-
var { dependencies } = (0, import_chunk_NW6CPMEZ.require_package)();
|
45
|
+
var { dependencies } = (0, import_chunk_TWSSYOC7.require_package)();
|
49
46
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
50
|
-
|
47
|
+
globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
|
@@ -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_YKMFYZPB_exports = {};
|
30
|
+
__export(chunk_YKMFYZPB_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
36
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
34
|
+
module.exports = __toCommonJS(chunk_YKMFYZPB_exports);
|
35
|
+
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
37
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
38
|
-
var
|
39
|
-
var
|
37
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
+
var import_chunk_LKR4OOFJ = require("./chunk-LKR4OOFJ.js");
|
39
|
+
var import_chunk_XF3D7LPL = require("./chunk-XF3D7LPL.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_LKR4OOFJ.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_WSZXPLJQ.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_XF3D7LPL.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_WSZXPLJQ.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
108
108
|
}).exhaustive();
|
109
109
|
throw error;
|
110
110
|
}
|