@prisma/internals 6.6.0 → 6.7.0-dev.10
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-2JBXOLXL.js → chunk-37VFNYDN.js} +8 -8
- package/dist/{chunk-RMLLA4MJ.js → chunk-3YTH3LTS.js} +5 -5
- package/dist/{chunk-R2TLNOWM.js → chunk-6BENCJWK.js} +5 -5
- package/dist/{chunk-C6CLGEHZ.js → chunk-6TCOHSIQ.js} +8 -8
- package/dist/{chunk-TZ7QN7B5.js → chunk-ANRRALG6.js} +5 -5
- package/dist/chunk-CHOXBASF.js +44 -0
- package/dist/{chunk-RKUASVCY.js → chunk-CI74URJJ.js} +7 -7
- package/dist/{chunk-7LPMJRUK.js → chunk-CKGYGP5K.js} +8 -8
- package/dist/{chunk-EVK7A7GF.js → chunk-DMAV353H.js} +5 -5
- package/dist/{chunk-37SOLWL3.js → chunk-DUZ7VTLL.js} +5 -5
- package/dist/{chunk-HG3YOAAE.js → chunk-FYZCPL2Z.js} +7 -8
- package/dist/{chunk-M3NEJQPR.js → chunk-IAPYMRWB.js} +5 -5
- package/dist/{chunk-I7NBPZBO.js → chunk-K4VD7DL5.js} +5 -5
- package/dist/{chunk-S7FWTZ4D.js → chunk-KQ6L53YO.js} +8 -8
- package/dist/{chunk-CFIXRANP.js → chunk-KSEX3ZQS.js} +6 -6
- package/dist/{chunk-67I7CEQJ.js → chunk-MY5KA4VU.js} +12 -329
- package/dist/{chunk-A4GRMJJI.js → chunk-NFMKETO5.js} +38 -432
- package/dist/{chunk-DSO2BAJY.js → chunk-OBDAVBAO.js} +7 -7
- package/dist/{chunk-DKSUHQGA.js → chunk-ONPT5QRX.js} +5 -5
- package/dist/{chunk-UZFWYQZJ.js → chunk-P3Y54DBD.js} +5 -5
- package/dist/{chunk-B4AYGGZW.js → chunk-PD4UCNF3.js} +8 -8
- package/dist/{chunk-3DQANJMY.js → chunk-PRGTOMXU.js} +5 -5
- package/dist/chunk-PSFQKG2Q.js +6291 -0
- package/dist/chunk-Q6ZVYPDB.js +41 -0
- package/dist/{chunk-DCWEKWHT.js → chunk-QOMMMKJO.js} +38 -432
- package/dist/chunk-QS3WUGE3.js +341 -0
- package/dist/{chunk-XRNBEUVE.js → chunk-R37TYWYY.js} +5 -5
- package/dist/{chunk-XO424ERB.js → chunk-UZARHCFS.js} +8 -8
- package/dist/{chunk-KB5DKCI4.js → chunk-W67YF34Y.js} +7 -7
- package/dist/chunk-WCPUXXL2.js +183 -0
- package/dist/chunk-ZCBEMBHR.js +242 -0
- package/dist/chunk-ZIFBTC6Y.js +6440 -0
- package/dist/cli/checkUnsupportedDataProxy.js +26 -20
- package/dist/cli/checkUnsupportedSchemaEngineWasm.js +26 -20
- package/dist/cli/getSchema.js +8 -112
- package/dist/cli/hashes.js +6 -109
- package/dist/cli/schemaContext.js +26 -20
- package/dist/engine-commands/errorHelpers.js +4 -4
- package/dist/engine-commands/formatSchema.js +25 -19
- package/dist/engine-commands/getConfig.js +10 -10
- package/dist/engine-commands/getDmmf.js +7 -7
- package/dist/engine-commands/getEngineVersion.js +4 -4
- package/dist/engine-commands/getEnginesMetaInfo.js +6 -6
- package/dist/engine-commands/index.js +36 -30
- package/dist/engine-commands/lintSchema.js +8 -8
- package/dist/engine-commands/mergeSchemas.js +7 -7
- package/dist/engine-commands/validate.js +7 -7
- package/dist/get-generators/getGenerators.js +28 -22
- package/dist/getPackedPackage.js +6 -4
- package/dist/index.js +64 -58
- package/dist/resolveBinary.js +6 -6
- package/dist/resolvePkg.js +3 -2
- package/dist/schemaEngineCommands.js +7 -7
- package/dist/utils/getEnvPaths.js +5 -106
- package/dist/utils/getVersionFromPackageJson.js +3 -3
- package/dist/utils/loadEnvFile.js +6 -106
- package/dist/wasm.js +5 -5
- package/package.json +13 -13
- package/dist/chunk-MJIP3FY5.js +0 -12695
@@ -0,0 +1,341 @@
|
|
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_QS3WUGE3_exports = {};
|
20
|
+
__export(chunk_QS3WUGE3_exports, {
|
21
|
+
require_is_core_module: () => require_is_core_module
|
22
|
+
});
|
23
|
+
module.exports = __toCommonJS(chunk_QS3WUGE3_exports);
|
24
|
+
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
25
|
+
var require_implementation = (0, import_chunk_4VNS5WPM.__commonJS)({
|
26
|
+
"../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module2) {
|
27
|
+
"use strict";
|
28
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
29
|
+
var toStr = Object.prototype.toString;
|
30
|
+
var max = Math.max;
|
31
|
+
var funcType = "[object Function]";
|
32
|
+
var concatty = function concatty2(a, b) {
|
33
|
+
var arr = [];
|
34
|
+
for (var i = 0; i < a.length; i += 1) {
|
35
|
+
arr[i] = a[i];
|
36
|
+
}
|
37
|
+
for (var j = 0; j < b.length; j += 1) {
|
38
|
+
arr[j + a.length] = b[j];
|
39
|
+
}
|
40
|
+
return arr;
|
41
|
+
};
|
42
|
+
var slicy = function slicy2(arrLike, offset) {
|
43
|
+
var arr = [];
|
44
|
+
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
45
|
+
arr[j] = arrLike[i];
|
46
|
+
}
|
47
|
+
return arr;
|
48
|
+
};
|
49
|
+
var joiny = function(arr, joiner) {
|
50
|
+
var str = "";
|
51
|
+
for (var i = 0; i < arr.length; i += 1) {
|
52
|
+
str += arr[i];
|
53
|
+
if (i + 1 < arr.length) {
|
54
|
+
str += joiner;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
return str;
|
58
|
+
};
|
59
|
+
module2.exports = function bind(that) {
|
60
|
+
var target = this;
|
61
|
+
if (typeof target !== "function" || toStr.apply(target) !== funcType) {
|
62
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
63
|
+
}
|
64
|
+
var args = slicy(arguments, 1);
|
65
|
+
var bound;
|
66
|
+
var binder = function() {
|
67
|
+
if (this instanceof bound) {
|
68
|
+
var result = target.apply(
|
69
|
+
this,
|
70
|
+
concatty(args, arguments)
|
71
|
+
);
|
72
|
+
if (Object(result) === result) {
|
73
|
+
return result;
|
74
|
+
}
|
75
|
+
return this;
|
76
|
+
}
|
77
|
+
return target.apply(
|
78
|
+
that,
|
79
|
+
concatty(args, arguments)
|
80
|
+
);
|
81
|
+
};
|
82
|
+
var boundLength = max(0, target.length - args.length);
|
83
|
+
var boundArgs = [];
|
84
|
+
for (var i = 0; i < boundLength; i++) {
|
85
|
+
boundArgs[i] = "$" + i;
|
86
|
+
}
|
87
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
88
|
+
if (target.prototype) {
|
89
|
+
var Empty = function Empty2() {
|
90
|
+
};
|
91
|
+
Empty.prototype = target.prototype;
|
92
|
+
bound.prototype = new Empty();
|
93
|
+
Empty.prototype = null;
|
94
|
+
}
|
95
|
+
return bound;
|
96
|
+
};
|
97
|
+
}
|
98
|
+
});
|
99
|
+
var require_function_bind = (0, import_chunk_4VNS5WPM.__commonJS)({
|
100
|
+
"../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module2) {
|
101
|
+
"use strict";
|
102
|
+
var implementation = require_implementation();
|
103
|
+
module2.exports = Function.prototype.bind || implementation;
|
104
|
+
}
|
105
|
+
});
|
106
|
+
var require_hasown = (0, import_chunk_4VNS5WPM.__commonJS)({
|
107
|
+
"../../node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports, module2) {
|
108
|
+
"use strict";
|
109
|
+
var call = Function.prototype.call;
|
110
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
111
|
+
var bind = require_function_bind();
|
112
|
+
module2.exports = bind.call(call, $hasOwn);
|
113
|
+
}
|
114
|
+
});
|
115
|
+
var require_core = (0, import_chunk_4VNS5WPM.__commonJS)({
|
116
|
+
"../../node_modules/.pnpm/is-core-module@2.16.1/node_modules/is-core-module/core.json"(exports, module2) {
|
117
|
+
module2.exports = {
|
118
|
+
assert: true,
|
119
|
+
"node:assert": [">= 14.18 && < 15", ">= 16"],
|
120
|
+
"assert/strict": ">= 15",
|
121
|
+
"node:assert/strict": ">= 16",
|
122
|
+
async_hooks: ">= 8",
|
123
|
+
"node:async_hooks": [">= 14.18 && < 15", ">= 16"],
|
124
|
+
buffer_ieee754: ">= 0.5 && < 0.9.7",
|
125
|
+
buffer: true,
|
126
|
+
"node:buffer": [">= 14.18 && < 15", ">= 16"],
|
127
|
+
child_process: true,
|
128
|
+
"node:child_process": [">= 14.18 && < 15", ">= 16"],
|
129
|
+
cluster: ">= 0.5",
|
130
|
+
"node:cluster": [">= 14.18 && < 15", ">= 16"],
|
131
|
+
console: true,
|
132
|
+
"node:console": [">= 14.18 && < 15", ">= 16"],
|
133
|
+
constants: true,
|
134
|
+
"node:constants": [">= 14.18 && < 15", ">= 16"],
|
135
|
+
crypto: true,
|
136
|
+
"node:crypto": [">= 14.18 && < 15", ">= 16"],
|
137
|
+
_debug_agent: ">= 1 && < 8",
|
138
|
+
_debugger: "< 8",
|
139
|
+
dgram: true,
|
140
|
+
"node:dgram": [">= 14.18 && < 15", ">= 16"],
|
141
|
+
diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"],
|
142
|
+
"node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
|
143
|
+
dns: true,
|
144
|
+
"node:dns": [">= 14.18 && < 15", ">= 16"],
|
145
|
+
"dns/promises": ">= 15",
|
146
|
+
"node:dns/promises": ">= 16",
|
147
|
+
domain: ">= 0.7.12",
|
148
|
+
"node:domain": [">= 14.18 && < 15", ">= 16"],
|
149
|
+
events: true,
|
150
|
+
"node:events": [">= 14.18 && < 15", ">= 16"],
|
151
|
+
freelist: "< 6",
|
152
|
+
fs: true,
|
153
|
+
"node:fs": [">= 14.18 && < 15", ">= 16"],
|
154
|
+
"fs/promises": [">= 10 && < 10.1", ">= 14"],
|
155
|
+
"node:fs/promises": [">= 14.18 && < 15", ">= 16"],
|
156
|
+
_http_agent: ">= 0.11.1",
|
157
|
+
"node:_http_agent": [">= 14.18 && < 15", ">= 16"],
|
158
|
+
_http_client: ">= 0.11.1",
|
159
|
+
"node:_http_client": [">= 14.18 && < 15", ">= 16"],
|
160
|
+
_http_common: ">= 0.11.1",
|
161
|
+
"node:_http_common": [">= 14.18 && < 15", ">= 16"],
|
162
|
+
_http_incoming: ">= 0.11.1",
|
163
|
+
"node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
|
164
|
+
_http_outgoing: ">= 0.11.1",
|
165
|
+
"node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
|
166
|
+
_http_server: ">= 0.11.1",
|
167
|
+
"node:_http_server": [">= 14.18 && < 15", ">= 16"],
|
168
|
+
http: true,
|
169
|
+
"node:http": [">= 14.18 && < 15", ">= 16"],
|
170
|
+
http2: ">= 8.8",
|
171
|
+
"node:http2": [">= 14.18 && < 15", ">= 16"],
|
172
|
+
https: true,
|
173
|
+
"node:https": [">= 14.18 && < 15", ">= 16"],
|
174
|
+
inspector: ">= 8",
|
175
|
+
"node:inspector": [">= 14.18 && < 15", ">= 16"],
|
176
|
+
"inspector/promises": [">= 19"],
|
177
|
+
"node:inspector/promises": [">= 19"],
|
178
|
+
_linklist: "< 8",
|
179
|
+
module: true,
|
180
|
+
"node:module": [">= 14.18 && < 15", ">= 16"],
|
181
|
+
net: true,
|
182
|
+
"node:net": [">= 14.18 && < 15", ">= 16"],
|
183
|
+
"node-inspect/lib/_inspect": ">= 7.6 && < 12",
|
184
|
+
"node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
|
185
|
+
"node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
|
186
|
+
os: true,
|
187
|
+
"node:os": [">= 14.18 && < 15", ">= 16"],
|
188
|
+
path: true,
|
189
|
+
"node:path": [">= 14.18 && < 15", ">= 16"],
|
190
|
+
"path/posix": ">= 15.3",
|
191
|
+
"node:path/posix": ">= 16",
|
192
|
+
"path/win32": ">= 15.3",
|
193
|
+
"node:path/win32": ">= 16",
|
194
|
+
perf_hooks: ">= 8.5",
|
195
|
+
"node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
|
196
|
+
process: ">= 1",
|
197
|
+
"node:process": [">= 14.18 && < 15", ">= 16"],
|
198
|
+
punycode: ">= 0.5",
|
199
|
+
"node:punycode": [">= 14.18 && < 15", ">= 16"],
|
200
|
+
querystring: true,
|
201
|
+
"node:querystring": [">= 14.18 && < 15", ">= 16"],
|
202
|
+
readline: true,
|
203
|
+
"node:readline": [">= 14.18 && < 15", ">= 16"],
|
204
|
+
"readline/promises": ">= 17",
|
205
|
+
"node:readline/promises": ">= 17",
|
206
|
+
repl: true,
|
207
|
+
"node:repl": [">= 14.18 && < 15", ">= 16"],
|
208
|
+
"node:sea": [">= 20.12 && < 21", ">= 21.7"],
|
209
|
+
smalloc: ">= 0.11.5 && < 3",
|
210
|
+
"node:sqlite": [">= 22.13 && < 23", ">= 23.4"],
|
211
|
+
_stream_duplex: ">= 0.9.4",
|
212
|
+
"node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
|
213
|
+
_stream_transform: ">= 0.9.4",
|
214
|
+
"node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
|
215
|
+
_stream_wrap: ">= 1.4.1",
|
216
|
+
"node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
|
217
|
+
_stream_passthrough: ">= 0.9.4",
|
218
|
+
"node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
|
219
|
+
_stream_readable: ">= 0.9.4",
|
220
|
+
"node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
|
221
|
+
_stream_writable: ">= 0.9.4",
|
222
|
+
"node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
|
223
|
+
stream: true,
|
224
|
+
"node:stream": [">= 14.18 && < 15", ">= 16"],
|
225
|
+
"stream/consumers": ">= 16.7",
|
226
|
+
"node:stream/consumers": ">= 16.7",
|
227
|
+
"stream/promises": ">= 15",
|
228
|
+
"node:stream/promises": ">= 16",
|
229
|
+
"stream/web": ">= 16.5",
|
230
|
+
"node:stream/web": ">= 16.5",
|
231
|
+
string_decoder: true,
|
232
|
+
"node:string_decoder": [">= 14.18 && < 15", ">= 16"],
|
233
|
+
sys: [">= 0.4 && < 0.7", ">= 0.8"],
|
234
|
+
"node:sys": [">= 14.18 && < 15", ">= 16"],
|
235
|
+
"test/reporters": ">= 19.9 && < 20.2",
|
236
|
+
"node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"],
|
237
|
+
"test/mock_loader": ">= 22.3 && < 22.7",
|
238
|
+
"node:test/mock_loader": ">= 22.3 && < 22.7",
|
239
|
+
"node:test": [">= 16.17 && < 17", ">= 18"],
|
240
|
+
timers: true,
|
241
|
+
"node:timers": [">= 14.18 && < 15", ">= 16"],
|
242
|
+
"timers/promises": ">= 15",
|
243
|
+
"node:timers/promises": ">= 16",
|
244
|
+
_tls_common: ">= 0.11.13",
|
245
|
+
"node:_tls_common": [">= 14.18 && < 15", ">= 16"],
|
246
|
+
_tls_legacy: ">= 0.11.3 && < 10",
|
247
|
+
_tls_wrap: ">= 0.11.3",
|
248
|
+
"node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
|
249
|
+
tls: true,
|
250
|
+
"node:tls": [">= 14.18 && < 15", ">= 16"],
|
251
|
+
trace_events: ">= 10",
|
252
|
+
"node:trace_events": [">= 14.18 && < 15", ">= 16"],
|
253
|
+
tty: true,
|
254
|
+
"node:tty": [">= 14.18 && < 15", ">= 16"],
|
255
|
+
url: true,
|
256
|
+
"node:url": [">= 14.18 && < 15", ">= 16"],
|
257
|
+
util: true,
|
258
|
+
"node:util": [">= 14.18 && < 15", ">= 16"],
|
259
|
+
"util/types": ">= 15.3",
|
260
|
+
"node:util/types": ">= 16",
|
261
|
+
"v8/tools/arguments": ">= 10 && < 12",
|
262
|
+
"v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
263
|
+
"v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
264
|
+
"v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
265
|
+
"v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
266
|
+
"v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
267
|
+
"v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
|
268
|
+
v8: ">= 1",
|
269
|
+
"node:v8": [">= 14.18 && < 15", ">= 16"],
|
270
|
+
vm: true,
|
271
|
+
"node:vm": [">= 14.18 && < 15", ">= 16"],
|
272
|
+
wasi: [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"],
|
273
|
+
"node:wasi": [">= 18.17 && < 19", ">= 20"],
|
274
|
+
worker_threads: ">= 11.7",
|
275
|
+
"node:worker_threads": [">= 14.18 && < 15", ">= 16"],
|
276
|
+
zlib: ">= 0.5",
|
277
|
+
"node:zlib": [">= 14.18 && < 15", ">= 16"]
|
278
|
+
};
|
279
|
+
}
|
280
|
+
});
|
281
|
+
var require_is_core_module = (0, import_chunk_4VNS5WPM.__commonJS)({
|
282
|
+
"../../node_modules/.pnpm/is-core-module@2.16.1/node_modules/is-core-module/index.js"(exports, module2) {
|
283
|
+
"use strict";
|
284
|
+
var hasOwn = require_hasown();
|
285
|
+
function specifierIncluded(current, specifier) {
|
286
|
+
var nodeParts = current.split(".");
|
287
|
+
var parts = specifier.split(" ");
|
288
|
+
var op = parts.length > 1 ? parts[0] : "=";
|
289
|
+
var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split(".");
|
290
|
+
for (var i = 0; i < 3; ++i) {
|
291
|
+
var cur = parseInt(nodeParts[i] || 0, 10);
|
292
|
+
var ver = parseInt(versionParts[i] || 0, 10);
|
293
|
+
if (cur === ver) {
|
294
|
+
continue;
|
295
|
+
}
|
296
|
+
if (op === "<") {
|
297
|
+
return cur < ver;
|
298
|
+
}
|
299
|
+
if (op === ">=") {
|
300
|
+
return cur >= ver;
|
301
|
+
}
|
302
|
+
return false;
|
303
|
+
}
|
304
|
+
return op === ">=";
|
305
|
+
}
|
306
|
+
function matchesRange(current, range) {
|
307
|
+
var specifiers = range.split(/ ?&& ?/);
|
308
|
+
if (specifiers.length === 0) {
|
309
|
+
return false;
|
310
|
+
}
|
311
|
+
for (var i = 0; i < specifiers.length; ++i) {
|
312
|
+
if (!specifierIncluded(current, specifiers[i])) {
|
313
|
+
return false;
|
314
|
+
}
|
315
|
+
}
|
316
|
+
return true;
|
317
|
+
}
|
318
|
+
function versionIncluded(nodeVersion, specifierValue) {
|
319
|
+
if (typeof specifierValue === "boolean") {
|
320
|
+
return specifierValue;
|
321
|
+
}
|
322
|
+
var current = typeof nodeVersion === "undefined" ? process.versions && process.versions.node : nodeVersion;
|
323
|
+
if (typeof current !== "string") {
|
324
|
+
throw new TypeError(typeof nodeVersion === "undefined" ? "Unable to determine current node version" : "If provided, a valid node version is required");
|
325
|
+
}
|
326
|
+
if (specifierValue && typeof specifierValue === "object") {
|
327
|
+
for (var i = 0; i < specifierValue.length; ++i) {
|
328
|
+
if (matchesRange(current, specifierValue[i])) {
|
329
|
+
return true;
|
330
|
+
}
|
331
|
+
}
|
332
|
+
return false;
|
333
|
+
}
|
334
|
+
return matchesRange(current, specifierValue);
|
335
|
+
}
|
336
|
+
var data = require_core();
|
337
|
+
module2.exports = function isCore(x, nodeVersion) {
|
338
|
+
return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);
|
339
|
+
};
|
340
|
+
}
|
341
|
+
});
|
@@ -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_R37TYWYY_exports = {};
|
20
|
+
__export(chunk_R37TYWYY_exports, {
|
21
21
|
getLintWarnings: () => getLintWarnings,
|
22
22
|
getLintWarningsAsText: () => getLintWarningsAsText,
|
23
23
|
handleLintPanic: () => handleLintPanic,
|
24
24
|
lintSchema: () => lintSchema,
|
25
25
|
warningToString: () => warningToString
|
26
26
|
});
|
27
|
-
module.exports = __toCommonJS(
|
28
|
-
var
|
27
|
+
module.exports = __toCommonJS(chunk_R37TYWYY_exports);
|
28
|
+
var import_chunk_DUZ7VTLL = require("./chunk-DUZ7VTLL.js");
|
29
29
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
30
30
|
var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
|
31
31
|
function lintSchema({ schemas }) {
|
32
|
-
const lintResult =
|
32
|
+
const lintResult = import_chunk_DUZ7VTLL.prismaSchemaWasm.lint(JSON.stringify(schemas));
|
33
33
|
const lintDiagnostics = JSON.parse(lintResult);
|
34
34
|
return lintDiagnostics;
|
35
35
|
}
|
@@ -26,20 +26,20 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_UZARHCFS_exports = {};
|
30
|
+
__export(chunk_UZARHCFS_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_UZARHCFS_exports);
|
38
38
|
var import_chunk_TZJROXB3 = require("./chunk-TZJROXB3.js");
|
39
39
|
var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
|
40
40
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
41
|
-
var
|
42
|
-
var
|
41
|
+
var import_chunk_IAPYMRWB = require("./chunk-IAPYMRWB.js");
|
42
|
+
var import_chunk_3YTH3LTS = require("./chunk-3YTH3LTS.js");
|
43
43
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
44
44
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
45
45
|
var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
|
@@ -64,7 +64,7 @@ ${detailsHeader} ${message}`;
|
|
64
64
|
}).exhaustive();
|
65
65
|
const errorMessageWithContext = `${constructedErrorMessage}
|
66
66
|
[Context: getConfig]`;
|
67
|
-
super((0,
|
67
|
+
super((0, import_chunk_IAPYMRWB.addVersionDetailsToErrorMessage)(errorMessageWithContext));
|
68
68
|
this.name = "GetConfigError";
|
69
69
|
}
|
70
70
|
};
|
@@ -89,7 +89,7 @@ async function getConfig(options) {
|
|
89
89
|
() => {
|
90
90
|
if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
|
91
91
|
debug("Triggering a Rust panic...");
|
92
|
-
|
92
|
+
import_chunk_3YTH3LTS.prismaSchemaWasm.debug_panic();
|
93
93
|
}
|
94
94
|
const params = JSON.stringify({
|
95
95
|
prismaSchema: options.datamodel,
|
@@ -97,7 +97,7 @@ async function getConfig(options) {
|
|
97
97
|
ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
|
98
98
|
env: process.env
|
99
99
|
});
|
100
|
-
const data =
|
100
|
+
const data = import_chunk_3YTH3LTS.prismaSchemaWasm.get_config(params);
|
101
101
|
return data;
|
102
102
|
},
|
103
103
|
(e) => ({
|
@@ -26,16 +26,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
26
26
|
mod
|
27
27
|
));
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
29
|
-
var
|
30
|
-
__export(
|
29
|
+
var chunk_W67YF34Y_exports = {};
|
30
|
+
__export(chunk_W67YF34Y_exports, {
|
31
31
|
getEnginesInfo: () => getEnginesInfo,
|
32
32
|
getEnginesMetaInfo: () => getEnginesMetaInfo,
|
33
33
|
resolveEngine: () => resolveEngine
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
36
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_W67YF34Y_exports);
|
36
|
+
var import_chunk_PRGTOMXU = require("./chunk-PRGTOMXU.js");
|
37
37
|
var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
|
38
|
-
var
|
38
|
+
var import_chunk_FYZCPL2Z = require("./chunk-FYZCPL2Z.js");
|
39
39
|
var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
|
40
40
|
var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
|
41
41
|
var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
|
@@ -157,7 +157,7 @@ async function resolveEngine(binaryName) {
|
|
157
157
|
const enginePathEither = await (0, import_function2.pipe)(
|
158
158
|
pathFromEnvOption,
|
159
159
|
fold(
|
160
|
-
() => (0,
|
160
|
+
() => (0, import_chunk_FYZCPL2Z.safeResolveBinary)(binaryName),
|
161
161
|
(pathFromEnv) => (0, import_chunk_5DBOS77Y.right2)(pathFromEnv.path)
|
162
162
|
)
|
163
163
|
)();
|
@@ -165,7 +165,7 @@ async function resolveEngine(binaryName) {
|
|
165
165
|
enginePathEither,
|
166
166
|
import_chunk_5DBOS77Y.fromEither,
|
167
167
|
(0, import_chunk_5DBOS77Y.chain)((enginePath) => {
|
168
|
-
return (0,
|
168
|
+
return (0, import_chunk_PRGTOMXU.safeGetEngineVersion)(enginePath, binaryName);
|
169
169
|
})
|
170
170
|
)();
|
171
171
|
const engineInfo = {
|
@@ -0,0 +1,183 @@
|
|
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_WCPUXXL2_exports = {};
|
30
|
+
__export(chunk_WCPUXXL2_exports, {
|
31
|
+
getEnvPaths: () => getEnvPaths
|
32
|
+
});
|
33
|
+
module.exports = __toCommonJS(chunk_WCPUXXL2_exports);
|
34
|
+
var import_chunk_2IP7H3BQ = require("./chunk-2IP7H3BQ.js");
|
35
|
+
var import_chunk_ZCBEMBHR = require("./chunk-ZCBEMBHR.js");
|
36
|
+
var import_chunk_PSFQKG2Q = require("./chunk-PSFQKG2Q.js");
|
37
|
+
var import_debug = __toESM(require("@prisma/debug"));
|
38
|
+
var import_node_path = __toESM(require("node:path"));
|
39
|
+
var import_node_process = __toESM(require("node:process"));
|
40
|
+
var import_node_path2 = __toESM(require("node:path"));
|
41
|
+
var import_node_fs = __toESM(require("node:fs"));
|
42
|
+
var import_node_url = require("node:url");
|
43
|
+
var import_node_fs2 = __toESM(require("node:fs"));
|
44
|
+
var import_fs = __toESM(require("fs"));
|
45
|
+
var import_path = __toESM(require("path"));
|
46
|
+
var typeMappings = {
|
47
|
+
directory: "isDirectory",
|
48
|
+
file: "isFile"
|
49
|
+
};
|
50
|
+
function checkType(type) {
|
51
|
+
if (Object.hasOwnProperty.call(typeMappings, type)) {
|
52
|
+
return;
|
53
|
+
}
|
54
|
+
throw new Error(`Invalid type specified: ${type}`);
|
55
|
+
}
|
56
|
+
var matchType = (type, stat) => stat[typeMappings[type]]();
|
57
|
+
var toPath2 = (urlOrPath) => urlOrPath instanceof URL ? (0, import_node_url.fileURLToPath)(urlOrPath) : urlOrPath;
|
58
|
+
function locatePathSync(paths, {
|
59
|
+
cwd = import_node_process.default.cwd(),
|
60
|
+
type = "file",
|
61
|
+
allowSymlinks = true
|
62
|
+
} = {}) {
|
63
|
+
checkType(type);
|
64
|
+
cwd = toPath2(cwd);
|
65
|
+
const statFunction = allowSymlinks ? import_node_fs.default.statSync : import_node_fs.default.lstatSync;
|
66
|
+
for (const path_ of paths) {
|
67
|
+
try {
|
68
|
+
const stat = statFunction(import_node_path2.default.resolve(cwd, path_), {
|
69
|
+
throwIfNoEntry: false
|
70
|
+
});
|
71
|
+
if (!stat) {
|
72
|
+
continue;
|
73
|
+
}
|
74
|
+
if (matchType(type, stat)) {
|
75
|
+
return path_;
|
76
|
+
}
|
77
|
+
} catch {
|
78
|
+
}
|
79
|
+
}
|
80
|
+
}
|
81
|
+
function pathExistsSync(path4) {
|
82
|
+
try {
|
83
|
+
import_node_fs2.default.accessSync(path4);
|
84
|
+
return true;
|
85
|
+
} catch {
|
86
|
+
return false;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
var findUpStop = Symbol("findUpStop");
|
90
|
+
function findUpMultipleSync(name, options = {}) {
|
91
|
+
let directory = import_node_path.default.resolve((0, import_chunk_PSFQKG2Q.toPath)(options.cwd) ?? "");
|
92
|
+
const { root } = import_node_path.default.parse(directory);
|
93
|
+
const stopAt = import_node_path.default.resolve(directory, (0, import_chunk_PSFQKG2Q.toPath)(options.stopAt) ?? root);
|
94
|
+
const limit = options.limit ?? Number.POSITIVE_INFINITY;
|
95
|
+
const paths = [name].flat();
|
96
|
+
const runMatcher = (locateOptions) => {
|
97
|
+
if (typeof name !== "function") {
|
98
|
+
return locatePathSync(paths, locateOptions);
|
99
|
+
}
|
100
|
+
const foundPath = name(locateOptions.cwd);
|
101
|
+
if (typeof foundPath === "string") {
|
102
|
+
return locatePathSync([foundPath], locateOptions);
|
103
|
+
}
|
104
|
+
return foundPath;
|
105
|
+
};
|
106
|
+
const matches = [];
|
107
|
+
while (true) {
|
108
|
+
const foundPath = runMatcher({ ...options, cwd: directory });
|
109
|
+
if (foundPath === findUpStop) {
|
110
|
+
break;
|
111
|
+
}
|
112
|
+
if (foundPath) {
|
113
|
+
matches.push(import_node_path.default.resolve(directory, foundPath));
|
114
|
+
}
|
115
|
+
if (directory === stopAt || matches.length >= limit) {
|
116
|
+
break;
|
117
|
+
}
|
118
|
+
directory = import_node_path.default.dirname(directory);
|
119
|
+
}
|
120
|
+
return matches;
|
121
|
+
}
|
122
|
+
function findUpSync(name, options = {}) {
|
123
|
+
const matches = findUpMultipleSync(name, { ...options, limit: 1 });
|
124
|
+
return matches[0];
|
125
|
+
}
|
126
|
+
var debug = (0, import_debug.default)("prisma:loadEnv");
|
127
|
+
async function getEnvPaths(schemaPath, opts = { cwd: process.cwd() }) {
|
128
|
+
const rootEnvPath = getProjectRootEnvPath({ cwd: opts.cwd }) ?? null;
|
129
|
+
const schemaEnvPathFromArgs = schemaPathToEnvPath(schemaPath);
|
130
|
+
const schemaEnvPathFromPkgJson = schemaPathToEnvPath(await readSchemaPathFromPkgJson());
|
131
|
+
const schemaEnvPaths = [
|
132
|
+
schemaEnvPathFromArgs,
|
133
|
+
// 1 - Check --schema directory for .env
|
134
|
+
schemaEnvPathFromPkgJson,
|
135
|
+
// 2 - Check package.json schema directory for .env
|
136
|
+
"./prisma/.env",
|
137
|
+
// 3 - Check ./prisma directory for .env
|
138
|
+
"./.env"
|
139
|
+
// 4 - Check cwd for .env
|
140
|
+
];
|
141
|
+
const schemaEnvPath = schemaEnvPaths.find(import_chunk_2IP7H3BQ.exists);
|
142
|
+
return { rootEnvPath, schemaEnvPath };
|
143
|
+
}
|
144
|
+
async function readSchemaPathFromPkgJson() {
|
145
|
+
try {
|
146
|
+
const pkgJsonSchema = await (0, import_chunk_ZCBEMBHR.getSchemaFromPackageJson)(process.cwd());
|
147
|
+
if (pkgJsonSchema.ok) {
|
148
|
+
pkgJsonSchema.schema.schemaPath;
|
149
|
+
}
|
150
|
+
return null;
|
151
|
+
} catch {
|
152
|
+
return null;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
function getProjectRootEnvPath(opts) {
|
156
|
+
const pkgJsonPath = findUpSync((dir) => {
|
157
|
+
const pkgPath = import_path.default.join(dir, "package.json");
|
158
|
+
if (pathExistsSync(pkgPath)) {
|
159
|
+
try {
|
160
|
+
const pkg = JSON.parse(import_fs.default.readFileSync(pkgPath, "utf8"));
|
161
|
+
if (pkg["name"] !== ".prisma/client") {
|
162
|
+
debug(`project root found at ${pkgPath}`);
|
163
|
+
return pkgPath;
|
164
|
+
}
|
165
|
+
} catch (e) {
|
166
|
+
debug(`skipping package.json at ${pkgPath}`);
|
167
|
+
}
|
168
|
+
}
|
169
|
+
return void 0;
|
170
|
+
}, opts);
|
171
|
+
if (!pkgJsonPath) {
|
172
|
+
return null;
|
173
|
+
}
|
174
|
+
const candidate = import_path.default.join(import_path.default.dirname(pkgJsonPath), ".env");
|
175
|
+
if (!import_fs.default.existsSync(candidate)) {
|
176
|
+
return null;
|
177
|
+
}
|
178
|
+
return candidate;
|
179
|
+
}
|
180
|
+
function schemaPathToEnvPath(schemaPath) {
|
181
|
+
if (!schemaPath) return null;
|
182
|
+
return import_path.default.join(import_path.default.dirname(schemaPath), ".env");
|
183
|
+
}
|