@prisma/internals 7.10.0-dev.8 → 7.10.0-integration-prisma7-project-closeout.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-BCJ4BEVS.js → chunk-3IMRWXIL.js} +15 -15
- package/dist/{chunk-EBLNHWW6.js → chunk-3VD46SL7.js} +9 -9
- package/dist/{chunk-HRQJYWZ3.js → chunk-4LDJVZN5.js} +5 -5
- package/dist/{chunk-YLAS5D3H.js → chunk-5BDP445D.js} +5 -5
- package/dist/{chunk-GZY7QBBF.js → chunk-5WRIOIZY.js} +5 -5
- package/dist/{chunk-LZ2DP3UC.js → chunk-6QMQ2JYG.js} +7 -7
- package/dist/{chunk-TZJROXB3.js → chunk-6Z766KGR.js} +6 -6
- package/dist/{chunk-3EQHVIK6.js → chunk-AXVIV62N.js} +13 -13
- package/dist/{chunk-GZLJZGHX.js → chunk-DUDEWDFC.js} +7 -7
- package/dist/{chunk-MD47SEWA.js → chunk-EWPXLBGE.js} +14 -14
- package/dist/{chunk-YXCPS3WU.js → chunk-FRVJZOHP.js} +6 -6
- package/dist/{chunk-66U5WOQ2.js → chunk-GTKINBSI.js} +14 -14
- package/dist/{chunk-C77A33H3.js → chunk-GYNBIEMC.js} +8 -8
- package/dist/{chunk-6PILE32P.js → chunk-HJKTMQO4.js} +24 -24
- package/dist/{chunk-L2BUQUNG.js → chunk-HMKNTMVS.js} +5 -5
- package/dist/{chunk-QKQKSUQO.js → chunk-JFXHOFJA.js} +5 -5
- package/dist/{chunk-4YZJJPK2.js → chunk-K7EB6BHT.js} +15 -15
- package/dist/{chunk-3GIVRMID.js → chunk-PKF53VLJ.js} +5 -5
- package/dist/{chunk-YJQQDUGE.js → chunk-QBNYSYZK.js} +5 -5
- package/dist/{chunk-2TQVFH6R.js → chunk-R47SFJ5Z.js} +10 -10
- package/dist/{chunk-NUKBOD54.js → chunk-WFMA7DI5.js} +26 -22
- package/dist/{chunk-ZB2V476P.js → chunk-WIWFAA6Q.js} +10 -10
- package/dist/{chunk-GMZVUPWF.js → chunk-WKGANBVH.js} +24 -24
- package/dist/{chunk-5P4WR3QW.js → chunk-XAAVALN7.js} +13 -13
- package/dist/chunk-YNDZCLVL.js +307 -0
- package/dist/{chunk-PP22IZ7I.js → chunk-YWFKXS5Q.js} +5 -5
- package/dist/{chunk-7IKUTPWQ.js → chunk-YXB6APHS.js} +5 -5
- package/dist/{chunk-44KWOT2X.js → chunk-ZVBYKW53.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.d.ts +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +20 -20
- package/dist/cli/schemaContext.js +21 -21
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +19 -19
- package/dist/engine-commands/getConfig.js +9 -9
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEnginesInfo.js +4 -4
- package/dist/engine-commands/index.js +30 -30
- 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/getGenerators.d.ts +1 -0
- package/dist/get-generators/getGenerators.js +22 -22
- package/dist/index.js +43 -43
- package/dist/sendPanic.js +3 -3
- package/dist/utils/getGitHubIssueUrl.js +4 -4
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +5 -5
- package/dist/utils/missingGeneratorMessage.d.ts +3 -3
- package/dist/utils/missingGeneratorMessage.js +4 -4
- package/dist/utils/validatePrismaConfigWithDatasource.d.ts +2 -2
- package/dist/utils/validatePrismaConfigWithDatasource.js +3 -3
- package/dist/wasm.js +5 -5
- package/package.json +16 -16
- package/dist/chunk-XKZ6CBLA.js +0 -281
|
@@ -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_GYNBIEMC_exports = {};
|
|
20
|
+
__export(chunk_GYNBIEMC_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_GYNBIEMC_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: "7.10.0-
|
|
29
|
+
version: "7.10.0-integration-prisma7-project-closeout.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",
|
|
@@ -62,7 +62,7 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
62
62
|
empathic: "2.0.0",
|
|
63
63
|
"escape-string-regexp": "5.0.0",
|
|
64
64
|
execa: "8.0.1",
|
|
65
|
-
"find-up": "
|
|
65
|
+
"find-up": "8.0.0",
|
|
66
66
|
"fp-ts": "2.16.9",
|
|
67
67
|
"fs-extra": "11.3.0",
|
|
68
68
|
"global-directory": "4.0.0",
|
|
@@ -85,7 +85,7 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
85
85
|
tempy: "1.0.1",
|
|
86
86
|
"terminal-link": "4.0.0",
|
|
87
87
|
tmp: "0.2.3",
|
|
88
|
-
"ts-pattern": "5.
|
|
88
|
+
"ts-pattern": "5.9.0",
|
|
89
89
|
"ts-toolbelt": "9.6.0",
|
|
90
90
|
typescript: "5.4.5",
|
|
91
91
|
yarn: "1.22.22"
|
|
@@ -101,8 +101,8 @@ var require_package = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
101
101
|
"@prisma/generator-helper": "workspace:*",
|
|
102
102
|
"@prisma/get-dmmf": "workspace:*",
|
|
103
103
|
"@prisma/get-platform": "workspace:*",
|
|
104
|
-
"@prisma/prisma-schema-wasm": "7.
|
|
105
|
-
"@prisma/schema-engine-wasm": "7.
|
|
104
|
+
"@prisma/prisma-schema-wasm": "7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3",
|
|
105
|
+
"@prisma/schema-engine-wasm": "7.10.0-4.0edf323efd1d98336f3f0a68684b56f689b900d3",
|
|
106
106
|
"@prisma/schema-files-loader": "workspace:*",
|
|
107
107
|
"@streamparser/json": "0.0.22",
|
|
108
108
|
arg: "5.0.2",
|
|
@@ -26,8 +26,8 @@ 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_HJKTMQO4_exports = {};
|
|
30
|
+
__export(chunk_HJKTMQO4_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
33
33
|
formatSchema: () => formatSchema,
|
|
@@ -40,25 +40,25 @@ __export(chunk_6PILE32P_exports, {
|
|
|
40
40
|
processSchemaResult: () => processSchemaResult,
|
|
41
41
|
skipIndex: () => skipIndex
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(chunk_HJKTMQO4_exports);
|
|
44
44
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
45
45
|
var import_chunk_DZ4QWHTB = require("./chunk-DZ4QWHTB.js");
|
|
46
46
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
47
47
|
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
|
48
48
|
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
49
|
-
var
|
|
49
|
+
var import_chunk_WFMA7DI5 = require("./chunk-WFMA7DI5.js");
|
|
50
50
|
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
51
51
|
var import_chunk_BGMZPA2F = require("./chunk-BGMZPA2F.js");
|
|
52
52
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
53
|
+
var import_chunk_K7EB6BHT = require("./chunk-K7EB6BHT.js");
|
|
54
|
+
var import_chunk_WIWFAA6Q = require("./chunk-WIWFAA6Q.js");
|
|
55
|
+
var import_chunk_HMKNTMVS = require("./chunk-HMKNTMVS.js");
|
|
56
|
+
var import_chunk_AXVIV62N = require("./chunk-AXVIV62N.js");
|
|
57
57
|
var import_chunk_2BXDHSSY = require("./chunk-2BXDHSSY.js");
|
|
58
|
-
var
|
|
58
|
+
var import_chunk_YWFKXS5Q = require("./chunk-YWFKXS5Q.js");
|
|
59
59
|
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
60
60
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
61
|
-
var
|
|
61
|
+
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
62
62
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
63
63
|
var import_chunk_BPDMLM32 = require("./chunk-BPDMLM32.js");
|
|
64
64
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
|
@@ -76,7 +76,7 @@ var debug = (0, import_debug.default)("prisma:format");
|
|
|
76
76
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
77
77
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
78
78
|
handleFormatPanic(() => {
|
|
79
|
-
|
|
79
|
+
import_chunk_YWFKXS5Q.prismaSchemaWasm.debug_panic();
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
const defaultFormattingOptions = {
|
|
@@ -93,10 +93,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
93
93
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
94
94
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
95
95
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
96
|
-
const lintDiagnostics2 = (0,
|
|
96
|
+
const lintDiagnostics2 = (0, import_chunk_HMKNTMVS.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
97
97
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
98
98
|
});
|
|
99
|
-
const lintWarnings = (0,
|
|
99
|
+
const lintWarnings = (0, import_chunk_HMKNTMVS.getLintWarningsAsText)(lintDiagnostics);
|
|
100
100
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
101
101
|
console.warn(lintWarnings);
|
|
102
102
|
}
|
|
@@ -123,7 +123,7 @@ function handleFormatPanic(tryCb) {
|
|
|
123
123
|
}
|
|
124
124
|
}
|
|
125
125
|
function formatWasm(schema, documentFormattingParams) {
|
|
126
|
-
const formattedSchema =
|
|
126
|
+
const formattedSchema = import_chunk_YWFKXS5Q.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
127
127
|
return formattedSchema;
|
|
128
128
|
}
|
|
129
129
|
async function loadSchemaContext({ schemaPath, printLoadMessage, allowNull, schemaPathArgumentName, cwd } = {
|
|
@@ -152,7 +152,7 @@ async function processSchemaResult({
|
|
|
152
152
|
if (printLoadMessage) {
|
|
153
153
|
(0, import_chunk_2BXDHSSY.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
154
154
|
}
|
|
155
|
-
const configFromPsl = await (0,
|
|
155
|
+
const configFromPsl = await (0, import_chunk_K7EB6BHT.getConfig)({ datamodel: schemaResult.schemas });
|
|
156
156
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
|
157
157
|
return {
|
|
158
158
|
schemaFiles: schemaResult.schemas,
|
|
@@ -206,12 +206,12 @@ async function getGenerators(options) {
|
|
|
206
206
|
throw new Error(import_chunk_BGMZPA2F.missingDatasource);
|
|
207
207
|
}
|
|
208
208
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
209
|
-
const dmmf = await (0,
|
|
209
|
+
const dmmf = await (0, import_chunk_WIWFAA6Q.getDMMF)({ datamodel: schemaContext.schemaFiles });
|
|
210
210
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
211
211
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
|
212
|
-
throw new Error(
|
|
212
|
+
throw new Error((0, import_chunk_WFMA7DI5.missingModelMessageMongoDB)(options.cliCommand));
|
|
213
213
|
}
|
|
214
|
-
throw new Error(
|
|
214
|
+
throw new Error((0, import_chunk_WFMA7DI5.missingModelMessage)(options.cliCommand));
|
|
215
215
|
}
|
|
216
216
|
const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
|
|
217
217
|
await validateGenerators(generatorConfigs);
|
|
@@ -226,7 +226,7 @@ async function getGenerators(options) {
|
|
|
226
226
|
type: "rpc",
|
|
227
227
|
generatorPath: providerValue
|
|
228
228
|
};
|
|
229
|
-
const generatorInstance = (0,
|
|
229
|
+
const generatorInstance = (0, import_chunk_YNDZCLVL.M)(generatorDefinition).with({ type: "in-process" }, ({ generator }) => new import_chunk_BPDMLM32.InProcessGenerator(generatorConfig, generator)).with(
|
|
230
230
|
{ type: "rpc" },
|
|
231
231
|
({ generatorPath, isNode }) => new import_chunk_BPDMLM32.JsonRpcGenerator(generatorPath, generatorConfig, isNode)
|
|
232
232
|
).exhaustive();
|
|
@@ -254,7 +254,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
254
254
|
fromEnvVar: null
|
|
255
255
|
};
|
|
256
256
|
}
|
|
257
|
-
const datamodel = (0,
|
|
257
|
+
const datamodel = (0, import_chunk_AXVIV62N.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
258
258
|
const options2 = {
|
|
259
259
|
datamodel,
|
|
260
260
|
datasources: schemaContext.datasources,
|
|
@@ -422,17 +422,17 @@ function filterGenerators(generators, generatorNames) {
|
|
|
422
422
|
}
|
|
423
423
|
return filtered;
|
|
424
424
|
}
|
|
425
|
-
var forbiddenCmdWithDataProxyFlagMessage = (
|
|
426
|
-
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(
|
|
425
|
+
var forbiddenCmdWithDataProxyFlagMessage = (command) => `
|
|
426
|
+
Using an Accelerate URL is not supported for this CLI command ${(0, import_chunk_PG5FDKSF.green)(command)} yet.
|
|
427
427
|
Please use a direct connection to your database in \`prisma.config.ts\`.
|
|
428
428
|
|
|
429
429
|
More information about this limitation: ${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/accelerate-limitations")}
|
|
430
430
|
`;
|
|
431
431
|
function checkUnsupportedDataProxy({
|
|
432
|
-
|
|
432
|
+
command,
|
|
433
433
|
validatedConfig
|
|
434
434
|
}) {
|
|
435
435
|
if (validatedConfig.datasource.url.startsWith("prisma://")) {
|
|
436
|
-
throw new Error(forbiddenCmdWithDataProxyFlagMessage(
|
|
436
|
+
throw new Error(forbiddenCmdWithDataProxyFlagMessage(command));
|
|
437
437
|
}
|
|
438
438
|
}
|
|
@@ -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_HMKNTMVS_exports = {};
|
|
20
|
+
__export(chunk_HMKNTMVS_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_HMKNTMVS_exports);
|
|
28
|
+
var import_chunk_YWFKXS5Q = require("./chunk-YWFKXS5Q.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_YWFKXS5Q.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -16,12 +16,12 @@ 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_JFXHOFJA_exports = {};
|
|
20
|
+
__export(chunk_JFXHOFJA_exports, {
|
|
21
21
|
ConfigValidationError: () => ConfigValidationError,
|
|
22
22
|
validatePrismaConfigWithDatasource: () => validatePrismaConfigWithDatasource
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_JFXHOFJA_exports);
|
|
25
25
|
var import_chunk_ANU3HEGF = require("./chunk-ANU3HEGF.js");
|
|
26
26
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
27
27
|
var ConfigValidationError = class extends Error {
|
|
@@ -35,11 +35,11 @@ function isValidPrismaConfig(prismaConfig) {
|
|
|
35
35
|
}
|
|
36
36
|
function validatePrismaConfigWithDatasource({
|
|
37
37
|
config,
|
|
38
|
-
|
|
38
|
+
command
|
|
39
39
|
}) {
|
|
40
40
|
if (!isValidPrismaConfig(config)) {
|
|
41
41
|
throw new ConfigValidationError(
|
|
42
|
-
`The ${(0, import_chunk_PG5FDKSF.red)(`datasource.url`)} property is required in your Prisma config file when using ${(0, import_chunk_PG5FDKSF.green)(
|
|
42
|
+
`The ${(0, import_chunk_PG5FDKSF.red)(`datasource.url`)} property is required in your Prisma config file when using ${(0, import_chunk_PG5FDKSF.green)(command)}.`
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
45
|
return config;
|
|
@@ -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_K7EB6BHT_exports = {};
|
|
30
|
+
__export(chunk_K7EB6BHT_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_K7EB6BHT_exports);
|
|
35
|
+
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.js");
|
|
36
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_ZVBYKW53 = require("./chunk-ZVBYKW53.js");
|
|
39
|
+
var import_chunk_YWFKXS5Q = require("./chunk-YWFKXS5Q.js");
|
|
40
40
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
42
42
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
44
44
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
@@ -49,7 +49,7 @@ var debug = (0, import_debug.default)("prisma:getConfig");
|
|
|
49
49
|
var SCHEMA_VALIDATION_ERROR_CODE = "P1012";
|
|
50
50
|
var GetConfigError = class extends Error {
|
|
51
51
|
constructor(params) {
|
|
52
|
-
const constructedErrorMessage = (0,
|
|
52
|
+
const constructedErrorMessage = (0, import_chunk_YNDZCLVL.M)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
53
53
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
54
54
|
return `${reason}
|
|
55
55
|
${errorCodeMessage}
|
|
@@ -61,22 +61,22 @@ ${detailsHeader} ${message}`;
|
|
|
61
61
|
}).exhaustive();
|
|
62
62
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
63
63
|
[Context: getConfig]`;
|
|
64
|
-
super((0,
|
|
64
|
+
super((0, import_chunk_ZVBYKW53.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
65
65
|
this.name = "GetConfigError";
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
async function getConfig(options) {
|
|
69
|
-
const debugErrorType = (0,
|
|
69
|
+
const debugErrorType = (0, import_chunk_6Z766KGR.createDebugErrorType)(debug, "getConfigWasm");
|
|
70
70
|
debug(`Using getConfig Wasm`);
|
|
71
71
|
const configEither = (0, import_function.pipe)(
|
|
72
72
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
73
73
|
() => {
|
|
74
74
|
if (process.env.FORCE_PANIC_GET_CONFIG) {
|
|
75
75
|
debug("Triggering a Rust panic...");
|
|
76
|
-
|
|
76
|
+
import_chunk_YWFKXS5Q.prismaSchemaWasm.debug_panic();
|
|
77
77
|
}
|
|
78
78
|
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
-
return
|
|
79
|
+
return import_chunk_YWFKXS5Q.prismaSchemaWasm.get_config(params);
|
|
80
80
|
},
|
|
81
81
|
(e) => ({
|
|
82
82
|
type: "wasm-error",
|
|
@@ -117,7 +117,7 @@ async function getConfig(options) {
|
|
|
117
117
|
}
|
|
118
118
|
return Promise.resolve(data);
|
|
119
119
|
}
|
|
120
|
-
const error = (0,
|
|
120
|
+
const error = (0, import_chunk_YNDZCLVL.M)(configEither.left).with({ type: "wasm-error" }, (e) => {
|
|
121
121
|
debugErrorType(e);
|
|
122
122
|
if ((0, import_chunk_LMVSIVKQ.isWasmPanic)(e.error)) {
|
|
123
123
|
const { message, stack } = (0, import_chunk_LMVSIVKQ.getWasmError)(e.error);
|
|
@@ -134,12 +134,12 @@ async function getConfig(options) {
|
|
|
134
134
|
return panic;
|
|
135
135
|
}
|
|
136
136
|
const errorOutput = e.error.message;
|
|
137
|
-
return new GetConfigError((0,
|
|
137
|
+
return new GetConfigError((0, import_chunk_6Z766KGR.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
138
138
|
}).with({ type: "validation-error" }, (e) => {
|
|
139
139
|
return new GetConfigError({
|
|
140
140
|
_tag: "parsed",
|
|
141
141
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
|
142
|
-
reason: (0,
|
|
142
|
+
reason: (0, import_chunk_6Z766KGR.createSchemaValidationError)(e.reason),
|
|
143
143
|
message: formatErrors(e.error)
|
|
144
144
|
});
|
|
145
145
|
}).otherwise((e) => {
|
|
@@ -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_PKF53VLJ_exports = {};
|
|
20
|
+
__export(chunk_PKF53VLJ_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_PKF53VLJ_exports);
|
|
24
|
+
var import_chunk_6QMQ2JYG = require("./chunk-6QMQ2JYG.js");
|
|
25
|
+
var packageJson = (0, import_chunk_6QMQ2JYG.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -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_QBNYSYZK_exports = {};
|
|
20
|
+
__export(chunk_QBNYSYZK_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_QBNYSYZK_exports);
|
|
28
|
+
var import_chunk_5BDP445D = require("./chunk-5BDP445D.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_5BDP445D.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -26,28 +26,28 @@ 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_R47SFJ5Z_exports = {};
|
|
30
|
+
__export(chunk_R47SFJ5Z_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
externalToInternalDmmf: () => import_get_dmmf2.externalToInternalDmmf,
|
|
33
33
|
getDMMF: () => getDMMF,
|
|
34
34
|
getInternalDMMF: () => getInternalDMMF
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(chunk_R47SFJ5Z_exports);
|
|
37
37
|
var import_chunk_IL7PSY44 = require("./chunk-IL7PSY44.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
38
|
+
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.js");
|
|
39
|
+
var import_chunk_5WRIOIZY = require("./chunk-5WRIOIZY.js");
|
|
40
|
+
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
42
42
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
43
43
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
44
44
|
var import_get_dmmf = require("@prisma/get-dmmf");
|
|
45
45
|
var import_get_dmmf2 = require("@prisma/get-dmmf");
|
|
46
46
|
var debug = (0, import_debug.default)("prisma:getDMMF");
|
|
47
|
-
var debugErrorType = (0,
|
|
47
|
+
var debugErrorType = (0, import_chunk_6Z766KGR.createDebugErrorType)(debug, "getDmmfWasm");
|
|
48
48
|
var GetDmmfError = class extends Error {
|
|
49
49
|
constructor(params) {
|
|
50
|
-
const constructedErrorMessage = (0,
|
|
50
|
+
const constructedErrorMessage = (0, import_chunk_YNDZCLVL.M)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
51
51
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
52
52
|
return `${reason}
|
|
53
53
|
${errorCodeMessage}
|
|
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: getDmmf]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_5WRIOIZY.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "GetDmmfError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -100,5 +100,5 @@ function mapWasmPanicToGetDmmfError(error, reason) {
|
|
|
100
100
|
return panic;
|
|
101
101
|
}
|
|
102
102
|
const errorOutput = error.message;
|
|
103
|
-
return new GetDmmfError((0,
|
|
103
|
+
return new GetDmmfError((0, import_chunk_6Z766KGR.parseQueryEngineError)({ errorOutput, reason }));
|
|
104
104
|
}
|
|
@@ -16,73 +16,77 @@ 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_WFMA7DI5_exports = {};
|
|
20
|
+
__export(chunk_WFMA7DI5_exports, {
|
|
21
21
|
missingGeneratorMessage: () => missingGeneratorMessage,
|
|
22
22
|
missingModelMessage: () => missingModelMessage,
|
|
23
23
|
missingModelMessageMongoDB: () => missingModelMessageMongoDB
|
|
24
24
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(chunk_WFMA7DI5_exports);
|
|
26
26
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
27
27
|
var import_chunk_VNIE2AZB = require("./chunk-VNIE2AZB.js");
|
|
28
28
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
29
|
-
|
|
29
|
+
function missingGeneratorMessage(cliCommand) {
|
|
30
|
+
return `
|
|
30
31
|
${(0, import_chunk_PG5FDKSF.blue)("info")} You don't have any generators defined in your ${(0, import_chunk_PG5FDKSF.bold)(
|
|
31
|
-
|
|
32
|
-
)}, so nothing will be generated.
|
|
32
|
+
"schema.prisma"
|
|
33
|
+
)}, so nothing will be generated.
|
|
33
34
|
Add the Prisma Client generator like this:
|
|
34
35
|
|
|
35
36
|
${(0, import_chunk_PG5FDKSF.bold)(
|
|
36
|
-
|
|
37
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`generator client {
|
|
37
38
|
provider = "prisma-client"
|
|
38
39
|
output = "../src/generated/prisma"
|
|
39
40
|
}`)
|
|
40
|
-
)}
|
|
41
|
+
)}
|
|
42
|
+
|
|
43
|
+
Then run ${(0, import_chunk_PG5FDKSF.dim)("$")} ${cliCommand} generate.
|
|
41
44
|
|
|
42
45
|
More information in our documentation:
|
|
43
46
|
${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
|
|
44
47
|
`;
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
)}, so nothing will be generated.
|
|
48
|
+
}
|
|
49
|
+
function missingModelMessage(cliCommand) {
|
|
50
|
+
return `
|
|
51
|
+
You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your ${(0, import_chunk_PG5FDKSF.bold)("schema.prisma")}, so nothing will be generated.
|
|
49
52
|
|
|
50
53
|
Prisma Client is typically generated from models defined in your schema. If you plan to use raw SQL queries only (e.g. ${(0, import_chunk_PG5FDKSF.bold)("$queryRaw")}), remove the ${(0, import_chunk_PG5FDKSF.bold)("--require-models")} flag to generate the client without models:
|
|
51
54
|
|
|
52
|
-
${(0, import_chunk_PG5FDKSF.dim)("$")}
|
|
55
|
+
${(0, import_chunk_PG5FDKSF.dim)("$")} ${cliCommand} generate
|
|
53
56
|
|
|
54
57
|
Otherwise, you can define a model like this:
|
|
55
58
|
|
|
56
59
|
${(0, import_chunk_PG5FDKSF.bold)(
|
|
57
|
-
|
|
60
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`model User {
|
|
58
61
|
id Int @id @default(autoincrement())
|
|
59
62
|
email String @unique
|
|
60
63
|
name String?
|
|
61
64
|
}`)
|
|
62
|
-
)}
|
|
65
|
+
)}
|
|
63
66
|
|
|
64
67
|
More information in our documentation:
|
|
65
68
|
${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
|
|
66
69
|
`;
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
)}, so nothing will be generated.
|
|
70
|
+
}
|
|
71
|
+
function missingModelMessageMongoDB(cliCommand) {
|
|
72
|
+
return `
|
|
73
|
+
You don't have any ${(0, import_chunk_PG5FDKSF.bold)("models")} defined in your ${(0, import_chunk_PG5FDKSF.bold)("schema.prisma")}, so nothing will be generated.
|
|
71
74
|
|
|
72
75
|
Prisma Client is typically generated from models defined in your schema. If you plan to use raw queries only, remove the ${(0, import_chunk_PG5FDKSF.bold)("--require-models")} flag to generate the client without models:
|
|
73
76
|
|
|
74
|
-
${(0, import_chunk_PG5FDKSF.dim)("$")}
|
|
77
|
+
${(0, import_chunk_PG5FDKSF.dim)("$")} ${cliCommand} generate
|
|
75
78
|
|
|
76
79
|
Otherwise, you can define a model like this:
|
|
77
80
|
|
|
78
81
|
${(0, import_chunk_PG5FDKSF.bold)(
|
|
79
|
-
|
|
82
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`model User {
|
|
80
83
|
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
81
84
|
email String @unique
|
|
82
85
|
name String?
|
|
83
86
|
}`)
|
|
84
|
-
)}
|
|
87
|
+
)}
|
|
85
88
|
|
|
86
89
|
More information in our documentation:
|
|
87
90
|
${(0, import_chunk_I6WLABB2.link)("https://pris.ly/d/prisma-schema")}
|
|
88
91
|
`;
|
|
92
|
+
}
|
|
@@ -26,28 +26,28 @@ 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_WIWFAA6Q_exports = {};
|
|
30
|
+
__export(chunk_WIWFAA6Q_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
externalToInternalDmmf: () => import_get_dmmf2.externalToInternalDmmf,
|
|
33
33
|
getDMMF: () => getDMMF,
|
|
34
34
|
getInternalDMMF: () => getInternalDMMF
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(chunk_WIWFAA6Q_exports);
|
|
37
37
|
var import_chunk_IL7PSY44 = require("./chunk-IL7PSY44.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
38
|
+
var import_chunk_6Z766KGR = require("./chunk-6Z766KGR.js");
|
|
39
|
+
var import_chunk_ZVBYKW53 = require("./chunk-ZVBYKW53.js");
|
|
40
|
+
var import_chunk_YNDZCLVL = require("./chunk-YNDZCLVL.js");
|
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
42
42
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
43
43
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
44
44
|
var import_get_dmmf = require("@prisma/get-dmmf");
|
|
45
45
|
var import_get_dmmf2 = require("@prisma/get-dmmf");
|
|
46
46
|
var debug = (0, import_debug.default)("prisma:getDMMF");
|
|
47
|
-
var debugErrorType = (0,
|
|
47
|
+
var debugErrorType = (0, import_chunk_6Z766KGR.createDebugErrorType)(debug, "getDmmfWasm");
|
|
48
48
|
var GetDmmfError = class extends Error {
|
|
49
49
|
constructor(params) {
|
|
50
|
-
const constructedErrorMessage = (0,
|
|
50
|
+
const constructedErrorMessage = (0, import_chunk_YNDZCLVL.M)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
|
|
51
51
|
const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
|
|
52
52
|
return `${reason}
|
|
53
53
|
${errorCodeMessage}
|
|
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: getDmmf]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_ZVBYKW53.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "GetDmmfError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -100,5 +100,5 @@ function mapWasmPanicToGetDmmfError(error, reason) {
|
|
|
100
100
|
return panic;
|
|
101
101
|
}
|
|
102
102
|
const errorOutput = error.message;
|
|
103
|
-
return new GetDmmfError((0,
|
|
103
|
+
return new GetDmmfError((0, import_chunk_6Z766KGR.parseQueryEngineError)({ errorOutput, reason }));
|
|
104
104
|
}
|