@prisma/internals 6.6.0-dev.38 → 6.6.0-dev.39
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-MILJUDNM.js → chunk-3GSMZHEZ.js} +12 -12
- package/dist/{chunk-U4ISIQPY.js → chunk-5PNJER7H.js} +29 -28
- package/dist/{chunk-7FH5JKIS.js → chunk-5TPBYAYG.js} +5 -5
- package/dist/{chunk-K4HUXELY.js → chunk-6LXUM3J5.js} +13 -13
- package/dist/{chunk-HL5VFJX4.js → chunk-7NELNWFH.js} +7 -7
- package/dist/{chunk-WSCZQCHP.js → chunk-AQJV4AGE.js} +23 -22
- package/dist/{chunk-VLBKBUPL.js → chunk-BTIX67Y6.js} +7 -7
- package/dist/{chunk-U4WXIU7C.js → chunk-C3XVEHBX.js} +4 -4
- package/dist/{chunk-HAFET56E.js → chunk-DGLNFHJB.js} +5 -5
- package/dist/{chunk-PAIGKNMY.js → chunk-F3AMC52Y.js} +7 -7
- package/dist/{chunk-BXZXLEEH.js → chunk-LLMEYK53.js} +7 -7
- package/dist/{chunk-BOEMO5MX.js → chunk-M6WKKED7.js} +5 -5
- package/dist/{chunk-CMIKSBKL.js → chunk-MWUHUQI3.js} +4 -4
- package/dist/{chunk-KYRIJMHI.js → chunk-PCD5SHSJ.js} +5 -5
- package/dist/{chunk-57G2SVPI.js → chunk-PKIVYJWI.js} +11 -11
- package/dist/{chunk-Q6VZHKYE.js → chunk-PYCGBYLY.js} +7 -7
- package/dist/{chunk-2ZPYYZJB.js → chunk-QC7APOLV.js} +5 -5
- package/dist/{chunk-HNAV4IFZ.js → chunk-QY2WL356.js} +5 -5
- package/dist/{chunk-Q2SWUYN2.js → chunk-T4QTTY5D.js} +4 -4
- package/dist/{chunk-2VT4AM4Y.js → chunk-T4ZYOYTH.js} +8 -8
- package/dist/{chunk-VNIE2AZB.js → chunk-TQCLUNM2.js} +4 -4
- package/dist/chunk-TV34NMBZ.js +46 -0
- package/dist/{chunk-ZWWPO23M.js → chunk-XTF5F2RB.js} +11 -11
- package/dist/{chunk-UCI7OFQ4.js → chunk-YE7HS3KJ.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +32 -31
- package/dist/cli/directoryConfig.d.ts +7 -0
- package/dist/cli/directoryConfig.js +25 -0
- package/dist/cli/getSchema.js +36 -35
- package/dist/cli/hashes.js +32 -31
- package/dist/cli/schemaContext.js +32 -31
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +31 -30
- package/dist/engine-commands/getConfig.js +12 -12
- package/dist/engine-commands/getDmmf.js +9 -9
- package/dist/engine-commands/getEngineVersion.js +5 -5
- package/dist/engine-commands/getEnginesMetaInfo.js +8 -8
- package/dist/engine-commands/index.js +42 -41
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +9 -9
- package/dist/engine-commands/queryEngineCommons.js +6 -6
- package/dist/engine-commands/validate.js +9 -9
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +31 -30
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +31 -30
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +32 -31
- package/dist/get-generators/getGenerators.js +34 -33
- package/dist/highlight/highlight.js +5 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +75 -73
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +31 -30
- package/dist/utils/getEnvPaths.js +31 -30
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +31 -30
- package/dist/utils/loadEnvFile.js +31 -30
- package/dist/utils/missingDatasource.js +4 -4
- package/dist/utils/missingGeneratorMessage.js +6 -6
- package/dist/wasm.js +4 -4
- package/package.json +8 -8
@@ -26,17 +26,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_F3AMC52Y_exports = {};
|
30
|
+
__export(chunk_F3AMC52Y_exports, {
|
31
31
|
getEnginesInfo: () => getEnginesInfo,
|
32
32
|
getEnginesMetaInfo: () => getEnginesMetaInfo,
|
33
33
|
resolveEngine: () => resolveEngine
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
35
|
+
module.exports = __toCommonJS(chunk_F3AMC52Y_exports);
|
36
|
+
var import_chunk_5TPBYAYG = require("./chunk-5TPBYAYG.js");
|
36
37
|
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
37
|
-
var import_chunk_7FH5JKIS = require("./chunk-7FH5JKIS.js");
|
38
38
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
39
|
-
var
|
39
|
+
var import_chunk_C3XVEHBX = require("./chunk-C3XVEHBX.js");
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
41
41
|
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
42
42
|
var import_engines = require("@prisma/engines");
|
@@ -157,7 +157,7 @@ async function resolveEngine(binaryName) {
|
|
157
157
|
const enginePathEither = await (0, import_function2.pipe)(
|
158
158
|
pathFromEnvOption,
|
159
159
|
fold(
|
160
|
-
() => (0,
|
160
|
+
() => (0, import_chunk_C3XVEHBX.safeResolveBinary)(binaryName),
|
161
161
|
(pathFromEnv) => (0, import_chunk_5DBOS77Y.right2)(pathFromEnv.path)
|
162
162
|
)
|
163
163
|
)();
|
@@ -165,7 +165,7 @@ async function resolveEngine(binaryName) {
|
|
165
165
|
enginePathEither,
|
166
166
|
import_chunk_5DBOS77Y.fromEither,
|
167
167
|
(0, import_chunk_5DBOS77Y.chain)((enginePath) => {
|
168
|
-
return (0,
|
168
|
+
return (0, import_chunk_5TPBYAYG.safeGetEngineVersion)(enginePath, binaryName);
|
169
169
|
})
|
170
170
|
)();
|
171
171
|
const engineInfo = {
|
@@ -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_LLMEYK53_exports = {};
|
30
|
+
__export(chunk_LLMEYK53_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_LLMEYK53_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
36
|
+
var import_chunk_MWUHUQI3 = require("./chunk-MWUHUQI3.js");
|
37
37
|
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
38
|
+
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
38
39
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
39
40
|
var import_chunk_QKPV6M3S = require("./chunk-QKPV6M3S.js");
|
40
|
-
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
41
|
var import_chunk_R7U45FIQ = require("./chunk-R7U45FIQ.js");
|
42
42
|
var import_chunk_CCQRDM7X = require("./chunk-CCQRDM7X.js");
|
43
43
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
@@ -65,7 +65,7 @@ ${detailsHeader} ${message}`;
|
|
65
65
|
}
|
66
66
|
};
|
67
67
|
function validate(options) {
|
68
|
-
const debugErrorType = (0,
|
68
|
+
const debugErrorType = (0, import_chunk_MWUHUQI3.createDebugErrorType)(debug, "validateWasm");
|
69
69
|
debug(`Using validate Wasm`);
|
70
70
|
const validateEither = (0, import_function.pipe)(
|
71
71
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
@@ -113,7 +113,7 @@ function validate(options) {
|
|
113
113
|
return panic;
|
114
114
|
}
|
115
115
|
const errorOutput = e.error.message;
|
116
|
-
return new ValidateError((0,
|
116
|
+
return new ValidateError((0, import_chunk_MWUHUQI3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
117
117
|
}).exhaustive();
|
118
118
|
throw error;
|
119
119
|
}
|
@@ -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_M6WKKED7_exports = {};
|
20
|
+
__export(chunk_M6WKKED7_exports, {
|
21
21
|
version: () => version
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
25
|
-
var packageJson = (0,
|
23
|
+
module.exports = __toCommonJS(chunk_M6WKKED7_exports);
|
24
|
+
var import_chunk_T4QTTY5D = require("./chunk-T4QTTY5D.js");
|
25
|
+
var packageJson = (0, import_chunk_T4QTTY5D.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_MWUHUQI3_exports = {};
|
30
|
+
__export(chunk_MWUHUQI3_exports, {
|
31
31
|
createDebugErrorType: () => createDebugErrorType,
|
32
32
|
createSchemaValidationError: () => createSchemaValidationError,
|
33
33
|
parseQueryEngineError: () => parseQueryEngineError,
|
34
34
|
unlinkTempDatamodelPath: () => unlinkTempDatamodelPath
|
35
35
|
});
|
36
|
-
module.exports = __toCommonJS(
|
36
|
+
module.exports = __toCommonJS(chunk_MWUHUQI3_exports);
|
37
37
|
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
38
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
39
38
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
39
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
41
41
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
42
42
|
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
@@ -16,21 +16,21 @@ 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_PCD5SHSJ_exports = {};
|
20
|
+
__export(chunk_PCD5SHSJ_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(
|
27
|
+
module.exports = __toCommonJS(chunk_PCD5SHSJ_exports);
|
28
28
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
29
|
-
var
|
29
|
+
var import_chunk_DGLNFHJB = require("./chunk-DGLNFHJB.js");
|
30
30
|
var import_chunk_CCQRDM7X = require("./chunk-CCQRDM7X.js");
|
31
31
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
32
32
|
function lintSchema({ schemas }) {
|
33
|
-
const lintResult =
|
33
|
+
const lintResult = import_chunk_DGLNFHJB.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
34
34
|
const lintDiagnostics = JSON.parse(lintResult);
|
35
35
|
return lintDiagnostics;
|
36
36
|
}
|
@@ -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_PKIVYJWI_exports = {};
|
30
|
+
__export(chunk_PKIVYJWI_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_PKIVYJWI_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
36
|
+
var import_chunk_MWUHUQI3 = require("./chunk-MWUHUQI3.js");
|
37
37
|
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
38
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
39
|
-
var import_chunk_HNAV4IFZ = require("./chunk-HNAV4IFZ.js");
|
40
38
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
|
-
var
|
39
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
40
|
+
var import_chunk_QY2WL356 = require("./chunk-QY2WL356.js");
|
41
|
+
var import_chunk_DGLNFHJB = require("./chunk-DGLNFHJB.js");
|
42
42
|
var import_chunk_CCQRDM7X = require("./chunk-CCQRDM7X.js");
|
43
43
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -60,12 +60,12 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: mergeSchemas]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_QY2WL356.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "MergeSchemasError";
|
65
65
|
}
|
66
66
|
};
|
67
67
|
function mergeSchemas(options) {
|
68
|
-
const debugErrorType = (0,
|
68
|
+
const debugErrorType = (0, import_chunk_MWUHUQI3.createDebugErrorType)(debug, "mergeSchemasWasm");
|
69
69
|
debug(`Using mergeSchemas Wasm`);
|
70
70
|
const mergeSchemasEither = (0, import_function.pipe)(
|
71
71
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
@@ -73,7 +73,7 @@ function mergeSchemas(options) {
|
|
73
73
|
const params = JSON.stringify({
|
74
74
|
schema: options.schemas
|
75
75
|
});
|
76
|
-
return
|
76
|
+
return import_chunk_DGLNFHJB.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
type: "wasm-error",
|
@@ -108,7 +108,7 @@ function mergeSchemas(options) {
|
|
108
108
|
return panic;
|
109
109
|
}
|
110
110
|
const errorOutput = e.error.message;
|
111
|
-
return new MergeSchemasError((0,
|
111
|
+
return new MergeSchemasError((0, import_chunk_MWUHUQI3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
112
112
|
}).exhaustive();
|
113
113
|
throw error;
|
114
114
|
}
|
@@ -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_PYCGBYLY_exports = {};
|
30
|
+
__export(chunk_PYCGBYLY_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_PYCGBYLY_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
36
|
+
var import_chunk_MWUHUQI3 = require("./chunk-MWUHUQI3.js");
|
37
37
|
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
38
|
+
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
38
39
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
39
40
|
var import_chunk_QKPV6M3S = require("./chunk-QKPV6M3S.js");
|
40
|
-
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
41
|
var import_chunk_R7U45FIQ = require("./chunk-R7U45FIQ.js");
|
42
42
|
var import_chunk_CCQRDM7X = require("./chunk-CCQRDM7X.js");
|
43
43
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
@@ -65,7 +65,7 @@ ${detailsHeader} ${message}`;
|
|
65
65
|
}
|
66
66
|
};
|
67
67
|
function mergeSchemas(options) {
|
68
|
-
const debugErrorType = (0,
|
68
|
+
const debugErrorType = (0, import_chunk_MWUHUQI3.createDebugErrorType)(debug, "mergeSchemasWasm");
|
69
69
|
debug(`Using mergeSchemas Wasm`);
|
70
70
|
const mergeSchemasEither = (0, import_function.pipe)(
|
71
71
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
@@ -108,7 +108,7 @@ function mergeSchemas(options) {
|
|
108
108
|
return panic;
|
109
109
|
}
|
110
110
|
const errorOutput = e.error.message;
|
111
|
-
return new MergeSchemasError((0,
|
111
|
+
return new MergeSchemasError((0, import_chunk_MWUHUQI3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
112
112
|
}).exhaustive();
|
113
113
|
throw error;
|
114
114
|
}
|
@@ -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_QC7APOLV_exports = {};
|
20
|
+
__export(chunk_QC7APOLV_exports, {
|
21
21
|
missingDatasource: () => missingDatasource
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_QC7APOLV_exports);
|
24
24
|
var import_chunk_FNA4EAZ6 = require("./chunk-FNA4EAZ6.js");
|
25
|
-
var
|
25
|
+
var import_chunk_TQCLUNM2 = require("./chunk-TQCLUNM2.js");
|
26
26
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
27
27
|
var missingDatasource = `
|
28
28
|
You don't have any ${(0, import_chunk_PG5FDKSF.bold)("datasource")} defined in your ${(0, import_chunk_PG5FDKSF.bold)("schema.prisma")}.
|
29
29
|
You can define a datasource like this:
|
30
30
|
|
31
31
|
${(0, import_chunk_PG5FDKSF.bold)(
|
32
|
-
(0,
|
32
|
+
(0, import_chunk_TQCLUNM2.highlightDatamodel)(`datasource db {
|
33
33
|
provider = "postgresql"
|
34
34
|
url = env("DB_URL")
|
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_QY2WL356_exports = {};
|
20
|
+
__export(chunk_QY2WL356_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_QY2WL356_exports);
|
24
|
+
var import_chunk_M6WKKED7 = require("./chunk-M6WKKED7.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_M6WKKED7.version]];
|
28
28
|
return `${message}
|
29
29
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
@@ -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_T4QTTY5D_exports = {};
|
20
|
+
__export(chunk_T4QTTY5D_exports, {
|
21
21
|
require_package: () => require_package
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_T4QTTY5D_exports);
|
24
24
|
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
25
25
|
var require_package = (0, import_chunk_2ESYSVXG.__commonJS)({
|
26
26
|
"package.json"(exports, module2) {
|
27
27
|
module2.exports = {
|
28
28
|
name: "@prisma/internals",
|
29
|
-
version: "6.6.0-dev.
|
29
|
+
version: "6.6.0-dev.39",
|
30
30
|
description: "This package is intended for Prisma's internal use",
|
31
31
|
main: "dist/index.js",
|
32
32
|
types: "dist/index.d.ts",
|
@@ -26,21 +26,21 @@ 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_T4ZYOYTH_exports = {};
|
30
|
+
__export(chunk_T4ZYOYTH_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_T4ZYOYTH_exports);
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
39
|
-
var
|
39
|
+
var import_chunk_MWUHUQI3 = require("./chunk-MWUHUQI3.js");
|
40
40
|
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
41
|
+
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
42
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
42
43
|
var import_chunk_QKPV6M3S = require("./chunk-QKPV6M3S.js");
|
43
|
-
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
44
44
|
var import_chunk_R7U45FIQ = require("./chunk-R7U45FIQ.js");
|
45
45
|
var import_chunk_CCQRDM7X = require("./chunk-CCQRDM7X.js");
|
46
46
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
@@ -83,7 +83,7 @@ function resolveUrl(envValue) {
|
|
83
83
|
return urlFromValue ?? urlEnvVarValue;
|
84
84
|
}
|
85
85
|
async function getConfig(options) {
|
86
|
-
const debugErrorType = (0,
|
86
|
+
const debugErrorType = (0, import_chunk_MWUHUQI3.createDebugErrorType)(debug, "getConfigWasm");
|
87
87
|
debug(`Using getConfig Wasm`);
|
88
88
|
const configEither = (0, import_function.pipe)(
|
89
89
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
@@ -160,12 +160,12 @@ async function getConfig(options) {
|
|
160
160
|
return panic;
|
161
161
|
}
|
162
162
|
const errorOutput = e.error.message;
|
163
|
-
return new GetConfigError((0,
|
163
|
+
return new GetConfigError((0, import_chunk_MWUHUQI3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
164
164
|
}).with({ type: "validation-error" }, (e) => {
|
165
165
|
return new GetConfigError({
|
166
166
|
_tag: "parsed",
|
167
167
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
168
|
-
reason: (0,
|
168
|
+
reason: (0, import_chunk_MWUHUQI3.createSchemaValidationError)(e.reason),
|
169
169
|
message: formatErrors(e.error)
|
170
170
|
});
|
171
171
|
}).otherwise((e) => {
|
@@ -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_TQCLUNM2_exports = {};
|
20
|
+
__export(chunk_TQCLUNM2_exports, {
|
21
21
|
highlightDatamodel: () => highlightDatamodel,
|
22
22
|
highlightSql: () => highlightSql,
|
23
23
|
highlightTS: () => highlightTS
|
24
24
|
});
|
25
|
-
module.exports = __toCommonJS(
|
26
|
-
var import_chunk_CYAS6B5N = require("./chunk-CYAS6B5N.js");
|
25
|
+
module.exports = __toCommonJS(chunk_TQCLUNM2_exports);
|
27
26
|
var import_chunk_OIVPX3BR = require("./chunk-OIVPX3BR.js");
|
27
|
+
var import_chunk_CYAS6B5N = require("./chunk-CYAS6B5N.js");
|
28
28
|
var import_chunk_HPVMQFIY = require("./chunk-HPVMQFIY.js");
|
29
29
|
function highlightDatamodel(str) {
|
30
30
|
return highlight(str, import_chunk_OIVPX3BR.dml);
|
@@ -0,0 +1,46 @@
|
|
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_TV34NMBZ_exports = {};
|
30
|
+
__export(chunk_TV34NMBZ_exports, {
|
31
|
+
inferDirectoryConfig: () => inferDirectoryConfig
|
32
|
+
});
|
33
|
+
module.exports = __toCommonJS(chunk_TV34NMBZ_exports);
|
34
|
+
var import_path = __toESM(require("path"));
|
35
|
+
function inferDirectoryConfig(schemaContext) {
|
36
|
+
const rootDir = schemaContext?.schemaRootDir ?? import_path.default.join(process.cwd(), "prisma");
|
37
|
+
const migrationsDirPath = import_path.default.join(import_path.default.dirname(schemaContext?.schemaPath ?? process.cwd()), "migrations");
|
38
|
+
const schemaPath = schemaContext?.schemaPath ?? import_path.default.join(process.cwd(), "prisma");
|
39
|
+
const prismaDir = import_path.default.dirname(schemaPath);
|
40
|
+
const viewsDirPath = import_path.default.join(prismaDir, "views");
|
41
|
+
return {
|
42
|
+
viewsDirPath,
|
43
|
+
typedSqlDirPath: import_path.default.join(rootDir, "sql"),
|
44
|
+
migrationsDirPath
|
45
|
+
};
|
46
|
+
}
|
@@ -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_XTF5F2RB_exports = {};
|
30
|
+
__export(chunk_XTF5F2RB_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_XTF5F2RB_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
36
|
+
var import_chunk_MWUHUQI3 = require("./chunk-MWUHUQI3.js");
|
37
37
|
var import_chunk_ZGAIRZ32 = require("./chunk-ZGAIRZ32.js");
|
38
|
-
var import_chunk_HNAV4IFZ = require("./chunk-HNAV4IFZ.js");
|
39
38
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
40
|
-
var
|
39
|
+
var import_chunk_QY2WL356 = require("./chunk-QY2WL356.js");
|
40
|
+
var import_chunk_DGLNFHJB = require("./chunk-DGLNFHJB.js");
|
41
41
|
var import_chunk_CCQRDM7X = require("./chunk-CCQRDM7X.js");
|
42
42
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
@@ -59,25 +59,25 @@ ${detailsHeader} ${message}`;
|
|
59
59
|
}).exhaustive();
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
61
61
|
[Context: getDmmf]`;
|
62
|
-
super((0,
|
62
|
+
super((0, import_chunk_QY2WL356.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
63
63
|
this.name = "GetDmmfError";
|
64
64
|
}
|
65
65
|
};
|
66
66
|
async function getDMMF(options) {
|
67
|
-
const debugErrorType = (0,
|
67
|
+
const debugErrorType = (0, import_chunk_MWUHUQI3.createDebugErrorType)(debug, "getDmmfWasm");
|
68
68
|
debug(`Using getDmmf Wasm`);
|
69
69
|
const dmmfPipeline = (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_DGLNFHJB.prismaSchemaWasm.debug_panic();
|
75
75
|
}
|
76
76
|
const params = JSON.stringify({
|
77
77
|
prismaSchema: options.datamodel,
|
78
78
|
noColor: Boolean(process.env.NO_COLOR)
|
79
79
|
});
|
80
|
-
const data =
|
80
|
+
const data = import_chunk_DGLNFHJB.prismaSchemaWasm.get_dmmf(params);
|
81
81
|
return data;
|
82
82
|
},
|
83
83
|
(e) => ({
|
@@ -128,7 +128,7 @@ async function getDMMF(options) {
|
|
128
128
|
return panic;
|
129
129
|
}
|
130
130
|
const errorOutput = e.error.message;
|
131
|
-
return new GetDmmfError((0,
|
131
|
+
return new GetDmmfError((0, import_chunk_MWUHUQI3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
132
132
|
}).with({ type: "parse-json" }, (e) => {
|
133
133
|
debugErrorType(e);
|
134
134
|
return new GetDmmfError({ _tag: "unparsed", message: e.error.message, reason: e.reason });
|
@@ -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_YE7HS3KJ_exports = {};
|
20
|
+
__export(chunk_YE7HS3KJ_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_YE7HS3KJ_exports);
|
28
28
|
var import_chunk_2WR3PY2L = require("./chunk-2WR3PY2L.js");
|
29
|
-
var
|
29
|
+
var import_chunk_C3XVEHBX = require("./chunk-C3XVEHBX.js");
|
30
30
|
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
31
31
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
32
32
|
var import_execa = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_2WR3PY2L.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_C3XVEHBX.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,
|