@h3ravel/database 11.2.0 → 11.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,22 +1,39 @@
1
1
  const require_chunk = require('./chunk-BncF-t-1.cjs');
2
+ let fs_promises = require("fs/promises");
3
+ fs_promises = require_chunk.__toESM(fs_promises);
4
+ let path = require("path");
5
+ path = require_chunk.__toESM(path);
6
+ let fs = require("fs");
7
+ fs = require_chunk.__toESM(fs);
2
8
  let node_process = require("node:process");
3
9
  node_process = require_chunk.__toESM(node_process);
4
10
  let node_os = require("node:os");
5
11
  node_os = require_chunk.__toESM(node_os);
6
12
  let node_tty = require("node:tty");
7
13
  node_tty = require_chunk.__toESM(node_tty);
8
- require("path");
9
14
  let __h3ravel_arquebus_migrations = require("@h3ravel/arquebus/migrations");
10
15
  __h3ravel_arquebus_migrations = require_chunk.__toESM(__h3ravel_arquebus_migrations);
11
16
  let __h3ravel_core = require("@h3ravel/core");
12
17
  __h3ravel_core = require_chunk.__toESM(__h3ravel_core);
13
- let __h3ravel_filesystem = require("@h3ravel/filesystem");
14
- __h3ravel_filesystem = require_chunk.__toESM(__h3ravel_filesystem);
15
18
  let node_path = require("node:path");
16
19
  node_path = require_chunk.__toESM(node_path);
17
20
  let __h3ravel_arquebus = require("@h3ravel/arquebus");
18
21
  __h3ravel_arquebus = require_chunk.__toESM(__h3ravel_arquebus);
19
22
 
23
+ //#region ../../node_modules/.pnpm/escalade@3.2.0/node_modules/escalade/sync/index.mjs
24
+ function sync_default(start, callback) {
25
+ let dir = (0, path.resolve)(".", start);
26
+ let tmp;
27
+ if (!(0, fs.statSync)(dir).isDirectory()) dir = (0, path.dirname)(dir);
28
+ while (true) {
29
+ tmp = callback(dir, (0, fs.readdirSync)(dir));
30
+ if (tmp) return (0, path.resolve)(dir, tmp);
31
+ dir = (0, path.dirname)(tmp = dir);
32
+ if (tmp === dir) break;
33
+ }
34
+ }
35
+
36
+ //#endregion
20
37
  //#region ../../node_modules/.pnpm/chalk@5.6.2/node_modules/chalk/source/vendor/ansi-styles/index.js
21
38
  const ANSI_BACKGROUND_OFFSET = 10;
22
39
  const wrapAnsi16 = (offset = 0) => (code) => `\u001B[${code + offset}m`;
@@ -429,8 +446,8 @@ var source_default = chalk;
429
446
  //#endregion
430
447
  //#region ../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js
431
448
  var require_p_try = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js": ((exports, module) => {
432
- const pTry$1 = (fn, ...arguments_) => new Promise((resolve) => {
433
- resolve(fn(...arguments_));
449
+ const pTry$1 = (fn, ...arguments_) => new Promise((resolve$1) => {
450
+ resolve$1(fn(...arguments_));
434
451
  });
435
452
  module.exports = pTry$1;
436
453
  module.exports.default = pTry$1;
@@ -448,17 +465,17 @@ var require_p_limit = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
448
465
  activeCount--;
449
466
  if (queue$1.length > 0) queue$1.shift()();
450
467
  };
451
- const run = (fn, resolve, ...args) => {
468
+ const run = (fn, resolve$1, ...args) => {
452
469
  activeCount++;
453
470
  const result = pTry(fn, ...args);
454
- resolve(result);
471
+ resolve$1(result);
455
472
  result.then(next, next);
456
473
  };
457
- const enqueue$1 = (fn, resolve, ...args) => {
458
- if (activeCount < concurrency) run(fn, resolve, ...args);
459
- else queue$1.push(run.bind(null, fn, resolve, ...args));
474
+ const enqueue$1 = (fn, resolve$1, ...args) => {
475
+ if (activeCount < concurrency) run(fn, resolve$1, ...args);
476
+ else queue$1.push(run.bind(null, fn, resolve$1, ...args));
460
477
  };
461
- const generator = (fn, ...args) => new Promise((resolve) => enqueue$1(fn, resolve, ...args));
478
+ const generator = (fn, ...args) => new Promise((resolve$1) => enqueue$1(fn, resolve$1, ...args));
462
479
  Object.defineProperties(generator, {
463
480
  activeCount: { get: () => activeCount },
464
481
  pendingCount: { get: () => queue$1.length },
@@ -511,12 +528,12 @@ var require_p_locate = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
511
528
  //#endregion
512
529
  //#region ../../node_modules/.pnpm/locate-path@5.0.0/node_modules/locate-path/index.js
513
530
  var require_locate_path = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/locate-path@5.0.0/node_modules/locate-path/index.js": ((exports, module) => {
514
- const path$9 = require("path");
515
- const fs$5 = require("fs");
531
+ const path$10 = require("path");
532
+ const fs$6 = require("fs");
516
533
  const { promisify: promisify$1 } = require("util");
517
534
  const pLocate = require_p_locate();
518
- const fsStat = promisify$1(fs$5.stat);
519
- const fsLStat = promisify$1(fs$5.lstat);
535
+ const fsStat = promisify$1(fs$6.stat);
536
+ const fsLStat = promisify$1(fs$6.lstat);
520
537
  const typeMappings = {
521
538
  directory: "isDirectory",
522
539
  file: "isFile"
@@ -537,7 +554,7 @@ var require_locate_path = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
537
554
  const statFn = options.allowSymlinks ? fsStat : fsLStat;
538
555
  return pLocate(paths, async (path_) => {
539
556
  try {
540
- const stat = await statFn(path$9.resolve(options.cwd, path_));
557
+ const stat = await statFn(path$10.resolve(options.cwd, path_));
541
558
  return matchType(options.type, stat);
542
559
  } catch (_) {
543
560
  return false;
@@ -552,9 +569,9 @@ var require_locate_path = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
552
569
  ...options
553
570
  };
554
571
  checkType(options);
555
- const statFn = options.allowSymlinks ? fs$5.statSync : fs$5.lstatSync;
572
+ const statFn = options.allowSymlinks ? fs$6.statSync : fs$6.lstatSync;
556
573
  for (const path_ of paths) try {
557
- const stat = statFn(path$9.resolve(options.cwd, path_));
574
+ const stat = statFn(path$10.resolve(options.cwd, path_));
558
575
  if (matchType(options.type, stat)) return path_;
559
576
  } catch (_) {}
560
577
  };
@@ -563,20 +580,20 @@ var require_locate_path = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
563
580
  //#endregion
564
581
  //#region ../../node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js
565
582
  var require_path_exists = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/path-exists@4.0.0/node_modules/path-exists/index.js": ((exports, module) => {
566
- const fs$4 = require("fs");
583
+ const fs$5 = require("fs");
567
584
  const { promisify } = require("util");
568
- const pAccess = promisify(fs$4.access);
569
- module.exports = async (path$10) => {
585
+ const pAccess = promisify(fs$5.access);
586
+ module.exports = async (path$11) => {
570
587
  try {
571
- await pAccess(path$10);
588
+ await pAccess(path$11);
572
589
  return true;
573
590
  } catch (_) {
574
591
  return false;
575
592
  }
576
593
  };
577
- module.exports.sync = (path$10) => {
594
+ module.exports.sync = (path$11) => {
578
595
  try {
579
- fs$4.accessSync(path$10);
596
+ fs$5.accessSync(path$11);
580
597
  return true;
581
598
  } catch (_) {
582
599
  return false;
@@ -587,13 +604,13 @@ var require_path_exists = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
587
604
  //#endregion
588
605
  //#region ../../node_modules/.pnpm/find-up@4.1.0/node_modules/find-up/index.js
589
606
  var require_find_up = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/find-up@4.1.0/node_modules/find-up/index.js": ((exports, module) => {
590
- const path$8 = require("path");
607
+ const path$9 = require("path");
591
608
  const locatePath = require_locate_path();
592
609
  const pathExists = require_path_exists();
593
610
  const stop = Symbol("findUp.stop");
594
611
  module.exports = async (name, options = {}) => {
595
- let directory = path$8.resolve(options.cwd || "");
596
- const { root } = path$8.parse(directory);
612
+ let directory = path$9.resolve(options.cwd || "");
613
+ const { root } = path$9.parse(directory);
597
614
  const paths = [].concat(name);
598
615
  const runMatcher = async (locateOptions) => {
599
616
  if (typeof name !== "function") return locatePath(paths, locateOptions);
@@ -607,14 +624,14 @@ var require_find_up = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
607
624
  cwd: directory
608
625
  });
609
626
  if (foundPath === stop) return;
610
- if (foundPath) return path$8.resolve(directory, foundPath);
627
+ if (foundPath) return path$9.resolve(directory, foundPath);
611
628
  if (directory === root) return;
612
- directory = path$8.dirname(directory);
629
+ directory = path$9.dirname(directory);
613
630
  }
614
631
  };
615
632
  module.exports.sync = (name, options = {}) => {
616
- let directory = path$8.resolve(options.cwd || "");
617
- const { root } = path$8.parse(directory);
633
+ let directory = path$9.resolve(options.cwd || "");
634
+ const { root } = path$9.parse(directory);
618
635
  const paths = [].concat(name);
619
636
  const runMatcher = (locateOptions) => {
620
637
  if (typeof name !== "function") return locatePath.sync(paths, locateOptions);
@@ -628,9 +645,9 @@ var require_find_up = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
628
645
  cwd: directory
629
646
  });
630
647
  if (foundPath === stop) return;
631
- if (foundPath) return path$8.resolve(directory, foundPath);
648
+ if (foundPath) return path$9.resolve(directory, foundPath);
632
649
  if (directory === root) return;
633
- directory = path$8.dirname(directory);
650
+ directory = path$9.dirname(directory);
634
651
  }
635
652
  };
636
653
  module.exports.exists = pathExists;
@@ -641,17 +658,17 @@ var require_find_up = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
641
658
  //#endregion
642
659
  //#region ../../node_modules/.pnpm/pkg-dir@4.2.0/node_modules/pkg-dir/index.js
643
660
  var require_pkg_dir = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/pkg-dir@4.2.0/node_modules/pkg-dir/index.js": ((exports, module) => {
644
- const path$7 = require("path");
661
+ const path$8 = require("path");
645
662
  const findUp = require_find_up();
646
663
  const pkgDir = async (cwd$1) => {
647
664
  const filePath = await findUp("package.json", { cwd: cwd$1 });
648
- return filePath && path$7.dirname(filePath);
665
+ return filePath && path$8.dirname(filePath);
649
666
  };
650
667
  module.exports = pkgDir;
651
668
  module.exports.default = pkgDir;
652
669
  module.exports.sync = (cwd$1) => {
653
670
  const filePath = findUp.sync("package.json", { cwd: cwd$1 });
654
- return filePath && path$7.dirname(filePath);
671
+ return filePath && path$8.dirname(filePath);
655
672
  };
656
673
  }) });
657
674
 
@@ -1726,7 +1743,7 @@ var require_braces = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modu
1726
1743
  //#endregion
1727
1744
  //#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js
1728
1745
  var require_constants = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/constants.js": ((exports, module) => {
1729
- const path$6 = require("path");
1746
+ const path$7 = require("path");
1730
1747
  const WIN_SLASH = "\\\\/";
1731
1748
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1732
1749
  /**
@@ -1857,7 +1874,7 @@ var require_constants = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_m
1857
1874
  CHAR_UNDERSCORE: 95,
1858
1875
  CHAR_VERTICAL_LINE: 124,
1859
1876
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
1860
- SEP: path$6.sep,
1877
+ SEP: path$7.sep,
1861
1878
  extglobChars(chars) {
1862
1879
  return {
1863
1880
  "!": {
@@ -1896,7 +1913,7 @@ var require_constants = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_m
1896
1913
  //#endregion
1897
1914
  //#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js
1898
1915
  var require_utils = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/utils.js": ((exports) => {
1899
- const path$5 = require("path");
1916
+ const path$6 = require("path");
1900
1917
  const win32 = process.platform === "win32";
1901
1918
  const { REGEX_BACKSLASH, REGEX_REMOVE_BACKSLASH, REGEX_SPECIAL_CHARS, REGEX_SPECIAL_CHARS_GLOBAL } = require_constants();
1902
1919
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
@@ -1916,7 +1933,7 @@ var require_utils = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
1916
1933
  };
1917
1934
  exports.isWindows = (options) => {
1918
1935
  if (options && typeof options.windows === "boolean") return options.windows;
1919
- return win32 === true || path$5.sep === "\\";
1936
+ return win32 === true || path$6.sep === "\\";
1920
1937
  };
1921
1938
  exports.escapeLast = (input, char, lastIdx) => {
1922
1939
  const idx = input.lastIndexOf(char, lastIdx);
@@ -3096,7 +3113,7 @@ var require_parse = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
3096
3113
  //#endregion
3097
3114
  //#region ../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js
3098
3115
  var require_picomatch$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/picomatch@2.3.1/node_modules/picomatch/lib/picomatch.js": ((exports, module) => {
3099
- const path$4 = require("path");
3116
+ const path$5 = require("path");
3100
3117
  const scan = require_scan();
3101
3118
  const parse$1 = require_parse();
3102
3119
  const utils$1 = require_utils();
@@ -3235,7 +3252,7 @@ var require_picomatch$1 = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
3235
3252
  * @api public
3236
3253
  */
3237
3254
  picomatch$1.matchBase = (input, glob, options, posix = utils$1.isWindows(options)) => {
3238
- return (glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options)).test(path$4.basename(input));
3255
+ return (glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options)).test(path$5.basename(input));
3239
3256
  };
3240
3257
  /**
3241
3258
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -3895,47 +3912,47 @@ var require_polyfills = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_m
3895
3912
  if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir);
3896
3913
  }
3897
3914
  module.exports = patch$1;
3898
- function patch$1(fs$6) {
3899
- if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs$6);
3900
- if (!fs$6.lutimes) patchLutimes(fs$6);
3901
- fs$6.chown = chownFix(fs$6.chown);
3902
- fs$6.fchown = chownFix(fs$6.fchown);
3903
- fs$6.lchown = chownFix(fs$6.lchown);
3904
- fs$6.chmod = chmodFix(fs$6.chmod);
3905
- fs$6.fchmod = chmodFix(fs$6.fchmod);
3906
- fs$6.lchmod = chmodFix(fs$6.lchmod);
3907
- fs$6.chownSync = chownFixSync(fs$6.chownSync);
3908
- fs$6.fchownSync = chownFixSync(fs$6.fchownSync);
3909
- fs$6.lchownSync = chownFixSync(fs$6.lchownSync);
3910
- fs$6.chmodSync = chmodFixSync(fs$6.chmodSync);
3911
- fs$6.fchmodSync = chmodFixSync(fs$6.fchmodSync);
3912
- fs$6.lchmodSync = chmodFixSync(fs$6.lchmodSync);
3913
- fs$6.stat = statFix(fs$6.stat);
3914
- fs$6.fstat = statFix(fs$6.fstat);
3915
- fs$6.lstat = statFix(fs$6.lstat);
3916
- fs$6.statSync = statFixSync(fs$6.statSync);
3917
- fs$6.fstatSync = statFixSync(fs$6.fstatSync);
3918
- fs$6.lstatSync = statFixSync(fs$6.lstatSync);
3919
- if (fs$6.chmod && !fs$6.lchmod) {
3920
- fs$6.lchmod = function(path$10, mode, cb) {
3915
+ function patch$1(fs$7) {
3916
+ if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) patchLchmod(fs$7);
3917
+ if (!fs$7.lutimes) patchLutimes(fs$7);
3918
+ fs$7.chown = chownFix(fs$7.chown);
3919
+ fs$7.fchown = chownFix(fs$7.fchown);
3920
+ fs$7.lchown = chownFix(fs$7.lchown);
3921
+ fs$7.chmod = chmodFix(fs$7.chmod);
3922
+ fs$7.fchmod = chmodFix(fs$7.fchmod);
3923
+ fs$7.lchmod = chmodFix(fs$7.lchmod);
3924
+ fs$7.chownSync = chownFixSync(fs$7.chownSync);
3925
+ fs$7.fchownSync = chownFixSync(fs$7.fchownSync);
3926
+ fs$7.lchownSync = chownFixSync(fs$7.lchownSync);
3927
+ fs$7.chmodSync = chmodFixSync(fs$7.chmodSync);
3928
+ fs$7.fchmodSync = chmodFixSync(fs$7.fchmodSync);
3929
+ fs$7.lchmodSync = chmodFixSync(fs$7.lchmodSync);
3930
+ fs$7.stat = statFix(fs$7.stat);
3931
+ fs$7.fstat = statFix(fs$7.fstat);
3932
+ fs$7.lstat = statFix(fs$7.lstat);
3933
+ fs$7.statSync = statFixSync(fs$7.statSync);
3934
+ fs$7.fstatSync = statFixSync(fs$7.fstatSync);
3935
+ fs$7.lstatSync = statFixSync(fs$7.lstatSync);
3936
+ if (fs$7.chmod && !fs$7.lchmod) {
3937
+ fs$7.lchmod = function(path$11, mode, cb) {
3921
3938
  if (cb) process.nextTick(cb);
3922
3939
  };
3923
- fs$6.lchmodSync = function() {};
3940
+ fs$7.lchmodSync = function() {};
3924
3941
  }
3925
- if (fs$6.chown && !fs$6.lchown) {
3926
- fs$6.lchown = function(path$10, uid, gid, cb) {
3942
+ if (fs$7.chown && !fs$7.lchown) {
3943
+ fs$7.lchown = function(path$11, uid, gid, cb) {
3927
3944
  if (cb) process.nextTick(cb);
3928
3945
  };
3929
- fs$6.lchownSync = function() {};
3946
+ fs$7.lchownSync = function() {};
3930
3947
  }
3931
- if (platform === "win32") fs$6.rename = typeof fs$6.rename !== "function" ? fs$6.rename : (function(fs$rename) {
3948
+ if (platform === "win32") fs$7.rename = typeof fs$7.rename !== "function" ? fs$7.rename : (function(fs$rename) {
3932
3949
  function rename(from, to, cb) {
3933
3950
  var start = Date.now();
3934
3951
  var backoff = 0;
3935
3952
  fs$rename(from, to, function CB(er) {
3936
3953
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
3937
3954
  setTimeout(function() {
3938
- fs$6.stat(to, function(stater, st) {
3955
+ fs$7.stat(to, function(stater, st) {
3939
3956
  if (stater && stater.code === "ENOENT") fs$rename(from, to, CB);
3940
3957
  else cb(er);
3941
3958
  });
@@ -3948,8 +3965,8 @@ var require_polyfills = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_m
3948
3965
  }
3949
3966
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
3950
3967
  return rename;
3951
- })(fs$6.rename);
3952
- fs$6.read = typeof fs$6.read !== "function" ? fs$6.read : (function(fs$read) {
3968
+ })(fs$7.rename);
3969
+ fs$7.read = typeof fs$7.read !== "function" ? fs$7.read : (function(fs$read) {
3953
3970
  function read(fd, buffer, offset, length, position, callback_) {
3954
3971
  var callback;
3955
3972
  if (callback_ && typeof callback_ === "function") {
@@ -3957,21 +3974,21 @@ var require_polyfills = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_m
3957
3974
  callback = function(er, _, __) {
3958
3975
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
3959
3976
  eagCounter++;
3960
- return fs$read.call(fs$6, fd, buffer, offset, length, position, callback);
3977
+ return fs$read.call(fs$7, fd, buffer, offset, length, position, callback);
3961
3978
  }
3962
3979
  callback_.apply(this, arguments);
3963
3980
  };
3964
3981
  }
3965
- return fs$read.call(fs$6, fd, buffer, offset, length, position, callback);
3982
+ return fs$read.call(fs$7, fd, buffer, offset, length, position, callback);
3966
3983
  }
3967
3984
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
3968
3985
  return read;
3969
- })(fs$6.read);
3970
- fs$6.readSync = typeof fs$6.readSync !== "function" ? fs$6.readSync : (function(fs$readSync) {
3986
+ })(fs$7.read);
3987
+ fs$7.readSync = typeof fs$7.readSync !== "function" ? fs$7.readSync : (function(fs$readSync) {
3971
3988
  return function(fd, buffer, offset, length, position) {
3972
3989
  var eagCounter = 0;
3973
3990
  while (true) try {
3974
- return fs$readSync.call(fs$6, fd, buffer, offset, length, position);
3991
+ return fs$readSync.call(fs$7, fd, buffer, offset, length, position);
3975
3992
  } catch (er) {
3976
3993
  if (er.code === "EAGAIN" && eagCounter < 10) {
3977
3994
  eagCounter++;
@@ -3980,78 +3997,78 @@ var require_polyfills = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_m
3980
3997
  throw er;
3981
3998
  }
3982
3999
  };
3983
- })(fs$6.readSync);
3984
- function patchLchmod(fs$7) {
3985
- fs$7.lchmod = function(path$10, mode, callback) {
3986
- fs$7.open(path$10, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) {
4000
+ })(fs$7.readSync);
4001
+ function patchLchmod(fs$8) {
4002
+ fs$8.lchmod = function(path$11, mode, callback) {
4003
+ fs$8.open(path$11, constants.O_WRONLY | constants.O_SYMLINK, mode, function(err, fd) {
3987
4004
  if (err) {
3988
4005
  if (callback) callback(err);
3989
4006
  return;
3990
4007
  }
3991
- fs$7.fchmod(fd, mode, function(err$1) {
3992
- fs$7.close(fd, function(err2) {
4008
+ fs$8.fchmod(fd, mode, function(err$1) {
4009
+ fs$8.close(fd, function(err2) {
3993
4010
  if (callback) callback(err$1 || err2);
3994
4011
  });
3995
4012
  });
3996
4013
  });
3997
4014
  };
3998
- fs$7.lchmodSync = function(path$10, mode) {
3999
- var fd = fs$7.openSync(path$10, constants.O_WRONLY | constants.O_SYMLINK, mode);
4015
+ fs$8.lchmodSync = function(path$11, mode) {
4016
+ var fd = fs$8.openSync(path$11, constants.O_WRONLY | constants.O_SYMLINK, mode);
4000
4017
  var threw = true;
4001
4018
  var ret;
4002
4019
  try {
4003
- ret = fs$7.fchmodSync(fd, mode);
4020
+ ret = fs$8.fchmodSync(fd, mode);
4004
4021
  threw = false;
4005
4022
  } finally {
4006
4023
  if (threw) try {
4007
- fs$7.closeSync(fd);
4024
+ fs$8.closeSync(fd);
4008
4025
  } catch (er) {}
4009
- else fs$7.closeSync(fd);
4026
+ else fs$8.closeSync(fd);
4010
4027
  }
4011
4028
  return ret;
4012
4029
  };
4013
4030
  }
4014
- function patchLutimes(fs$7) {
4015
- if (constants.hasOwnProperty("O_SYMLINK") && fs$7.futimes) {
4016
- fs$7.lutimes = function(path$10, at, mt, cb) {
4017
- fs$7.open(path$10, constants.O_SYMLINK, function(er, fd) {
4031
+ function patchLutimes(fs$8) {
4032
+ if (constants.hasOwnProperty("O_SYMLINK") && fs$8.futimes) {
4033
+ fs$8.lutimes = function(path$11, at, mt, cb) {
4034
+ fs$8.open(path$11, constants.O_SYMLINK, function(er, fd) {
4018
4035
  if (er) {
4019
4036
  if (cb) cb(er);
4020
4037
  return;
4021
4038
  }
4022
- fs$7.futimes(fd, at, mt, function(er$1) {
4023
- fs$7.close(fd, function(er2) {
4039
+ fs$8.futimes(fd, at, mt, function(er$1) {
4040
+ fs$8.close(fd, function(er2) {
4024
4041
  if (cb) cb(er$1 || er2);
4025
4042
  });
4026
4043
  });
4027
4044
  });
4028
4045
  };
4029
- fs$7.lutimesSync = function(path$10, at, mt) {
4030
- var fd = fs$7.openSync(path$10, constants.O_SYMLINK);
4046
+ fs$8.lutimesSync = function(path$11, at, mt) {
4047
+ var fd = fs$8.openSync(path$11, constants.O_SYMLINK);
4031
4048
  var ret;
4032
4049
  var threw = true;
4033
4050
  try {
4034
- ret = fs$7.futimesSync(fd, at, mt);
4051
+ ret = fs$8.futimesSync(fd, at, mt);
4035
4052
  threw = false;
4036
4053
  } finally {
4037
4054
  if (threw) try {
4038
- fs$7.closeSync(fd);
4055
+ fs$8.closeSync(fd);
4039
4056
  } catch (er) {}
4040
- else fs$7.closeSync(fd);
4057
+ else fs$8.closeSync(fd);
4041
4058
  }
4042
4059
  return ret;
4043
4060
  };
4044
- } else if (fs$7.futimes) {
4045
- fs$7.lutimes = function(_a, _b, _c, cb) {
4061
+ } else if (fs$8.futimes) {
4062
+ fs$8.lutimes = function(_a, _b, _c, cb) {
4046
4063
  if (cb) process.nextTick(cb);
4047
4064
  };
4048
- fs$7.lutimesSync = function() {};
4065
+ fs$8.lutimesSync = function() {};
4049
4066
  }
4050
4067
  }
4051
4068
  function chmodFix(orig) {
4052
4069
  if (!orig) return orig;
4053
4070
  return function(target, mode, cb) {
4054
- return orig.call(fs$6, target, mode, function(er) {
4071
+ return orig.call(fs$7, target, mode, function(er) {
4055
4072
  if (chownErOk(er)) er = null;
4056
4073
  if (cb) cb.apply(this, arguments);
4057
4074
  });
@@ -4061,7 +4078,7 @@ var require_polyfills = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_m
4061
4078
  if (!orig) return orig;
4062
4079
  return function(target, mode) {
4063
4080
  try {
4064
- return orig.call(fs$6, target, mode);
4081
+ return orig.call(fs$7, target, mode);
4065
4082
  } catch (er) {
4066
4083
  if (!chownErOk(er)) throw er;
4067
4084
  }
@@ -4070,7 +4087,7 @@ var require_polyfills = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_m
4070
4087
  function chownFix(orig) {
4071
4088
  if (!orig) return orig;
4072
4089
  return function(target, uid, gid, cb) {
4073
- return orig.call(fs$6, target, uid, gid, function(er) {
4090
+ return orig.call(fs$7, target, uid, gid, function(er) {
4074
4091
  if (chownErOk(er)) er = null;
4075
4092
  if (cb) cb.apply(this, arguments);
4076
4093
  });
@@ -4080,7 +4097,7 @@ var require_polyfills = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_m
4080
4097
  if (!orig) return orig;
4081
4098
  return function(target, uid, gid) {
4082
4099
  try {
4083
- return orig.call(fs$6, target, uid, gid);
4100
+ return orig.call(fs$7, target, uid, gid);
4084
4101
  } catch (er) {
4085
4102
  if (!chownErOk(er)) throw er;
4086
4103
  }
@@ -4100,13 +4117,13 @@ var require_polyfills = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_m
4100
4117
  }
4101
4118
  if (cb) cb.apply(this, arguments);
4102
4119
  }
4103
- return options ? orig.call(fs$6, target, options, callback) : orig.call(fs$6, target, callback);
4120
+ return options ? orig.call(fs$7, target, options, callback) : orig.call(fs$7, target, callback);
4104
4121
  };
4105
4122
  }
4106
4123
  function statFixSync(orig) {
4107
4124
  if (!orig) return orig;
4108
4125
  return function(target, options) {
4109
- var stats = options ? orig.call(fs$6, target, options) : orig.call(fs$6, target);
4126
+ var stats = options ? orig.call(fs$7, target, options) : orig.call(fs$7, target);
4110
4127
  if (stats) {
4111
4128
  if (stats.uid < 0) stats.uid += 4294967296;
4112
4129
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -4130,16 +4147,16 @@ var require_polyfills = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_m
4130
4147
  var require_legacy_streams = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js": ((exports, module) => {
4131
4148
  var Stream = require("stream").Stream;
4132
4149
  module.exports = legacy$1;
4133
- function legacy$1(fs$6) {
4150
+ function legacy$1(fs$7) {
4134
4151
  return {
4135
4152
  ReadStream,
4136
4153
  WriteStream
4137
4154
  };
4138
- function ReadStream(path$10, options) {
4139
- if (!(this instanceof ReadStream)) return new ReadStream(path$10, options);
4155
+ function ReadStream(path$11, options) {
4156
+ if (!(this instanceof ReadStream)) return new ReadStream(path$11, options);
4140
4157
  Stream.call(this);
4141
4158
  var self = this;
4142
- this.path = path$10;
4159
+ this.path = path$11;
4143
4160
  this.fd = null;
4144
4161
  this.readable = true;
4145
4162
  this.paused = false;
@@ -4166,7 +4183,7 @@ var require_legacy_streams = /* @__PURE__ */ require_chunk.__commonJS({ "../../n
4166
4183
  });
4167
4184
  return;
4168
4185
  }
4169
- fs$6.open(this.path, this.flags, this.mode, function(err, fd) {
4186
+ fs$7.open(this.path, this.flags, this.mode, function(err, fd) {
4170
4187
  if (err) {
4171
4188
  self.emit("error", err);
4172
4189
  self.readable = false;
@@ -4177,10 +4194,10 @@ var require_legacy_streams = /* @__PURE__ */ require_chunk.__commonJS({ "../../n
4177
4194
  self._read();
4178
4195
  });
4179
4196
  }
4180
- function WriteStream(path$10, options) {
4181
- if (!(this instanceof WriteStream)) return new WriteStream(path$10, options);
4197
+ function WriteStream(path$11, options) {
4198
+ if (!(this instanceof WriteStream)) return new WriteStream(path$11, options);
4182
4199
  Stream.call(this);
4183
- this.path = path$10;
4200
+ this.path = path$11;
4184
4201
  this.fd = null;
4185
4202
  this.writable = true;
4186
4203
  this.flags = "w";
@@ -4201,7 +4218,7 @@ var require_legacy_streams = /* @__PURE__ */ require_chunk.__commonJS({ "../../n
4201
4218
  this.busy = false;
4202
4219
  this._queue = [];
4203
4220
  if (this.fd === null) {
4204
- this._open = fs$6.open;
4221
+ this._open = fs$7.open;
4205
4222
  this._queue.push([
4206
4223
  this._open,
4207
4224
  this.path,
@@ -4236,7 +4253,7 @@ var require_clone = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modul
4236
4253
  //#endregion
4237
4254
  //#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
4238
4255
  var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js": ((exports, module) => {
4239
- var fs$3 = require("fs");
4256
+ var fs$4 = require("fs");
4240
4257
  var polyfills = require_polyfills();
4241
4258
  var legacy = require_legacy_streams();
4242
4259
  var clone = require_clone();
@@ -4265,54 +4282,54 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4265
4282
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
4266
4283
  console.error(m);
4267
4284
  };
4268
- if (!fs$3[gracefulQueue]) {
4285
+ if (!fs$4[gracefulQueue]) {
4269
4286
  var queue = global[gracefulQueue] || [];
4270
- publishQueue(fs$3, queue);
4271
- fs$3.close = (function(fs$close) {
4287
+ publishQueue(fs$4, queue);
4288
+ fs$4.close = (function(fs$close) {
4272
4289
  function close(fd, cb) {
4273
- return fs$close.call(fs$3, fd, function(err) {
4290
+ return fs$close.call(fs$4, fd, function(err) {
4274
4291
  if (!err) resetQueue();
4275
4292
  if (typeof cb === "function") cb.apply(this, arguments);
4276
4293
  });
4277
4294
  }
4278
4295
  Object.defineProperty(close, previousSymbol, { value: fs$close });
4279
4296
  return close;
4280
- })(fs$3.close);
4281
- fs$3.closeSync = (function(fs$closeSync) {
4297
+ })(fs$4.close);
4298
+ fs$4.closeSync = (function(fs$closeSync) {
4282
4299
  function closeSync(fd) {
4283
- fs$closeSync.apply(fs$3, arguments);
4300
+ fs$closeSync.apply(fs$4, arguments);
4284
4301
  resetQueue();
4285
4302
  }
4286
4303
  Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
4287
4304
  return closeSync;
4288
- })(fs$3.closeSync);
4305
+ })(fs$4.closeSync);
4289
4306
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
4290
- debug(fs$3[gracefulQueue]);
4291
- require("assert").equal(fs$3[gracefulQueue].length, 0);
4307
+ debug(fs$4[gracefulQueue]);
4308
+ require("assert").equal(fs$4[gracefulQueue].length, 0);
4292
4309
  });
4293
4310
  }
4294
- if (!global[gracefulQueue]) publishQueue(global, fs$3[gracefulQueue]);
4295
- module.exports = patch(clone(fs$3));
4296
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$3.__patched) {
4297
- module.exports = patch(fs$3);
4298
- fs$3.__patched = true;
4299
- }
4300
- function patch(fs$6) {
4301
- polyfills(fs$6);
4302
- fs$6.gracefulify = patch;
4303
- fs$6.createReadStream = createReadStream;
4304
- fs$6.createWriteStream = createWriteStream;
4305
- var fs$readFile = fs$6.readFile;
4306
- fs$6.readFile = readFile;
4307
- function readFile(path$10, options, cb) {
4311
+ if (!global[gracefulQueue]) publishQueue(global, fs$4[gracefulQueue]);
4312
+ module.exports = patch(clone(fs$4));
4313
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$4.__patched) {
4314
+ module.exports = patch(fs$4);
4315
+ fs$4.__patched = true;
4316
+ }
4317
+ function patch(fs$7) {
4318
+ polyfills(fs$7);
4319
+ fs$7.gracefulify = patch;
4320
+ fs$7.createReadStream = createReadStream;
4321
+ fs$7.createWriteStream = createWriteStream;
4322
+ var fs$readFile = fs$7.readFile;
4323
+ fs$7.readFile = readFile;
4324
+ function readFile(path$11, options, cb) {
4308
4325
  if (typeof options === "function") cb = options, options = null;
4309
- return go$readFile(path$10, options, cb);
4310
- function go$readFile(path$11, options$1, cb$1, startTime) {
4311
- return fs$readFile(path$11, options$1, function(err) {
4326
+ return go$readFile(path$11, options, cb);
4327
+ function go$readFile(path$12, options$1, cb$1, startTime) {
4328
+ return fs$readFile(path$12, options$1, function(err) {
4312
4329
  if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
4313
4330
  go$readFile,
4314
4331
  [
4315
- path$11,
4332
+ path$12,
4316
4333
  options$1,
4317
4334
  cb$1
4318
4335
  ],
@@ -4324,17 +4341,17 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4324
4341
  });
4325
4342
  }
4326
4343
  }
4327
- var fs$writeFile = fs$6.writeFile;
4328
- fs$6.writeFile = writeFile;
4329
- function writeFile(path$10, data, options, cb) {
4344
+ var fs$writeFile = fs$7.writeFile;
4345
+ fs$7.writeFile = writeFile;
4346
+ function writeFile(path$11, data, options, cb) {
4330
4347
  if (typeof options === "function") cb = options, options = null;
4331
- return go$writeFile(path$10, data, options, cb);
4332
- function go$writeFile(path$11, data$1, options$1, cb$1, startTime) {
4333
- return fs$writeFile(path$11, data$1, options$1, function(err) {
4348
+ return go$writeFile(path$11, data, options, cb);
4349
+ function go$writeFile(path$12, data$1, options$1, cb$1, startTime) {
4350
+ return fs$writeFile(path$12, data$1, options$1, function(err) {
4334
4351
  if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
4335
4352
  go$writeFile,
4336
4353
  [
4337
- path$11,
4354
+ path$12,
4338
4355
  data$1,
4339
4356
  options$1,
4340
4357
  cb$1
@@ -4347,17 +4364,17 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4347
4364
  });
4348
4365
  }
4349
4366
  }
4350
- var fs$appendFile = fs$6.appendFile;
4351
- if (fs$appendFile) fs$6.appendFile = appendFile;
4352
- function appendFile(path$10, data, options, cb) {
4367
+ var fs$appendFile = fs$7.appendFile;
4368
+ if (fs$appendFile) fs$7.appendFile = appendFile;
4369
+ function appendFile(path$11, data, options, cb) {
4353
4370
  if (typeof options === "function") cb = options, options = null;
4354
- return go$appendFile(path$10, data, options, cb);
4355
- function go$appendFile(path$11, data$1, options$1, cb$1, startTime) {
4356
- return fs$appendFile(path$11, data$1, options$1, function(err) {
4371
+ return go$appendFile(path$11, data, options, cb);
4372
+ function go$appendFile(path$12, data$1, options$1, cb$1, startTime) {
4373
+ return fs$appendFile(path$12, data$1, options$1, function(err) {
4357
4374
  if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
4358
4375
  go$appendFile,
4359
4376
  [
4360
- path$11,
4377
+ path$12,
4361
4378
  data$1,
4362
4379
  options$1,
4363
4380
  cb$1
@@ -4370,8 +4387,8 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4370
4387
  });
4371
4388
  }
4372
4389
  }
4373
- var fs$copyFile = fs$6.copyFile;
4374
- if (fs$copyFile) fs$6.copyFile = copyFile;
4390
+ var fs$copyFile = fs$7.copyFile;
4391
+ if (fs$copyFile) fs$7.copyFile = copyFile;
4375
4392
  function copyFile(src, dest, flags, cb) {
4376
4393
  if (typeof flags === "function") {
4377
4394
  cb = flags;
@@ -4396,23 +4413,23 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4396
4413
  });
4397
4414
  }
4398
4415
  }
4399
- var fs$readdir = fs$6.readdir;
4400
- fs$6.readdir = readdir;
4416
+ var fs$readdir = fs$7.readdir;
4417
+ fs$7.readdir = readdir;
4401
4418
  var noReaddirOptionVersions = /^v[0-5]\./;
4402
- function readdir(path$10, options, cb) {
4419
+ function readdir(path$11, options, cb) {
4403
4420
  if (typeof options === "function") cb = options, options = null;
4404
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir$1(path$11, options$1, cb$1, startTime) {
4405
- return fs$readdir(path$11, fs$readdirCallback(path$11, options$1, cb$1, startTime));
4406
- } : function go$readdir$1(path$11, options$1, cb$1, startTime) {
4407
- return fs$readdir(path$11, options$1, fs$readdirCallback(path$11, options$1, cb$1, startTime));
4421
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir$1(path$12, options$1, cb$1, startTime) {
4422
+ return fs$readdir(path$12, fs$readdirCallback(path$12, options$1, cb$1, startTime));
4423
+ } : function go$readdir$1(path$12, options$1, cb$1, startTime) {
4424
+ return fs$readdir(path$12, options$1, fs$readdirCallback(path$12, options$1, cb$1, startTime));
4408
4425
  };
4409
- return go$readdir(path$10, options, cb);
4410
- function fs$readdirCallback(path$11, options$1, cb$1, startTime) {
4426
+ return go$readdir(path$11, options, cb);
4427
+ function fs$readdirCallback(path$12, options$1, cb$1, startTime) {
4411
4428
  return function(err, files) {
4412
4429
  if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
4413
4430
  go$readdir,
4414
4431
  [
4415
- path$11,
4432
+ path$12,
4416
4433
  options$1,
4417
4434
  cb$1
4418
4435
  ],
@@ -4428,21 +4445,21 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4428
4445
  }
4429
4446
  }
4430
4447
  if (process.version.substr(0, 4) === "v0.8") {
4431
- var legStreams = legacy(fs$6);
4448
+ var legStreams = legacy(fs$7);
4432
4449
  ReadStream = legStreams.ReadStream;
4433
4450
  WriteStream = legStreams.WriteStream;
4434
4451
  }
4435
- var fs$ReadStream = fs$6.ReadStream;
4452
+ var fs$ReadStream = fs$7.ReadStream;
4436
4453
  if (fs$ReadStream) {
4437
4454
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
4438
4455
  ReadStream.prototype.open = ReadStream$open;
4439
4456
  }
4440
- var fs$WriteStream = fs$6.WriteStream;
4457
+ var fs$WriteStream = fs$7.WriteStream;
4441
4458
  if (fs$WriteStream) {
4442
4459
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
4443
4460
  WriteStream.prototype.open = WriteStream$open;
4444
4461
  }
4445
- Object.defineProperty(fs$6, "ReadStream", {
4462
+ Object.defineProperty(fs$7, "ReadStream", {
4446
4463
  get: function() {
4447
4464
  return ReadStream;
4448
4465
  },
@@ -4452,7 +4469,7 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4452
4469
  enumerable: true,
4453
4470
  configurable: true
4454
4471
  });
4455
- Object.defineProperty(fs$6, "WriteStream", {
4472
+ Object.defineProperty(fs$7, "WriteStream", {
4456
4473
  get: function() {
4457
4474
  return WriteStream;
4458
4475
  },
@@ -4463,7 +4480,7 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4463
4480
  configurable: true
4464
4481
  });
4465
4482
  var FileReadStream = ReadStream;
4466
- Object.defineProperty(fs$6, "FileReadStream", {
4483
+ Object.defineProperty(fs$7, "FileReadStream", {
4467
4484
  get: function() {
4468
4485
  return FileReadStream;
4469
4486
  },
@@ -4474,7 +4491,7 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4474
4491
  configurable: true
4475
4492
  });
4476
4493
  var FileWriteStream = WriteStream;
4477
- Object.defineProperty(fs$6, "FileWriteStream", {
4494
+ Object.defineProperty(fs$7, "FileWriteStream", {
4478
4495
  get: function() {
4479
4496
  return FileWriteStream;
4480
4497
  },
@@ -4484,7 +4501,7 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4484
4501
  enumerable: true,
4485
4502
  configurable: true
4486
4503
  });
4487
- function ReadStream(path$10, options) {
4504
+ function ReadStream(path$11, options) {
4488
4505
  if (this instanceof ReadStream) return fs$ReadStream.apply(this, arguments), this;
4489
4506
  else return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
4490
4507
  }
@@ -4501,7 +4518,7 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4501
4518
  }
4502
4519
  });
4503
4520
  }
4504
- function WriteStream(path$10, options) {
4521
+ function WriteStream(path$11, options) {
4505
4522
  if (this instanceof WriteStream) return fs$WriteStream.apply(this, arguments), this;
4506
4523
  else return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
4507
4524
  }
@@ -4517,23 +4534,23 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4517
4534
  }
4518
4535
  });
4519
4536
  }
4520
- function createReadStream(path$10, options) {
4521
- return new fs$6.ReadStream(path$10, options);
4537
+ function createReadStream(path$11, options) {
4538
+ return new fs$7.ReadStream(path$11, options);
4522
4539
  }
4523
- function createWriteStream(path$10, options) {
4524
- return new fs$6.WriteStream(path$10, options);
4540
+ function createWriteStream(path$11, options) {
4541
+ return new fs$7.WriteStream(path$11, options);
4525
4542
  }
4526
- var fs$open = fs$6.open;
4527
- fs$6.open = open;
4528
- function open(path$10, flags, mode, cb) {
4543
+ var fs$open = fs$7.open;
4544
+ fs$7.open = open;
4545
+ function open(path$11, flags, mode, cb) {
4529
4546
  if (typeof mode === "function") cb = mode, mode = null;
4530
- return go$open(path$10, flags, mode, cb);
4531
- function go$open(path$11, flags$1, mode$1, cb$1, startTime) {
4532
- return fs$open(path$11, flags$1, mode$1, function(err, fd) {
4547
+ return go$open(path$11, flags, mode, cb);
4548
+ function go$open(path$12, flags$1, mode$1, cb$1, startTime) {
4549
+ return fs$open(path$12, flags$1, mode$1, function(err, fd) {
4533
4550
  if (err && (err.code === "EMFILE" || err.code === "ENFILE")) enqueue([
4534
4551
  go$open,
4535
4552
  [
4536
- path$11,
4553
+ path$12,
4537
4554
  flags$1,
4538
4555
  mode$1,
4539
4556
  cb$1
@@ -4546,27 +4563,27 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4546
4563
  });
4547
4564
  }
4548
4565
  }
4549
- return fs$6;
4566
+ return fs$7;
4550
4567
  }
4551
4568
  function enqueue(elem) {
4552
4569
  debug("ENQUEUE", elem[0].name, elem[1]);
4553
- fs$3[gracefulQueue].push(elem);
4570
+ fs$4[gracefulQueue].push(elem);
4554
4571
  retry();
4555
4572
  }
4556
4573
  var retryTimer;
4557
4574
  function resetQueue() {
4558
4575
  var now = Date.now();
4559
- for (var i$1 = 0; i$1 < fs$3[gracefulQueue].length; ++i$1) if (fs$3[gracefulQueue][i$1].length > 2) {
4560
- fs$3[gracefulQueue][i$1][3] = now;
4561
- fs$3[gracefulQueue][i$1][4] = now;
4576
+ for (var i$1 = 0; i$1 < fs$4[gracefulQueue].length; ++i$1) if (fs$4[gracefulQueue][i$1].length > 2) {
4577
+ fs$4[gracefulQueue][i$1][3] = now;
4578
+ fs$4[gracefulQueue][i$1][4] = now;
4562
4579
  }
4563
4580
  retry();
4564
4581
  }
4565
4582
  function retry() {
4566
4583
  clearTimeout(retryTimer);
4567
4584
  retryTimer = void 0;
4568
- if (fs$3[gracefulQueue].length === 0) return;
4569
- var elem = fs$3[gracefulQueue].shift();
4585
+ if (fs$4[gracefulQueue].length === 0) return;
4586
+ var elem = fs$4[gracefulQueue].shift();
4570
4587
  var fn = elem[0];
4571
4588
  var args = elem[1];
4572
4589
  var err = elem[2];
@@ -4586,7 +4603,7 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4586
4603
  if (sinceAttempt >= desiredDelay) {
4587
4604
  debug("RETRY", fn.name, args);
4588
4605
  fn.apply(null, args.concat([startTime]));
4589
- } else fs$3[gracefulQueue].push(elem);
4606
+ } else fs$4[gracefulQueue].push(elem);
4590
4607
  }
4591
4608
  if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
4592
4609
  }
@@ -4597,20 +4614,20 @@ var require_graceful_fs = /* @__PURE__ */ require_chunk.__commonJS({ "../../node
4597
4614
  var require_pify = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/pify@4.0.1/node_modules/pify/index.js": ((exports, module) => {
4598
4615
  const processFn = (fn, options) => function(...args) {
4599
4616
  const P = options.promiseModule;
4600
- return new P((resolve, reject) => {
4617
+ return new P((resolve$1, reject) => {
4601
4618
  if (options.multiArgs) args.push((...result) => {
4602
4619
  if (options.errorFirst) if (result[0]) reject(result);
4603
4620
  else {
4604
4621
  result.shift();
4605
- resolve(result);
4622
+ resolve$1(result);
4606
4623
  }
4607
- else resolve(result);
4624
+ else resolve$1(result);
4608
4625
  });
4609
4626
  else if (options.errorFirst) args.push((error, result) => {
4610
4627
  if (error) reject(error);
4611
- else resolve(result);
4628
+ else resolve$1(result);
4612
4629
  });
4613
- else args.push(resolve);
4630
+ else args.push(resolve$1);
4614
4631
  fn.apply(this, args);
4615
4632
  });
4616
4633
  };
@@ -12207,32 +12224,32 @@ var require_js_yaml = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mod
12207
12224
  //#endregion
12208
12225
  //#region ../../node_modules/.pnpm/load-yaml-file@0.2.0/node_modules/load-yaml-file/index.js
12209
12226
  var require_load_yaml_file = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/load-yaml-file@0.2.0/node_modules/load-yaml-file/index.js": ((exports, module) => {
12210
- const fs$2 = require_graceful_fs();
12227
+ const fs$3 = require_graceful_fs();
12211
12228
  const pify = require_pify();
12212
12229
  const stripBom = require_strip_bom();
12213
12230
  const yaml = require_js_yaml();
12214
12231
  const parse = (data) => yaml.safeLoad(stripBom(data));
12215
- module.exports = (fp) => pify(fs$2.readFile)(fp, "utf8").then((data) => parse(data));
12216
- module.exports.sync = (fp) => parse(fs$2.readFileSync(fp, "utf8"));
12232
+ module.exports = (fp) => pify(fs$3.readFile)(fp, "utf8").then((data) => parse(data));
12233
+ module.exports.sync = (fp) => parse(fs$3.readFileSync(fp, "utf8"));
12217
12234
  }) });
12218
12235
 
12219
12236
  //#endregion
12220
12237
  //#region ../../node_modules/.pnpm/which-pm@3.0.1/node_modules/which-pm/index.js
12221
12238
  var require_which_pm = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/which-pm@3.0.1/node_modules/which-pm/index.js": ((exports, module) => {
12222
- const path$3 = require("path");
12223
- const fs$1 = require("fs");
12239
+ const path$4 = require("path");
12240
+ const fs$2 = require("fs");
12224
12241
  const loadYamlFile = require_load_yaml_file();
12225
12242
  module.exports = async function(pkgPath) {
12226
- const modulesPath = path$3.join(pkgPath, "node_modules");
12227
- if (fs$1.existsSync(path$3.join(modulesPath, ".yarn-integrity"))) return { name: "yarn" };
12243
+ const modulesPath = path$4.join(pkgPath, "node_modules");
12244
+ if (fs$2.existsSync(path$4.join(modulesPath, ".yarn-integrity"))) return { name: "yarn" };
12228
12245
  try {
12229
- const modules = await loadYamlFile(path$3.join(modulesPath, ".modules.yaml"));
12246
+ const modules = await loadYamlFile(path$4.join(modulesPath, ".modules.yaml"));
12230
12247
  return toNameAndVersion(modules.packageManager);
12231
12248
  } catch (err) {
12232
12249
  if (err.code !== "ENOENT") throw err;
12233
12250
  }
12234
- if (fs$1.existsSync(path$3.join(pkgPath, "bun.lockb"))) return { name: "bun" };
12235
- return fs$1.existsSync(modulesPath) ? { name: "npm" } : null;
12251
+ if (fs$2.existsSync(path$4.join(pkgPath, "bun.lockb"))) return { name: "bun" };
12252
+ return fs$2.existsSync(modulesPath) ? { name: "npm" } : null;
12236
12253
  };
12237
12254
  function toNameAndVersion(pkgSpec) {
12238
12255
  if (pkgSpec[0] === "@") {
@@ -12254,28 +12271,28 @@ var require_which_pm = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_mo
12254
12271
  //#region ../../node_modules/.pnpm/preferred-pm@4.1.1/node_modules/preferred-pm/index.js
12255
12272
  var require_preferred_pm = /* @__PURE__ */ require_chunk.__commonJS({ "../../node_modules/.pnpm/preferred-pm@4.1.1/node_modules/preferred-pm/index.js": ((exports, module) => {
12256
12273
  const findYarnWorkspaceRoot = require_find_yarn_workspace_root2();
12257
- const fs = require("fs");
12258
- const path$2 = require("path");
12274
+ const fs$1 = require("fs");
12275
+ const path$3 = require("path");
12259
12276
  const whichPM = require_which_pm();
12260
12277
  module.exports = async function preferredPM$1(pkgPath) {
12261
12278
  if (typeof pkgPath !== "string") throw new TypeError(`pkgPath should be a string, got ${typeof pkgPath}`);
12262
- if (fs.existsSync(path$2.join(pkgPath, "package-lock.json"))) return {
12279
+ if (fs$1.existsSync(path$3.join(pkgPath, "package-lock.json"))) return {
12263
12280
  name: "npm",
12264
12281
  version: ">=5"
12265
12282
  };
12266
- if (fs.existsSync(path$2.join(pkgPath, "yarn.lock"))) return {
12283
+ if (fs$1.existsSync(path$3.join(pkgPath, "yarn.lock"))) return {
12267
12284
  name: "yarn",
12268
12285
  version: "*"
12269
12286
  };
12270
- if (fs.existsSync(path$2.join(pkgPath, "pnpm-lock.yaml"))) return {
12287
+ if (fs$1.existsSync(path$3.join(pkgPath, "pnpm-lock.yaml"))) return {
12271
12288
  name: "pnpm",
12272
12289
  version: ">=3"
12273
12290
  };
12274
- if (fs.existsSync(path$2.join(pkgPath, "shrinkwrap.yaml"))) return {
12291
+ if (fs$1.existsSync(path$3.join(pkgPath, "shrinkwrap.yaml"))) return {
12275
12292
  name: "pnpm",
12276
12293
  version: "1 || 2"
12277
12294
  };
12278
- if (fs.existsSync(path$2.join(pkgPath, "bun.lockb")) || fs.existsSync(path$2.join(pkgPath, "bun.lock"))) return {
12295
+ if (fs$1.existsSync(path$3.join(pkgPath, "bun.lockb")) || fs$1.existsSync(path$3.join(pkgPath, "bun.lock"))) return {
12279
12296
  name: "bun",
12280
12297
  version: "*"
12281
12298
  };
@@ -12287,7 +12304,7 @@ var require_preferred_pm = /* @__PURE__ */ require_chunk.__commonJS({ "../../nod
12287
12304
  try {
12288
12305
  const workspaceRoot = findYarnWorkspaceRoot(pkgPath);
12289
12306
  if (typeof workspaceRoot === "string") {
12290
- if (fs.existsSync(path$2.join(workspaceRoot, "package-lock.json"))) return {
12307
+ if (fs$1.existsSync(path$3.join(workspaceRoot, "package-lock.json"))) return {
12291
12308
  name: "npm",
12292
12309
  version: ">=7"
12293
12310
  };
@@ -12308,6 +12325,49 @@ var require_preferred_pm = /* @__PURE__ */ require_chunk.__commonJS({ "../../nod
12308
12325
  //#endregion
12309
12326
  //#region ../shared/dist/index.js
12310
12327
  var import_preferred_pm = /* @__PURE__ */ require_chunk.__toESM(require_preferred_pm(), 1);
12328
+ var FileSystem = class {
12329
+ static findModulePkg(moduleId, cwd$1) {
12330
+ const parts = moduleId.replace(/\\/g, "/").split("/");
12331
+ let packageName = "";
12332
+ if (parts.length > 0 && parts[0][0] === "@") packageName += parts.shift() + "/";
12333
+ packageName += parts.shift();
12334
+ const packageJson = path.default.join(cwd$1 ?? process.cwd(), "node_modules", packageName);
12335
+ const resolved = this.findUpConfig(packageJson, "package", ["json"]);
12336
+ if (!resolved) return;
12337
+ return path.default.join(path.default.dirname(resolved), parts.join("/"));
12338
+ }
12339
+ /**
12340
+ * Check if file exists
12341
+ *
12342
+ * @param path
12343
+ * @returns
12344
+ */
12345
+ static async fileExists(path$1$1) {
12346
+ try {
12347
+ await (0, fs_promises.access)(path$1$1);
12348
+ return true;
12349
+ } catch {
12350
+ return false;
12351
+ }
12352
+ }
12353
+ /**
12354
+ * Recursively find files
12355
+ *
12356
+ * @param cwd
12357
+ * @param name
12358
+ * @param extensions
12359
+ * @returns
12360
+ */
12361
+ static findUpConfig(cwd$1, name, extensions) {
12362
+ return sync_default(cwd$1, (_dir, names) => {
12363
+ for (const ext of extensions) {
12364
+ const filename = `${name}.${ext}`;
12365
+ if (names.includes(filename)) return filename;
12366
+ }
12367
+ return false;
12368
+ });
12369
+ }
12370
+ };
12311
12371
  var Logger = class Logger$1 {
12312
12372
  static twoColumnLog(name, value, log = true, spacer = ".") {
12313
12373
  const regex = /\x1b\[\d+m/g;
@@ -12585,7 +12645,7 @@ var MigrateCommand = class extends __h3ravel_core.ConsoleCommand {
12585
12645
  const name = this.argument("package");
12586
12646
  try {
12587
12647
  /** Find the requested package */
12588
- const packagePath = __h3ravel_filesystem.Helpers.findModulePkg(name) ?? null;
12648
+ const packagePath = FileSystem.findModulePkg(name) ?? null;
12589
12649
  if (!packagePath) throw new Error("Package not found");
12590
12650
  /** Get the package,json and instanciate the migration creator */
12591
12651
  const pkgJson = await import(node_path.default.join(packagePath, "package.json"));