@prisma/internals 6.5.0-dev.8 → 6.5.0-dev.80
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/Generator.js +2 -2
- package/dist/WasmPanicRegistry.js +2 -2
- package/dist/{chunk-2SWS7ZGF.js → chunk-3AIIELLW.js} +7 -7
- package/dist/{chunk-NXIWDQBF.js → chunk-3ERIN7PH.js} +5 -5
- package/dist/{chunk-CCLACYA6.js → chunk-3WYXBDAT.js} +11 -11
- package/dist/{chunk-XOWBYDC2.js → chunk-6EY425PC.js} +12 -12
- package/dist/{chunk-A4QWQE3W.js → chunk-ATFQZVBS.js} +11 -4
- package/dist/{chunk-3MFI4O7A.js → chunk-AXTLBHF6.js} +309 -529
- package/dist/{chunk-6YN6HZLA.js → chunk-BICBHOFV.js} +11 -11
- package/dist/{chunk-HOZFIXMD.js → chunk-BPZFDGKN.js} +5 -4
- package/dist/{chunk-RL3K4V2J.js → chunk-C2WD2XUT.js} +980 -113
- package/dist/{chunk-T5RACBRF.js → chunk-CHMJ5V7I.js} +10 -10
- package/dist/{chunk-FHXAG4A2.js → chunk-CZL7DCL2.js} +5 -5
- package/dist/{chunk-3WTVUMXL.js → chunk-EMOBFROK.js} +12 -12
- package/dist/{chunk-54KM4LPR.js → chunk-EQ3LP5OP.js} +309 -529
- package/dist/{chunk-QIVUAERL.js → chunk-GXDYIY4M.js} +1653 -1762
- package/dist/{chunk-6HAMFH75.js → chunk-IF453IGN.js} +8 -8
- package/dist/{chunk-CKLMOOZY.js → chunk-JKSKSL27.js} +5 -5
- package/dist/chunk-KKGIKPIK.js +573 -0
- package/dist/{chunk-G4BGJ6IP.js → chunk-KTBNIQ7N.js} +5 -5
- package/dist/{chunk-UUQ4S65T.js → chunk-M5RTEYAS.js} +10 -11
- package/dist/{chunk-5XRQ7ONW.js → chunk-NJQWZ447.js} +5 -5
- package/dist/{chunk-NDBGA4UH.js → chunk-PHR6BD4C.js} +5 -5
- package/dist/{chunk-VXSQZXSR.js → chunk-PRXCQXPA.js} +5 -5
- package/dist/{chunk-VQX3AXS3.js → chunk-Q4F5XQEO.js} +12 -12
- package/dist/{chunk-XC2UX56M.js → chunk-QQQJTSEH.js} +12 -12
- package/dist/{chunk-WHHQZHZW.js → chunk-RG3KUBMQ.js} +8 -8
- package/dist/{chunk-ZLQSEX7S.js → chunk-SIE7JUHZ.js} +7 -7
- package/dist/{chunk-OYLZC5OV.js → chunk-TATYN3T2.js} +7 -7
- package/dist/{chunk-PN2CAU7D.js → chunk-TCZIM3NJ.js} +12 -12
- package/dist/{chunk-VESI4NCT.js → chunk-TDZT42DL.js} +11 -12
- package/dist/{chunk-IFSZX2CY.js → chunk-TNMIW5RV.js} +5 -5
- package/dist/{chunk-IWJ2BUYF.js → chunk-XLGODPZH.js} +5 -5
- package/dist/{chunk-Z3HEQNNY.js → chunk-YR5SAA2G.js} +12 -12
- package/dist/{chunk-635TMBAP.js → chunk-ZYW3HGSH.js} +8 -4
- package/dist/cli/checkUnsupportedDataProxy.js +25 -26
- package/dist/cli/getSchema.js +29 -30
- package/dist/cli/hashes.js +25 -26
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +24 -25
- package/dist/engine-commands/getConfig.js +12 -12
- package/dist/engine-commands/getDmmf.js +9 -9
- package/dist/engine-commands/getEngineVersion.js +5 -6
- package/dist/engine-commands/getEnginesMetaInfo.js +7 -8
- package/dist/engine-commands/index.js +35 -36
- package/dist/engine-commands/lintSchema.js +10 -10
- package/dist/engine-commands/mergeSchemas.js +9 -9
- package/dist/engine-commands/validate.js +9 -9
- package/dist/errorReporting.d.ts +1 -0
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +24 -25
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +24 -25
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +25 -26
- package/dist/get-generators/getGenerators.js +27 -28
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +3 -4
- package/dist/getPackedPackage.js +3 -4
- package/dist/index.js +68 -69
- package/dist/panic.js +6 -6
- package/dist/resolveBinary.js +7 -8
- package/dist/schemaEngineCommands.js +8 -9
- package/dist/sendPanic.js +24 -25
- package/dist/utils/drawBox.js +2 -2
- package/dist/utils/getEnvPaths.js +24 -25
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +24 -25
- package/dist/utils/isValidJsIdentifier.js +3 -3
- package/dist/utils/loadEnvFile.js +24 -25
- package/dist/wasm.js +5 -5
- package/package.json +15 -16
- package/dist/chunk-F3SIWK3J.js +0 -1404
- package/dist/chunk-H4J2FN2W.js +0 -796
package/dist/Generator.js
CHANGED
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
19
|
var Generator_exports = {};
|
20
20
|
__export(Generator_exports, {
|
21
|
-
Generator: () =>
|
21
|
+
Generator: () => import_chunk_ZYW3HGSH.Generator
|
22
22
|
});
|
23
23
|
module.exports = __toCommonJS(Generator_exports);
|
24
|
-
var
|
24
|
+
var import_chunk_ZYW3HGSH = require("./chunk-ZYW3HGSH.js");
|
25
25
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
26
26
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
27
27
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
19
19
|
var WasmPanicRegistry_exports = {};
|
20
20
|
__export(WasmPanicRegistry_exports, {
|
21
|
-
WasmPanicRegistry: () =>
|
21
|
+
WasmPanicRegistry: () => import_chunk_BPZFDGKN.WasmPanicRegistry
|
22
22
|
});
|
23
23
|
module.exports = __toCommonJS(WasmPanicRegistry_exports);
|
24
|
-
var
|
24
|
+
var import_chunk_BPZFDGKN = require("./chunk-BPZFDGKN.js");
|
25
25
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
@@ -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_3AIIELLW_exports = {};
|
30
|
+
__export(chunk_3AIIELLW_exports, {
|
31
31
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
32
32
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
|
33
33
|
wasm_exports: () => wasm_exports
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
36
|
-
var
|
37
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_3AIIELLW_exports);
|
36
|
+
var import_chunk_TDZT42DL = require("./chunk-TDZT42DL.js");
|
37
|
+
var import_chunk_BPZFDGKN = require("./chunk-BPZFDGKN.js");
|
38
38
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
39
39
|
var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
|
40
40
|
var wasm_exports = {};
|
@@ -42,6 +42,6 @@ var wasm_exports = {};
|
|
42
42
|
prismaSchemaWasm: () => import_prisma_schema_wasm.default,
|
43
43
|
prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
|
44
44
|
});
|
45
|
-
var { dependencies } = (0,
|
45
|
+
var { dependencies } = (0, import_chunk_TDZT42DL.require_package)();
|
46
46
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
47
|
-
globalThis.PRISMA_WASM_PANIC_REGISTRY = new
|
47
|
+
globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_BPZFDGKN.WasmPanicRegistry();
|
@@ -26,16 +26,16 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_3ERIN7PH_exports = {};
|
30
|
+
__export(chunk_3ERIN7PH_exports, {
|
31
31
|
BinaryType: () => import_fetch_engine.BinaryType,
|
32
32
|
engineEnvVarMap: () => import_fetch_engine.engineEnvVarMap,
|
33
33
|
maybeCopyToTmp: () => maybeCopyToTmp,
|
34
34
|
resolveBinary: () => resolveBinary,
|
35
35
|
safeResolveBinary: () => safeResolveBinary
|
36
36
|
});
|
37
|
-
module.exports = __toCommonJS(
|
38
|
-
var
|
37
|
+
module.exports = __toCommonJS(chunk_3ERIN7PH_exports);
|
38
|
+
var import_chunk_GXDYIY4M = require("./chunk-GXDYIY4M.js");
|
39
39
|
var import_chunk_M3GBKLGE = require("./chunk-M3GBKLGE.js");
|
40
40
|
var import_chunk_TWSLDIFL = require("./chunk-TWSLDIFL.js");
|
41
41
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
@@ -46,7 +46,7 @@ var import_fetch_engine = require("@prisma/fetch-engine");
|
|
46
46
|
var import_get_platform = require("@prisma/get-platform");
|
47
47
|
var import_fs = __toESM2(require("fs"));
|
48
48
|
var import_path = __toESM2(require("path"));
|
49
|
-
var import_fs_extra = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
49
|
+
var import_fs_extra = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_GXDYIY4M.require_lib)());
|
50
50
|
var import_temp_dir = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_TZCE3PWZ.require_temp_dir)());
|
51
51
|
async function getBinaryName(name) {
|
52
52
|
const binaryTarget = await (0, import_get_platform.getBinaryTargetForCurrentPlatform)();
|
@@ -26,20 +26,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_3WYXBDAT_exports = {};
|
30
|
+
__export(chunk_3WYXBDAT_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_3WYXBDAT_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
|
37
37
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var
|
38
|
+
var import_chunk_PHR6BD4C = require("./chunk-PHR6BD4C.js");
|
39
39
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
|
-
var
|
42
|
-
var
|
41
|
+
var import_chunk_3AIIELLW = require("./chunk-3AIIELLW.js");
|
42
|
+
var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
|
43
43
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
45
45
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: mergeSchemas]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_PHR6BD4C.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "MergeSchemasError";
|
65
65
|
}
|
66
66
|
};
|
@@ -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_3AIIELLW.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
type: "wasm-error",
|
@@ -88,11 +88,11 @@ function mergeSchemas(options) {
|
|
88
88
|
const error = (0, import_chunk_XKZ6CBLA.z)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
|
89
89
|
debugErrorType(e);
|
90
90
|
console.error("");
|
91
|
-
if ((0,
|
92
|
-
const { message, stack } = (0,
|
91
|
+
if ((0, import_chunk_ATFQZVBS.isWasmPanic)(e.error)) {
|
92
|
+
const { message, stack } = (0, import_chunk_ATFQZVBS.getWasmError)(e.error);
|
93
93
|
debug(`Error merging schemas: ${message}`);
|
94
94
|
debug(stack);
|
95
|
-
const panic = new
|
95
|
+
const panic = new import_chunk_ATFQZVBS.RustPanic(
|
96
96
|
/* message */
|
97
97
|
message,
|
98
98
|
/* rustStack */
|
@@ -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_6EY425PC_exports = {};
|
30
|
+
__export(chunk_6EY425PC_exports, {
|
31
31
|
GetDmmfError: () => GetDmmfError,
|
32
32
|
getDMMF: () => getDMMF
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_6EY425PC_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
36
|
var import_chunk_6TXVGFQA = require("./chunk-6TXVGFQA.js");
|
37
|
-
var
|
37
|
+
var import_chunk_TNMIW5RV = require("./chunk-TNMIW5RV.js");
|
38
38
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
39
39
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
40
|
-
var
|
41
|
-
var
|
40
|
+
var import_chunk_SIE7JUHZ = require("./chunk-SIE7JUHZ.js");
|
41
|
+
var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
|
42
42
|
var import_chunk_7MD6344A = require("./chunk-7MD6344A.js");
|
43
43
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
44
44
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
@@ -60,7 +60,7 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: getDmmf]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_TNMIW5RV.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "GetDmmfError";
|
65
65
|
}
|
66
66
|
};
|
@@ -90,13 +90,13 @@ async function getDMMF(options) {
|
|
90
90
|
() => {
|
91
91
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
92
92
|
debug("Triggering a Rust panic...");
|
93
|
-
|
93
|
+
import_chunk_SIE7JUHZ.prismaSchemaWasm.debug_panic();
|
94
94
|
}
|
95
95
|
const params = JSON.stringify({
|
96
96
|
prismaSchema: datamodel,
|
97
97
|
noColor: Boolean(process.env.NO_COLOR)
|
98
98
|
});
|
99
|
-
const data =
|
99
|
+
const data = import_chunk_SIE7JUHZ.prismaSchemaWasm.get_dmmf(params);
|
100
100
|
return data;
|
101
101
|
},
|
102
102
|
(e) => ({
|
@@ -139,9 +139,9 @@ Datamodel path: "${e.datamodelPath}"`,
|
|
139
139
|
});
|
140
140
|
}).with({ type: "wasm-error" }, (e) => {
|
141
141
|
debugErrorType(e);
|
142
|
-
if ((0,
|
143
|
-
const { message, stack } = (0,
|
144
|
-
const panic = new
|
142
|
+
if ((0, import_chunk_ATFQZVBS.isWasmPanic)(e.error)) {
|
143
|
+
const { message, stack } = (0, import_chunk_ATFQZVBS.getWasmError)(e.error);
|
144
|
+
const panic = new import_chunk_ATFQZVBS.RustPanic(
|
145
145
|
/* message */
|
146
146
|
message,
|
147
147
|
/* rustStack */
|
@@ -16,19 +16,26 @@ 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_ATFQZVBS_exports = {};
|
20
|
+
__export(chunk_ATFQZVBS_exports, {
|
21
21
|
ErrorArea: () => ErrorArea,
|
22
22
|
RustPanic: () => RustPanic,
|
23
23
|
getWasmError: () => getWasmError,
|
24
24
|
isRustPanic: () => isRustPanic,
|
25
25
|
isWasmPanic: () => isWasmPanic
|
26
26
|
});
|
27
|
-
module.exports = __toCommonJS(
|
27
|
+
module.exports = __toCommonJS(chunk_ATFQZVBS_exports);
|
28
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
28
29
|
var RustPanic = class extends Error {
|
29
30
|
constructor(message, rustStack, request, area, schemaPath, schema, introspectionUrl) {
|
30
31
|
super(message);
|
31
|
-
this
|
32
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "__typename", "RustPanic");
|
33
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "request");
|
34
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "rustStack");
|
35
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "area");
|
36
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "schemaPath");
|
37
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "schema");
|
38
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "introspectionUrl");
|
32
39
|
this.name = "RustPanic";
|
33
40
|
this.rustStack = rustStack;
|
34
41
|
this.request = request;
|