xtrm-tools 2.1.3 → 2.1.5

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.
@@ -1202,8 +1202,8 @@ var require_command = __commonJS({
1202
1202
  "use strict";
1203
1203
  var EventEmitter2 = require("events").EventEmitter;
1204
1204
  var childProcess = require("child_process");
1205
- var path15 = require("path");
1206
- var fs16 = require("fs");
1205
+ var path16 = require("path");
1206
+ var fs17 = require("fs");
1207
1207
  var process19 = require("process");
1208
1208
  var { Argument: Argument2, humanReadableArgName } = require_argument();
1209
1209
  var { CommanderError: CommanderError2 } = require_error();
@@ -2197,7 +2197,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2197
2197
  * @param {string} subcommandName
2198
2198
  */
2199
2199
  _checkForMissingExecutable(executableFile, executableDir, subcommandName) {
2200
- if (fs16.existsSync(executableFile)) return;
2200
+ if (fs17.existsSync(executableFile)) return;
2201
2201
  const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
2202
2202
  const executableMissing = `'${executableFile}' does not exist
2203
2203
  - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
@@ -2215,11 +2215,11 @@ Expecting one of '${allowedValues.join("', '")}'`);
2215
2215
  let launchWithNode = false;
2216
2216
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
2217
2217
  function findFile(baseDir, baseName) {
2218
- const localBin = path15.resolve(baseDir, baseName);
2219
- if (fs16.existsSync(localBin)) return localBin;
2220
- if (sourceExt.includes(path15.extname(baseName))) return void 0;
2218
+ const localBin = path16.resolve(baseDir, baseName);
2219
+ if (fs17.existsSync(localBin)) return localBin;
2220
+ if (sourceExt.includes(path16.extname(baseName))) return void 0;
2221
2221
  const foundExt = sourceExt.find(
2222
- (ext) => fs16.existsSync(`${localBin}${ext}`)
2222
+ (ext) => fs17.existsSync(`${localBin}${ext}`)
2223
2223
  );
2224
2224
  if (foundExt) return `${localBin}${foundExt}`;
2225
2225
  return void 0;
@@ -2231,21 +2231,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
2231
2231
  if (this._scriptPath) {
2232
2232
  let resolvedScriptPath;
2233
2233
  try {
2234
- resolvedScriptPath = fs16.realpathSync(this._scriptPath);
2234
+ resolvedScriptPath = fs17.realpathSync(this._scriptPath);
2235
2235
  } catch {
2236
2236
  resolvedScriptPath = this._scriptPath;
2237
2237
  }
2238
- executableDir = path15.resolve(
2239
- path15.dirname(resolvedScriptPath),
2238
+ executableDir = path16.resolve(
2239
+ path16.dirname(resolvedScriptPath),
2240
2240
  executableDir
2241
2241
  );
2242
2242
  }
2243
2243
  if (executableDir) {
2244
2244
  let localFile = findFile(executableDir, executableFile);
2245
2245
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
2246
- const legacyName = path15.basename(
2246
+ const legacyName = path16.basename(
2247
2247
  this._scriptPath,
2248
- path15.extname(this._scriptPath)
2248
+ path16.extname(this._scriptPath)
2249
2249
  );
2250
2250
  if (legacyName !== this._name) {
2251
2251
  localFile = findFile(
@@ -2256,7 +2256,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2256
2256
  }
2257
2257
  executableFile = localFile || executableFile;
2258
2258
  }
2259
- launchWithNode = sourceExt.includes(path15.extname(executableFile));
2259
+ launchWithNode = sourceExt.includes(path16.extname(executableFile));
2260
2260
  let proc;
2261
2261
  if (process19.platform !== "win32") {
2262
2262
  if (launchWithNode) {
@@ -3171,7 +3171,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
3171
3171
  * @return {Command}
3172
3172
  */
3173
3173
  nameFromFilename(filename) {
3174
- this._name = path15.basename(filename, path15.extname(filename));
3174
+ this._name = path16.basename(filename, path16.extname(filename));
3175
3175
  return this;
3176
3176
  }
3177
3177
  /**
@@ -3185,9 +3185,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
3185
3185
  * @param {string} [path]
3186
3186
  * @return {(string|null|Command)}
3187
3187
  */
3188
- executableDir(path16) {
3189
- if (path16 === void 0) return this._executableDir;
3190
- this._executableDir = path16;
3188
+ executableDir(path17) {
3189
+ if (path17 === void 0) return this._executableDir;
3190
+ this._executableDir = path17;
3191
3191
  return this;
3192
3192
  }
3193
3193
  /**
@@ -11556,54 +11556,54 @@ var require_polyfills = __commonJS({
11556
11556
  }
11557
11557
  var chdir;
11558
11558
  module2.exports = patch;
11559
- function patch(fs16) {
11559
+ function patch(fs17) {
11560
11560
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
11561
- patchLchmod(fs16);
11562
- }
11563
- if (!fs16.lutimes) {
11564
- patchLutimes(fs16);
11565
- }
11566
- fs16.chown = chownFix(fs16.chown);
11567
- fs16.fchown = chownFix(fs16.fchown);
11568
- fs16.lchown = chownFix(fs16.lchown);
11569
- fs16.chmod = chmodFix(fs16.chmod);
11570
- fs16.fchmod = chmodFix(fs16.fchmod);
11571
- fs16.lchmod = chmodFix(fs16.lchmod);
11572
- fs16.chownSync = chownFixSync(fs16.chownSync);
11573
- fs16.fchownSync = chownFixSync(fs16.fchownSync);
11574
- fs16.lchownSync = chownFixSync(fs16.lchownSync);
11575
- fs16.chmodSync = chmodFixSync(fs16.chmodSync);
11576
- fs16.fchmodSync = chmodFixSync(fs16.fchmodSync);
11577
- fs16.lchmodSync = chmodFixSync(fs16.lchmodSync);
11578
- fs16.stat = statFix(fs16.stat);
11579
- fs16.fstat = statFix(fs16.fstat);
11580
- fs16.lstat = statFix(fs16.lstat);
11581
- fs16.statSync = statFixSync(fs16.statSync);
11582
- fs16.fstatSync = statFixSync(fs16.fstatSync);
11583
- fs16.lstatSync = statFixSync(fs16.lstatSync);
11584
- if (fs16.chmod && !fs16.lchmod) {
11585
- fs16.lchmod = function(path15, mode, cb) {
11561
+ patchLchmod(fs17);
11562
+ }
11563
+ if (!fs17.lutimes) {
11564
+ patchLutimes(fs17);
11565
+ }
11566
+ fs17.chown = chownFix(fs17.chown);
11567
+ fs17.fchown = chownFix(fs17.fchown);
11568
+ fs17.lchown = chownFix(fs17.lchown);
11569
+ fs17.chmod = chmodFix(fs17.chmod);
11570
+ fs17.fchmod = chmodFix(fs17.fchmod);
11571
+ fs17.lchmod = chmodFix(fs17.lchmod);
11572
+ fs17.chownSync = chownFixSync(fs17.chownSync);
11573
+ fs17.fchownSync = chownFixSync(fs17.fchownSync);
11574
+ fs17.lchownSync = chownFixSync(fs17.lchownSync);
11575
+ fs17.chmodSync = chmodFixSync(fs17.chmodSync);
11576
+ fs17.fchmodSync = chmodFixSync(fs17.fchmodSync);
11577
+ fs17.lchmodSync = chmodFixSync(fs17.lchmodSync);
11578
+ fs17.stat = statFix(fs17.stat);
11579
+ fs17.fstat = statFix(fs17.fstat);
11580
+ fs17.lstat = statFix(fs17.lstat);
11581
+ fs17.statSync = statFixSync(fs17.statSync);
11582
+ fs17.fstatSync = statFixSync(fs17.fstatSync);
11583
+ fs17.lstatSync = statFixSync(fs17.lstatSync);
11584
+ if (fs17.chmod && !fs17.lchmod) {
11585
+ fs17.lchmod = function(path16, mode, cb) {
11586
11586
  if (cb) process.nextTick(cb);
11587
11587
  };
11588
- fs16.lchmodSync = function() {
11588
+ fs17.lchmodSync = function() {
11589
11589
  };
11590
11590
  }
11591
- if (fs16.chown && !fs16.lchown) {
11592
- fs16.lchown = function(path15, uid, gid, cb) {
11591
+ if (fs17.chown && !fs17.lchown) {
11592
+ fs17.lchown = function(path16, uid, gid, cb) {
11593
11593
  if (cb) process.nextTick(cb);
11594
11594
  };
11595
- fs16.lchownSync = function() {
11595
+ fs17.lchownSync = function() {
11596
11596
  };
11597
11597
  }
11598
11598
  if (platform2 === "win32") {
11599
- fs16.rename = typeof fs16.rename !== "function" ? fs16.rename : (function(fs$rename) {
11599
+ fs17.rename = typeof fs17.rename !== "function" ? fs17.rename : (function(fs$rename) {
11600
11600
  function rename(from, to, cb) {
11601
11601
  var start = Date.now();
11602
11602
  var backoff = 0;
11603
11603
  fs$rename(from, to, function CB(er) {
11604
11604
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
11605
11605
  setTimeout(function() {
11606
- fs16.stat(to, function(stater, st) {
11606
+ fs17.stat(to, function(stater, st) {
11607
11607
  if (stater && stater.code === "ENOENT")
11608
11608
  fs$rename(from, to, CB);
11609
11609
  else
@@ -11619,9 +11619,9 @@ var require_polyfills = __commonJS({
11619
11619
  }
11620
11620
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
11621
11621
  return rename;
11622
- })(fs16.rename);
11622
+ })(fs17.rename);
11623
11623
  }
11624
- fs16.read = typeof fs16.read !== "function" ? fs16.read : (function(fs$read) {
11624
+ fs17.read = typeof fs17.read !== "function" ? fs17.read : (function(fs$read) {
11625
11625
  function read(fd, buffer, offset, length, position, callback_) {
11626
11626
  var callback;
11627
11627
  if (callback_ && typeof callback_ === "function") {
@@ -11629,22 +11629,22 @@ var require_polyfills = __commonJS({
11629
11629
  callback = function(er, _, __) {
11630
11630
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
11631
11631
  eagCounter++;
11632
- return fs$read.call(fs16, fd, buffer, offset, length, position, callback);
11632
+ return fs$read.call(fs17, fd, buffer, offset, length, position, callback);
11633
11633
  }
11634
11634
  callback_.apply(this, arguments);
11635
11635
  };
11636
11636
  }
11637
- return fs$read.call(fs16, fd, buffer, offset, length, position, callback);
11637
+ return fs$read.call(fs17, fd, buffer, offset, length, position, callback);
11638
11638
  }
11639
11639
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
11640
11640
  return read;
11641
- })(fs16.read);
11642
- fs16.readSync = typeof fs16.readSync !== "function" ? fs16.readSync : /* @__PURE__ */ (function(fs$readSync) {
11641
+ })(fs17.read);
11642
+ fs17.readSync = typeof fs17.readSync !== "function" ? fs17.readSync : /* @__PURE__ */ (function(fs$readSync) {
11643
11643
  return function(fd, buffer, offset, length, position) {
11644
11644
  var eagCounter = 0;
11645
11645
  while (true) {
11646
11646
  try {
11647
- return fs$readSync.call(fs16, fd, buffer, offset, length, position);
11647
+ return fs$readSync.call(fs17, fd, buffer, offset, length, position);
11648
11648
  } catch (er) {
11649
11649
  if (er.code === "EAGAIN" && eagCounter < 10) {
11650
11650
  eagCounter++;
@@ -11654,11 +11654,11 @@ var require_polyfills = __commonJS({
11654
11654
  }
11655
11655
  }
11656
11656
  };
11657
- })(fs16.readSync);
11658
- function patchLchmod(fs17) {
11659
- fs17.lchmod = function(path15, mode, callback) {
11660
- fs17.open(
11661
- path15,
11657
+ })(fs17.readSync);
11658
+ function patchLchmod(fs18) {
11659
+ fs18.lchmod = function(path16, mode, callback) {
11660
+ fs18.open(
11661
+ path16,
11662
11662
  constants.O_WRONLY | constants.O_SYMLINK,
11663
11663
  mode,
11664
11664
  function(err, fd) {
@@ -11666,80 +11666,80 @@ var require_polyfills = __commonJS({
11666
11666
  if (callback) callback(err);
11667
11667
  return;
11668
11668
  }
11669
- fs17.fchmod(fd, mode, function(err2) {
11670
- fs17.close(fd, function(err22) {
11669
+ fs18.fchmod(fd, mode, function(err2) {
11670
+ fs18.close(fd, function(err22) {
11671
11671
  if (callback) callback(err2 || err22);
11672
11672
  });
11673
11673
  });
11674
11674
  }
11675
11675
  );
11676
11676
  };
11677
- fs17.lchmodSync = function(path15, mode) {
11678
- var fd = fs17.openSync(path15, constants.O_WRONLY | constants.O_SYMLINK, mode);
11677
+ fs18.lchmodSync = function(path16, mode) {
11678
+ var fd = fs18.openSync(path16, constants.O_WRONLY | constants.O_SYMLINK, mode);
11679
11679
  var threw = true;
11680
11680
  var ret;
11681
11681
  try {
11682
- ret = fs17.fchmodSync(fd, mode);
11682
+ ret = fs18.fchmodSync(fd, mode);
11683
11683
  threw = false;
11684
11684
  } finally {
11685
11685
  if (threw) {
11686
11686
  try {
11687
- fs17.closeSync(fd);
11687
+ fs18.closeSync(fd);
11688
11688
  } catch (er) {
11689
11689
  }
11690
11690
  } else {
11691
- fs17.closeSync(fd);
11691
+ fs18.closeSync(fd);
11692
11692
  }
11693
11693
  }
11694
11694
  return ret;
11695
11695
  };
11696
11696
  }
11697
- function patchLutimes(fs17) {
11698
- if (constants.hasOwnProperty("O_SYMLINK") && fs17.futimes) {
11699
- fs17.lutimes = function(path15, at, mt, cb) {
11700
- fs17.open(path15, constants.O_SYMLINK, function(er, fd) {
11697
+ function patchLutimes(fs18) {
11698
+ if (constants.hasOwnProperty("O_SYMLINK") && fs18.futimes) {
11699
+ fs18.lutimes = function(path16, at, mt, cb) {
11700
+ fs18.open(path16, constants.O_SYMLINK, function(er, fd) {
11701
11701
  if (er) {
11702
11702
  if (cb) cb(er);
11703
11703
  return;
11704
11704
  }
11705
- fs17.futimes(fd, at, mt, function(er2) {
11706
- fs17.close(fd, function(er22) {
11705
+ fs18.futimes(fd, at, mt, function(er2) {
11706
+ fs18.close(fd, function(er22) {
11707
11707
  if (cb) cb(er2 || er22);
11708
11708
  });
11709
11709
  });
11710
11710
  });
11711
11711
  };
11712
- fs17.lutimesSync = function(path15, at, mt) {
11713
- var fd = fs17.openSync(path15, constants.O_SYMLINK);
11712
+ fs18.lutimesSync = function(path16, at, mt) {
11713
+ var fd = fs18.openSync(path16, constants.O_SYMLINK);
11714
11714
  var ret;
11715
11715
  var threw = true;
11716
11716
  try {
11717
- ret = fs17.futimesSync(fd, at, mt);
11717
+ ret = fs18.futimesSync(fd, at, mt);
11718
11718
  threw = false;
11719
11719
  } finally {
11720
11720
  if (threw) {
11721
11721
  try {
11722
- fs17.closeSync(fd);
11722
+ fs18.closeSync(fd);
11723
11723
  } catch (er) {
11724
11724
  }
11725
11725
  } else {
11726
- fs17.closeSync(fd);
11726
+ fs18.closeSync(fd);
11727
11727
  }
11728
11728
  }
11729
11729
  return ret;
11730
11730
  };
11731
- } else if (fs17.futimes) {
11732
- fs17.lutimes = function(_a2, _b, _c, cb) {
11731
+ } else if (fs18.futimes) {
11732
+ fs18.lutimes = function(_a2, _b, _c, cb) {
11733
11733
  if (cb) process.nextTick(cb);
11734
11734
  };
11735
- fs17.lutimesSync = function() {
11735
+ fs18.lutimesSync = function() {
11736
11736
  };
11737
11737
  }
11738
11738
  }
11739
11739
  function chmodFix(orig) {
11740
11740
  if (!orig) return orig;
11741
11741
  return function(target, mode, cb) {
11742
- return orig.call(fs16, target, mode, function(er) {
11742
+ return orig.call(fs17, target, mode, function(er) {
11743
11743
  if (chownErOk(er)) er = null;
11744
11744
  if (cb) cb.apply(this, arguments);
11745
11745
  });
@@ -11749,7 +11749,7 @@ var require_polyfills = __commonJS({
11749
11749
  if (!orig) return orig;
11750
11750
  return function(target, mode) {
11751
11751
  try {
11752
- return orig.call(fs16, target, mode);
11752
+ return orig.call(fs17, target, mode);
11753
11753
  } catch (er) {
11754
11754
  if (!chownErOk(er)) throw er;
11755
11755
  }
@@ -11758,7 +11758,7 @@ var require_polyfills = __commonJS({
11758
11758
  function chownFix(orig) {
11759
11759
  if (!orig) return orig;
11760
11760
  return function(target, uid, gid, cb) {
11761
- return orig.call(fs16, target, uid, gid, function(er) {
11761
+ return orig.call(fs17, target, uid, gid, function(er) {
11762
11762
  if (chownErOk(er)) er = null;
11763
11763
  if (cb) cb.apply(this, arguments);
11764
11764
  });
@@ -11768,7 +11768,7 @@ var require_polyfills = __commonJS({
11768
11768
  if (!orig) return orig;
11769
11769
  return function(target, uid, gid) {
11770
11770
  try {
11771
- return orig.call(fs16, target, uid, gid);
11771
+ return orig.call(fs17, target, uid, gid);
11772
11772
  } catch (er) {
11773
11773
  if (!chownErOk(er)) throw er;
11774
11774
  }
@@ -11788,13 +11788,13 @@ var require_polyfills = __commonJS({
11788
11788
  }
11789
11789
  if (cb) cb.apply(this, arguments);
11790
11790
  }
11791
- return options ? orig.call(fs16, target, options, callback) : orig.call(fs16, target, callback);
11791
+ return options ? orig.call(fs17, target, options, callback) : orig.call(fs17, target, callback);
11792
11792
  };
11793
11793
  }
11794
11794
  function statFixSync(orig) {
11795
11795
  if (!orig) return orig;
11796
11796
  return function(target, options) {
11797
- var stats = options ? orig.call(fs16, target, options) : orig.call(fs16, target);
11797
+ var stats = options ? orig.call(fs17, target, options) : orig.call(fs17, target);
11798
11798
  if (stats) {
11799
11799
  if (stats.uid < 0) stats.uid += 4294967296;
11800
11800
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -11824,16 +11824,16 @@ var require_legacy_streams = __commonJS({
11824
11824
  "use strict";
11825
11825
  var Stream = require("stream").Stream;
11826
11826
  module2.exports = legacy;
11827
- function legacy(fs16) {
11827
+ function legacy(fs17) {
11828
11828
  return {
11829
11829
  ReadStream,
11830
11830
  WriteStream
11831
11831
  };
11832
- function ReadStream(path15, options) {
11833
- if (!(this instanceof ReadStream)) return new ReadStream(path15, options);
11832
+ function ReadStream(path16, options) {
11833
+ if (!(this instanceof ReadStream)) return new ReadStream(path16, options);
11834
11834
  Stream.call(this);
11835
11835
  var self = this;
11836
- this.path = path15;
11836
+ this.path = path16;
11837
11837
  this.fd = null;
11838
11838
  this.readable = true;
11839
11839
  this.paused = false;
@@ -11867,7 +11867,7 @@ var require_legacy_streams = __commonJS({
11867
11867
  });
11868
11868
  return;
11869
11869
  }
11870
- fs16.open(this.path, this.flags, this.mode, function(err, fd) {
11870
+ fs17.open(this.path, this.flags, this.mode, function(err, fd) {
11871
11871
  if (err) {
11872
11872
  self.emit("error", err);
11873
11873
  self.readable = false;
@@ -11878,10 +11878,10 @@ var require_legacy_streams = __commonJS({
11878
11878
  self._read();
11879
11879
  });
11880
11880
  }
11881
- function WriteStream(path15, options) {
11882
- if (!(this instanceof WriteStream)) return new WriteStream(path15, options);
11881
+ function WriteStream(path16, options) {
11882
+ if (!(this instanceof WriteStream)) return new WriteStream(path16, options);
11883
11883
  Stream.call(this);
11884
- this.path = path15;
11884
+ this.path = path16;
11885
11885
  this.fd = null;
11886
11886
  this.writable = true;
11887
11887
  this.flags = "w";
@@ -11906,7 +11906,7 @@ var require_legacy_streams = __commonJS({
11906
11906
  this.busy = false;
11907
11907
  this._queue = [];
11908
11908
  if (this.fd === null) {
11909
- this._open = fs16.open;
11909
+ this._open = fs17.open;
11910
11910
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
11911
11911
  this.flush();
11912
11912
  }
@@ -11942,7 +11942,7 @@ var require_clone = __commonJS({
11942
11942
  var require_graceful_fs = __commonJS({
11943
11943
  "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
11944
11944
  "use strict";
11945
- var fs16 = require("fs");
11945
+ var fs17 = require("fs");
11946
11946
  var polyfills = require_polyfills();
11947
11947
  var legacy = require_legacy_streams();
11948
11948
  var clone3 = require_clone();
@@ -11974,12 +11974,12 @@ var require_graceful_fs = __commonJS({
11974
11974
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
11975
11975
  console.error(m);
11976
11976
  };
11977
- if (!fs16[gracefulQueue]) {
11977
+ if (!fs17[gracefulQueue]) {
11978
11978
  queue = global[gracefulQueue] || [];
11979
- publishQueue(fs16, queue);
11980
- fs16.close = (function(fs$close) {
11979
+ publishQueue(fs17, queue);
11980
+ fs17.close = (function(fs$close) {
11981
11981
  function close(fd, cb) {
11982
- return fs$close.call(fs16, fd, function(err) {
11982
+ return fs$close.call(fs17, fd, function(err) {
11983
11983
  if (!err) {
11984
11984
  resetQueue();
11985
11985
  }
@@ -11991,48 +11991,48 @@ var require_graceful_fs = __commonJS({
11991
11991
  value: fs$close
11992
11992
  });
11993
11993
  return close;
11994
- })(fs16.close);
11995
- fs16.closeSync = (function(fs$closeSync) {
11994
+ })(fs17.close);
11995
+ fs17.closeSync = (function(fs$closeSync) {
11996
11996
  function closeSync(fd) {
11997
- fs$closeSync.apply(fs16, arguments);
11997
+ fs$closeSync.apply(fs17, arguments);
11998
11998
  resetQueue();
11999
11999
  }
12000
12000
  Object.defineProperty(closeSync, previousSymbol, {
12001
12001
  value: fs$closeSync
12002
12002
  });
12003
12003
  return closeSync;
12004
- })(fs16.closeSync);
12004
+ })(fs17.closeSync);
12005
12005
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
12006
12006
  process.on("exit", function() {
12007
- debug(fs16[gracefulQueue]);
12008
- require("assert").equal(fs16[gracefulQueue].length, 0);
12007
+ debug(fs17[gracefulQueue]);
12008
+ require("assert").equal(fs17[gracefulQueue].length, 0);
12009
12009
  });
12010
12010
  }
12011
12011
  }
12012
12012
  var queue;
12013
12013
  if (!global[gracefulQueue]) {
12014
- publishQueue(global, fs16[gracefulQueue]);
12015
- }
12016
- module2.exports = patch(clone3(fs16));
12017
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs16.__patched) {
12018
- module2.exports = patch(fs16);
12019
- fs16.__patched = true;
12020
- }
12021
- function patch(fs17) {
12022
- polyfills(fs17);
12023
- fs17.gracefulify = patch;
12024
- fs17.createReadStream = createReadStream;
12025
- fs17.createWriteStream = createWriteStream2;
12026
- var fs$readFile = fs17.readFile;
12027
- fs17.readFile = readFile;
12028
- function readFile(path15, options, cb) {
12014
+ publishQueue(global, fs17[gracefulQueue]);
12015
+ }
12016
+ module2.exports = patch(clone3(fs17));
12017
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs17.__patched) {
12018
+ module2.exports = patch(fs17);
12019
+ fs17.__patched = true;
12020
+ }
12021
+ function patch(fs18) {
12022
+ polyfills(fs18);
12023
+ fs18.gracefulify = patch;
12024
+ fs18.createReadStream = createReadStream;
12025
+ fs18.createWriteStream = createWriteStream2;
12026
+ var fs$readFile = fs18.readFile;
12027
+ fs18.readFile = readFile;
12028
+ function readFile(path16, options, cb) {
12029
12029
  if (typeof options === "function")
12030
12030
  cb = options, options = null;
12031
- return go$readFile(path15, options, cb);
12032
- function go$readFile(path16, options2, cb2, startTime) {
12033
- return fs$readFile(path16, options2, function(err) {
12031
+ return go$readFile(path16, options, cb);
12032
+ function go$readFile(path17, options2, cb2, startTime) {
12033
+ return fs$readFile(path17, options2, function(err) {
12034
12034
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
12035
- enqueue([go$readFile, [path16, options2, cb2], err, startTime || Date.now(), Date.now()]);
12035
+ enqueue([go$readFile, [path17, options2, cb2], err, startTime || Date.now(), Date.now()]);
12036
12036
  else {
12037
12037
  if (typeof cb2 === "function")
12038
12038
  cb2.apply(this, arguments);
@@ -12040,16 +12040,16 @@ var require_graceful_fs = __commonJS({
12040
12040
  });
12041
12041
  }
12042
12042
  }
12043
- var fs$writeFile = fs17.writeFile;
12044
- fs17.writeFile = writeFile;
12045
- function writeFile(path15, data, options, cb) {
12043
+ var fs$writeFile = fs18.writeFile;
12044
+ fs18.writeFile = writeFile;
12045
+ function writeFile(path16, data, options, cb) {
12046
12046
  if (typeof options === "function")
12047
12047
  cb = options, options = null;
12048
- return go$writeFile(path15, data, options, cb);
12049
- function go$writeFile(path16, data2, options2, cb2, startTime) {
12050
- return fs$writeFile(path16, data2, options2, function(err) {
12048
+ return go$writeFile(path16, data, options, cb);
12049
+ function go$writeFile(path17, data2, options2, cb2, startTime) {
12050
+ return fs$writeFile(path17, data2, options2, function(err) {
12051
12051
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
12052
- enqueue([go$writeFile, [path16, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
12052
+ enqueue([go$writeFile, [path17, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
12053
12053
  else {
12054
12054
  if (typeof cb2 === "function")
12055
12055
  cb2.apply(this, arguments);
@@ -12057,17 +12057,17 @@ var require_graceful_fs = __commonJS({
12057
12057
  });
12058
12058
  }
12059
12059
  }
12060
- var fs$appendFile = fs17.appendFile;
12060
+ var fs$appendFile = fs18.appendFile;
12061
12061
  if (fs$appendFile)
12062
- fs17.appendFile = appendFile;
12063
- function appendFile(path15, data, options, cb) {
12062
+ fs18.appendFile = appendFile;
12063
+ function appendFile(path16, data, options, cb) {
12064
12064
  if (typeof options === "function")
12065
12065
  cb = options, options = null;
12066
- return go$appendFile(path15, data, options, cb);
12067
- function go$appendFile(path16, data2, options2, cb2, startTime) {
12068
- return fs$appendFile(path16, data2, options2, function(err) {
12066
+ return go$appendFile(path16, data, options, cb);
12067
+ function go$appendFile(path17, data2, options2, cb2, startTime) {
12068
+ return fs$appendFile(path17, data2, options2, function(err) {
12069
12069
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
12070
- enqueue([go$appendFile, [path16, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
12070
+ enqueue([go$appendFile, [path17, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
12071
12071
  else {
12072
12072
  if (typeof cb2 === "function")
12073
12073
  cb2.apply(this, arguments);
@@ -12075,9 +12075,9 @@ var require_graceful_fs = __commonJS({
12075
12075
  });
12076
12076
  }
12077
12077
  }
12078
- var fs$copyFile = fs17.copyFile;
12078
+ var fs$copyFile = fs18.copyFile;
12079
12079
  if (fs$copyFile)
12080
- fs17.copyFile = copyFile;
12080
+ fs18.copyFile = copyFile;
12081
12081
  function copyFile(src, dest, flags, cb) {
12082
12082
  if (typeof flags === "function") {
12083
12083
  cb = flags;
@@ -12095,34 +12095,34 @@ var require_graceful_fs = __commonJS({
12095
12095
  });
12096
12096
  }
12097
12097
  }
12098
- var fs$readdir = fs17.readdir;
12099
- fs17.readdir = readdir;
12098
+ var fs$readdir = fs18.readdir;
12099
+ fs18.readdir = readdir;
12100
12100
  var noReaddirOptionVersions = /^v[0-5]\./;
12101
- function readdir(path15, options, cb) {
12101
+ function readdir(path16, options, cb) {
12102
12102
  if (typeof options === "function")
12103
12103
  cb = options, options = null;
12104
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path16, options2, cb2, startTime) {
12105
- return fs$readdir(path16, fs$readdirCallback(
12106
- path16,
12104
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path17, options2, cb2, startTime) {
12105
+ return fs$readdir(path17, fs$readdirCallback(
12106
+ path17,
12107
12107
  options2,
12108
12108
  cb2,
12109
12109
  startTime
12110
12110
  ));
12111
- } : function go$readdir2(path16, options2, cb2, startTime) {
12112
- return fs$readdir(path16, options2, fs$readdirCallback(
12113
- path16,
12111
+ } : function go$readdir2(path17, options2, cb2, startTime) {
12112
+ return fs$readdir(path17, options2, fs$readdirCallback(
12113
+ path17,
12114
12114
  options2,
12115
12115
  cb2,
12116
12116
  startTime
12117
12117
  ));
12118
12118
  };
12119
- return go$readdir(path15, options, cb);
12120
- function fs$readdirCallback(path16, options2, cb2, startTime) {
12119
+ return go$readdir(path16, options, cb);
12120
+ function fs$readdirCallback(path17, options2, cb2, startTime) {
12121
12121
  return function(err, files) {
12122
12122
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
12123
12123
  enqueue([
12124
12124
  go$readdir,
12125
- [path16, options2, cb2],
12125
+ [path17, options2, cb2],
12126
12126
  err,
12127
12127
  startTime || Date.now(),
12128
12128
  Date.now()
@@ -12137,21 +12137,21 @@ var require_graceful_fs = __commonJS({
12137
12137
  }
12138
12138
  }
12139
12139
  if (process.version.substr(0, 4) === "v0.8") {
12140
- var legStreams = legacy(fs17);
12140
+ var legStreams = legacy(fs18);
12141
12141
  ReadStream = legStreams.ReadStream;
12142
12142
  WriteStream = legStreams.WriteStream;
12143
12143
  }
12144
- var fs$ReadStream = fs17.ReadStream;
12144
+ var fs$ReadStream = fs18.ReadStream;
12145
12145
  if (fs$ReadStream) {
12146
12146
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
12147
12147
  ReadStream.prototype.open = ReadStream$open;
12148
12148
  }
12149
- var fs$WriteStream = fs17.WriteStream;
12149
+ var fs$WriteStream = fs18.WriteStream;
12150
12150
  if (fs$WriteStream) {
12151
12151
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
12152
12152
  WriteStream.prototype.open = WriteStream$open;
12153
12153
  }
12154
- Object.defineProperty(fs17, "ReadStream", {
12154
+ Object.defineProperty(fs18, "ReadStream", {
12155
12155
  get: function() {
12156
12156
  return ReadStream;
12157
12157
  },
@@ -12161,7 +12161,7 @@ var require_graceful_fs = __commonJS({
12161
12161
  enumerable: true,
12162
12162
  configurable: true
12163
12163
  });
12164
- Object.defineProperty(fs17, "WriteStream", {
12164
+ Object.defineProperty(fs18, "WriteStream", {
12165
12165
  get: function() {
12166
12166
  return WriteStream;
12167
12167
  },
@@ -12172,7 +12172,7 @@ var require_graceful_fs = __commonJS({
12172
12172
  configurable: true
12173
12173
  });
12174
12174
  var FileReadStream = ReadStream;
12175
- Object.defineProperty(fs17, "FileReadStream", {
12175
+ Object.defineProperty(fs18, "FileReadStream", {
12176
12176
  get: function() {
12177
12177
  return FileReadStream;
12178
12178
  },
@@ -12183,7 +12183,7 @@ var require_graceful_fs = __commonJS({
12183
12183
  configurable: true
12184
12184
  });
12185
12185
  var FileWriteStream = WriteStream;
12186
- Object.defineProperty(fs17, "FileWriteStream", {
12186
+ Object.defineProperty(fs18, "FileWriteStream", {
12187
12187
  get: function() {
12188
12188
  return FileWriteStream;
12189
12189
  },
@@ -12193,7 +12193,7 @@ var require_graceful_fs = __commonJS({
12193
12193
  enumerable: true,
12194
12194
  configurable: true
12195
12195
  });
12196
- function ReadStream(path15, options) {
12196
+ function ReadStream(path16, options) {
12197
12197
  if (this instanceof ReadStream)
12198
12198
  return fs$ReadStream.apply(this, arguments), this;
12199
12199
  else
@@ -12213,7 +12213,7 @@ var require_graceful_fs = __commonJS({
12213
12213
  }
12214
12214
  });
12215
12215
  }
12216
- function WriteStream(path15, options) {
12216
+ function WriteStream(path16, options) {
12217
12217
  if (this instanceof WriteStream)
12218
12218
  return fs$WriteStream.apply(this, arguments), this;
12219
12219
  else
@@ -12231,22 +12231,22 @@ var require_graceful_fs = __commonJS({
12231
12231
  }
12232
12232
  });
12233
12233
  }
12234
- function createReadStream(path15, options) {
12235
- return new fs17.ReadStream(path15, options);
12234
+ function createReadStream(path16, options) {
12235
+ return new fs18.ReadStream(path16, options);
12236
12236
  }
12237
- function createWriteStream2(path15, options) {
12238
- return new fs17.WriteStream(path15, options);
12237
+ function createWriteStream2(path16, options) {
12238
+ return new fs18.WriteStream(path16, options);
12239
12239
  }
12240
- var fs$open = fs17.open;
12241
- fs17.open = open;
12242
- function open(path15, flags, mode, cb) {
12240
+ var fs$open = fs18.open;
12241
+ fs18.open = open;
12242
+ function open(path16, flags, mode, cb) {
12243
12243
  if (typeof mode === "function")
12244
12244
  cb = mode, mode = null;
12245
- return go$open(path15, flags, mode, cb);
12246
- function go$open(path16, flags2, mode2, cb2, startTime) {
12247
- return fs$open(path16, flags2, mode2, function(err, fd) {
12245
+ return go$open(path16, flags, mode, cb);
12246
+ function go$open(path17, flags2, mode2, cb2, startTime) {
12247
+ return fs$open(path17, flags2, mode2, function(err, fd) {
12248
12248
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
12249
- enqueue([go$open, [path16, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
12249
+ enqueue([go$open, [path17, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
12250
12250
  else {
12251
12251
  if (typeof cb2 === "function")
12252
12252
  cb2.apply(this, arguments);
@@ -12254,20 +12254,20 @@ var require_graceful_fs = __commonJS({
12254
12254
  });
12255
12255
  }
12256
12256
  }
12257
- return fs17;
12257
+ return fs18;
12258
12258
  }
12259
12259
  function enqueue(elem) {
12260
12260
  debug("ENQUEUE", elem[0].name, elem[1]);
12261
- fs16[gracefulQueue].push(elem);
12261
+ fs17[gracefulQueue].push(elem);
12262
12262
  retry();
12263
12263
  }
12264
12264
  var retryTimer;
12265
12265
  function resetQueue() {
12266
12266
  var now = Date.now();
12267
- for (var i = 0; i < fs16[gracefulQueue].length; ++i) {
12268
- if (fs16[gracefulQueue][i].length > 2) {
12269
- fs16[gracefulQueue][i][3] = now;
12270
- fs16[gracefulQueue][i][4] = now;
12267
+ for (var i = 0; i < fs17[gracefulQueue].length; ++i) {
12268
+ if (fs17[gracefulQueue][i].length > 2) {
12269
+ fs17[gracefulQueue][i][3] = now;
12270
+ fs17[gracefulQueue][i][4] = now;
12271
12271
  }
12272
12272
  }
12273
12273
  retry();
@@ -12275,9 +12275,9 @@ var require_graceful_fs = __commonJS({
12275
12275
  function retry() {
12276
12276
  clearTimeout(retryTimer);
12277
12277
  retryTimer = void 0;
12278
- if (fs16[gracefulQueue].length === 0)
12278
+ if (fs17[gracefulQueue].length === 0)
12279
12279
  return;
12280
- var elem = fs16[gracefulQueue].shift();
12280
+ var elem = fs17[gracefulQueue].shift();
12281
12281
  var fn = elem[0];
12282
12282
  var args = elem[1];
12283
12283
  var err = elem[2];
@@ -12299,7 +12299,7 @@ var require_graceful_fs = __commonJS({
12299
12299
  debug("RETRY", fn.name, args);
12300
12300
  fn.apply(null, args.concat([startTime]));
12301
12301
  } else {
12302
- fs16[gracefulQueue].push(elem);
12302
+ fs17[gracefulQueue].push(elem);
12303
12303
  }
12304
12304
  }
12305
12305
  if (retryTimer === void 0) {
@@ -12314,7 +12314,7 @@ var require_fs = __commonJS({
12314
12314
  "node_modules/fs-extra/lib/fs/index.js"(exports2) {
12315
12315
  "use strict";
12316
12316
  var u = require_universalify().fromCallback;
12317
- var fs16 = require_graceful_fs();
12317
+ var fs17 = require_graceful_fs();
12318
12318
  var api = [
12319
12319
  "access",
12320
12320
  "appendFile",
@@ -12355,26 +12355,26 @@ var require_fs = __commonJS({
12355
12355
  "utimes",
12356
12356
  "writeFile"
12357
12357
  ].filter((key) => {
12358
- return typeof fs16[key] === "function";
12358
+ return typeof fs17[key] === "function";
12359
12359
  });
12360
- Object.assign(exports2, fs16);
12360
+ Object.assign(exports2, fs17);
12361
12361
  api.forEach((method) => {
12362
- exports2[method] = u(fs16[method]);
12362
+ exports2[method] = u(fs17[method]);
12363
12363
  });
12364
12364
  exports2.exists = function(filename, callback) {
12365
12365
  if (typeof callback === "function") {
12366
- return fs16.exists(filename, callback);
12366
+ return fs17.exists(filename, callback);
12367
12367
  }
12368
12368
  return new Promise((resolve2) => {
12369
- return fs16.exists(filename, resolve2);
12369
+ return fs17.exists(filename, resolve2);
12370
12370
  });
12371
12371
  };
12372
12372
  exports2.read = function(fd, buffer, offset, length, position, callback) {
12373
12373
  if (typeof callback === "function") {
12374
- return fs16.read(fd, buffer, offset, length, position, callback);
12374
+ return fs17.read(fd, buffer, offset, length, position, callback);
12375
12375
  }
12376
12376
  return new Promise((resolve2, reject) => {
12377
- fs16.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
12377
+ fs17.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
12378
12378
  if (err) return reject(err);
12379
12379
  resolve2({ bytesRead, buffer: buffer2 });
12380
12380
  });
@@ -12382,10 +12382,10 @@ var require_fs = __commonJS({
12382
12382
  };
12383
12383
  exports2.write = function(fd, buffer, ...args) {
12384
12384
  if (typeof args[args.length - 1] === "function") {
12385
- return fs16.write(fd, buffer, ...args);
12385
+ return fs17.write(fd, buffer, ...args);
12386
12386
  }
12387
12387
  return new Promise((resolve2, reject) => {
12388
- fs16.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
12388
+ fs17.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
12389
12389
  if (err) return reject(err);
12390
12390
  resolve2({ bytesWritten, buffer: buffer2 });
12391
12391
  });
@@ -12393,10 +12393,10 @@ var require_fs = __commonJS({
12393
12393
  };
12394
12394
  exports2.readv = function(fd, buffers, ...args) {
12395
12395
  if (typeof args[args.length - 1] === "function") {
12396
- return fs16.readv(fd, buffers, ...args);
12396
+ return fs17.readv(fd, buffers, ...args);
12397
12397
  }
12398
12398
  return new Promise((resolve2, reject) => {
12399
- fs16.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
12399
+ fs17.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
12400
12400
  if (err) return reject(err);
12401
12401
  resolve2({ bytesRead, buffers: buffers2 });
12402
12402
  });
@@ -12404,17 +12404,17 @@ var require_fs = __commonJS({
12404
12404
  };
12405
12405
  exports2.writev = function(fd, buffers, ...args) {
12406
12406
  if (typeof args[args.length - 1] === "function") {
12407
- return fs16.writev(fd, buffers, ...args);
12407
+ return fs17.writev(fd, buffers, ...args);
12408
12408
  }
12409
12409
  return new Promise((resolve2, reject) => {
12410
- fs16.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
12410
+ fs17.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
12411
12411
  if (err) return reject(err);
12412
12412
  resolve2({ bytesWritten, buffers: buffers2 });
12413
12413
  });
12414
12414
  });
12415
12415
  };
12416
- if (typeof fs16.realpath.native === "function") {
12417
- exports2.realpath.native = u(fs16.realpath.native);
12416
+ if (typeof fs17.realpath.native === "function") {
12417
+ exports2.realpath.native = u(fs17.realpath.native);
12418
12418
  } else {
12419
12419
  process.emitWarning(
12420
12420
  "fs.realpath.native is not a function. Is fs being monkey-patched?",
@@ -12429,10 +12429,10 @@ var require_fs = __commonJS({
12429
12429
  var require_utils = __commonJS({
12430
12430
  "node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
12431
12431
  "use strict";
12432
- var path15 = require("path");
12432
+ var path16 = require("path");
12433
12433
  module2.exports.checkPath = function checkPath(pth) {
12434
12434
  if (process.platform === "win32") {
12435
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path15.parse(pth).root, ""));
12435
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path16.parse(pth).root, ""));
12436
12436
  if (pathHasInvalidWinCharacters) {
12437
12437
  const error49 = new Error(`Path contains invalid characters: ${pth}`);
12438
12438
  error49.code = "EINVAL";
@@ -12447,7 +12447,7 @@ var require_utils = __commonJS({
12447
12447
  var require_make_dir = __commonJS({
12448
12448
  "node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
12449
12449
  "use strict";
12450
- var fs16 = require_fs();
12450
+ var fs17 = require_fs();
12451
12451
  var { checkPath } = require_utils();
12452
12452
  var getMode = (options) => {
12453
12453
  const defaults = { mode: 511 };
@@ -12456,14 +12456,14 @@ var require_make_dir = __commonJS({
12456
12456
  };
12457
12457
  module2.exports.makeDir = async (dir, options) => {
12458
12458
  checkPath(dir);
12459
- return fs16.mkdir(dir, {
12459
+ return fs17.mkdir(dir, {
12460
12460
  mode: getMode(options),
12461
12461
  recursive: true
12462
12462
  });
12463
12463
  };
12464
12464
  module2.exports.makeDirSync = (dir, options) => {
12465
12465
  checkPath(dir);
12466
- return fs16.mkdirSync(dir, {
12466
+ return fs17.mkdirSync(dir, {
12467
12467
  mode: getMode(options),
12468
12468
  recursive: true
12469
12469
  });
@@ -12495,13 +12495,13 @@ var require_path_exists = __commonJS({
12495
12495
  "node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
12496
12496
  "use strict";
12497
12497
  var u = require_universalify().fromPromise;
12498
- var fs16 = require_fs();
12499
- function pathExists(path15) {
12500
- return fs16.access(path15).then(() => true).catch(() => false);
12498
+ var fs17 = require_fs();
12499
+ function pathExists(path16) {
12500
+ return fs17.access(path16).then(() => true).catch(() => false);
12501
12501
  }
12502
12502
  module2.exports = {
12503
12503
  pathExists: u(pathExists),
12504
- pathExistsSync: fs16.existsSync
12504
+ pathExistsSync: fs17.existsSync
12505
12505
  };
12506
12506
  }
12507
12507
  });
@@ -12510,16 +12510,16 @@ var require_path_exists = __commonJS({
12510
12510
  var require_utimes = __commonJS({
12511
12511
  "node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
12512
12512
  "use strict";
12513
- var fs16 = require_fs();
12513
+ var fs17 = require_fs();
12514
12514
  var u = require_universalify().fromPromise;
12515
- async function utimesMillis(path15, atime, mtime) {
12516
- const fd = await fs16.open(path15, "r+");
12515
+ async function utimesMillis(path16, atime, mtime) {
12516
+ const fd = await fs17.open(path16, "r+");
12517
12517
  let closeErr = null;
12518
12518
  try {
12519
- await fs16.futimes(fd, atime, mtime);
12519
+ await fs17.futimes(fd, atime, mtime);
12520
12520
  } finally {
12521
12521
  try {
12522
- await fs16.close(fd);
12522
+ await fs17.close(fd);
12523
12523
  } catch (e) {
12524
12524
  closeErr = e;
12525
12525
  }
@@ -12528,10 +12528,10 @@ var require_utimes = __commonJS({
12528
12528
  throw closeErr;
12529
12529
  }
12530
12530
  }
12531
- function utimesMillisSync(path15, atime, mtime) {
12532
- const fd = fs16.openSync(path15, "r+");
12533
- fs16.futimesSync(fd, atime, mtime);
12534
- return fs16.closeSync(fd);
12531
+ function utimesMillisSync(path16, atime, mtime) {
12532
+ const fd = fs17.openSync(path16, "r+");
12533
+ fs17.futimesSync(fd, atime, mtime);
12534
+ return fs17.closeSync(fd);
12535
12535
  }
12536
12536
  module2.exports = {
12537
12537
  utimesMillis: u(utimesMillis),
@@ -12544,11 +12544,11 @@ var require_utimes = __commonJS({
12544
12544
  var require_stat = __commonJS({
12545
12545
  "node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
12546
12546
  "use strict";
12547
- var fs16 = require_fs();
12548
- var path15 = require("path");
12547
+ var fs17 = require_fs();
12548
+ var path16 = require("path");
12549
12549
  var u = require_universalify().fromPromise;
12550
12550
  function getStats(src, dest, opts) {
12551
- const statFunc = opts.dereference ? (file2) => fs16.stat(file2, { bigint: true }) : (file2) => fs16.lstat(file2, { bigint: true });
12551
+ const statFunc = opts.dereference ? (file2) => fs17.stat(file2, { bigint: true }) : (file2) => fs17.lstat(file2, { bigint: true });
12552
12552
  return Promise.all([
12553
12553
  statFunc(src),
12554
12554
  statFunc(dest).catch((err) => {
@@ -12559,7 +12559,7 @@ var require_stat = __commonJS({
12559
12559
  }
12560
12560
  function getStatsSync(src, dest, opts) {
12561
12561
  let destStat;
12562
- const statFunc = opts.dereference ? (file2) => fs16.statSync(file2, { bigint: true }) : (file2) => fs16.lstatSync(file2, { bigint: true });
12562
+ const statFunc = opts.dereference ? (file2) => fs17.statSync(file2, { bigint: true }) : (file2) => fs17.lstatSync(file2, { bigint: true });
12563
12563
  const srcStat = statFunc(src);
12564
12564
  try {
12565
12565
  destStat = statFunc(dest);
@@ -12573,8 +12573,8 @@ var require_stat = __commonJS({
12573
12573
  const { srcStat, destStat } = await getStats(src, dest, opts);
12574
12574
  if (destStat) {
12575
12575
  if (areIdentical(srcStat, destStat)) {
12576
- const srcBaseName = path15.basename(src);
12577
- const destBaseName = path15.basename(dest);
12576
+ const srcBaseName = path16.basename(src);
12577
+ const destBaseName = path16.basename(dest);
12578
12578
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
12579
12579
  return { srcStat, destStat, isChangingCase: true };
12580
12580
  }
@@ -12596,8 +12596,8 @@ var require_stat = __commonJS({
12596
12596
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
12597
12597
  if (destStat) {
12598
12598
  if (areIdentical(srcStat, destStat)) {
12599
- const srcBaseName = path15.basename(src);
12600
- const destBaseName = path15.basename(dest);
12599
+ const srcBaseName = path16.basename(src);
12600
+ const destBaseName = path16.basename(dest);
12601
12601
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
12602
12602
  return { srcStat, destStat, isChangingCase: true };
12603
12603
  }
@@ -12616,12 +12616,12 @@ var require_stat = __commonJS({
12616
12616
  return { srcStat, destStat };
12617
12617
  }
12618
12618
  async function checkParentPaths(src, srcStat, dest, funcName) {
12619
- const srcParent = path15.resolve(path15.dirname(src));
12620
- const destParent = path15.resolve(path15.dirname(dest));
12621
- if (destParent === srcParent || destParent === path15.parse(destParent).root) return;
12619
+ const srcParent = path16.resolve(path16.dirname(src));
12620
+ const destParent = path16.resolve(path16.dirname(dest));
12621
+ if (destParent === srcParent || destParent === path16.parse(destParent).root) return;
12622
12622
  let destStat;
12623
12623
  try {
12624
- destStat = await fs16.stat(destParent, { bigint: true });
12624
+ destStat = await fs17.stat(destParent, { bigint: true });
12625
12625
  } catch (err) {
12626
12626
  if (err.code === "ENOENT") return;
12627
12627
  throw err;
@@ -12632,12 +12632,12 @@ var require_stat = __commonJS({
12632
12632
  return checkParentPaths(src, srcStat, destParent, funcName);
12633
12633
  }
12634
12634
  function checkParentPathsSync(src, srcStat, dest, funcName) {
12635
- const srcParent = path15.resolve(path15.dirname(src));
12636
- const destParent = path15.resolve(path15.dirname(dest));
12637
- if (destParent === srcParent || destParent === path15.parse(destParent).root) return;
12635
+ const srcParent = path16.resolve(path16.dirname(src));
12636
+ const destParent = path16.resolve(path16.dirname(dest));
12637
+ if (destParent === srcParent || destParent === path16.parse(destParent).root) return;
12638
12638
  let destStat;
12639
12639
  try {
12640
- destStat = fs16.statSync(destParent, { bigint: true });
12640
+ destStat = fs17.statSync(destParent, { bigint: true });
12641
12641
  } catch (err) {
12642
12642
  if (err.code === "ENOENT") return;
12643
12643
  throw err;
@@ -12651,8 +12651,8 @@ var require_stat = __commonJS({
12651
12651
  return destStat.ino !== void 0 && destStat.dev !== void 0 && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
12652
12652
  }
12653
12653
  function isSrcSubdir(src, dest) {
12654
- const srcArr = path15.resolve(src).split(path15.sep).filter((i) => i);
12655
- const destArr = path15.resolve(dest).split(path15.sep).filter((i) => i);
12654
+ const srcArr = path16.resolve(src).split(path16.sep).filter((i) => i);
12655
+ const destArr = path16.resolve(dest).split(path16.sep).filter((i) => i);
12656
12656
  return srcArr.every((cur, i) => destArr[i] === cur);
12657
12657
  }
12658
12658
  function errMsg(src, dest, funcName) {
@@ -12704,8 +12704,8 @@ var require_async = __commonJS({
12704
12704
  var require_copy = __commonJS({
12705
12705
  "node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
12706
12706
  "use strict";
12707
- var fs16 = require_fs();
12708
- var path15 = require("path");
12707
+ var fs17 = require_fs();
12708
+ var path16 = require("path");
12709
12709
  var { mkdirs } = require_mkdirs();
12710
12710
  var { pathExists } = require_path_exists();
12711
12711
  var { utimesMillis } = require_utimes();
@@ -12728,7 +12728,7 @@ var require_copy = __commonJS({
12728
12728
  await stat.checkParentPaths(src, srcStat, dest, "copy");
12729
12729
  const include = await runFilter(src, dest, opts);
12730
12730
  if (!include) return;
12731
- const destParent = path15.dirname(dest);
12731
+ const destParent = path16.dirname(dest);
12732
12732
  const dirExists = await pathExists(destParent);
12733
12733
  if (!dirExists) {
12734
12734
  await mkdirs(destParent);
@@ -12740,7 +12740,7 @@ var require_copy = __commonJS({
12740
12740
  return opts.filter(src, dest);
12741
12741
  }
12742
12742
  async function getStatsAndPerformCopy(destStat, src, dest, opts) {
12743
- const statFn = opts.dereference ? fs16.stat : fs16.lstat;
12743
+ const statFn = opts.dereference ? fs17.stat : fs17.lstat;
12744
12744
  const srcStat = await statFn(src);
12745
12745
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
12746
12746
  if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -12752,7 +12752,7 @@ var require_copy = __commonJS({
12752
12752
  async function onFile(srcStat, destStat, src, dest, opts) {
12753
12753
  if (!destStat) return copyFile(srcStat, src, dest, opts);
12754
12754
  if (opts.overwrite) {
12755
- await fs16.unlink(dest);
12755
+ await fs17.unlink(dest);
12756
12756
  return copyFile(srcStat, src, dest, opts);
12757
12757
  }
12758
12758
  if (opts.errorOnExist) {
@@ -12760,29 +12760,29 @@ var require_copy = __commonJS({
12760
12760
  }
12761
12761
  }
12762
12762
  async function copyFile(srcStat, src, dest, opts) {
12763
- await fs16.copyFile(src, dest);
12763
+ await fs17.copyFile(src, dest);
12764
12764
  if (opts.preserveTimestamps) {
12765
12765
  if (fileIsNotWritable(srcStat.mode)) {
12766
12766
  await makeFileWritable(dest, srcStat.mode);
12767
12767
  }
12768
- const updatedSrcStat = await fs16.stat(src);
12768
+ const updatedSrcStat = await fs17.stat(src);
12769
12769
  await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
12770
12770
  }
12771
- return fs16.chmod(dest, srcStat.mode);
12771
+ return fs17.chmod(dest, srcStat.mode);
12772
12772
  }
12773
12773
  function fileIsNotWritable(srcMode) {
12774
12774
  return (srcMode & 128) === 0;
12775
12775
  }
12776
12776
  function makeFileWritable(dest, srcMode) {
12777
- return fs16.chmod(dest, srcMode | 128);
12777
+ return fs17.chmod(dest, srcMode | 128);
12778
12778
  }
12779
12779
  async function onDir(srcStat, destStat, src, dest, opts) {
12780
12780
  if (!destStat) {
12781
- await fs16.mkdir(dest);
12781
+ await fs17.mkdir(dest);
12782
12782
  }
12783
- await asyncIteratorConcurrentProcess(await fs16.opendir(src), async (item) => {
12784
- const srcItem = path15.join(src, item.name);
12785
- const destItem = path15.join(dest, item.name);
12783
+ await asyncIteratorConcurrentProcess(await fs17.opendir(src), async (item) => {
12784
+ const srcItem = path16.join(src, item.name);
12785
+ const destItem = path16.join(dest, item.name);
12786
12786
  const include = await runFilter(srcItem, destItem, opts);
12787
12787
  if (include) {
12788
12788
  const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
@@ -12790,26 +12790,26 @@ var require_copy = __commonJS({
12790
12790
  }
12791
12791
  });
12792
12792
  if (!destStat) {
12793
- await fs16.chmod(dest, srcStat.mode);
12793
+ await fs17.chmod(dest, srcStat.mode);
12794
12794
  }
12795
12795
  }
12796
12796
  async function onLink(destStat, src, dest, opts) {
12797
- let resolvedSrc = await fs16.readlink(src);
12797
+ let resolvedSrc = await fs17.readlink(src);
12798
12798
  if (opts.dereference) {
12799
- resolvedSrc = path15.resolve(process.cwd(), resolvedSrc);
12799
+ resolvedSrc = path16.resolve(process.cwd(), resolvedSrc);
12800
12800
  }
12801
12801
  if (!destStat) {
12802
- return fs16.symlink(resolvedSrc, dest);
12802
+ return fs17.symlink(resolvedSrc, dest);
12803
12803
  }
12804
12804
  let resolvedDest = null;
12805
12805
  try {
12806
- resolvedDest = await fs16.readlink(dest);
12806
+ resolvedDest = await fs17.readlink(dest);
12807
12807
  } catch (e) {
12808
- if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs16.symlink(resolvedSrc, dest);
12808
+ if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs17.symlink(resolvedSrc, dest);
12809
12809
  throw e;
12810
12810
  }
12811
12811
  if (opts.dereference) {
12812
- resolvedDest = path15.resolve(process.cwd(), resolvedDest);
12812
+ resolvedDest = path16.resolve(process.cwd(), resolvedDest);
12813
12813
  }
12814
12814
  if (resolvedSrc !== resolvedDest) {
12815
12815
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
@@ -12819,8 +12819,8 @@ var require_copy = __commonJS({
12819
12819
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
12820
12820
  }
12821
12821
  }
12822
- await fs16.unlink(dest);
12823
- return fs16.symlink(resolvedSrc, dest);
12822
+ await fs17.unlink(dest);
12823
+ return fs17.symlink(resolvedSrc, dest);
12824
12824
  }
12825
12825
  module2.exports = copy;
12826
12826
  }
@@ -12830,8 +12830,8 @@ var require_copy = __commonJS({
12830
12830
  var require_copy_sync = __commonJS({
12831
12831
  "node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
12832
12832
  "use strict";
12833
- var fs16 = require_graceful_fs();
12834
- var path15 = require("path");
12833
+ var fs17 = require_graceful_fs();
12834
+ var path16 = require("path");
12835
12835
  var mkdirsSync = require_mkdirs().mkdirsSync;
12836
12836
  var utimesMillisSync = require_utimes().utimesMillisSync;
12837
12837
  var stat = require_stat();
@@ -12852,12 +12852,12 @@ var require_copy_sync = __commonJS({
12852
12852
  const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
12853
12853
  stat.checkParentPathsSync(src, srcStat, dest, "copy");
12854
12854
  if (opts.filter && !opts.filter(src, dest)) return;
12855
- const destParent = path15.dirname(dest);
12856
- if (!fs16.existsSync(destParent)) mkdirsSync(destParent);
12855
+ const destParent = path16.dirname(dest);
12856
+ if (!fs17.existsSync(destParent)) mkdirsSync(destParent);
12857
12857
  return getStats(destStat, src, dest, opts);
12858
12858
  }
12859
12859
  function getStats(destStat, src, dest, opts) {
12860
- const statSync = opts.dereference ? fs16.statSync : fs16.lstatSync;
12860
+ const statSync = opts.dereference ? fs17.statSync : fs17.lstatSync;
12861
12861
  const srcStat = statSync(src);
12862
12862
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
12863
12863
  else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -12872,14 +12872,14 @@ var require_copy_sync = __commonJS({
12872
12872
  }
12873
12873
  function mayCopyFile(srcStat, src, dest, opts) {
12874
12874
  if (opts.overwrite) {
12875
- fs16.unlinkSync(dest);
12875
+ fs17.unlinkSync(dest);
12876
12876
  return copyFile(srcStat, src, dest, opts);
12877
12877
  } else if (opts.errorOnExist) {
12878
12878
  throw new Error(`'${dest}' already exists`);
12879
12879
  }
12880
12880
  }
12881
12881
  function copyFile(srcStat, src, dest, opts) {
12882
- fs16.copyFileSync(src, dest);
12882
+ fs17.copyFileSync(src, dest);
12883
12883
  if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
12884
12884
  return setDestMode(dest, srcStat.mode);
12885
12885
  }
@@ -12894,10 +12894,10 @@ var require_copy_sync = __commonJS({
12894
12894
  return setDestMode(dest, srcMode | 128);
12895
12895
  }
12896
12896
  function setDestMode(dest, srcMode) {
12897
- return fs16.chmodSync(dest, srcMode);
12897
+ return fs17.chmodSync(dest, srcMode);
12898
12898
  }
12899
12899
  function setDestTimestamps(src, dest) {
12900
- const updatedSrcStat = fs16.statSync(src);
12900
+ const updatedSrcStat = fs17.statSync(src);
12901
12901
  return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
12902
12902
  }
12903
12903
  function onDir(srcStat, destStat, src, dest, opts) {
@@ -12905,12 +12905,12 @@ var require_copy_sync = __commonJS({
12905
12905
  return copyDir(src, dest, opts);
12906
12906
  }
12907
12907
  function mkDirAndCopy(srcMode, src, dest, opts) {
12908
- fs16.mkdirSync(dest);
12908
+ fs17.mkdirSync(dest);
12909
12909
  copyDir(src, dest, opts);
12910
12910
  return setDestMode(dest, srcMode);
12911
12911
  }
12912
12912
  function copyDir(src, dest, opts) {
12913
- const dir = fs16.opendirSync(src);
12913
+ const dir = fs17.opendirSync(src);
12914
12914
  try {
12915
12915
  let dirent;
12916
12916
  while ((dirent = dir.readSync()) !== null) {
@@ -12921,29 +12921,29 @@ var require_copy_sync = __commonJS({
12921
12921
  }
12922
12922
  }
12923
12923
  function copyDirItem(item, src, dest, opts) {
12924
- const srcItem = path15.join(src, item);
12925
- const destItem = path15.join(dest, item);
12924
+ const srcItem = path16.join(src, item);
12925
+ const destItem = path16.join(dest, item);
12926
12926
  if (opts.filter && !opts.filter(srcItem, destItem)) return;
12927
12927
  const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
12928
12928
  return getStats(destStat, srcItem, destItem, opts);
12929
12929
  }
12930
12930
  function onLink(destStat, src, dest, opts) {
12931
- let resolvedSrc = fs16.readlinkSync(src);
12931
+ let resolvedSrc = fs17.readlinkSync(src);
12932
12932
  if (opts.dereference) {
12933
- resolvedSrc = path15.resolve(process.cwd(), resolvedSrc);
12933
+ resolvedSrc = path16.resolve(process.cwd(), resolvedSrc);
12934
12934
  }
12935
12935
  if (!destStat) {
12936
- return fs16.symlinkSync(resolvedSrc, dest);
12936
+ return fs17.symlinkSync(resolvedSrc, dest);
12937
12937
  } else {
12938
12938
  let resolvedDest;
12939
12939
  try {
12940
- resolvedDest = fs16.readlinkSync(dest);
12940
+ resolvedDest = fs17.readlinkSync(dest);
12941
12941
  } catch (err) {
12942
- if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs16.symlinkSync(resolvedSrc, dest);
12942
+ if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs17.symlinkSync(resolvedSrc, dest);
12943
12943
  throw err;
12944
12944
  }
12945
12945
  if (opts.dereference) {
12946
- resolvedDest = path15.resolve(process.cwd(), resolvedDest);
12946
+ resolvedDest = path16.resolve(process.cwd(), resolvedDest);
12947
12947
  }
12948
12948
  if (resolvedSrc !== resolvedDest) {
12949
12949
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
@@ -12957,8 +12957,8 @@ var require_copy_sync = __commonJS({
12957
12957
  }
12958
12958
  }
12959
12959
  function copyLink(resolvedSrc, dest) {
12960
- fs16.unlinkSync(dest);
12961
- return fs16.symlinkSync(resolvedSrc, dest);
12960
+ fs17.unlinkSync(dest);
12961
+ return fs17.symlinkSync(resolvedSrc, dest);
12962
12962
  }
12963
12963
  module2.exports = copySync;
12964
12964
  }
@@ -12980,13 +12980,13 @@ var require_copy2 = __commonJS({
12980
12980
  var require_remove = __commonJS({
12981
12981
  "node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
12982
12982
  "use strict";
12983
- var fs16 = require_graceful_fs();
12983
+ var fs17 = require_graceful_fs();
12984
12984
  var u = require_universalify().fromCallback;
12985
- function remove(path15, callback) {
12986
- fs16.rm(path15, { recursive: true, force: true }, callback);
12985
+ function remove(path16, callback) {
12986
+ fs17.rm(path16, { recursive: true, force: true }, callback);
12987
12987
  }
12988
- function removeSync(path15) {
12989
- fs16.rmSync(path15, { recursive: true, force: true });
12988
+ function removeSync(path16) {
12989
+ fs17.rmSync(path16, { recursive: true, force: true });
12990
12990
  }
12991
12991
  module2.exports = {
12992
12992
  remove: u(remove),
@@ -13000,28 +13000,28 @@ var require_empty = __commonJS({
13000
13000
  "node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
13001
13001
  "use strict";
13002
13002
  var u = require_universalify().fromPromise;
13003
- var fs16 = require_fs();
13004
- var path15 = require("path");
13003
+ var fs17 = require_fs();
13004
+ var path16 = require("path");
13005
13005
  var mkdir = require_mkdirs();
13006
13006
  var remove = require_remove();
13007
13007
  var emptyDir = u(async function emptyDir2(dir) {
13008
13008
  let items;
13009
13009
  try {
13010
- items = await fs16.readdir(dir);
13010
+ items = await fs17.readdir(dir);
13011
13011
  } catch {
13012
13012
  return mkdir.mkdirs(dir);
13013
13013
  }
13014
- return Promise.all(items.map((item) => remove.remove(path15.join(dir, item))));
13014
+ return Promise.all(items.map((item) => remove.remove(path16.join(dir, item))));
13015
13015
  });
13016
13016
  function emptyDirSync(dir) {
13017
13017
  let items;
13018
13018
  try {
13019
- items = fs16.readdirSync(dir);
13019
+ items = fs17.readdirSync(dir);
13020
13020
  } catch {
13021
13021
  return mkdir.mkdirsSync(dir);
13022
13022
  }
13023
13023
  items.forEach((item) => {
13024
- item = path15.join(dir, item);
13024
+ item = path16.join(dir, item);
13025
13025
  remove.removeSync(item);
13026
13026
  });
13027
13027
  }
@@ -13039,52 +13039,52 @@ var require_file = __commonJS({
13039
13039
  "node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
13040
13040
  "use strict";
13041
13041
  var u = require_universalify().fromPromise;
13042
- var path15 = require("path");
13043
- var fs16 = require_fs();
13042
+ var path16 = require("path");
13043
+ var fs17 = require_fs();
13044
13044
  var mkdir = require_mkdirs();
13045
13045
  async function createFile(file2) {
13046
13046
  let stats;
13047
13047
  try {
13048
- stats = await fs16.stat(file2);
13048
+ stats = await fs17.stat(file2);
13049
13049
  } catch {
13050
13050
  }
13051
13051
  if (stats && stats.isFile()) return;
13052
- const dir = path15.dirname(file2);
13052
+ const dir = path16.dirname(file2);
13053
13053
  let dirStats = null;
13054
13054
  try {
13055
- dirStats = await fs16.stat(dir);
13055
+ dirStats = await fs17.stat(dir);
13056
13056
  } catch (err) {
13057
13057
  if (err.code === "ENOENT") {
13058
13058
  await mkdir.mkdirs(dir);
13059
- await fs16.writeFile(file2, "");
13059
+ await fs17.writeFile(file2, "");
13060
13060
  return;
13061
13061
  } else {
13062
13062
  throw err;
13063
13063
  }
13064
13064
  }
13065
13065
  if (dirStats.isDirectory()) {
13066
- await fs16.writeFile(file2, "");
13066
+ await fs17.writeFile(file2, "");
13067
13067
  } else {
13068
- await fs16.readdir(dir);
13068
+ await fs17.readdir(dir);
13069
13069
  }
13070
13070
  }
13071
13071
  function createFileSync(file2) {
13072
13072
  let stats;
13073
13073
  try {
13074
- stats = fs16.statSync(file2);
13074
+ stats = fs17.statSync(file2);
13075
13075
  } catch {
13076
13076
  }
13077
13077
  if (stats && stats.isFile()) return;
13078
- const dir = path15.dirname(file2);
13078
+ const dir = path16.dirname(file2);
13079
13079
  try {
13080
- if (!fs16.statSync(dir).isDirectory()) {
13081
- fs16.readdirSync(dir);
13080
+ if (!fs17.statSync(dir).isDirectory()) {
13081
+ fs17.readdirSync(dir);
13082
13082
  }
13083
13083
  } catch (err) {
13084
13084
  if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
13085
13085
  else throw err;
13086
13086
  }
13087
- fs16.writeFileSync(file2, "");
13087
+ fs17.writeFileSync(file2, "");
13088
13088
  }
13089
13089
  module2.exports = {
13090
13090
  createFile: u(createFile),
@@ -13098,50 +13098,50 @@ var require_link = __commonJS({
13098
13098
  "node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
13099
13099
  "use strict";
13100
13100
  var u = require_universalify().fromPromise;
13101
- var path15 = require("path");
13102
- var fs16 = require_fs();
13101
+ var path16 = require("path");
13102
+ var fs17 = require_fs();
13103
13103
  var mkdir = require_mkdirs();
13104
13104
  var { pathExists } = require_path_exists();
13105
13105
  var { areIdentical } = require_stat();
13106
13106
  async function createLink(srcpath, dstpath) {
13107
13107
  let dstStat;
13108
13108
  try {
13109
- dstStat = await fs16.lstat(dstpath);
13109
+ dstStat = await fs17.lstat(dstpath);
13110
13110
  } catch {
13111
13111
  }
13112
13112
  let srcStat;
13113
13113
  try {
13114
- srcStat = await fs16.lstat(srcpath);
13114
+ srcStat = await fs17.lstat(srcpath);
13115
13115
  } catch (err) {
13116
13116
  err.message = err.message.replace("lstat", "ensureLink");
13117
13117
  throw err;
13118
13118
  }
13119
13119
  if (dstStat && areIdentical(srcStat, dstStat)) return;
13120
- const dir = path15.dirname(dstpath);
13120
+ const dir = path16.dirname(dstpath);
13121
13121
  const dirExists = await pathExists(dir);
13122
13122
  if (!dirExists) {
13123
13123
  await mkdir.mkdirs(dir);
13124
13124
  }
13125
- await fs16.link(srcpath, dstpath);
13125
+ await fs17.link(srcpath, dstpath);
13126
13126
  }
13127
13127
  function createLinkSync(srcpath, dstpath) {
13128
13128
  let dstStat;
13129
13129
  try {
13130
- dstStat = fs16.lstatSync(dstpath);
13130
+ dstStat = fs17.lstatSync(dstpath);
13131
13131
  } catch {
13132
13132
  }
13133
13133
  try {
13134
- const srcStat = fs16.lstatSync(srcpath);
13134
+ const srcStat = fs17.lstatSync(srcpath);
13135
13135
  if (dstStat && areIdentical(srcStat, dstStat)) return;
13136
13136
  } catch (err) {
13137
13137
  err.message = err.message.replace("lstat", "ensureLink");
13138
13138
  throw err;
13139
13139
  }
13140
- const dir = path15.dirname(dstpath);
13141
- const dirExists = fs16.existsSync(dir);
13142
- if (dirExists) return fs16.linkSync(srcpath, dstpath);
13140
+ const dir = path16.dirname(dstpath);
13141
+ const dirExists = fs17.existsSync(dir);
13142
+ if (dirExists) return fs17.linkSync(srcpath, dstpath);
13143
13143
  mkdir.mkdirsSync(dir);
13144
- return fs16.linkSync(srcpath, dstpath);
13144
+ return fs17.linkSync(srcpath, dstpath);
13145
13145
  }
13146
13146
  module2.exports = {
13147
13147
  createLink: u(createLink),
@@ -13154,14 +13154,14 @@ var require_link = __commonJS({
13154
13154
  var require_symlink_paths = __commonJS({
13155
13155
  "node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
13156
13156
  "use strict";
13157
- var path15 = require("path");
13158
- var fs16 = require_fs();
13157
+ var path16 = require("path");
13158
+ var fs17 = require_fs();
13159
13159
  var { pathExists } = require_path_exists();
13160
13160
  var u = require_universalify().fromPromise;
13161
13161
  async function symlinkPaths(srcpath, dstpath) {
13162
- if (path15.isAbsolute(srcpath)) {
13162
+ if (path16.isAbsolute(srcpath)) {
13163
13163
  try {
13164
- await fs16.lstat(srcpath);
13164
+ await fs17.lstat(srcpath);
13165
13165
  } catch (err) {
13166
13166
  err.message = err.message.replace("lstat", "ensureSymlink");
13167
13167
  throw err;
@@ -13171,8 +13171,8 @@ var require_symlink_paths = __commonJS({
13171
13171
  toDst: srcpath
13172
13172
  };
13173
13173
  }
13174
- const dstdir = path15.dirname(dstpath);
13175
- const relativeToDst = path15.join(dstdir, srcpath);
13174
+ const dstdir = path16.dirname(dstpath);
13175
+ const relativeToDst = path16.join(dstdir, srcpath);
13176
13176
  const exists = await pathExists(relativeToDst);
13177
13177
  if (exists) {
13178
13178
  return {
@@ -13181,39 +13181,39 @@ var require_symlink_paths = __commonJS({
13181
13181
  };
13182
13182
  }
13183
13183
  try {
13184
- await fs16.lstat(srcpath);
13184
+ await fs17.lstat(srcpath);
13185
13185
  } catch (err) {
13186
13186
  err.message = err.message.replace("lstat", "ensureSymlink");
13187
13187
  throw err;
13188
13188
  }
13189
13189
  return {
13190
13190
  toCwd: srcpath,
13191
- toDst: path15.relative(dstdir, srcpath)
13191
+ toDst: path16.relative(dstdir, srcpath)
13192
13192
  };
13193
13193
  }
13194
13194
  function symlinkPathsSync(srcpath, dstpath) {
13195
- if (path15.isAbsolute(srcpath)) {
13196
- const exists2 = fs16.existsSync(srcpath);
13195
+ if (path16.isAbsolute(srcpath)) {
13196
+ const exists2 = fs17.existsSync(srcpath);
13197
13197
  if (!exists2) throw new Error("absolute srcpath does not exist");
13198
13198
  return {
13199
13199
  toCwd: srcpath,
13200
13200
  toDst: srcpath
13201
13201
  };
13202
13202
  }
13203
- const dstdir = path15.dirname(dstpath);
13204
- const relativeToDst = path15.join(dstdir, srcpath);
13205
- const exists = fs16.existsSync(relativeToDst);
13203
+ const dstdir = path16.dirname(dstpath);
13204
+ const relativeToDst = path16.join(dstdir, srcpath);
13205
+ const exists = fs17.existsSync(relativeToDst);
13206
13206
  if (exists) {
13207
13207
  return {
13208
13208
  toCwd: relativeToDst,
13209
13209
  toDst: srcpath
13210
13210
  };
13211
13211
  }
13212
- const srcExists = fs16.existsSync(srcpath);
13212
+ const srcExists = fs17.existsSync(srcpath);
13213
13213
  if (!srcExists) throw new Error("relative srcpath does not exist");
13214
13214
  return {
13215
13215
  toCwd: srcpath,
13216
- toDst: path15.relative(dstdir, srcpath)
13216
+ toDst: path16.relative(dstdir, srcpath)
13217
13217
  };
13218
13218
  }
13219
13219
  module2.exports = {
@@ -13227,13 +13227,13 @@ var require_symlink_paths = __commonJS({
13227
13227
  var require_symlink_type = __commonJS({
13228
13228
  "node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
13229
13229
  "use strict";
13230
- var fs16 = require_fs();
13230
+ var fs17 = require_fs();
13231
13231
  var u = require_universalify().fromPromise;
13232
13232
  async function symlinkType(srcpath, type) {
13233
13233
  if (type) return type;
13234
13234
  let stats;
13235
13235
  try {
13236
- stats = await fs16.lstat(srcpath);
13236
+ stats = await fs17.lstat(srcpath);
13237
13237
  } catch {
13238
13238
  return "file";
13239
13239
  }
@@ -13243,7 +13243,7 @@ var require_symlink_type = __commonJS({
13243
13243
  if (type) return type;
13244
13244
  let stats;
13245
13245
  try {
13246
- stats = fs16.lstatSync(srcpath);
13246
+ stats = fs17.lstatSync(srcpath);
13247
13247
  } catch {
13248
13248
  return "file";
13249
13249
  }
@@ -13261,8 +13261,8 @@ var require_symlink = __commonJS({
13261
13261
  "node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
13262
13262
  "use strict";
13263
13263
  var u = require_universalify().fromPromise;
13264
- var path15 = require("path");
13265
- var fs16 = require_fs();
13264
+ var path16 = require("path");
13265
+ var fs17 = require_fs();
13266
13266
  var { mkdirs, mkdirsSync } = require_mkdirs();
13267
13267
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
13268
13268
  var { symlinkType, symlinkTypeSync } = require_symlink_type();
@@ -13271,44 +13271,44 @@ var require_symlink = __commonJS({
13271
13271
  async function createSymlink(srcpath, dstpath, type) {
13272
13272
  let stats;
13273
13273
  try {
13274
- stats = await fs16.lstat(dstpath);
13274
+ stats = await fs17.lstat(dstpath);
13275
13275
  } catch {
13276
13276
  }
13277
13277
  if (stats && stats.isSymbolicLink()) {
13278
13278
  const [srcStat, dstStat] = await Promise.all([
13279
- fs16.stat(srcpath),
13280
- fs16.stat(dstpath)
13279
+ fs17.stat(srcpath),
13280
+ fs17.stat(dstpath)
13281
13281
  ]);
13282
13282
  if (areIdentical(srcStat, dstStat)) return;
13283
13283
  }
13284
13284
  const relative = await symlinkPaths(srcpath, dstpath);
13285
13285
  srcpath = relative.toDst;
13286
13286
  const toType = await symlinkType(relative.toCwd, type);
13287
- const dir = path15.dirname(dstpath);
13287
+ const dir = path16.dirname(dstpath);
13288
13288
  if (!await pathExists(dir)) {
13289
13289
  await mkdirs(dir);
13290
13290
  }
13291
- return fs16.symlink(srcpath, dstpath, toType);
13291
+ return fs17.symlink(srcpath, dstpath, toType);
13292
13292
  }
13293
13293
  function createSymlinkSync(srcpath, dstpath, type) {
13294
13294
  let stats;
13295
13295
  try {
13296
- stats = fs16.lstatSync(dstpath);
13296
+ stats = fs17.lstatSync(dstpath);
13297
13297
  } catch {
13298
13298
  }
13299
13299
  if (stats && stats.isSymbolicLink()) {
13300
- const srcStat = fs16.statSync(srcpath);
13301
- const dstStat = fs16.statSync(dstpath);
13300
+ const srcStat = fs17.statSync(srcpath);
13301
+ const dstStat = fs17.statSync(dstpath);
13302
13302
  if (areIdentical(srcStat, dstStat)) return;
13303
13303
  }
13304
13304
  const relative = symlinkPathsSync(srcpath, dstpath);
13305
13305
  srcpath = relative.toDst;
13306
13306
  type = symlinkTypeSync(relative.toCwd, type);
13307
- const dir = path15.dirname(dstpath);
13308
- const exists = fs16.existsSync(dir);
13309
- if (exists) return fs16.symlinkSync(srcpath, dstpath, type);
13307
+ const dir = path16.dirname(dstpath);
13308
+ const exists = fs17.existsSync(dir);
13309
+ if (exists) return fs17.symlinkSync(srcpath, dstpath, type);
13310
13310
  mkdirsSync(dir);
13311
- return fs16.symlinkSync(srcpath, dstpath, type);
13311
+ return fs17.symlinkSync(srcpath, dstpath, type);
13312
13312
  }
13313
13313
  module2.exports = {
13314
13314
  createSymlink: u(createSymlink),
@@ -13377,9 +13377,9 @@ var require_jsonfile = __commonJS({
13377
13377
  if (typeof options === "string") {
13378
13378
  options = { encoding: options };
13379
13379
  }
13380
- const fs16 = options.fs || _fs;
13380
+ const fs17 = options.fs || _fs;
13381
13381
  const shouldThrow = "throws" in options ? options.throws : true;
13382
- let data = await universalify.fromCallback(fs16.readFile)(file2, options);
13382
+ let data = await universalify.fromCallback(fs17.readFile)(file2, options);
13383
13383
  data = stripBom(data);
13384
13384
  let obj;
13385
13385
  try {
@@ -13399,10 +13399,10 @@ var require_jsonfile = __commonJS({
13399
13399
  if (typeof options === "string") {
13400
13400
  options = { encoding: options };
13401
13401
  }
13402
- const fs16 = options.fs || _fs;
13402
+ const fs17 = options.fs || _fs;
13403
13403
  const shouldThrow = "throws" in options ? options.throws : true;
13404
13404
  try {
13405
- let content = fs16.readFileSync(file2, options);
13405
+ let content = fs17.readFileSync(file2, options);
13406
13406
  content = stripBom(content);
13407
13407
  return JSON.parse(content, options.reviver);
13408
13408
  } catch (err) {
@@ -13415,15 +13415,15 @@ var require_jsonfile = __commonJS({
13415
13415
  }
13416
13416
  }
13417
13417
  async function _writeFile(file2, obj, options = {}) {
13418
- const fs16 = options.fs || _fs;
13418
+ const fs17 = options.fs || _fs;
13419
13419
  const str = stringify2(obj, options);
13420
- await universalify.fromCallback(fs16.writeFile)(file2, str, options);
13420
+ await universalify.fromCallback(fs17.writeFile)(file2, str, options);
13421
13421
  }
13422
13422
  var writeFile = universalify.fromPromise(_writeFile);
13423
13423
  function writeFileSync2(file2, obj, options = {}) {
13424
- const fs16 = options.fs || _fs;
13424
+ const fs17 = options.fs || _fs;
13425
13425
  const str = stringify2(obj, options);
13426
- return fs16.writeFileSync(file2, str, options);
13426
+ return fs17.writeFileSync(file2, str, options);
13427
13427
  }
13428
13428
  module2.exports = {
13429
13429
  readFile,
@@ -13454,23 +13454,23 @@ var require_output_file = __commonJS({
13454
13454
  "node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
13455
13455
  "use strict";
13456
13456
  var u = require_universalify().fromPromise;
13457
- var fs16 = require_fs();
13458
- var path15 = require("path");
13457
+ var fs17 = require_fs();
13458
+ var path16 = require("path");
13459
13459
  var mkdir = require_mkdirs();
13460
13460
  var pathExists = require_path_exists().pathExists;
13461
13461
  async function outputFile(file2, data, encoding = "utf-8") {
13462
- const dir = path15.dirname(file2);
13462
+ const dir = path16.dirname(file2);
13463
13463
  if (!await pathExists(dir)) {
13464
13464
  await mkdir.mkdirs(dir);
13465
13465
  }
13466
- return fs16.writeFile(file2, data, encoding);
13466
+ return fs17.writeFile(file2, data, encoding);
13467
13467
  }
13468
13468
  function outputFileSync(file2, ...args) {
13469
- const dir = path15.dirname(file2);
13470
- if (!fs16.existsSync(dir)) {
13469
+ const dir = path16.dirname(file2);
13470
+ if (!fs17.existsSync(dir)) {
13471
13471
  mkdir.mkdirsSync(dir);
13472
13472
  }
13473
- fs16.writeFileSync(file2, ...args);
13473
+ fs17.writeFileSync(file2, ...args);
13474
13474
  }
13475
13475
  module2.exports = {
13476
13476
  outputFile: u(outputFile),
@@ -13529,8 +13529,8 @@ var require_json = __commonJS({
13529
13529
  var require_move = __commonJS({
13530
13530
  "node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
13531
13531
  "use strict";
13532
- var fs16 = require_fs();
13533
- var path15 = require("path");
13532
+ var fs17 = require_fs();
13533
+ var path16 = require("path");
13534
13534
  var { copy } = require_copy2();
13535
13535
  var { remove } = require_remove();
13536
13536
  var { mkdirp } = require_mkdirs();
@@ -13540,8 +13540,8 @@ var require_move = __commonJS({
13540
13540
  const overwrite = opts.overwrite || opts.clobber || false;
13541
13541
  const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
13542
13542
  await stat.checkParentPaths(src, srcStat, dest, "move");
13543
- const destParent = path15.dirname(dest);
13544
- const parsedParentPath = path15.parse(destParent);
13543
+ const destParent = path16.dirname(dest);
13544
+ const parsedParentPath = path16.parse(destParent);
13545
13545
  if (parsedParentPath.root !== destParent) {
13546
13546
  await mkdirp(destParent);
13547
13547
  }
@@ -13556,7 +13556,7 @@ var require_move = __commonJS({
13556
13556
  }
13557
13557
  }
13558
13558
  try {
13559
- await fs16.rename(src, dest);
13559
+ await fs17.rename(src, dest);
13560
13560
  } catch (err) {
13561
13561
  if (err.code !== "EXDEV") {
13562
13562
  throw err;
@@ -13581,8 +13581,8 @@ var require_move = __commonJS({
13581
13581
  var require_move_sync = __commonJS({
13582
13582
  "node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
13583
13583
  "use strict";
13584
- var fs16 = require_graceful_fs();
13585
- var path15 = require("path");
13584
+ var fs17 = require_graceful_fs();
13585
+ var path16 = require("path");
13586
13586
  var copySync = require_copy2().copySync;
13587
13587
  var removeSync = require_remove().removeSync;
13588
13588
  var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -13592,12 +13592,12 @@ var require_move_sync = __commonJS({
13592
13592
  const overwrite = opts.overwrite || opts.clobber || false;
13593
13593
  const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
13594
13594
  stat.checkParentPathsSync(src, srcStat, dest, "move");
13595
- if (!isParentRoot(dest)) mkdirpSync(path15.dirname(dest));
13595
+ if (!isParentRoot(dest)) mkdirpSync(path16.dirname(dest));
13596
13596
  return doRename(src, dest, overwrite, isChangingCase);
13597
13597
  }
13598
13598
  function isParentRoot(dest) {
13599
- const parent = path15.dirname(dest);
13600
- const parsedPath = path15.parse(parent);
13599
+ const parent = path16.dirname(dest);
13600
+ const parsedPath = path16.parse(parent);
13601
13601
  return parsedPath.root === parent;
13602
13602
  }
13603
13603
  function doRename(src, dest, overwrite, isChangingCase) {
@@ -13606,12 +13606,12 @@ var require_move_sync = __commonJS({
13606
13606
  removeSync(dest);
13607
13607
  return rename(src, dest, overwrite);
13608
13608
  }
13609
- if (fs16.existsSync(dest)) throw new Error("dest already exists.");
13609
+ if (fs17.existsSync(dest)) throw new Error("dest already exists.");
13610
13610
  return rename(src, dest, overwrite);
13611
13611
  }
13612
13612
  function rename(src, dest, overwrite) {
13613
13613
  try {
13614
- fs16.renameSync(src, dest);
13614
+ fs17.renameSync(src, dest);
13615
13615
  } catch (err) {
13616
13616
  if (err.code !== "EXDEV") throw err;
13617
13617
  return moveAcrossDevice(src, dest, overwrite);
@@ -16856,8 +16856,8 @@ var require_utils3 = __commonJS({
16856
16856
  }
16857
16857
  return ind;
16858
16858
  }
16859
- function removeDotSegments(path15) {
16860
- let input = path15;
16859
+ function removeDotSegments(path16) {
16860
+ let input = path16;
16861
16861
  const output = [];
16862
16862
  let nextSlash = -1;
16863
16863
  let len = 0;
@@ -17056,8 +17056,8 @@ var require_schemes = __commonJS({
17056
17056
  wsComponent.secure = void 0;
17057
17057
  }
17058
17058
  if (wsComponent.resourceName) {
17059
- const [path15, query] = wsComponent.resourceName.split("?");
17060
- wsComponent.path = path15 && path15 !== "/" ? path15 : void 0;
17059
+ const [path16, query] = wsComponent.resourceName.split("?");
17060
+ wsComponent.path = path16 && path16 !== "/" ? path16 : void 0;
17061
17061
  wsComponent.query = query;
17062
17062
  wsComponent.resourceName = void 0;
17063
17063
  }
@@ -20383,12 +20383,12 @@ var require_dist2 = __commonJS({
20383
20383
  throw new Error(`Unknown format "${name}"`);
20384
20384
  return f;
20385
20385
  };
20386
- function addFormats(ajv, list, fs16, exportName) {
20386
+ function addFormats(ajv, list, fs17, exportName) {
20387
20387
  var _a2;
20388
20388
  var _b;
20389
20389
  (_a2 = (_b = ajv.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = codegen_1._`require("ajv-formats/dist/formats").${exportName}`;
20390
20390
  for (const f of list)
20391
- ajv.addFormat(f, fs16[f]);
20391
+ ajv.addFormat(f, fs17[f]);
20392
20392
  }
20393
20393
  module2.exports = exports2 = formatsPlugin;
20394
20394
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -30990,8 +30990,8 @@ var require_package = __commonJS({
30990
30990
  var require_main = __commonJS({
30991
30991
  "node_modules/dotenv/lib/main.js"(exports2, module2) {
30992
30992
  "use strict";
30993
- var fs16 = require("fs");
30994
- var path15 = require("path");
30993
+ var fs17 = require("fs");
30994
+ var path16 = require("path");
30995
30995
  var os7 = require("os");
30996
30996
  var crypto2 = require("crypto");
30997
30997
  var packageJson = require_package();
@@ -31099,7 +31099,7 @@ var require_main = __commonJS({
31099
31099
  if (options && options.path && options.path.length > 0) {
31100
31100
  if (Array.isArray(options.path)) {
31101
31101
  for (const filepath of options.path) {
31102
- if (fs16.existsSync(filepath)) {
31102
+ if (fs17.existsSync(filepath)) {
31103
31103
  possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
31104
31104
  }
31105
31105
  }
@@ -31107,15 +31107,15 @@ var require_main = __commonJS({
31107
31107
  possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
31108
31108
  }
31109
31109
  } else {
31110
- possibleVaultPath = path15.resolve(process.cwd(), ".env.vault");
31110
+ possibleVaultPath = path16.resolve(process.cwd(), ".env.vault");
31111
31111
  }
31112
- if (fs16.existsSync(possibleVaultPath)) {
31112
+ if (fs17.existsSync(possibleVaultPath)) {
31113
31113
  return possibleVaultPath;
31114
31114
  }
31115
31115
  return null;
31116
31116
  }
31117
31117
  function _resolveHome(envPath) {
31118
- return envPath[0] === "~" ? path15.join(os7.homedir(), envPath.slice(1)) : envPath;
31118
+ return envPath[0] === "~" ? path16.join(os7.homedir(), envPath.slice(1)) : envPath;
31119
31119
  }
31120
31120
  function _configVault(options) {
31121
31121
  const debug = Boolean(options && options.debug);
@@ -31132,7 +31132,7 @@ var require_main = __commonJS({
31132
31132
  return { parsed };
31133
31133
  }
31134
31134
  function configDotenv(options) {
31135
- const dotenvPath = path15.resolve(process.cwd(), ".env");
31135
+ const dotenvPath = path16.resolve(process.cwd(), ".env");
31136
31136
  let encoding = "utf8";
31137
31137
  const debug = Boolean(options && options.debug);
31138
31138
  const quiet = options && "quiet" in options ? options.quiet : true;
@@ -31156,13 +31156,13 @@ var require_main = __commonJS({
31156
31156
  }
31157
31157
  let lastError;
31158
31158
  const parsedAll = {};
31159
- for (const path16 of optionPaths) {
31159
+ for (const path17 of optionPaths) {
31160
31160
  try {
31161
- const parsed = DotenvModule.parse(fs16.readFileSync(path16, { encoding }));
31161
+ const parsed = DotenvModule.parse(fs17.readFileSync(path17, { encoding }));
31162
31162
  DotenvModule.populate(parsedAll, parsed, options);
31163
31163
  } catch (e) {
31164
31164
  if (debug) {
31165
- _debug(`Failed to load ${path16} ${e.message}`);
31165
+ _debug(`Failed to load ${path17} ${e.message}`);
31166
31166
  }
31167
31167
  lastError = e;
31168
31168
  }
@@ -31177,7 +31177,7 @@ var require_main = __commonJS({
31177
31177
  const shortPaths = [];
31178
31178
  for (const filePath of optionPaths) {
31179
31179
  try {
31180
- const relative = path15.relative(process.cwd(), filePath);
31180
+ const relative = path16.relative(process.cwd(), filePath);
31181
31181
  shortPaths.push(relative);
31182
31182
  } catch (e) {
31183
31183
  if (debug) {
@@ -35789,7 +35789,7 @@ var Listr = class {
35789
35789
  };
35790
35790
 
35791
35791
  // src/commands/install.ts
35792
- var import_fs_extra11 = __toESM(require_lib2(), 1);
35792
+ var import_fs_extra12 = __toESM(require_lib2(), 1);
35793
35793
 
35794
35794
  // src/core/context.ts
35795
35795
  var import_os2 = __toESM(require("os"), 1);
@@ -35815,12 +35815,12 @@ var disallowedKeys = /* @__PURE__ */ new Set([
35815
35815
  "constructor"
35816
35816
  ]);
35817
35817
  var digits = new Set("0123456789");
35818
- function getPathSegments(path15) {
35818
+ function getPathSegments(path16) {
35819
35819
  const parts = [];
35820
35820
  let currentSegment = "";
35821
35821
  let currentPart = "start";
35822
35822
  let isIgnoring = false;
35823
- for (const character of path15) {
35823
+ for (const character of path16) {
35824
35824
  switch (character) {
35825
35825
  case "\\": {
35826
35826
  if (currentPart === "index") {
@@ -35942,11 +35942,11 @@ function assertNotStringIndex(object2, key) {
35942
35942
  throw new Error("Cannot use string index");
35943
35943
  }
35944
35944
  }
35945
- function getProperty(object2, path15, value) {
35946
- if (!isObject(object2) || typeof path15 !== "string") {
35945
+ function getProperty(object2, path16, value) {
35946
+ if (!isObject(object2) || typeof path16 !== "string") {
35947
35947
  return value === void 0 ? object2 : value;
35948
35948
  }
35949
- const pathArray = getPathSegments(path15);
35949
+ const pathArray = getPathSegments(path16);
35950
35950
  if (pathArray.length === 0) {
35951
35951
  return value;
35952
35952
  }
@@ -35966,12 +35966,12 @@ function getProperty(object2, path15, value) {
35966
35966
  }
35967
35967
  return object2 === void 0 ? value : object2;
35968
35968
  }
35969
- function setProperty(object2, path15, value) {
35970
- if (!isObject(object2) || typeof path15 !== "string") {
35969
+ function setProperty(object2, path16, value) {
35970
+ if (!isObject(object2) || typeof path16 !== "string") {
35971
35971
  return object2;
35972
35972
  }
35973
35973
  const root = object2;
35974
- const pathArray = getPathSegments(path15);
35974
+ const pathArray = getPathSegments(path16);
35975
35975
  for (let index = 0; index < pathArray.length; index++) {
35976
35976
  const key = pathArray[index];
35977
35977
  assertNotStringIndex(object2, key);
@@ -35984,11 +35984,11 @@ function setProperty(object2, path15, value) {
35984
35984
  }
35985
35985
  return root;
35986
35986
  }
35987
- function deleteProperty(object2, path15) {
35988
- if (!isObject(object2) || typeof path15 !== "string") {
35987
+ function deleteProperty(object2, path16) {
35988
+ if (!isObject(object2) || typeof path16 !== "string") {
35989
35989
  return false;
35990
35990
  }
35991
- const pathArray = getPathSegments(path15);
35991
+ const pathArray = getPathSegments(path16);
35992
35992
  for (let index = 0; index < pathArray.length; index++) {
35993
35993
  const key = pathArray[index];
35994
35994
  assertNotStringIndex(object2, key);
@@ -36002,11 +36002,11 @@ function deleteProperty(object2, path15) {
36002
36002
  }
36003
36003
  }
36004
36004
  }
36005
- function hasProperty(object2, path15) {
36006
- if (!isObject(object2) || typeof path15 !== "string") {
36005
+ function hasProperty(object2, path16) {
36006
+ if (!isObject(object2) || typeof path16 !== "string") {
36007
36007
  return false;
36008
36008
  }
36009
- const pathArray = getPathSegments(path15);
36009
+ const pathArray = getPathSegments(path16);
36010
36010
  if (pathArray.length === 0) {
36011
36011
  return false;
36012
36012
  }
@@ -37217,8 +37217,8 @@ function detectAdapter(systemRoot) {
37217
37217
  // src/core/diff.ts
37218
37218
  var IGNORED_ITEMS = /* @__PURE__ */ new Set(["__pycache__", ".DS_Store", "Thumbs.db", ".gitkeep", "node_modules"]);
37219
37219
  var PruneModeReadError = class extends Error {
37220
- constructor(path15) {
37221
- super(`Cannot read ${path15} in prune mode \u2014 aborting to prevent accidental deletion`);
37220
+ constructor(path16) {
37221
+ super(`Cannot read ${path16} in prune mode \u2014 aborting to prevent accidental deletion`);
37222
37222
  this.name = "PruneModeReadError";
37223
37223
  }
37224
37224
  };
@@ -40695,12 +40695,16 @@ var sym = {
40695
40695
  };
40696
40696
 
40697
40697
  // src/commands/install.ts
40698
- var import_path11 = __toESM(require("path"), 1);
40698
+ var import_path12 = __toESM(require("path"), 1);
40699
40699
 
40700
40700
  // src/commands/install-project.ts
40701
+ var import_path11 = __toESM(require("path"), 1);
40702
+ var import_fs_extra11 = __toESM(require_lib2(), 1);
40703
+ var import_child_process2 = require("child_process");
40704
+
40705
+ // src/commands/install-service-skills.ts
40701
40706
  var import_path10 = __toESM(require("path"), 1);
40702
40707
  var import_fs_extra10 = __toESM(require_lib2(), 1);
40703
- var import_child_process2 = require("child_process");
40704
40708
  function resolvePkgRoot() {
40705
40709
  const candidates = [
40706
40710
  import_path10.default.resolve(__dirname, "../.."),
@@ -40713,8 +40717,87 @@ function resolvePkgRoot() {
40713
40717
  return match;
40714
40718
  }
40715
40719
  var PKG_ROOT = resolvePkgRoot();
40716
- var PROJECT_SKILLS_DIR = import_path10.default.join(PKG_ROOT, "project-skills");
40717
- var MCP_CORE_CONFIG_PATH = import_path10.default.join(PKG_ROOT, "config", "mcp_servers.json");
40720
+ var SKILLS_SRC = import_path10.default.join(PKG_ROOT, "project-skills", "service-skills-set", ".claude");
40721
+ var MARKER_DOC = "# [jaggers] doc-reminder";
40722
+ var MARKER_STALENESS = "# [jaggers] skill-staleness";
40723
+ async function installGitHooks(projectRoot, skillsSrc = SKILLS_SRC) {
40724
+ const gitHooksSrc = import_path10.default.join(skillsSrc, "git-hooks");
40725
+ const gitHooksDest = import_path10.default.join(projectRoot, ".claude", "git-hooks");
40726
+ await import_fs_extra10.default.copy(gitHooksSrc, gitHooksDest, { overwrite: true });
40727
+ const docScript = import_path10.default.join(projectRoot, ".claude", "git-hooks", "doc_reminder.py");
40728
+ const stalenessScript = import_path10.default.join(projectRoot, ".claude", "git-hooks", "skill_staleness.py");
40729
+ const preCommit = import_path10.default.join(projectRoot, ".githooks", "pre-commit");
40730
+ const prePush = import_path10.default.join(projectRoot, ".githooks", "pre-push");
40731
+ for (const hookPath of [preCommit, prePush]) {
40732
+ if (!await import_fs_extra10.default.pathExists(hookPath)) {
40733
+ await import_fs_extra10.default.mkdirp(import_path10.default.dirname(hookPath));
40734
+ await import_fs_extra10.default.writeFile(hookPath, "#!/usr/bin/env bash\n", { mode: 493 });
40735
+ }
40736
+ }
40737
+ const snippets = [
40738
+ [
40739
+ preCommit,
40740
+ MARKER_DOC,
40741
+ `
40742
+ ${MARKER_DOC}
40743
+ if command -v python3 &>/dev/null && [ -f "${docScript}" ]; then
40744
+ python3 "${docScript}" || true
40745
+ fi
40746
+ `
40747
+ ],
40748
+ [
40749
+ prePush,
40750
+ MARKER_STALENESS,
40751
+ `
40752
+ ${MARKER_STALENESS}
40753
+ if command -v python3 &>/dev/null && [ -f "${stalenessScript}" ]; then
40754
+ python3 "${stalenessScript}" || true
40755
+ fi
40756
+ `
40757
+ ]
40758
+ ];
40759
+ const hookFiles = [];
40760
+ let anyAdded = false;
40761
+ for (const [hookPath, marker, snippet] of snippets) {
40762
+ const content = await import_fs_extra10.default.readFile(hookPath, "utf8");
40763
+ const name = import_path10.default.basename(hookPath);
40764
+ if (!content.includes(marker)) {
40765
+ await import_fs_extra10.default.writeFile(hookPath, content + snippet);
40766
+ hookFiles.push({ name, status: "added" });
40767
+ anyAdded = true;
40768
+ } else {
40769
+ hookFiles.push({ name, status: "already-present" });
40770
+ }
40771
+ }
40772
+ if (anyAdded) {
40773
+ const gitHooksDir = import_path10.default.join(projectRoot, ".git", "hooks");
40774
+ await import_fs_extra10.default.mkdirp(gitHooksDir);
40775
+ for (const [src, name] of [[preCommit, "pre-commit"], [prePush, "pre-push"]]) {
40776
+ if (await import_fs_extra10.default.pathExists(src)) {
40777
+ const dest = import_path10.default.join(gitHooksDir, name);
40778
+ await import_fs_extra10.default.copy(src, dest, { overwrite: true });
40779
+ await import_fs_extra10.default.chmod(dest, 493);
40780
+ }
40781
+ }
40782
+ }
40783
+ return { hookFiles };
40784
+ }
40785
+
40786
+ // src/commands/install-project.ts
40787
+ function resolvePkgRoot2() {
40788
+ const candidates = [
40789
+ import_path11.default.resolve(__dirname, "../.."),
40790
+ import_path11.default.resolve(__dirname, "../../..")
40791
+ ];
40792
+ const match = candidates.find((candidate) => import_fs_extra11.default.existsSync(import_path11.default.join(candidate, "project-skills")));
40793
+ if (!match) {
40794
+ throw new Error("Unable to locate project-skills directory from CLI runtime.");
40795
+ }
40796
+ return match;
40797
+ }
40798
+ var PKG_ROOT2 = resolvePkgRoot2();
40799
+ var PROJECT_SKILLS_DIR = import_path11.default.join(PKG_ROOT2, "project-skills");
40800
+ var MCP_CORE_CONFIG_PATH = import_path11.default.join(PKG_ROOT2, "config", "mcp_servers.json");
40718
40801
  var syncedProjectMcpRoots = /* @__PURE__ */ new Set();
40719
40802
  function resolveEnvVars(value) {
40720
40803
  if (typeof value !== "string") return value;
@@ -40751,13 +40834,13 @@ function buildProjectMcpArgs(name, server) {
40751
40834
  async function syncProjectMcpServers(projectRoot) {
40752
40835
  if (syncedProjectMcpRoots.has(projectRoot)) return;
40753
40836
  syncedProjectMcpRoots.add(projectRoot);
40754
- if (!await import_fs_extra10.default.pathExists(MCP_CORE_CONFIG_PATH)) return;
40837
+ if (!await import_fs_extra11.default.pathExists(MCP_CORE_CONFIG_PATH)) return;
40755
40838
  console.log(kleur_default.bold("\n\u2500\u2500 Installing MCP (project scope) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
40756
40839
  if (!hasClaudeCli()) {
40757
40840
  console.log(kleur_default.yellow(" \u26A0 Claude CLI not found; skipping project-scope MCP registration."));
40758
40841
  return;
40759
40842
  }
40760
- const mcpConfig = await import_fs_extra10.default.readJson(MCP_CORE_CONFIG_PATH);
40843
+ const mcpConfig = await import_fs_extra11.default.readJson(MCP_CORE_CONFIG_PATH);
40761
40844
  const servers = Object.entries(mcpConfig?.mcpServers ?? {});
40762
40845
  if (servers.length === 0) {
40763
40846
  console.log(kleur_default.dim(" \u2139 No core MCP servers configured."));
@@ -40791,14 +40874,14 @@ async function syncProjectMcpServers(projectRoot) {
40791
40874
  console.log(kleur_default.dim(` \u21B3 MCP project-scope result: ${added} added, ${existing} existing, ${failed} failed`));
40792
40875
  }
40793
40876
  async function getAvailableProjectSkills() {
40794
- if (!await import_fs_extra10.default.pathExists(PROJECT_SKILLS_DIR)) {
40877
+ if (!await import_fs_extra11.default.pathExists(PROJECT_SKILLS_DIR)) {
40795
40878
  return [];
40796
40879
  }
40797
- const entries = await import_fs_extra10.default.readdir(PROJECT_SKILLS_DIR);
40880
+ const entries = await import_fs_extra11.default.readdir(PROJECT_SKILLS_DIR);
40798
40881
  const skills = [];
40799
40882
  for (const entry of entries) {
40800
- const entryPath = import_path10.default.join(PROJECT_SKILLS_DIR, entry);
40801
- const stat = await import_fs_extra10.default.stat(entryPath);
40883
+ const entryPath = import_path11.default.join(PROJECT_SKILLS_DIR, entry);
40884
+ const stat = await import_fs_extra11.default.stat(entryPath);
40802
40885
  if (stat.isDirectory()) {
40803
40886
  skills.push(entry);
40804
40887
  }
@@ -40815,14 +40898,34 @@ function deepMergeHooks(existing, incoming) {
40815
40898
  } else {
40816
40899
  const existingEventHooks = Array.isArray(result.hooks[event]) ? result.hooks[event] : [result.hooks[event]];
40817
40900
  const incomingEventHooks = Array.isArray(incomingHooks) ? incomingHooks : [incomingHooks];
40818
- const existingCommands = new Set(
40819
- existingEventHooks.map((h) => h.command || h.hooks?.[0]?.command).filter(Boolean)
40820
- );
40821
- const newHooks = incomingEventHooks.filter((h) => {
40822
- const cmd = h.command || h.hooks?.[0]?.command;
40823
- return !cmd || !existingCommands.has(cmd);
40824
- });
40825
- result.hooks[event] = [...existingEventHooks, ...newHooks];
40901
+ const getCommand = (h) => h.command || h.hooks?.[0]?.command;
40902
+ const mergeMatcher = (existingMatcher, incomingMatcher) => {
40903
+ const existingParts = existingMatcher.split("|").map((s) => s.trim()).filter(Boolean);
40904
+ const incomingParts = incomingMatcher.split("|").map((s) => s.trim()).filter(Boolean);
40905
+ const merged = [...existingParts];
40906
+ for (const part of incomingParts) {
40907
+ if (!merged.includes(part)) merged.push(part);
40908
+ }
40909
+ return merged.join("|");
40910
+ };
40911
+ const mergedEventHooks = [...existingEventHooks];
40912
+ for (const incomingHook of incomingEventHooks) {
40913
+ const incomingCmd = getCommand(incomingHook);
40914
+ if (!incomingCmd) {
40915
+ mergedEventHooks.push(incomingHook);
40916
+ continue;
40917
+ }
40918
+ const existingIndex = mergedEventHooks.findIndex((h) => getCommand(h) === incomingCmd);
40919
+ if (existingIndex === -1) {
40920
+ mergedEventHooks.push(incomingHook);
40921
+ continue;
40922
+ }
40923
+ const existingHook = mergedEventHooks[existingIndex];
40924
+ if (typeof existingHook.matcher === "string" && typeof incomingHook.matcher === "string") {
40925
+ existingHook.matcher = mergeMatcher(existingHook.matcher, incomingHook.matcher);
40926
+ }
40927
+ }
40928
+ result.hooks[event] = mergedEventHooks;
40826
40929
  }
40827
40930
  }
40828
40931
  return result;
@@ -40841,8 +40944,8 @@ function extractReadmeDescription(readmeContent) {
40841
40944
  return "No description available";
40842
40945
  }
40843
40946
  async function installProjectSkill(toolName, projectRootOverride) {
40844
- const skillPath = import_path10.default.join(PROJECT_SKILLS_DIR, toolName);
40845
- if (!await import_fs_extra10.default.pathExists(skillPath)) {
40947
+ const skillPath = import_path11.default.join(PROJECT_SKILLS_DIR, toolName);
40948
+ if (!await import_fs_extra11.default.pathExists(skillPath)) {
40846
40949
  console.error(kleur_default.red(`
40847
40950
  \u2717 Project skill '${toolName}' not found.
40848
40951
  `));
@@ -40852,67 +40955,74 @@ async function installProjectSkill(toolName, projectRootOverride) {
40852
40955
  process.exit(1);
40853
40956
  }
40854
40957
  const projectRoot = projectRootOverride ?? getProjectRoot();
40855
- const claudeDir = import_path10.default.join(projectRoot, ".claude");
40958
+ const claudeDir = import_path11.default.join(projectRoot, ".claude");
40856
40959
  console.log(kleur_default.dim(`
40857
40960
  Installing project skill: ${kleur_default.cyan(toolName)}`));
40858
40961
  console.log(kleur_default.dim(` Target: ${projectRoot}
40859
40962
  `));
40860
- const skillClaudeDir = import_path10.default.join(skillPath, ".claude");
40861
- const skillSettingsPath = import_path10.default.join(skillClaudeDir, "settings.json");
40862
- const skillSkillsDir = import_path10.default.join(skillClaudeDir, "skills");
40863
- const skillReadmePath = import_path10.default.join(skillPath, "README.md");
40864
- if (await import_fs_extra10.default.pathExists(skillSettingsPath)) {
40963
+ const skillClaudeDir = import_path11.default.join(skillPath, ".claude");
40964
+ const skillSettingsPath = import_path11.default.join(skillClaudeDir, "settings.json");
40965
+ const skillSkillsDir = import_path11.default.join(skillClaudeDir, "skills");
40966
+ const skillReadmePath = import_path11.default.join(skillPath, "README.md");
40967
+ if (await import_fs_extra11.default.pathExists(skillSettingsPath)) {
40865
40968
  console.log(kleur_default.bold("\u2500\u2500 Installing Hooks \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
40866
- const targetSettingsPath = import_path10.default.join(claudeDir, "settings.json");
40867
- await import_fs_extra10.default.mkdirp(import_path10.default.dirname(targetSettingsPath));
40969
+ const targetSettingsPath = import_path11.default.join(claudeDir, "settings.json");
40970
+ await import_fs_extra11.default.mkdirp(import_path11.default.dirname(targetSettingsPath));
40868
40971
  let existingSettings = {};
40869
- if (await import_fs_extra10.default.pathExists(targetSettingsPath)) {
40972
+ if (await import_fs_extra11.default.pathExists(targetSettingsPath)) {
40870
40973
  try {
40871
- existingSettings = JSON.parse(await import_fs_extra10.default.readFile(targetSettingsPath, "utf8"));
40974
+ existingSettings = JSON.parse(await import_fs_extra11.default.readFile(targetSettingsPath, "utf8"));
40872
40975
  } catch {
40873
40976
  }
40874
40977
  }
40875
- const incomingSettings = JSON.parse(await import_fs_extra10.default.readFile(skillSettingsPath, "utf8"));
40978
+ const incomingSettings = JSON.parse(await import_fs_extra11.default.readFile(skillSettingsPath, "utf8"));
40876
40979
  const mergedSettings = deepMergeHooks(existingSettings, incomingSettings);
40877
- await import_fs_extra10.default.writeFile(targetSettingsPath, JSON.stringify(mergedSettings, null, 2) + "\n");
40980
+ await import_fs_extra11.default.writeFile(targetSettingsPath, JSON.stringify(mergedSettings, null, 2) + "\n");
40878
40981
  console.log(`${kleur_default.green(" \u2713")} settings.json (hooks merged)`);
40879
40982
  }
40880
40983
  await syncProjectMcpServers(projectRoot);
40881
- if (await import_fs_extra10.default.pathExists(skillSkillsDir)) {
40984
+ if (await import_fs_extra11.default.pathExists(skillSkillsDir)) {
40882
40985
  console.log(kleur_default.bold("\n\u2500\u2500 Installing Skills \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
40883
- const targetSkillsDir = import_path10.default.join(claudeDir, "skills");
40884
- const skillEntries = await import_fs_extra10.default.readdir(skillSkillsDir);
40986
+ const targetSkillsDir = import_path11.default.join(claudeDir, "skills");
40987
+ const skillEntries = await import_fs_extra11.default.readdir(skillSkillsDir);
40885
40988
  for (const entry of skillEntries) {
40886
- const src = import_path10.default.join(skillSkillsDir, entry);
40887
- const dest = import_path10.default.join(targetSkillsDir, entry);
40888
- await import_fs_extra10.default.copy(src, dest, {
40989
+ const src = import_path11.default.join(skillSkillsDir, entry);
40990
+ const dest = import_path11.default.join(targetSkillsDir, entry);
40991
+ await import_fs_extra11.default.copy(src, dest, {
40889
40992
  filter: (src2) => !src2.includes(".Zone.Identifier")
40890
40993
  });
40891
40994
  console.log(`${kleur_default.green(" \u2713")} .claude/skills/${entry}/`);
40892
40995
  }
40893
40996
  }
40894
- if (await import_fs_extra10.default.pathExists(skillClaudeDir)) {
40895
- const claudeEntries = await import_fs_extra10.default.readdir(skillClaudeDir);
40997
+ if (await import_fs_extra11.default.pathExists(skillClaudeDir)) {
40998
+ const claudeEntries = await import_fs_extra11.default.readdir(skillClaudeDir);
40896
40999
  for (const entry of claudeEntries) {
40897
41000
  if (entry === "settings.json" || entry === "skills") {
40898
41001
  continue;
40899
41002
  }
40900
- const src = import_path10.default.join(skillClaudeDir, entry);
40901
- const dest = import_path10.default.join(claudeDir, entry);
40902
- await import_fs_extra10.default.copy(src, dest, {
41003
+ const src = import_path11.default.join(skillClaudeDir, entry);
41004
+ const dest = import_path11.default.join(claudeDir, entry);
41005
+ await import_fs_extra11.default.copy(src, dest, {
40903
41006
  filter: (src2) => !src2.includes(".Zone.Identifier")
40904
41007
  });
40905
41008
  console.log(`${kleur_default.green(" \u2713")} .claude/${entry}/`);
40906
41009
  }
40907
41010
  }
40908
- if (await import_fs_extra10.default.pathExists(skillReadmePath)) {
41011
+ if (await import_fs_extra11.default.pathExists(skillReadmePath)) {
40909
41012
  console.log(kleur_default.bold("\n\u2500\u2500 Installing Documentation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
40910
- const docsDir = import_path10.default.join(claudeDir, "docs");
40911
- await import_fs_extra10.default.mkdirp(docsDir);
40912
- const destReadme = import_path10.default.join(docsDir, `${toolName}-readme.md`);
40913
- await import_fs_extra10.default.copy(skillReadmePath, destReadme);
41013
+ const docsDir = import_path11.default.join(claudeDir, "docs");
41014
+ await import_fs_extra11.default.mkdirp(docsDir);
41015
+ const destReadme = import_path11.default.join(docsDir, `${toolName}-readme.md`);
41016
+ await import_fs_extra11.default.copy(skillReadmePath, destReadme);
40914
41017
  console.log(`${kleur_default.green(" \u2713")} .claude/docs/${toolName}-readme.md`);
40915
41018
  }
41019
+ if (toolName === "service-skills-set") {
41020
+ console.log(kleur_default.bold("\n\u2500\u2500 Installing Git Hooks \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
41021
+ await installGitHooks(projectRoot, skillClaudeDir);
41022
+ console.log(`${kleur_default.green(" \u2713")} .githooks/pre-commit`);
41023
+ console.log(`${kleur_default.green(" \u2713")} .githooks/pre-push`);
41024
+ console.log(`${kleur_default.green(" \u2713")} activated in .git/hooks/`);
41025
+ }
40916
41026
  console.log(kleur_default.bold("\n\u2500\u2500 Post-Install Steps \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
40917
41027
  console.log(kleur_default.yellow("\n \u26A0 IMPORTANT: Manual setup required!\n"));
40918
41028
  console.log(kleur_default.white(` ${toolName} requires additional configuration.`));
@@ -40942,6 +41052,78 @@ Installing ${skills.length} project skills:
40942
41052
  await installProjectSkill(skill, projectRoot);
40943
41053
  }
40944
41054
  }
41055
+ function buildProjectInitGuide() {
41056
+ const lines = [
41057
+ kleur_default.bold("\nProject Init \u2014 Recommended baseline\n"),
41058
+ `${kleur_default.cyan("1) Install a quality gate skill (or equivalent checks):")}`,
41059
+ kleur_default.dim(" - TypeScript projects: xtrm install project ts-quality-gate"),
41060
+ kleur_default.dim(" - Python projects: xtrm install project py-quality-gate"),
41061
+ kleur_default.dim(" - TDD workflow: xtrm install project tdd-guard"),
41062
+ "",
41063
+ `${kleur_default.cyan("2) Ensure your checks are actually configured in this repo:")}`,
41064
+ kleur_default.dim(" - Testing: commands should run and fail when behavior regresses"),
41065
+ kleur_default.dim(" - Linting/formatting: ESLint+Prettier (TS) or ruff (Python)"),
41066
+ kleur_default.dim(" - Type checks: tsc (TS) or mypy/pyright (Python)"),
41067
+ kleur_default.dim(" - Hooks only enforce what your project config defines"),
41068
+ "",
41069
+ `${kleur_default.cyan("3) Optional: Service Skills Set (service-skills-set)")}`,
41070
+ kleur_default.dim(" - For multi-service/Docker repos with repeated operational workflows"),
41071
+ kleur_default.dim(" - Adds project hooks + skills that route Claude to service-specific context"),
41072
+ kleur_default.dim(" - Helps keep architecture knowledge persistent across sessions"),
41073
+ "",
41074
+ kleur_default.bold("Quick start commands:"),
41075
+ kleur_default.dim(" xtrm install project list"),
41076
+ kleur_default.dim(" xtrm install project ts-quality-gate # or py-quality-gate / tdd-guard"),
41077
+ ""
41078
+ ];
41079
+ return lines.join("\n");
41080
+ }
41081
+ async function printProjectInitGuide() {
41082
+ console.log(buildProjectInitGuide());
41083
+ await runBdInitForProject();
41084
+ }
41085
+ async function installProjectByName(toolName) {
41086
+ if (toolName === "all" || toolName === "*") {
41087
+ await installAllProjectSkills();
41088
+ return;
41089
+ }
41090
+ await installProjectSkill(toolName);
41091
+ }
41092
+ async function runBdInitForProject() {
41093
+ let projectRoot;
41094
+ try {
41095
+ projectRoot = getProjectRoot();
41096
+ } catch (err) {
41097
+ console.log(kleur_default.yellow(`
41098
+ \u26A0 Skipping bd init: ${err.message}
41099
+ `));
41100
+ return;
41101
+ }
41102
+ console.log(kleur_default.bold("Running beads initialization (bd init)..."));
41103
+ const result = (0, import_child_process2.spawnSync)("bd", ["init"], {
41104
+ cwd: projectRoot,
41105
+ encoding: "utf8",
41106
+ timeout: 15e3
41107
+ });
41108
+ if (result.error) {
41109
+ console.log(kleur_default.yellow(` \u26A0 Could not run bd init (${result.error.message})`));
41110
+ return;
41111
+ }
41112
+ if (result.status !== 0) {
41113
+ const text = `${result.stdout || ""}
41114
+ ${result.stderr || ""}`.toLowerCase();
41115
+ if (text.includes("already initialized")) {
41116
+ console.log(kleur_default.dim(" \u2713 beads workspace already initialized"));
41117
+ return;
41118
+ }
41119
+ if (result.stdout) process.stdout.write(result.stdout);
41120
+ if (result.stderr) process.stderr.write(result.stderr);
41121
+ console.log(kleur_default.yellow(` \u26A0 bd init exited with code ${result.status}`));
41122
+ return;
41123
+ }
41124
+ if (result.stdout) process.stdout.write(result.stdout);
41125
+ if (result.stderr) process.stderr.write(result.stderr);
41126
+ }
40945
41127
  async function listProjectSkills() {
40946
41128
  const entries = await getAvailableProjectSkills();
40947
41129
  if (entries.length === 0) {
@@ -40950,10 +41132,10 @@ async function listProjectSkills() {
40950
41132
  }
40951
41133
  const skills = [];
40952
41134
  for (const entry of entries) {
40953
- const readmePath = import_path10.default.join(PROJECT_SKILLS_DIR, entry, "README.md");
41135
+ const readmePath = import_path11.default.join(PROJECT_SKILLS_DIR, entry, "README.md");
40954
41136
  let description = "No description available";
40955
- if (await import_fs_extra10.default.pathExists(readmePath)) {
40956
- const readmeContent = await import_fs_extra10.default.readFile(readmePath, "utf8");
41137
+ if (await import_fs_extra11.default.pathExists(readmePath)) {
41138
+ const readmeContent = await import_fs_extra11.default.readFile(readmePath, "utf8");
40957
41139
  description = extractReadmeDescription(readmeContent).slice(0, 80);
40958
41140
  }
40959
41141
  skills.push({ name: entry, description });
@@ -40988,17 +41170,13 @@ function getProjectRoot() {
40988
41170
  if (result.status !== 0) {
40989
41171
  throw new Error("Not inside a git repository. Run this command from your target project directory.");
40990
41172
  }
40991
- return import_path10.default.resolve(result.stdout.trim());
41173
+ return import_path11.default.resolve(result.stdout.trim());
40992
41174
  }
40993
41175
  function createInstallProjectCommand() {
40994
41176
  const installProjectCmd = new Command("project").description("Install a project-specific skill package");
40995
41177
  installProjectCmd.argument("<tool-name>", "Name of the project skill to install").action(async (toolName) => {
40996
41178
  try {
40997
- if (toolName === "all" || toolName === "*") {
40998
- await installAllProjectSkills();
40999
- return;
41000
- }
41001
- await installProjectSkill(toolName);
41179
+ await installProjectByName(toolName);
41002
41180
  } catch (err) {
41003
41181
  console.error(kleur_default.red(`
41004
41182
  \u2717 ${err.message}
@@ -41009,9 +41187,33 @@ function createInstallProjectCommand() {
41009
41187
  const listCmd = new Command("list").description("List available project skills").action(async () => {
41010
41188
  await listProjectSkills();
41011
41189
  });
41190
+ const initCmd = new Command("init").description("Show project onboarding guidance (quality gates + service skills)").action(async () => {
41191
+ await printProjectInitGuide();
41192
+ });
41012
41193
  installProjectCmd.addCommand(listCmd);
41194
+ installProjectCmd.addCommand(initCmd);
41013
41195
  return installProjectCmd;
41014
41196
  }
41197
+ function createProjectCommand() {
41198
+ const projectCmd = new Command("project").description("Project skill onboarding and installation helpers");
41199
+ projectCmd.command("init").description("Show project onboarding guidance (quality gates + service skills)").action(async () => {
41200
+ await printProjectInitGuide();
41201
+ });
41202
+ projectCmd.command("list").description("List available project skills").action(async () => {
41203
+ await listProjectSkills();
41204
+ });
41205
+ projectCmd.command("install").argument("<tool-name>", "Name of the project skill to install").description("Alias for xtrm install project <tool-name>").action(async (toolName) => {
41206
+ try {
41207
+ await installProjectByName(toolName);
41208
+ } catch (err) {
41209
+ console.error(kleur_default.red(`
41210
+ \u2717 ${err.message}
41211
+ `));
41212
+ process.exit(1);
41213
+ }
41214
+ });
41215
+ return projectCmd;
41216
+ }
41015
41217
 
41016
41218
  // src/commands/install.ts
41017
41219
  var import_child_process3 = require("child_process");
@@ -41064,7 +41266,7 @@ function formatTargetLabel(target) {
41064
41266
  const normalized = target.replace(/\\/g, "/").toLowerCase();
41065
41267
  if (normalized.endsWith("/.agents/skills") || normalized.includes("/.agents/skills/")) return "~/.agents/skills";
41066
41268
  if (normalized.endsWith("/.claude") || normalized.includes("/.claude/")) return "~/.claude";
41067
- return import_path11.default.basename(target);
41269
+ return import_path12.default.basename(target);
41068
41270
  }
41069
41271
  function filterBeadsFromChangeSet(changeSet) {
41070
41272
  return {
@@ -41097,15 +41299,15 @@ function isDoltInstalled() {
41097
41299
  async function needsSettingsSync(repoRoot, target) {
41098
41300
  const normalizedTarget = target.replace(/\\/g, "/").toLowerCase();
41099
41301
  if (normalizedTarget.includes(".agents/skills")) return false;
41100
- const hooksTemplatePath = import_path11.default.join(repoRoot, "config", "hooks.json");
41101
- if (!await import_fs_extra11.default.pathExists(hooksTemplatePath)) return false;
41102
- const requiredEvents = Object.keys((await import_fs_extra11.default.readJson(hooksTemplatePath)).hooks ?? {});
41302
+ const hooksTemplatePath = import_path12.default.join(repoRoot, "config", "hooks.json");
41303
+ if (!await import_fs_extra12.default.pathExists(hooksTemplatePath)) return false;
41304
+ const requiredEvents = Object.keys((await import_fs_extra12.default.readJson(hooksTemplatePath)).hooks ?? {});
41103
41305
  if (requiredEvents.length === 0) return false;
41104
- const targetSettingsPath = import_path11.default.join(target, "settings.json");
41105
- if (!await import_fs_extra11.default.pathExists(targetSettingsPath)) return true;
41306
+ const targetSettingsPath = import_path12.default.join(target, "settings.json");
41307
+ if (!await import_fs_extra12.default.pathExists(targetSettingsPath)) return true;
41106
41308
  let settings = {};
41107
41309
  try {
41108
- settings = await import_fs_extra11.default.readJson(targetSettingsPath);
41310
+ settings = await import_fs_extra12.default.readJson(targetSettingsPath);
41109
41311
  } catch {
41110
41312
  return true;
41111
41313
  }
@@ -41419,7 +41621,7 @@ function createInstallCommand() {
41419
41621
  var import_prompts3 = __toESM(require_prompts3(), 1);
41420
41622
 
41421
41623
  // src/core/manifest.ts
41422
- var import_path12 = require("path");
41624
+ var import_path13 = require("path");
41423
41625
 
41424
41626
  // node_modules/zod/v4/classic/external.js
41425
41627
  var external_exports = {};
@@ -42188,10 +42390,10 @@ function mergeDefs(...defs) {
42188
42390
  function cloneDef(schema) {
42189
42391
  return mergeDefs(schema._zod.def);
42190
42392
  }
42191
- function getElementAtPath(obj, path15) {
42192
- if (!path15)
42393
+ function getElementAtPath(obj, path16) {
42394
+ if (!path16)
42193
42395
  return obj;
42194
- return path15.reduce((acc, key) => acc?.[key], obj);
42396
+ return path16.reduce((acc, key) => acc?.[key], obj);
42195
42397
  }
42196
42398
  function promiseAllObject(promisesObj) {
42197
42399
  const keys = Object.keys(promisesObj);
@@ -42574,11 +42776,11 @@ function aborted(x, startIndex = 0) {
42574
42776
  }
42575
42777
  return false;
42576
42778
  }
42577
- function prefixIssues(path15, issues) {
42779
+ function prefixIssues(path16, issues) {
42578
42780
  return issues.map((iss) => {
42579
42781
  var _a2;
42580
42782
  (_a2 = iss).path ?? (_a2.path = []);
42581
- iss.path.unshift(path15);
42783
+ iss.path.unshift(path16);
42582
42784
  return iss;
42583
42785
  });
42584
42786
  }
@@ -42761,7 +42963,7 @@ function formatError(error49, mapper = (issue2) => issue2.message) {
42761
42963
  }
42762
42964
  function treeifyError(error49, mapper = (issue2) => issue2.message) {
42763
42965
  const result = { errors: [] };
42764
- const processError = (error50, path15 = []) => {
42966
+ const processError = (error50, path16 = []) => {
42765
42967
  var _a2, _b;
42766
42968
  for (const issue2 of error50.issues) {
42767
42969
  if (issue2.code === "invalid_union" && issue2.errors.length) {
@@ -42771,7 +42973,7 @@ function treeifyError(error49, mapper = (issue2) => issue2.message) {
42771
42973
  } else if (issue2.code === "invalid_element") {
42772
42974
  processError({ issues: issue2.issues }, issue2.path);
42773
42975
  } else {
42774
- const fullpath = [...path15, ...issue2.path];
42976
+ const fullpath = [...path16, ...issue2.path];
42775
42977
  if (fullpath.length === 0) {
42776
42978
  result.errors.push(mapper(issue2));
42777
42979
  continue;
@@ -42803,8 +43005,8 @@ function treeifyError(error49, mapper = (issue2) => issue2.message) {
42803
43005
  }
42804
43006
  function toDotPath(_path) {
42805
43007
  const segs = [];
42806
- const path15 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
42807
- for (const seg of path15) {
43008
+ const path16 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
43009
+ for (const seg of path16) {
42808
43010
  if (typeof seg === "number")
42809
43011
  segs.push(`[${seg}]`);
42810
43012
  else if (typeof seg === "symbol")
@@ -54781,13 +54983,13 @@ function resolveRef(ref, ctx) {
54781
54983
  if (!ref.startsWith("#")) {
54782
54984
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
54783
54985
  }
54784
- const path15 = ref.slice(1).split("/").filter(Boolean);
54785
- if (path15.length === 0) {
54986
+ const path16 = ref.slice(1).split("/").filter(Boolean);
54987
+ if (path16.length === 0) {
54786
54988
  return ctx.rootSchema;
54787
54989
  }
54788
54990
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
54789
- if (path15[0] === defsKey) {
54790
- const key = path15[1];
54991
+ if (path16[0] === defsKey) {
54992
+ const key = path16[1];
54791
54993
  if (!key || !ctx.defs[key]) {
54792
54994
  throw new Error(`Reference not found: ${ref}`);
54793
54995
  }
@@ -55230,17 +55432,17 @@ var ManifestSchema = external_exports.object({
55230
55432
  // src/core/manifest.ts
55231
55433
  var MANIFEST_FILE = ".jaggers-sync-manifest.json";
55232
55434
  function getManifestPath(projectDir) {
55233
- return (0, import_path12.join)(projectDir, MANIFEST_FILE);
55435
+ return (0, import_path13.join)(projectDir, MANIFEST_FILE);
55234
55436
  }
55235
55437
 
55236
55438
  // src/commands/status.ts
55237
- var import_fs_extra12 = __toESM(require_lib2(), 1);
55238
- var import_path13 = __toESM(require("path"), 1);
55439
+ var import_fs_extra13 = __toESM(require_lib2(), 1);
55440
+ var import_path14 = __toESM(require("path"), 1);
55239
55441
  function formatTargetLabel2(target) {
55240
55442
  const normalized = target.replace(/\\/g, "/").toLowerCase();
55241
55443
  if (normalized.endsWith("/.agents/skills") || normalized.includes("/.agents/skills/")) return "~/.agents/skills";
55242
55444
  if (normalized.endsWith("/.claude") || normalized.includes("/.claude/")) return "~/.claude";
55243
- return import_path13.default.basename(target);
55445
+ return import_path14.default.basename(target);
55244
55446
  }
55245
55447
  function formatRelativeTime(timestamp) {
55246
55448
  const now = Date.now();
@@ -55260,7 +55462,7 @@ function createStatusCommand() {
55260
55462
  const candidates = getCandidatePaths();
55261
55463
  const targets = [];
55262
55464
  for (const c of candidates) {
55263
- if (await import_fs_extra12.default.pathExists(c.path)) targets.push(c.path);
55465
+ if (await import_fs_extra13.default.pathExists(c.path)) targets.push(c.path);
55264
55466
  }
55265
55467
  if (targets.length === 0) {
55266
55468
  console.log(kleur_default.yellow("\n No agent environments found (~/.claude, ~/.gemini, ~/.qwen)\n"));
@@ -55271,8 +55473,8 @@ function createStatusCommand() {
55271
55473
  const manifestPath = getManifestPath(target);
55272
55474
  let lastSync = null;
55273
55475
  try {
55274
- if (await import_fs_extra12.default.pathExists(manifestPath)) {
55275
- const manifest = await import_fs_extra12.default.readJson(manifestPath);
55476
+ if (await import_fs_extra13.default.pathExists(manifestPath)) {
55477
+ const manifest = await import_fs_extra13.default.readJson(manifestPath);
55276
55478
  if (manifest.lastSync) lastSync = manifest.lastSync;
55277
55479
  }
55278
55480
  } catch {
@@ -55364,8 +55566,8 @@ function createResetCommand() {
55364
55566
  }
55365
55567
 
55366
55568
  // src/commands/help.ts
55367
- var import_path14 = __toESM(require("path"), 1);
55368
- var import_fs_extra13 = __toESM(require_lib2(), 1);
55569
+ var import_path15 = __toESM(require("path"), 1);
55570
+ var import_fs_extra14 = __toESM(require_lib2(), 1);
55369
55571
  var HOOK_CATALOG = [
55370
55572
  { file: "main-guard.mjs", event: "PreToolUse", desc: "Blocks direct edits on protected branches" },
55371
55573
  { file: "skill-suggestion.py", event: "UserPromptSubmit", desc: "Suggests relevant skills based on user prompt" },
@@ -55380,26 +55582,26 @@ var HOOK_CATALOG = [
55380
55582
  { file: "beads-close-memory-prompt.mjs", event: "PostToolUse", desc: "Prompts memory save when closing a beads issue", beads: true }
55381
55583
  ];
55382
55584
  async function readSkillsFromDir(dir) {
55383
- if (!await import_fs_extra13.default.pathExists(dir)) return [];
55384
- const entries = await import_fs_extra13.default.readdir(dir);
55585
+ if (!await import_fs_extra14.default.pathExists(dir)) return [];
55586
+ const entries = await import_fs_extra14.default.readdir(dir);
55385
55587
  const skills = [];
55386
55588
  for (const name of entries.sort()) {
55387
- const skillMd = import_path14.default.join(dir, name, "SKILL.md");
55388
- if (!await import_fs_extra13.default.pathExists(skillMd)) continue;
55389
- const content = await import_fs_extra13.default.readFile(skillMd, "utf8");
55589
+ const skillMd = import_path15.default.join(dir, name, "SKILL.md");
55590
+ if (!await import_fs_extra14.default.pathExists(skillMd)) continue;
55591
+ const content = await import_fs_extra14.default.readFile(skillMd, "utf8");
55390
55592
  const m = content.match(/^description:\s*(.+)$/m);
55391
55593
  skills.push({ name, desc: m ? m[1].replace(/^["']|["']$/g, "").trim() : "" });
55392
55594
  }
55393
55595
  return skills;
55394
55596
  }
55395
55597
  async function readProjectSkillsFromDir(dir) {
55396
- if (!await import_fs_extra13.default.pathExists(dir)) return [];
55397
- const entries = await import_fs_extra13.default.readdir(dir);
55598
+ if (!await import_fs_extra14.default.pathExists(dir)) return [];
55599
+ const entries = await import_fs_extra14.default.readdir(dir);
55398
55600
  const skills = [];
55399
55601
  for (const name of entries.sort()) {
55400
- const readme = import_path14.default.join(dir, name, "README.md");
55401
- if (!await import_fs_extra13.default.pathExists(readme)) continue;
55402
- const content = await import_fs_extra13.default.readFile(readme, "utf8");
55602
+ const readme = import_path15.default.join(dir, name, "README.md");
55603
+ if (!await import_fs_extra14.default.pathExists(readme)) continue;
55604
+ const content = await import_fs_extra14.default.readFile(readme, "utf8");
55403
55605
  const descLine = content.split("\n").find((line) => {
55404
55606
  const trimmed = line.trim();
55405
55607
  return Boolean(trimmed) && !trimmed.startsWith("#") && !trimmed.startsWith("[") && !trimmed.startsWith("<");
@@ -55410,11 +55612,11 @@ async function readProjectSkillsFromDir(dir) {
55410
55612
  }
55411
55613
  function resolvePkgRootFallback() {
55412
55614
  const candidates = [
55413
- import_path14.default.resolve(__dirname, "../.."),
55414
- import_path14.default.resolve(__dirname, "../../..")
55615
+ import_path15.default.resolve(__dirname, "../.."),
55616
+ import_path15.default.resolve(__dirname, "../../..")
55415
55617
  ];
55416
55618
  const match = candidates.find(
55417
- (candidate) => import_fs_extra13.default.existsSync(import_path14.default.join(candidate, "skills")) || import_fs_extra13.default.existsSync(import_path14.default.join(candidate, "project-skills"))
55619
+ (candidate) => import_fs_extra14.default.existsSync(import_path15.default.join(candidate, "skills")) || import_fs_extra14.default.existsSync(import_path15.default.join(candidate, "project-skills"))
55418
55620
  );
55419
55621
  return match || null;
55420
55622
  }
@@ -55432,8 +55634,8 @@ function createHelpCommand() {
55432
55634
  const pkgRoot = resolvePkgRootFallback();
55433
55635
  const skillsRoot = repoRoot || pkgRoot || "";
55434
55636
  const projectSkillsRoot = repoRoot || pkgRoot || "";
55435
- const skills = skillsRoot ? await readSkillsFromDir(import_path14.default.join(skillsRoot, "skills")) : [];
55436
- const projectSkills = projectSkillsRoot ? await readProjectSkillsFromDir(import_path14.default.join(projectSkillsRoot, "project-skills")) : [];
55637
+ const skills = skillsRoot ? await readSkillsFromDir(import_path15.default.join(skillsRoot, "skills")) : [];
55638
+ const projectSkills = projectSkillsRoot ? await readProjectSkillsFromDir(import_path15.default.join(projectSkillsRoot, "project-skills")) : [];
55437
55639
  const W = 80;
55438
55640
  const hr = kleur_default.dim("-".repeat(W));
55439
55641
  const section = (title) => `
@@ -55703,6 +55905,7 @@ program2.exitOverride((err) => {
55703
55905
  process.exit(1);
55704
55906
  });
55705
55907
  program2.addCommand(createInstallCommand());
55908
+ program2.addCommand(createProjectCommand());
55706
55909
  program2.addCommand(createStatusCommand());
55707
55910
  program2.addCommand(createResetCommand());
55708
55911
  program2.addCommand(createHelpCommand());