@prisma/internals 7.7.0-dev.3 → 7.7.0-dev.5
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-IN7DJEWK.js → chunk-3Y5ZLWOH.js} +7 -7
- package/dist/{chunk-Q75TMXCR.js → chunk-6I5EQPM7.js} +5 -5
- package/dist/{chunk-ZI7BX3VK.js → chunk-DVMCRKSY.js} +7 -7
- package/dist/{chunk-PKOQQT7I.js → chunk-DZ4QWHTB.js} +5 -5
- package/dist/{chunk-IDINCQMN.js → chunk-E476ARWS.js} +6 -7
- package/dist/{chunk-H5RJM5KP.js → chunk-EZT2M4Z7.js} +5 -5
- package/dist/{chunk-OBFJDH7C.js → chunk-HUKX6SK2.js} +8 -8
- package/dist/{chunk-VPHYIISP.js → chunk-JK5WQKJF.js} +5 -5
- package/dist/{chunk-YV4IFLW4.js → chunk-JPZYSRK3.js} +262 -15
- package/dist/{chunk-5BRXEOYH.js → chunk-K2EOOA2X.js} +5 -5
- package/dist/{chunk-2GPDFPDR.js → chunk-KARIQA23.js} +7 -7
- package/dist/{chunk-2HPKSKDE.js → chunk-NFSRS3ET.js} +5 -5
- package/dist/{chunk-BXIKQUP5.js → chunk-PTPRBA7K.js} +289 -93
- package/dist/{chunk-57ZFKPEC.js → chunk-Q53Z2MAO.js} +8 -8
- package/dist/{chunk-Q5XW7CMJ.js → chunk-QVJ2BXKF.js} +9 -9
- package/dist/{chunk-YJVCIN4F.js → chunk-T3R75LJS.js} +5 -5
- package/dist/{chunk-M32TYUAI.js → chunk-TBOIOJW5.js} +5 -5
- package/dist/{chunk-XV2QLA4M.js → chunk-TBTQBU6S.js} +19 -19
- package/dist/{chunk-ELUS2FGF.js → chunk-UOIOPEYB.js} +4 -4
- package/dist/{chunk-3TFDMTMW.js → chunk-VFNP7Q3Y.js} +481 -466
- package/dist/{chunk-DQWKFZPY.js → chunk-WMYLXKKD.js} +5 -5
- package/dist/{chunk-UINW4OZY.js → chunk-WRATAHFA.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.js +22 -22
- package/dist/cli/schemaContext.js +23 -23
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +21 -21
- package/dist/engine-commands/getConfig.js +7 -7
- package/dist/engine-commands/getDmmf.js +8 -8
- package/dist/engine-commands/getEngineVersion.js +5 -5
- package/dist/engine-commands/getEnginesInfo.js +6 -6
- package/dist/engine-commands/index.js +33 -33
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/get-generators/getGenerators.js +24 -24
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -3
- package/dist/getPackedPackage.js +3 -3
- package/dist/index.js +52 -52
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/utils/__tests__/isCi.test.js +16 -16
- package/dist/utils/__tests__/isInteractive.test.js +14 -14
- package/dist/utils/callOnce.test.js +17 -17
- package/dist/utils/fs-functional.js +10 -10
- package/dist/utils/fs-utils.js +8 -8
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/max.test.js +11 -11
- package/dist/utils/path.test.js +30 -30
- package/dist/utils/prismaPostgres.test.js +23 -23
- package/dist/wasm.js +5 -5
- package/package.json +12 -12
|
@@ -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_TBTQBU6S_exports = {};
|
|
30
|
+
__export(chunk_TBTQBU6S_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
33
33
|
formatSchema: () => formatSchema,
|
|
@@ -40,9 +40,9 @@ __export(chunk_XV2QLA4M_exports, {
|
|
|
40
40
|
processSchemaResult: () => processSchemaResult,
|
|
41
41
|
skipIndex: () => skipIndex
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(chunk_TBTQBU6S_exports);
|
|
44
44
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
45
|
-
var
|
|
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_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
@@ -50,11 +50,11 @@ var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
|
50
50
|
var import_chunk_DXWYZA7B = require("./chunk-DXWYZA7B.js");
|
|
51
51
|
var import_chunk_DRWHCM7T = require("./chunk-DRWHCM7T.js");
|
|
52
52
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
53
|
+
var import_chunk_EZT2M4Z7 = require("./chunk-EZT2M4Z7.js");
|
|
54
|
+
var import_chunk_JK5WQKJF = require("./chunk-JK5WQKJF.js");
|
|
55
|
+
var import_chunk_3Y5ZLWOH = require("./chunk-3Y5ZLWOH.js");
|
|
56
|
+
var import_chunk_Q53Z2MAO = require("./chunk-Q53Z2MAO.js");
|
|
57
|
+
var import_chunk_NFSRS3ET = require("./chunk-NFSRS3ET.js");
|
|
58
58
|
var import_chunk_2BXDHSSY = require("./chunk-2BXDHSSY.js");
|
|
59
59
|
var import_chunk_ZJWZK45Z = require("./chunk-ZJWZK45Z.js");
|
|
60
60
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
@@ -63,7 +63,7 @@ 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");
|
|
65
65
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
66
|
-
var
|
|
66
|
+
var import_chunk_PTPRBA7K = require("./chunk-PTPRBA7K.js");
|
|
67
67
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
68
68
|
var import_node_path = __toESM(require("node:path"));
|
|
69
69
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
@@ -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_NFSRS3ET.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_JK5WQKJF.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
97
97
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
98
98
|
});
|
|
99
|
-
const lintWarnings = (0,
|
|
99
|
+
const lintWarnings = (0, import_chunk_JK5WQKJF.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_NFSRS3ET.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_Q53Z2MAO.getConfig)({ datamodel: schemaResult.schemas });
|
|
156
156
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
|
157
157
|
return {
|
|
158
158
|
schemaFiles: schemaResult.schemas,
|
|
@@ -171,7 +171,7 @@ function getSchemaDatasourceProvider(schemaContext) {
|
|
|
171
171
|
}
|
|
172
172
|
return schemaContext.primaryDatasource.activeProvider;
|
|
173
173
|
}
|
|
174
|
-
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0,
|
|
174
|
+
var import_p_map = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_PTPRBA7K.require_p_map)());
|
|
175
175
|
var debug2 = (0, import_debug2.default)("prisma:getGenerators");
|
|
176
176
|
async function getGenerators(options) {
|
|
177
177
|
if (options.registry === void 0 && options.providerAliases !== void 0) {
|
|
@@ -206,7 +206,7 @@ async function getGenerators(options) {
|
|
|
206
206
|
throw new Error(import_chunk_DXWYZA7B.missingDatasource);
|
|
207
207
|
}
|
|
208
208
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
209
|
-
const dmmf = await (0,
|
|
209
|
+
const dmmf = await (0, import_chunk_EZT2M4Z7.getDMMF)({ datamodel: schemaContext.schemaFiles });
|
|
210
210
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
211
211
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
|
212
212
|
throw new Error(import_chunk_DRWHCM7T.missingModelMessageMongoDB);
|
|
@@ -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_3Y5ZLWOH.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
258
258
|
const options2 = {
|
|
259
259
|
datamodel,
|
|
260
260
|
datasources: schemaContext.datasources,
|
|
@@ -318,7 +318,7 @@ generator gen {
|
|
|
318
318
|
}
|
|
319
319
|
}
|
|
320
320
|
debug2("neededVersions", JSON.stringify(neededVersions, null, 2));
|
|
321
|
-
const { binaryPathsByVersion } = await (0,
|
|
321
|
+
const { binaryPathsByVersion } = await (0, import_chunk_DZ4QWHTB.getBinaryPathsByVersion)({
|
|
322
322
|
neededVersions,
|
|
323
323
|
// We're lazily computing the binary target here, to avoid printing the
|
|
324
324
|
// `Prisma failed to detect the libssl/openssl version to use` warning
|
|
@@ -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_UOIOPEYB_exports = {};
|
|
20
|
+
__export(chunk_UOIOPEYB_exports, {
|
|
21
21
|
require_package: () => require_package
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_UOIOPEYB_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.7.0-dev.
|
|
29
|
+
version: "7.7.0-dev.5",
|
|
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",
|