@prisma/internals 6.6.0-integration-push-xmzqvqxpztks.11 → 6.6.0-integration-mcp.2

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.
Files changed (102) hide show
  1. package/dist/Generator.d.ts +5 -23
  2. package/dist/Generator.js +2 -4
  3. package/dist/{chunk-EPXBOIA5.js → chunk-2I3VYCA7.js} +5 -5
  4. package/dist/{chunk-2QTAK7KO.js → chunk-2LDG4PID.js} +5 -5
  5. package/dist/{chunk-JOIIWB3U.js → chunk-2LOGW45F.js} +68 -33
  6. package/dist/{chunk-KB5DKCI4.js → chunk-3GYXMWBM.js} +7 -7
  7. package/dist/{chunk-C36XBSRA.js → chunk-4KCLNFE4.js} +5 -5
  8. package/dist/{chunk-Y4ZCEXKJ.js → chunk-5CBAXTAF.js} +5 -5
  9. package/dist/chunk-72UZXEBG.js +28 -0
  10. package/dist/{chunk-2HN7FYKA.js → chunk-AP52B62F.js} +5 -5
  11. package/dist/{chunk-HG3YOAAE.js → chunk-AXD7KB4D.js} +5 -5
  12. package/dist/chunk-BWGDP6B5.js +4948 -0
  13. package/dist/chunk-DYV47NUW.js +796 -0
  14. package/dist/{chunk-BPDMLM32.js → chunk-DYVL6P7F.js} +13 -46
  15. package/dist/{chunk-DKSUHQGA.js → chunk-EKESIUIK.js} +7 -7
  16. package/dist/chunk-EUTJYQDW.js +46 -0
  17. package/dist/{chunk-3EGV6JCZ.js → chunk-FAPPXX7W.js} +8 -8
  18. package/dist/chunk-GHHABGYW.js +28 -0
  19. package/dist/{chunk-FJR5JRC2.js → chunk-GV244NDE.js} +7 -7
  20. package/dist/{chunk-D4VDA2TZ.js → chunk-IRWX4FCC.js} +6 -6
  21. package/dist/{chunk-IDINCQMN.js → chunk-IWTEX7EE.js} +9 -780
  22. package/dist/{chunk-NVNI2SRU.js → chunk-KNNTV7IN.js} +687 -213
  23. package/dist/{chunk-AO5ASZAS.js → chunk-LWBLVV7Y.js} +8 -8
  24. package/dist/{chunk-5AI4FIZ3.js → chunk-MEOOYUIZ.js} +10 -10
  25. package/dist/{chunk-TQFONRJP.js → chunk-MXAUURHG.js} +5 -5
  26. package/dist/chunk-OQ2NRV2Y.js +35 -0
  27. package/dist/{chunk-YNDF56XR.js → chunk-ORPBIAE5.js} +8 -8
  28. package/dist/{chunk-SHHALVIQ.js → chunk-OUQPIJFQ.js} +5 -5
  29. package/dist/chunk-PE6DXWOX.js +52 -0
  30. package/dist/{chunk-3BVB3DTJ.js → chunk-PING5S2U.js} +8 -8
  31. package/dist/{chunk-2R7JBGUP.js → chunk-PWGQKUJW.js} +200 -85
  32. package/dist/{chunk-CTAL72US.js → chunk-Q2IBLC6D.js} +5 -5
  33. package/dist/{chunk-XG33Y5QX.js → chunk-R45GQNKO.js} +200 -85
  34. package/dist/{chunk-MJIP3FY5.js → chunk-R4ZFFYJA.js} +238 -2502
  35. package/dist/{chunk-7UNYBZSU.js → chunk-RABVZXRU.js} +7 -7
  36. package/dist/{chunk-3DQANJMY.js → chunk-SAAMENIS.js} +7 -7
  37. package/dist/{chunk-57VS7LXW.js → chunk-SNSJWJTA.js} +5 -5
  38. package/dist/{chunk-YR5KNFKN.js → chunk-SUOMIRLO.js} +6 -6
  39. package/dist/{chunk-75BIJ5PX.js → chunk-UB2X7DGZ.js} +9 -9
  40. package/dist/{chunk-BWYO73FG.js → chunk-UFYFNNCN.js} +8 -8
  41. package/dist/{chunk-67I7CEQJ.js → chunk-URRVX2VQ.js} +6 -6
  42. package/dist/{chunk-FUC2LI24.js → chunk-VTJOX6HO.js} +5 -5
  43. package/dist/{chunk-EFNTOXMV.js → chunk-VYJSNZF3.js} +4 -3
  44. package/dist/{chunk-ETYWYJBX.js → chunk-WF5LZFJS.js} +12 -12
  45. package/dist/{chunk-7U7QD73Y.js → chunk-WOIJKMTZ.js} +8 -8
  46. package/dist/{chunk-D6EDE5WT.js → chunk-XMVJRTN5.js} +5 -5
  47. package/dist/{chunk-RSLFYIHN.js → chunk-XRBOJLES.js} +5 -4
  48. package/dist/cli/checkUnsupportedDataProxy.js +44 -37
  49. package/dist/cli/getSchema.js +47 -40
  50. package/dist/cli/hashes.js +44 -37
  51. package/dist/cli/schemaContext.js +44 -37
  52. package/dist/engine-commands/errorHelpers.js +4 -4
  53. package/dist/engine-commands/formatSchema.js +43 -36
  54. package/dist/engine-commands/getConfig.js +10 -10
  55. package/dist/engine-commands/getDmmf.js +7 -7
  56. package/dist/engine-commands/getEngineVersion.js +7 -6
  57. package/dist/engine-commands/getEnginesMetaInfo.js +9 -8
  58. package/dist/engine-commands/index.js +54 -47
  59. package/dist/engine-commands/lintSchema.js +8 -8
  60. package/dist/engine-commands/mergeSchemas.js +7 -7
  61. package/dist/engine-commands/validate.js +7 -7
  62. package/dist/errorReporting.js +6 -6
  63. package/dist/get-generators/generatorResolvers/generatorResolvers.d.ts +15 -0
  64. package/dist/get-generators/generatorResolvers/generatorResolvers.js +139 -0
  65. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +6 -0
  66. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +26 -0
  67. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +9 -0
  68. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +26 -0
  69. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +8 -0
  70. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +29 -0
  71. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +6 -0
  72. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +139 -0
  73. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +1 -0
  74. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +26 -0
  75. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +20 -0
  76. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +26 -0
  77. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +7 -0
  78. package/dist/{resolvePkg.js → get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js} +6 -6
  79. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.d.ts +1 -0
  80. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +17 -0
  81. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +20 -0
  82. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +140 -0
  83. package/dist/get-generators/getGenerators.d.ts +9 -18
  84. package/dist/get-generators/getGenerators.js +46 -39
  85. package/dist/get-generators/utils/getBinaryPathsByVersion.js +4 -3
  86. package/dist/getPackedPackage.js +5 -4
  87. package/dist/index.d.ts +4 -2
  88. package/dist/index.js +87 -80
  89. package/dist/{multipart-parser-3AFJFP6K.js → multipart-parser-UV3WZSWW.js} +6 -6
  90. package/dist/resolveBinary.js +8 -7
  91. package/dist/schemaEngineCommands.js +10 -9
  92. package/dist/sendPanic.js +4 -4
  93. package/dist/utils/cloudflareD1.js +3 -3
  94. package/dist/utils/fs-functional.js +10 -10
  95. package/dist/utils/fs-utils.js +8 -8
  96. package/dist/utils/getEnvPaths.js +43 -36
  97. package/dist/utils/getVersionFromPackageJson.js +3 -3
  98. package/dist/utils/handlePanic.js +5 -5
  99. package/dist/utils/loadEnvFile.js +43 -36
  100. package/dist/wasm.js +4 -4
  101. package/package.json +11 -10
  102. package/dist/resolvePkg.d.ts +0 -7
@@ -16,11 +16,12 @@ var __copyProps = (to, from, except, desc) => {
16
16
  return to;
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_IDINCQMN_exports = {};
20
- __export(chunk_IDINCQMN_exports, {
19
+ var chunk_IWTEX7EE_exports = {};
20
+ __export(chunk_IWTEX7EE_exports, {
21
21
  require_lib: () => require_lib
22
22
  });
23
- module.exports = __toCommonJS(chunk_IDINCQMN_exports);
23
+ module.exports = __toCommonJS(chunk_IWTEX7EE_exports);
24
+ var import_chunk_DYV47NUW = require("./chunk-DYV47NUW.js");
24
25
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
25
26
  var require_universalify = (0, import_chunk_4VNS5WPM.__commonJS)({
26
27
  "../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
@@ -48,783 +49,11 @@ var require_universalify = (0, import_chunk_4VNS5WPM.__commonJS)({
48
49
  };
49
50
  }
50
51
  });
51
- var require_polyfills = (0, import_chunk_4VNS5WPM.__commonJS)({
52
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module2) {
53
- "use strict";
54
- var constants = (0, import_chunk_4VNS5WPM.__require)("constants");
55
- var origCwd = process.cwd;
56
- var cwd = null;
57
- var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
58
- process.cwd = function() {
59
- if (!cwd)
60
- cwd = origCwd.call(process);
61
- return cwd;
62
- };
63
- try {
64
- process.cwd();
65
- } catch (er) {
66
- }
67
- if (typeof process.chdir === "function") {
68
- chdir = process.chdir;
69
- process.chdir = function(d) {
70
- cwd = null;
71
- chdir.call(process, d);
72
- };
73
- if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
74
- }
75
- var chdir;
76
- module2.exports = patch;
77
- function patch(fs) {
78
- if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
79
- patchLchmod(fs);
80
- }
81
- if (!fs.lutimes) {
82
- patchLutimes(fs);
83
- }
84
- fs.chown = chownFix(fs.chown);
85
- fs.fchown = chownFix(fs.fchown);
86
- fs.lchown = chownFix(fs.lchown);
87
- fs.chmod = chmodFix(fs.chmod);
88
- fs.fchmod = chmodFix(fs.fchmod);
89
- fs.lchmod = chmodFix(fs.lchmod);
90
- fs.chownSync = chownFixSync(fs.chownSync);
91
- fs.fchownSync = chownFixSync(fs.fchownSync);
92
- fs.lchownSync = chownFixSync(fs.lchownSync);
93
- fs.chmodSync = chmodFixSync(fs.chmodSync);
94
- fs.fchmodSync = chmodFixSync(fs.fchmodSync);
95
- fs.lchmodSync = chmodFixSync(fs.lchmodSync);
96
- fs.stat = statFix(fs.stat);
97
- fs.fstat = statFix(fs.fstat);
98
- fs.lstat = statFix(fs.lstat);
99
- fs.statSync = statFixSync(fs.statSync);
100
- fs.fstatSync = statFixSync(fs.fstatSync);
101
- fs.lstatSync = statFixSync(fs.lstatSync);
102
- if (fs.chmod && !fs.lchmod) {
103
- fs.lchmod = function(path, mode, cb) {
104
- if (cb) process.nextTick(cb);
105
- };
106
- fs.lchmodSync = function() {
107
- };
108
- }
109
- if (fs.chown && !fs.lchown) {
110
- fs.lchown = function(path, uid, gid, cb) {
111
- if (cb) process.nextTick(cb);
112
- };
113
- fs.lchownSync = function() {
114
- };
115
- }
116
- if (platform === "win32") {
117
- fs.rename = typeof fs.rename !== "function" ? fs.rename : function(fs$rename) {
118
- function rename(from, to, cb) {
119
- var start = Date.now();
120
- var backoff = 0;
121
- fs$rename(from, to, function CB(er) {
122
- if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
123
- setTimeout(function() {
124
- fs.stat(to, function(stater, st) {
125
- if (stater && stater.code === "ENOENT")
126
- fs$rename(from, to, CB);
127
- else
128
- cb(er);
129
- });
130
- }, backoff);
131
- if (backoff < 100)
132
- backoff += 10;
133
- return;
134
- }
135
- if (cb) cb(er);
136
- });
137
- }
138
- if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
139
- return rename;
140
- }(fs.rename);
141
- }
142
- fs.read = typeof fs.read !== "function" ? fs.read : function(fs$read) {
143
- function read(fd, buffer, offset, length, position, callback_) {
144
- var callback;
145
- if (callback_ && typeof callback_ === "function") {
146
- var eagCounter = 0;
147
- callback = function(er, _, __) {
148
- if (er && er.code === "EAGAIN" && eagCounter < 10) {
149
- eagCounter++;
150
- return fs$read.call(fs, fd, buffer, offset, length, position, callback);
151
- }
152
- callback_.apply(this, arguments);
153
- };
154
- }
155
- return fs$read.call(fs, fd, buffer, offset, length, position, callback);
156
- }
157
- if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
158
- return read;
159
- }(fs.read);
160
- fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : /* @__PURE__ */ function(fs$readSync) {
161
- return function(fd, buffer, offset, length, position) {
162
- var eagCounter = 0;
163
- while (true) {
164
- try {
165
- return fs$readSync.call(fs, fd, buffer, offset, length, position);
166
- } catch (er) {
167
- if (er.code === "EAGAIN" && eagCounter < 10) {
168
- eagCounter++;
169
- continue;
170
- }
171
- throw er;
172
- }
173
- }
174
- };
175
- }(fs.readSync);
176
- function patchLchmod(fs2) {
177
- fs2.lchmod = function(path, mode, callback) {
178
- fs2.open(
179
- path,
180
- constants.O_WRONLY | constants.O_SYMLINK,
181
- mode,
182
- function(err, fd) {
183
- if (err) {
184
- if (callback) callback(err);
185
- return;
186
- }
187
- fs2.fchmod(fd, mode, function(err2) {
188
- fs2.close(fd, function(err22) {
189
- if (callback) callback(err2 || err22);
190
- });
191
- });
192
- }
193
- );
194
- };
195
- fs2.lchmodSync = function(path, mode) {
196
- var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
197
- var threw = true;
198
- var ret;
199
- try {
200
- ret = fs2.fchmodSync(fd, mode);
201
- threw = false;
202
- } finally {
203
- if (threw) {
204
- try {
205
- fs2.closeSync(fd);
206
- } catch (er) {
207
- }
208
- } else {
209
- fs2.closeSync(fd);
210
- }
211
- }
212
- return ret;
213
- };
214
- }
215
- function patchLutimes(fs2) {
216
- if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) {
217
- fs2.lutimes = function(path, at, mt, cb) {
218
- fs2.open(path, constants.O_SYMLINK, function(er, fd) {
219
- if (er) {
220
- if (cb) cb(er);
221
- return;
222
- }
223
- fs2.futimes(fd, at, mt, function(er2) {
224
- fs2.close(fd, function(er22) {
225
- if (cb) cb(er2 || er22);
226
- });
227
- });
228
- });
229
- };
230
- fs2.lutimesSync = function(path, at, mt) {
231
- var fd = fs2.openSync(path, constants.O_SYMLINK);
232
- var ret;
233
- var threw = true;
234
- try {
235
- ret = fs2.futimesSync(fd, at, mt);
236
- threw = false;
237
- } finally {
238
- if (threw) {
239
- try {
240
- fs2.closeSync(fd);
241
- } catch (er) {
242
- }
243
- } else {
244
- fs2.closeSync(fd);
245
- }
246
- }
247
- return ret;
248
- };
249
- } else if (fs2.futimes) {
250
- fs2.lutimes = function(_a, _b, _c, cb) {
251
- if (cb) process.nextTick(cb);
252
- };
253
- fs2.lutimesSync = function() {
254
- };
255
- }
256
- }
257
- function chmodFix(orig) {
258
- if (!orig) return orig;
259
- return function(target, mode, cb) {
260
- return orig.call(fs, target, mode, function(er) {
261
- if (chownErOk(er)) er = null;
262
- if (cb) cb.apply(this, arguments);
263
- });
264
- };
265
- }
266
- function chmodFixSync(orig) {
267
- if (!orig) return orig;
268
- return function(target, mode) {
269
- try {
270
- return orig.call(fs, target, mode);
271
- } catch (er) {
272
- if (!chownErOk(er)) throw er;
273
- }
274
- };
275
- }
276
- function chownFix(orig) {
277
- if (!orig) return orig;
278
- return function(target, uid, gid, cb) {
279
- return orig.call(fs, target, uid, gid, function(er) {
280
- if (chownErOk(er)) er = null;
281
- if (cb) cb.apply(this, arguments);
282
- });
283
- };
284
- }
285
- function chownFixSync(orig) {
286
- if (!orig) return orig;
287
- return function(target, uid, gid) {
288
- try {
289
- return orig.call(fs, target, uid, gid);
290
- } catch (er) {
291
- if (!chownErOk(er)) throw er;
292
- }
293
- };
294
- }
295
- function statFix(orig) {
296
- if (!orig) return orig;
297
- return function(target, options, cb) {
298
- if (typeof options === "function") {
299
- cb = options;
300
- options = null;
301
- }
302
- function callback(er, stats) {
303
- if (stats) {
304
- if (stats.uid < 0) stats.uid += 4294967296;
305
- if (stats.gid < 0) stats.gid += 4294967296;
306
- }
307
- if (cb) cb.apply(this, arguments);
308
- }
309
- return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
310
- };
311
- }
312
- function statFixSync(orig) {
313
- if (!orig) return orig;
314
- return function(target, options) {
315
- var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
316
- if (stats) {
317
- if (stats.uid < 0) stats.uid += 4294967296;
318
- if (stats.gid < 0) stats.gid += 4294967296;
319
- }
320
- return stats;
321
- };
322
- }
323
- function chownErOk(er) {
324
- if (!er)
325
- return true;
326
- if (er.code === "ENOSYS")
327
- return true;
328
- var nonroot = !process.getuid || process.getuid() !== 0;
329
- if (nonroot) {
330
- if (er.code === "EINVAL" || er.code === "EPERM")
331
- return true;
332
- }
333
- return false;
334
- }
335
- }
336
- }
337
- });
338
- var require_legacy_streams = (0, import_chunk_4VNS5WPM.__commonJS)({
339
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module2) {
340
- "use strict";
341
- var Stream = (0, import_chunk_4VNS5WPM.__require)("stream").Stream;
342
- module2.exports = legacy;
343
- function legacy(fs) {
344
- return {
345
- ReadStream,
346
- WriteStream
347
- };
348
- function ReadStream(path, options) {
349
- if (!(this instanceof ReadStream)) return new ReadStream(path, options);
350
- Stream.call(this);
351
- var self = this;
352
- this.path = path;
353
- this.fd = null;
354
- this.readable = true;
355
- this.paused = false;
356
- this.flags = "r";
357
- this.mode = 438;
358
- this.bufferSize = 64 * 1024;
359
- options = options || {};
360
- var keys = Object.keys(options);
361
- for (var index = 0, length = keys.length; index < length; index++) {
362
- var key = keys[index];
363
- this[key] = options[key];
364
- }
365
- if (this.encoding) this.setEncoding(this.encoding);
366
- if (this.start !== void 0) {
367
- if ("number" !== typeof this.start) {
368
- throw TypeError("start must be a Number");
369
- }
370
- if (this.end === void 0) {
371
- this.end = Infinity;
372
- } else if ("number" !== typeof this.end) {
373
- throw TypeError("end must be a Number");
374
- }
375
- if (this.start > this.end) {
376
- throw new Error("start must be <= end");
377
- }
378
- this.pos = this.start;
379
- }
380
- if (this.fd !== null) {
381
- process.nextTick(function() {
382
- self._read();
383
- });
384
- return;
385
- }
386
- fs.open(this.path, this.flags, this.mode, function(err, fd) {
387
- if (err) {
388
- self.emit("error", err);
389
- self.readable = false;
390
- return;
391
- }
392
- self.fd = fd;
393
- self.emit("open", fd);
394
- self._read();
395
- });
396
- }
397
- function WriteStream(path, options) {
398
- if (!(this instanceof WriteStream)) return new WriteStream(path, options);
399
- Stream.call(this);
400
- this.path = path;
401
- this.fd = null;
402
- this.writable = true;
403
- this.flags = "w";
404
- this.encoding = "binary";
405
- this.mode = 438;
406
- this.bytesWritten = 0;
407
- options = options || {};
408
- var keys = Object.keys(options);
409
- for (var index = 0, length = keys.length; index < length; index++) {
410
- var key = keys[index];
411
- this[key] = options[key];
412
- }
413
- if (this.start !== void 0) {
414
- if ("number" !== typeof this.start) {
415
- throw TypeError("start must be a Number");
416
- }
417
- if (this.start < 0) {
418
- throw new Error("start must be >= zero");
419
- }
420
- this.pos = this.start;
421
- }
422
- this.busy = false;
423
- this._queue = [];
424
- if (this.fd === null) {
425
- this._open = fs.open;
426
- this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
427
- this.flush();
428
- }
429
- }
430
- }
431
- }
432
- });
433
- var require_clone = (0, import_chunk_4VNS5WPM.__commonJS)({
434
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module2) {
435
- "use strict";
436
- module2.exports = clone;
437
- var getPrototypeOf = Object.getPrototypeOf || function(obj) {
438
- return obj.__proto__;
439
- };
440
- function clone(obj) {
441
- if (obj === null || typeof obj !== "object")
442
- return obj;
443
- if (obj instanceof Object)
444
- var copy = { __proto__: getPrototypeOf(obj) };
445
- else
446
- var copy = /* @__PURE__ */ Object.create(null);
447
- Object.getOwnPropertyNames(obj).forEach(function(key) {
448
- Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
449
- });
450
- return copy;
451
- }
452
- }
453
- });
454
- var require_graceful_fs = (0, import_chunk_4VNS5WPM.__commonJS)({
455
- "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
456
- "use strict";
457
- var fs = (0, import_chunk_4VNS5WPM.__require)("fs");
458
- var polyfills = require_polyfills();
459
- var legacy = require_legacy_streams();
460
- var clone = require_clone();
461
- var util = (0, import_chunk_4VNS5WPM.__require)("util");
462
- var gracefulQueue;
463
- var previousSymbol;
464
- if (typeof Symbol === "function" && typeof Symbol.for === "function") {
465
- gracefulQueue = Symbol.for("graceful-fs.queue");
466
- previousSymbol = Symbol.for("graceful-fs.previous");
467
- } else {
468
- gracefulQueue = "___graceful-fs.queue";
469
- previousSymbol = "___graceful-fs.previous";
470
- }
471
- function noop() {
472
- }
473
- function publishQueue(context, queue2) {
474
- Object.defineProperty(context, gracefulQueue, {
475
- get: function() {
476
- return queue2;
477
- }
478
- });
479
- }
480
- var debug = noop;
481
- if (util.debuglog)
482
- debug = util.debuglog("gfs4");
483
- else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
484
- debug = function() {
485
- var m = util.format.apply(util, arguments);
486
- m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
487
- console.error(m);
488
- };
489
- if (!fs[gracefulQueue]) {
490
- queue = global[gracefulQueue] || [];
491
- publishQueue(fs, queue);
492
- fs.close = function(fs$close) {
493
- function close(fd, cb) {
494
- return fs$close.call(fs, fd, function(err) {
495
- if (!err) {
496
- resetQueue();
497
- }
498
- if (typeof cb === "function")
499
- cb.apply(this, arguments);
500
- });
501
- }
502
- Object.defineProperty(close, previousSymbol, {
503
- value: fs$close
504
- });
505
- return close;
506
- }(fs.close);
507
- fs.closeSync = function(fs$closeSync) {
508
- function closeSync(fd) {
509
- fs$closeSync.apply(fs, arguments);
510
- resetQueue();
511
- }
512
- Object.defineProperty(closeSync, previousSymbol, {
513
- value: fs$closeSync
514
- });
515
- return closeSync;
516
- }(fs.closeSync);
517
- if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
518
- process.on("exit", function() {
519
- debug(fs[gracefulQueue]);
520
- (0, import_chunk_4VNS5WPM.__require)("assert").equal(fs[gracefulQueue].length, 0);
521
- });
522
- }
523
- }
524
- var queue;
525
- if (!global[gracefulQueue]) {
526
- publishQueue(global, fs[gracefulQueue]);
527
- }
528
- module2.exports = patch(clone(fs));
529
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
530
- module2.exports = patch(fs);
531
- fs.__patched = true;
532
- }
533
- function patch(fs2) {
534
- polyfills(fs2);
535
- fs2.gracefulify = patch;
536
- fs2.createReadStream = createReadStream;
537
- fs2.createWriteStream = createWriteStream;
538
- var fs$readFile = fs2.readFile;
539
- fs2.readFile = readFile;
540
- function readFile(path, options, cb) {
541
- if (typeof options === "function")
542
- cb = options, options = null;
543
- return go$readFile(path, options, cb);
544
- function go$readFile(path2, options2, cb2, startTime) {
545
- return fs$readFile(path2, options2, function(err) {
546
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
547
- enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]);
548
- else {
549
- if (typeof cb2 === "function")
550
- cb2.apply(this, arguments);
551
- }
552
- });
553
- }
554
- }
555
- var fs$writeFile = fs2.writeFile;
556
- fs2.writeFile = writeFile;
557
- function writeFile(path, data, options, cb) {
558
- if (typeof options === "function")
559
- cb = options, options = null;
560
- return go$writeFile(path, data, options, cb);
561
- function go$writeFile(path2, data2, options2, cb2, startTime) {
562
- return fs$writeFile(path2, data2, options2, function(err) {
563
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
564
- enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
565
- else {
566
- if (typeof cb2 === "function")
567
- cb2.apply(this, arguments);
568
- }
569
- });
570
- }
571
- }
572
- var fs$appendFile = fs2.appendFile;
573
- if (fs$appendFile)
574
- fs2.appendFile = appendFile;
575
- function appendFile(path, data, options, cb) {
576
- if (typeof options === "function")
577
- cb = options, options = null;
578
- return go$appendFile(path, data, options, cb);
579
- function go$appendFile(path2, data2, options2, cb2, startTime) {
580
- return fs$appendFile(path2, data2, options2, function(err) {
581
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
582
- enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
583
- else {
584
- if (typeof cb2 === "function")
585
- cb2.apply(this, arguments);
586
- }
587
- });
588
- }
589
- }
590
- var fs$copyFile = fs2.copyFile;
591
- if (fs$copyFile)
592
- fs2.copyFile = copyFile;
593
- function copyFile(src, dest, flags, cb) {
594
- if (typeof flags === "function") {
595
- cb = flags;
596
- flags = 0;
597
- }
598
- return go$copyFile(src, dest, flags, cb);
599
- function go$copyFile(src2, dest2, flags2, cb2, startTime) {
600
- return fs$copyFile(src2, dest2, flags2, function(err) {
601
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
602
- enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
603
- else {
604
- if (typeof cb2 === "function")
605
- cb2.apply(this, arguments);
606
- }
607
- });
608
- }
609
- }
610
- var fs$readdir = fs2.readdir;
611
- fs2.readdir = readdir;
612
- var noReaddirOptionVersions = /^v[0-5]\./;
613
- function readdir(path, options, cb) {
614
- if (typeof options === "function")
615
- cb = options, options = null;
616
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path2, options2, cb2, startTime) {
617
- return fs$readdir(path2, fs$readdirCallback(
618
- path2,
619
- options2,
620
- cb2,
621
- startTime
622
- ));
623
- } : function go$readdir2(path2, options2, cb2, startTime) {
624
- return fs$readdir(path2, options2, fs$readdirCallback(
625
- path2,
626
- options2,
627
- cb2,
628
- startTime
629
- ));
630
- };
631
- return go$readdir(path, options, cb);
632
- function fs$readdirCallback(path2, options2, cb2, startTime) {
633
- return function(err, files) {
634
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
635
- enqueue([
636
- go$readdir,
637
- [path2, options2, cb2],
638
- err,
639
- startTime || Date.now(),
640
- Date.now()
641
- ]);
642
- else {
643
- if (files && files.sort)
644
- files.sort();
645
- if (typeof cb2 === "function")
646
- cb2.call(this, err, files);
647
- }
648
- };
649
- }
650
- }
651
- if (process.version.substr(0, 4) === "v0.8") {
652
- var legStreams = legacy(fs2);
653
- ReadStream = legStreams.ReadStream;
654
- WriteStream = legStreams.WriteStream;
655
- }
656
- var fs$ReadStream = fs2.ReadStream;
657
- if (fs$ReadStream) {
658
- ReadStream.prototype = Object.create(fs$ReadStream.prototype);
659
- ReadStream.prototype.open = ReadStream$open;
660
- }
661
- var fs$WriteStream = fs2.WriteStream;
662
- if (fs$WriteStream) {
663
- WriteStream.prototype = Object.create(fs$WriteStream.prototype);
664
- WriteStream.prototype.open = WriteStream$open;
665
- }
666
- Object.defineProperty(fs2, "ReadStream", {
667
- get: function() {
668
- return ReadStream;
669
- },
670
- set: function(val) {
671
- ReadStream = val;
672
- },
673
- enumerable: true,
674
- configurable: true
675
- });
676
- Object.defineProperty(fs2, "WriteStream", {
677
- get: function() {
678
- return WriteStream;
679
- },
680
- set: function(val) {
681
- WriteStream = val;
682
- },
683
- enumerable: true,
684
- configurable: true
685
- });
686
- var FileReadStream = ReadStream;
687
- Object.defineProperty(fs2, "FileReadStream", {
688
- get: function() {
689
- return FileReadStream;
690
- },
691
- set: function(val) {
692
- FileReadStream = val;
693
- },
694
- enumerable: true,
695
- configurable: true
696
- });
697
- var FileWriteStream = WriteStream;
698
- Object.defineProperty(fs2, "FileWriteStream", {
699
- get: function() {
700
- return FileWriteStream;
701
- },
702
- set: function(val) {
703
- FileWriteStream = val;
704
- },
705
- enumerable: true,
706
- configurable: true
707
- });
708
- function ReadStream(path, options) {
709
- if (this instanceof ReadStream)
710
- return fs$ReadStream.apply(this, arguments), this;
711
- else
712
- return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
713
- }
714
- function ReadStream$open() {
715
- var that = this;
716
- open(that.path, that.flags, that.mode, function(err, fd) {
717
- if (err) {
718
- if (that.autoClose)
719
- that.destroy();
720
- that.emit("error", err);
721
- } else {
722
- that.fd = fd;
723
- that.emit("open", fd);
724
- that.read();
725
- }
726
- });
727
- }
728
- function WriteStream(path, options) {
729
- if (this instanceof WriteStream)
730
- return fs$WriteStream.apply(this, arguments), this;
731
- else
732
- return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
733
- }
734
- function WriteStream$open() {
735
- var that = this;
736
- open(that.path, that.flags, that.mode, function(err, fd) {
737
- if (err) {
738
- that.destroy();
739
- that.emit("error", err);
740
- } else {
741
- that.fd = fd;
742
- that.emit("open", fd);
743
- }
744
- });
745
- }
746
- function createReadStream(path, options) {
747
- return new fs2.ReadStream(path, options);
748
- }
749
- function createWriteStream(path, options) {
750
- return new fs2.WriteStream(path, options);
751
- }
752
- var fs$open = fs2.open;
753
- fs2.open = open;
754
- function open(path, flags, mode, cb) {
755
- if (typeof mode === "function")
756
- cb = mode, mode = null;
757
- return go$open(path, flags, mode, cb);
758
- function go$open(path2, flags2, mode2, cb2, startTime) {
759
- return fs$open(path2, flags2, mode2, function(err, fd) {
760
- if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
761
- enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
762
- else {
763
- if (typeof cb2 === "function")
764
- cb2.apply(this, arguments);
765
- }
766
- });
767
- }
768
- }
769
- return fs2;
770
- }
771
- function enqueue(elem) {
772
- debug("ENQUEUE", elem[0].name, elem[1]);
773
- fs[gracefulQueue].push(elem);
774
- retry();
775
- }
776
- var retryTimer;
777
- function resetQueue() {
778
- var now = Date.now();
779
- for (var i = 0; i < fs[gracefulQueue].length; ++i) {
780
- if (fs[gracefulQueue][i].length > 2) {
781
- fs[gracefulQueue][i][3] = now;
782
- fs[gracefulQueue][i][4] = now;
783
- }
784
- }
785
- retry();
786
- }
787
- function retry() {
788
- clearTimeout(retryTimer);
789
- retryTimer = void 0;
790
- if (fs[gracefulQueue].length === 0)
791
- return;
792
- var elem = fs[gracefulQueue].shift();
793
- var fn = elem[0];
794
- var args = elem[1];
795
- var err = elem[2];
796
- var startTime = elem[3];
797
- var lastTime = elem[4];
798
- if (startTime === void 0) {
799
- debug("RETRY", fn.name, args);
800
- fn.apply(null, args);
801
- } else if (Date.now() - startTime >= 6e4) {
802
- debug("TIMEOUT", fn.name, args);
803
- var cb = args.pop();
804
- if (typeof cb === "function")
805
- cb.call(null, err);
806
- } else {
807
- var sinceAttempt = Date.now() - lastTime;
808
- var sinceStart = Math.max(lastTime - startTime, 1);
809
- var desiredDelay = Math.min(sinceStart * 1.2, 100);
810
- if (sinceAttempt >= desiredDelay) {
811
- debug("RETRY", fn.name, args);
812
- fn.apply(null, args.concat([startTime]));
813
- } else {
814
- fs[gracefulQueue].push(elem);
815
- }
816
- }
817
- if (retryTimer === void 0) {
818
- retryTimer = setTimeout(retry, 0);
819
- }
820
- }
821
- }
822
- });
823
52
  var require_fs = (0, import_chunk_4VNS5WPM.__commonJS)({
824
53
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
825
54
  "use strict";
826
55
  var u = require_universalify().fromCallback;
827
- var fs = require_graceful_fs();
56
+ var fs = (0, import_chunk_DYV47NUW.require_graceful_fs)();
828
57
  var api = [
829
58
  "access",
830
59
  "appendFile",
@@ -1299,7 +528,7 @@ var require_copy = (0, import_chunk_4VNS5WPM.__commonJS)({
1299
528
  var require_copy_sync = (0, import_chunk_4VNS5WPM.__commonJS)({
1300
529
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module2) {
1301
530
  "use strict";
1302
- var fs = require_graceful_fs();
531
+ var fs = (0, import_chunk_DYV47NUW.require_graceful_fs)();
1303
532
  var path = (0, import_chunk_4VNS5WPM.__require)("path");
1304
533
  var mkdirsSync = require_mkdirs().mkdirsSync;
1305
534
  var utimesMillisSync = require_utimes().utimesMillisSync;
@@ -1443,7 +672,7 @@ var require_copy2 = (0, import_chunk_4VNS5WPM.__commonJS)({
1443
672
  var require_remove = (0, import_chunk_4VNS5WPM.__commonJS)({
1444
673
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/remove/index.js"(exports, module2) {
1445
674
  "use strict";
1446
- var fs = require_graceful_fs();
675
+ var fs = (0, import_chunk_DYV47NUW.require_graceful_fs)();
1447
676
  var u = require_universalify().fromCallback;
1448
677
  function remove(path, callback) {
1449
678
  fs.rm(path, { recursive: true, force: true }, callback);
@@ -1812,7 +1041,7 @@ var require_jsonfile = (0, import_chunk_4VNS5WPM.__commonJS)({
1812
1041
  "use strict";
1813
1042
  var _fs;
1814
1043
  try {
1815
- _fs = require_graceful_fs();
1044
+ _fs = (0, import_chunk_DYV47NUW.require_graceful_fs)();
1816
1045
  } catch (_) {
1817
1046
  _fs = (0, import_chunk_4VNS5WPM.__require)("fs");
1818
1047
  }
@@ -2013,7 +1242,7 @@ var require_move = (0, import_chunk_4VNS5WPM.__commonJS)({
2013
1242
  var require_move_sync = (0, import_chunk_4VNS5WPM.__commonJS)({
2014
1243
  "../../node_modules/.pnpm/fs-extra@11.3.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module2) {
2015
1244
  "use strict";
2016
- var fs = require_graceful_fs();
1245
+ var fs = (0, import_chunk_DYV47NUW.require_graceful_fs)();
2017
1246
  var path = (0, import_chunk_4VNS5WPM.__require)("path");
2018
1247
  var copySync = require_copy2().copySync;
2019
1248
  var removeSync = require_remove().removeSync;