@prisma/internals 6.6.0-integration-engines-6-6-0-17-refactor-migrate-to-new-interface-a65ab979bf81a122861f2a68231321419d7fb303.1 → 6.6.0-integration-refactor-schema-path-less-migrate-class.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-PCBIQV5K.js → chunk-2SU4K35O.js} +174 -143
- package/dist/{chunk-N4FY6SYP.js → chunk-46YCXISN.js} +38 -67
- package/dist/{chunk-KKVB4S3E.js → chunk-4AC2JUM4.js} +23 -23
- package/dist/{chunk-7MD6344A.js → chunk-5DBOS77Y.js} +3 -5
- package/dist/{chunk-RBPRJFZN.js → chunk-6IZLN4Z5.js} +174 -143
- package/dist/{chunk-XARAHSDW.js → chunk-6RMP4L37.js} +14 -14
- package/dist/{chunk-DODIJPCS.js → chunk-AOQIUJT4.js} +16 -9
- package/dist/{chunk-TSJICM5S.js → chunk-CRVLHWC5.js} +5 -5
- package/dist/{chunk-DL7YQI4D.js → chunk-DZXCMG6O.js} +15 -15
- package/dist/{chunk-ABGGXGOC.js → chunk-EOWYER24.js} +5 -5
- package/dist/{chunk-3ERIN7PH.js → chunk-HMRJXDNO.js} +5 -5
- package/dist/{chunk-SQM6DJFL.js → chunk-JJBDZ3V4.js} +14 -14
- package/dist/{chunk-KTBNIQ7N.js → chunk-JMIU2AUX.js} +5 -5
- package/dist/{chunk-KOMGNJLE.js → chunk-LG5IW4IV.js} +6 -6
- package/dist/{chunk-Q22BLLK3.js → chunk-MUPZUVSI.js} +18 -12
- package/dist/{chunk-HRNPS5ND.js → chunk-OCPELPFI.js} +5 -5
- package/dist/{chunk-BGFWFIPR.js → chunk-OEXSUUW2.js} +5 -5
- package/dist/{chunk-PJHAB6NL.js → chunk-OIEQY7MB.js} +5 -5
- package/dist/{chunk-PJTR7UPQ.js → chunk-OZJAY6HP.js} +15 -15
- package/dist/{chunk-ARTAC6EG.js → chunk-Q2GXXFZU.js} +5 -5
- package/dist/{chunk-BGYLXBAN.js → chunk-QY2YJCMB.js} +5 -5
- package/dist/{chunk-FCYHZHVW.js → chunk-R3J2O23S.js} +4 -4
- package/dist/{chunk-TYIHFBAY.js → chunk-SNY3IPJ5.js} +5 -5
- package/dist/{chunk-XLGODPZH.js → chunk-UCHI3M2O.js} +7 -7
- package/dist/{chunk-K463GPQP.js → chunk-UFYNZD7Y.js} +23 -23
- package/dist/{chunk-TQCLUNM2.js → chunk-VNIE2AZB.js} +4 -4
- package/dist/{chunk-TATYN3T2.js → chunk-VNXTMX7Q.js} +26 -26
- package/dist/{chunk-2MWIMEFK.js → chunk-WO5ENZU5.js} +7 -7
- package/dist/{chunk-FAILNIEQ.js → chunk-X5YSMVVH.js} +5 -5
- package/dist/{chunk-VLCHHD5W.js → chunk-XKNXU2N3.js} +7 -7
- package/dist/{chunk-6TXVGFQA.js → chunk-Y4PCD4YX.js} +9 -9
- package/dist/{chunk-WCEODSXD.js → chunk-YG7D272D.js} +5 -5
- package/dist/{chunk-U2VNMXTK.js → chunk-YK5AZ3CV.js} +38 -67
- package/dist/cli/checkUnsupportedDataProxy.js +33 -34
- package/dist/cli/getSchema.js +37 -38
- package/dist/cli/hashes.js +33 -34
- package/dist/cli/schemaContext.d.ts +57 -0
- package/dist/cli/schemaContext.js +135 -0
- package/dist/cli/utils.js +4 -4
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +32 -33
- package/dist/engine-commands/getConfig.d.ts +0 -4
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.d.ts +1 -5
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +5 -5
- package/dist/engine-commands/getEnginesMetaInfo.js +7 -7
- package/dist/engine-commands/index.js +43 -44
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +7 -7
- package/dist/engine-commands/validate.js +10 -10
- package/dist/get-generators/generatorResolvers/generatorResolvers.js +32 -33
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +32 -33
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +33 -34
- package/dist/get-generators/getGenerators.d.ts +7 -3
- package/dist/get-generators/getGenerators.js +35 -36
- package/dist/highlight/highlight.js +5 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +81 -80
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +32 -33
- package/dist/utils/binaryTargetRegex.js +2 -2
- package/dist/utils/canPrompt.js +3 -3
- package/dist/utils/extractPreviewFeatures.d.ts +2 -2
- package/dist/utils/extractPreviewFeatures.js +2 -2
- package/dist/utils/getEnvPaths.js +32 -33
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +32 -33
- package/dist/utils/loadEnvFile.js +32 -33
- package/dist/utils/missingDatasource.js +4 -4
- package/dist/utils/missingGeneratorMessage.js +6 -6
- package/dist/wasm.js +4 -4
- package/package.json +11 -11
- package/dist/chunk-IPKE37QC.js +0 -25
- package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
- package/dist/get-generators/utils/check-feature-flags/checkFeatureFlags.js +0 -25
@@ -26,21 +26,21 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_6RMP4L37_exports = {};
|
30
|
+
__export(chunk_6RMP4L37_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_6RMP4L37_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
37
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var import_chunk_TYIHFBAY = require("./chunk-TYIHFBAY.js");
|
36
|
+
var import_chunk_Y4PCD4YX = require("./chunk-Y4PCD4YX.js");
|
39
37
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
38
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
39
|
+
var import_chunk_SNY3IPJ5 = require("./chunk-SNY3IPJ5.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
|
-
var
|
41
|
+
var import_chunk_EOWYER24 = require("./chunk-EOWYER24.js");
|
42
42
|
var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
|
43
|
-
var
|
43
|
+
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
45
45
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
46
46
|
var import_debug = __toESM(require("@prisma/debug"));
|
@@ -60,20 +60,20 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: mergeSchemas]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_SNY3IPJ5.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "MergeSchemasError";
|
65
65
|
}
|
66
66
|
};
|
67
67
|
function mergeSchemas(options) {
|
68
|
-
const debugErrorType = (0,
|
68
|
+
const debugErrorType = (0, import_chunk_Y4PCD4YX.createDebugErrorType)(debug, "mergeSchemasWasm");
|
69
69
|
debug(`Using mergeSchemas Wasm`);
|
70
70
|
const mergeSchemasEither = (0, import_function.pipe)(
|
71
|
-
(0,
|
71
|
+
(0, import_chunk_5DBOS77Y.tryCatch)(
|
72
72
|
() => {
|
73
73
|
const params = JSON.stringify({
|
74
74
|
schema: options.schemas
|
75
75
|
});
|
76
|
-
return
|
76
|
+
return import_chunk_EOWYER24.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
type: "wasm-error",
|
@@ -82,7 +82,7 @@ function mergeSchemas(options) {
|
|
82
82
|
})
|
83
83
|
)
|
84
84
|
);
|
85
|
-
if ((0,
|
85
|
+
if ((0, import_chunk_5DBOS77Y.isRight)(mergeSchemasEither)) {
|
86
86
|
return mergeSchemasEither.right;
|
87
87
|
}
|
88
88
|
const error = (0, import_chunk_XKZ6CBLA.z)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
|
@@ -108,7 +108,7 @@ function mergeSchemas(options) {
|
|
108
108
|
return panic;
|
109
109
|
}
|
110
110
|
const errorOutput = e.error.message;
|
111
|
-
return new MergeSchemasError((0,
|
111
|
+
return new MergeSchemasError((0, import_chunk_Y4PCD4YX.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
112
112
|
}).exhaustive();
|
113
113
|
throw error;
|
114
114
|
}
|
@@ -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_AOQIUJT4_exports = {};
|
20
|
+
__export(chunk_AOQIUJT4_exports, {
|
21
21
|
binaryTargetRegex: () => binaryTargetRegex
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_AOQIUJT4_exports);
|
24
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
24
25
|
var import_get_platform = require("@prisma/get-platform");
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
var require_escape_string_regexp = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
27
|
+
"../../node_modules/.pnpm/escape-string-regexp@4.0.0/node_modules/escape-string-regexp/index.js"(exports, module2) {
|
28
|
+
"use strict";
|
29
|
+
module2.exports = (string) => {
|
30
|
+
if (typeof string !== "string") {
|
31
|
+
throw new TypeError("Expected a string");
|
32
|
+
}
|
33
|
+
return string.replace(/[|\\{}()[\]^$+*?.]/g, "\\$&").replace(/-/g, "\\x2d");
|
34
|
+
};
|
28
35
|
}
|
29
|
-
|
30
|
-
|
36
|
+
});
|
37
|
+
var import_escape_string_regexp = (0, import_chunk_WWAWV7DQ.__toESM)(require_escape_string_regexp());
|
31
38
|
var binaryTargetRegex = new RegExp(
|
32
|
-
"(" + [...import_get_platform.binaryTargets].sort((a, b) => b.length - a.length).map((p) =>
|
39
|
+
"(" + [...import_get_platform.binaryTargets].sort((a, b) => b.length - a.length).map((p) => (0, import_escape_string_regexp.default)(p)).join("|") + ")",
|
33
40
|
"g"
|
34
41
|
);
|
@@ -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_CRVLHWC5_exports = {};
|
20
|
+
__export(chunk_CRVLHWC5_exports, {
|
21
21
|
extractPreviewFeatures: () => extractPreviewFeatures
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_CRVLHWC5_exports);
|
24
24
|
var import_chunk_IOIAK7V7 = require("./chunk-IOIAK7V7.js");
|
25
|
-
function extractPreviewFeatures(
|
26
|
-
return
|
25
|
+
function extractPreviewFeatures(generators) {
|
26
|
+
return generators.find((g) => (0, import_chunk_IOIAK7V7.parseEnvValue)(g.provider) === "prisma-client-js")?.previewFeatures || [];
|
27
27
|
}
|
@@ -26,21 +26,21 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_DZXCMG6O_exports = {};
|
30
|
+
__export(chunk_DZXCMG6O_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_DZXCMG6O_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
37
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var import_chunk_TYIHFBAY = require("./chunk-TYIHFBAY.js");
|
36
|
+
var import_chunk_Y4PCD4YX = require("./chunk-Y4PCD4YX.js");
|
39
37
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
38
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
39
|
+
var import_chunk_SNY3IPJ5 = require("./chunk-SNY3IPJ5.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
|
-
var
|
41
|
+
var import_chunk_EOWYER24 = require("./chunk-EOWYER24.js");
|
42
42
|
var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
|
43
|
-
var
|
43
|
+
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
45
45
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
46
46
|
var import_debug = __toESM(require("@prisma/debug"));
|
@@ -60,25 +60,25 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: validate]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_SNY3IPJ5.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "ValidateError";
|
65
65
|
}
|
66
66
|
};
|
67
67
|
function validate(options) {
|
68
|
-
const debugErrorType = (0,
|
68
|
+
const debugErrorType = (0, import_chunk_Y4PCD4YX.createDebugErrorType)(debug, "validateWasm");
|
69
69
|
debug(`Using validate Wasm`);
|
70
70
|
const validateEither = (0, import_function.pipe)(
|
71
|
-
(0,
|
71
|
+
(0, import_chunk_5DBOS77Y.tryCatch)(
|
72
72
|
() => {
|
73
73
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
74
74
|
debug("Triggering a Rust panic...");
|
75
|
-
|
75
|
+
import_chunk_EOWYER24.prismaSchemaWasm.debug_panic();
|
76
76
|
}
|
77
77
|
const params = JSON.stringify({
|
78
78
|
prismaSchema: options.schemas,
|
79
79
|
noColor: Boolean(process.env.NO_COLOR)
|
80
80
|
});
|
81
|
-
|
81
|
+
import_chunk_EOWYER24.prismaSchemaWasm.validate(params);
|
82
82
|
},
|
83
83
|
(e) => ({
|
84
84
|
type: "wasm-error",
|
@@ -87,7 +87,7 @@ function validate(options) {
|
|
87
87
|
})
|
88
88
|
)
|
89
89
|
);
|
90
|
-
if ((0,
|
90
|
+
if ((0, import_chunk_5DBOS77Y.isRight)(validateEither)) {
|
91
91
|
return;
|
92
92
|
}
|
93
93
|
const error = (0, import_chunk_XKZ6CBLA.z)(validateEither.left).with({ type: "wasm-error" }, (e) => {
|
@@ -113,7 +113,7 @@ function validate(options) {
|
|
113
113
|
return panic;
|
114
114
|
}
|
115
115
|
const errorOutput = e.error.message;
|
116
|
-
return new ValidateError((0,
|
116
|
+
return new ValidateError((0, import_chunk_Y4PCD4YX.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
117
117
|
}).exhaustive();
|
118
118
|
throw error;
|
119
119
|
}
|
@@ -26,14 +26,14 @@ 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_EOWYER24_exports = {};
|
30
|
+
__export(chunk_EOWYER24_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
|
35
|
+
module.exports = __toCommonJS(chunk_EOWYER24_exports);
|
36
|
+
var import_chunk_LG5IW4IV = require("./chunk-LG5IW4IV.js");
|
37
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"));
|
@@ -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_LG5IW4IV.require_package)();
|
46
46
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
47
47
|
globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_BPZFDGKN.WasmPanicRegistry();
|
@@ -26,19 +26,19 @@ 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_HMRJXDNO_exports = {};
|
30
|
+
__export(chunk_HMRJXDNO_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(
|
37
|
+
module.exports = __toCommonJS(chunk_HMRJXDNO_exports);
|
38
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
|
-
var
|
41
|
+
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
42
42
|
var import_chunk_TZCE3PWZ = require("./chunk-TZCE3PWZ.js");
|
43
43
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
44
44
|
var import_engines = require("@prisma/engines");
|
@@ -90,7 +90,7 @@ async function resolveBinary(name, proposedPath) {
|
|
90
90
|
);
|
91
91
|
}
|
92
92
|
function safeResolveBinary(name, proposedPath) {
|
93
|
-
return (0,
|
93
|
+
return (0, import_chunk_5DBOS77Y.tryCatch2)(
|
94
94
|
() => resolveBinary(name, proposedPath),
|
95
95
|
(error) => error
|
96
96
|
);
|
@@ -26,21 +26,21 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_JJBDZ3V4_exports = {};
|
30
|
+
__export(chunk_JJBDZ3V4_exports, {
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
32
32
|
mergeSchemas: () => mergeSchemas
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_JJBDZ3V4_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
37
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var import_chunk_HRNPS5ND = require("./chunk-HRNPS5ND.js");
|
36
|
+
var import_chunk_Y4PCD4YX = require("./chunk-Y4PCD4YX.js");
|
39
37
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
38
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
39
|
+
var import_chunk_OCPELPFI = require("./chunk-OCPELPFI.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
|
-
var
|
41
|
+
var import_chunk_Q2GXXFZU = require("./chunk-Q2GXXFZU.js");
|
42
42
|
var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
|
43
|
-
var
|
43
|
+
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
45
45
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
46
46
|
var import_debug = __toESM(require("@prisma/debug"));
|
@@ -60,20 +60,20 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: mergeSchemas]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_OCPELPFI.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "MergeSchemasError";
|
65
65
|
}
|
66
66
|
};
|
67
67
|
function mergeSchemas(options) {
|
68
|
-
const debugErrorType = (0,
|
68
|
+
const debugErrorType = (0, import_chunk_Y4PCD4YX.createDebugErrorType)(debug, "mergeSchemasWasm");
|
69
69
|
debug(`Using mergeSchemas Wasm`);
|
70
70
|
const mergeSchemasEither = (0, import_function.pipe)(
|
71
|
-
(0,
|
71
|
+
(0, import_chunk_5DBOS77Y.tryCatch)(
|
72
72
|
() => {
|
73
73
|
const params = JSON.stringify({
|
74
74
|
schema: options.schemas
|
75
75
|
});
|
76
|
-
return
|
76
|
+
return import_chunk_Q2GXXFZU.prismaSchemaWasm.merge_schemas(params);
|
77
77
|
},
|
78
78
|
(e) => ({
|
79
79
|
type: "wasm-error",
|
@@ -82,7 +82,7 @@ function mergeSchemas(options) {
|
|
82
82
|
})
|
83
83
|
)
|
84
84
|
);
|
85
|
-
if ((0,
|
85
|
+
if ((0, import_chunk_5DBOS77Y.isRight)(mergeSchemasEither)) {
|
86
86
|
return mergeSchemasEither.right;
|
87
87
|
}
|
88
88
|
const error = (0, import_chunk_XKZ6CBLA.z)(mergeSchemasEither.left).with({ type: "wasm-error" }, (e) => {
|
@@ -108,7 +108,7 @@ function mergeSchemas(options) {
|
|
108
108
|
return panic;
|
109
109
|
}
|
110
110
|
const errorOutput = e.error.message;
|
111
|
-
return new MergeSchemasError((0,
|
111
|
+
return new MergeSchemasError((0, import_chunk_Y4PCD4YX.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
112
112
|
}).exhaustive();
|
113
113
|
throw error;
|
114
114
|
}
|
@@ -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_JMIU2AUX_exports = {};
|
20
|
+
__export(chunk_JMIU2AUX_exports, {
|
21
21
|
SchemaEngineExitCode: () => SchemaEngineExitCode,
|
22
22
|
canConnectToDatabase: () => canConnectToDatabase,
|
23
23
|
createDatabase: () => createDatabase,
|
24
24
|
dropDatabase: () => dropDatabase,
|
25
25
|
execaCommand: () => execaCommand
|
26
26
|
});
|
27
|
-
module.exports = __toCommonJS(
|
27
|
+
module.exports = __toCommonJS(chunk_JMIU2AUX_exports);
|
28
28
|
var import_chunk_7XNZDY2V = require("./chunk-7XNZDY2V.js");
|
29
|
-
var
|
29
|
+
var import_chunk_HMRJXDNO = require("./chunk-HMRJXDNO.js");
|
30
30
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
31
31
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
32
32
|
var import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_7XNZDY2V.require_execa)());
|
@@ -141,7 +141,7 @@ async function execaCommand({
|
|
141
141
|
schemaEnginePath,
|
142
142
|
engineCommandName
|
143
143
|
}) {
|
144
|
-
schemaEnginePath = schemaEnginePath || await (0,
|
144
|
+
schemaEnginePath = schemaEnginePath || await (0, import_chunk_HMRJXDNO.resolveBinary)(import_fetch_engine.BinaryType.SchemaEngineBinary);
|
145
145
|
try {
|
146
146
|
return await (0, import_execa.default)(schemaEnginePath, ["cli", "--datasource", connectionString, engineCommandName], {
|
147
147
|
cwd,
|
@@ -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_LG5IW4IV_exports = {};
|
20
|
+
__export(chunk_LG5IW4IV_exports, {
|
21
21
|
require_package: () => require_package
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_LG5IW4IV_exports);
|
24
24
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
25
25
|
var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
26
26
|
"package.json"(exports, module2) {
|
@@ -67,7 +67,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
67
67
|
"cli-truncate": "4.0.0",
|
68
68
|
dotenv: "16.4.7",
|
69
69
|
esbuild: "0.24.2",
|
70
|
-
"escape-string-regexp": "
|
70
|
+
"escape-string-regexp": "4.0.0",
|
71
71
|
execa: "5.1.1",
|
72
72
|
"fast-glob": "3.3.3",
|
73
73
|
"find-up": "7.0.0",
|
@@ -93,7 +93,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
93
93
|
resolve: "1.22.10",
|
94
94
|
"string-width": "7.2.0",
|
95
95
|
"strip-ansi": "6.0.1",
|
96
|
-
"strip-indent": "
|
96
|
+
"strip-indent": "3.0.0",
|
97
97
|
"temp-dir": "2.0.0",
|
98
98
|
tempy: "1.0.1",
|
99
99
|
"terminal-link": "2.1.1",
|
@@ -111,7 +111,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
111
111
|
"@prisma/fetch-engine": "workspace:*",
|
112
112
|
"@prisma/generator-helper": "workspace:*",
|
113
113
|
"@prisma/get-platform": "workspace:*",
|
114
|
-
"@prisma/prisma-schema-wasm": "6.6.0-
|
114
|
+
"@prisma/prisma-schema-wasm": "6.6.0-1.1553356525b8e28a58f362554654043cba99af2f",
|
115
115
|
"@prisma/schema-files-loader": "workspace:*",
|
116
116
|
arg: "5.0.2",
|
117
117
|
prompts: "2.4.2"
|
@@ -26,13 +26,13 @@ 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_MUPZUVSI_exports = {};
|
30
|
+
__export(chunk_MUPZUVSI_exports, {
|
31
31
|
arg: () => arg,
|
32
32
|
format: () => format,
|
33
33
|
isError: () => isError
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
35
|
+
module.exports = __toCommonJS(chunk_MUPZUVSI_exports);
|
36
36
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
37
37
|
var import_arg = __toESM(require("arg"));
|
38
38
|
var require_min_indent = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
@@ -47,17 +47,23 @@ var require_min_indent = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
47
47
|
};
|
48
48
|
}
|
49
49
|
});
|
50
|
-
var
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
50
|
+
var require_strip_indent = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
51
|
+
"../../node_modules/.pnpm/strip-indent@3.0.0/node_modules/strip-indent/index.js"(exports, module2) {
|
52
|
+
"use strict";
|
53
|
+
var minIndent = require_min_indent();
|
54
|
+
module2.exports = (string) => {
|
55
|
+
const indent = minIndent(string);
|
56
|
+
if (indent === 0) {
|
57
|
+
return string;
|
58
|
+
}
|
59
|
+
const regex = new RegExp(`^[ \\t]{${indent}}`, "gm");
|
60
|
+
return string.replace(regex, "");
|
61
|
+
};
|
55
62
|
}
|
56
|
-
|
57
|
-
|
58
|
-
}
|
63
|
+
});
|
64
|
+
var import_strip_indent = (0, import_chunk_WWAWV7DQ.__toESM)(require_strip_indent());
|
59
65
|
function format(input = "") {
|
60
|
-
return
|
66
|
+
return (0, import_strip_indent.default)(input).trimRight() + "\n";
|
61
67
|
}
|
62
68
|
function arg(argv, spec, stopAtPositional = true, permissive = false) {
|
63
69
|
try {
|
@@ -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_OCPELPFI_exports = {};
|
20
|
+
__export(chunk_OCPELPFI_exports, {
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_OCPELPFI_exports);
|
24
|
+
var import_chunk_OIEQY7MB = require("./chunk-OIEQY7MB.js");
|
25
25
|
var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
|
26
26
|
function addVersionDetailsToErrorMessage(message) {
|
27
|
-
const rows = [["Prisma CLI Version",
|
27
|
+
const rows = [["Prisma CLI Version", import_chunk_OIEQY7MB.version]];
|
28
28
|
return `${message}
|
29
29
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
@@ -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_OEXSUUW2_exports = {};
|
20
|
+
__export(chunk_OEXSUUW2_exports, {
|
21
21
|
missingDatasource: () => missingDatasource
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
23
|
+
module.exports = __toCommonJS(chunk_OEXSUUW2_exports);
|
24
24
|
var import_chunk_L6GBFCXG = require("./chunk-L6GBFCXG.js");
|
25
|
-
var
|
25
|
+
var import_chunk_VNIE2AZB = require("./chunk-VNIE2AZB.js");
|
26
26
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
27
27
|
var missingDatasource = `
|
28
28
|
You don't have any ${(0, import_chunk_PG5FDKSF.bold)("datasource")} defined in your ${(0, import_chunk_PG5FDKSF.bold)("schema.prisma")}.
|
29
29
|
You can define a datasource like this:
|
30
30
|
|
31
31
|
${(0, import_chunk_PG5FDKSF.bold)(
|
32
|
-
(0,
|
32
|
+
(0, import_chunk_VNIE2AZB.highlightDatamodel)(`datasource db {
|
33
33
|
provider = "postgresql"
|
34
34
|
url = env("DB_URL")
|
35
35
|
}`)
|
@@ -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_OIEQY7MB_exports = {};
|
20
|
+
__export(chunk_OIEQY7MB_exports, {
|
21
21
|
version: () => version
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
25
|
-
var packageJson = (0,
|
23
|
+
module.exports = __toCommonJS(chunk_OIEQY7MB_exports);
|
24
|
+
var import_chunk_XKNXU2N3 = require("./chunk-XKNXU2N3.js");
|
25
|
+
var packageJson = (0, import_chunk_XKNXU2N3.require_package)();
|
26
26
|
var version = packageJson.version;
|
@@ -26,21 +26,21 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_OZJAY6HP_exports = {};
|
30
|
+
__export(chunk_OZJAY6HP_exports, {
|
31
31
|
ValidateError: () => ValidateError,
|
32
32
|
validate: () => validate
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_OZJAY6HP_exports);
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
36
|
-
var
|
37
|
-
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
38
|
-
var import_chunk_HRNPS5ND = require("./chunk-HRNPS5ND.js");
|
36
|
+
var import_chunk_Y4PCD4YX = require("./chunk-Y4PCD4YX.js");
|
39
37
|
var import_chunk_PFLLVWZX = require("./chunk-PFLLVWZX.js");
|
38
|
+
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
39
|
+
var import_chunk_OCPELPFI = require("./chunk-OCPELPFI.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
|
-
var
|
41
|
+
var import_chunk_Q2GXXFZU = require("./chunk-Q2GXXFZU.js");
|
42
42
|
var import_chunk_ATFQZVBS = require("./chunk-ATFQZVBS.js");
|
43
|
-
var
|
43
|
+
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
44
44
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
45
45
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
46
46
|
var import_debug = __toESM(require("@prisma/debug"));
|
@@ -60,25 +60,25 @@ ${detailsHeader} ${message}`;
|
|
60
60
|
}).exhaustive();
|
61
61
|
const errorMessageWithContext = `${constructedErrorMessage}
|
62
62
|
[Context: validate]`;
|
63
|
-
super((0,
|
63
|
+
super((0, import_chunk_OCPELPFI.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
64
64
|
this.name = "ValidateError";
|
65
65
|
}
|
66
66
|
};
|
67
67
|
function validate(options) {
|
68
|
-
const debugErrorType = (0,
|
68
|
+
const debugErrorType = (0, import_chunk_Y4PCD4YX.createDebugErrorType)(debug, "validateWasm");
|
69
69
|
debug(`Using validate Wasm`);
|
70
70
|
const validateEither = (0, import_function.pipe)(
|
71
|
-
(0,
|
71
|
+
(0, import_chunk_5DBOS77Y.tryCatch)(
|
72
72
|
() => {
|
73
73
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
|
74
74
|
debug("Triggering a Rust panic...");
|
75
|
-
|
75
|
+
import_chunk_Q2GXXFZU.prismaSchemaWasm.debug_panic();
|
76
76
|
}
|
77
77
|
const params = JSON.stringify({
|
78
78
|
prismaSchema: options.schemas,
|
79
79
|
noColor: Boolean(process.env.NO_COLOR)
|
80
80
|
});
|
81
|
-
|
81
|
+
import_chunk_Q2GXXFZU.prismaSchemaWasm.validate(params);
|
82
82
|
},
|
83
83
|
(e) => ({
|
84
84
|
type: "wasm-error",
|
@@ -87,7 +87,7 @@ function validate(options) {
|
|
87
87
|
})
|
88
88
|
)
|
89
89
|
);
|
90
|
-
if ((0,
|
90
|
+
if ((0, import_chunk_5DBOS77Y.isRight)(validateEither)) {
|
91
91
|
return;
|
92
92
|
}
|
93
93
|
const error = (0, import_chunk_XKZ6CBLA.z)(validateEither.left).with({ type: "wasm-error" }, (e) => {
|
@@ -113,7 +113,7 @@ function validate(options) {
|
|
113
113
|
return panic;
|
114
114
|
}
|
115
115
|
const errorOutput = e.error.message;
|
116
|
-
return new ValidateError((0,
|
116
|
+
return new ValidateError((0, import_chunk_Y4PCD4YX.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
117
117
|
}).exhaustive();
|
118
118
|
throw error;
|
119
119
|
}
|
@@ -26,14 +26,14 @@ 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_Q2GXXFZU_exports = {};
|
30
|
+
__export(chunk_Q2GXXFZU_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
|
35
|
+
module.exports = __toCommonJS(chunk_Q2GXXFZU_exports);
|
36
|
+
var import_chunk_XKNXU2N3 = require("./chunk-XKNXU2N3.js");
|
37
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"));
|
@@ -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_XKNXU2N3.require_package)();
|
46
46
|
var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
|
47
47
|
globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_BPZFDGKN.WasmPanicRegistry();
|