@prisma/internals 7.1.0-integration-fix-fix-missing-cockroach-wasm.2 → 7.1.1-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-V6DWK6TN.js → chunk-2GPDFPDR.js} +7 -7
- package/dist/{chunk-JHI5AFLO.js → chunk-2NSZUVML.js} +33 -40
- package/dist/{chunk-LYFOJ5NK.js → chunk-3U4QB2G3.js} +4 -6
- package/dist/{chunk-OKVM3CW4.js → chunk-42R3EIRM.js} +55 -31
- package/dist/{chunk-SYIAPRBK.js → chunk-45266XOU.js} +5 -5
- package/dist/{chunk-MWQ2Y7KM.js → chunk-5DHFYH6V.js} +7 -7
- package/dist/{chunk-HPNH7TNS.js → chunk-7K7RIULS.js} +8 -8
- package/dist/{chunk-K4IC7NPI.js → chunk-CQVWHHIJ.js} +7 -7
- package/dist/{chunk-EHC4ODP6.js → chunk-DCI7IFH4.js} +6 -6
- package/dist/{chunk-QXSCGG3B.js → chunk-DJDBBPWI.js} +5 -5
- package/dist/{chunk-FASYSGWP.js → chunk-DQWKFZPY.js} +4 -4
- package/dist/{chunk-BGMZPA2F.js → chunk-DXWYZA7B.js} +5 -5
- package/dist/{chunk-6QBIOHAP.js → chunk-EA7NPUXZ.js} +5 -5
- package/dist/{chunk-A2USANLU.js → chunk-IOUBRMAS.js} +33 -40
- package/dist/{chunk-UOKMD4DT.js → chunk-KQARZ6Q2.js} +5 -5
- package/dist/{chunk-MNP6VO5F.js → chunk-Q75TMXCR.js} +5 -5
- package/dist/{chunk-BNU7VLWS.js → chunk-QKCH5L2O.js} +5 -5
- package/dist/{chunk-D3USTTQA.js → chunk-SBIVIXEF.js} +8 -8
- package/dist/{chunk-67VG7D7O.js → chunk-TAXSI6L6.js} +5 -5
- package/dist/{chunk-GL7OANR6.js → chunk-TCDF53CN.js} +6 -6
- package/dist/{chunk-VNIE2AZB.js → chunk-TQCLUNM2.js} +4 -4
- package/dist/{chunk-BENPILNZ.js → chunk-TVTVO7BZ.js} +8 -8
- package/dist/{chunk-F337MPOC.js → chunk-VLNU66QF.js} +5 -5
- package/dist/{chunk-V7KWPZT2.js → chunk-VTJBF462.js} +8 -8
- package/dist/{chunk-RNNI23IA.js → chunk-VX75P7BL.js} +8 -8
- package/dist/{chunk-OJNWNV3P.js → chunk-WFSL5MRY.js} +5 -5
- package/dist/{chunk-N4D5LHSX.js → chunk-WKN2CXST.js} +7 -7
- package/dist/{chunk-Y4HP7ICO.js → chunk-X4HAZCOA.js} +8 -8
- package/dist/{chunk-S26FTO4G.js → chunk-XCPAWJOU.js} +5 -5
- package/dist/{chunk-TRAG7WPX.js → chunk-YJVCIN4F.js} +6 -8
- package/dist/cli/checkUnsupportedDataProxy.js +28 -29
- package/dist/cli/getSchema.d.ts +27 -5
- package/dist/cli/getSchema.js +7 -4
- package/dist/cli/hashes.d.ts +2 -1
- package/dist/cli/hashes.js +4 -4
- package/dist/cli/schemaContext.d.ts +2 -2
- package/dist/cli/schemaContext.js +29 -30
- package/dist/cli/types.d.ts +1 -1
- package/dist/convertCredentials.js +4 -4
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +27 -28
- package/dist/engine-commands/getConfig.js +7 -7
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/getEngineVersion.js +5 -5
- package/dist/engine-commands/getEnginesInfo.js +6 -6
- package/dist/engine-commands/index.js +37 -38
- 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 +30 -31
- package/dist/highlight/highlight.js +5 -5
- package/dist/index.d.ts +1 -2
- package/dist/index.js +66 -66
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/missingDatasource.js +4 -4
- package/dist/utils/missingGeneratorMessage.js +6 -6
- package/dist/wasm.js +5 -5
- package/package.json +13 -13
- package/dist/chunk-HW5RCZSE.js +0 -1
- package/dist/tracing/types.d.ts +0 -54
- package/dist/tracing/types.js +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_EA7NPUXZ_exports = {};
|
|
20
|
+
__export(chunk_EA7NPUXZ_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_EA7NPUXZ_exports);
|
|
28
|
+
var import_chunk_TAXSI6L6 = require("./chunk-TAXSI6L6.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_TAXSI6L6.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -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_IOUBRMAS_exports = {};
|
|
30
|
+
__export(chunk_IOUBRMAS_exports, {
|
|
31
31
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
32
32
|
forbiddenCmdWithDataProxyFlagMessage: () => forbiddenCmdWithDataProxyFlagMessage,
|
|
33
33
|
formatSchema: () => formatSchema,
|
|
@@ -40,23 +40,23 @@ __export(chunk_A2USANLU_exports, {
|
|
|
40
40
|
processSchemaResult: () => processSchemaResult,
|
|
41
41
|
skipIndex: () => skipIndex
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(chunk_IOUBRMAS_exports);
|
|
44
44
|
var import_chunk_X77CS5RK = require("./chunk-X77CS5RK.js");
|
|
45
45
|
var import_chunk_PKOQQT7I = require("./chunk-PKOQQT7I.js");
|
|
46
46
|
var import_chunk_X3P4J7WW = require("./chunk-X3P4J7WW.js");
|
|
47
47
|
var import_chunk_LRU47BGE = require("./chunk-LRU47BGE.js");
|
|
48
|
-
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
49
|
-
var import_chunk_K4IC7NPI = require("./chunk-K4IC7NPI.js");
|
|
50
48
|
var import_chunk_GXW4NTU2 = require("./chunk-GXW4NTU2.js");
|
|
51
|
-
var
|
|
49
|
+
var import_chunk_5FJ3MENK = require("./chunk-5FJ3MENK.js");
|
|
50
|
+
var import_chunk_DXWYZA7B = require("./chunk-DXWYZA7B.js");
|
|
51
|
+
var import_chunk_CQVWHHIJ = require("./chunk-CQVWHHIJ.js");
|
|
52
52
|
var import_chunk_I6WLABB2 = require("./chunk-I6WLABB2.js");
|
|
53
53
|
var import_chunk_CRVLHWC5 = require("./chunk-CRVLHWC5.js");
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
57
|
-
var
|
|
58
|
-
var
|
|
59
|
-
var
|
|
54
|
+
var import_chunk_EA7NPUXZ = require("./chunk-EA7NPUXZ.js");
|
|
55
|
+
var import_chunk_WKN2CXST = require("./chunk-WKN2CXST.js");
|
|
56
|
+
var import_chunk_X4HAZCOA = require("./chunk-X4HAZCOA.js");
|
|
57
|
+
var import_chunk_7K7RIULS = require("./chunk-7K7RIULS.js");
|
|
58
|
+
var import_chunk_TAXSI6L6 = require("./chunk-TAXSI6L6.js");
|
|
59
|
+
var import_chunk_42R3EIRM = require("./chunk-42R3EIRM.js");
|
|
60
60
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
61
61
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
62
62
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -77,7 +77,7 @@ var debug = (0, import_debug.default)("prisma:format");
|
|
|
77
77
|
async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
78
78
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
79
79
|
handleFormatPanic(() => {
|
|
80
|
-
|
|
80
|
+
import_chunk_TAXSI6L6.prismaSchemaWasm.debug_panic();
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
const defaultFormattingOptions = {
|
|
@@ -94,10 +94,10 @@ async function formatSchema({ schemas }, inputFormattingOptions) {
|
|
|
94
94
|
const { formattedMultipleSchemas, lintDiagnostics } = handleFormatPanic(() => {
|
|
95
95
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas), documentFormattingParams);
|
|
96
96
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
97
|
-
const lintDiagnostics2 = (0,
|
|
97
|
+
const lintDiagnostics2 = (0, import_chunk_EA7NPUXZ.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
98
98
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
99
99
|
});
|
|
100
|
-
const lintWarnings = (0,
|
|
100
|
+
const lintWarnings = (0, import_chunk_EA7NPUXZ.getLintWarningsAsText)(lintDiagnostics);
|
|
101
101
|
if (lintWarnings && import_chunk_ZJWZK45Z.logger_exports.should.warn()) {
|
|
102
102
|
console.warn(lintWarnings);
|
|
103
103
|
}
|
|
@@ -124,29 +124,22 @@ function handleFormatPanic(tryCb) {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
function formatWasm(schema, documentFormattingParams) {
|
|
127
|
-
const formattedSchema =
|
|
127
|
+
const formattedSchema = import_chunk_TAXSI6L6.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
128
128
|
return formattedSchema;
|
|
129
129
|
}
|
|
130
|
-
async function loadSchemaContext({
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
} = {}) {
|
|
130
|
+
async function loadSchemaContext({ schemaPath, printLoadMessage, allowNull, schemaPathArgumentName, cwd } = {
|
|
131
|
+
schemaPath: { baseDir: process.cwd() },
|
|
132
|
+
printLoadMessage: true,
|
|
133
|
+
allowNull: false,
|
|
134
|
+
schemaPathArgumentName: "--schema",
|
|
135
|
+
cwd: process.cwd()
|
|
136
|
+
}) {
|
|
138
137
|
let schemaResult = null;
|
|
139
138
|
if (allowNull) {
|
|
140
|
-
schemaResult = await (0,
|
|
141
|
-
argumentName: schemaPathArgumentName,
|
|
142
|
-
cwd
|
|
143
|
-
});
|
|
139
|
+
schemaResult = await (0, import_chunk_42R3EIRM.getSchemaWithPathOptional)({ schemaPath, cwd, argumentName: schemaPathArgumentName });
|
|
144
140
|
if (!schemaResult) return null;
|
|
145
141
|
} else {
|
|
146
|
-
schemaResult = await (0,
|
|
147
|
-
argumentName: schemaPathArgumentName,
|
|
148
|
-
cwd
|
|
149
|
-
});
|
|
142
|
+
schemaResult = await (0, import_chunk_42R3EIRM.getSchemaWithPath)({ schemaPath, cwd, argumentName: schemaPathArgumentName });
|
|
150
143
|
}
|
|
151
144
|
return processSchemaResult({ schemaResult, printLoadMessage, cwd });
|
|
152
145
|
}
|
|
@@ -158,9 +151,9 @@ async function processSchemaResult({
|
|
|
158
151
|
const loadedFromPathForLogMessages = import_node_path.default.relative(cwd, schemaResult.schemaPath);
|
|
159
152
|
const schemaRootDir = schemaResult.schemaRootDir || cwd;
|
|
160
153
|
if (printLoadMessage) {
|
|
161
|
-
(0,
|
|
154
|
+
(0, import_chunk_42R3EIRM.printSchemaLoadedMessage)(loadedFromPathForLogMessages);
|
|
162
155
|
}
|
|
163
|
-
const configFromPsl = await (0,
|
|
156
|
+
const configFromPsl = await (0, import_chunk_X4HAZCOA.getConfig)({ datamodel: schemaResult.schemas });
|
|
164
157
|
const primaryDatasource = configFromPsl.datasources.at(0);
|
|
165
158
|
return {
|
|
166
159
|
schemaFiles: schemaResult.schemas,
|
|
@@ -206,24 +199,24 @@ async function getGenerators(options) {
|
|
|
206
199
|
allowNoModels = true,
|
|
207
200
|
typedSql
|
|
208
201
|
} = options;
|
|
209
|
-
const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({
|
|
202
|
+
const schemaContext = !options.schemaContext && schemaPath ? await loadSchemaContext({ schemaPath: { cliProvidedPath: schemaPath } }) : options.schemaContext;
|
|
210
203
|
if (!schemaContext) {
|
|
211
204
|
throw new Error(`no schema provided for getGenerators`);
|
|
212
205
|
}
|
|
213
206
|
if (!schemaContext.primaryDatasource) {
|
|
214
|
-
throw new Error(
|
|
207
|
+
throw new Error(import_chunk_DXWYZA7B.missingDatasource);
|
|
215
208
|
}
|
|
216
209
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(schemaContext.warnings);
|
|
217
210
|
const previewFeatures = (0, import_chunk_CRVLHWC5.extractPreviewFeatures)(schemaContext.generators);
|
|
218
|
-
const dmmf = await (0,
|
|
211
|
+
const dmmf = await (0, import_chunk_7K7RIULS.getDMMF)({
|
|
219
212
|
datamodel: schemaContext.schemaFiles,
|
|
220
213
|
previewFeatures
|
|
221
214
|
});
|
|
222
215
|
if (dmmf.datamodel.models.length === 0 && !allowNoModels) {
|
|
223
216
|
if (schemaContext.primaryDatasource.provider === "mongodb") {
|
|
224
|
-
throw new Error(
|
|
217
|
+
throw new Error(import_chunk_CQVWHHIJ.missingModelMessageMongoDB);
|
|
225
218
|
}
|
|
226
|
-
throw new Error(
|
|
219
|
+
throw new Error(import_chunk_CQVWHHIJ.missingModelMessage);
|
|
227
220
|
}
|
|
228
221
|
const generatorConfigs = filterGenerators(overrideGenerators || schemaContext.generators, generatorNames);
|
|
229
222
|
await validateGenerators(generatorConfigs);
|
|
@@ -266,7 +259,7 @@ You need to define \`output\` in the generator block in the schema file.`
|
|
|
266
259
|
fromEnvVar: null
|
|
267
260
|
};
|
|
268
261
|
}
|
|
269
|
-
const datamodel = (0,
|
|
262
|
+
const datamodel = (0, import_chunk_WKN2CXST.mergeSchemas)({ schemas: schemaContext.schemaFiles });
|
|
270
263
|
const options2 = {
|
|
271
264
|
datamodel,
|
|
272
265
|
datasources: schemaContext.datasources,
|
|
@@ -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_KQARZ6Q2_exports = {};
|
|
20
|
+
__export(chunk_KQARZ6Q2_exports, {
|
|
21
21
|
version: () => version
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var packageJson = (0,
|
|
23
|
+
module.exports = __toCommonJS(chunk_KQARZ6Q2_exports);
|
|
24
|
+
var import_chunk_DJDBBPWI = require("./chunk-DJDBBPWI.js");
|
|
25
|
+
var packageJson = (0, import_chunk_DJDBBPWI.require_package)();
|
|
26
26
|
var version = packageJson.version;
|
|
@@ -16,18 +16,18 @@ 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_Q75TMXCR_exports = {};
|
|
20
|
+
__export(chunk_Q75TMXCR_exports, {
|
|
21
21
|
getEngineVersion: () => getEngineVersion,
|
|
22
22
|
safeGetEngineVersion: () => safeGetEngineVersion
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_Q75TMXCR_exports);
|
|
25
25
|
var import_chunk_JOIHHXR6 = require("./chunk-JOIHHXR6.js");
|
|
26
|
-
var
|
|
26
|
+
var import_chunk_DQWKFZPY = require("./chunk-DQWKFZPY.js");
|
|
27
27
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
28
28
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
29
29
|
async function getEngineVersion(enginePath, binaryName) {
|
|
30
|
-
enginePath = await (0,
|
|
30
|
+
enginePath = await (0, import_chunk_DQWKFZPY.resolveBinary)(binaryName ?? import_fetch_engine.BinaryType.SchemaEngineBinary, enginePath);
|
|
31
31
|
const { stdout } = await (0, import_chunk_JOIHHXR6.execa)(enginePath, ["--version"]);
|
|
32
32
|
return stdout;
|
|
33
33
|
}
|
|
@@ -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_QKCH5L2O_exports = {};
|
|
20
|
+
__export(chunk_QKCH5L2O_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_QKCH5L2O_exports);
|
|
28
|
+
var import_chunk_VLNU66QF = require("./chunk-VLNU66QF.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_VLNU66QF.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
34
34
|
return lintDiagnostics;
|
|
35
35
|
}
|
|
@@ -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_SBIVIXEF_exports = {};
|
|
30
|
+
__export(chunk_SBIVIXEF_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_SBIVIXEF_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_45266XOU = require("./chunk-45266XOU.js");
|
|
39
|
+
var import_chunk_TAXSI6L6 = require("./chunk-TAXSI6L6.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,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: validate]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_45266XOU.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "ValidateError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -71,13 +71,13 @@ function validate(options) {
|
|
|
71
71
|
() => {
|
|
72
72
|
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
73
73
|
debug("Triggering a Rust panic...");
|
|
74
|
-
|
|
74
|
+
import_chunk_TAXSI6L6.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_TAXSI6L6.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -26,15 +26,15 @@ 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_TAXSI6L6_exports = {};
|
|
30
|
+
__export(chunk_TAXSI6L6_exports, {
|
|
31
31
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
|
32
32
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
|
|
33
33
|
schemaEngineWasmVersion: () => schemaEngineWasmVersion,
|
|
34
34
|
wasm_exports: () => wasm_exports
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var
|
|
36
|
+
module.exports = __toCommonJS(chunk_TAXSI6L6_exports);
|
|
37
|
+
var import_chunk_DCI7IFH4 = require("./chunk-DCI7IFH4.js");
|
|
38
38
|
var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
|
|
39
39
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
40
40
|
var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
|
|
@@ -46,6 +46,6 @@ var wasm_exports = {};
|
|
|
46
46
|
});
|
|
47
47
|
var globalWithPanicRegistry = globalThis;
|
|
48
48
|
globalWithPanicRegistry.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
|
|
49
|
-
var { dependencies } = (0,
|
|
49
|
+
var { dependencies } = (0, import_chunk_DCI7IFH4.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
|
@@ -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_TCDF53CN_exports = {};
|
|
30
|
+
__export(chunk_TCDF53CN_exports, {
|
|
31
31
|
getCLIPathHash: () => getCLIPathHash,
|
|
32
32
|
getProjectHash: () => getProjectHash
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_TCDF53CN_exports);
|
|
35
|
+
var import_chunk_42R3EIRM = require("./chunk-42R3EIRM.js");
|
|
36
36
|
var import_crypto = __toESM(require("crypto"));
|
|
37
|
-
async function getProjectHash(
|
|
38
|
-
const projectPath = (await (0,
|
|
37
|
+
async function getProjectHash(schemaPath) {
|
|
38
|
+
const projectPath = (await (0, import_chunk_42R3EIRM.getSchemaWithPath)({ schemaPath }))?.schemaPath ?? process.cwd();
|
|
39
39
|
return import_crypto.default.createHash("sha256").update(projectPath).digest("hex").substring(0, 8);
|
|
40
40
|
}
|
|
41
41
|
function getCLIPathHash() {
|
|
@@ -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);
|
|
@@ -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_TVTVO7BZ_exports = {};
|
|
30
|
+
__export(chunk_TVTVO7BZ_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_TVTVO7BZ_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_WFSL5MRY = require("./chunk-WFSL5MRY.js");
|
|
39
|
+
var import_chunk_VLNU66QF = require("./chunk-VLNU66QF.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,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: validate]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_WFSL5MRY.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "ValidateError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -71,13 +71,13 @@ function validate(options) {
|
|
|
71
71
|
() => {
|
|
72
72
|
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
73
73
|
debug("Triggering a Rust panic...");
|
|
74
|
-
|
|
74
|
+
import_chunk_VLNU66QF.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_VLNU66QF.prismaSchemaWasm.validate(params);
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
83
83
|
type: "wasm-error",
|
|
@@ -26,15 +26,15 @@ 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_VLNU66QF_exports = {};
|
|
30
|
+
__export(chunk_VLNU66QF_exports, {
|
|
31
31
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
|
32
32
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
|
|
33
33
|
schemaEngineWasmVersion: () => schemaEngineWasmVersion,
|
|
34
34
|
wasm_exports: () => wasm_exports
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var
|
|
36
|
+
module.exports = __toCommonJS(chunk_VLNU66QF_exports);
|
|
37
|
+
var import_chunk_DJDBBPWI = require("./chunk-DJDBBPWI.js");
|
|
38
38
|
var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
|
|
39
39
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
40
40
|
var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
|
|
@@ -46,6 +46,6 @@ var wasm_exports = {};
|
|
|
46
46
|
});
|
|
47
47
|
var globalWithPanicRegistry = globalThis;
|
|
48
48
|
globalWithPanicRegistry.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
|
|
49
|
-
var { dependencies } = (0,
|
|
49
|
+
var { dependencies } = (0, import_chunk_DJDBBPWI.require_package)();
|
|
50
50
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
|
51
51
|
var schemaEngineWasmVersion = dependencies["@prisma/schema-engine-wasm"];
|
|
@@ -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_VTJBF462_exports = {};
|
|
30
|
+
__export(chunk_VTJBF462_exports, {
|
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
|
32
32
|
getDMMF: () => getDMMF
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_VTJBF462_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
37
|
+
var import_chunk_WFSL5MRY = require("./chunk-WFSL5MRY.js");
|
|
38
|
+
var import_chunk_VLNU66QF = require("./chunk-VLNU66QF.js");
|
|
39
39
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
|
41
41
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
|
@@ -58,7 +58,7 @@ ${detailsHeader} ${message}`;
|
|
|
58
58
|
}).exhaustive();
|
|
59
59
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
60
60
|
[Context: getDmmf]`;
|
|
61
|
-
super((0,
|
|
61
|
+
super((0, import_chunk_WFSL5MRY.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
62
62
|
this.name = "GetDmmfError";
|
|
63
63
|
}
|
|
64
64
|
};
|
|
@@ -70,13 +70,13 @@ async function getDMMF(options) {
|
|
|
70
70
|
() => {
|
|
71
71
|
if (process.env.FORCE_PANIC_GET_DMMF) {
|
|
72
72
|
debug("Triggering a Rust panic...");
|
|
73
|
-
|
|
73
|
+
import_chunk_VLNU66QF.prismaSchemaWasm.debug_panic();
|
|
74
74
|
}
|
|
75
75
|
const params = JSON.stringify({
|
|
76
76
|
prismaSchema: options.datamodel,
|
|
77
77
|
noColor: Boolean(process.env.NO_COLOR)
|
|
78
78
|
});
|
|
79
|
-
const data =
|
|
79
|
+
const data = import_chunk_VLNU66QF.prismaSchemaWasm.get_dmmf(params);
|
|
80
80
|
return data;
|
|
81
81
|
},
|
|
82
82
|
(e) => ({
|
|
@@ -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_VX75P7BL_exports = {};
|
|
30
|
+
__export(chunk_VX75P7BL_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_VX75P7BL_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_WFSL5MRY = require("./chunk-WFSL5MRY.js");
|
|
39
|
+
var import_chunk_VLNU66QF = require("./chunk-VLNU66QF.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");
|
|
@@ -61,7 +61,7 @@ ${detailsHeader} ${message}`;
|
|
|
61
61
|
}).exhaustive();
|
|
62
62
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
63
63
|
[Context: getConfig]`;
|
|
64
|
-
super((0,
|
|
64
|
+
super((0, import_chunk_WFSL5MRY.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
65
65
|
this.name = "GetConfigError";
|
|
66
66
|
}
|
|
67
67
|
};
|
|
@@ -73,10 +73,10 @@ async function getConfig(options) {
|
|
|
73
73
|
() => {
|
|
74
74
|
if (process.env.FORCE_PANIC_GET_CONFIG) {
|
|
75
75
|
debug("Triggering a Rust panic...");
|
|
76
|
-
|
|
76
|
+
import_chunk_VLNU66QF.prismaSchemaWasm.debug_panic();
|
|
77
77
|
}
|
|
78
78
|
const params = JSON.stringify({ prismaSchema: options.datamodel });
|
|
79
|
-
return
|
|
79
|
+
return import_chunk_VLNU66QF.prismaSchemaWasm.get_config(params);
|
|
80
80
|
},
|
|
81
81
|
(e) => ({
|
|
82
82
|
type: "wasm-error",
|
|
@@ -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_WFSL5MRY_exports = {};
|
|
20
|
+
__export(chunk_WFSL5MRY_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_WFSL5MRY_exports);
|
|
24
|
+
var import_chunk_KQARZ6Q2 = require("./chunk-KQARZ6Q2.js");
|
|
24
25
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
|
25
|
-
var import_chunk_S26FTO4G = require("./chunk-S26FTO4G.js");
|
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
|
27
|
-
const rows = [["Prisma CLI Version",
|
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_KQARZ6Q2.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -26,17 +26,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_WKN2CXST_exports = {};
|
|
30
|
+
__export(chunk_WKN2CXST_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_WKN2CXST_exports);
|
|
35
35
|
var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
|
|
36
36
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_45266XOU = require("./chunk-45266XOU.js");
|
|
39
|
+
var import_chunk_TAXSI6L6 = require("./chunk-TAXSI6L6.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,7 +59,7 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: mergeSchemas]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_45266XOU.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "MergeSchemasError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
@@ -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_TAXSI6L6.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|