@prisma/internals 5.17.0-integration-show-platform-auth-token.3 → 5.17.0-integration-show-platform-auth-token.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-IEOLMIMU.js → chunk-2NJOBWJS.js} +15 -15
- package/dist/{chunk-5TGIEWON.js → chunk-2SSYVXDR.js} +22 -22
- package/dist/{chunk-3CRBDWPU.js → chunk-2X6W7TFG.js} +5 -5
- package/dist/{chunk-JM6ICT4D.js → chunk-4A5ZK522.js} +3 -3
- package/dist/{chunk-7QFKPVEI.js → chunk-56ERTRFR.js} +5 -5
- package/dist/{chunk-EOTOEWEG.js → chunk-BNIMKZNL.js} +16 -16
- package/dist/{chunk-HNFCHBPX.js → chunk-CZE6J5XE.js} +5 -5
- package/dist/{chunk-LQD72ZI2.js → chunk-DQPVFTJQ.js} +15 -15
- package/dist/{chunk-4SKD6RMZ.js → chunk-ELQBOUCU.js} +6 -6
- package/dist/{chunk-5SEXCYQP.js → chunk-ERFLQLMI.js} +23 -23
- package/dist/{chunk-2HYB2BOP.js → chunk-ETZHFUR5.js} +23 -23
- package/dist/{chunk-BDXNOGJ3.js → chunk-EY6S56AZ.js} +5 -5
- package/dist/{chunk-6HXOL3QF.js → chunk-EYOPVHNV.js} +28 -28
- package/dist/{chunk-FTFPVECN.js → chunk-GCEA7FEH.js} +5 -5
- package/dist/{chunk-Z2NHAREC.js → chunk-GHYJGM56.js} +5 -5
- package/dist/{chunk-EKSAMZHR.js → chunk-KUMD5MBR.js} +10 -10
- package/dist/{chunk-HHHZRX5T.js → chunk-LNOKNOBG.js} +16 -16
- package/dist/{chunk-KRU3ZK3W.js → chunk-NYIOBR7P.js} +19 -19
- package/dist/{chunk-BQ3ZVZLP.js → chunk-OR67YWXT.js} +22 -22
- package/dist/{chunk-OI5GDSG6.js → chunk-PN2OFBAO.js} +5 -5
- package/dist/{chunk-22WWDCBL.js → chunk-QL3K6JIN.js} +7 -7
- package/dist/{chunk-SMHAELKS.js → chunk-QOTVZEEZ.js} +17 -17
- package/dist/{chunk-IJK3NGWG.js → chunk-TO5N4ITO.js} +5 -5
- package/dist/{chunk-WPDXG7BG.js → chunk-VY6W7UY5.js} +5 -5
- package/dist/{chunk-V3GTH2TA.js → chunk-Y6KJKZQK.js} +5 -5
- package/dist/{chunk-P6T3CL5R.js → chunk-YCHXUHBZ.js} +5 -5
- package/dist/{chunk-QEMHOJR6.js → chunk-YM3CE76B.js} +147 -160
- package/dist/{chunk-ZMLBYV2S.js → chunk-ZWBK7KH4.js} +19 -19
- package/dist/cli/checkUnsupportedDataProxy.js +20 -20
- package/dist/cli/getSchema.js +25 -25
- package/dist/cli/hashes.js +20 -20
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +19 -19
- package/dist/engine-commands/getConfig.js +13 -13
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +5 -5
- package/dist/engine-commands/getEnginesMetaInfo.js +8 -8
- package/dist/engine-commands/index.js +30 -30
- 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 +19 -19
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +19 -19
- package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.js +19 -19
- package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +20 -20
- package/dist/get-generators/getGenerators.js +22 -22
- package/dist/index.js +57 -57
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +19 -19
- package/dist/utils/fs-functional.js +9 -9
- package/dist/utils/getEnvPaths.js +19 -19
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handlePanic.js +19 -19
- package/dist/utils/loadEnvFile.js +19 -19
- package/dist/wasm.js +4 -4
- package/package.json +9 -9
|
@@ -26,29 +26,29 @@ 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_ETZHFUR5_exports = {};
|
|
30
|
+
__export(chunk_ETZHFUR5_exports, {
|
|
31
31
|
GetConfigError: () => GetConfigError,
|
|
32
32
|
getConfig: () => getConfig,
|
|
33
33
|
getDirectUrl: () => getDirectUrl,
|
|
34
34
|
getEffectiveUrl: () => getEffectiveUrl,
|
|
35
35
|
resolveUrl: () => resolveUrl
|
|
36
36
|
});
|
|
37
|
-
module.exports = __toCommonJS(
|
|
37
|
+
module.exports = __toCommonJS(chunk_ETZHFUR5_exports);
|
|
38
38
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
39
|
-
var
|
|
39
|
+
var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
|
|
40
40
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
41
|
-
var
|
|
42
|
-
var
|
|
41
|
+
var import_chunk_56ERTRFR = require("./chunk-56ERTRFR.js");
|
|
42
|
+
var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
|
|
43
43
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
44
|
-
var
|
|
44
|
+
var import_chunk_Y6KJKZQK = require("./chunk-Y6KJKZQK.js");
|
|
45
45
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
46
|
-
var
|
|
46
|
+
var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
|
|
47
47
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
48
48
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
49
49
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
50
50
|
var import_get_platform = require("@prisma/get-platform");
|
|
51
|
-
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
51
|
+
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QOTVZEEZ.require_function)());
|
|
52
52
|
var debug = (0, import_debug.default)("prisma:getConfig");
|
|
53
53
|
var SCHEMA_VALIDATION_ERROR_CODE = "P1012";
|
|
54
54
|
var GetConfigError = class extends Error {
|
|
@@ -65,7 +65,7 @@ ${detailsHeader} ${message}`;
|
|
|
65
65
|
}).exhaustive();
|
|
66
66
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
67
67
|
[Context: getConfig]`;
|
|
68
|
-
super((0,
|
|
68
|
+
super((0, import_chunk_56ERTRFR.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
69
69
|
this.name = "GetConfigError";
|
|
70
70
|
}
|
|
71
71
|
};
|
|
@@ -83,14 +83,14 @@ function resolveUrl(envValue) {
|
|
|
83
83
|
return urlFromValue ?? urlEnvVarValue;
|
|
84
84
|
}
|
|
85
85
|
async function getConfig(options) {
|
|
86
|
-
const debugErrorType = (0,
|
|
86
|
+
const debugErrorType = (0, import_chunk_KUMD5MBR.createDebugErrorType)(debug, "getConfigWasm");
|
|
87
87
|
debug(`Using getConfig Wasm`);
|
|
88
88
|
const configEither = (0, import_function.pipe)(
|
|
89
|
-
(0,
|
|
89
|
+
(0, import_chunk_4A5ZK522.tryCatch)(
|
|
90
90
|
() => {
|
|
91
91
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
|
92
92
|
debug("Triggering a Rust panic...");
|
|
93
|
-
|
|
93
|
+
import_chunk_Y6KJKZQK.prismaSchemaWasm.debug_panic();
|
|
94
94
|
}
|
|
95
95
|
const params = JSON.stringify({
|
|
96
96
|
prismaSchema: options.datamodel,
|
|
@@ -98,7 +98,7 @@ async function getConfig(options) {
|
|
|
98
98
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
|
99
99
|
env: process.env
|
|
100
100
|
});
|
|
101
|
-
const data =
|
|
101
|
+
const data = import_chunk_Y6KJKZQK.prismaSchemaWasm.get_config(params);
|
|
102
102
|
return data;
|
|
103
103
|
},
|
|
104
104
|
(e) => ({
|
|
@@ -107,11 +107,11 @@ async function getConfig(options) {
|
|
|
107
107
|
error: e
|
|
108
108
|
})
|
|
109
109
|
),
|
|
110
|
-
(0,
|
|
111
|
-
(0,
|
|
110
|
+
(0, import_chunk_4A5ZK522.map)((result) => ({ result })),
|
|
111
|
+
(0, import_chunk_4A5ZK522.chainW)(
|
|
112
112
|
({ result }) => (
|
|
113
113
|
// NOTE: this should never fail, as we expect returned values to be valid JSON-serializable strings
|
|
114
|
-
(0,
|
|
114
|
+
(0, import_chunk_4A5ZK522.tryCatch)(
|
|
115
115
|
() => JSON.parse(result),
|
|
116
116
|
(e) => ({
|
|
117
117
|
type: "parse-json",
|
|
@@ -121,18 +121,18 @@ async function getConfig(options) {
|
|
|
121
121
|
)
|
|
122
122
|
)
|
|
123
123
|
),
|
|
124
|
-
(0,
|
|
124
|
+
(0, import_chunk_4A5ZK522.chainW)((response) => {
|
|
125
125
|
if (response.errors.length > 0) {
|
|
126
|
-
return (0,
|
|
126
|
+
return (0, import_chunk_4A5ZK522.left)({
|
|
127
127
|
type: "validation-error",
|
|
128
128
|
reason: "(get-config wasm)",
|
|
129
129
|
error: response.errors
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
|
-
return (0,
|
|
132
|
+
return (0, import_chunk_4A5ZK522.right)(response.config);
|
|
133
133
|
})
|
|
134
134
|
);
|
|
135
|
-
if ((0,
|
|
135
|
+
if ((0, import_chunk_4A5ZK522.isRight)(configEither)) {
|
|
136
136
|
debug("config data retrieved without errors in getConfig Wasm");
|
|
137
137
|
const { right: data } = configEither;
|
|
138
138
|
for (const generator of data.generators) {
|
|
@@ -160,12 +160,12 @@ async function getConfig(options) {
|
|
|
160
160
|
return panic;
|
|
161
161
|
}
|
|
162
162
|
const errorOutput = e.error.message;
|
|
163
|
-
return new GetConfigError((0,
|
|
163
|
+
return new GetConfigError((0, import_chunk_KUMD5MBR.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
164
164
|
}).with({ type: "validation-error" }, (e) => {
|
|
165
165
|
return new GetConfigError({
|
|
166
166
|
_tag: "parsed",
|
|
167
167
|
errorCode: SCHEMA_VALIDATION_ERROR_CODE,
|
|
168
|
-
reason: (0,
|
|
168
|
+
reason: (0, import_chunk_KUMD5MBR.createSchemaValidationError)(e.reason),
|
|
169
169
|
message: formatErrors(e.error)
|
|
170
170
|
});
|
|
171
171
|
}).otherwise((e) => {
|
|
@@ -16,21 +16,21 @@ 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_EY6S56AZ_exports = {};
|
|
20
|
+
__export(chunk_EY6S56AZ_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(
|
|
27
|
+
module.exports = __toCommonJS(chunk_EY6S56AZ_exports);
|
|
28
28
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
29
|
-
var
|
|
29
|
+
var import_chunk_CZE6J5XE = require("./chunk-CZE6J5XE.js");
|
|
30
30
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
31
31
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
32
32
|
function lintSchema({ schemas }) {
|
|
33
|
-
const lintResult =
|
|
33
|
+
const lintResult = import_chunk_CZE6J5XE.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
|
34
34
|
const lintDiagnostics = JSON.parse(lintResult);
|
|
35
35
|
return lintDiagnostics;
|
|
36
36
|
}
|
|
@@ -26,33 +26,33 @@ 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_EYOPVHNV_exports = {};
|
|
30
|
+
__export(chunk_EYOPVHNV_exports, {
|
|
31
31
|
getEnginesInfo: () => getEnginesInfo,
|
|
32
32
|
getEnginesMetaInfo: () => getEnginesMetaInfo,
|
|
33
33
|
resolveEngine: () => resolveEngine
|
|
34
34
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
36
|
-
var
|
|
37
|
-
var
|
|
35
|
+
module.exports = __toCommonJS(chunk_EYOPVHNV_exports);
|
|
36
|
+
var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
|
|
37
|
+
var import_chunk_QL3K6JIN = require("./chunk-QL3K6JIN.js");
|
|
38
38
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
39
|
-
var
|
|
40
|
-
var
|
|
39
|
+
var import_chunk_GHYJGM56 = require("./chunk-GHYJGM56.js");
|
|
40
|
+
var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
|
|
41
41
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
42
42
|
var import_engines = require("@prisma/engines");
|
|
43
43
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
44
44
|
var import_path = __toESM(require("path"));
|
|
45
|
-
var import_function2 = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
46
|
-
var none2 =
|
|
47
|
-
var some2 =
|
|
45
|
+
var import_function2 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QOTVZEEZ.require_function)());
|
|
46
|
+
var none2 = import_chunk_4A5ZK522.none;
|
|
47
|
+
var some2 = import_chunk_4A5ZK522.some;
|
|
48
48
|
var getRight = function(ma) {
|
|
49
49
|
return ma._tag === "Left" ? none2 : some2(ma.right);
|
|
50
50
|
};
|
|
51
51
|
var _map = function(fa, f) {
|
|
52
|
-
return (0,
|
|
52
|
+
return (0, import_chunk_4A5ZK522.pipe)(fa, map(f));
|
|
53
53
|
};
|
|
54
54
|
var _ap = function(fab, fa) {
|
|
55
|
-
return (0,
|
|
55
|
+
return (0, import_chunk_4A5ZK522.pipe)(fab, ap(fa));
|
|
56
56
|
};
|
|
57
57
|
var URI = "Option";
|
|
58
58
|
var map = function(f) {
|
|
@@ -64,14 +64,14 @@ var Functor = {
|
|
|
64
64
|
URI,
|
|
65
65
|
map: _map
|
|
66
66
|
};
|
|
67
|
-
var as2 = (0,
|
|
68
|
-
var asUnit2 = (0,
|
|
67
|
+
var as2 = (0, import_chunk_4A5ZK522.dual)(2, (0, import_chunk_4A5ZK522.as)(Functor));
|
|
68
|
+
var asUnit2 = (0, import_chunk_4A5ZK522.asUnit)(Functor);
|
|
69
69
|
var ap = function(fa) {
|
|
70
70
|
return function(fab) {
|
|
71
71
|
return isNone(fab) ? none2 : isNone(fa) ? none2 : some2(fab.value(fa.value));
|
|
72
72
|
};
|
|
73
73
|
};
|
|
74
|
-
var flatMap = /* @__PURE__ */ (0,
|
|
74
|
+
var flatMap = /* @__PURE__ */ (0, import_chunk_4A5ZK522.dual)(2, function(ma, f) {
|
|
75
75
|
return isNone(ma) ? none2 : f(ma.value);
|
|
76
76
|
});
|
|
77
77
|
var Chain = {
|
|
@@ -80,7 +80,7 @@ var Chain = {
|
|
|
80
80
|
ap: _ap,
|
|
81
81
|
chain: flatMap
|
|
82
82
|
};
|
|
83
|
-
var orElse = (0,
|
|
83
|
+
var orElse = (0, import_chunk_4A5ZK522.dual)(2, function(self, that) {
|
|
84
84
|
return isNone(self) ? that() : self;
|
|
85
85
|
});
|
|
86
86
|
var fromEither2 = getRight;
|
|
@@ -88,7 +88,7 @@ var FromEither = {
|
|
|
88
88
|
URI,
|
|
89
89
|
fromEither: fromEither2
|
|
90
90
|
};
|
|
91
|
-
var isSome2 =
|
|
91
|
+
var isSome2 = import_chunk_4A5ZK522.isSome;
|
|
92
92
|
var isNone = function(fa) {
|
|
93
93
|
return fa._tag === "None";
|
|
94
94
|
};
|
|
@@ -99,8 +99,8 @@ var matchW = function(onNone, onSome) {
|
|
|
99
99
|
};
|
|
100
100
|
var match = matchW;
|
|
101
101
|
var fold = match;
|
|
102
|
-
var tap2 = /* @__PURE__ */ (0,
|
|
103
|
-
var tapEither2 = /* @__PURE__ */ (0,
|
|
102
|
+
var tap2 = /* @__PURE__ */ (0, import_chunk_4A5ZK522.dual)(2, (0, import_chunk_4A5ZK522.tap)(Chain));
|
|
103
|
+
var tapEither2 = /* @__PURE__ */ (0, import_chunk_4A5ZK522.dual)(2, (0, import_chunk_4A5ZK522.tapEither)(FromEither, Chain));
|
|
104
104
|
var fromNullable = function(a) {
|
|
105
105
|
return a == null ? none2 : some2(a);
|
|
106
106
|
};
|
|
@@ -133,15 +133,15 @@ function getEnginesInfo(enginesInfo) {
|
|
|
133
133
|
const resolved = (0, import_chunk_H3T4L34H.$)(enginesInfo).with({ fromEnvVar: import_chunk_H3T4L34H.N.when(isSome2) }, (_engineInfo) => {
|
|
134
134
|
return `, resolved by ${_engineInfo.fromEnvVar.value}`;
|
|
135
135
|
}).otherwise(() => "");
|
|
136
|
-
const absolutePath = (0, import_chunk_H3T4L34H.$)(enginesInfo).with({ path: import_chunk_H3T4L34H.N.when(
|
|
136
|
+
const absolutePath = (0, import_chunk_H3T4L34H.$)(enginesInfo).with({ path: import_chunk_H3T4L34H.N.when(import_chunk_4A5ZK522.isRight) }, (_engineInfo) => {
|
|
137
137
|
return _engineInfo.path.right;
|
|
138
|
-
}).with({ path: import_chunk_H3T4L34H.N.when(
|
|
138
|
+
}).with({ path: import_chunk_H3T4L34H.N.when(import_chunk_4A5ZK522.isLeft) }, (_engineInfo) => {
|
|
139
139
|
errors.push(_engineInfo.path.left);
|
|
140
140
|
return "E_CANNOT_RESOLVE_PATH";
|
|
141
141
|
}).exhaustive();
|
|
142
|
-
const version = (0, import_chunk_H3T4L34H.$)(enginesInfo).with({ version: import_chunk_H3T4L34H.N.when(
|
|
142
|
+
const version = (0, import_chunk_H3T4L34H.$)(enginesInfo).with({ version: import_chunk_H3T4L34H.N.when(import_chunk_4A5ZK522.isRight) }, (_engineInfo) => {
|
|
143
143
|
return _engineInfo.version.right;
|
|
144
|
-
}).with({ version: import_chunk_H3T4L34H.N.when(
|
|
144
|
+
}).with({ version: import_chunk_H3T4L34H.N.when(import_chunk_4A5ZK522.isLeft) }, (_engineInfo) => {
|
|
145
145
|
errors.push(_engineInfo.version.left);
|
|
146
146
|
return "E_CANNOT_RESOLVE_VERSION";
|
|
147
147
|
}).exhaustive();
|
|
@@ -157,15 +157,15 @@ async function resolveEngine(binaryName) {
|
|
|
157
157
|
const enginePathEither = await (0, import_function2.pipe)(
|
|
158
158
|
pathFromEnvOption,
|
|
159
159
|
fold(
|
|
160
|
-
() => (0,
|
|
161
|
-
(pathFromEnv) => (0,
|
|
160
|
+
() => (0, import_chunk_GHYJGM56.safeResolveBinary)(binaryName),
|
|
161
|
+
(pathFromEnv) => (0, import_chunk_4A5ZK522.right2)(pathFromEnv.path)
|
|
162
162
|
)
|
|
163
163
|
)();
|
|
164
164
|
const versionEither = await (0, import_function2.pipe)(
|
|
165
165
|
enginePathEither,
|
|
166
|
-
|
|
167
|
-
(0,
|
|
168
|
-
return (0,
|
|
166
|
+
import_chunk_4A5ZK522.fromEither,
|
|
167
|
+
(0, import_chunk_4A5ZK522.chain)((enginePath) => {
|
|
168
|
+
return (0, import_chunk_QL3K6JIN.safeGetEngineVersion)(enginePath, binaryName);
|
|
169
169
|
})
|
|
170
170
|
)();
|
|
171
171
|
const engineInfo = {
|
|
@@ -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_GCEA7FEH_exports = {};
|
|
20
|
+
__export(chunk_GCEA7FEH_exports, {
|
|
21
21
|
addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_GCEA7FEH_exports);
|
|
24
|
+
var import_chunk_VY6W7UY5 = require("./chunk-VY6W7UY5.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_VY6W7UY5.version]];
|
|
28
28
|
return `${message}
|
|
29
29
|
|
|
30
30
|
${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
|
|
@@ -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_GHYJGM56_exports = {};
|
|
30
|
+
__export(chunk_GHYJGM56_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_GHYJGM56_exports);
|
|
38
38
|
var import_chunk_RQPDQSHK = require("./chunk-RQPDQSHK.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_4A5ZK522 = require("./chunk-4A5ZK522.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_4A5ZK522.tryCatch2)(
|
|
94
94
|
() => resolveBinary(name, proposedPath),
|
|
95
95
|
(error) => error
|
|
96
96
|
);
|
|
@@ -26,24 +26,24 @@ 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_KUMD5MBR_exports = {};
|
|
30
|
+
__export(chunk_KUMD5MBR_exports, {
|
|
31
31
|
createDebugErrorType: () => createDebugErrorType,
|
|
32
32
|
createSchemaValidationError: () => createSchemaValidationError,
|
|
33
33
|
parseQueryEngineError: () => parseQueryEngineError,
|
|
34
34
|
unlinkTempDatamodelPath: () => unlinkTempDatamodelPath
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(chunk_KUMD5MBR_exports);
|
|
37
37
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
|
|
39
39
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
40
|
-
var
|
|
40
|
+
var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.js");
|
|
41
41
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
|
42
42
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
43
43
|
var import_fs = __toESM(require("fs"));
|
|
44
|
-
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
44
|
+
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QOTVZEEZ.require_function)());
|
|
45
45
|
function unlinkTempDatamodelPath(options, tempDatamodelPath) {
|
|
46
|
-
return (0,
|
|
46
|
+
return (0, import_chunk_4A5ZK522.tryCatch2)(
|
|
47
47
|
() => {
|
|
48
48
|
if (!options.datamodelPath && tempDatamodelPath) {
|
|
49
49
|
return import_fs.default.promises.unlink(tempDatamodelPath);
|
|
@@ -66,11 +66,11 @@ function createSchemaValidationError(reason) {
|
|
|
66
66
|
}
|
|
67
67
|
function parseQueryEngineError({ errorOutput, reason }) {
|
|
68
68
|
const actualError = (0, import_function.pipe)(
|
|
69
|
-
(0,
|
|
69
|
+
(0, import_chunk_4A5ZK522.tryCatch)(
|
|
70
70
|
() => JSON.parse(errorOutput),
|
|
71
71
|
() => ({ _tag: "unparsed", message: errorOutput, reason })
|
|
72
72
|
),
|
|
73
|
-
(0,
|
|
73
|
+
(0, import_chunk_4A5ZK522.map)((errorOutputAsJSON) => {
|
|
74
74
|
const defaultMessage = (0, import_chunk_PG5FDKSF.red)((0, import_chunk_PG5FDKSF.bold)((0, import_chunk_WMIBAVWZ.relativizePathInPSLError)(errorOutputAsJSON.message)));
|
|
75
75
|
const getConfigErrorInit = (0, import_chunk_H3T4L34H.$)(errorOutputAsJSON).with({ error_code: "P1012" }, (eJSON) => {
|
|
76
76
|
return {
|
|
@@ -89,7 +89,7 @@ function parseQueryEngineError({ errorOutput, reason }) {
|
|
|
89
89
|
});
|
|
90
90
|
return { _tag: "parsed", message: defaultMessage, ...getConfigErrorInit };
|
|
91
91
|
}),
|
|
92
|
-
(0,
|
|
92
|
+
(0, import_chunk_4A5ZK522.getOrElseW)(import_function.identity)
|
|
93
93
|
);
|
|
94
94
|
return actualError;
|
|
95
95
|
}
|
|
@@ -26,25 +26,25 @@ 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_LNOKNOBG_exports = {};
|
|
30
|
+
__export(chunk_LNOKNOBG_exports, {
|
|
31
31
|
ValidateError: () => ValidateError,
|
|
32
32
|
validate: () => validate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_LNOKNOBG_exports);
|
|
35
35
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_KUMD5MBR = require("./chunk-KUMD5MBR.js");
|
|
37
37
|
var import_chunk_WMIBAVWZ = require("./chunk-WMIBAVWZ.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
38
|
+
var import_chunk_GCEA7FEH = require("./chunk-GCEA7FEH.js");
|
|
39
|
+
var import_chunk_QOTVZEEZ = require("./chunk-QOTVZEEZ.js");
|
|
40
40
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
41
|
-
var
|
|
41
|
+
var import_chunk_CZE6J5XE = require("./chunk-CZE6J5XE.js");
|
|
42
42
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
43
|
-
var
|
|
43
|
+
var import_chunk_4A5ZK522 = require("./chunk-4A5ZK522.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"));
|
|
47
|
-
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0,
|
|
47
|
+
var import_function = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_QOTVZEEZ.require_function)());
|
|
48
48
|
var debug = (0, import_debug.default)("prisma:validate");
|
|
49
49
|
var ValidateError = class extends Error {
|
|
50
50
|
constructor(params) {
|
|
@@ -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_GCEA7FEH.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_KUMD5MBR.createDebugErrorType)(debug, "validateWasm");
|
|
69
69
|
debug(`Using validate Wasm`);
|
|
70
70
|
const validateEither = (0, import_function.pipe)(
|
|
71
|
-
(0,
|
|
71
|
+
(0, import_chunk_4A5ZK522.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_CZE6J5XE.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_CZE6J5XE.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_4A5ZK522.isRight)(validateEither)) {
|
|
91
91
|
return;
|
|
92
92
|
}
|
|
93
93
|
const error = (0, import_chunk_H3T4L34H.$)(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_KUMD5MBR.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
117
117
|
}).exhaustive();
|
|
118
118
|
throw error;
|
|
119
119
|
}
|
|
@@ -26,8 +26,8 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export2(
|
|
29
|
+
var chunk_NYIOBR7P_exports = {};
|
|
30
|
+
__export2(chunk_NYIOBR7P_exports, {
|
|
31
31
|
checkTypeScriptVersion: () => checkTypeScriptVersion,
|
|
32
32
|
checkUnsupportedDataProxy: () => checkUnsupportedDataProxy,
|
|
33
33
|
checkYarnVersion: () => checkYarnVersion,
|
|
@@ -56,7 +56,7 @@ __export2(chunk_KRU3ZK3W_exports, {
|
|
|
56
56
|
sendPanic: () => sendPanic,
|
|
57
57
|
skipIndex: () => skipIndex
|
|
58
58
|
});
|
|
59
|
-
module.exports = __toCommonJS2(
|
|
59
|
+
module.exports = __toCommonJS2(chunk_NYIOBR7P_exports);
|
|
60
60
|
var import_chunk_IABMG3F4 = require("./chunk-IABMG3F4.js");
|
|
61
61
|
var import_chunk_FTS2IEWX = require("./chunk-FTS2IEWX.js");
|
|
62
62
|
var import_chunk_EUTJYQDW = require("./chunk-EUTJYQDW.js");
|
|
@@ -81,13 +81,13 @@ var import_chunk_XLYQ6PQW = require("./chunk-XLYQ6PQW.js");
|
|
|
81
81
|
var import_chunk_EPJYKNCQ = require("./chunk-EPJYKNCQ.js");
|
|
82
82
|
var import_chunk_ODI3VNBD = require("./chunk-ODI3VNBD.js");
|
|
83
83
|
var import_chunk_TSJICM5S = require("./chunk-TSJICM5S.js");
|
|
84
|
-
var
|
|
85
|
-
var
|
|
86
|
-
var
|
|
87
|
-
var
|
|
84
|
+
var import_chunk_EY6S56AZ = require("./chunk-EY6S56AZ.js");
|
|
85
|
+
var import_chunk_2NJOBWJS = require("./chunk-2NJOBWJS.js");
|
|
86
|
+
var import_chunk_ERFLQLMI = require("./chunk-ERFLQLMI.js");
|
|
87
|
+
var import_chunk_OR67YWXT = require("./chunk-OR67YWXT.js");
|
|
88
88
|
var import_chunk_YRBRUREX = require("./chunk-YRBRUREX.js");
|
|
89
89
|
var import_chunk_H3T4L34H = require("./chunk-H3T4L34H.js");
|
|
90
|
-
var
|
|
90
|
+
var import_chunk_CZE6J5XE = require("./chunk-CZE6J5XE.js");
|
|
91
91
|
var import_chunk_MUPZUVSI = require("./chunk-MUPZUVSI.js");
|
|
92
92
|
var import_chunk_A4QWQE3W = require("./chunk-A4QWQE3W.js");
|
|
93
93
|
var import_chunk_2B26F5N3 = require("./chunk-2B26F5N3.js");
|
|
@@ -15517,7 +15517,7 @@ async function readSchemaFromDirectory(schemaPath2) {
|
|
|
15517
15517
|
}
|
|
15518
15518
|
const files = await (0, import_schema_files_loader.loadSchemaFiles)(schemaPath2);
|
|
15519
15519
|
debug2("Loading config");
|
|
15520
|
-
const config2 = await (0,
|
|
15520
|
+
const config2 = await (0, import_chunk_ERFLQLMI.getConfig)({
|
|
15521
15521
|
datamodel: files,
|
|
15522
15522
|
ignoreEnvVarErrors: true
|
|
15523
15523
|
});
|
|
@@ -15909,8 +15909,8 @@ async function checkUnsupportedDataProxyMessage(command, args, implicitSchema) {
|
|
|
15909
15909
|
if (argName.includes("schema")) {
|
|
15910
15910
|
await loadEnvFile({ schemaPath: argValue, printMessage: false });
|
|
15911
15911
|
const datamodel = await import_fs.default.promises.readFile(argValue, "utf-8");
|
|
15912
|
-
const config2 = await (0,
|
|
15913
|
-
const url = (0,
|
|
15912
|
+
const config2 = await (0, import_chunk_ERFLQLMI.getConfig)({ datamodel, ignoreEnvVarErrors: true });
|
|
15913
|
+
const url = (0, import_chunk_ERFLQLMI.resolveUrl)((0, import_chunk_ERFLQLMI.getEffectiveUrl)(config2.datasources[0]));
|
|
15914
15914
|
if (url?.startsWith("prisma://")) {
|
|
15915
15915
|
return forbiddenCmdWithDataProxyFlagMessage(command);
|
|
15916
15916
|
}
|
|
@@ -16113,7 +16113,7 @@ async function getGenerators(options) {
|
|
|
16113
16113
|
prismaPath = binaryPathsWithEngineType[queryEngineBinaryType][binaryTarget];
|
|
16114
16114
|
}
|
|
16115
16115
|
}
|
|
16116
|
-
const config = await (0,
|
|
16116
|
+
const config = await (0, import_chunk_ERFLQLMI.getConfig)({
|
|
16117
16117
|
datamodel: schemas,
|
|
16118
16118
|
datamodelPath: schemaPath,
|
|
16119
16119
|
prismaPath,
|
|
@@ -16124,7 +16124,7 @@ async function getGenerators(options) {
|
|
|
16124
16124
|
}
|
|
16125
16125
|
(0, import_chunk_5FJ3MENK.printConfigWarnings)(config.warnings);
|
|
16126
16126
|
const previewFeatures = (0, import_chunk_TSJICM5S.extractPreviewFeatures)(config);
|
|
16127
|
-
const dmmf = await (0,
|
|
16127
|
+
const dmmf = await (0, import_chunk_OR67YWXT.getDMMF)({
|
|
16128
16128
|
datamodel: schemas,
|
|
16129
16129
|
datamodelPath: schemaPath,
|
|
16130
16130
|
prismaPath,
|
|
@@ -16185,7 +16185,7 @@ The generator needs to either define the \`defaultOutput\` path in the manifest
|
|
|
16185
16185
|
fromEnvVar: "null"
|
|
16186
16186
|
};
|
|
16187
16187
|
}
|
|
16188
|
-
const datamodel = (0,
|
|
16188
|
+
const datamodel = (0, import_chunk_2NJOBWJS.mergeSchemas)({ schemas });
|
|
16189
16189
|
const envPaths2 = await getEnvPaths(schemaPath, { cwd: generator.output.value });
|
|
16190
16190
|
const options2 = {
|
|
16191
16191
|
datamodel,
|
|
@@ -16267,7 +16267,7 @@ generator gen {
|
|
|
16267
16267
|
debug6({ generatorBinaryPaths });
|
|
16268
16268
|
generator.setBinaryPaths(generatorBinaryPaths);
|
|
16269
16269
|
if (engineVersion !== version && generator.options && generator.manifest.requiresEngines.includes(queryEngineType) && generatorBinaryPaths[queryEngineType] && generatorBinaryPaths[queryEngineType]?.[binaryTarget]) {
|
|
16270
|
-
const customDmmf = await (0,
|
|
16270
|
+
const customDmmf = await (0, import_chunk_OR67YWXT.getDMMF)({
|
|
16271
16271
|
datamodel: schemas,
|
|
16272
16272
|
datamodelPath: schemaPath,
|
|
16273
16273
|
prismaPath: generatorBinaryPaths[queryEngineType]?.[binaryTarget],
|
|
@@ -16565,7 +16565,7 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
16565
16565
|
if (process.env.FORCE_PANIC_PRISMA_SCHEMA) {
|
|
16566
16566
|
handleFormatPanic(
|
|
16567
16567
|
() => {
|
|
16568
|
-
|
|
16568
|
+
import_chunk_CZE6J5XE.prismaSchemaWasm.debug_panic();
|
|
16569
16569
|
},
|
|
16570
16570
|
{ schemas: schemas2 }
|
|
16571
16571
|
);
|
|
@@ -16585,12 +16585,12 @@ async function formatSchema({ schemas: schemas2 }, inputFormattingOptions) {
|
|
|
16585
16585
|
() => {
|
|
16586
16586
|
const formattedMultipleSchemasRaw = formatWasm(JSON.stringify(schemas2), documentFormattingParams);
|
|
16587
16587
|
const formattedMultipleSchemas2 = JSON.parse(formattedMultipleSchemasRaw);
|
|
16588
|
-
const lintDiagnostics2 = (0,
|
|
16588
|
+
const lintDiagnostics2 = (0, import_chunk_EY6S56AZ.lintSchema)({ schemas: formattedMultipleSchemas2 });
|
|
16589
16589
|
return { formattedMultipleSchemas: formattedMultipleSchemas2, lintDiagnostics: lintDiagnostics2 };
|
|
16590
16590
|
},
|
|
16591
16591
|
{ schemas: schemas2 }
|
|
16592
16592
|
);
|
|
16593
|
-
const lintWarnings = (0,
|
|
16593
|
+
const lintWarnings = (0, import_chunk_EY6S56AZ.getLintWarningsAsText)(lintDiagnostics);
|
|
16594
16594
|
if (lintWarnings && import_chunk_AZNLB67U.logger_exports.should.warn()) {
|
|
16595
16595
|
console.warn(lintWarnings);
|
|
16596
16596
|
}
|
|
@@ -16620,7 +16620,7 @@ function handleFormatPanic(tryCb, { schemas: schemas2 }) {
|
|
|
16620
16620
|
}
|
|
16621
16621
|
}
|
|
16622
16622
|
function formatWasm(schema, documentFormattingParams) {
|
|
16623
|
-
const formattedSchema =
|
|
16623
|
+
const formattedSchema = import_chunk_CZE6J5XE.prismaSchemaWasm.format(schema, JSON.stringify(documentFormattingParams));
|
|
16624
16624
|
return formattedSchema;
|
|
16625
16625
|
}
|
|
16626
16626
|
/*! Bundled license information:
|