@prisma/internals 7.2.0 → 7.3.0-integration-fix-6-19-0-cloudflare-accelerate-engine.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-QMSPMDFJ.js → chunk-262R2PBW.js} +5 -5
- package/dist/chunk-3FP46GUV.js +471 -0
- package/dist/chunk-46ABODUM.js +186 -0
- package/dist/{chunk-GJSFP4V4.js → chunk-4CGPN5SR.js} +9 -3
- package/dist/{chunk-KAH2NIWC.js → chunk-4JCVHBYR.js} +6 -6
- package/dist/{chunk-EIO44IYO.js → chunk-55ZV2II2.js} +38 -16
- package/dist/{chunk-AADMLOWX.js → chunk-5ETP2F4G.js} +5 -5
- package/dist/{chunk-UWK6LIYC.js → chunk-5PEHPZHO.js} +11 -11
- package/dist/{chunk-T6BPU44Y.js → chunk-656EKQL7.js} +5 -5
- package/dist/{chunk-MW6NA5W7.js → chunk-65XSDXPY.js} +13 -13
- package/dist/chunk-6TTRTZXU.js +37 -0
- package/dist/{chunk-Q5XW7CMJ.js → chunk-75BIJ5PX.js} +9 -9
- package/dist/{chunk-DXWYZA7B.js → chunk-7QC5VORA.js} +4 -3
- package/dist/{chunk-AQOVQMBO.js → chunk-7QKLIARO.js} +10 -8
- package/dist/{chunk-CQVWHHIJ.js → chunk-AX5N26KG.js} +6 -11
- package/dist/{chunk-NBWRGVYR.js → chunk-BCQZ6JQE.js} +6 -4
- package/dist/{chunk-BXIKQUP5.js → chunk-BVJP43JS.js} +7 -7
- package/dist/chunk-D4VDA2TZ.js +66 -0
- package/dist/{chunk-G6VGFCRW.js → chunk-D6JNJJI7.js} +146 -58
- package/dist/chunk-DZYINYAA.js +68 -0
- package/dist/{chunk-C6MDA273.js → chunk-E2QTLJH5.js} +13 -13
- package/dist/chunk-ERSH2BQA.js +58 -0
- package/dist/{chunk-2BXDHSSY.js → chunk-EYVG6XQS.js} +68 -56
- package/dist/{chunk-GH2WAX5Y.js → chunk-F2OZV76L.js} +7 -7
- package/dist/{chunk-R3J2O23S.js → chunk-FCYHZHVW.js} +4 -4
- package/dist/{chunk-DQWKFZPY.js → chunk-FYZCPL2Z.js} +7 -4
- package/dist/{chunk-2GPDFPDR.js → chunk-GMW36QQF.js} +7 -7
- package/dist/{chunk-OVTE2A4Y.js → chunk-H43XC5ET.js} +5 -5
- package/dist/{chunk-YXCPS3WU.js → chunk-HFFWZTVM.js} +15 -5
- package/dist/chunk-HO5HRHFZ.js +30 -0
- package/dist/chunk-HW5RCZSE.js +1 -0
- package/dist/{chunk-YV4IFLW4.js → chunk-JOIIWB3U.js} +129 -128
- package/dist/chunk-KDHESRKE.js +49 -0
- package/dist/{chunk-KJKLC73N.js → chunk-KH7FI42S.js} +11 -11
- package/dist/chunk-L6KOIJJ5.js +125 -0
- package/dist/{chunk-3U4QB2G3.js → chunk-LYFOJ5NK.js} +6 -4
- package/dist/{chunk-Q75TMXCR.js → chunk-OAT7ZJED.js} +20 -7
- package/dist/{chunk-GCMOJALQ.js → chunk-OPLMJ5WZ.js} +146 -58
- package/dist/{chunk-SP2ETLT2.js → chunk-OSHZ4P3G.js} +5 -5
- package/dist/{chunk-6JD4VENT.js → chunk-OWUYXGDF.js} +12 -12
- package/dist/chunk-PZMRR772.js +41 -0
- package/dist/{chunk-HFLFMWOT.js → chunk-QDT7TGYZ.js} +5 -5
- package/dist/{chunk-QRW4PODC.js → chunk-QLOP3Z4E.js} +38 -16
- package/dist/{chunk-HNOCAIKC.js → chunk-QPQF4VGD.js} +12 -12
- package/dist/chunk-RFB2U4GQ.js +41 -0
- package/dist/{chunk-5I4ERIIY.js → chunk-RS2R7COT.js} +9 -3
- package/dist/chunk-T2PM5TKT.js +55 -0
- package/dist/{chunk-G7GV3UAA.js → chunk-THADADEM.js} +9 -7
- package/dist/{chunk-5BRXEOYH.js → chunk-TQFONRJP.js} +5 -5
- package/dist/{chunk-WSZXPLJQ.js → chunk-TZJROXB3.js} +4 -4
- package/dist/{chunk-YJVCIN4F.js → chunk-UHI6VYFX.js} +14 -16
- package/dist/{chunk-NYNXYKR4.js → chunk-UQUWZJVN.js} +7 -7
- package/dist/{chunk-P3FYX4Y7.js → chunk-W6J5YFD2.js} +5 -5
- package/dist/{chunk-J3JTMPWZ.js → chunk-WDPDHAFW.js} +5 -5
- package/dist/{chunk-ARC7TW3L.js → chunk-WFNB7VRA.js} +14 -4
- package/dist/{chunk-P47PM3SY.js → chunk-WKP2TVYB.js} +5 -5
- package/dist/cli/checkUnsupportedDataProxy.d.ts +9 -7
- package/dist/cli/checkUnsupportedDataProxy.js +65 -53
- package/dist/cli/checkUnsupportedSchemaEngineWasm.d.ts +22 -0
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +135 -0
- package/dist/cli/directoryConfig.d.ts +2 -5
- package/dist/cli/directoryConfig.js +2 -2
- package/dist/cli/getGeneratorSuccessMessage.js +3 -2
- package/dist/cli/getSchema.d.ts +20 -28
- package/dist/cli/getSchema.js +5 -7
- package/dist/cli/hashes.d.ts +1 -2
- package/dist/cli/hashes.js +4 -4
- package/dist/cli/schemaContext.d.ts +22 -5
- package/dist/cli/schemaContext.js +65 -54
- package/dist/cli/types.d.ts +1 -1
- package/dist/client/getClientEngineType.d.ts +7 -0
- package/dist/client/getClientEngineType.js +26 -0
- package/dist/convertCredentials.js +4 -4
- package/dist/dotenvExpand.d.ts +35 -0
- package/dist/dotenvExpand.js +25 -0
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +64 -52
- package/dist/engine-commands/getConfig.d.ts +5 -1
- package/dist/engine-commands/getConfig.js +13 -10
- package/dist/engine-commands/getDmmf.js +10 -10
- package/dist/engine-commands/getEngineVersion.js +9 -5
- package/dist/engine-commands/getEnginesInfo.d.ts +1 -0
- package/dist/engine-commands/getEnginesInfo.js +9 -6
- package/dist/engine-commands/index.d.ts +1 -1
- package/dist/engine-commands/index.js +76 -62
- package/dist/engine-commands/lintSchema.js +9 -9
- package/dist/engine-commands/mergeSchemas.js +10 -10
- package/dist/engine-commands/queryEngineCommons.js +6 -6
- package/dist/engine-commands/validate.js +10 -10
- package/dist/get-generators/getGenerators.d.ts +2 -0
- package/dist/get-generators/getGenerators.js +67 -55
- package/dist/get-generators/utils/binaryTypeToEngineType.js +2 -2
- package/dist/get-generators/utils/engineTypeToBinaryType.js +2 -2
- package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -4
- package/dist/getPackedPackage.js +3 -3
- package/dist/index.d.ts +19 -5
- package/dist/index.js +125 -99
- package/dist/resolveBinary.js +7 -7
- package/dist/schemaEngineCommands.js +8 -8
- package/dist/sendPanic.js +3 -2
- package/dist/tracing/types.d.ts +54 -0
- package/dist/tracing/types.js +2 -0
- package/dist/types.d.ts +0 -15
- package/dist/utils/__tests__/maskSchema.test.js +23 -0
- package/dist/utils/byline.d.ts +4 -0
- package/dist/utils/byline.js +28 -0
- package/dist/utils/canPrompt.js +3 -3
- package/dist/utils/cloudflareD1.d.ts +5 -0
- package/dist/utils/cloudflareD1.js +27 -0
- package/dist/utils/fs-functional.js +10 -10
- package/dist/utils/fs-utils.js +8 -8
- package/dist/utils/getEnvPaths.d.ts +14 -0
- package/dist/utils/{validatePrismaConfigWithDatasource.js → getEnvPaths.js} +8 -7
- package/dist/utils/getMigrateConfigDir.d.ts +2 -0
- package/dist/utils/getMigrateConfigDir.js +25 -0
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/handleEngineLoadingErrors.d.ts +8 -0
- package/dist/utils/handleEngineLoadingErrors.js +27 -0
- package/dist/utils/handlePanic.js +7 -6
- package/dist/utils/load.d.ts +6 -0
- package/dist/utils/load.js +28 -0
- package/dist/utils/loadEnvFile.d.ts +10 -0
- package/dist/utils/loadEnvFile.js +30 -0
- package/dist/utils/maskSchema.d.ts +4 -0
- package/dist/utils/maskSchema.js +27 -0
- package/dist/utils/missingDatasource.js +2 -2
- package/dist/utils/missingGeneratorMessage.js +4 -4
- package/dist/utils/serializeQueryEngineName.d.ts +4 -0
- package/dist/utils/serializeQueryEngineName.js +25 -0
- package/dist/utils/toSchemasContainer.d.ts +1 -1
- package/dist/utils/toSchemasContainer.js +3 -3
- package/dist/utils/tryLoadEnvs.d.ts +25 -0
- package/dist/utils/tryLoadEnvs.js +30 -0
- package/dist/wasm.js +5 -5
- package/package.json +17 -15
- package/dist/chunk-QKQKSUQO.js +0 -46
- package/dist/utils/validatePrismaConfigWithDatasource.d.ts +0 -17
|
@@ -16,139 +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_JOIIWB3U_exports = {};
|
|
20
|
+
__export(chunk_JOIIWB3U_exports, {
|
|
21
21
|
require_globby: () => require_globby,
|
|
22
22
|
require_is_glob: () => require_is_glob,
|
|
23
|
+
require_out: () => require_out4,
|
|
23
24
|
require_slash: () => require_slash
|
|
24
25
|
});
|
|
25
|
-
module.exports = __toCommonJS(
|
|
26
|
+
module.exports = __toCommonJS(chunk_JOIIWB3U_exports);
|
|
26
27
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
|
27
|
-
var require_array_union = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
28
|
-
"../../node_modules/.pnpm/array-union@2.1.0/node_modules/array-union/index.js"(exports, module2) {
|
|
29
|
-
"use strict";
|
|
30
|
-
module2.exports = (...arguments_) => {
|
|
31
|
-
return [...new Set([].concat(...arguments_))];
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
var require_merge2 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
36
|
-
"../../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js"(exports, module2) {
|
|
37
|
-
"use strict";
|
|
38
|
-
var Stream = (0, import_chunk_4VNS5WPM.__require)("stream");
|
|
39
|
-
var PassThrough = Stream.PassThrough;
|
|
40
|
-
var slice = Array.prototype.slice;
|
|
41
|
-
module2.exports = merge2;
|
|
42
|
-
function merge2() {
|
|
43
|
-
const streamsQueue = [];
|
|
44
|
-
const args = slice.call(arguments);
|
|
45
|
-
let merging = false;
|
|
46
|
-
let options = args[args.length - 1];
|
|
47
|
-
if (options && !Array.isArray(options) && options.pipe == null) {
|
|
48
|
-
args.pop();
|
|
49
|
-
} else {
|
|
50
|
-
options = {};
|
|
51
|
-
}
|
|
52
|
-
const doEnd = options.end !== false;
|
|
53
|
-
const doPipeError = options.pipeError === true;
|
|
54
|
-
if (options.objectMode == null) {
|
|
55
|
-
options.objectMode = true;
|
|
56
|
-
}
|
|
57
|
-
if (options.highWaterMark == null) {
|
|
58
|
-
options.highWaterMark = 64 * 1024;
|
|
59
|
-
}
|
|
60
|
-
const mergedStream = PassThrough(options);
|
|
61
|
-
function addStream() {
|
|
62
|
-
for (let i = 0, len = arguments.length; i < len; i++) {
|
|
63
|
-
streamsQueue.push(pauseStreams(arguments[i], options));
|
|
64
|
-
}
|
|
65
|
-
mergeStream();
|
|
66
|
-
return this;
|
|
67
|
-
}
|
|
68
|
-
function mergeStream() {
|
|
69
|
-
if (merging) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
merging = true;
|
|
73
|
-
let streams = streamsQueue.shift();
|
|
74
|
-
if (!streams) {
|
|
75
|
-
process.nextTick(endStream);
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
|
-
if (!Array.isArray(streams)) {
|
|
79
|
-
streams = [streams];
|
|
80
|
-
}
|
|
81
|
-
let pipesCount = streams.length + 1;
|
|
82
|
-
function next() {
|
|
83
|
-
if (--pipesCount > 0) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
merging = false;
|
|
87
|
-
mergeStream();
|
|
88
|
-
}
|
|
89
|
-
function pipe(stream) {
|
|
90
|
-
function onend() {
|
|
91
|
-
stream.removeListener("merge2UnpipeEnd", onend);
|
|
92
|
-
stream.removeListener("end", onend);
|
|
93
|
-
if (doPipeError) {
|
|
94
|
-
stream.removeListener("error", onerror);
|
|
95
|
-
}
|
|
96
|
-
next();
|
|
97
|
-
}
|
|
98
|
-
function onerror(err) {
|
|
99
|
-
mergedStream.emit("error", err);
|
|
100
|
-
}
|
|
101
|
-
if (stream._readableState.endEmitted) {
|
|
102
|
-
return next();
|
|
103
|
-
}
|
|
104
|
-
stream.on("merge2UnpipeEnd", onend);
|
|
105
|
-
stream.on("end", onend);
|
|
106
|
-
if (doPipeError) {
|
|
107
|
-
stream.on("error", onerror);
|
|
108
|
-
}
|
|
109
|
-
stream.pipe(mergedStream, { end: false });
|
|
110
|
-
stream.resume();
|
|
111
|
-
}
|
|
112
|
-
for (let i = 0; i < streams.length; i++) {
|
|
113
|
-
pipe(streams[i]);
|
|
114
|
-
}
|
|
115
|
-
next();
|
|
116
|
-
}
|
|
117
|
-
function endStream() {
|
|
118
|
-
merging = false;
|
|
119
|
-
mergedStream.emit("queueDrain");
|
|
120
|
-
if (doEnd) {
|
|
121
|
-
mergedStream.end();
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
mergedStream.setMaxListeners(0);
|
|
125
|
-
mergedStream.add = addStream;
|
|
126
|
-
mergedStream.on("unpipe", function(stream) {
|
|
127
|
-
stream.emit("merge2UnpipeEnd");
|
|
128
|
-
});
|
|
129
|
-
if (args.length) {
|
|
130
|
-
addStream.apply(null, args);
|
|
131
|
-
}
|
|
132
|
-
return mergedStream;
|
|
133
|
-
}
|
|
134
|
-
function pauseStreams(streams, options) {
|
|
135
|
-
if (!Array.isArray(streams)) {
|
|
136
|
-
if (!streams._readableState && streams.pipe) {
|
|
137
|
-
streams = streams.pipe(PassThrough(options));
|
|
138
|
-
}
|
|
139
|
-
if (!streams._readableState || !streams.pause || !streams.pipe) {
|
|
140
|
-
throw new Error("Only readable stream can be merged.");
|
|
141
|
-
}
|
|
142
|
-
streams.pause();
|
|
143
|
-
} else {
|
|
144
|
-
for (let i = 0, len = streams.length; i < len; i++) {
|
|
145
|
-
streams[i] = pauseStreams(streams[i], options);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
return streams;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
28
|
var require_array = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
153
29
|
"../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/array.js"(exports) {
|
|
154
30
|
"use strict";
|
|
@@ -3314,6 +3190,123 @@ var require_pattern = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
3314
3190
|
exports.isAbsolute = isAbsolute;
|
|
3315
3191
|
}
|
|
3316
3192
|
});
|
|
3193
|
+
var require_merge2 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
3194
|
+
"../../node_modules/.pnpm/merge2@1.4.1/node_modules/merge2/index.js"(exports, module2) {
|
|
3195
|
+
"use strict";
|
|
3196
|
+
var Stream = (0, import_chunk_4VNS5WPM.__require)("stream");
|
|
3197
|
+
var PassThrough = Stream.PassThrough;
|
|
3198
|
+
var slice = Array.prototype.slice;
|
|
3199
|
+
module2.exports = merge2;
|
|
3200
|
+
function merge2() {
|
|
3201
|
+
const streamsQueue = [];
|
|
3202
|
+
const args = slice.call(arguments);
|
|
3203
|
+
let merging = false;
|
|
3204
|
+
let options = args[args.length - 1];
|
|
3205
|
+
if (options && !Array.isArray(options) && options.pipe == null) {
|
|
3206
|
+
args.pop();
|
|
3207
|
+
} else {
|
|
3208
|
+
options = {};
|
|
3209
|
+
}
|
|
3210
|
+
const doEnd = options.end !== false;
|
|
3211
|
+
const doPipeError = options.pipeError === true;
|
|
3212
|
+
if (options.objectMode == null) {
|
|
3213
|
+
options.objectMode = true;
|
|
3214
|
+
}
|
|
3215
|
+
if (options.highWaterMark == null) {
|
|
3216
|
+
options.highWaterMark = 64 * 1024;
|
|
3217
|
+
}
|
|
3218
|
+
const mergedStream = PassThrough(options);
|
|
3219
|
+
function addStream() {
|
|
3220
|
+
for (let i = 0, len = arguments.length; i < len; i++) {
|
|
3221
|
+
streamsQueue.push(pauseStreams(arguments[i], options));
|
|
3222
|
+
}
|
|
3223
|
+
mergeStream();
|
|
3224
|
+
return this;
|
|
3225
|
+
}
|
|
3226
|
+
function mergeStream() {
|
|
3227
|
+
if (merging) {
|
|
3228
|
+
return;
|
|
3229
|
+
}
|
|
3230
|
+
merging = true;
|
|
3231
|
+
let streams = streamsQueue.shift();
|
|
3232
|
+
if (!streams) {
|
|
3233
|
+
process.nextTick(endStream);
|
|
3234
|
+
return;
|
|
3235
|
+
}
|
|
3236
|
+
if (!Array.isArray(streams)) {
|
|
3237
|
+
streams = [streams];
|
|
3238
|
+
}
|
|
3239
|
+
let pipesCount = streams.length + 1;
|
|
3240
|
+
function next() {
|
|
3241
|
+
if (--pipesCount > 0) {
|
|
3242
|
+
return;
|
|
3243
|
+
}
|
|
3244
|
+
merging = false;
|
|
3245
|
+
mergeStream();
|
|
3246
|
+
}
|
|
3247
|
+
function pipe(stream) {
|
|
3248
|
+
function onend() {
|
|
3249
|
+
stream.removeListener("merge2UnpipeEnd", onend);
|
|
3250
|
+
stream.removeListener("end", onend);
|
|
3251
|
+
if (doPipeError) {
|
|
3252
|
+
stream.removeListener("error", onerror);
|
|
3253
|
+
}
|
|
3254
|
+
next();
|
|
3255
|
+
}
|
|
3256
|
+
function onerror(err) {
|
|
3257
|
+
mergedStream.emit("error", err);
|
|
3258
|
+
}
|
|
3259
|
+
if (stream._readableState.endEmitted) {
|
|
3260
|
+
return next();
|
|
3261
|
+
}
|
|
3262
|
+
stream.on("merge2UnpipeEnd", onend);
|
|
3263
|
+
stream.on("end", onend);
|
|
3264
|
+
if (doPipeError) {
|
|
3265
|
+
stream.on("error", onerror);
|
|
3266
|
+
}
|
|
3267
|
+
stream.pipe(mergedStream, { end: false });
|
|
3268
|
+
stream.resume();
|
|
3269
|
+
}
|
|
3270
|
+
for (let i = 0; i < streams.length; i++) {
|
|
3271
|
+
pipe(streams[i]);
|
|
3272
|
+
}
|
|
3273
|
+
next();
|
|
3274
|
+
}
|
|
3275
|
+
function endStream() {
|
|
3276
|
+
merging = false;
|
|
3277
|
+
mergedStream.emit("queueDrain");
|
|
3278
|
+
if (doEnd) {
|
|
3279
|
+
mergedStream.end();
|
|
3280
|
+
}
|
|
3281
|
+
}
|
|
3282
|
+
mergedStream.setMaxListeners(0);
|
|
3283
|
+
mergedStream.add = addStream;
|
|
3284
|
+
mergedStream.on("unpipe", function(stream) {
|
|
3285
|
+
stream.emit("merge2UnpipeEnd");
|
|
3286
|
+
});
|
|
3287
|
+
if (args.length) {
|
|
3288
|
+
addStream.apply(null, args);
|
|
3289
|
+
}
|
|
3290
|
+
return mergedStream;
|
|
3291
|
+
}
|
|
3292
|
+
function pauseStreams(streams, options) {
|
|
3293
|
+
if (!Array.isArray(streams)) {
|
|
3294
|
+
if (!streams._readableState && streams.pipe) {
|
|
3295
|
+
streams = streams.pipe(PassThrough(options));
|
|
3296
|
+
}
|
|
3297
|
+
if (!streams._readableState || !streams.pause || !streams.pipe) {
|
|
3298
|
+
throw new Error("Only readable stream can be merged.");
|
|
3299
|
+
}
|
|
3300
|
+
streams.pause();
|
|
3301
|
+
} else {
|
|
3302
|
+
for (let i = 0, len = streams.length; i < len; i++) {
|
|
3303
|
+
streams[i] = pauseStreams(streams[i], options);
|
|
3304
|
+
}
|
|
3305
|
+
}
|
|
3306
|
+
return streams;
|
|
3307
|
+
}
|
|
3308
|
+
}
|
|
3309
|
+
});
|
|
3317
3310
|
var require_stream = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
3318
3311
|
"../../node_modules/.pnpm/fast-glob@3.3.3/node_modules/fast-glob/out/utils/stream.js"(exports) {
|
|
3319
3312
|
"use strict";
|
|
@@ -5358,6 +5351,14 @@ var require_out4 = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
|
5358
5351
|
module2.exports = FastGlob;
|
|
5359
5352
|
}
|
|
5360
5353
|
});
|
|
5354
|
+
var require_array_union = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
5355
|
+
"../../node_modules/.pnpm/array-union@2.1.0/node_modules/array-union/index.js"(exports, module2) {
|
|
5356
|
+
"use strict";
|
|
5357
|
+
module2.exports = (...arguments_) => {
|
|
5358
|
+
return [...new Set([].concat(...arguments_))];
|
|
5359
|
+
};
|
|
5360
|
+
}
|
|
5361
|
+
});
|
|
5361
5362
|
var require_path_type = (0, import_chunk_4VNS5WPM.__commonJS)({
|
|
5362
5363
|
"../../node_modules/.pnpm/path-type@4.0.0/node_modules/path-type/index.js"(exports) {
|
|
5363
5364
|
"use strict";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var chunk_KDHESRKE_exports = {};
|
|
20
|
+
__export(chunk_KDHESRKE_exports, {
|
|
21
|
+
mapScalarValues: () => mapScalarValues,
|
|
22
|
+
maskSchema: () => maskSchema,
|
|
23
|
+
maskSchemas: () => maskSchemas
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(chunk_KDHESRKE_exports);
|
|
26
|
+
function maskSchemas(schemas) {
|
|
27
|
+
return schemas.map(([path, content]) => [path, maskSchema(content)]);
|
|
28
|
+
}
|
|
29
|
+
function maskSchema(schema) {
|
|
30
|
+
const regex = /url\s*=\s*.+/;
|
|
31
|
+
return schema.split("\n").map((line) => {
|
|
32
|
+
const match = regex.exec(line);
|
|
33
|
+
if (match) {
|
|
34
|
+
return `${line.slice(0, match.index)}url = "***"`;
|
|
35
|
+
}
|
|
36
|
+
return line;
|
|
37
|
+
}).join("\n");
|
|
38
|
+
}
|
|
39
|
+
function mapScalarValues(obj, mapper) {
|
|
40
|
+
const result = {};
|
|
41
|
+
for (const key in obj) {
|
|
42
|
+
if (typeof obj[key] === "object") {
|
|
43
|
+
result[key] = mapScalarValues(obj[key], mapper);
|
|
44
|
+
} else {
|
|
45
|
+
result[key] = mapper(obj[key]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return result;
|
|
49
|
+
}
|
|
@@ -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_KH7FI42S_exports = {};
|
|
30
|
+
__export(chunk_KH7FI42S_exports, {
|
|
31
31
|
MergeSchemasError: () => MergeSchemasError,
|
|
32
32
|
mergeSchemas: () => mergeSchemas
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
36
|
-
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
34
|
+
module.exports = __toCommonJS(chunk_KH7FI42S_exports);
|
|
35
|
+
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
|
37
36
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
|
38
|
-
var
|
|
39
|
-
var
|
|
37
|
+
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
|
38
|
+
var import_chunk_WDPDHAFW = require("./chunk-WDPDHAFW.js");
|
|
39
|
+
var import_chunk_262R2PBW = require("./chunk-262R2PBW.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,12 +59,12 @@ ${detailsHeader} ${message}`;
|
|
|
59
59
|
}).exhaustive();
|
|
60
60
|
const errorMessageWithContext = `${constructedErrorMessage}
|
|
61
61
|
[Context: mergeSchemas]`;
|
|
62
|
-
super((0,
|
|
62
|
+
super((0, import_chunk_WDPDHAFW.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
|
63
63
|
this.name = "MergeSchemasError";
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
function mergeSchemas(options) {
|
|
67
|
-
const debugErrorType = (0,
|
|
67
|
+
const debugErrorType = (0, import_chunk_TZJROXB3.createDebugErrorType)(debug, "mergeSchemasWasm");
|
|
68
68
|
debug(`Using mergeSchemas Wasm`);
|
|
69
69
|
const mergeSchemasEither = (0, import_function.pipe)(
|
|
70
70
|
(0, import_chunk_5DBOS77Y.tryCatch)(
|
|
@@ -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_262R2PBW.prismaSchemaWasm.merge_schemas(params);
|
|
76
76
|
},
|
|
77
77
|
(e) => ({
|
|
78
78
|
type: "wasm-error",
|
|
@@ -104,7 +104,7 @@ function mergeSchemas(options) {
|
|
|
104
104
|
return panic;
|
|
105
105
|
}
|
|
106
106
|
const errorOutput = e.error.message;
|
|
107
|
-
return new MergeSchemasError((0,
|
|
107
|
+
return new MergeSchemasError((0, import_chunk_TZJROXB3.parseQueryEngineError)({ errorOutput, reason: e.reason }));
|
|
108
108
|
}).exhaustive();
|
|
109
109
|
throw error;
|
|
110
110
|
}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var chunk_L6KOIJJ5_exports = {};
|
|
30
|
+
__export(chunk_L6KOIJJ5_exports, {
|
|
31
|
+
LineStream: () => LineStream,
|
|
32
|
+
byline: () => byline,
|
|
33
|
+
createLineStream: () => createLineStream,
|
|
34
|
+
createStream: () => createStream
|
|
35
|
+
});
|
|
36
|
+
module.exports = __toCommonJS(chunk_L6KOIJJ5_exports);
|
|
37
|
+
var import_stream = __toESM(require("stream"));
|
|
38
|
+
var import_util = __toESM(require("util"));
|
|
39
|
+
function byline(readStream, options) {
|
|
40
|
+
return createStream(readStream, options);
|
|
41
|
+
}
|
|
42
|
+
function createStream(readStream, options) {
|
|
43
|
+
if (readStream) {
|
|
44
|
+
return createLineStream(readStream, options);
|
|
45
|
+
} else {
|
|
46
|
+
return new LineStream(options);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function createLineStream(readStream, options) {
|
|
50
|
+
if (!readStream) {
|
|
51
|
+
throw new Error("expected readStream");
|
|
52
|
+
}
|
|
53
|
+
if (!readStream.readable) {
|
|
54
|
+
throw new Error("readStream must be readable");
|
|
55
|
+
}
|
|
56
|
+
const ls = new LineStream(options);
|
|
57
|
+
readStream.pipe(ls);
|
|
58
|
+
return ls;
|
|
59
|
+
}
|
|
60
|
+
function LineStream(options) {
|
|
61
|
+
import_stream.default.Transform.call(this, options);
|
|
62
|
+
options = options || {};
|
|
63
|
+
this._readableState.objectMode = true;
|
|
64
|
+
this._lineBuffer = [];
|
|
65
|
+
this._keepEmptyLines = options.keepEmptyLines || false;
|
|
66
|
+
this._lastChunkEndedWithCR = false;
|
|
67
|
+
this.on("pipe", function(src) {
|
|
68
|
+
if (!this.encoding) {
|
|
69
|
+
if (src instanceof import_stream.default.Readable) {
|
|
70
|
+
this.encoding = src._readableState.encoding;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
import_util.default.inherits(LineStream, import_stream.default.Transform);
|
|
76
|
+
LineStream.prototype._transform = function(chunk, encoding, done) {
|
|
77
|
+
encoding = encoding || "utf8";
|
|
78
|
+
if (Buffer.isBuffer(chunk)) {
|
|
79
|
+
if (encoding == "buffer") {
|
|
80
|
+
chunk = chunk.toString();
|
|
81
|
+
encoding = "utf8";
|
|
82
|
+
} else {
|
|
83
|
+
chunk = chunk.toString(encoding);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
this._chunkEncoding = encoding;
|
|
87
|
+
const lines = chunk.split(/\r\n|\r|\n/g);
|
|
88
|
+
if (this._lastChunkEndedWithCR && chunk[0] == "\n") {
|
|
89
|
+
lines.shift();
|
|
90
|
+
}
|
|
91
|
+
if (this._lineBuffer.length > 0) {
|
|
92
|
+
this._lineBuffer[this._lineBuffer.length - 1] += lines[0];
|
|
93
|
+
lines.shift();
|
|
94
|
+
}
|
|
95
|
+
this._lastChunkEndedWithCR = chunk[chunk.length - 1] == "\r";
|
|
96
|
+
this._lineBuffer = this._lineBuffer.concat(lines);
|
|
97
|
+
this._pushBuffer(encoding, 1, done);
|
|
98
|
+
};
|
|
99
|
+
LineStream.prototype._pushBuffer = function(encoding, keep, done) {
|
|
100
|
+
while (this._lineBuffer.length > keep) {
|
|
101
|
+
const line = this._lineBuffer.shift();
|
|
102
|
+
if (this._keepEmptyLines || line.length > 0) {
|
|
103
|
+
if (!this.push(this._reencode(line, encoding))) {
|
|
104
|
+
const self = this;
|
|
105
|
+
setImmediate(function() {
|
|
106
|
+
self._pushBuffer(encoding, keep, done);
|
|
107
|
+
});
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
done();
|
|
113
|
+
};
|
|
114
|
+
LineStream.prototype._flush = function(done) {
|
|
115
|
+
this._pushBuffer(this._chunkEncoding, 0, done);
|
|
116
|
+
};
|
|
117
|
+
LineStream.prototype._reencode = function(line, chunkEncoding) {
|
|
118
|
+
if (this.encoding && this.encoding != chunkEncoding) {
|
|
119
|
+
return Buffer.from(line, chunkEncoding).toString(this.encoding);
|
|
120
|
+
} else if (this.encoding) {
|
|
121
|
+
return line;
|
|
122
|
+
} else {
|
|
123
|
+
return Buffer.from(line, chunkEncoding);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
@@ -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_LYFOJ5NK_exports = {};
|
|
30
|
+
__export(chunk_LYFOJ5NK_exports, {
|
|
31
31
|
credentialsToUri: () => credentialsToUri,
|
|
32
32
|
protocolToConnectorType: () => protocolToConnectorType,
|
|
33
33
|
uriToCredentials: () => uriToCredentials
|
|
34
34
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(chunk_LYFOJ5NK_exports);
|
|
36
36
|
var import_chunk_LPNBWFQ3 = require("./chunk-LPNBWFQ3.js");
|
|
37
37
|
var import_path = __toESM(require("path"));
|
|
38
38
|
var NodeURL = __toESM(require("url"));
|
|
@@ -91,7 +91,9 @@ function uriToCredentials(connectionString) {
|
|
|
91
91
|
try {
|
|
92
92
|
uri = new NodeURL.URL(connectionString);
|
|
93
93
|
} catch (e) {
|
|
94
|
-
throw new Error(
|
|
94
|
+
throw new Error(
|
|
95
|
+
"Invalid data source URL, see https://www.prisma.io/docs/reference/database-reference/connection-urls"
|
|
96
|
+
);
|
|
95
97
|
}
|
|
96
98
|
const type = protocolToConnectorType(uri.protocol);
|
|
97
99
|
const exists = (str) => str && str.length > 0;
|
|
@@ -16,20 +16,33 @@ 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_OAT7ZJED_exports = {};
|
|
20
|
+
__export(chunk_OAT7ZJED_exports, {
|
|
21
21
|
getEngineVersion: () => getEngineVersion,
|
|
22
22
|
safeGetEngineVersion: () => safeGetEngineVersion
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_OAT7ZJED_exports);
|
|
25
|
+
var import_chunk_6TTRTZXU = require("./chunk-6TTRTZXU.js");
|
|
25
26
|
var import_chunk_JOIHHXR6 = require("./chunk-JOIHHXR6.js");
|
|
26
|
-
var
|
|
27
|
+
var import_chunk_FYZCPL2Z = require("./chunk-FYZCPL2Z.js");
|
|
27
28
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
|
29
|
+
var import_engines = require("@prisma/engines");
|
|
28
30
|
var import_fetch_engine = require("@prisma/fetch-engine");
|
|
31
|
+
var import_get_platform = require("@prisma/get-platform");
|
|
29
32
|
async function getEngineVersion(enginePath, binaryName) {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
if (!binaryName) {
|
|
34
|
+
binaryName = (0, import_engines.getCliQueryEngineBinaryType)();
|
|
35
|
+
}
|
|
36
|
+
enginePath = await (0, import_chunk_FYZCPL2Z.resolveBinary)(binaryName, enginePath);
|
|
37
|
+
const platformInfo = await (0, import_get_platform.getPlatformInfo)();
|
|
38
|
+
if (binaryName === import_fetch_engine.BinaryType.QueryEngineLibrary) {
|
|
39
|
+
(0, import_get_platform.assertNodeAPISupported)();
|
|
40
|
+
const QE = (0, import_chunk_6TTRTZXU.loadLibrary)(enginePath, platformInfo);
|
|
41
|
+
return `${import_fetch_engine.BinaryType.QueryEngineLibrary} ${QE.version().commit}`;
|
|
42
|
+
} else {
|
|
43
|
+
const { stdout } = await (0, import_chunk_JOIHHXR6.execa)(enginePath, ["--version"]);
|
|
44
|
+
return stdout;
|
|
45
|
+
}
|
|
33
46
|
}
|
|
34
47
|
function safeGetEngineVersion(enginePath, binaryName) {
|
|
35
48
|
return (0, import_chunk_5DBOS77Y.tryCatch2)(
|