@kubb/core 2.0.0-beta.13 → 2.0.0-beta.14

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 (77) hide show
  1. package/dist/chunk-35FDNG5F.cjs +71 -0
  2. package/dist/chunk-35FDNG5F.cjs.map +1 -0
  3. package/dist/chunk-7CNPSL5M.js +85 -0
  4. package/dist/chunk-7CNPSL5M.js.map +1 -0
  5. package/dist/{chunk-SX2AYX5F.js → chunk-DKYWBKNH.js} +2 -2
  6. package/dist/chunk-EZSRGYAY.js +128 -0
  7. package/dist/chunk-EZSRGYAY.js.map +1 -0
  8. package/dist/{chunk-77QZQ377.cjs → chunk-GBX7KRCX.cjs} +12 -5
  9. package/dist/chunk-GBX7KRCX.cjs.map +1 -0
  10. package/dist/{chunk-FOQFLMOC.js → chunk-ICRPOCV4.cjs} +400 -446
  11. package/dist/chunk-ICRPOCV4.cjs.map +1 -0
  12. package/dist/chunk-LAS7UYTK.cjs +129 -0
  13. package/dist/chunk-LAS7UYTK.cjs.map +1 -0
  14. package/dist/chunk-LJHT3DNH.js +67 -0
  15. package/dist/chunk-LJHT3DNH.js.map +1 -0
  16. package/dist/{chunk-I7UUR5MZ.cjs → chunk-MM42A6GN.cjs} +3 -3
  17. package/dist/{chunk-I7UUR5MZ.cjs.map → chunk-MM42A6GN.cjs.map} +1 -1
  18. package/dist/{chunk-L6F5QUH2.js → chunk-SRGTC4FJ.js} +2 -2
  19. package/dist/{chunk-PY7I7OEN.cjs → chunk-ST7GHHSU.cjs} +34 -22
  20. package/dist/chunk-ST7GHHSU.cjs.map +1 -0
  21. package/dist/{chunk-ABFPJZJL.cjs → chunk-U4C2WTCI.cjs} +5 -5
  22. package/dist/{chunk-WFDR7OMY.js → chunk-UIQUKFF4.js} +9 -2
  23. package/dist/chunk-UIQUKFF4.js.map +1 -0
  24. package/dist/{chunk-6N4JBFFS.js → chunk-WTSDXEWD.js} +4 -12
  25. package/dist/chunk-WTSDXEWD.js.map +1 -0
  26. package/dist/fs.cjs +9 -8
  27. package/dist/fs.cjs.map +1 -1
  28. package/dist/fs.d.cts +1 -1
  29. package/dist/fs.d.ts +1 -1
  30. package/dist/fs.js +3 -2
  31. package/dist/fs.js.map +1 -1
  32. package/dist/index.cjs +955 -244
  33. package/dist/index.cjs.map +1 -1
  34. package/dist/index.d.cts +17 -15
  35. package/dist/index.d.ts +17 -15
  36. package/dist/index.js +135 -83
  37. package/dist/index.js.map +1 -1
  38. package/dist/logger.cjs +7 -6
  39. package/dist/logger.d.cts +1 -0
  40. package/dist/logger.d.ts +1 -0
  41. package/dist/logger.js +3 -2
  42. package/dist/transformers.cjs +21 -21
  43. package/dist/transformers.js +5 -5
  44. package/dist/utils.cjs +22 -19
  45. package/dist/utils.cjs.map +1 -1
  46. package/dist/utils.d.cts +0 -1
  47. package/dist/utils.d.ts +0 -1
  48. package/dist/utils.js +14 -4
  49. package/dist/utils.js.map +1 -1
  50. package/dist/{write-46ytbnu9.d.cts → write-A6VgHkYA.d.cts} +4 -1
  51. package/dist/{write-46ytbnu9.d.ts → write-A6VgHkYA.d.ts} +4 -1
  52. package/package.json +9 -8
  53. package/src/FileManager.ts +60 -57
  54. package/src/PluginManager.ts +11 -18
  55. package/src/build.ts +57 -32
  56. package/src/fs/clean.ts +2 -2
  57. package/src/fs/read.ts +1 -0
  58. package/src/fs/write.ts +40 -24
  59. package/src/logger.ts +10 -0
  60. package/src/utils/index.ts +0 -2
  61. package/dist/Queue-2-6pMcCx.d.cts +0 -32
  62. package/dist/Queue-2-6pMcCx.d.ts +0 -32
  63. package/dist/chunk-56YH3VX6.js +0 -239
  64. package/dist/chunk-56YH3VX6.js.map +0 -1
  65. package/dist/chunk-6N4JBFFS.js.map +0 -1
  66. package/dist/chunk-72O327DC.cjs +0 -247
  67. package/dist/chunk-72O327DC.cjs.map +0 -1
  68. package/dist/chunk-77QZQ377.cjs.map +0 -1
  69. package/dist/chunk-FOQFLMOC.js.map +0 -1
  70. package/dist/chunk-PY7I7OEN.cjs.map +0 -1
  71. package/dist/chunk-WFDR7OMY.js.map +0 -1
  72. package/dist/chunk-Z7XZQBAK.cjs +0 -2339
  73. package/dist/chunk-Z7XZQBAK.cjs.map +0 -1
  74. package/src/utils/Queue.ts +0 -110
  75. /package/dist/{chunk-SX2AYX5F.js.map → chunk-DKYWBKNH.js.map} +0 -0
  76. /package/dist/{chunk-L6F5QUH2.js.map → chunk-SRGTC4FJ.js.map} +0 -0
  77. /package/dist/{chunk-ABFPJZJL.cjs.map → chunk-U4C2WTCI.cjs.map} +0 -0
@@ -1,14 +1,13 @@
1
- import { createRequire } from 'module';
2
- import { __commonJS, init_esm_shims, __require, __toESM } from './chunk-6N4JBFFS.js';
3
- import { resolve, relative, basename, extname, dirname } from 'path';
4
- import { switcher } from 'js-runtime';
1
+ 'use strict';
5
2
 
6
- createRequire(import.meta.url);
3
+ var chunkMM42A6GN_cjs = require('./chunk-MM42A6GN.cjs');
4
+ var path = require('path');
5
+ var jsRuntime = require('js-runtime');
7
6
 
8
7
  // ../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js
9
- var require_universalify = __commonJS({
8
+ var require_universalify = chunkMM42A6GN_cjs.__commonJS({
10
9
  "../../node_modules/.pnpm/universalify@2.0.1/node_modules/universalify/index.js"(exports) {
11
- init_esm_shims();
10
+ chunkMM42A6GN_cjs.init_cjs_shims();
12
11
  exports.fromCallback = function(fn) {
13
12
  return Object.defineProperty(function(...args) {
14
13
  if (typeof args[args.length - 1] === "function")
@@ -36,10 +35,10 @@ var require_universalify = __commonJS({
36
35
  });
37
36
 
38
37
  // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
39
- var require_polyfills = __commonJS({
38
+ var require_polyfills = chunkMM42A6GN_cjs.__commonJS({
40
39
  "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module) {
41
- init_esm_shims();
42
- var constants = __require("constants");
40
+ chunkMM42A6GN_cjs.init_cjs_shims();
41
+ var constants = chunkMM42A6GN_cjs.__require("constants");
43
42
  var origCwd = process.cwd;
44
43
  var cwd = null;
45
44
  var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
@@ -63,56 +62,56 @@ var require_polyfills = __commonJS({
63
62
  }
64
63
  var chdir;
65
64
  module.exports = patch;
66
- function patch(fs3) {
65
+ function patch(fs2) {
67
66
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
68
- patchLchmod(fs3);
69
- }
70
- if (!fs3.lutimes) {
71
- patchLutimes(fs3);
72
- }
73
- fs3.chown = chownFix(fs3.chown);
74
- fs3.fchown = chownFix(fs3.fchown);
75
- fs3.lchown = chownFix(fs3.lchown);
76
- fs3.chmod = chmodFix(fs3.chmod);
77
- fs3.fchmod = chmodFix(fs3.fchmod);
78
- fs3.lchmod = chmodFix(fs3.lchmod);
79
- fs3.chownSync = chownFixSync(fs3.chownSync);
80
- fs3.fchownSync = chownFixSync(fs3.fchownSync);
81
- fs3.lchownSync = chownFixSync(fs3.lchownSync);
82
- fs3.chmodSync = chmodFixSync(fs3.chmodSync);
83
- fs3.fchmodSync = chmodFixSync(fs3.fchmodSync);
84
- fs3.lchmodSync = chmodFixSync(fs3.lchmodSync);
85
- fs3.stat = statFix(fs3.stat);
86
- fs3.fstat = statFix(fs3.fstat);
87
- fs3.lstat = statFix(fs3.lstat);
88
- fs3.statSync = statFixSync(fs3.statSync);
89
- fs3.fstatSync = statFixSync(fs3.fstatSync);
90
- fs3.lstatSync = statFixSync(fs3.lstatSync);
91
- if (fs3.chmod && !fs3.lchmod) {
92
- fs3.lchmod = function(path, mode, cb) {
67
+ patchLchmod(fs2);
68
+ }
69
+ if (!fs2.lutimes) {
70
+ patchLutimes(fs2);
71
+ }
72
+ fs2.chown = chownFix(fs2.chown);
73
+ fs2.fchown = chownFix(fs2.fchown);
74
+ fs2.lchown = chownFix(fs2.lchown);
75
+ fs2.chmod = chmodFix(fs2.chmod);
76
+ fs2.fchmod = chmodFix(fs2.fchmod);
77
+ fs2.lchmod = chmodFix(fs2.lchmod);
78
+ fs2.chownSync = chownFixSync(fs2.chownSync);
79
+ fs2.fchownSync = chownFixSync(fs2.fchownSync);
80
+ fs2.lchownSync = chownFixSync(fs2.lchownSync);
81
+ fs2.chmodSync = chmodFixSync(fs2.chmodSync);
82
+ fs2.fchmodSync = chmodFixSync(fs2.fchmodSync);
83
+ fs2.lchmodSync = chmodFixSync(fs2.lchmodSync);
84
+ fs2.stat = statFix(fs2.stat);
85
+ fs2.fstat = statFix(fs2.fstat);
86
+ fs2.lstat = statFix(fs2.lstat);
87
+ fs2.statSync = statFixSync(fs2.statSync);
88
+ fs2.fstatSync = statFixSync(fs2.fstatSync);
89
+ fs2.lstatSync = statFixSync(fs2.lstatSync);
90
+ if (fs2.chmod && !fs2.lchmod) {
91
+ fs2.lchmod = function(path, mode, cb) {
93
92
  if (cb)
94
93
  process.nextTick(cb);
95
94
  };
96
- fs3.lchmodSync = function() {
95
+ fs2.lchmodSync = function() {
97
96
  };
98
97
  }
99
- if (fs3.chown && !fs3.lchown) {
100
- fs3.lchown = function(path, uid, gid, cb) {
98
+ if (fs2.chown && !fs2.lchown) {
99
+ fs2.lchown = function(path, uid, gid, cb) {
101
100
  if (cb)
102
101
  process.nextTick(cb);
103
102
  };
104
- fs3.lchownSync = function() {
103
+ fs2.lchownSync = function() {
105
104
  };
106
105
  }
107
106
  if (platform === "win32") {
108
- fs3.rename = typeof fs3.rename !== "function" ? fs3.rename : function(fs$rename) {
107
+ fs2.rename = typeof fs2.rename !== "function" ? fs2.rename : function(fs$rename) {
109
108
  function rename(from, to, cb) {
110
109
  var start = Date.now();
111
110
  var backoff = 0;
112
111
  fs$rename(from, to, function CB(er) {
113
112
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
114
113
  setTimeout(function() {
115
- fs3.stat(to, function(stater, st) {
114
+ fs2.stat(to, function(stater, st) {
116
115
  if (stater && stater.code === "ENOENT")
117
116
  fs$rename(from, to, CB);
118
117
  else
@@ -130,33 +129,33 @@ var require_polyfills = __commonJS({
130
129
  if (Object.setPrototypeOf)
131
130
  Object.setPrototypeOf(rename, fs$rename);
132
131
  return rename;
133
- }(fs3.rename);
132
+ }(fs2.rename);
134
133
  }
135
- fs3.read = typeof fs3.read !== "function" ? fs3.read : function(fs$read) {
136
- function read2(fd, buffer, offset, length, position, callback_) {
134
+ fs2.read = typeof fs2.read !== "function" ? fs2.read : function(fs$read) {
135
+ function read(fd, buffer, offset, length, position, callback_) {
137
136
  var callback;
138
137
  if (callback_ && typeof callback_ === "function") {
139
138
  var eagCounter = 0;
140
139
  callback = function(er, _, __) {
141
140
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
142
141
  eagCounter++;
143
- return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
142
+ return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
144
143
  }
145
144
  callback_.apply(this, arguments);
146
145
  };
147
146
  }
148
- return fs$read.call(fs3, fd, buffer, offset, length, position, callback);
147
+ return fs$read.call(fs2, fd, buffer, offset, length, position, callback);
149
148
  }
150
149
  if (Object.setPrototypeOf)
151
- Object.setPrototypeOf(read2, fs$read);
152
- return read2;
153
- }(fs3.read);
154
- fs3.readSync = typeof fs3.readSync !== "function" ? fs3.readSync : /* @__PURE__ */ function(fs$readSync) {
150
+ Object.setPrototypeOf(read, fs$read);
151
+ return read;
152
+ }(fs2.read);
153
+ fs2.readSync = typeof fs2.readSync !== "function" ? fs2.readSync : /* @__PURE__ */ function(fs$readSync) {
155
154
  return function(fd, buffer, offset, length, position) {
156
155
  var eagCounter = 0;
157
156
  while (true) {
158
157
  try {
159
- return fs$readSync.call(fs3, fd, buffer, offset, length, position);
158
+ return fs$readSync.call(fs2, fd, buffer, offset, length, position);
160
159
  } catch (er) {
161
160
  if (er.code === "EAGAIN" && eagCounter < 10) {
162
161
  eagCounter++;
@@ -166,10 +165,10 @@ var require_polyfills = __commonJS({
166
165
  }
167
166
  }
168
167
  };
169
- }(fs3.readSync);
170
- function patchLchmod(fs4) {
171
- fs4.lchmod = function(path, mode, callback) {
172
- fs4.open(
168
+ }(fs2.readSync);
169
+ function patchLchmod(fs3) {
170
+ fs3.lchmod = function(path, mode, callback) {
171
+ fs3.open(
173
172
  path,
174
173
  constants.O_WRONLY | constants.O_SYMLINK,
175
174
  mode,
@@ -179,8 +178,8 @@ var require_polyfills = __commonJS({
179
178
  callback(err);
180
179
  return;
181
180
  }
182
- fs4.fchmod(fd, mode, function(err2) {
183
- fs4.close(fd, function(err22) {
181
+ fs3.fchmod(fd, mode, function(err2) {
182
+ fs3.close(fd, function(err22) {
184
183
  if (callback)
185
184
  callback(err2 || err22);
186
185
  });
@@ -188,68 +187,68 @@ var require_polyfills = __commonJS({
188
187
  }
189
188
  );
190
189
  };
191
- fs4.lchmodSync = function(path, mode) {
192
- var fd = fs4.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
190
+ fs3.lchmodSync = function(path, mode) {
191
+ var fd = fs3.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
193
192
  var threw = true;
194
193
  var ret;
195
194
  try {
196
- ret = fs4.fchmodSync(fd, mode);
195
+ ret = fs3.fchmodSync(fd, mode);
197
196
  threw = false;
198
197
  } finally {
199
198
  if (threw) {
200
199
  try {
201
- fs4.closeSync(fd);
200
+ fs3.closeSync(fd);
202
201
  } catch (er) {
203
202
  }
204
203
  } else {
205
- fs4.closeSync(fd);
204
+ fs3.closeSync(fd);
206
205
  }
207
206
  }
208
207
  return ret;
209
208
  };
210
209
  }
211
- function patchLutimes(fs4) {
212
- if (constants.hasOwnProperty("O_SYMLINK") && fs4.futimes) {
213
- fs4.lutimes = function(path, at, mt, cb) {
214
- fs4.open(path, constants.O_SYMLINK, function(er, fd) {
210
+ function patchLutimes(fs3) {
211
+ if (constants.hasOwnProperty("O_SYMLINK") && fs3.futimes) {
212
+ fs3.lutimes = function(path, at, mt, cb) {
213
+ fs3.open(path, constants.O_SYMLINK, function(er, fd) {
215
214
  if (er) {
216
215
  if (cb)
217
216
  cb(er);
218
217
  return;
219
218
  }
220
- fs4.futimes(fd, at, mt, function(er2) {
221
- fs4.close(fd, function(er22) {
219
+ fs3.futimes(fd, at, mt, function(er2) {
220
+ fs3.close(fd, function(er22) {
222
221
  if (cb)
223
222
  cb(er2 || er22);
224
223
  });
225
224
  });
226
225
  });
227
226
  };
228
- fs4.lutimesSync = function(path, at, mt) {
229
- var fd = fs4.openSync(path, constants.O_SYMLINK);
227
+ fs3.lutimesSync = function(path, at, mt) {
228
+ var fd = fs3.openSync(path, constants.O_SYMLINK);
230
229
  var ret;
231
230
  var threw = true;
232
231
  try {
233
- ret = fs4.futimesSync(fd, at, mt);
232
+ ret = fs3.futimesSync(fd, at, mt);
234
233
  threw = false;
235
234
  } finally {
236
235
  if (threw) {
237
236
  try {
238
- fs4.closeSync(fd);
237
+ fs3.closeSync(fd);
239
238
  } catch (er) {
240
239
  }
241
240
  } else {
242
- fs4.closeSync(fd);
241
+ fs3.closeSync(fd);
243
242
  }
244
243
  }
245
244
  return ret;
246
245
  };
247
- } else if (fs4.futimes) {
248
- fs4.lutimes = function(_a, _b, _c, cb) {
246
+ } else if (fs3.futimes) {
247
+ fs3.lutimes = function(_a, _b, _c, cb) {
249
248
  if (cb)
250
249
  process.nextTick(cb);
251
250
  };
252
- fs4.lutimesSync = function() {
251
+ fs3.lutimesSync = function() {
253
252
  };
254
253
  }
255
254
  }
@@ -257,7 +256,7 @@ var require_polyfills = __commonJS({
257
256
  if (!orig)
258
257
  return orig;
259
258
  return function(target, mode, cb) {
260
- return orig.call(fs3, target, mode, function(er) {
259
+ return orig.call(fs2, target, mode, function(er) {
261
260
  if (chownErOk(er))
262
261
  er = null;
263
262
  if (cb)
@@ -270,7 +269,7 @@ var require_polyfills = __commonJS({
270
269
  return orig;
271
270
  return function(target, mode) {
272
271
  try {
273
- return orig.call(fs3, target, mode);
272
+ return orig.call(fs2, target, mode);
274
273
  } catch (er) {
275
274
  if (!chownErOk(er))
276
275
  throw er;
@@ -281,7 +280,7 @@ var require_polyfills = __commonJS({
281
280
  if (!orig)
282
281
  return orig;
283
282
  return function(target, uid, gid, cb) {
284
- return orig.call(fs3, target, uid, gid, function(er) {
283
+ return orig.call(fs2, target, uid, gid, function(er) {
285
284
  if (chownErOk(er))
286
285
  er = null;
287
286
  if (cb)
@@ -294,7 +293,7 @@ var require_polyfills = __commonJS({
294
293
  return orig;
295
294
  return function(target, uid, gid) {
296
295
  try {
297
- return orig.call(fs3, target, uid, gid);
296
+ return orig.call(fs2, target, uid, gid);
298
297
  } catch (er) {
299
298
  if (!chownErOk(er))
300
299
  throw er;
@@ -319,14 +318,14 @@ var require_polyfills = __commonJS({
319
318
  if (cb)
320
319
  cb.apply(this, arguments);
321
320
  }
322
- return options ? orig.call(fs3, target, options, callback) : orig.call(fs3, target, callback);
321
+ return options ? orig.call(fs2, target, options, callback) : orig.call(fs2, target, callback);
323
322
  };
324
323
  }
325
324
  function statFixSync(orig) {
326
325
  if (!orig)
327
326
  return orig;
328
327
  return function(target, options) {
329
- var stats = options ? orig.call(fs3, target, options) : orig.call(fs3, target);
328
+ var stats = options ? orig.call(fs2, target, options) : orig.call(fs2, target);
330
329
  if (stats) {
331
330
  if (stats.uid < 0)
332
331
  stats.uid += 4294967296;
@@ -353,12 +352,12 @@ var require_polyfills = __commonJS({
353
352
  });
354
353
 
355
354
  // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
356
- var require_legacy_streams = __commonJS({
355
+ var require_legacy_streams = chunkMM42A6GN_cjs.__commonJS({
357
356
  "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module) {
358
- init_esm_shims();
359
- var Stream = __require("stream").Stream;
357
+ chunkMM42A6GN_cjs.init_cjs_shims();
358
+ var Stream = chunkMM42A6GN_cjs.__require("stream").Stream;
360
359
  module.exports = legacy;
361
- function legacy(fs3) {
360
+ function legacy(fs2) {
362
361
  return {
363
362
  ReadStream,
364
363
  WriteStream
@@ -403,7 +402,7 @@ var require_legacy_streams = __commonJS({
403
402
  });
404
403
  return;
405
404
  }
406
- fs3.open(this.path, this.flags, this.mode, function(err, fd) {
405
+ fs2.open(this.path, this.flags, this.mode, function(err, fd) {
407
406
  if (err) {
408
407
  self.emit("error", err);
409
408
  self.readable = false;
@@ -443,7 +442,7 @@ var require_legacy_streams = __commonJS({
443
442
  this.busy = false;
444
443
  this._queue = [];
445
444
  if (this.fd === null) {
446
- this._open = fs3.open;
445
+ this._open = fs2.open;
447
446
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
448
447
  this.flush();
449
448
  }
@@ -453,9 +452,9 @@ var require_legacy_streams = __commonJS({
453
452
  });
454
453
 
455
454
  // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
456
- var require_clone = __commonJS({
455
+ var require_clone = chunkMM42A6GN_cjs.__commonJS({
457
456
  "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module) {
458
- init_esm_shims();
457
+ chunkMM42A6GN_cjs.init_cjs_shims();
459
458
  module.exports = clone;
460
459
  var getPrototypeOf = Object.getPrototypeOf || function(obj) {
461
460
  return obj.__proto__;
@@ -476,14 +475,14 @@ var require_clone = __commonJS({
476
475
  });
477
476
 
478
477
  // ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
479
- var require_graceful_fs = __commonJS({
478
+ var require_graceful_fs = chunkMM42A6GN_cjs.__commonJS({
480
479
  "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module) {
481
- init_esm_shims();
482
- var fs3 = __require("fs");
480
+ chunkMM42A6GN_cjs.init_cjs_shims();
481
+ var fs2 = chunkMM42A6GN_cjs.__require("fs");
483
482
  var polyfills = require_polyfills();
484
483
  var legacy = require_legacy_streams();
485
484
  var clone = require_clone();
486
- var util = __require("util");
485
+ var util = chunkMM42A6GN_cjs.__require("util");
487
486
  var gracefulQueue;
488
487
  var previousSymbol;
489
488
  if (typeof Symbol === "function" && typeof Symbol.for === "function") {
@@ -511,12 +510,12 @@ var require_graceful_fs = __commonJS({
511
510
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
512
511
  console.error(m);
513
512
  };
514
- if (!fs3[gracefulQueue]) {
513
+ if (!fs2[gracefulQueue]) {
515
514
  queue = global[gracefulQueue] || [];
516
- publishQueue(fs3, queue);
517
- fs3.close = function(fs$close) {
515
+ publishQueue(fs2, queue);
516
+ fs2.close = function(fs$close) {
518
517
  function close(fd, cb) {
519
- return fs$close.call(fs3, fd, function(err) {
518
+ return fs$close.call(fs2, fd, function(err) {
520
519
  if (!err) {
521
520
  resetQueue();
522
521
  }
@@ -528,40 +527,40 @@ var require_graceful_fs = __commonJS({
528
527
  value: fs$close
529
528
  });
530
529
  return close;
531
- }(fs3.close);
532
- fs3.closeSync = function(fs$closeSync) {
530
+ }(fs2.close);
531
+ fs2.closeSync = function(fs$closeSync) {
533
532
  function closeSync(fd) {
534
- fs$closeSync.apply(fs3, arguments);
533
+ fs$closeSync.apply(fs2, arguments);
535
534
  resetQueue();
536
535
  }
537
536
  Object.defineProperty(closeSync, previousSymbol, {
538
537
  value: fs$closeSync
539
538
  });
540
539
  return closeSync;
541
- }(fs3.closeSync);
540
+ }(fs2.closeSync);
542
541
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
543
542
  process.on("exit", function() {
544
- debug(fs3[gracefulQueue]);
545
- __require("assert").equal(fs3[gracefulQueue].length, 0);
543
+ debug(fs2[gracefulQueue]);
544
+ chunkMM42A6GN_cjs.__require("assert").equal(fs2[gracefulQueue].length, 0);
546
545
  });
547
546
  }
548
547
  }
549
548
  var queue;
550
549
  if (!global[gracefulQueue]) {
551
- publishQueue(global, fs3[gracefulQueue]);
552
- }
553
- module.exports = patch(clone(fs3));
554
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs3.__patched) {
555
- module.exports = patch(fs3);
556
- fs3.__patched = true;
557
- }
558
- function patch(fs4) {
559
- polyfills(fs4);
560
- fs4.gracefulify = patch;
561
- fs4.createReadStream = createReadStream;
562
- fs4.createWriteStream = createWriteStream;
563
- var fs$readFile = fs4.readFile;
564
- fs4.readFile = readFile;
550
+ publishQueue(global, fs2[gracefulQueue]);
551
+ }
552
+ module.exports = patch(clone(fs2));
553
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs2.__patched) {
554
+ module.exports = patch(fs2);
555
+ fs2.__patched = true;
556
+ }
557
+ function patch(fs3) {
558
+ polyfills(fs3);
559
+ fs3.gracefulify = patch;
560
+ fs3.createReadStream = createReadStream;
561
+ fs3.createWriteStream = createWriteStream;
562
+ var fs$readFile = fs3.readFile;
563
+ fs3.readFile = readFile;
565
564
  function readFile(path, options, cb) {
566
565
  if (typeof options === "function")
567
566
  cb = options, options = null;
@@ -577,8 +576,8 @@ var require_graceful_fs = __commonJS({
577
576
  });
578
577
  }
579
578
  }
580
- var fs$writeFile = fs4.writeFile;
581
- fs4.writeFile = writeFile;
579
+ var fs$writeFile = fs3.writeFile;
580
+ fs3.writeFile = writeFile;
582
581
  function writeFile(path, data, options, cb) {
583
582
  if (typeof options === "function")
584
583
  cb = options, options = null;
@@ -594,9 +593,9 @@ var require_graceful_fs = __commonJS({
594
593
  });
595
594
  }
596
595
  }
597
- var fs$appendFile = fs4.appendFile;
596
+ var fs$appendFile = fs3.appendFile;
598
597
  if (fs$appendFile)
599
- fs4.appendFile = appendFile;
598
+ fs3.appendFile = appendFile;
600
599
  function appendFile(path, data, options, cb) {
601
600
  if (typeof options === "function")
602
601
  cb = options, options = null;
@@ -612,9 +611,9 @@ var require_graceful_fs = __commonJS({
612
611
  });
613
612
  }
614
613
  }
615
- var fs$copyFile = fs4.copyFile;
614
+ var fs$copyFile = fs3.copyFile;
616
615
  if (fs$copyFile)
617
- fs4.copyFile = copyFile;
616
+ fs3.copyFile = copyFile;
618
617
  function copyFile(src, dest, flags, cb) {
619
618
  if (typeof flags === "function") {
620
619
  cb = flags;
@@ -632,8 +631,8 @@ var require_graceful_fs = __commonJS({
632
631
  });
633
632
  }
634
633
  }
635
- var fs$readdir = fs4.readdir;
636
- fs4.readdir = readdir;
634
+ var fs$readdir = fs3.readdir;
635
+ fs3.readdir = readdir;
637
636
  var noReaddirOptionVersions = /^v[0-5]\./;
638
637
  function readdir(path, options, cb) {
639
638
  if (typeof options === "function")
@@ -674,21 +673,21 @@ var require_graceful_fs = __commonJS({
674
673
  }
675
674
  }
676
675
  if (process.version.substr(0, 4) === "v0.8") {
677
- var legStreams = legacy(fs4);
676
+ var legStreams = legacy(fs3);
678
677
  ReadStream = legStreams.ReadStream;
679
678
  WriteStream = legStreams.WriteStream;
680
679
  }
681
- var fs$ReadStream = fs4.ReadStream;
680
+ var fs$ReadStream = fs3.ReadStream;
682
681
  if (fs$ReadStream) {
683
682
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
684
683
  ReadStream.prototype.open = ReadStream$open;
685
684
  }
686
- var fs$WriteStream = fs4.WriteStream;
685
+ var fs$WriteStream = fs3.WriteStream;
687
686
  if (fs$WriteStream) {
688
687
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
689
688
  WriteStream.prototype.open = WriteStream$open;
690
689
  }
691
- Object.defineProperty(fs4, "ReadStream", {
690
+ Object.defineProperty(fs3, "ReadStream", {
692
691
  get: function() {
693
692
  return ReadStream;
694
693
  },
@@ -698,7 +697,7 @@ var require_graceful_fs = __commonJS({
698
697
  enumerable: true,
699
698
  configurable: true
700
699
  });
701
- Object.defineProperty(fs4, "WriteStream", {
700
+ Object.defineProperty(fs3, "WriteStream", {
702
701
  get: function() {
703
702
  return WriteStream;
704
703
  },
@@ -709,7 +708,7 @@ var require_graceful_fs = __commonJS({
709
708
  configurable: true
710
709
  });
711
710
  var FileReadStream = ReadStream;
712
- Object.defineProperty(fs4, "FileReadStream", {
711
+ Object.defineProperty(fs3, "FileReadStream", {
713
712
  get: function() {
714
713
  return FileReadStream;
715
714
  },
@@ -720,7 +719,7 @@ var require_graceful_fs = __commonJS({
720
719
  configurable: true
721
720
  });
722
721
  var FileWriteStream = WriteStream;
723
- Object.defineProperty(fs4, "FileWriteStream", {
722
+ Object.defineProperty(fs3, "FileWriteStream", {
724
723
  get: function() {
725
724
  return FileWriteStream;
726
725
  },
@@ -769,13 +768,13 @@ var require_graceful_fs = __commonJS({
769
768
  });
770
769
  }
771
770
  function createReadStream(path, options) {
772
- return new fs4.ReadStream(path, options);
771
+ return new fs3.ReadStream(path, options);
773
772
  }
774
773
  function createWriteStream(path, options) {
775
- return new fs4.WriteStream(path, options);
774
+ return new fs3.WriteStream(path, options);
776
775
  }
777
- var fs$open = fs4.open;
778
- fs4.open = open;
776
+ var fs$open = fs3.open;
777
+ fs3.open = open;
779
778
  function open(path, flags, mode, cb) {
780
779
  if (typeof mode === "function")
781
780
  cb = mode, mode = null;
@@ -791,20 +790,20 @@ var require_graceful_fs = __commonJS({
791
790
  });
792
791
  }
793
792
  }
794
- return fs4;
793
+ return fs3;
795
794
  }
796
795
  function enqueue(elem) {
797
796
  debug("ENQUEUE", elem[0].name, elem[1]);
798
- fs3[gracefulQueue].push(elem);
797
+ fs2[gracefulQueue].push(elem);
799
798
  retry();
800
799
  }
801
800
  var retryTimer;
802
801
  function resetQueue() {
803
802
  var now = Date.now();
804
- for (var i = 0; i < fs3[gracefulQueue].length; ++i) {
805
- if (fs3[gracefulQueue][i].length > 2) {
806
- fs3[gracefulQueue][i][3] = now;
807
- fs3[gracefulQueue][i][4] = now;
803
+ for (var i = 0; i < fs2[gracefulQueue].length; ++i) {
804
+ if (fs2[gracefulQueue][i].length > 2) {
805
+ fs2[gracefulQueue][i][3] = now;
806
+ fs2[gracefulQueue][i][4] = now;
808
807
  }
809
808
  }
810
809
  retry();
@@ -812,9 +811,9 @@ var require_graceful_fs = __commonJS({
812
811
  function retry() {
813
812
  clearTimeout(retryTimer);
814
813
  retryTimer = void 0;
815
- if (fs3[gracefulQueue].length === 0)
814
+ if (fs2[gracefulQueue].length === 0)
816
815
  return;
817
- var elem = fs3[gracefulQueue].shift();
816
+ var elem = fs2[gracefulQueue].shift();
818
817
  var fn = elem[0];
819
818
  var args = elem[1];
820
819
  var err = elem[2];
@@ -836,7 +835,7 @@ var require_graceful_fs = __commonJS({
836
835
  debug("RETRY", fn.name, args);
837
836
  fn.apply(null, args.concat([startTime]));
838
837
  } else {
839
- fs3[gracefulQueue].push(elem);
838
+ fs2[gracefulQueue].push(elem);
840
839
  }
841
840
  }
842
841
  if (retryTimer === void 0) {
@@ -847,11 +846,11 @@ var require_graceful_fs = __commonJS({
847
846
  });
848
847
 
849
848
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js
850
- var require_fs = __commonJS({
849
+ var require_fs = chunkMM42A6GN_cjs.__commonJS({
851
850
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/fs/index.js"(exports) {
852
- init_esm_shims();
851
+ chunkMM42A6GN_cjs.init_cjs_shims();
853
852
  var u = require_universalify().fromCallback;
854
- var fs3 = require_graceful_fs();
853
+ var fs2 = require_graceful_fs();
855
854
  var api = [
856
855
  "access",
857
856
  "appendFile",
@@ -888,26 +887,26 @@ var require_fs = __commonJS({
888
887
  "utimes",
889
888
  "writeFile"
890
889
  ].filter((key) => {
891
- return typeof fs3[key] === "function";
890
+ return typeof fs2[key] === "function";
892
891
  });
893
- Object.assign(exports, fs3);
892
+ Object.assign(exports, fs2);
894
893
  api.forEach((method) => {
895
- exports[method] = u(fs3[method]);
894
+ exports[method] = u(fs2[method]);
896
895
  });
897
896
  exports.exists = function(filename, callback) {
898
897
  if (typeof callback === "function") {
899
- return fs3.exists(filename, callback);
898
+ return fs2.exists(filename, callback);
900
899
  }
901
900
  return new Promise((resolve2) => {
902
- return fs3.exists(filename, resolve2);
901
+ return fs2.exists(filename, resolve2);
903
902
  });
904
903
  };
905
904
  exports.read = function(fd, buffer, offset, length, position, callback) {
906
905
  if (typeof callback === "function") {
907
- return fs3.read(fd, buffer, offset, length, position, callback);
906
+ return fs2.read(fd, buffer, offset, length, position, callback);
908
907
  }
909
908
  return new Promise((resolve2, reject) => {
910
- fs3.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
909
+ fs2.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
911
910
  if (err)
912
911
  return reject(err);
913
912
  resolve2({ bytesRead, buffer: buffer2 });
@@ -916,10 +915,10 @@ var require_fs = __commonJS({
916
915
  };
917
916
  exports.write = function(fd, buffer, ...args) {
918
917
  if (typeof args[args.length - 1] === "function") {
919
- return fs3.write(fd, buffer, ...args);
918
+ return fs2.write(fd, buffer, ...args);
920
919
  }
921
920
  return new Promise((resolve2, reject) => {
922
- fs3.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
921
+ fs2.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
923
922
  if (err)
924
923
  return reject(err);
925
924
  resolve2({ bytesWritten, buffer: buffer2 });
@@ -928,10 +927,10 @@ var require_fs = __commonJS({
928
927
  };
929
928
  exports.readv = function(fd, buffers, ...args) {
930
929
  if (typeof args[args.length - 1] === "function") {
931
- return fs3.readv(fd, buffers, ...args);
930
+ return fs2.readv(fd, buffers, ...args);
932
931
  }
933
932
  return new Promise((resolve2, reject) => {
934
- fs3.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
933
+ fs2.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
935
934
  if (err)
936
935
  return reject(err);
937
936
  resolve2({ bytesRead, buffers: buffers2 });
@@ -940,18 +939,18 @@ var require_fs = __commonJS({
940
939
  };
941
940
  exports.writev = function(fd, buffers, ...args) {
942
941
  if (typeof args[args.length - 1] === "function") {
943
- return fs3.writev(fd, buffers, ...args);
942
+ return fs2.writev(fd, buffers, ...args);
944
943
  }
945
944
  return new Promise((resolve2, reject) => {
946
- fs3.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
945
+ fs2.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
947
946
  if (err)
948
947
  return reject(err);
949
948
  resolve2({ bytesWritten, buffers: buffers2 });
950
949
  });
951
950
  });
952
951
  };
953
- if (typeof fs3.realpath.native === "function") {
954
- exports.realpath.native = u(fs3.realpath.native);
952
+ if (typeof fs2.realpath.native === "function") {
953
+ exports.realpath.native = u(fs2.realpath.native);
955
954
  } else {
956
955
  process.emitWarning(
957
956
  "fs.realpath.native is not a function. Is fs being monkey-patched?",
@@ -963,10 +962,10 @@ var require_fs = __commonJS({
963
962
  });
964
963
 
965
964
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js
966
- var require_utils = __commonJS({
965
+ var require_utils = chunkMM42A6GN_cjs.__commonJS({
967
966
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/utils.js"(exports, module) {
968
- init_esm_shims();
969
- var path = __require("path");
967
+ chunkMM42A6GN_cjs.init_cjs_shims();
968
+ var path = chunkMM42A6GN_cjs.__require("path");
970
969
  module.exports.checkPath = function checkPath(pth) {
971
970
  if (process.platform === "win32") {
972
971
  const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ""));
@@ -981,10 +980,10 @@ var require_utils = __commonJS({
981
980
  });
982
981
 
983
982
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js
984
- var require_make_dir = __commonJS({
983
+ var require_make_dir = chunkMM42A6GN_cjs.__commonJS({
985
984
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports, module) {
986
- init_esm_shims();
987
- var fs3 = require_fs();
985
+ chunkMM42A6GN_cjs.init_cjs_shims();
986
+ var fs2 = require_fs();
988
987
  var { checkPath } = require_utils();
989
988
  var getMode = (options) => {
990
989
  const defaults = { mode: 511 };
@@ -994,14 +993,14 @@ var require_make_dir = __commonJS({
994
993
  };
995
994
  module.exports.makeDir = async (dir, options) => {
996
995
  checkPath(dir);
997
- return fs3.mkdir(dir, {
996
+ return fs2.mkdir(dir, {
998
997
  mode: getMode(options),
999
998
  recursive: true
1000
999
  });
1001
1000
  };
1002
1001
  module.exports.makeDirSync = (dir, options) => {
1003
1002
  checkPath(dir);
1004
- return fs3.mkdirSync(dir, {
1003
+ return fs2.mkdirSync(dir, {
1005
1004
  mode: getMode(options),
1006
1005
  recursive: true
1007
1006
  });
@@ -1010,9 +1009,9 @@ var require_make_dir = __commonJS({
1010
1009
  });
1011
1010
 
1012
1011
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js
1013
- var require_mkdirs = __commonJS({
1012
+ var require_mkdirs = chunkMM42A6GN_cjs.__commonJS({
1014
1013
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/mkdirs/index.js"(exports, module) {
1015
- init_esm_shims();
1014
+ chunkMM42A6GN_cjs.init_cjs_shims();
1016
1015
  var u = require_universalify().fromPromise;
1017
1016
  var { makeDir: _makeDir, makeDirSync } = require_make_dir();
1018
1017
  var makeDir = u(_makeDir);
@@ -1029,35 +1028,35 @@ var require_mkdirs = __commonJS({
1029
1028
  });
1030
1029
 
1031
1030
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js
1032
- var require_path_exists = __commonJS({
1031
+ var require_path_exists = chunkMM42A6GN_cjs.__commonJS({
1033
1032
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/path-exists/index.js"(exports, module) {
1034
- init_esm_shims();
1033
+ chunkMM42A6GN_cjs.init_cjs_shims();
1035
1034
  var u = require_universalify().fromPromise;
1036
- var fs3 = require_fs();
1035
+ var fs2 = require_fs();
1037
1036
  function pathExists(path) {
1038
- return fs3.access(path).then(() => true).catch(() => false);
1037
+ return fs2.access(path).then(() => true).catch(() => false);
1039
1038
  }
1040
1039
  module.exports = {
1041
1040
  pathExists: u(pathExists),
1042
- pathExistsSync: fs3.existsSync
1041
+ pathExistsSync: fs2.existsSync
1043
1042
  };
1044
1043
  }
1045
1044
  });
1046
1045
 
1047
1046
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js
1048
- var require_utimes = __commonJS({
1047
+ var require_utimes = chunkMM42A6GN_cjs.__commonJS({
1049
1048
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/utimes.js"(exports, module) {
1050
- init_esm_shims();
1051
- var fs3 = require_fs();
1049
+ chunkMM42A6GN_cjs.init_cjs_shims();
1050
+ var fs2 = require_fs();
1052
1051
  var u = require_universalify().fromPromise;
1053
1052
  async function utimesMillis(path, atime, mtime) {
1054
- const fd = await fs3.open(path, "r+");
1053
+ const fd = await fs2.open(path, "r+");
1055
1054
  let closeErr = null;
1056
1055
  try {
1057
- await fs3.futimes(fd, atime, mtime);
1056
+ await fs2.futimes(fd, atime, mtime);
1058
1057
  } finally {
1059
1058
  try {
1060
- await fs3.close(fd);
1059
+ await fs2.close(fd);
1061
1060
  } catch (e) {
1062
1061
  closeErr = e;
1063
1062
  }
@@ -1067,9 +1066,9 @@ var require_utimes = __commonJS({
1067
1066
  }
1068
1067
  }
1069
1068
  function utimesMillisSync(path, atime, mtime) {
1070
- const fd = fs3.openSync(path, "r+");
1071
- fs3.futimesSync(fd, atime, mtime);
1072
- return fs3.closeSync(fd);
1069
+ const fd = fs2.openSync(path, "r+");
1070
+ fs2.futimesSync(fd, atime, mtime);
1071
+ return fs2.closeSync(fd);
1073
1072
  }
1074
1073
  module.exports = {
1075
1074
  utimesMillis: u(utimesMillis),
@@ -1079,14 +1078,14 @@ var require_utimes = __commonJS({
1079
1078
  });
1080
1079
 
1081
1080
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js
1082
- var require_stat = __commonJS({
1081
+ var require_stat = chunkMM42A6GN_cjs.__commonJS({
1083
1082
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/util/stat.js"(exports, module) {
1084
- init_esm_shims();
1085
- var fs3 = require_fs();
1086
- var path = __require("path");
1083
+ chunkMM42A6GN_cjs.init_cjs_shims();
1084
+ var fs2 = require_fs();
1085
+ var path = chunkMM42A6GN_cjs.__require("path");
1087
1086
  var u = require_universalify().fromPromise;
1088
1087
  function getStats(src, dest, opts) {
1089
- const statFunc = opts.dereference ? (file) => fs3.stat(file, { bigint: true }) : (file) => fs3.lstat(file, { bigint: true });
1088
+ const statFunc = opts.dereference ? (file) => fs2.stat(file, { bigint: true }) : (file) => fs2.lstat(file, { bigint: true });
1090
1089
  return Promise.all([
1091
1090
  statFunc(src),
1092
1091
  statFunc(dest).catch((err) => {
@@ -1098,7 +1097,7 @@ var require_stat = __commonJS({
1098
1097
  }
1099
1098
  function getStatsSync(src, dest, opts) {
1100
1099
  let destStat;
1101
- const statFunc = opts.dereference ? (file) => fs3.statSync(file, { bigint: true }) : (file) => fs3.lstatSync(file, { bigint: true });
1100
+ const statFunc = opts.dereference ? (file) => fs2.statSync(file, { bigint: true }) : (file) => fs2.lstatSync(file, { bigint: true });
1102
1101
  const srcStat = statFunc(src);
1103
1102
  try {
1104
1103
  destStat = statFunc(dest);
@@ -1162,7 +1161,7 @@ var require_stat = __commonJS({
1162
1161
  return;
1163
1162
  let destStat;
1164
1163
  try {
1165
- destStat = await fs3.stat(destParent, { bigint: true });
1164
+ destStat = await fs2.stat(destParent, { bigint: true });
1166
1165
  } catch (err) {
1167
1166
  if (err.code === "ENOENT")
1168
1167
  return;
@@ -1180,7 +1179,7 @@ var require_stat = __commonJS({
1180
1179
  return;
1181
1180
  let destStat;
1182
1181
  try {
1183
- destStat = fs3.statSync(destParent, { bigint: true });
1182
+ destStat = fs2.statSync(destParent, { bigint: true });
1184
1183
  } catch (err) {
1185
1184
  if (err.code === "ENOENT")
1186
1185
  return;
@@ -1217,11 +1216,11 @@ var require_stat = __commonJS({
1217
1216
  });
1218
1217
 
1219
1218
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js
1220
- var require_copy = __commonJS({
1219
+ var require_copy = chunkMM42A6GN_cjs.__commonJS({
1221
1220
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy.js"(exports, module) {
1222
- init_esm_shims();
1223
- var fs3 = require_fs();
1224
- var path = __require("path");
1221
+ chunkMM42A6GN_cjs.init_cjs_shims();
1222
+ var fs2 = require_fs();
1223
+ var path = chunkMM42A6GN_cjs.__require("path");
1225
1224
  var { mkdirs } = require_mkdirs();
1226
1225
  var { pathExists } = require_path_exists();
1227
1226
  var { utimesMillis } = require_utimes();
@@ -1257,7 +1256,7 @@ var require_copy = __commonJS({
1257
1256
  return opts.filter(src, dest);
1258
1257
  }
1259
1258
  async function getStatsAndPerformCopy(destStat, src, dest, opts) {
1260
- const statFn = opts.dereference ? fs3.stat : fs3.lstat;
1259
+ const statFn = opts.dereference ? fs2.stat : fs2.lstat;
1261
1260
  const srcStat = await statFn(src);
1262
1261
  if (srcStat.isDirectory())
1263
1262
  return onDir(srcStat, destStat, src, dest, opts);
@@ -1275,7 +1274,7 @@ var require_copy = __commonJS({
1275
1274
  if (!destStat)
1276
1275
  return copyFile(srcStat, src, dest, opts);
1277
1276
  if (opts.overwrite) {
1278
- await fs3.unlink(dest);
1277
+ await fs2.unlink(dest);
1279
1278
  return copyFile(srcStat, src, dest, opts);
1280
1279
  }
1281
1280
  if (opts.errorOnExist) {
@@ -1283,27 +1282,27 @@ var require_copy = __commonJS({
1283
1282
  }
1284
1283
  }
1285
1284
  async function copyFile(srcStat, src, dest, opts) {
1286
- await fs3.copyFile(src, dest);
1285
+ await fs2.copyFile(src, dest);
1287
1286
  if (opts.preserveTimestamps) {
1288
1287
  if (fileIsNotWritable(srcStat.mode)) {
1289
1288
  await makeFileWritable(dest, srcStat.mode);
1290
1289
  }
1291
- const updatedSrcStat = await fs3.stat(src);
1290
+ const updatedSrcStat = await fs2.stat(src);
1292
1291
  await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
1293
1292
  }
1294
- return fs3.chmod(dest, srcStat.mode);
1293
+ return fs2.chmod(dest, srcStat.mode);
1295
1294
  }
1296
1295
  function fileIsNotWritable(srcMode) {
1297
1296
  return (srcMode & 128) === 0;
1298
1297
  }
1299
1298
  function makeFileWritable(dest, srcMode) {
1300
- return fs3.chmod(dest, srcMode | 128);
1299
+ return fs2.chmod(dest, srcMode | 128);
1301
1300
  }
1302
1301
  async function onDir(srcStat, destStat, src, dest, opts) {
1303
1302
  if (!destStat) {
1304
- await fs3.mkdir(dest);
1303
+ await fs2.mkdir(dest);
1305
1304
  }
1306
- const items = await fs3.readdir(src);
1305
+ const items = await fs2.readdir(src);
1307
1306
  await Promise.all(items.map(async (item) => {
1308
1307
  const srcItem = path.join(src, item);
1309
1308
  const destItem = path.join(dest, item);
@@ -1314,23 +1313,23 @@ var require_copy = __commonJS({
1314
1313
  return getStatsAndPerformCopy(destStat2, srcItem, destItem, opts);
1315
1314
  }));
1316
1315
  if (!destStat) {
1317
- await fs3.chmod(dest, srcStat.mode);
1316
+ await fs2.chmod(dest, srcStat.mode);
1318
1317
  }
1319
1318
  }
1320
1319
  async function onLink(destStat, src, dest, opts) {
1321
- let resolvedSrc = await fs3.readlink(src);
1320
+ let resolvedSrc = await fs2.readlink(src);
1322
1321
  if (opts.dereference) {
1323
1322
  resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
1324
1323
  }
1325
1324
  if (!destStat) {
1326
- return fs3.symlink(resolvedSrc, dest);
1325
+ return fs2.symlink(resolvedSrc, dest);
1327
1326
  }
1328
1327
  let resolvedDest = null;
1329
1328
  try {
1330
- resolvedDest = await fs3.readlink(dest);
1329
+ resolvedDest = await fs2.readlink(dest);
1331
1330
  } catch (e) {
1332
1331
  if (e.code === "EINVAL" || e.code === "UNKNOWN")
1333
- return fs3.symlink(resolvedSrc, dest);
1332
+ return fs2.symlink(resolvedSrc, dest);
1334
1333
  throw e;
1335
1334
  }
1336
1335
  if (opts.dereference) {
@@ -1342,19 +1341,19 @@ var require_copy = __commonJS({
1342
1341
  if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
1343
1342
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
1344
1343
  }
1345
- await fs3.unlink(dest);
1346
- return fs3.symlink(resolvedSrc, dest);
1344
+ await fs2.unlink(dest);
1345
+ return fs2.symlink(resolvedSrc, dest);
1347
1346
  }
1348
1347
  module.exports = copy;
1349
1348
  }
1350
1349
  });
1351
1350
 
1352
1351
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js
1353
- var require_copy_sync = __commonJS({
1352
+ var require_copy_sync = chunkMM42A6GN_cjs.__commonJS({
1354
1353
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/copy-sync.js"(exports, module) {
1355
- init_esm_shims();
1356
- var fs3 = require_graceful_fs();
1357
- var path = __require("path");
1354
+ chunkMM42A6GN_cjs.init_cjs_shims();
1355
+ var fs2 = require_graceful_fs();
1356
+ var path = chunkMM42A6GN_cjs.__require("path");
1358
1357
  var mkdirsSync = require_mkdirs().mkdirsSync;
1359
1358
  var utimesMillisSync = require_utimes().utimesMillisSync;
1360
1359
  var stat = require_stat();
@@ -1377,12 +1376,12 @@ var require_copy_sync = __commonJS({
1377
1376
  if (opts.filter && !opts.filter(src, dest))
1378
1377
  return;
1379
1378
  const destParent = path.dirname(dest);
1380
- if (!fs3.existsSync(destParent))
1379
+ if (!fs2.existsSync(destParent))
1381
1380
  mkdirsSync(destParent);
1382
1381
  return getStats(destStat, src, dest, opts);
1383
1382
  }
1384
1383
  function getStats(destStat, src, dest, opts) {
1385
- const statSync = opts.dereference ? fs3.statSync : fs3.lstatSync;
1384
+ const statSync = opts.dereference ? fs2.statSync : fs2.lstatSync;
1386
1385
  const srcStat = statSync(src);
1387
1386
  if (srcStat.isDirectory())
1388
1387
  return onDir(srcStat, destStat, src, dest, opts);
@@ -1403,14 +1402,14 @@ var require_copy_sync = __commonJS({
1403
1402
  }
1404
1403
  function mayCopyFile(srcStat, src, dest, opts) {
1405
1404
  if (opts.overwrite) {
1406
- fs3.unlinkSync(dest);
1405
+ fs2.unlinkSync(dest);
1407
1406
  return copyFile(srcStat, src, dest, opts);
1408
1407
  } else if (opts.errorOnExist) {
1409
1408
  throw new Error(`'${dest}' already exists`);
1410
1409
  }
1411
1410
  }
1412
1411
  function copyFile(srcStat, src, dest, opts) {
1413
- fs3.copyFileSync(src, dest);
1412
+ fs2.copyFileSync(src, dest);
1414
1413
  if (opts.preserveTimestamps)
1415
1414
  handleTimestamps(srcStat.mode, src, dest);
1416
1415
  return setDestMode(dest, srcStat.mode);
@@ -1427,10 +1426,10 @@ var require_copy_sync = __commonJS({
1427
1426
  return setDestMode(dest, srcMode | 128);
1428
1427
  }
1429
1428
  function setDestMode(dest, srcMode) {
1430
- return fs3.chmodSync(dest, srcMode);
1429
+ return fs2.chmodSync(dest, srcMode);
1431
1430
  }
1432
1431
  function setDestTimestamps(src, dest) {
1433
- const updatedSrcStat = fs3.statSync(src);
1432
+ const updatedSrcStat = fs2.statSync(src);
1434
1433
  return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
1435
1434
  }
1436
1435
  function onDir(srcStat, destStat, src, dest, opts) {
@@ -1439,12 +1438,12 @@ var require_copy_sync = __commonJS({
1439
1438
  return copyDir(src, dest, opts);
1440
1439
  }
1441
1440
  function mkDirAndCopy(srcMode, src, dest, opts) {
1442
- fs3.mkdirSync(dest);
1441
+ fs2.mkdirSync(dest);
1443
1442
  copyDir(src, dest, opts);
1444
1443
  return setDestMode(dest, srcMode);
1445
1444
  }
1446
1445
  function copyDir(src, dest, opts) {
1447
- fs3.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
1446
+ fs2.readdirSync(src).forEach((item) => copyDirItem(item, src, dest, opts));
1448
1447
  }
1449
1448
  function copyDirItem(item, src, dest, opts) {
1450
1449
  const srcItem = path.join(src, item);
@@ -1455,19 +1454,19 @@ var require_copy_sync = __commonJS({
1455
1454
  return getStats(destStat, srcItem, destItem, opts);
1456
1455
  }
1457
1456
  function onLink(destStat, src, dest, opts) {
1458
- let resolvedSrc = fs3.readlinkSync(src);
1457
+ let resolvedSrc = fs2.readlinkSync(src);
1459
1458
  if (opts.dereference) {
1460
1459
  resolvedSrc = path.resolve(process.cwd(), resolvedSrc);
1461
1460
  }
1462
1461
  if (!destStat) {
1463
- return fs3.symlinkSync(resolvedSrc, dest);
1462
+ return fs2.symlinkSync(resolvedSrc, dest);
1464
1463
  } else {
1465
1464
  let resolvedDest;
1466
1465
  try {
1467
- resolvedDest = fs3.readlinkSync(dest);
1466
+ resolvedDest = fs2.readlinkSync(dest);
1468
1467
  } catch (err) {
1469
1468
  if (err.code === "EINVAL" || err.code === "UNKNOWN")
1470
- return fs3.symlinkSync(resolvedSrc, dest);
1469
+ return fs2.symlinkSync(resolvedSrc, dest);
1471
1470
  throw err;
1472
1471
  }
1473
1472
  if (opts.dereference) {
@@ -1483,17 +1482,17 @@ var require_copy_sync = __commonJS({
1483
1482
  }
1484
1483
  }
1485
1484
  function copyLink(resolvedSrc, dest) {
1486
- fs3.unlinkSync(dest);
1487
- return fs3.symlinkSync(resolvedSrc, dest);
1485
+ fs2.unlinkSync(dest);
1486
+ return fs2.symlinkSync(resolvedSrc, dest);
1488
1487
  }
1489
1488
  module.exports = copySync;
1490
1489
  }
1491
1490
  });
1492
1491
 
1493
1492
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js
1494
- var require_copy2 = __commonJS({
1493
+ var require_copy2 = chunkMM42A6GN_cjs.__commonJS({
1495
1494
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/copy/index.js"(exports, module) {
1496
- init_esm_shims();
1495
+ chunkMM42A6GN_cjs.init_cjs_shims();
1497
1496
  var u = require_universalify().fromPromise;
1498
1497
  module.exports = {
1499
1498
  copy: u(require_copy()),
@@ -1503,52 +1502,52 @@ var require_copy2 = __commonJS({
1503
1502
  });
1504
1503
 
1505
1504
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js
1506
- var require_remove = __commonJS({
1505
+ var require_remove = chunkMM42A6GN_cjs.__commonJS({
1507
1506
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/remove/index.js"(exports, module) {
1508
- init_esm_shims();
1509
- var fs3 = require_graceful_fs();
1507
+ chunkMM42A6GN_cjs.init_cjs_shims();
1508
+ var fs2 = require_graceful_fs();
1510
1509
  var u = require_universalify().fromCallback;
1511
- function remove2(path, callback) {
1512
- fs3.rm(path, { recursive: true, force: true }, callback);
1510
+ function remove(path, callback) {
1511
+ fs2.rm(path, { recursive: true, force: true }, callback);
1513
1512
  }
1514
1513
  function removeSync(path) {
1515
- fs3.rmSync(path, { recursive: true, force: true });
1514
+ fs2.rmSync(path, { recursive: true, force: true });
1516
1515
  }
1517
1516
  module.exports = {
1518
- remove: u(remove2),
1517
+ remove: u(remove),
1519
1518
  removeSync
1520
1519
  };
1521
1520
  }
1522
1521
  });
1523
1522
 
1524
1523
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js
1525
- var require_empty = __commonJS({
1524
+ var require_empty = chunkMM42A6GN_cjs.__commonJS({
1526
1525
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/empty/index.js"(exports, module) {
1527
- init_esm_shims();
1526
+ chunkMM42A6GN_cjs.init_cjs_shims();
1528
1527
  var u = require_universalify().fromPromise;
1529
- var fs3 = require_fs();
1530
- var path = __require("path");
1528
+ var fs2 = require_fs();
1529
+ var path = chunkMM42A6GN_cjs.__require("path");
1531
1530
  var mkdir = require_mkdirs();
1532
- var remove2 = require_remove();
1531
+ var remove = require_remove();
1533
1532
  var emptyDir = u(async function emptyDir2(dir) {
1534
1533
  let items;
1535
1534
  try {
1536
- items = await fs3.readdir(dir);
1535
+ items = await fs2.readdir(dir);
1537
1536
  } catch {
1538
1537
  return mkdir.mkdirs(dir);
1539
1538
  }
1540
- return Promise.all(items.map((item) => remove2.remove(path.join(dir, item))));
1539
+ return Promise.all(items.map((item) => remove.remove(path.join(dir, item))));
1541
1540
  });
1542
1541
  function emptyDirSync(dir) {
1543
1542
  let items;
1544
1543
  try {
1545
- items = fs3.readdirSync(dir);
1544
+ items = fs2.readdirSync(dir);
1546
1545
  } catch {
1547
1546
  return mkdir.mkdirsSync(dir);
1548
1547
  }
1549
1548
  items.forEach((item) => {
1550
1549
  item = path.join(dir, item);
1551
- remove2.removeSync(item);
1550
+ remove.removeSync(item);
1552
1551
  });
1553
1552
  }
1554
1553
  module.exports = {
@@ -1561,17 +1560,17 @@ var require_empty = __commonJS({
1561
1560
  });
1562
1561
 
1563
1562
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js
1564
- var require_file = __commonJS({
1563
+ var require_file = chunkMM42A6GN_cjs.__commonJS({
1565
1564
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/file.js"(exports, module) {
1566
- init_esm_shims();
1565
+ chunkMM42A6GN_cjs.init_cjs_shims();
1567
1566
  var u = require_universalify().fromPromise;
1568
- var path = __require("path");
1569
- var fs3 = require_fs();
1567
+ var path = chunkMM42A6GN_cjs.__require("path");
1568
+ var fs2 = require_fs();
1570
1569
  var mkdir = require_mkdirs();
1571
1570
  async function createFile(file) {
1572
1571
  let stats;
1573
1572
  try {
1574
- stats = await fs3.stat(file);
1573
+ stats = await fs2.stat(file);
1575
1574
  } catch {
1576
1575
  }
1577
1576
  if (stats && stats.isFile())
@@ -1579,34 +1578,34 @@ var require_file = __commonJS({
1579
1578
  const dir = path.dirname(file);
1580
1579
  let dirStats = null;
1581
1580
  try {
1582
- dirStats = await fs3.stat(dir);
1581
+ dirStats = await fs2.stat(dir);
1583
1582
  } catch (err) {
1584
1583
  if (err.code === "ENOENT") {
1585
1584
  await mkdir.mkdirs(dir);
1586
- await fs3.writeFile(file, "");
1585
+ await fs2.writeFile(file, "");
1587
1586
  return;
1588
1587
  } else {
1589
1588
  throw err;
1590
1589
  }
1591
1590
  }
1592
1591
  if (dirStats.isDirectory()) {
1593
- await fs3.writeFile(file, "");
1592
+ await fs2.writeFile(file, "");
1594
1593
  } else {
1595
- await fs3.readdir(dir);
1594
+ await fs2.readdir(dir);
1596
1595
  }
1597
1596
  }
1598
1597
  function createFileSync(file) {
1599
1598
  let stats;
1600
1599
  try {
1601
- stats = fs3.statSync(file);
1600
+ stats = fs2.statSync(file);
1602
1601
  } catch {
1603
1602
  }
1604
1603
  if (stats && stats.isFile())
1605
1604
  return;
1606
1605
  const dir = path.dirname(file);
1607
1606
  try {
1608
- if (!fs3.statSync(dir).isDirectory()) {
1609
- fs3.readdirSync(dir);
1607
+ if (!fs2.statSync(dir).isDirectory()) {
1608
+ fs2.readdirSync(dir);
1610
1609
  }
1611
1610
  } catch (err) {
1612
1611
  if (err && err.code === "ENOENT")
@@ -1614,7 +1613,7 @@ var require_file = __commonJS({
1614
1613
  else
1615
1614
  throw err;
1616
1615
  }
1617
- fs3.writeFileSync(file, "");
1616
+ fs2.writeFileSync(file, "");
1618
1617
  }
1619
1618
  module.exports = {
1620
1619
  createFile: u(createFile),
@@ -1624,24 +1623,24 @@ var require_file = __commonJS({
1624
1623
  });
1625
1624
 
1626
1625
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js
1627
- var require_link = __commonJS({
1626
+ var require_link = chunkMM42A6GN_cjs.__commonJS({
1628
1627
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/link.js"(exports, module) {
1629
- init_esm_shims();
1628
+ chunkMM42A6GN_cjs.init_cjs_shims();
1630
1629
  var u = require_universalify().fromPromise;
1631
- var path = __require("path");
1632
- var fs3 = require_fs();
1630
+ var path = chunkMM42A6GN_cjs.__require("path");
1631
+ var fs2 = require_fs();
1633
1632
  var mkdir = require_mkdirs();
1634
1633
  var { pathExists } = require_path_exists();
1635
1634
  var { areIdentical } = require_stat();
1636
1635
  async function createLink(srcpath, dstpath) {
1637
1636
  let dstStat;
1638
1637
  try {
1639
- dstStat = await fs3.lstat(dstpath);
1638
+ dstStat = await fs2.lstat(dstpath);
1640
1639
  } catch {
1641
1640
  }
1642
1641
  let srcStat;
1643
1642
  try {
1644
- srcStat = await fs3.lstat(srcpath);
1643
+ srcStat = await fs2.lstat(srcpath);
1645
1644
  } catch (err) {
1646
1645
  err.message = err.message.replace("lstat", "ensureLink");
1647
1646
  throw err;
@@ -1653,16 +1652,16 @@ var require_link = __commonJS({
1653
1652
  if (!dirExists) {
1654
1653
  await mkdir.mkdirs(dir);
1655
1654
  }
1656
- await fs3.link(srcpath, dstpath);
1655
+ await fs2.link(srcpath, dstpath);
1657
1656
  }
1658
1657
  function createLinkSync(srcpath, dstpath) {
1659
1658
  let dstStat;
1660
1659
  try {
1661
- dstStat = fs3.lstatSync(dstpath);
1660
+ dstStat = fs2.lstatSync(dstpath);
1662
1661
  } catch {
1663
1662
  }
1664
1663
  try {
1665
- const srcStat = fs3.lstatSync(srcpath);
1664
+ const srcStat = fs2.lstatSync(srcpath);
1666
1665
  if (dstStat && areIdentical(srcStat, dstStat))
1667
1666
  return;
1668
1667
  } catch (err) {
@@ -1670,11 +1669,11 @@ var require_link = __commonJS({
1670
1669
  throw err;
1671
1670
  }
1672
1671
  const dir = path.dirname(dstpath);
1673
- const dirExists = fs3.existsSync(dir);
1672
+ const dirExists = fs2.existsSync(dir);
1674
1673
  if (dirExists)
1675
- return fs3.linkSync(srcpath, dstpath);
1674
+ return fs2.linkSync(srcpath, dstpath);
1676
1675
  mkdir.mkdirsSync(dir);
1677
- return fs3.linkSync(srcpath, dstpath);
1676
+ return fs2.linkSync(srcpath, dstpath);
1678
1677
  }
1679
1678
  module.exports = {
1680
1679
  createLink: u(createLink),
@@ -1684,17 +1683,17 @@ var require_link = __commonJS({
1684
1683
  });
1685
1684
 
1686
1685
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js
1687
- var require_symlink_paths = __commonJS({
1686
+ var require_symlink_paths = chunkMM42A6GN_cjs.__commonJS({
1688
1687
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports, module) {
1689
- init_esm_shims();
1690
- var path = __require("path");
1691
- var fs3 = require_fs();
1688
+ chunkMM42A6GN_cjs.init_cjs_shims();
1689
+ var path = chunkMM42A6GN_cjs.__require("path");
1690
+ var fs2 = require_fs();
1692
1691
  var { pathExists } = require_path_exists();
1693
1692
  var u = require_universalify().fromPromise;
1694
1693
  async function symlinkPaths(srcpath, dstpath) {
1695
1694
  if (path.isAbsolute(srcpath)) {
1696
1695
  try {
1697
- await fs3.lstat(srcpath);
1696
+ await fs2.lstat(srcpath);
1698
1697
  } catch (err) {
1699
1698
  err.message = err.message.replace("lstat", "ensureSymlink");
1700
1699
  throw err;
@@ -1714,7 +1713,7 @@ var require_symlink_paths = __commonJS({
1714
1713
  };
1715
1714
  }
1716
1715
  try {
1717
- await fs3.lstat(srcpath);
1716
+ await fs2.lstat(srcpath);
1718
1717
  } catch (err) {
1719
1718
  err.message = err.message.replace("lstat", "ensureSymlink");
1720
1719
  throw err;
@@ -1726,7 +1725,7 @@ var require_symlink_paths = __commonJS({
1726
1725
  }
1727
1726
  function symlinkPathsSync(srcpath, dstpath) {
1728
1727
  if (path.isAbsolute(srcpath)) {
1729
- const exists2 = fs3.existsSync(srcpath);
1728
+ const exists2 = fs2.existsSync(srcpath);
1730
1729
  if (!exists2)
1731
1730
  throw new Error("absolute srcpath does not exist");
1732
1731
  return {
@@ -1736,14 +1735,14 @@ var require_symlink_paths = __commonJS({
1736
1735
  }
1737
1736
  const dstdir = path.dirname(dstpath);
1738
1737
  const relativeToDst = path.join(dstdir, srcpath);
1739
- const exists = fs3.existsSync(relativeToDst);
1738
+ const exists = fs2.existsSync(relativeToDst);
1740
1739
  if (exists) {
1741
1740
  return {
1742
1741
  toCwd: relativeToDst,
1743
1742
  toDst: srcpath
1744
1743
  };
1745
1744
  }
1746
- const srcExists = fs3.existsSync(srcpath);
1745
+ const srcExists = fs2.existsSync(srcpath);
1747
1746
  if (!srcExists)
1748
1747
  throw new Error("relative srcpath does not exist");
1749
1748
  return {
@@ -1759,17 +1758,17 @@ var require_symlink_paths = __commonJS({
1759
1758
  });
1760
1759
 
1761
1760
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js
1762
- var require_symlink_type = __commonJS({
1761
+ var require_symlink_type = chunkMM42A6GN_cjs.__commonJS({
1763
1762
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink-type.js"(exports, module) {
1764
- init_esm_shims();
1765
- var fs3 = require_fs();
1763
+ chunkMM42A6GN_cjs.init_cjs_shims();
1764
+ var fs2 = require_fs();
1766
1765
  var u = require_universalify().fromPromise;
1767
1766
  async function symlinkType(srcpath, type) {
1768
1767
  if (type)
1769
1768
  return type;
1770
1769
  let stats;
1771
1770
  try {
1772
- stats = await fs3.lstat(srcpath);
1771
+ stats = await fs2.lstat(srcpath);
1773
1772
  } catch {
1774
1773
  return "file";
1775
1774
  }
@@ -1780,7 +1779,7 @@ var require_symlink_type = __commonJS({
1780
1779
  return type;
1781
1780
  let stats;
1782
1781
  try {
1783
- stats = fs3.lstatSync(srcpath);
1782
+ stats = fs2.lstatSync(srcpath);
1784
1783
  } catch {
1785
1784
  return "file";
1786
1785
  }
@@ -1794,12 +1793,12 @@ var require_symlink_type = __commonJS({
1794
1793
  });
1795
1794
 
1796
1795
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js
1797
- var require_symlink = __commonJS({
1796
+ var require_symlink = chunkMM42A6GN_cjs.__commonJS({
1798
1797
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/symlink.js"(exports, module) {
1799
- init_esm_shims();
1798
+ chunkMM42A6GN_cjs.init_cjs_shims();
1800
1799
  var u = require_universalify().fromPromise;
1801
- var path = __require("path");
1802
- var fs3 = require_fs();
1800
+ var path = chunkMM42A6GN_cjs.__require("path");
1801
+ var fs2 = require_fs();
1803
1802
  var { mkdirs, mkdirsSync } = require_mkdirs();
1804
1803
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
1805
1804
  var { symlinkType, symlinkTypeSync } = require_symlink_type();
@@ -1808,47 +1807,47 @@ var require_symlink = __commonJS({
1808
1807
  async function createSymlink(srcpath, dstpath, type) {
1809
1808
  let stats;
1810
1809
  try {
1811
- stats = await fs3.lstat(dstpath);
1810
+ stats = await fs2.lstat(dstpath);
1812
1811
  } catch {
1813
1812
  }
1814
1813
  if (stats && stats.isSymbolicLink()) {
1815
1814
  const [srcStat, dstStat] = await Promise.all([
1816
- fs3.stat(srcpath),
1817
- fs3.stat(dstpath)
1815
+ fs2.stat(srcpath),
1816
+ fs2.stat(dstpath)
1818
1817
  ]);
1819
1818
  if (areIdentical(srcStat, dstStat))
1820
1819
  return;
1821
1820
  }
1822
- const relative2 = await symlinkPaths(srcpath, dstpath);
1823
- srcpath = relative2.toDst;
1824
- const toType = await symlinkType(relative2.toCwd, type);
1821
+ const relative = await symlinkPaths(srcpath, dstpath);
1822
+ srcpath = relative.toDst;
1823
+ const toType = await symlinkType(relative.toCwd, type);
1825
1824
  const dir = path.dirname(dstpath);
1826
1825
  if (!await pathExists(dir)) {
1827
1826
  await mkdirs(dir);
1828
1827
  }
1829
- return fs3.symlink(srcpath, dstpath, toType);
1828
+ return fs2.symlink(srcpath, dstpath, toType);
1830
1829
  }
1831
1830
  function createSymlinkSync(srcpath, dstpath, type) {
1832
1831
  let stats;
1833
1832
  try {
1834
- stats = fs3.lstatSync(dstpath);
1833
+ stats = fs2.lstatSync(dstpath);
1835
1834
  } catch {
1836
1835
  }
1837
1836
  if (stats && stats.isSymbolicLink()) {
1838
- const srcStat = fs3.statSync(srcpath);
1839
- const dstStat = fs3.statSync(dstpath);
1837
+ const srcStat = fs2.statSync(srcpath);
1838
+ const dstStat = fs2.statSync(dstpath);
1840
1839
  if (areIdentical(srcStat, dstStat))
1841
1840
  return;
1842
1841
  }
1843
- const relative2 = symlinkPathsSync(srcpath, dstpath);
1844
- srcpath = relative2.toDst;
1845
- type = symlinkTypeSync(relative2.toCwd, type);
1842
+ const relative = symlinkPathsSync(srcpath, dstpath);
1843
+ srcpath = relative.toDst;
1844
+ type = symlinkTypeSync(relative.toCwd, type);
1846
1845
  const dir = path.dirname(dstpath);
1847
- const exists = fs3.existsSync(dir);
1846
+ const exists = fs2.existsSync(dir);
1848
1847
  if (exists)
1849
- return fs3.symlinkSync(srcpath, dstpath, type);
1848
+ return fs2.symlinkSync(srcpath, dstpath, type);
1850
1849
  mkdirsSync(dir);
1851
- return fs3.symlinkSync(srcpath, dstpath, type);
1850
+ return fs2.symlinkSync(srcpath, dstpath, type);
1852
1851
  }
1853
1852
  module.exports = {
1854
1853
  createSymlink: u(createSymlink),
@@ -1858,9 +1857,9 @@ var require_symlink = __commonJS({
1858
1857
  });
1859
1858
 
1860
1859
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js
1861
- var require_ensure = __commonJS({
1860
+ var require_ensure = chunkMM42A6GN_cjs.__commonJS({
1862
1861
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/ensure/index.js"(exports, module) {
1863
- init_esm_shims();
1862
+ chunkMM42A6GN_cjs.init_cjs_shims();
1864
1863
  var { createFile, createFileSync } = require_file();
1865
1864
  var { createLink, createLinkSync } = require_link();
1866
1865
  var { createSymlink, createSymlinkSync } = require_symlink();
@@ -1885,9 +1884,9 @@ var require_ensure = __commonJS({
1885
1884
  });
1886
1885
 
1887
1886
  // ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js
1888
- var require_utils2 = __commonJS({
1887
+ var require_utils2 = chunkMM42A6GN_cjs.__commonJS({
1889
1888
  "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module) {
1890
- init_esm_shims();
1889
+ chunkMM42A6GN_cjs.init_cjs_shims();
1891
1890
  function stringify(obj, { EOL = "\n", finalEOL = true, replacer = null, spaces } = {}) {
1892
1891
  const EOF = finalEOL ? EOL : "";
1893
1892
  const str = JSON.stringify(obj, replacer, spaces);
@@ -1903,14 +1902,14 @@ var require_utils2 = __commonJS({
1903
1902
  });
1904
1903
 
1905
1904
  // ../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js
1906
- var require_jsonfile = __commonJS({
1905
+ var require_jsonfile = chunkMM42A6GN_cjs.__commonJS({
1907
1906
  "../../node_modules/.pnpm/jsonfile@6.1.0/node_modules/jsonfile/index.js"(exports, module) {
1908
- init_esm_shims();
1907
+ chunkMM42A6GN_cjs.init_cjs_shims();
1909
1908
  var _fs;
1910
1909
  try {
1911
1910
  _fs = require_graceful_fs();
1912
1911
  } catch (_) {
1913
- _fs = __require("fs");
1912
+ _fs = chunkMM42A6GN_cjs.__require("fs");
1914
1913
  }
1915
1914
  var universalify = require_universalify();
1916
1915
  var { stringify, stripBom } = require_utils2();
@@ -1918,9 +1917,9 @@ var require_jsonfile = __commonJS({
1918
1917
  if (typeof options === "string") {
1919
1918
  options = { encoding: options };
1920
1919
  }
1921
- const fs3 = options.fs || _fs;
1920
+ const fs2 = options.fs || _fs;
1922
1921
  const shouldThrow = "throws" in options ? options.throws : true;
1923
- let data = await universalify.fromCallback(fs3.readFile)(file, options);
1922
+ let data = await universalify.fromCallback(fs2.readFile)(file, options);
1924
1923
  data = stripBom(data);
1925
1924
  let obj;
1926
1925
  try {
@@ -1940,10 +1939,10 @@ var require_jsonfile = __commonJS({
1940
1939
  if (typeof options === "string") {
1941
1940
  options = { encoding: options };
1942
1941
  }
1943
- const fs3 = options.fs || _fs;
1942
+ const fs2 = options.fs || _fs;
1944
1943
  const shouldThrow = "throws" in options ? options.throws : true;
1945
1944
  try {
1946
- let content = fs3.readFileSync(file, options);
1945
+ let content = fs2.readFileSync(file, options);
1947
1946
  content = stripBom(content);
1948
1947
  return JSON.parse(content, options.reviver);
1949
1948
  } catch (err) {
@@ -1956,15 +1955,15 @@ var require_jsonfile = __commonJS({
1956
1955
  }
1957
1956
  }
1958
1957
  async function _writeFile(file, obj, options = {}) {
1959
- const fs3 = options.fs || _fs;
1958
+ const fs2 = options.fs || _fs;
1960
1959
  const str = stringify(obj, options);
1961
- await universalify.fromCallback(fs3.writeFile)(file, str, options);
1960
+ await universalify.fromCallback(fs2.writeFile)(file, str, options);
1962
1961
  }
1963
1962
  var writeFile = universalify.fromPromise(_writeFile);
1964
1963
  function writeFileSync(file, obj, options = {}) {
1965
- const fs3 = options.fs || _fs;
1964
+ const fs2 = options.fs || _fs;
1966
1965
  const str = stringify(obj, options);
1967
- return fs3.writeFileSync(file, str, options);
1966
+ return fs2.writeFileSync(file, str, options);
1968
1967
  }
1969
1968
  var jsonfile = {
1970
1969
  readFile,
@@ -1977,9 +1976,9 @@ var require_jsonfile = __commonJS({
1977
1976
  });
1978
1977
 
1979
1978
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js
1980
- var require_jsonfile2 = __commonJS({
1979
+ var require_jsonfile2 = chunkMM42A6GN_cjs.__commonJS({
1981
1980
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/jsonfile.js"(exports, module) {
1982
- init_esm_shims();
1981
+ chunkMM42A6GN_cjs.init_cjs_shims();
1983
1982
  var jsonFile = require_jsonfile();
1984
1983
  module.exports = {
1985
1984
  // jsonfile exports
@@ -1992,12 +1991,12 @@ var require_jsonfile2 = __commonJS({
1992
1991
  });
1993
1992
 
1994
1993
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js
1995
- var require_output_file = __commonJS({
1994
+ var require_output_file = chunkMM42A6GN_cjs.__commonJS({
1996
1995
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/output-file/index.js"(exports, module) {
1997
- init_esm_shims();
1996
+ chunkMM42A6GN_cjs.init_cjs_shims();
1998
1997
  var u = require_universalify().fromPromise;
1999
- var fs3 = require_fs();
2000
- var path = __require("path");
1998
+ var fs2 = require_fs();
1999
+ var path = chunkMM42A6GN_cjs.__require("path");
2001
2000
  var mkdir = require_mkdirs();
2002
2001
  var pathExists = require_path_exists().pathExists;
2003
2002
  async function outputFile(file, data, encoding = "utf-8") {
@@ -2005,14 +2004,14 @@ var require_output_file = __commonJS({
2005
2004
  if (!await pathExists(dir)) {
2006
2005
  await mkdir.mkdirs(dir);
2007
2006
  }
2008
- return fs3.writeFile(file, data, encoding);
2007
+ return fs2.writeFile(file, data, encoding);
2009
2008
  }
2010
2009
  function outputFileSync(file, ...args) {
2011
2010
  const dir = path.dirname(file);
2012
- if (!fs3.existsSync(dir)) {
2011
+ if (!fs2.existsSync(dir)) {
2013
2012
  mkdir.mkdirsSync(dir);
2014
2013
  }
2015
- fs3.writeFileSync(file, ...args);
2014
+ fs2.writeFileSync(file, ...args);
2016
2015
  }
2017
2016
  module.exports = {
2018
2017
  outputFile: u(outputFile),
@@ -2022,9 +2021,9 @@ var require_output_file = __commonJS({
2022
2021
  });
2023
2022
 
2024
2023
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js
2025
- var require_output_json = __commonJS({
2024
+ var require_output_json = chunkMM42A6GN_cjs.__commonJS({
2026
2025
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json.js"(exports, module) {
2027
- init_esm_shims();
2026
+ chunkMM42A6GN_cjs.init_cjs_shims();
2028
2027
  var { stringify } = require_utils2();
2029
2028
  var { outputFile } = require_output_file();
2030
2029
  async function outputJson(file, data, options = {}) {
@@ -2036,9 +2035,9 @@ var require_output_json = __commonJS({
2036
2035
  });
2037
2036
 
2038
2037
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js
2039
- var require_output_json_sync = __commonJS({
2038
+ var require_output_json_sync = chunkMM42A6GN_cjs.__commonJS({
2040
2039
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/output-json-sync.js"(exports, module) {
2041
- init_esm_shims();
2040
+ chunkMM42A6GN_cjs.init_cjs_shims();
2042
2041
  var { stringify } = require_utils2();
2043
2042
  var { outputFileSync } = require_output_file();
2044
2043
  function outputJsonSync(file, data, options) {
@@ -2050,9 +2049,9 @@ var require_output_json_sync = __commonJS({
2050
2049
  });
2051
2050
 
2052
2051
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js
2053
- var require_json = __commonJS({
2052
+ var require_json = chunkMM42A6GN_cjs.__commonJS({
2054
2053
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/json/index.js"(exports, module) {
2055
- init_esm_shims();
2054
+ chunkMM42A6GN_cjs.init_cjs_shims();
2056
2055
  var u = require_universalify().fromPromise;
2057
2056
  var jsonFile = require_jsonfile2();
2058
2057
  jsonFile.outputJson = u(require_output_json());
@@ -2068,13 +2067,13 @@ var require_json = __commonJS({
2068
2067
  });
2069
2068
 
2070
2069
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js
2071
- var require_move = __commonJS({
2070
+ var require_move = chunkMM42A6GN_cjs.__commonJS({
2072
2071
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move.js"(exports, module) {
2073
- init_esm_shims();
2074
- var fs3 = require_fs();
2075
- var path = __require("path");
2072
+ chunkMM42A6GN_cjs.init_cjs_shims();
2073
+ var fs2 = require_fs();
2074
+ var path = chunkMM42A6GN_cjs.__require("path");
2076
2075
  var { copy } = require_copy2();
2077
- var { remove: remove2 } = require_remove();
2076
+ var { remove } = require_remove();
2078
2077
  var { mkdirp } = require_mkdirs();
2079
2078
  var { pathExists } = require_path_exists();
2080
2079
  var stat = require_stat();
@@ -2092,13 +2091,13 @@ var require_move = __commonJS({
2092
2091
  async function doRename(src, dest, overwrite, isChangingCase) {
2093
2092
  if (!isChangingCase) {
2094
2093
  if (overwrite) {
2095
- await remove2(dest);
2094
+ await remove(dest);
2096
2095
  } else if (await pathExists(dest)) {
2097
2096
  throw new Error("dest already exists.");
2098
2097
  }
2099
2098
  }
2100
2099
  try {
2101
- await fs3.rename(src, dest);
2100
+ await fs2.rename(src, dest);
2102
2101
  } catch (err) {
2103
2102
  if (err.code !== "EXDEV") {
2104
2103
  throw err;
@@ -2113,18 +2112,18 @@ var require_move = __commonJS({
2113
2112
  preserveTimestamps: true
2114
2113
  };
2115
2114
  await copy(src, dest, opts);
2116
- return remove2(src);
2115
+ return remove(src);
2117
2116
  }
2118
2117
  module.exports = move;
2119
2118
  }
2120
2119
  });
2121
2120
 
2122
2121
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js
2123
- var require_move_sync = __commonJS({
2122
+ var require_move_sync = chunkMM42A6GN_cjs.__commonJS({
2124
2123
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/move-sync.js"(exports, module) {
2125
- init_esm_shims();
2126
- var fs3 = require_graceful_fs();
2127
- var path = __require("path");
2124
+ chunkMM42A6GN_cjs.init_cjs_shims();
2125
+ var fs2 = require_graceful_fs();
2126
+ var path = chunkMM42A6GN_cjs.__require("path");
2128
2127
  var copySync = require_copy2().copySync;
2129
2128
  var removeSync = require_remove().removeSync;
2130
2129
  var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -2150,13 +2149,13 @@ var require_move_sync = __commonJS({
2150
2149
  removeSync(dest);
2151
2150
  return rename(src, dest, overwrite);
2152
2151
  }
2153
- if (fs3.existsSync(dest))
2152
+ if (fs2.existsSync(dest))
2154
2153
  throw new Error("dest already exists.");
2155
2154
  return rename(src, dest, overwrite);
2156
2155
  }
2157
2156
  function rename(src, dest, overwrite) {
2158
2157
  try {
2159
- fs3.renameSync(src, dest);
2158
+ fs2.renameSync(src, dest);
2160
2159
  } catch (err) {
2161
2160
  if (err.code !== "EXDEV")
2162
2161
  throw err;
@@ -2177,9 +2176,9 @@ var require_move_sync = __commonJS({
2177
2176
  });
2178
2177
 
2179
2178
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js
2180
- var require_move2 = __commonJS({
2179
+ var require_move2 = chunkMM42A6GN_cjs.__commonJS({
2181
2180
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/move/index.js"(exports, module) {
2182
- init_esm_shims();
2181
+ chunkMM42A6GN_cjs.init_cjs_shims();
2183
2182
  var u = require_universalify().fromPromise;
2184
2183
  module.exports = {
2185
2184
  move: u(require_move()),
@@ -2189,9 +2188,9 @@ var require_move2 = __commonJS({
2189
2188
  });
2190
2189
 
2191
2190
  // ../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js
2192
- var require_lib = __commonJS({
2191
+ var require_lib = chunkMM42A6GN_cjs.__commonJS({
2193
2192
  "../../node_modules/.pnpm/fs-extra@11.2.0/node_modules/fs-extra/lib/index.js"(exports, module) {
2194
- init_esm_shims();
2193
+ chunkMM42A6GN_cjs.init_cjs_shims();
2195
2194
  module.exports = {
2196
2195
  // Export promiseified graceful-fs:
2197
2196
  ...require_fs(),
@@ -2209,87 +2208,24 @@ var require_lib = __commonJS({
2209
2208
  }
2210
2209
  });
2211
2210
 
2212
- // src/fs/clean.ts
2213
- init_esm_shims();
2214
- var import_fs_extra = __toESM(require_lib(), 1);
2215
- async function clean(path) {
2216
- return (0, import_fs_extra.remove)(path);
2217
- }
2218
-
2219
- // src/fs/read.ts
2220
- init_esm_shims();
2221
- var import_fs_extra2 = __toESM(require_lib(), 1);
2222
- function slash(path, platform = "linux") {
2223
- const isWindowsPath = /^\\\\\?\\/.test(path);
2224
- if (["linux", "mac"].includes(platform) && !isWindowsPath) {
2225
- return path.replaceAll(/\\/g, "/").replace("../", "").trimEnd();
2226
- }
2227
- return path.replaceAll(/\\/g, "/").replace("../", "").trimEnd();
2228
- }
2229
- function getRelativePath(rootDir, filePath, platform = "linux") {
2230
- if (!rootDir || !filePath) {
2231
- throw new Error(`Root and file should be filled in when retrieving the relativePath, ${rootDir || ""} ${filePath || ""}`);
2232
- }
2233
- const relativePath = relative(rootDir, filePath);
2234
- const slashedPath = slash(relativePath, platform);
2235
- if (slashedPath.startsWith("../")) {
2236
- return slashedPath.replace(basename(slashedPath), basename(slashedPath, extname(filePath)));
2237
- }
2238
- return `./${slashedPath.replace(basename(slashedPath), basename(slashedPath, extname(filePath)))}`;
2239
- }
2240
- var reader = switcher(
2241
- {
2242
- node: async (path) => {
2243
- return import_fs_extra2.default.readFile(path, { encoding: "utf8" });
2244
- },
2245
- bun: async (path) => {
2246
- const file = Bun.file(path);
2247
- return file.text();
2248
- }
2249
- },
2250
- "node"
2251
- );
2252
- var syncReader = switcher(
2253
- {
2254
- node: (path) => {
2255
- return import_fs_extra2.default.readFileSync(path, { encoding: "utf8" });
2256
- },
2257
- bun: () => {
2258
- throw new Error("Bun cannot read sync");
2259
- }
2260
- },
2261
- "node"
2262
- );
2263
- async function read(path) {
2264
- return reader(path);
2265
- }
2266
- function readSync(path) {
2267
- return syncReader(path);
2268
- }
2269
-
2270
2211
  // src/fs/write.ts
2271
- init_esm_shims();
2272
- var import_fs_extra3 = __toESM(require_lib(), 1);
2273
- async function saveCreateDirectory(path) {
2274
- const passedPath = dirname(resolve(path));
2275
- await import_fs_extra3.default.mkdir(passedPath, { recursive: true });
2276
- }
2277
- var writer = switcher(
2212
+ chunkMM42A6GN_cjs.init_cjs_shims();
2213
+ var import_fs_extra = chunkMM42A6GN_cjs.__toESM(require_lib(), 1);
2214
+ var writer = jsRuntime.switcher(
2278
2215
  {
2279
- node: async (path, data) => {
2216
+ node: async (path$1, data, { sanity }) => {
2280
2217
  try {
2281
- await import_fs_extra3.default.stat(resolve(path));
2282
- const oldContent = await import_fs_extra3.default.readFile(resolve(path), { encoding: "utf-8" });
2218
+ const oldContent = await import_fs_extra.default.readFile(path.resolve(path$1), { encoding: "utf-8" });
2283
2219
  if (oldContent?.toString() === data?.toString()) {
2284
2220
  return;
2285
2221
  }
2286
2222
  } catch (_err) {
2287
2223
  }
2288
- await saveCreateDirectory(path);
2289
- await import_fs_extra3.default.writeFile(resolve(path), data, { encoding: "utf-8" });
2290
- const savedData = await import_fs_extra3.default.readFile(resolve(path), { encoding: "utf-8" });
2291
- if (savedData?.toString() !== data?.toString()) {
2292
- throw new Error(`Sanity check failed for ${path}
2224
+ await import_fs_extra.default.outputFile(path.resolve(path$1), data, { encoding: "utf-8" });
2225
+ if (sanity) {
2226
+ const savedData = await import_fs_extra.default.readFile(path.resolve(path$1), { encoding: "utf-8" });
2227
+ if (savedData?.toString() !== data?.toString()) {
2228
+ throw new Error(`Sanity check failed for ${path$1}
2293
2229
 
2294
2230
  Data[${data.length}]:
2295
2231
  ${data}
@@ -2297,17 +2233,19 @@ ${data}
2297
2233
  Saved[${savedData.length}]:
2298
2234
  ${savedData}
2299
2235
  `);
2236
+ }
2237
+ return savedData;
2300
2238
  }
2301
- return savedData;
2239
+ return data;
2302
2240
  },
2303
- bun: async (path, data) => {
2241
+ bun: async (path$1, data, { sanity }) => {
2304
2242
  try {
2305
- await saveCreateDirectory(path);
2306
- await Bun.write(resolve(path), data);
2307
- const file = Bun.file(resolve(path));
2308
- const savedData = await file.text();
2309
- if (savedData?.toString() !== data?.toString()) {
2310
- throw new Error(`Sanity check failed for ${path}
2243
+ await Bun.write(path.resolve(path$1), data);
2244
+ if (sanity) {
2245
+ const file = Bun.file(path.resolve(path$1));
2246
+ const savedData = await file.text();
2247
+ if (savedData?.toString() !== data?.toString()) {
2248
+ throw new Error(`Sanity check failed for ${path$1}
2311
2249
 
2312
2250
  Data[${data.length}]:
2313
2251
  ${data}
@@ -2315,22 +2253,38 @@ ${data}
2315
2253
  Saved[${savedData.length}]:
2316
2254
  ${savedData}
2317
2255
  `);
2256
+ }
2257
+ return savedData;
2318
2258
  }
2319
- return savedData;
2259
+ return data;
2320
2260
  } catch (e) {
2321
- console.log(e, resolve(path));
2261
+ console.log(e, path.resolve(path$1));
2322
2262
  }
2323
2263
  }
2324
2264
  },
2325
2265
  "node"
2326
2266
  );
2327
- async function write(data, path) {
2267
+ async function write(data, path, options = {}) {
2328
2268
  if (data.trim() === "") {
2329
2269
  return void 0;
2330
2270
  }
2331
- return writer(path, data.trim());
2271
+ return writer(path, data.trim(), options);
2272
+ }
2273
+ async function writeLog(data) {
2274
+ if (data.trim() === "") {
2275
+ return void 0;
2276
+ }
2277
+ const path$1 = path.resolve(process.cwd(), "kubb-log.log");
2278
+ let previousLogs = "";
2279
+ try {
2280
+ previousLogs = await import_fs_extra.default.readFile(path.resolve(path$1), { encoding: "utf-8" });
2281
+ } catch (_err) {
2282
+ }
2283
+ return writer(path$1, [previousLogs, data.trim()].filter(Boolean).join("\n\n\n"), { sanity: false });
2332
2284
  }
2333
2285
 
2334
- export { clean, getRelativePath, read, readSync, write };
2286
+ exports.require_lib = require_lib;
2287
+ exports.write = write;
2288
+ exports.writeLog = writeLog;
2335
2289
  //# sourceMappingURL=out.js.map
2336
- //# sourceMappingURL=chunk-FOQFLMOC.js.map
2290
+ //# sourceMappingURL=chunk-ICRPOCV4.cjs.map