xtrm-tools 0.5.36 → 0.5.37

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 path22 = require("path");
1206
- var fs22 = require("fs");
1205
+ var path24 = require("path");
1206
+ var fs24 = 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 (fs22.existsSync(executableFile)) return;
2200
+ if (fs24.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 = path22.resolve(baseDir, baseName);
2219
- if (fs22.existsSync(localBin)) return localBin;
2220
- if (sourceExt.includes(path22.extname(baseName))) return void 0;
2218
+ const localBin = path24.resolve(baseDir, baseName);
2219
+ if (fs24.existsSync(localBin)) return localBin;
2220
+ if (sourceExt.includes(path24.extname(baseName))) return void 0;
2221
2221
  const foundExt = sourceExt.find(
2222
- (ext) => fs22.existsSync(`${localBin}${ext}`)
2222
+ (ext) => fs24.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 = fs22.realpathSync(this._scriptPath);
2234
+ resolvedScriptPath = fs24.realpathSync(this._scriptPath);
2235
2235
  } catch {
2236
2236
  resolvedScriptPath = this._scriptPath;
2237
2237
  }
2238
- executableDir = path22.resolve(
2239
- path22.dirname(resolvedScriptPath),
2238
+ executableDir = path24.resolve(
2239
+ path24.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 = path22.basename(
2246
+ const legacyName = path24.basename(
2247
2247
  this._scriptPath,
2248
- path22.extname(this._scriptPath)
2248
+ path24.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(path22.extname(executableFile));
2259
+ launchWithNode = sourceExt.includes(path24.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 = path22.basename(filename, path22.extname(filename));
3174
+ this._name = path24.basename(filename, path24.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(path23) {
3189
- if (path23 === void 0) return this._executableDir;
3190
- this._executableDir = path23;
3188
+ executableDir(path25) {
3189
+ if (path25 === void 0) return this._executableDir;
3190
+ this._executableDir = path25;
3191
3191
  return this;
3192
3192
  }
3193
3193
  /**
@@ -6053,7 +6053,7 @@ var require_dist = __commonJS({
6053
6053
  });
6054
6054
  };
6055
6055
  }
6056
- var prompts6 = require_prompts();
6056
+ var prompts7 = require_prompts();
6057
6057
  var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
6058
6058
  var noop = () => {
6059
6059
  };
@@ -6104,7 +6104,7 @@ var require_dist = __commonJS({
6104
6104
  var _question2 = question;
6105
6105
  name = _question2.name;
6106
6106
  type = _question2.type;
6107
- if (prompts6[type] === void 0) {
6107
+ if (prompts7[type] === void 0) {
6108
6108
  throw new Error(`prompt type (${type}) is not defined`);
6109
6109
  }
6110
6110
  if (override2[question.name] !== void 0) {
@@ -6115,7 +6115,7 @@ var require_dist = __commonJS({
6115
6115
  }
6116
6116
  }
6117
6117
  try {
6118
- answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : yield prompts6[type](question);
6118
+ answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : yield prompts7[type](question);
6119
6119
  answers[name] = answer = yield getFormattedAnswer(question, answer, true);
6120
6120
  quit = yield onSubmit(question, answer, answers);
6121
6121
  } catch (err) {
@@ -6147,7 +6147,7 @@ var require_dist = __commonJS({
6147
6147
  }
6148
6148
  module2.exports = Object.assign(prompt, {
6149
6149
  prompt,
6150
- prompts: prompts6,
6150
+ prompts: prompts7,
6151
6151
  inject,
6152
6152
  override
6153
6153
  });
@@ -8234,7 +8234,7 @@ var require_prompts2 = __commonJS({
8234
8234
  var require_lib = __commonJS({
8235
8235
  "../node_modules/prompts/lib/index.js"(exports2, module2) {
8236
8236
  "use strict";
8237
- var prompts6 = require_prompts2();
8237
+ var prompts7 = require_prompts2();
8238
8238
  var passOn = ["suggest", "format", "onState", "validate", "onRender", "type"];
8239
8239
  var noop = () => {
8240
8240
  };
@@ -8266,7 +8266,7 @@ var require_lib = __commonJS({
8266
8266
  throw new Error("prompt message is required");
8267
8267
  }
8268
8268
  ({ name, type } = question);
8269
- if (prompts6[type] === void 0) {
8269
+ if (prompts7[type] === void 0) {
8270
8270
  throw new Error(`prompt type (${type}) is not defined`);
8271
8271
  }
8272
8272
  if (override2[question.name] !== void 0) {
@@ -8277,7 +8277,7 @@ var require_lib = __commonJS({
8277
8277
  }
8278
8278
  }
8279
8279
  try {
8280
- answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts6[type](question);
8280
+ answer = prompt._injected ? getInjectedAnswer(prompt._injected, question.initial) : await prompts7[type](question);
8281
8281
  answers[name] = answer = await getFormattedAnswer(question, answer, true);
8282
8282
  quit = await onSubmit(question, answer, answers);
8283
8283
  } catch (err) {
@@ -8300,7 +8300,7 @@ var require_lib = __commonJS({
8300
8300
  function override(answers) {
8301
8301
  prompt._override = Object.assign({}, answers);
8302
8302
  }
8303
- module2.exports = Object.assign(prompt, { prompt, prompts: prompts6, inject, override });
8303
+ module2.exports = Object.assign(prompt, { prompt, prompts: prompts7, inject, override });
8304
8304
  }
8305
8305
  });
8306
8306
 
@@ -11639,54 +11639,54 @@ var require_polyfills = __commonJS({
11639
11639
  }
11640
11640
  var chdir;
11641
11641
  module2.exports = patch;
11642
- function patch(fs22) {
11642
+ function patch(fs24) {
11643
11643
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
11644
- patchLchmod(fs22);
11645
- }
11646
- if (!fs22.lutimes) {
11647
- patchLutimes(fs22);
11648
- }
11649
- fs22.chown = chownFix(fs22.chown);
11650
- fs22.fchown = chownFix(fs22.fchown);
11651
- fs22.lchown = chownFix(fs22.lchown);
11652
- fs22.chmod = chmodFix(fs22.chmod);
11653
- fs22.fchmod = chmodFix(fs22.fchmod);
11654
- fs22.lchmod = chmodFix(fs22.lchmod);
11655
- fs22.chownSync = chownFixSync(fs22.chownSync);
11656
- fs22.fchownSync = chownFixSync(fs22.fchownSync);
11657
- fs22.lchownSync = chownFixSync(fs22.lchownSync);
11658
- fs22.chmodSync = chmodFixSync(fs22.chmodSync);
11659
- fs22.fchmodSync = chmodFixSync(fs22.fchmodSync);
11660
- fs22.lchmodSync = chmodFixSync(fs22.lchmodSync);
11661
- fs22.stat = statFix(fs22.stat);
11662
- fs22.fstat = statFix(fs22.fstat);
11663
- fs22.lstat = statFix(fs22.lstat);
11664
- fs22.statSync = statFixSync(fs22.statSync);
11665
- fs22.fstatSync = statFixSync(fs22.fstatSync);
11666
- fs22.lstatSync = statFixSync(fs22.lstatSync);
11667
- if (fs22.chmod && !fs22.lchmod) {
11668
- fs22.lchmod = function(path22, mode, cb) {
11644
+ patchLchmod(fs24);
11645
+ }
11646
+ if (!fs24.lutimes) {
11647
+ patchLutimes(fs24);
11648
+ }
11649
+ fs24.chown = chownFix(fs24.chown);
11650
+ fs24.fchown = chownFix(fs24.fchown);
11651
+ fs24.lchown = chownFix(fs24.lchown);
11652
+ fs24.chmod = chmodFix(fs24.chmod);
11653
+ fs24.fchmod = chmodFix(fs24.fchmod);
11654
+ fs24.lchmod = chmodFix(fs24.lchmod);
11655
+ fs24.chownSync = chownFixSync(fs24.chownSync);
11656
+ fs24.fchownSync = chownFixSync(fs24.fchownSync);
11657
+ fs24.lchownSync = chownFixSync(fs24.lchownSync);
11658
+ fs24.chmodSync = chmodFixSync(fs24.chmodSync);
11659
+ fs24.fchmodSync = chmodFixSync(fs24.fchmodSync);
11660
+ fs24.lchmodSync = chmodFixSync(fs24.lchmodSync);
11661
+ fs24.stat = statFix(fs24.stat);
11662
+ fs24.fstat = statFix(fs24.fstat);
11663
+ fs24.lstat = statFix(fs24.lstat);
11664
+ fs24.statSync = statFixSync(fs24.statSync);
11665
+ fs24.fstatSync = statFixSync(fs24.fstatSync);
11666
+ fs24.lstatSync = statFixSync(fs24.lstatSync);
11667
+ if (fs24.chmod && !fs24.lchmod) {
11668
+ fs24.lchmod = function(path24, mode, cb) {
11669
11669
  if (cb) process.nextTick(cb);
11670
11670
  };
11671
- fs22.lchmodSync = function() {
11671
+ fs24.lchmodSync = function() {
11672
11672
  };
11673
11673
  }
11674
- if (fs22.chown && !fs22.lchown) {
11675
- fs22.lchown = function(path22, uid, gid, cb) {
11674
+ if (fs24.chown && !fs24.lchown) {
11675
+ fs24.lchown = function(path24, uid, gid, cb) {
11676
11676
  if (cb) process.nextTick(cb);
11677
11677
  };
11678
- fs22.lchownSync = function() {
11678
+ fs24.lchownSync = function() {
11679
11679
  };
11680
11680
  }
11681
11681
  if (platform2 === "win32") {
11682
- fs22.rename = typeof fs22.rename !== "function" ? fs22.rename : (function(fs$rename) {
11682
+ fs24.rename = typeof fs24.rename !== "function" ? fs24.rename : (function(fs$rename) {
11683
11683
  function rename(from, to, cb) {
11684
11684
  var start = Date.now();
11685
11685
  var backoff = 0;
11686
11686
  fs$rename(from, to, function CB(er) {
11687
11687
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
11688
11688
  setTimeout(function() {
11689
- fs22.stat(to, function(stater, st) {
11689
+ fs24.stat(to, function(stater, st) {
11690
11690
  if (stater && stater.code === "ENOENT")
11691
11691
  fs$rename(from, to, CB);
11692
11692
  else
@@ -11702,9 +11702,9 @@ var require_polyfills = __commonJS({
11702
11702
  }
11703
11703
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
11704
11704
  return rename;
11705
- })(fs22.rename);
11705
+ })(fs24.rename);
11706
11706
  }
11707
- fs22.read = typeof fs22.read !== "function" ? fs22.read : (function(fs$read) {
11707
+ fs24.read = typeof fs24.read !== "function" ? fs24.read : (function(fs$read) {
11708
11708
  function read(fd, buffer, offset, length, position, callback_) {
11709
11709
  var callback;
11710
11710
  if (callback_ && typeof callback_ === "function") {
@@ -11712,22 +11712,22 @@ var require_polyfills = __commonJS({
11712
11712
  callback = function(er, _, __) {
11713
11713
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
11714
11714
  eagCounter++;
11715
- return fs$read.call(fs22, fd, buffer, offset, length, position, callback);
11715
+ return fs$read.call(fs24, fd, buffer, offset, length, position, callback);
11716
11716
  }
11717
11717
  callback_.apply(this, arguments);
11718
11718
  };
11719
11719
  }
11720
- return fs$read.call(fs22, fd, buffer, offset, length, position, callback);
11720
+ return fs$read.call(fs24, fd, buffer, offset, length, position, callback);
11721
11721
  }
11722
11722
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
11723
11723
  return read;
11724
- })(fs22.read);
11725
- fs22.readSync = typeof fs22.readSync !== "function" ? fs22.readSync : /* @__PURE__ */ (function(fs$readSync) {
11724
+ })(fs24.read);
11725
+ fs24.readSync = typeof fs24.readSync !== "function" ? fs24.readSync : /* @__PURE__ */ (function(fs$readSync) {
11726
11726
  return function(fd, buffer, offset, length, position) {
11727
11727
  var eagCounter = 0;
11728
11728
  while (true) {
11729
11729
  try {
11730
- return fs$readSync.call(fs22, fd, buffer, offset, length, position);
11730
+ return fs$readSync.call(fs24, fd, buffer, offset, length, position);
11731
11731
  } catch (er) {
11732
11732
  if (er.code === "EAGAIN" && eagCounter < 10) {
11733
11733
  eagCounter++;
@@ -11737,11 +11737,11 @@ var require_polyfills = __commonJS({
11737
11737
  }
11738
11738
  }
11739
11739
  };
11740
- })(fs22.readSync);
11741
- function patchLchmod(fs23) {
11742
- fs23.lchmod = function(path22, mode, callback) {
11743
- fs23.open(
11744
- path22,
11740
+ })(fs24.readSync);
11741
+ function patchLchmod(fs25) {
11742
+ fs25.lchmod = function(path24, mode, callback) {
11743
+ fs25.open(
11744
+ path24,
11745
11745
  constants.O_WRONLY | constants.O_SYMLINK,
11746
11746
  mode,
11747
11747
  function(err, fd) {
@@ -11749,80 +11749,80 @@ var require_polyfills = __commonJS({
11749
11749
  if (callback) callback(err);
11750
11750
  return;
11751
11751
  }
11752
- fs23.fchmod(fd, mode, function(err2) {
11753
- fs23.close(fd, function(err22) {
11752
+ fs25.fchmod(fd, mode, function(err2) {
11753
+ fs25.close(fd, function(err22) {
11754
11754
  if (callback) callback(err2 || err22);
11755
11755
  });
11756
11756
  });
11757
11757
  }
11758
11758
  );
11759
11759
  };
11760
- fs23.lchmodSync = function(path22, mode) {
11761
- var fd = fs23.openSync(path22, constants.O_WRONLY | constants.O_SYMLINK, mode);
11760
+ fs25.lchmodSync = function(path24, mode) {
11761
+ var fd = fs25.openSync(path24, constants.O_WRONLY | constants.O_SYMLINK, mode);
11762
11762
  var threw = true;
11763
11763
  var ret;
11764
11764
  try {
11765
- ret = fs23.fchmodSync(fd, mode);
11765
+ ret = fs25.fchmodSync(fd, mode);
11766
11766
  threw = false;
11767
11767
  } finally {
11768
11768
  if (threw) {
11769
11769
  try {
11770
- fs23.closeSync(fd);
11770
+ fs25.closeSync(fd);
11771
11771
  } catch (er) {
11772
11772
  }
11773
11773
  } else {
11774
- fs23.closeSync(fd);
11774
+ fs25.closeSync(fd);
11775
11775
  }
11776
11776
  }
11777
11777
  return ret;
11778
11778
  };
11779
11779
  }
11780
- function patchLutimes(fs23) {
11781
- if (constants.hasOwnProperty("O_SYMLINK") && fs23.futimes) {
11782
- fs23.lutimes = function(path22, at, mt, cb) {
11783
- fs23.open(path22, constants.O_SYMLINK, function(er, fd) {
11780
+ function patchLutimes(fs25) {
11781
+ if (constants.hasOwnProperty("O_SYMLINK") && fs25.futimes) {
11782
+ fs25.lutimes = function(path24, at, mt, cb) {
11783
+ fs25.open(path24, constants.O_SYMLINK, function(er, fd) {
11784
11784
  if (er) {
11785
11785
  if (cb) cb(er);
11786
11786
  return;
11787
11787
  }
11788
- fs23.futimes(fd, at, mt, function(er2) {
11789
- fs23.close(fd, function(er22) {
11788
+ fs25.futimes(fd, at, mt, function(er2) {
11789
+ fs25.close(fd, function(er22) {
11790
11790
  if (cb) cb(er2 || er22);
11791
11791
  });
11792
11792
  });
11793
11793
  });
11794
11794
  };
11795
- fs23.lutimesSync = function(path22, at, mt) {
11796
- var fd = fs23.openSync(path22, constants.O_SYMLINK);
11795
+ fs25.lutimesSync = function(path24, at, mt) {
11796
+ var fd = fs25.openSync(path24, constants.O_SYMLINK);
11797
11797
  var ret;
11798
11798
  var threw = true;
11799
11799
  try {
11800
- ret = fs23.futimesSync(fd, at, mt);
11800
+ ret = fs25.futimesSync(fd, at, mt);
11801
11801
  threw = false;
11802
11802
  } finally {
11803
11803
  if (threw) {
11804
11804
  try {
11805
- fs23.closeSync(fd);
11805
+ fs25.closeSync(fd);
11806
11806
  } catch (er) {
11807
11807
  }
11808
11808
  } else {
11809
- fs23.closeSync(fd);
11809
+ fs25.closeSync(fd);
11810
11810
  }
11811
11811
  }
11812
11812
  return ret;
11813
11813
  };
11814
- } else if (fs23.futimes) {
11815
- fs23.lutimes = function(_a2, _b, _c, cb) {
11814
+ } else if (fs25.futimes) {
11815
+ fs25.lutimes = function(_a2, _b, _c, cb) {
11816
11816
  if (cb) process.nextTick(cb);
11817
11817
  };
11818
- fs23.lutimesSync = function() {
11818
+ fs25.lutimesSync = function() {
11819
11819
  };
11820
11820
  }
11821
11821
  }
11822
11822
  function chmodFix(orig) {
11823
11823
  if (!orig) return orig;
11824
11824
  return function(target, mode, cb) {
11825
- return orig.call(fs22, target, mode, function(er) {
11825
+ return orig.call(fs24, target, mode, function(er) {
11826
11826
  if (chownErOk(er)) er = null;
11827
11827
  if (cb) cb.apply(this, arguments);
11828
11828
  });
@@ -11832,7 +11832,7 @@ var require_polyfills = __commonJS({
11832
11832
  if (!orig) return orig;
11833
11833
  return function(target, mode) {
11834
11834
  try {
11835
- return orig.call(fs22, target, mode);
11835
+ return orig.call(fs24, target, mode);
11836
11836
  } catch (er) {
11837
11837
  if (!chownErOk(er)) throw er;
11838
11838
  }
@@ -11841,7 +11841,7 @@ var require_polyfills = __commonJS({
11841
11841
  function chownFix(orig) {
11842
11842
  if (!orig) return orig;
11843
11843
  return function(target, uid, gid, cb) {
11844
- return orig.call(fs22, target, uid, gid, function(er) {
11844
+ return orig.call(fs24, target, uid, gid, function(er) {
11845
11845
  if (chownErOk(er)) er = null;
11846
11846
  if (cb) cb.apply(this, arguments);
11847
11847
  });
@@ -11851,7 +11851,7 @@ var require_polyfills = __commonJS({
11851
11851
  if (!orig) return orig;
11852
11852
  return function(target, uid, gid) {
11853
11853
  try {
11854
- return orig.call(fs22, target, uid, gid);
11854
+ return orig.call(fs24, target, uid, gid);
11855
11855
  } catch (er) {
11856
11856
  if (!chownErOk(er)) throw er;
11857
11857
  }
@@ -11871,13 +11871,13 @@ var require_polyfills = __commonJS({
11871
11871
  }
11872
11872
  if (cb) cb.apply(this, arguments);
11873
11873
  }
11874
- return options ? orig.call(fs22, target, options, callback) : orig.call(fs22, target, callback);
11874
+ return options ? orig.call(fs24, target, options, callback) : orig.call(fs24, target, callback);
11875
11875
  };
11876
11876
  }
11877
11877
  function statFixSync(orig) {
11878
11878
  if (!orig) return orig;
11879
11879
  return function(target, options) {
11880
- var stats = options ? orig.call(fs22, target, options) : orig.call(fs22, target);
11880
+ var stats = options ? orig.call(fs24, target, options) : orig.call(fs24, target);
11881
11881
  if (stats) {
11882
11882
  if (stats.uid < 0) stats.uid += 4294967296;
11883
11883
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -11907,16 +11907,16 @@ var require_legacy_streams = __commonJS({
11907
11907
  "use strict";
11908
11908
  var Stream = require("stream").Stream;
11909
11909
  module2.exports = legacy;
11910
- function legacy(fs22) {
11910
+ function legacy(fs24) {
11911
11911
  return {
11912
11912
  ReadStream,
11913
11913
  WriteStream
11914
11914
  };
11915
- function ReadStream(path22, options) {
11916
- if (!(this instanceof ReadStream)) return new ReadStream(path22, options);
11915
+ function ReadStream(path24, options) {
11916
+ if (!(this instanceof ReadStream)) return new ReadStream(path24, options);
11917
11917
  Stream.call(this);
11918
11918
  var self = this;
11919
- this.path = path22;
11919
+ this.path = path24;
11920
11920
  this.fd = null;
11921
11921
  this.readable = true;
11922
11922
  this.paused = false;
@@ -11950,7 +11950,7 @@ var require_legacy_streams = __commonJS({
11950
11950
  });
11951
11951
  return;
11952
11952
  }
11953
- fs22.open(this.path, this.flags, this.mode, function(err, fd) {
11953
+ fs24.open(this.path, this.flags, this.mode, function(err, fd) {
11954
11954
  if (err) {
11955
11955
  self.emit("error", err);
11956
11956
  self.readable = false;
@@ -11961,10 +11961,10 @@ var require_legacy_streams = __commonJS({
11961
11961
  self._read();
11962
11962
  });
11963
11963
  }
11964
- function WriteStream(path22, options) {
11965
- if (!(this instanceof WriteStream)) return new WriteStream(path22, options);
11964
+ function WriteStream(path24, options) {
11965
+ if (!(this instanceof WriteStream)) return new WriteStream(path24, options);
11966
11966
  Stream.call(this);
11967
- this.path = path22;
11967
+ this.path = path24;
11968
11968
  this.fd = null;
11969
11969
  this.writable = true;
11970
11970
  this.flags = "w";
@@ -11989,7 +11989,7 @@ var require_legacy_streams = __commonJS({
11989
11989
  this.busy = false;
11990
11990
  this._queue = [];
11991
11991
  if (this.fd === null) {
11992
- this._open = fs22.open;
11992
+ this._open = fs24.open;
11993
11993
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
11994
11994
  this.flush();
11995
11995
  }
@@ -12025,7 +12025,7 @@ var require_clone = __commonJS({
12025
12025
  var require_graceful_fs = __commonJS({
12026
12026
  "../node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
12027
12027
  "use strict";
12028
- var fs22 = require("fs");
12028
+ var fs24 = require("fs");
12029
12029
  var polyfills = require_polyfills();
12030
12030
  var legacy = require_legacy_streams();
12031
12031
  var clone3 = require_clone();
@@ -12057,12 +12057,12 @@ var require_graceful_fs = __commonJS({
12057
12057
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
12058
12058
  console.error(m);
12059
12059
  };
12060
- if (!fs22[gracefulQueue]) {
12060
+ if (!fs24[gracefulQueue]) {
12061
12061
  queue = global[gracefulQueue] || [];
12062
- publishQueue(fs22, queue);
12063
- fs22.close = (function(fs$close) {
12062
+ publishQueue(fs24, queue);
12063
+ fs24.close = (function(fs$close) {
12064
12064
  function close(fd, cb) {
12065
- return fs$close.call(fs22, fd, function(err) {
12065
+ return fs$close.call(fs24, fd, function(err) {
12066
12066
  if (!err) {
12067
12067
  resetQueue();
12068
12068
  }
@@ -12074,48 +12074,48 @@ var require_graceful_fs = __commonJS({
12074
12074
  value: fs$close
12075
12075
  });
12076
12076
  return close;
12077
- })(fs22.close);
12078
- fs22.closeSync = (function(fs$closeSync) {
12077
+ })(fs24.close);
12078
+ fs24.closeSync = (function(fs$closeSync) {
12079
12079
  function closeSync(fd) {
12080
- fs$closeSync.apply(fs22, arguments);
12080
+ fs$closeSync.apply(fs24, arguments);
12081
12081
  resetQueue();
12082
12082
  }
12083
12083
  Object.defineProperty(closeSync, previousSymbol, {
12084
12084
  value: fs$closeSync
12085
12085
  });
12086
12086
  return closeSync;
12087
- })(fs22.closeSync);
12087
+ })(fs24.closeSync);
12088
12088
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
12089
12089
  process.on("exit", function() {
12090
- debug(fs22[gracefulQueue]);
12091
- require("assert").equal(fs22[gracefulQueue].length, 0);
12090
+ debug(fs24[gracefulQueue]);
12091
+ require("assert").equal(fs24[gracefulQueue].length, 0);
12092
12092
  });
12093
12093
  }
12094
12094
  }
12095
12095
  var queue;
12096
12096
  if (!global[gracefulQueue]) {
12097
- publishQueue(global, fs22[gracefulQueue]);
12098
- }
12099
- module2.exports = patch(clone3(fs22));
12100
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs22.__patched) {
12101
- module2.exports = patch(fs22);
12102
- fs22.__patched = true;
12103
- }
12104
- function patch(fs23) {
12105
- polyfills(fs23);
12106
- fs23.gracefulify = patch;
12107
- fs23.createReadStream = createReadStream;
12108
- fs23.createWriteStream = createWriteStream2;
12109
- var fs$readFile = fs23.readFile;
12110
- fs23.readFile = readFile;
12111
- function readFile(path22, options, cb) {
12097
+ publishQueue(global, fs24[gracefulQueue]);
12098
+ }
12099
+ module2.exports = patch(clone3(fs24));
12100
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs24.__patched) {
12101
+ module2.exports = patch(fs24);
12102
+ fs24.__patched = true;
12103
+ }
12104
+ function patch(fs25) {
12105
+ polyfills(fs25);
12106
+ fs25.gracefulify = patch;
12107
+ fs25.createReadStream = createReadStream;
12108
+ fs25.createWriteStream = createWriteStream2;
12109
+ var fs$readFile = fs25.readFile;
12110
+ fs25.readFile = readFile;
12111
+ function readFile(path24, options, cb) {
12112
12112
  if (typeof options === "function")
12113
12113
  cb = options, options = null;
12114
- return go$readFile(path22, options, cb);
12115
- function go$readFile(path23, options2, cb2, startTime) {
12116
- return fs$readFile(path23, options2, function(err) {
12114
+ return go$readFile(path24, options, cb);
12115
+ function go$readFile(path25, options2, cb2, startTime) {
12116
+ return fs$readFile(path25, options2, function(err) {
12117
12117
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
12118
- enqueue([go$readFile, [path23, options2, cb2], err, startTime || Date.now(), Date.now()]);
12118
+ enqueue([go$readFile, [path25, options2, cb2], err, startTime || Date.now(), Date.now()]);
12119
12119
  else {
12120
12120
  if (typeof cb2 === "function")
12121
12121
  cb2.apply(this, arguments);
@@ -12123,16 +12123,16 @@ var require_graceful_fs = __commonJS({
12123
12123
  });
12124
12124
  }
12125
12125
  }
12126
- var fs$writeFile = fs23.writeFile;
12127
- fs23.writeFile = writeFile;
12128
- function writeFile(path22, data, options, cb) {
12126
+ var fs$writeFile = fs25.writeFile;
12127
+ fs25.writeFile = writeFile;
12128
+ function writeFile(path24, data, options, cb) {
12129
12129
  if (typeof options === "function")
12130
12130
  cb = options, options = null;
12131
- return go$writeFile(path22, data, options, cb);
12132
- function go$writeFile(path23, data2, options2, cb2, startTime) {
12133
- return fs$writeFile(path23, data2, options2, function(err) {
12131
+ return go$writeFile(path24, data, options, cb);
12132
+ function go$writeFile(path25, data2, options2, cb2, startTime) {
12133
+ return fs$writeFile(path25, data2, options2, function(err) {
12134
12134
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
12135
- enqueue([go$writeFile, [path23, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
12135
+ enqueue([go$writeFile, [path25, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
12136
12136
  else {
12137
12137
  if (typeof cb2 === "function")
12138
12138
  cb2.apply(this, arguments);
@@ -12140,17 +12140,17 @@ var require_graceful_fs = __commonJS({
12140
12140
  });
12141
12141
  }
12142
12142
  }
12143
- var fs$appendFile = fs23.appendFile;
12143
+ var fs$appendFile = fs25.appendFile;
12144
12144
  if (fs$appendFile)
12145
- fs23.appendFile = appendFile;
12146
- function appendFile(path22, data, options, cb) {
12145
+ fs25.appendFile = appendFile;
12146
+ function appendFile(path24, data, options, cb) {
12147
12147
  if (typeof options === "function")
12148
12148
  cb = options, options = null;
12149
- return go$appendFile(path22, data, options, cb);
12150
- function go$appendFile(path23, data2, options2, cb2, startTime) {
12151
- return fs$appendFile(path23, data2, options2, function(err) {
12149
+ return go$appendFile(path24, data, options, cb);
12150
+ function go$appendFile(path25, data2, options2, cb2, startTime) {
12151
+ return fs$appendFile(path25, data2, options2, function(err) {
12152
12152
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
12153
- enqueue([go$appendFile, [path23, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
12153
+ enqueue([go$appendFile, [path25, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
12154
12154
  else {
12155
12155
  if (typeof cb2 === "function")
12156
12156
  cb2.apply(this, arguments);
@@ -12158,9 +12158,9 @@ var require_graceful_fs = __commonJS({
12158
12158
  });
12159
12159
  }
12160
12160
  }
12161
- var fs$copyFile = fs23.copyFile;
12161
+ var fs$copyFile = fs25.copyFile;
12162
12162
  if (fs$copyFile)
12163
- fs23.copyFile = copyFile;
12163
+ fs25.copyFile = copyFile;
12164
12164
  function copyFile(src, dest, flags, cb) {
12165
12165
  if (typeof flags === "function") {
12166
12166
  cb = flags;
@@ -12178,34 +12178,34 @@ var require_graceful_fs = __commonJS({
12178
12178
  });
12179
12179
  }
12180
12180
  }
12181
- var fs$readdir = fs23.readdir;
12182
- fs23.readdir = readdir;
12181
+ var fs$readdir = fs25.readdir;
12182
+ fs25.readdir = readdir;
12183
12183
  var noReaddirOptionVersions = /^v[0-5]\./;
12184
- function readdir(path22, options, cb) {
12184
+ function readdir(path24, options, cb) {
12185
12185
  if (typeof options === "function")
12186
12186
  cb = options, options = null;
12187
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path23, options2, cb2, startTime) {
12188
- return fs$readdir(path23, fs$readdirCallback(
12189
- path23,
12187
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path25, options2, cb2, startTime) {
12188
+ return fs$readdir(path25, fs$readdirCallback(
12189
+ path25,
12190
12190
  options2,
12191
12191
  cb2,
12192
12192
  startTime
12193
12193
  ));
12194
- } : function go$readdir2(path23, options2, cb2, startTime) {
12195
- return fs$readdir(path23, options2, fs$readdirCallback(
12196
- path23,
12194
+ } : function go$readdir2(path25, options2, cb2, startTime) {
12195
+ return fs$readdir(path25, options2, fs$readdirCallback(
12196
+ path25,
12197
12197
  options2,
12198
12198
  cb2,
12199
12199
  startTime
12200
12200
  ));
12201
12201
  };
12202
- return go$readdir(path22, options, cb);
12203
- function fs$readdirCallback(path23, options2, cb2, startTime) {
12202
+ return go$readdir(path24, options, cb);
12203
+ function fs$readdirCallback(path25, options2, cb2, startTime) {
12204
12204
  return function(err, files) {
12205
12205
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
12206
12206
  enqueue([
12207
12207
  go$readdir,
12208
- [path23, options2, cb2],
12208
+ [path25, options2, cb2],
12209
12209
  err,
12210
12210
  startTime || Date.now(),
12211
12211
  Date.now()
@@ -12220,21 +12220,21 @@ var require_graceful_fs = __commonJS({
12220
12220
  }
12221
12221
  }
12222
12222
  if (process.version.substr(0, 4) === "v0.8") {
12223
- var legStreams = legacy(fs23);
12223
+ var legStreams = legacy(fs25);
12224
12224
  ReadStream = legStreams.ReadStream;
12225
12225
  WriteStream = legStreams.WriteStream;
12226
12226
  }
12227
- var fs$ReadStream = fs23.ReadStream;
12227
+ var fs$ReadStream = fs25.ReadStream;
12228
12228
  if (fs$ReadStream) {
12229
12229
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
12230
12230
  ReadStream.prototype.open = ReadStream$open;
12231
12231
  }
12232
- var fs$WriteStream = fs23.WriteStream;
12232
+ var fs$WriteStream = fs25.WriteStream;
12233
12233
  if (fs$WriteStream) {
12234
12234
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
12235
12235
  WriteStream.prototype.open = WriteStream$open;
12236
12236
  }
12237
- Object.defineProperty(fs23, "ReadStream", {
12237
+ Object.defineProperty(fs25, "ReadStream", {
12238
12238
  get: function() {
12239
12239
  return ReadStream;
12240
12240
  },
@@ -12244,7 +12244,7 @@ var require_graceful_fs = __commonJS({
12244
12244
  enumerable: true,
12245
12245
  configurable: true
12246
12246
  });
12247
- Object.defineProperty(fs23, "WriteStream", {
12247
+ Object.defineProperty(fs25, "WriteStream", {
12248
12248
  get: function() {
12249
12249
  return WriteStream;
12250
12250
  },
@@ -12255,7 +12255,7 @@ var require_graceful_fs = __commonJS({
12255
12255
  configurable: true
12256
12256
  });
12257
12257
  var FileReadStream = ReadStream;
12258
- Object.defineProperty(fs23, "FileReadStream", {
12258
+ Object.defineProperty(fs25, "FileReadStream", {
12259
12259
  get: function() {
12260
12260
  return FileReadStream;
12261
12261
  },
@@ -12266,7 +12266,7 @@ var require_graceful_fs = __commonJS({
12266
12266
  configurable: true
12267
12267
  });
12268
12268
  var FileWriteStream = WriteStream;
12269
- Object.defineProperty(fs23, "FileWriteStream", {
12269
+ Object.defineProperty(fs25, "FileWriteStream", {
12270
12270
  get: function() {
12271
12271
  return FileWriteStream;
12272
12272
  },
@@ -12276,7 +12276,7 @@ var require_graceful_fs = __commonJS({
12276
12276
  enumerable: true,
12277
12277
  configurable: true
12278
12278
  });
12279
- function ReadStream(path22, options) {
12279
+ function ReadStream(path24, options) {
12280
12280
  if (this instanceof ReadStream)
12281
12281
  return fs$ReadStream.apply(this, arguments), this;
12282
12282
  else
@@ -12296,7 +12296,7 @@ var require_graceful_fs = __commonJS({
12296
12296
  }
12297
12297
  });
12298
12298
  }
12299
- function WriteStream(path22, options) {
12299
+ function WriteStream(path24, options) {
12300
12300
  if (this instanceof WriteStream)
12301
12301
  return fs$WriteStream.apply(this, arguments), this;
12302
12302
  else
@@ -12314,22 +12314,22 @@ var require_graceful_fs = __commonJS({
12314
12314
  }
12315
12315
  });
12316
12316
  }
12317
- function createReadStream(path22, options) {
12318
- return new fs23.ReadStream(path22, options);
12317
+ function createReadStream(path24, options) {
12318
+ return new fs25.ReadStream(path24, options);
12319
12319
  }
12320
- function createWriteStream2(path22, options) {
12321
- return new fs23.WriteStream(path22, options);
12320
+ function createWriteStream2(path24, options) {
12321
+ return new fs25.WriteStream(path24, options);
12322
12322
  }
12323
- var fs$open = fs23.open;
12324
- fs23.open = open;
12325
- function open(path22, flags, mode, cb) {
12323
+ var fs$open = fs25.open;
12324
+ fs25.open = open;
12325
+ function open(path24, flags, mode, cb) {
12326
12326
  if (typeof mode === "function")
12327
12327
  cb = mode, mode = null;
12328
- return go$open(path22, flags, mode, cb);
12329
- function go$open(path23, flags2, mode2, cb2, startTime) {
12330
- return fs$open(path23, flags2, mode2, function(err, fd) {
12328
+ return go$open(path24, flags, mode, cb);
12329
+ function go$open(path25, flags2, mode2, cb2, startTime) {
12330
+ return fs$open(path25, flags2, mode2, function(err, fd) {
12331
12331
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
12332
- enqueue([go$open, [path23, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
12332
+ enqueue([go$open, [path25, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
12333
12333
  else {
12334
12334
  if (typeof cb2 === "function")
12335
12335
  cb2.apply(this, arguments);
@@ -12337,20 +12337,20 @@ var require_graceful_fs = __commonJS({
12337
12337
  });
12338
12338
  }
12339
12339
  }
12340
- return fs23;
12340
+ return fs25;
12341
12341
  }
12342
12342
  function enqueue(elem) {
12343
12343
  debug("ENQUEUE", elem[0].name, elem[1]);
12344
- fs22[gracefulQueue].push(elem);
12344
+ fs24[gracefulQueue].push(elem);
12345
12345
  retry();
12346
12346
  }
12347
12347
  var retryTimer;
12348
12348
  function resetQueue() {
12349
12349
  var now = Date.now();
12350
- for (var i = 0; i < fs22[gracefulQueue].length; ++i) {
12351
- if (fs22[gracefulQueue][i].length > 2) {
12352
- fs22[gracefulQueue][i][3] = now;
12353
- fs22[gracefulQueue][i][4] = now;
12350
+ for (var i = 0; i < fs24[gracefulQueue].length; ++i) {
12351
+ if (fs24[gracefulQueue][i].length > 2) {
12352
+ fs24[gracefulQueue][i][3] = now;
12353
+ fs24[gracefulQueue][i][4] = now;
12354
12354
  }
12355
12355
  }
12356
12356
  retry();
@@ -12358,9 +12358,9 @@ var require_graceful_fs = __commonJS({
12358
12358
  function retry() {
12359
12359
  clearTimeout(retryTimer);
12360
12360
  retryTimer = void 0;
12361
- if (fs22[gracefulQueue].length === 0)
12361
+ if (fs24[gracefulQueue].length === 0)
12362
12362
  return;
12363
- var elem = fs22[gracefulQueue].shift();
12363
+ var elem = fs24[gracefulQueue].shift();
12364
12364
  var fn = elem[0];
12365
12365
  var args = elem[1];
12366
12366
  var err = elem[2];
@@ -12382,7 +12382,7 @@ var require_graceful_fs = __commonJS({
12382
12382
  debug("RETRY", fn.name, args);
12383
12383
  fn.apply(null, args.concat([startTime]));
12384
12384
  } else {
12385
- fs22[gracefulQueue].push(elem);
12385
+ fs24[gracefulQueue].push(elem);
12386
12386
  }
12387
12387
  }
12388
12388
  if (retryTimer === void 0) {
@@ -12397,7 +12397,7 @@ var require_fs = __commonJS({
12397
12397
  "../node_modules/fs-extra/lib/fs/index.js"(exports2) {
12398
12398
  "use strict";
12399
12399
  var u = require_universalify().fromCallback;
12400
- var fs22 = require_graceful_fs();
12400
+ var fs24 = require_graceful_fs();
12401
12401
  var api = [
12402
12402
  "access",
12403
12403
  "appendFile",
@@ -12438,26 +12438,26 @@ var require_fs = __commonJS({
12438
12438
  "utimes",
12439
12439
  "writeFile"
12440
12440
  ].filter((key) => {
12441
- return typeof fs22[key] === "function";
12441
+ return typeof fs24[key] === "function";
12442
12442
  });
12443
- Object.assign(exports2, fs22);
12443
+ Object.assign(exports2, fs24);
12444
12444
  api.forEach((method) => {
12445
- exports2[method] = u(fs22[method]);
12445
+ exports2[method] = u(fs24[method]);
12446
12446
  });
12447
12447
  exports2.exists = function(filename, callback) {
12448
12448
  if (typeof callback === "function") {
12449
- return fs22.exists(filename, callback);
12449
+ return fs24.exists(filename, callback);
12450
12450
  }
12451
12451
  return new Promise((resolve2) => {
12452
- return fs22.exists(filename, resolve2);
12452
+ return fs24.exists(filename, resolve2);
12453
12453
  });
12454
12454
  };
12455
12455
  exports2.read = function(fd, buffer, offset, length, position, callback) {
12456
12456
  if (typeof callback === "function") {
12457
- return fs22.read(fd, buffer, offset, length, position, callback);
12457
+ return fs24.read(fd, buffer, offset, length, position, callback);
12458
12458
  }
12459
12459
  return new Promise((resolve2, reject) => {
12460
- fs22.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
12460
+ fs24.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
12461
12461
  if (err) return reject(err);
12462
12462
  resolve2({ bytesRead, buffer: buffer2 });
12463
12463
  });
@@ -12465,10 +12465,10 @@ var require_fs = __commonJS({
12465
12465
  };
12466
12466
  exports2.write = function(fd, buffer, ...args) {
12467
12467
  if (typeof args[args.length - 1] === "function") {
12468
- return fs22.write(fd, buffer, ...args);
12468
+ return fs24.write(fd, buffer, ...args);
12469
12469
  }
12470
12470
  return new Promise((resolve2, reject) => {
12471
- fs22.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
12471
+ fs24.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
12472
12472
  if (err) return reject(err);
12473
12473
  resolve2({ bytesWritten, buffer: buffer2 });
12474
12474
  });
@@ -12476,10 +12476,10 @@ var require_fs = __commonJS({
12476
12476
  };
12477
12477
  exports2.readv = function(fd, buffers, ...args) {
12478
12478
  if (typeof args[args.length - 1] === "function") {
12479
- return fs22.readv(fd, buffers, ...args);
12479
+ return fs24.readv(fd, buffers, ...args);
12480
12480
  }
12481
12481
  return new Promise((resolve2, reject) => {
12482
- fs22.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
12482
+ fs24.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
12483
12483
  if (err) return reject(err);
12484
12484
  resolve2({ bytesRead, buffers: buffers2 });
12485
12485
  });
@@ -12487,17 +12487,17 @@ var require_fs = __commonJS({
12487
12487
  };
12488
12488
  exports2.writev = function(fd, buffers, ...args) {
12489
12489
  if (typeof args[args.length - 1] === "function") {
12490
- return fs22.writev(fd, buffers, ...args);
12490
+ return fs24.writev(fd, buffers, ...args);
12491
12491
  }
12492
12492
  return new Promise((resolve2, reject) => {
12493
- fs22.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
12493
+ fs24.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
12494
12494
  if (err) return reject(err);
12495
12495
  resolve2({ bytesWritten, buffers: buffers2 });
12496
12496
  });
12497
12497
  });
12498
12498
  };
12499
- if (typeof fs22.realpath.native === "function") {
12500
- exports2.realpath.native = u(fs22.realpath.native);
12499
+ if (typeof fs24.realpath.native === "function") {
12500
+ exports2.realpath.native = u(fs24.realpath.native);
12501
12501
  } else {
12502
12502
  process.emitWarning(
12503
12503
  "fs.realpath.native is not a function. Is fs being monkey-patched?",
@@ -12512,10 +12512,10 @@ var require_fs = __commonJS({
12512
12512
  var require_utils = __commonJS({
12513
12513
  "../node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
12514
12514
  "use strict";
12515
- var path22 = require("path");
12515
+ var path24 = require("path");
12516
12516
  module2.exports.checkPath = function checkPath(pth) {
12517
12517
  if (process.platform === "win32") {
12518
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path22.parse(pth).root, ""));
12518
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path24.parse(pth).root, ""));
12519
12519
  if (pathHasInvalidWinCharacters) {
12520
12520
  const error49 = new Error(`Path contains invalid characters: ${pth}`);
12521
12521
  error49.code = "EINVAL";
@@ -12530,7 +12530,7 @@ var require_utils = __commonJS({
12530
12530
  var require_make_dir = __commonJS({
12531
12531
  "../node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
12532
12532
  "use strict";
12533
- var fs22 = require_fs();
12533
+ var fs24 = require_fs();
12534
12534
  var { checkPath } = require_utils();
12535
12535
  var getMode = (options) => {
12536
12536
  const defaults = { mode: 511 };
@@ -12539,14 +12539,14 @@ var require_make_dir = __commonJS({
12539
12539
  };
12540
12540
  module2.exports.makeDir = async (dir, options) => {
12541
12541
  checkPath(dir);
12542
- return fs22.mkdir(dir, {
12542
+ return fs24.mkdir(dir, {
12543
12543
  mode: getMode(options),
12544
12544
  recursive: true
12545
12545
  });
12546
12546
  };
12547
12547
  module2.exports.makeDirSync = (dir, options) => {
12548
12548
  checkPath(dir);
12549
- return fs22.mkdirSync(dir, {
12549
+ return fs24.mkdirSync(dir, {
12550
12550
  mode: getMode(options),
12551
12551
  recursive: true
12552
12552
  });
@@ -12578,13 +12578,13 @@ var require_path_exists = __commonJS({
12578
12578
  "../node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
12579
12579
  "use strict";
12580
12580
  var u = require_universalify().fromPromise;
12581
- var fs22 = require_fs();
12582
- function pathExists(path22) {
12583
- return fs22.access(path22).then(() => true).catch(() => false);
12581
+ var fs24 = require_fs();
12582
+ function pathExists(path24) {
12583
+ return fs24.access(path24).then(() => true).catch(() => false);
12584
12584
  }
12585
12585
  module2.exports = {
12586
12586
  pathExists: u(pathExists),
12587
- pathExistsSync: fs22.existsSync
12587
+ pathExistsSync: fs24.existsSync
12588
12588
  };
12589
12589
  }
12590
12590
  });
@@ -12593,16 +12593,16 @@ var require_path_exists = __commonJS({
12593
12593
  var require_utimes = __commonJS({
12594
12594
  "../node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
12595
12595
  "use strict";
12596
- var fs22 = require_fs();
12596
+ var fs24 = require_fs();
12597
12597
  var u = require_universalify().fromPromise;
12598
- async function utimesMillis(path22, atime, mtime) {
12599
- const fd = await fs22.open(path22, "r+");
12598
+ async function utimesMillis(path24, atime, mtime) {
12599
+ const fd = await fs24.open(path24, "r+");
12600
12600
  let closeErr = null;
12601
12601
  try {
12602
- await fs22.futimes(fd, atime, mtime);
12602
+ await fs24.futimes(fd, atime, mtime);
12603
12603
  } finally {
12604
12604
  try {
12605
- await fs22.close(fd);
12605
+ await fs24.close(fd);
12606
12606
  } catch (e) {
12607
12607
  closeErr = e;
12608
12608
  }
@@ -12611,10 +12611,10 @@ var require_utimes = __commonJS({
12611
12611
  throw closeErr;
12612
12612
  }
12613
12613
  }
12614
- function utimesMillisSync(path22, atime, mtime) {
12615
- const fd = fs22.openSync(path22, "r+");
12616
- fs22.futimesSync(fd, atime, mtime);
12617
- return fs22.closeSync(fd);
12614
+ function utimesMillisSync(path24, atime, mtime) {
12615
+ const fd = fs24.openSync(path24, "r+");
12616
+ fs24.futimesSync(fd, atime, mtime);
12617
+ return fs24.closeSync(fd);
12618
12618
  }
12619
12619
  module2.exports = {
12620
12620
  utimesMillis: u(utimesMillis),
@@ -12627,11 +12627,11 @@ var require_utimes = __commonJS({
12627
12627
  var require_stat = __commonJS({
12628
12628
  "../node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
12629
12629
  "use strict";
12630
- var fs22 = require_fs();
12631
- var path22 = require("path");
12630
+ var fs24 = require_fs();
12631
+ var path24 = require("path");
12632
12632
  var u = require_universalify().fromPromise;
12633
12633
  function getStats(src, dest, opts) {
12634
- const statFunc = opts.dereference ? (file2) => fs22.stat(file2, { bigint: true }) : (file2) => fs22.lstat(file2, { bigint: true });
12634
+ const statFunc = opts.dereference ? (file2) => fs24.stat(file2, { bigint: true }) : (file2) => fs24.lstat(file2, { bigint: true });
12635
12635
  return Promise.all([
12636
12636
  statFunc(src),
12637
12637
  statFunc(dest).catch((err) => {
@@ -12642,7 +12642,7 @@ var require_stat = __commonJS({
12642
12642
  }
12643
12643
  function getStatsSync(src, dest, opts) {
12644
12644
  let destStat;
12645
- const statFunc = opts.dereference ? (file2) => fs22.statSync(file2, { bigint: true }) : (file2) => fs22.lstatSync(file2, { bigint: true });
12645
+ const statFunc = opts.dereference ? (file2) => fs24.statSync(file2, { bigint: true }) : (file2) => fs24.lstatSync(file2, { bigint: true });
12646
12646
  const srcStat = statFunc(src);
12647
12647
  try {
12648
12648
  destStat = statFunc(dest);
@@ -12656,8 +12656,8 @@ var require_stat = __commonJS({
12656
12656
  const { srcStat, destStat } = await getStats(src, dest, opts);
12657
12657
  if (destStat) {
12658
12658
  if (areIdentical(srcStat, destStat)) {
12659
- const srcBaseName = path22.basename(src);
12660
- const destBaseName = path22.basename(dest);
12659
+ const srcBaseName = path24.basename(src);
12660
+ const destBaseName = path24.basename(dest);
12661
12661
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
12662
12662
  return { srcStat, destStat, isChangingCase: true };
12663
12663
  }
@@ -12679,8 +12679,8 @@ var require_stat = __commonJS({
12679
12679
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
12680
12680
  if (destStat) {
12681
12681
  if (areIdentical(srcStat, destStat)) {
12682
- const srcBaseName = path22.basename(src);
12683
- const destBaseName = path22.basename(dest);
12682
+ const srcBaseName = path24.basename(src);
12683
+ const destBaseName = path24.basename(dest);
12684
12684
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
12685
12685
  return { srcStat, destStat, isChangingCase: true };
12686
12686
  }
@@ -12699,12 +12699,12 @@ var require_stat = __commonJS({
12699
12699
  return { srcStat, destStat };
12700
12700
  }
12701
12701
  async function checkParentPaths(src, srcStat, dest, funcName) {
12702
- const srcParent = path22.resolve(path22.dirname(src));
12703
- const destParent = path22.resolve(path22.dirname(dest));
12704
- if (destParent === srcParent || destParent === path22.parse(destParent).root) return;
12702
+ const srcParent = path24.resolve(path24.dirname(src));
12703
+ const destParent = path24.resolve(path24.dirname(dest));
12704
+ if (destParent === srcParent || destParent === path24.parse(destParent).root) return;
12705
12705
  let destStat;
12706
12706
  try {
12707
- destStat = await fs22.stat(destParent, { bigint: true });
12707
+ destStat = await fs24.stat(destParent, { bigint: true });
12708
12708
  } catch (err) {
12709
12709
  if (err.code === "ENOENT") return;
12710
12710
  throw err;
@@ -12715,12 +12715,12 @@ var require_stat = __commonJS({
12715
12715
  return checkParentPaths(src, srcStat, destParent, funcName);
12716
12716
  }
12717
12717
  function checkParentPathsSync(src, srcStat, dest, funcName) {
12718
- const srcParent = path22.resolve(path22.dirname(src));
12719
- const destParent = path22.resolve(path22.dirname(dest));
12720
- if (destParent === srcParent || destParent === path22.parse(destParent).root) return;
12718
+ const srcParent = path24.resolve(path24.dirname(src));
12719
+ const destParent = path24.resolve(path24.dirname(dest));
12720
+ if (destParent === srcParent || destParent === path24.parse(destParent).root) return;
12721
12721
  let destStat;
12722
12722
  try {
12723
- destStat = fs22.statSync(destParent, { bigint: true });
12723
+ destStat = fs24.statSync(destParent, { bigint: true });
12724
12724
  } catch (err) {
12725
12725
  if (err.code === "ENOENT") return;
12726
12726
  throw err;
@@ -12734,8 +12734,8 @@ var require_stat = __commonJS({
12734
12734
  return destStat.ino !== void 0 && destStat.dev !== void 0 && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
12735
12735
  }
12736
12736
  function isSrcSubdir(src, dest) {
12737
- const srcArr = path22.resolve(src).split(path22.sep).filter((i) => i);
12738
- const destArr = path22.resolve(dest).split(path22.sep).filter((i) => i);
12737
+ const srcArr = path24.resolve(src).split(path24.sep).filter((i) => i);
12738
+ const destArr = path24.resolve(dest).split(path24.sep).filter((i) => i);
12739
12739
  return srcArr.every((cur, i) => destArr[i] === cur);
12740
12740
  }
12741
12741
  function errMsg(src, dest, funcName) {
@@ -12787,8 +12787,8 @@ var require_async = __commonJS({
12787
12787
  var require_copy = __commonJS({
12788
12788
  "../node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
12789
12789
  "use strict";
12790
- var fs22 = require_fs();
12791
- var path22 = require("path");
12790
+ var fs24 = require_fs();
12791
+ var path24 = require("path");
12792
12792
  var { mkdirs } = require_mkdirs();
12793
12793
  var { pathExists } = require_path_exists();
12794
12794
  var { utimesMillis } = require_utimes();
@@ -12811,7 +12811,7 @@ var require_copy = __commonJS({
12811
12811
  await stat.checkParentPaths(src, srcStat, dest, "copy");
12812
12812
  const include = await runFilter(src, dest, opts);
12813
12813
  if (!include) return;
12814
- const destParent = path22.dirname(dest);
12814
+ const destParent = path24.dirname(dest);
12815
12815
  const dirExists = await pathExists(destParent);
12816
12816
  if (!dirExists) {
12817
12817
  await mkdirs(destParent);
@@ -12823,7 +12823,7 @@ var require_copy = __commonJS({
12823
12823
  return opts.filter(src, dest);
12824
12824
  }
12825
12825
  async function getStatsAndPerformCopy(destStat, src, dest, opts) {
12826
- const statFn = opts.dereference ? fs22.stat : fs22.lstat;
12826
+ const statFn = opts.dereference ? fs24.stat : fs24.lstat;
12827
12827
  const srcStat = await statFn(src);
12828
12828
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
12829
12829
  if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -12835,7 +12835,7 @@ var require_copy = __commonJS({
12835
12835
  async function onFile(srcStat, destStat, src, dest, opts) {
12836
12836
  if (!destStat) return copyFile(srcStat, src, dest, opts);
12837
12837
  if (opts.overwrite) {
12838
- await fs22.unlink(dest);
12838
+ await fs24.unlink(dest);
12839
12839
  return copyFile(srcStat, src, dest, opts);
12840
12840
  }
12841
12841
  if (opts.errorOnExist) {
@@ -12843,29 +12843,29 @@ var require_copy = __commonJS({
12843
12843
  }
12844
12844
  }
12845
12845
  async function copyFile(srcStat, src, dest, opts) {
12846
- await fs22.copyFile(src, dest);
12846
+ await fs24.copyFile(src, dest);
12847
12847
  if (opts.preserveTimestamps) {
12848
12848
  if (fileIsNotWritable(srcStat.mode)) {
12849
12849
  await makeFileWritable(dest, srcStat.mode);
12850
12850
  }
12851
- const updatedSrcStat = await fs22.stat(src);
12851
+ const updatedSrcStat = await fs24.stat(src);
12852
12852
  await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
12853
12853
  }
12854
- return fs22.chmod(dest, srcStat.mode);
12854
+ return fs24.chmod(dest, srcStat.mode);
12855
12855
  }
12856
12856
  function fileIsNotWritable(srcMode) {
12857
12857
  return (srcMode & 128) === 0;
12858
12858
  }
12859
12859
  function makeFileWritable(dest, srcMode) {
12860
- return fs22.chmod(dest, srcMode | 128);
12860
+ return fs24.chmod(dest, srcMode | 128);
12861
12861
  }
12862
12862
  async function onDir(srcStat, destStat, src, dest, opts) {
12863
12863
  if (!destStat) {
12864
- await fs22.mkdir(dest);
12864
+ await fs24.mkdir(dest);
12865
12865
  }
12866
- await asyncIteratorConcurrentProcess(await fs22.opendir(src), async (item) => {
12867
- const srcItem = path22.join(src, item.name);
12868
- const destItem = path22.join(dest, item.name);
12866
+ await asyncIteratorConcurrentProcess(await fs24.opendir(src), async (item) => {
12867
+ const srcItem = path24.join(src, item.name);
12868
+ const destItem = path24.join(dest, item.name);
12869
12869
  const include = await runFilter(srcItem, destItem, opts);
12870
12870
  if (include) {
12871
12871
  const { destStat: destStat2 } = await stat.checkPaths(srcItem, destItem, "copy", opts);
@@ -12873,26 +12873,26 @@ var require_copy = __commonJS({
12873
12873
  }
12874
12874
  });
12875
12875
  if (!destStat) {
12876
- await fs22.chmod(dest, srcStat.mode);
12876
+ await fs24.chmod(dest, srcStat.mode);
12877
12877
  }
12878
12878
  }
12879
12879
  async function onLink(destStat, src, dest, opts) {
12880
- let resolvedSrc = await fs22.readlink(src);
12880
+ let resolvedSrc = await fs24.readlink(src);
12881
12881
  if (opts.dereference) {
12882
- resolvedSrc = path22.resolve(process.cwd(), resolvedSrc);
12882
+ resolvedSrc = path24.resolve(process.cwd(), resolvedSrc);
12883
12883
  }
12884
12884
  if (!destStat) {
12885
- return fs22.symlink(resolvedSrc, dest);
12885
+ return fs24.symlink(resolvedSrc, dest);
12886
12886
  }
12887
12887
  let resolvedDest = null;
12888
12888
  try {
12889
- resolvedDest = await fs22.readlink(dest);
12889
+ resolvedDest = await fs24.readlink(dest);
12890
12890
  } catch (e) {
12891
- if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs22.symlink(resolvedSrc, dest);
12891
+ if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs24.symlink(resolvedSrc, dest);
12892
12892
  throw e;
12893
12893
  }
12894
12894
  if (opts.dereference) {
12895
- resolvedDest = path22.resolve(process.cwd(), resolvedDest);
12895
+ resolvedDest = path24.resolve(process.cwd(), resolvedDest);
12896
12896
  }
12897
12897
  if (resolvedSrc !== resolvedDest) {
12898
12898
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
@@ -12902,8 +12902,8 @@ var require_copy = __commonJS({
12902
12902
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
12903
12903
  }
12904
12904
  }
12905
- await fs22.unlink(dest);
12906
- return fs22.symlink(resolvedSrc, dest);
12905
+ await fs24.unlink(dest);
12906
+ return fs24.symlink(resolvedSrc, dest);
12907
12907
  }
12908
12908
  module2.exports = copy;
12909
12909
  }
@@ -12913,8 +12913,8 @@ var require_copy = __commonJS({
12913
12913
  var require_copy_sync = __commonJS({
12914
12914
  "../node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
12915
12915
  "use strict";
12916
- var fs22 = require_graceful_fs();
12917
- var path22 = require("path");
12916
+ var fs24 = require_graceful_fs();
12917
+ var path24 = require("path");
12918
12918
  var mkdirsSync = require_mkdirs().mkdirsSync;
12919
12919
  var utimesMillisSync = require_utimes().utimesMillisSync;
12920
12920
  var stat = require_stat();
@@ -12935,12 +12935,12 @@ var require_copy_sync = __commonJS({
12935
12935
  const { srcStat, destStat } = stat.checkPathsSync(src, dest, "copy", opts);
12936
12936
  stat.checkParentPathsSync(src, srcStat, dest, "copy");
12937
12937
  if (opts.filter && !opts.filter(src, dest)) return;
12938
- const destParent = path22.dirname(dest);
12939
- if (!fs22.existsSync(destParent)) mkdirsSync(destParent);
12938
+ const destParent = path24.dirname(dest);
12939
+ if (!fs24.existsSync(destParent)) mkdirsSync(destParent);
12940
12940
  return getStats(destStat, src, dest, opts);
12941
12941
  }
12942
12942
  function getStats(destStat, src, dest, opts) {
12943
- const statSync = opts.dereference ? fs22.statSync : fs22.lstatSync;
12943
+ const statSync = opts.dereference ? fs24.statSync : fs24.lstatSync;
12944
12944
  const srcStat = statSync(src);
12945
12945
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
12946
12946
  else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -12955,14 +12955,14 @@ var require_copy_sync = __commonJS({
12955
12955
  }
12956
12956
  function mayCopyFile(srcStat, src, dest, opts) {
12957
12957
  if (opts.overwrite) {
12958
- fs22.unlinkSync(dest);
12958
+ fs24.unlinkSync(dest);
12959
12959
  return copyFile(srcStat, src, dest, opts);
12960
12960
  } else if (opts.errorOnExist) {
12961
12961
  throw new Error(`'${dest}' already exists`);
12962
12962
  }
12963
12963
  }
12964
12964
  function copyFile(srcStat, src, dest, opts) {
12965
- fs22.copyFileSync(src, dest);
12965
+ fs24.copyFileSync(src, dest);
12966
12966
  if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
12967
12967
  return setDestMode(dest, srcStat.mode);
12968
12968
  }
@@ -12977,10 +12977,10 @@ var require_copy_sync = __commonJS({
12977
12977
  return setDestMode(dest, srcMode | 128);
12978
12978
  }
12979
12979
  function setDestMode(dest, srcMode) {
12980
- return fs22.chmodSync(dest, srcMode);
12980
+ return fs24.chmodSync(dest, srcMode);
12981
12981
  }
12982
12982
  function setDestTimestamps(src, dest) {
12983
- const updatedSrcStat = fs22.statSync(src);
12983
+ const updatedSrcStat = fs24.statSync(src);
12984
12984
  return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
12985
12985
  }
12986
12986
  function onDir(srcStat, destStat, src, dest, opts) {
@@ -12988,12 +12988,12 @@ var require_copy_sync = __commonJS({
12988
12988
  return copyDir(src, dest, opts);
12989
12989
  }
12990
12990
  function mkDirAndCopy(srcMode, src, dest, opts) {
12991
- fs22.mkdirSync(dest);
12991
+ fs24.mkdirSync(dest);
12992
12992
  copyDir(src, dest, opts);
12993
12993
  return setDestMode(dest, srcMode);
12994
12994
  }
12995
12995
  function copyDir(src, dest, opts) {
12996
- const dir = fs22.opendirSync(src);
12996
+ const dir = fs24.opendirSync(src);
12997
12997
  try {
12998
12998
  let dirent;
12999
12999
  while ((dirent = dir.readSync()) !== null) {
@@ -13004,29 +13004,29 @@ var require_copy_sync = __commonJS({
13004
13004
  }
13005
13005
  }
13006
13006
  function copyDirItem(item, src, dest, opts) {
13007
- const srcItem = path22.join(src, item);
13008
- const destItem = path22.join(dest, item);
13007
+ const srcItem = path24.join(src, item);
13008
+ const destItem = path24.join(dest, item);
13009
13009
  if (opts.filter && !opts.filter(srcItem, destItem)) return;
13010
13010
  const { destStat } = stat.checkPathsSync(srcItem, destItem, "copy", opts);
13011
13011
  return getStats(destStat, srcItem, destItem, opts);
13012
13012
  }
13013
13013
  function onLink(destStat, src, dest, opts) {
13014
- let resolvedSrc = fs22.readlinkSync(src);
13014
+ let resolvedSrc = fs24.readlinkSync(src);
13015
13015
  if (opts.dereference) {
13016
- resolvedSrc = path22.resolve(process.cwd(), resolvedSrc);
13016
+ resolvedSrc = path24.resolve(process.cwd(), resolvedSrc);
13017
13017
  }
13018
13018
  if (!destStat) {
13019
- return fs22.symlinkSync(resolvedSrc, dest);
13019
+ return fs24.symlinkSync(resolvedSrc, dest);
13020
13020
  } else {
13021
13021
  let resolvedDest;
13022
13022
  try {
13023
- resolvedDest = fs22.readlinkSync(dest);
13023
+ resolvedDest = fs24.readlinkSync(dest);
13024
13024
  } catch (err) {
13025
- if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs22.symlinkSync(resolvedSrc, dest);
13025
+ if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs24.symlinkSync(resolvedSrc, dest);
13026
13026
  throw err;
13027
13027
  }
13028
13028
  if (opts.dereference) {
13029
- resolvedDest = path22.resolve(process.cwd(), resolvedDest);
13029
+ resolvedDest = path24.resolve(process.cwd(), resolvedDest);
13030
13030
  }
13031
13031
  if (resolvedSrc !== resolvedDest) {
13032
13032
  if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
@@ -13040,8 +13040,8 @@ var require_copy_sync = __commonJS({
13040
13040
  }
13041
13041
  }
13042
13042
  function copyLink(resolvedSrc, dest) {
13043
- fs22.unlinkSync(dest);
13044
- return fs22.symlinkSync(resolvedSrc, dest);
13043
+ fs24.unlinkSync(dest);
13044
+ return fs24.symlinkSync(resolvedSrc, dest);
13045
13045
  }
13046
13046
  module2.exports = copySync;
13047
13047
  }
@@ -13063,13 +13063,13 @@ var require_copy2 = __commonJS({
13063
13063
  var require_remove = __commonJS({
13064
13064
  "../node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
13065
13065
  "use strict";
13066
- var fs22 = require_graceful_fs();
13066
+ var fs24 = require_graceful_fs();
13067
13067
  var u = require_universalify().fromCallback;
13068
- function remove(path22, callback) {
13069
- fs22.rm(path22, { recursive: true, force: true }, callback);
13068
+ function remove(path24, callback) {
13069
+ fs24.rm(path24, { recursive: true, force: true }, callback);
13070
13070
  }
13071
- function removeSync(path22) {
13072
- fs22.rmSync(path22, { recursive: true, force: true });
13071
+ function removeSync(path24) {
13072
+ fs24.rmSync(path24, { recursive: true, force: true });
13073
13073
  }
13074
13074
  module2.exports = {
13075
13075
  remove: u(remove),
@@ -13083,28 +13083,28 @@ var require_empty = __commonJS({
13083
13083
  "../node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
13084
13084
  "use strict";
13085
13085
  var u = require_universalify().fromPromise;
13086
- var fs22 = require_fs();
13087
- var path22 = require("path");
13086
+ var fs24 = require_fs();
13087
+ var path24 = require("path");
13088
13088
  var mkdir = require_mkdirs();
13089
13089
  var remove = require_remove();
13090
13090
  var emptyDir = u(async function emptyDir2(dir) {
13091
13091
  let items;
13092
13092
  try {
13093
- items = await fs22.readdir(dir);
13093
+ items = await fs24.readdir(dir);
13094
13094
  } catch {
13095
13095
  return mkdir.mkdirs(dir);
13096
13096
  }
13097
- return Promise.all(items.map((item) => remove.remove(path22.join(dir, item))));
13097
+ return Promise.all(items.map((item) => remove.remove(path24.join(dir, item))));
13098
13098
  });
13099
13099
  function emptyDirSync(dir) {
13100
13100
  let items;
13101
13101
  try {
13102
- items = fs22.readdirSync(dir);
13102
+ items = fs24.readdirSync(dir);
13103
13103
  } catch {
13104
13104
  return mkdir.mkdirsSync(dir);
13105
13105
  }
13106
13106
  items.forEach((item) => {
13107
- item = path22.join(dir, item);
13107
+ item = path24.join(dir, item);
13108
13108
  remove.removeSync(item);
13109
13109
  });
13110
13110
  }
@@ -13122,52 +13122,52 @@ var require_file = __commonJS({
13122
13122
  "../node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
13123
13123
  "use strict";
13124
13124
  var u = require_universalify().fromPromise;
13125
- var path22 = require("path");
13126
- var fs22 = require_fs();
13125
+ var path24 = require("path");
13126
+ var fs24 = require_fs();
13127
13127
  var mkdir = require_mkdirs();
13128
13128
  async function createFile(file2) {
13129
13129
  let stats;
13130
13130
  try {
13131
- stats = await fs22.stat(file2);
13131
+ stats = await fs24.stat(file2);
13132
13132
  } catch {
13133
13133
  }
13134
13134
  if (stats && stats.isFile()) return;
13135
- const dir = path22.dirname(file2);
13135
+ const dir = path24.dirname(file2);
13136
13136
  let dirStats = null;
13137
13137
  try {
13138
- dirStats = await fs22.stat(dir);
13138
+ dirStats = await fs24.stat(dir);
13139
13139
  } catch (err) {
13140
13140
  if (err.code === "ENOENT") {
13141
13141
  await mkdir.mkdirs(dir);
13142
- await fs22.writeFile(file2, "");
13142
+ await fs24.writeFile(file2, "");
13143
13143
  return;
13144
13144
  } else {
13145
13145
  throw err;
13146
13146
  }
13147
13147
  }
13148
13148
  if (dirStats.isDirectory()) {
13149
- await fs22.writeFile(file2, "");
13149
+ await fs24.writeFile(file2, "");
13150
13150
  } else {
13151
- await fs22.readdir(dir);
13151
+ await fs24.readdir(dir);
13152
13152
  }
13153
13153
  }
13154
13154
  function createFileSync(file2) {
13155
13155
  let stats;
13156
13156
  try {
13157
- stats = fs22.statSync(file2);
13157
+ stats = fs24.statSync(file2);
13158
13158
  } catch {
13159
13159
  }
13160
13160
  if (stats && stats.isFile()) return;
13161
- const dir = path22.dirname(file2);
13161
+ const dir = path24.dirname(file2);
13162
13162
  try {
13163
- if (!fs22.statSync(dir).isDirectory()) {
13164
- fs22.readdirSync(dir);
13163
+ if (!fs24.statSync(dir).isDirectory()) {
13164
+ fs24.readdirSync(dir);
13165
13165
  }
13166
13166
  } catch (err) {
13167
13167
  if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
13168
13168
  else throw err;
13169
13169
  }
13170
- fs22.writeFileSync(file2, "");
13170
+ fs24.writeFileSync(file2, "");
13171
13171
  }
13172
13172
  module2.exports = {
13173
13173
  createFile: u(createFile),
@@ -13181,50 +13181,50 @@ var require_link = __commonJS({
13181
13181
  "../node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
13182
13182
  "use strict";
13183
13183
  var u = require_universalify().fromPromise;
13184
- var path22 = require("path");
13185
- var fs22 = require_fs();
13184
+ var path24 = require("path");
13185
+ var fs24 = require_fs();
13186
13186
  var mkdir = require_mkdirs();
13187
13187
  var { pathExists } = require_path_exists();
13188
13188
  var { areIdentical } = require_stat();
13189
13189
  async function createLink(srcpath, dstpath) {
13190
13190
  let dstStat;
13191
13191
  try {
13192
- dstStat = await fs22.lstat(dstpath);
13192
+ dstStat = await fs24.lstat(dstpath);
13193
13193
  } catch {
13194
13194
  }
13195
13195
  let srcStat;
13196
13196
  try {
13197
- srcStat = await fs22.lstat(srcpath);
13197
+ srcStat = await fs24.lstat(srcpath);
13198
13198
  } catch (err) {
13199
13199
  err.message = err.message.replace("lstat", "ensureLink");
13200
13200
  throw err;
13201
13201
  }
13202
13202
  if (dstStat && areIdentical(srcStat, dstStat)) return;
13203
- const dir = path22.dirname(dstpath);
13203
+ const dir = path24.dirname(dstpath);
13204
13204
  const dirExists = await pathExists(dir);
13205
13205
  if (!dirExists) {
13206
13206
  await mkdir.mkdirs(dir);
13207
13207
  }
13208
- await fs22.link(srcpath, dstpath);
13208
+ await fs24.link(srcpath, dstpath);
13209
13209
  }
13210
13210
  function createLinkSync(srcpath, dstpath) {
13211
13211
  let dstStat;
13212
13212
  try {
13213
- dstStat = fs22.lstatSync(dstpath);
13213
+ dstStat = fs24.lstatSync(dstpath);
13214
13214
  } catch {
13215
13215
  }
13216
13216
  try {
13217
- const srcStat = fs22.lstatSync(srcpath);
13217
+ const srcStat = fs24.lstatSync(srcpath);
13218
13218
  if (dstStat && areIdentical(srcStat, dstStat)) return;
13219
13219
  } catch (err) {
13220
13220
  err.message = err.message.replace("lstat", "ensureLink");
13221
13221
  throw err;
13222
13222
  }
13223
- const dir = path22.dirname(dstpath);
13224
- const dirExists = fs22.existsSync(dir);
13225
- if (dirExists) return fs22.linkSync(srcpath, dstpath);
13223
+ const dir = path24.dirname(dstpath);
13224
+ const dirExists = fs24.existsSync(dir);
13225
+ if (dirExists) return fs24.linkSync(srcpath, dstpath);
13226
13226
  mkdir.mkdirsSync(dir);
13227
- return fs22.linkSync(srcpath, dstpath);
13227
+ return fs24.linkSync(srcpath, dstpath);
13228
13228
  }
13229
13229
  module2.exports = {
13230
13230
  createLink: u(createLink),
@@ -13237,14 +13237,14 @@ var require_link = __commonJS({
13237
13237
  var require_symlink_paths = __commonJS({
13238
13238
  "../node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
13239
13239
  "use strict";
13240
- var path22 = require("path");
13241
- var fs22 = require_fs();
13240
+ var path24 = require("path");
13241
+ var fs24 = require_fs();
13242
13242
  var { pathExists } = require_path_exists();
13243
13243
  var u = require_universalify().fromPromise;
13244
13244
  async function symlinkPaths(srcpath, dstpath) {
13245
- if (path22.isAbsolute(srcpath)) {
13245
+ if (path24.isAbsolute(srcpath)) {
13246
13246
  try {
13247
- await fs22.lstat(srcpath);
13247
+ await fs24.lstat(srcpath);
13248
13248
  } catch (err) {
13249
13249
  err.message = err.message.replace("lstat", "ensureSymlink");
13250
13250
  throw err;
@@ -13254,8 +13254,8 @@ var require_symlink_paths = __commonJS({
13254
13254
  toDst: srcpath
13255
13255
  };
13256
13256
  }
13257
- const dstdir = path22.dirname(dstpath);
13258
- const relativeToDst = path22.join(dstdir, srcpath);
13257
+ const dstdir = path24.dirname(dstpath);
13258
+ const relativeToDst = path24.join(dstdir, srcpath);
13259
13259
  const exists = await pathExists(relativeToDst);
13260
13260
  if (exists) {
13261
13261
  return {
@@ -13264,39 +13264,39 @@ var require_symlink_paths = __commonJS({
13264
13264
  };
13265
13265
  }
13266
13266
  try {
13267
- await fs22.lstat(srcpath);
13267
+ await fs24.lstat(srcpath);
13268
13268
  } catch (err) {
13269
13269
  err.message = err.message.replace("lstat", "ensureSymlink");
13270
13270
  throw err;
13271
13271
  }
13272
13272
  return {
13273
13273
  toCwd: srcpath,
13274
- toDst: path22.relative(dstdir, srcpath)
13274
+ toDst: path24.relative(dstdir, srcpath)
13275
13275
  };
13276
13276
  }
13277
13277
  function symlinkPathsSync(srcpath, dstpath) {
13278
- if (path22.isAbsolute(srcpath)) {
13279
- const exists2 = fs22.existsSync(srcpath);
13278
+ if (path24.isAbsolute(srcpath)) {
13279
+ const exists2 = fs24.existsSync(srcpath);
13280
13280
  if (!exists2) throw new Error("absolute srcpath does not exist");
13281
13281
  return {
13282
13282
  toCwd: srcpath,
13283
13283
  toDst: srcpath
13284
13284
  };
13285
13285
  }
13286
- const dstdir = path22.dirname(dstpath);
13287
- const relativeToDst = path22.join(dstdir, srcpath);
13288
- const exists = fs22.existsSync(relativeToDst);
13286
+ const dstdir = path24.dirname(dstpath);
13287
+ const relativeToDst = path24.join(dstdir, srcpath);
13288
+ const exists = fs24.existsSync(relativeToDst);
13289
13289
  if (exists) {
13290
13290
  return {
13291
13291
  toCwd: relativeToDst,
13292
13292
  toDst: srcpath
13293
13293
  };
13294
13294
  }
13295
- const srcExists = fs22.existsSync(srcpath);
13295
+ const srcExists = fs24.existsSync(srcpath);
13296
13296
  if (!srcExists) throw new Error("relative srcpath does not exist");
13297
13297
  return {
13298
13298
  toCwd: srcpath,
13299
- toDst: path22.relative(dstdir, srcpath)
13299
+ toDst: path24.relative(dstdir, srcpath)
13300
13300
  };
13301
13301
  }
13302
13302
  module2.exports = {
@@ -13310,13 +13310,13 @@ var require_symlink_paths = __commonJS({
13310
13310
  var require_symlink_type = __commonJS({
13311
13311
  "../node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
13312
13312
  "use strict";
13313
- var fs22 = require_fs();
13313
+ var fs24 = require_fs();
13314
13314
  var u = require_universalify().fromPromise;
13315
13315
  async function symlinkType(srcpath, type) {
13316
13316
  if (type) return type;
13317
13317
  let stats;
13318
13318
  try {
13319
- stats = await fs22.lstat(srcpath);
13319
+ stats = await fs24.lstat(srcpath);
13320
13320
  } catch {
13321
13321
  return "file";
13322
13322
  }
@@ -13326,7 +13326,7 @@ var require_symlink_type = __commonJS({
13326
13326
  if (type) return type;
13327
13327
  let stats;
13328
13328
  try {
13329
- stats = fs22.lstatSync(srcpath);
13329
+ stats = fs24.lstatSync(srcpath);
13330
13330
  } catch {
13331
13331
  return "file";
13332
13332
  }
@@ -13344,8 +13344,8 @@ var require_symlink = __commonJS({
13344
13344
  "../node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
13345
13345
  "use strict";
13346
13346
  var u = require_universalify().fromPromise;
13347
- var path22 = require("path");
13348
- var fs22 = require_fs();
13347
+ var path24 = require("path");
13348
+ var fs24 = require_fs();
13349
13349
  var { mkdirs, mkdirsSync } = require_mkdirs();
13350
13350
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
13351
13351
  var { symlinkType, symlinkTypeSync } = require_symlink_type();
@@ -13354,44 +13354,44 @@ var require_symlink = __commonJS({
13354
13354
  async function createSymlink(srcpath, dstpath, type) {
13355
13355
  let stats;
13356
13356
  try {
13357
- stats = await fs22.lstat(dstpath);
13357
+ stats = await fs24.lstat(dstpath);
13358
13358
  } catch {
13359
13359
  }
13360
13360
  if (stats && stats.isSymbolicLink()) {
13361
13361
  const [srcStat, dstStat] = await Promise.all([
13362
- fs22.stat(srcpath),
13363
- fs22.stat(dstpath)
13362
+ fs24.stat(srcpath),
13363
+ fs24.stat(dstpath)
13364
13364
  ]);
13365
13365
  if (areIdentical(srcStat, dstStat)) return;
13366
13366
  }
13367
13367
  const relative = await symlinkPaths(srcpath, dstpath);
13368
13368
  srcpath = relative.toDst;
13369
13369
  const toType = await symlinkType(relative.toCwd, type);
13370
- const dir = path22.dirname(dstpath);
13370
+ const dir = path24.dirname(dstpath);
13371
13371
  if (!await pathExists(dir)) {
13372
13372
  await mkdirs(dir);
13373
13373
  }
13374
- return fs22.symlink(srcpath, dstpath, toType);
13374
+ return fs24.symlink(srcpath, dstpath, toType);
13375
13375
  }
13376
13376
  function createSymlinkSync(srcpath, dstpath, type) {
13377
13377
  let stats;
13378
13378
  try {
13379
- stats = fs22.lstatSync(dstpath);
13379
+ stats = fs24.lstatSync(dstpath);
13380
13380
  } catch {
13381
13381
  }
13382
13382
  if (stats && stats.isSymbolicLink()) {
13383
- const srcStat = fs22.statSync(srcpath);
13384
- const dstStat = fs22.statSync(dstpath);
13383
+ const srcStat = fs24.statSync(srcpath);
13384
+ const dstStat = fs24.statSync(dstpath);
13385
13385
  if (areIdentical(srcStat, dstStat)) return;
13386
13386
  }
13387
13387
  const relative = symlinkPathsSync(srcpath, dstpath);
13388
13388
  srcpath = relative.toDst;
13389
13389
  type = symlinkTypeSync(relative.toCwd, type);
13390
- const dir = path22.dirname(dstpath);
13391
- const exists = fs22.existsSync(dir);
13392
- if (exists) return fs22.symlinkSync(srcpath, dstpath, type);
13390
+ const dir = path24.dirname(dstpath);
13391
+ const exists = fs24.existsSync(dir);
13392
+ if (exists) return fs24.symlinkSync(srcpath, dstpath, type);
13393
13393
  mkdirsSync(dir);
13394
- return fs22.symlinkSync(srcpath, dstpath, type);
13394
+ return fs24.symlinkSync(srcpath, dstpath, type);
13395
13395
  }
13396
13396
  module2.exports = {
13397
13397
  createSymlink: u(createSymlink),
@@ -13460,9 +13460,9 @@ var require_jsonfile = __commonJS({
13460
13460
  if (typeof options === "string") {
13461
13461
  options = { encoding: options };
13462
13462
  }
13463
- const fs22 = options.fs || _fs;
13463
+ const fs24 = options.fs || _fs;
13464
13464
  const shouldThrow = "throws" in options ? options.throws : true;
13465
- let data = await universalify.fromCallback(fs22.readFile)(file2, options);
13465
+ let data = await universalify.fromCallback(fs24.readFile)(file2, options);
13466
13466
  data = stripBom(data);
13467
13467
  let obj;
13468
13468
  try {
@@ -13478,14 +13478,14 @@ var require_jsonfile = __commonJS({
13478
13478
  return obj;
13479
13479
  }
13480
13480
  var readFile = universalify.fromPromise(_readFile);
13481
- function readFileSync3(file2, options = {}) {
13481
+ function readFileSync4(file2, options = {}) {
13482
13482
  if (typeof options === "string") {
13483
13483
  options = { encoding: options };
13484
13484
  }
13485
- const fs22 = options.fs || _fs;
13485
+ const fs24 = options.fs || _fs;
13486
13486
  const shouldThrow = "throws" in options ? options.throws : true;
13487
13487
  try {
13488
- let content = fs22.readFileSync(file2, options);
13488
+ let content = fs24.readFileSync(file2, options);
13489
13489
  content = stripBom(content);
13490
13490
  return JSON.parse(content, options.reviver);
13491
13491
  } catch (err) {
@@ -13498,19 +13498,19 @@ var require_jsonfile = __commonJS({
13498
13498
  }
13499
13499
  }
13500
13500
  async function _writeFile(file2, obj, options = {}) {
13501
- const fs22 = options.fs || _fs;
13501
+ const fs24 = options.fs || _fs;
13502
13502
  const str = stringify2(obj, options);
13503
- await universalify.fromCallback(fs22.writeFile)(file2, str, options);
13503
+ await universalify.fromCallback(fs24.writeFile)(file2, str, options);
13504
13504
  }
13505
13505
  var writeFile = universalify.fromPromise(_writeFile);
13506
13506
  function writeFileSync3(file2, obj, options = {}) {
13507
- const fs22 = options.fs || _fs;
13507
+ const fs24 = options.fs || _fs;
13508
13508
  const str = stringify2(obj, options);
13509
- return fs22.writeFileSync(file2, str, options);
13509
+ return fs24.writeFileSync(file2, str, options);
13510
13510
  }
13511
13511
  module2.exports = {
13512
13512
  readFile,
13513
- readFileSync: readFileSync3,
13513
+ readFileSync: readFileSync4,
13514
13514
  writeFile,
13515
13515
  writeFileSync: writeFileSync3
13516
13516
  };
@@ -13537,23 +13537,23 @@ var require_output_file = __commonJS({
13537
13537
  "../node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
13538
13538
  "use strict";
13539
13539
  var u = require_universalify().fromPromise;
13540
- var fs22 = require_fs();
13541
- var path22 = require("path");
13540
+ var fs24 = require_fs();
13541
+ var path24 = require("path");
13542
13542
  var mkdir = require_mkdirs();
13543
13543
  var pathExists = require_path_exists().pathExists;
13544
13544
  async function outputFile(file2, data, encoding = "utf-8") {
13545
- const dir = path22.dirname(file2);
13545
+ const dir = path24.dirname(file2);
13546
13546
  if (!await pathExists(dir)) {
13547
13547
  await mkdir.mkdirs(dir);
13548
13548
  }
13549
- return fs22.writeFile(file2, data, encoding);
13549
+ return fs24.writeFile(file2, data, encoding);
13550
13550
  }
13551
13551
  function outputFileSync(file2, ...args) {
13552
- const dir = path22.dirname(file2);
13553
- if (!fs22.existsSync(dir)) {
13552
+ const dir = path24.dirname(file2);
13553
+ if (!fs24.existsSync(dir)) {
13554
13554
  mkdir.mkdirsSync(dir);
13555
13555
  }
13556
- fs22.writeFileSync(file2, ...args);
13556
+ fs24.writeFileSync(file2, ...args);
13557
13557
  }
13558
13558
  module2.exports = {
13559
13559
  outputFile: u(outputFile),
@@ -13612,8 +13612,8 @@ var require_json = __commonJS({
13612
13612
  var require_move = __commonJS({
13613
13613
  "../node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
13614
13614
  "use strict";
13615
- var fs22 = require_fs();
13616
- var path22 = require("path");
13615
+ var fs24 = require_fs();
13616
+ var path24 = require("path");
13617
13617
  var { copy } = require_copy2();
13618
13618
  var { remove } = require_remove();
13619
13619
  var { mkdirp } = require_mkdirs();
@@ -13623,8 +13623,8 @@ var require_move = __commonJS({
13623
13623
  const overwrite = opts.overwrite || opts.clobber || false;
13624
13624
  const { srcStat, isChangingCase = false } = await stat.checkPaths(src, dest, "move", opts);
13625
13625
  await stat.checkParentPaths(src, srcStat, dest, "move");
13626
- const destParent = path22.dirname(dest);
13627
- const parsedParentPath = path22.parse(destParent);
13626
+ const destParent = path24.dirname(dest);
13627
+ const parsedParentPath = path24.parse(destParent);
13628
13628
  if (parsedParentPath.root !== destParent) {
13629
13629
  await mkdirp(destParent);
13630
13630
  }
@@ -13639,7 +13639,7 @@ var require_move = __commonJS({
13639
13639
  }
13640
13640
  }
13641
13641
  try {
13642
- await fs22.rename(src, dest);
13642
+ await fs24.rename(src, dest);
13643
13643
  } catch (err) {
13644
13644
  if (err.code !== "EXDEV") {
13645
13645
  throw err;
@@ -13664,8 +13664,8 @@ var require_move = __commonJS({
13664
13664
  var require_move_sync = __commonJS({
13665
13665
  "../node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
13666
13666
  "use strict";
13667
- var fs22 = require_graceful_fs();
13668
- var path22 = require("path");
13667
+ var fs24 = require_graceful_fs();
13668
+ var path24 = require("path");
13669
13669
  var copySync = require_copy2().copySync;
13670
13670
  var removeSync = require_remove().removeSync;
13671
13671
  var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -13675,12 +13675,12 @@ var require_move_sync = __commonJS({
13675
13675
  const overwrite = opts.overwrite || opts.clobber || false;
13676
13676
  const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, "move", opts);
13677
13677
  stat.checkParentPathsSync(src, srcStat, dest, "move");
13678
- if (!isParentRoot(dest)) mkdirpSync(path22.dirname(dest));
13678
+ if (!isParentRoot(dest)) mkdirpSync(path24.dirname(dest));
13679
13679
  return doRename(src, dest, overwrite, isChangingCase);
13680
13680
  }
13681
13681
  function isParentRoot(dest) {
13682
- const parent = path22.dirname(dest);
13683
- const parsedPath = path22.parse(parent);
13682
+ const parent = path24.dirname(dest);
13683
+ const parsedPath = path24.parse(parent);
13684
13684
  return parsedPath.root === parent;
13685
13685
  }
13686
13686
  function doRename(src, dest, overwrite, isChangingCase) {
@@ -13689,12 +13689,12 @@ var require_move_sync = __commonJS({
13689
13689
  removeSync(dest);
13690
13690
  return rename(src, dest, overwrite);
13691
13691
  }
13692
- if (fs22.existsSync(dest)) throw new Error("dest already exists.");
13692
+ if (fs24.existsSync(dest)) throw new Error("dest already exists.");
13693
13693
  return rename(src, dest, overwrite);
13694
13694
  }
13695
13695
  function rename(src, dest, overwrite) {
13696
13696
  try {
13697
- fs22.renameSync(src, dest);
13697
+ fs24.renameSync(src, dest);
13698
13698
  } catch (err) {
13699
13699
  if (err.code !== "EXDEV") throw err;
13700
13700
  return moveAcrossDevice(src, dest, overwrite);
@@ -15255,7 +15255,7 @@ var require_dataType = __commonJS({
15255
15255
  exports2.coerceAndCheckDataType = coerceAndCheckDataType;
15256
15256
  var COERCIBLE = /* @__PURE__ */ new Set(["string", "number", "integer", "boolean", "null"]);
15257
15257
  function coerceToTypes(types, coerceTypes) {
15258
- return coerceTypes ? types.filter((t3) => COERCIBLE.has(t3) || coerceTypes === "array" && t3 === "array") : [];
15258
+ return coerceTypes ? types.filter((t2) => COERCIBLE.has(t2) || coerceTypes === "array" && t2 === "array") : [];
15259
15259
  }
15260
15260
  function coerceData(it, types, coerceTo) {
15261
15261
  const { gen, data, opts } = it;
@@ -15265,9 +15265,9 @@ var require_dataType = __commonJS({
15265
15265
  gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));
15266
15266
  }
15267
15267
  gen.if((0, codegen_1._)`${coerced} !== undefined`);
15268
- for (const t3 of coerceTo) {
15269
- if (COERCIBLE.has(t3) || t3 === "array" && opts.coerceTypes === "array") {
15270
- coerceSpecificType(t3);
15268
+ for (const t2 of coerceTo) {
15269
+ if (COERCIBLE.has(t2) || t2 === "array" && opts.coerceTypes === "array") {
15270
+ coerceSpecificType(t2);
15271
15271
  }
15272
15272
  }
15273
15273
  gen.else();
@@ -15277,8 +15277,8 @@ var require_dataType = __commonJS({
15277
15277
  gen.assign(data, coerced);
15278
15278
  assignParentData(it, coerced);
15279
15279
  });
15280
- function coerceSpecificType(t3) {
15281
- switch (t3) {
15280
+ function coerceSpecificType(t2) {
15281
+ switch (t2) {
15282
15282
  case "string":
15283
15283
  gen.elseIf((0, codegen_1._)`${dataType} == "number" || ${dataType} == "boolean"`).assign(coerced, (0, codegen_1._)`"" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`""`);
15284
15284
  return;
@@ -15350,8 +15350,8 @@ var require_dataType = __commonJS({
15350
15350
  }
15351
15351
  if (types.number)
15352
15352
  delete types.integer;
15353
- for (const t3 in types)
15354
- cond = (0, codegen_1.and)(cond, checkDataType(t3, data, strictNums, correct));
15353
+ for (const t2 in types)
15354
+ cond = (0, codegen_1.and)(cond, checkDataType(t2, data, strictNums, correct));
15355
15355
  return cond;
15356
15356
  }
15357
15357
  exports2.checkDataTypes = checkDataTypes;
@@ -16266,9 +16266,9 @@ var require_validate = __commonJS({
16266
16266
  it.dataTypes = types;
16267
16267
  return;
16268
16268
  }
16269
- types.forEach((t3) => {
16270
- if (!includesType(it.dataTypes, t3)) {
16271
- strictTypesError(it, `type "${t3}" not allowed by context "${it.dataTypes.join(",")}"`);
16269
+ types.forEach((t2) => {
16270
+ if (!includesType(it.dataTypes, t2)) {
16271
+ strictTypesError(it, `type "${t2}" not allowed by context "${it.dataTypes.join(",")}"`);
16272
16272
  }
16273
16273
  });
16274
16274
  narrowSchemaTypes(it, types);
@@ -16284,7 +16284,7 @@ var require_validate = __commonJS({
16284
16284
  const rule = rules[keyword];
16285
16285
  if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {
16286
16286
  const { type } = rule.definition;
16287
- if (type.length && !type.some((t3) => hasApplicableType(ts, t3))) {
16287
+ if (type.length && !type.some((t2) => hasApplicableType(ts, t2))) {
16288
16288
  strictTypesError(it, `missing type "${type.join(",")}" for keyword "${keyword}"`);
16289
16289
  }
16290
16290
  }
@@ -16293,15 +16293,15 @@ var require_validate = __commonJS({
16293
16293
  function hasApplicableType(schTs, kwdT) {
16294
16294
  return schTs.includes(kwdT) || kwdT === "number" && schTs.includes("integer");
16295
16295
  }
16296
- function includesType(ts, t3) {
16297
- return ts.includes(t3) || t3 === "integer" && ts.includes("number");
16296
+ function includesType(ts, t2) {
16297
+ return ts.includes(t2) || t2 === "integer" && ts.includes("number");
16298
16298
  }
16299
16299
  function narrowSchemaTypes(it, withTypes) {
16300
16300
  const ts = [];
16301
- for (const t3 of it.dataTypes) {
16302
- if (includesType(withTypes, t3))
16303
- ts.push(t3);
16304
- else if (withTypes.includes("integer") && t3 === "number")
16301
+ for (const t2 of it.dataTypes) {
16302
+ if (includesType(withTypes, t2))
16303
+ ts.push(t2);
16304
+ else if (withTypes.includes("integer") && t2 === "number")
16305
16305
  ts.push("integer");
16306
16306
  }
16307
16307
  it.dataTypes = ts;
@@ -16939,8 +16939,8 @@ var require_utils3 = __commonJS({
16939
16939
  }
16940
16940
  return ind;
16941
16941
  }
16942
- function removeDotSegments(path22) {
16943
- let input = path22;
16942
+ function removeDotSegments(path24) {
16943
+ let input = path24;
16944
16944
  const output = [];
16945
16945
  let nextSlash = -1;
16946
16946
  let len = 0;
@@ -17139,8 +17139,8 @@ var require_schemes = __commonJS({
17139
17139
  wsComponent.secure = void 0;
17140
17140
  }
17141
17141
  if (wsComponent.resourceName) {
17142
- const [path22, query] = wsComponent.resourceName.split("?");
17143
- wsComponent.path = path22 && path22 !== "/" ? path22 : void 0;
17142
+ const [path24, query] = wsComponent.resourceName.split("?");
17143
+ wsComponent.path = path24 && path24 !== "/" ? path24 : void 0;
17144
17144
  wsComponent.query = query;
17145
17145
  wsComponent.resourceName = void 0;
17146
17146
  }
@@ -17912,7 +17912,7 @@ var require_core = __commonJS({
17912
17912
  type: (0, dataType_1.getJSONTypes)(def.type),
17913
17913
  schemaType: (0, dataType_1.getJSONTypes)(def.schemaType)
17914
17914
  };
17915
- (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t3) => addRule.call(this, k, definition, t3)));
17915
+ (0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t2) => addRule.call(this, k, definition, t2)));
17916
17916
  return this;
17917
17917
  }
17918
17918
  getKeyword(keyword) {
@@ -18111,7 +18111,7 @@ var require_core = __commonJS({
18111
18111
  if (dataType && post)
18112
18112
  throw new Error('keyword with "post" flag cannot have "type"');
18113
18113
  const { RULES } = this;
18114
- let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t3 }) => t3 === dataType);
18114
+ let ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t2 }) => t2 === dataType);
18115
18115
  if (!ruleGroup) {
18116
18116
  ruleGroup = { type: dataType, rules: [] };
18117
18117
  RULES.rules.push(ruleGroup);
@@ -18659,7 +18659,7 @@ var require_uniqueItems = __commonJS({
18659
18659
  gen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));
18660
18660
  }
18661
18661
  function canOptimize() {
18662
- return itemTypes.length > 0 && !itemTypes.some((t3) => t3 === "object" || t3 === "array");
18662
+ return itemTypes.length > 0 && !itemTypes.some((t2) => t2 === "object" || t2 === "array");
18663
18663
  }
18664
18664
  function loopN(i, j) {
18665
18665
  const item = gen.name("item");
@@ -20300,18 +20300,18 @@ var require_formats = __commonJS({
20300
20300
  const timeZone = matches[5];
20301
20301
  return (hour <= 23 && minute <= 59 && second <= 59 || hour === 23 && minute === 59 && second === 60) && (!withTimeZone || timeZone !== "");
20302
20302
  }
20303
- function compareTime(t1, t22) {
20304
- if (!(t1 && t22))
20303
+ function compareTime(t1, t2) {
20304
+ if (!(t1 && t2))
20305
20305
  return void 0;
20306
20306
  const a1 = TIME.exec(t1);
20307
- const a2 = TIME.exec(t22);
20307
+ const a2 = TIME.exec(t2);
20308
20308
  if (!(a1 && a2))
20309
20309
  return void 0;
20310
20310
  t1 = a1[1] + a1[2] + a1[3] + (a1[4] || "");
20311
- t22 = a2[1] + a2[2] + a2[3] + (a2[4] || "");
20312
- if (t1 > t22)
20311
+ t2 = a2[1] + a2[2] + a2[3] + (a2[4] || "");
20312
+ if (t1 > t2)
20313
20313
  return 1;
20314
- if (t1 < t22)
20314
+ if (t1 < t2)
20315
20315
  return -1;
20316
20316
  return 0;
20317
20317
  }
@@ -20324,11 +20324,11 @@ var require_formats = __commonJS({
20324
20324
  if (!(dt1 && dt2))
20325
20325
  return void 0;
20326
20326
  const [d1, t1] = dt1.split(DATE_TIME_SEPARATOR);
20327
- const [d2, t22] = dt2.split(DATE_TIME_SEPARATOR);
20327
+ const [d2, t2] = dt2.split(DATE_TIME_SEPARATOR);
20328
20328
  const res = compareDate(d1, d2);
20329
20329
  if (res === void 0)
20330
20330
  return void 0;
20331
- return res || compareTime(t1, t22);
20331
+ return res || compareTime(t1, t2);
20332
20332
  }
20333
20333
  var NOT_URI_FRAGMENT = /\/|:/;
20334
20334
  var URI = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
@@ -20466,12 +20466,12 @@ var require_dist2 = __commonJS({
20466
20466
  throw new Error(`Unknown format "${name}"`);
20467
20467
  return f;
20468
20468
  };
20469
- function addFormats(ajv, list, fs22, exportName) {
20469
+ function addFormats(ajv, list, fs24, exportName) {
20470
20470
  var _a2;
20471
20471
  var _b;
20472
20472
  (_a2 = (_b = ajv.opts.code).formats) !== null && _a2 !== void 0 ? _a2 : _b.formats = codegen_1._`require("ajv-formats/dist/formats").${exportName}`;
20473
20473
  for (const f of list)
20474
- ajv.addFormat(f, fs22[f]);
20474
+ ajv.addFormat(f, fs24[f]);
20475
20475
  }
20476
20476
  module2.exports = exports2 = formatsPlugin;
20477
20477
  Object.defineProperty(exports2, "__esModule", { value: true });
@@ -20536,7 +20536,7 @@ var require_re = __commonJS({
20536
20536
  var safeRe = exports2.safeRe = [];
20537
20537
  var src = exports2.src = [];
20538
20538
  var safeSrc = exports2.safeSrc = [];
20539
- var t3 = exports2.t = {};
20539
+ var t2 = exports2.t = {};
20540
20540
  var R = 0;
20541
20541
  var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
20542
20542
  var safeRegexReplacements = [
@@ -20554,7 +20554,7 @@ var require_re = __commonJS({
20554
20554
  const safe = makeSafeRegex(value);
20555
20555
  const index = R++;
20556
20556
  debug(name, index, value);
20557
- t3[name] = index;
20557
+ t2[name] = index;
20558
20558
  src[index] = value;
20559
20559
  safeSrc[index] = safe;
20560
20560
  re[index] = new RegExp(value, isGlobal ? "g" : void 0);
@@ -20563,46 +20563,46 @@ var require_re = __commonJS({
20563
20563
  createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
20564
20564
  createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
20565
20565
  createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
20566
- createToken("MAINVERSION", `(${src[t3.NUMERICIDENTIFIER]})\\.(${src[t3.NUMERICIDENTIFIER]})\\.(${src[t3.NUMERICIDENTIFIER]})`);
20567
- createToken("MAINVERSIONLOOSE", `(${src[t3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})\\.(${src[t3.NUMERICIDENTIFIERLOOSE]})`);
20568
- createToken("PRERELEASEIDENTIFIER", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIER]})`);
20569
- createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t3.NONNUMERICIDENTIFIER]}|${src[t3.NUMERICIDENTIFIERLOOSE]})`);
20570
- createToken("PRERELEASE", `(?:-(${src[t3.PRERELEASEIDENTIFIER]}(?:\\.${src[t3.PRERELEASEIDENTIFIER]})*))`);
20571
- createToken("PRERELEASELOOSE", `(?:-?(${src[t3.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t3.PRERELEASEIDENTIFIERLOOSE]})*))`);
20566
+ createToken("MAINVERSION", `(${src[t2.NUMERICIDENTIFIER]})\\.(${src[t2.NUMERICIDENTIFIER]})\\.(${src[t2.NUMERICIDENTIFIER]})`);
20567
+ createToken("MAINVERSIONLOOSE", `(${src[t2.NUMERICIDENTIFIERLOOSE]})\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})\\.(${src[t2.NUMERICIDENTIFIERLOOSE]})`);
20568
+ createToken("PRERELEASEIDENTIFIER", `(?:${src[t2.NONNUMERICIDENTIFIER]}|${src[t2.NUMERICIDENTIFIER]})`);
20569
+ createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t2.NONNUMERICIDENTIFIER]}|${src[t2.NUMERICIDENTIFIERLOOSE]})`);
20570
+ createToken("PRERELEASE", `(?:-(${src[t2.PRERELEASEIDENTIFIER]}(?:\\.${src[t2.PRERELEASEIDENTIFIER]})*))`);
20571
+ createToken("PRERELEASELOOSE", `(?:-?(${src[t2.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t2.PRERELEASEIDENTIFIERLOOSE]})*))`);
20572
20572
  createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
20573
- createToken("BUILD", `(?:\\+(${src[t3.BUILDIDENTIFIER]}(?:\\.${src[t3.BUILDIDENTIFIER]})*))`);
20574
- createToken("FULLPLAIN", `v?${src[t3.MAINVERSION]}${src[t3.PRERELEASE]}?${src[t3.BUILD]}?`);
20575
- createToken("FULL", `^${src[t3.FULLPLAIN]}$`);
20576
- createToken("LOOSEPLAIN", `[v=\\s]*${src[t3.MAINVERSIONLOOSE]}${src[t3.PRERELEASELOOSE]}?${src[t3.BUILD]}?`);
20577
- createToken("LOOSE", `^${src[t3.LOOSEPLAIN]}$`);
20573
+ createToken("BUILD", `(?:\\+(${src[t2.BUILDIDENTIFIER]}(?:\\.${src[t2.BUILDIDENTIFIER]})*))`);
20574
+ createToken("FULLPLAIN", `v?${src[t2.MAINVERSION]}${src[t2.PRERELEASE]}?${src[t2.BUILD]}?`);
20575
+ createToken("FULL", `^${src[t2.FULLPLAIN]}$`);
20576
+ createToken("LOOSEPLAIN", `[v=\\s]*${src[t2.MAINVERSIONLOOSE]}${src[t2.PRERELEASELOOSE]}?${src[t2.BUILD]}?`);
20577
+ createToken("LOOSE", `^${src[t2.LOOSEPLAIN]}$`);
20578
20578
  createToken("GTLT", "((?:<|>)?=?)");
20579
- createToken("XRANGEIDENTIFIERLOOSE", `${src[t3.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
20580
- createToken("XRANGEIDENTIFIER", `${src[t3.NUMERICIDENTIFIER]}|x|X|\\*`);
20581
- createToken("XRANGEPLAIN", `[v=\\s]*(${src[t3.XRANGEIDENTIFIER]})(?:\\.(${src[t3.XRANGEIDENTIFIER]})(?:\\.(${src[t3.XRANGEIDENTIFIER]})(?:${src[t3.PRERELEASE]})?${src[t3.BUILD]}?)?)?`);
20582
- createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t3.XRANGEIDENTIFIERLOOSE]})(?:${src[t3.PRERELEASELOOSE]})?${src[t3.BUILD]}?)?)?`);
20583
- createToken("XRANGE", `^${src[t3.GTLT]}\\s*${src[t3.XRANGEPLAIN]}$`);
20584
- createToken("XRANGELOOSE", `^${src[t3.GTLT]}\\s*${src[t3.XRANGEPLAINLOOSE]}$`);
20579
+ createToken("XRANGEIDENTIFIERLOOSE", `${src[t2.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
20580
+ createToken("XRANGEIDENTIFIER", `${src[t2.NUMERICIDENTIFIER]}|x|X|\\*`);
20581
+ createToken("XRANGEPLAIN", `[v=\\s]*(${src[t2.XRANGEIDENTIFIER]})(?:\\.(${src[t2.XRANGEIDENTIFIER]})(?:\\.(${src[t2.XRANGEIDENTIFIER]})(?:${src[t2.PRERELEASE]})?${src[t2.BUILD]}?)?)?`);
20582
+ createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t2.XRANGEIDENTIFIERLOOSE]})(?:${src[t2.PRERELEASELOOSE]})?${src[t2.BUILD]}?)?)?`);
20583
+ createToken("XRANGE", `^${src[t2.GTLT]}\\s*${src[t2.XRANGEPLAIN]}$`);
20584
+ createToken("XRANGELOOSE", `^${src[t2.GTLT]}\\s*${src[t2.XRANGEPLAINLOOSE]}$`);
20585
20585
  createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
20586
- createToken("COERCE", `${src[t3.COERCEPLAIN]}(?:$|[^\\d])`);
20587
- createToken("COERCEFULL", src[t3.COERCEPLAIN] + `(?:${src[t3.PRERELEASE]})?(?:${src[t3.BUILD]})?(?:$|[^\\d])`);
20588
- createToken("COERCERTL", src[t3.COERCE], true);
20589
- createToken("COERCERTLFULL", src[t3.COERCEFULL], true);
20586
+ createToken("COERCE", `${src[t2.COERCEPLAIN]}(?:$|[^\\d])`);
20587
+ createToken("COERCEFULL", src[t2.COERCEPLAIN] + `(?:${src[t2.PRERELEASE]})?(?:${src[t2.BUILD]})?(?:$|[^\\d])`);
20588
+ createToken("COERCERTL", src[t2.COERCE], true);
20589
+ createToken("COERCERTLFULL", src[t2.COERCEFULL], true);
20590
20590
  createToken("LONETILDE", "(?:~>?)");
20591
- createToken("TILDETRIM", `(\\s*)${src[t3.LONETILDE]}\\s+`, true);
20591
+ createToken("TILDETRIM", `(\\s*)${src[t2.LONETILDE]}\\s+`, true);
20592
20592
  exports2.tildeTrimReplace = "$1~";
20593
- createToken("TILDE", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAIN]}$`);
20594
- createToken("TILDELOOSE", `^${src[t3.LONETILDE]}${src[t3.XRANGEPLAINLOOSE]}$`);
20593
+ createToken("TILDE", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAIN]}$`);
20594
+ createToken("TILDELOOSE", `^${src[t2.LONETILDE]}${src[t2.XRANGEPLAINLOOSE]}$`);
20595
20595
  createToken("LONECARET", "(?:\\^)");
20596
- createToken("CARETTRIM", `(\\s*)${src[t3.LONECARET]}\\s+`, true);
20596
+ createToken("CARETTRIM", `(\\s*)${src[t2.LONECARET]}\\s+`, true);
20597
20597
  exports2.caretTrimReplace = "$1^";
20598
- createToken("CARET", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAIN]}$`);
20599
- createToken("CARETLOOSE", `^${src[t3.LONECARET]}${src[t3.XRANGEPLAINLOOSE]}$`);
20600
- createToken("COMPARATORLOOSE", `^${src[t3.GTLT]}\\s*(${src[t3.LOOSEPLAIN]})$|^$`);
20601
- createToken("COMPARATOR", `^${src[t3.GTLT]}\\s*(${src[t3.FULLPLAIN]})$|^$`);
20602
- createToken("COMPARATORTRIM", `(\\s*)${src[t3.GTLT]}\\s*(${src[t3.LOOSEPLAIN]}|${src[t3.XRANGEPLAIN]})`, true);
20598
+ createToken("CARET", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAIN]}$`);
20599
+ createToken("CARETLOOSE", `^${src[t2.LONECARET]}${src[t2.XRANGEPLAINLOOSE]}$`);
20600
+ createToken("COMPARATORLOOSE", `^${src[t2.GTLT]}\\s*(${src[t2.LOOSEPLAIN]})$|^$`);
20601
+ createToken("COMPARATOR", `^${src[t2.GTLT]}\\s*(${src[t2.FULLPLAIN]})$|^$`);
20602
+ createToken("COMPARATORTRIM", `(\\s*)${src[t2.GTLT]}\\s*(${src[t2.LOOSEPLAIN]}|${src[t2.XRANGEPLAIN]})`, true);
20603
20603
  exports2.comparatorTrimReplace = "$1$2$3";
20604
- createToken("HYPHENRANGE", `^\\s*(${src[t3.XRANGEPLAIN]})\\s+-\\s+(${src[t3.XRANGEPLAIN]})\\s*$`);
20605
- createToken("HYPHENRANGELOOSE", `^\\s*(${src[t3.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t3.XRANGEPLAINLOOSE]})\\s*$`);
20604
+ createToken("HYPHENRANGE", `^\\s*(${src[t2.XRANGEPLAIN]})\\s+-\\s+(${src[t2.XRANGEPLAIN]})\\s*$`);
20605
+ createToken("HYPHENRANGELOOSE", `^\\s*(${src[t2.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t2.XRANGEPLAINLOOSE]})\\s*$`);
20606
20606
  createToken("STAR", "(<|>)?=?\\s*\\*");
20607
20607
  createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
20608
20608
  createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
@@ -20659,7 +20659,7 @@ var require_semver = __commonJS({
20659
20659
  "use strict";
20660
20660
  var debug = require_debug();
20661
20661
  var { MAX_LENGTH, MAX_SAFE_INTEGER } = require_constants();
20662
- var { safeRe: re, t: t3 } = require_re();
20662
+ var { safeRe: re, t: t2 } = require_re();
20663
20663
  var parseOptions = require_parse_options();
20664
20664
  var { compareIdentifiers } = require_identifiers();
20665
20665
  var SemVer = class _SemVer {
@@ -20683,7 +20683,7 @@ var require_semver = __commonJS({
20683
20683
  this.options = options;
20684
20684
  this.loose = !!options.loose;
20685
20685
  this.includePrerelease = !!options.includePrerelease;
20686
- const m = version3.trim().match(options.loose ? re[t3.LOOSE] : re[t3.FULL]);
20686
+ const m = version3.trim().match(options.loose ? re[t2.LOOSE] : re[t2.FULL]);
20687
20687
  if (!m) {
20688
20688
  throw new TypeError(`Invalid Version: ${version3}`);
20689
20689
  }
@@ -20822,7 +20822,7 @@ var require_semver = __commonJS({
20822
20822
  throw new Error("invalid increment argument: identifier is empty");
20823
20823
  }
20824
20824
  if (identifier) {
20825
- const match = `-${identifier}`.match(this.options.loose ? re[t3.PRERELEASELOOSE] : re[t3.PRERELEASE]);
20825
+ const match = `-${identifier}`.match(this.options.loose ? re[t2.PRERELEASELOOSE] : re[t2.PRERELEASE]);
20826
20826
  if (!match || match[1] !== identifier) {
20827
20827
  throw new Error(`invalid identifier: ${identifier}`);
20828
20828
  }
@@ -21271,7 +21271,7 @@ var require_coerce = __commonJS({
21271
21271
  "use strict";
21272
21272
  var SemVer = require_semver();
21273
21273
  var parse4 = require_parse();
21274
- var { safeRe: re, t: t3 } = require_re();
21274
+ var { safeRe: re, t: t2 } = require_re();
21275
21275
  var coerce = (version3, options) => {
21276
21276
  if (version3 instanceof SemVer) {
21277
21277
  return version3;
@@ -21285,9 +21285,9 @@ var require_coerce = __commonJS({
21285
21285
  options = options || {};
21286
21286
  let match = null;
21287
21287
  if (!options.rtl) {
21288
- match = version3.match(options.includePrerelease ? re[t3.COERCEFULL] : re[t3.COERCE]);
21288
+ match = version3.match(options.includePrerelease ? re[t2.COERCEFULL] : re[t2.COERCE]);
21289
21289
  } else {
21290
- const coerceRtlRegex = options.includePrerelease ? re[t3.COERCERTLFULL] : re[t3.COERCERTL];
21290
+ const coerceRtlRegex = options.includePrerelease ? re[t2.COERCERTLFULL] : re[t2.COERCERTL];
21291
21291
  let next;
21292
21292
  while ((next = coerceRtlRegex.exec(version3)) && (!match || match.index + match[0].length !== version3.length)) {
21293
21293
  if (!match || next.index + next[0].length !== match.index + match[0].length) {
@@ -21426,20 +21426,20 @@ var require_range = __commonJS({
21426
21426
  return cached2;
21427
21427
  }
21428
21428
  const loose = this.options.loose;
21429
- const hr = loose ? re[t3.HYPHENRANGELOOSE] : re[t3.HYPHENRANGE];
21429
+ const hr = loose ? re[t2.HYPHENRANGELOOSE] : re[t2.HYPHENRANGE];
21430
21430
  range = range.replace(hr, hyphenReplace(this.options.includePrerelease));
21431
21431
  debug("hyphen replace", range);
21432
- range = range.replace(re[t3.COMPARATORTRIM], comparatorTrimReplace);
21432
+ range = range.replace(re[t2.COMPARATORTRIM], comparatorTrimReplace);
21433
21433
  debug("comparator trim", range);
21434
- range = range.replace(re[t3.TILDETRIM], tildeTrimReplace);
21434
+ range = range.replace(re[t2.TILDETRIM], tildeTrimReplace);
21435
21435
  debug("tilde trim", range);
21436
- range = range.replace(re[t3.CARETTRIM], caretTrimReplace);
21436
+ range = range.replace(re[t2.CARETTRIM], caretTrimReplace);
21437
21437
  debug("caret trim", range);
21438
21438
  let rangeList = range.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
21439
21439
  if (loose) {
21440
21440
  rangeList = rangeList.filter((comp) => {
21441
21441
  debug("loose invalid filter", comp, this.options);
21442
- return !!comp.match(re[t3.COMPARATORLOOSE]);
21442
+ return !!comp.match(re[t2.COMPARATORLOOSE]);
21443
21443
  });
21444
21444
  }
21445
21445
  debug("range list", rangeList);
@@ -21501,7 +21501,7 @@ var require_range = __commonJS({
21501
21501
  var SemVer = require_semver();
21502
21502
  var {
21503
21503
  safeRe: re,
21504
- t: t3,
21504
+ t: t2,
21505
21505
  comparatorTrimReplace,
21506
21506
  tildeTrimReplace,
21507
21507
  caretTrimReplace
@@ -21522,7 +21522,7 @@ var require_range = __commonJS({
21522
21522
  return result;
21523
21523
  };
21524
21524
  var parseComparator = (comp, options) => {
21525
- comp = comp.replace(re[t3.BUILD], "");
21525
+ comp = comp.replace(re[t2.BUILD], "");
21526
21526
  debug("comp", comp, options);
21527
21527
  comp = replaceCarets(comp, options);
21528
21528
  debug("caret", comp);
@@ -21539,7 +21539,7 @@ var require_range = __commonJS({
21539
21539
  return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
21540
21540
  };
21541
21541
  var replaceTilde = (comp, options) => {
21542
- const r = options.loose ? re[t3.TILDELOOSE] : re[t3.TILDE];
21542
+ const r = options.loose ? re[t2.TILDELOOSE] : re[t2.TILDE];
21543
21543
  return comp.replace(r, (_, M, m, p, pr) => {
21544
21544
  debug("tilde", comp, _, M, m, p, pr);
21545
21545
  let ret;
@@ -21564,7 +21564,7 @@ var require_range = __commonJS({
21564
21564
  };
21565
21565
  var replaceCaret = (comp, options) => {
21566
21566
  debug("caret", comp, options);
21567
- const r = options.loose ? re[t3.CARETLOOSE] : re[t3.CARET];
21567
+ const r = options.loose ? re[t2.CARETLOOSE] : re[t2.CARET];
21568
21568
  const z2 = options.includePrerelease ? "-0" : "";
21569
21569
  return comp.replace(r, (_, M, m, p, pr) => {
21570
21570
  debug("caret", comp, _, M, m, p, pr);
@@ -21612,7 +21612,7 @@ var require_range = __commonJS({
21612
21612
  };
21613
21613
  var replaceXRange = (comp, options) => {
21614
21614
  comp = comp.trim();
21615
- const r = options.loose ? re[t3.XRANGELOOSE] : re[t3.XRANGE];
21615
+ const r = options.loose ? re[t2.XRANGELOOSE] : re[t2.XRANGE];
21616
21616
  return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
21617
21617
  debug("xRange", comp, ret, gtlt, M, m, p, pr);
21618
21618
  const xM = isX(M);
@@ -21667,11 +21667,11 @@ var require_range = __commonJS({
21667
21667
  };
21668
21668
  var replaceStars = (comp, options) => {
21669
21669
  debug("replaceStars", comp, options);
21670
- return comp.trim().replace(re[t3.STAR], "");
21670
+ return comp.trim().replace(re[t2.STAR], "");
21671
21671
  };
21672
21672
  var replaceGTE0 = (comp, options) => {
21673
21673
  debug("replaceGTE0", comp, options);
21674
- return comp.trim().replace(re[options.includePrerelease ? t3.GTE0PRE : t3.GTE0], "");
21674
+ return comp.trim().replace(re[options.includePrerelease ? t2.GTE0PRE : t2.GTE0], "");
21675
21675
  };
21676
21676
  var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr) => {
21677
21677
  if (isX(fM)) {
@@ -21757,7 +21757,7 @@ var require_comparator = __commonJS({
21757
21757
  debug("comp", this);
21758
21758
  }
21759
21759
  parse(comp) {
21760
- const r = this.options.loose ? re[t3.COMPARATORLOOSE] : re[t3.COMPARATOR];
21760
+ const r = this.options.loose ? re[t2.COMPARATORLOOSE] : re[t2.COMPARATOR];
21761
21761
  const m = comp.match(r);
21762
21762
  if (!m) {
21763
21763
  throw new TypeError(`Invalid comparator: ${comp}`);
@@ -21831,7 +21831,7 @@ var require_comparator = __commonJS({
21831
21831
  };
21832
21832
  module2.exports = Comparator;
21833
21833
  var parseOptions = require_parse_options();
21834
- var { safeRe: re, t: t3 } = require_re();
21834
+ var { safeRe: re, t: t2 } = require_re();
21835
21835
  var cmp = require_cmp();
21836
21836
  var debug = require_debug();
21837
21837
  var SemVer = require_semver();
@@ -24334,15 +24334,15 @@ var require_esprima = __commonJS({
24334
24334
  return this.scanner.source.slice(token.start, token.end);
24335
24335
  };
24336
24336
  Parser2.prototype.convertToken = function(token) {
24337
- var t3 = {
24337
+ var t2 = {
24338
24338
  type: token_1.TokenName[token.type],
24339
24339
  value: this.getTokenRaw(token)
24340
24340
  };
24341
24341
  if (this.config.range) {
24342
- t3.range = [token.start, token.end];
24342
+ t2.range = [token.start, token.end];
24343
24343
  }
24344
24344
  if (this.config.loc) {
24345
- t3.loc = {
24345
+ t2.loc = {
24346
24346
  start: {
24347
24347
  line: this.startMarker.line,
24348
24348
  column: this.startMarker.column
@@ -24356,9 +24356,9 @@ var require_esprima = __commonJS({
24356
24356
  if (token.type === 9) {
24357
24357
  var pattern = token.pattern;
24358
24358
  var flags = token.flags;
24359
- t3.regex = { pattern, flags };
24359
+ t2.regex = { pattern, flags };
24360
24360
  }
24361
- return t3;
24361
+ return t2;
24362
24362
  };
24363
24363
  Parser2.prototype.nextToken = function() {
24364
24364
  var token = this.lookahead;
@@ -28461,7 +28461,7 @@ var require_esprima = __commonJS({
28461
28461
  this.values = [];
28462
28462
  this.curly = this.paren = -1;
28463
28463
  }
28464
- Reader2.prototype.beforeFunctionExpression = function(t3) {
28464
+ Reader2.prototype.beforeFunctionExpression = function(t2) {
28465
28465
  return [
28466
28466
  "(",
28467
28467
  "{",
@@ -28519,7 +28519,7 @@ var require_esprima = __commonJS({
28519
28519
  ">",
28520
28520
  "!=",
28521
28521
  "!=="
28522
- ].indexOf(t3) >= 0;
28522
+ ].indexOf(t2) >= 0;
28523
28523
  };
28524
28524
  Reader2.prototype.isRegexStart = function() {
28525
28525
  var previous = this.values[this.values.length - 1];
@@ -28746,18 +28746,18 @@ var require_src2 = __commonJS({
28746
28746
  }
28747
28747
  const al = log10(a);
28748
28748
  const bl = log10(b);
28749
- let t3 = 0;
28749
+ let t2 = 0;
28750
28750
  if (al < bl) {
28751
28751
  a *= POWERS_OF_TEN[bl - al - 1];
28752
28752
  b /= 10;
28753
- t3 = -1;
28753
+ t2 = -1;
28754
28754
  } else if (al > bl) {
28755
28755
  b *= POWERS_OF_TEN[al - bl - 1];
28756
28756
  a /= 10;
28757
- t3 = 1;
28757
+ t2 = 1;
28758
28758
  }
28759
28759
  if (a === b) {
28760
- return t3;
28760
+ return t2;
28761
28761
  }
28762
28762
  return a < b ? -1 : 1;
28763
28763
  }
@@ -28797,9 +28797,9 @@ var require_src2 = __commonJS({
28797
28797
  function reverseRun(array2, lo, hi) {
28798
28798
  hi--;
28799
28799
  while (lo < hi) {
28800
- const t3 = array2[lo];
28800
+ const t2 = array2[lo];
28801
28801
  array2[lo++] = array2[hi];
28802
- array2[hi--] = t3;
28802
+ array2[hi--] = t2;
28803
28803
  }
28804
28804
  }
28805
28805
  function binaryInsertionSort(array2, lo, hi, start, compare) {
@@ -30006,7 +30006,7 @@ var require_parse2 = __commonJS({
30006
30006
  }
30007
30007
  return current.type === "Punctuator" ? current.value : current.type;
30008
30008
  };
30009
- var is = (t3) => type() === t3;
30009
+ var is = (t2) => type() === t2;
30010
30010
  var expect = (a) => {
30011
30011
  if (!is(a)) {
30012
30012
  unexpected();
@@ -31073,8 +31073,8 @@ var require_package = __commonJS({
31073
31073
  var require_main = __commonJS({
31074
31074
  "node_modules/dotenv/lib/main.js"(exports2, module2) {
31075
31075
  "use strict";
31076
- var fs22 = require("fs");
31077
- var path22 = require("path");
31076
+ var fs24 = require("fs");
31077
+ var path24 = require("path");
31078
31078
  var os8 = require("os");
31079
31079
  var crypto2 = require("crypto");
31080
31080
  var packageJson = require_package();
@@ -31182,7 +31182,7 @@ var require_main = __commonJS({
31182
31182
  if (options && options.path && options.path.length > 0) {
31183
31183
  if (Array.isArray(options.path)) {
31184
31184
  for (const filepath of options.path) {
31185
- if (fs22.existsSync(filepath)) {
31185
+ if (fs24.existsSync(filepath)) {
31186
31186
  possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
31187
31187
  }
31188
31188
  }
@@ -31190,15 +31190,15 @@ var require_main = __commonJS({
31190
31190
  possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
31191
31191
  }
31192
31192
  } else {
31193
- possibleVaultPath = path22.resolve(process.cwd(), ".env.vault");
31193
+ possibleVaultPath = path24.resolve(process.cwd(), ".env.vault");
31194
31194
  }
31195
- if (fs22.existsSync(possibleVaultPath)) {
31195
+ if (fs24.existsSync(possibleVaultPath)) {
31196
31196
  return possibleVaultPath;
31197
31197
  }
31198
31198
  return null;
31199
31199
  }
31200
31200
  function _resolveHome(envPath) {
31201
- return envPath[0] === "~" ? path22.join(os8.homedir(), envPath.slice(1)) : envPath;
31201
+ return envPath[0] === "~" ? path24.join(os8.homedir(), envPath.slice(1)) : envPath;
31202
31202
  }
31203
31203
  function _configVault(options) {
31204
31204
  const debug = Boolean(options && options.debug);
@@ -31215,7 +31215,7 @@ var require_main = __commonJS({
31215
31215
  return { parsed };
31216
31216
  }
31217
31217
  function configDotenv(options) {
31218
- const dotenvPath = path22.resolve(process.cwd(), ".env");
31218
+ const dotenvPath = path24.resolve(process.cwd(), ".env");
31219
31219
  let encoding = "utf8";
31220
31220
  const debug = Boolean(options && options.debug);
31221
31221
  const quiet = options && "quiet" in options ? options.quiet : true;
@@ -31239,13 +31239,13 @@ var require_main = __commonJS({
31239
31239
  }
31240
31240
  let lastError;
31241
31241
  const parsedAll = {};
31242
- for (const path23 of optionPaths) {
31242
+ for (const path25 of optionPaths) {
31243
31243
  try {
31244
- const parsed = DotenvModule.parse(fs22.readFileSync(path23, { encoding }));
31244
+ const parsed = DotenvModule.parse(fs24.readFileSync(path25, { encoding }));
31245
31245
  DotenvModule.populate(parsedAll, parsed, options);
31246
31246
  } catch (e) {
31247
31247
  if (debug) {
31248
- _debug(`Failed to load ${path23} ${e.message}`);
31248
+ _debug(`Failed to load ${path25} ${e.message}`);
31249
31249
  }
31250
31250
  lastError = e;
31251
31251
  }
@@ -31260,7 +31260,7 @@ var require_main = __commonJS({
31260
31260
  const shortPaths = [];
31261
31261
  for (const filePath of optionPaths) {
31262
31262
  try {
31263
- const relative = path22.relative(process.cwd(), filePath);
31263
+ const relative = path24.relative(process.cwd(), filePath);
31264
31264
  shortPaths.push(relative);
31265
31265
  } catch (e) {
31266
31266
  if (debug) {
@@ -34911,12 +34911,12 @@ var TestRendererSerializer = class {
34911
34911
  data
34912
34912
  };
34913
34913
  if (typeof this.options?.task !== "boolean") {
34914
- const t3 = Object.fromEntries(this.options.task.map((entity) => {
34914
+ const t2 = Object.fromEntries(this.options.task.map((entity) => {
34915
34915
  const property = task[entity];
34916
34916
  if (typeof property === "function") return [entity, property.call(task)];
34917
34917
  return [entity, property];
34918
34918
  }));
34919
- if (Object.keys(task).length > 0) output.task = t3;
34919
+ if (Object.keys(task).length > 0) output.task = t2;
34920
34920
  }
34921
34921
  return output;
34922
34922
  }
@@ -35773,12 +35773,12 @@ var disallowedKeys = /* @__PURE__ */ new Set([
35773
35773
  "constructor"
35774
35774
  ]);
35775
35775
  var digits = new Set("0123456789");
35776
- function getPathSegments(path22) {
35776
+ function getPathSegments(path24) {
35777
35777
  const parts = [];
35778
35778
  let currentSegment = "";
35779
35779
  let currentPart = "start";
35780
35780
  let isIgnoring = false;
35781
- for (const character of path22) {
35781
+ for (const character of path24) {
35782
35782
  switch (character) {
35783
35783
  case "\\": {
35784
35784
  if (currentPart === "index") {
@@ -35900,11 +35900,11 @@ function assertNotStringIndex(object2, key) {
35900
35900
  throw new Error("Cannot use string index");
35901
35901
  }
35902
35902
  }
35903
- function getProperty(object2, path22, value) {
35904
- if (!isObject(object2) || typeof path22 !== "string") {
35903
+ function getProperty(object2, path24, value) {
35904
+ if (!isObject(object2) || typeof path24 !== "string") {
35905
35905
  return value === void 0 ? object2 : value;
35906
35906
  }
35907
- const pathArray = getPathSegments(path22);
35907
+ const pathArray = getPathSegments(path24);
35908
35908
  if (pathArray.length === 0) {
35909
35909
  return value;
35910
35910
  }
@@ -35924,12 +35924,12 @@ function getProperty(object2, path22, value) {
35924
35924
  }
35925
35925
  return object2 === void 0 ? value : object2;
35926
35926
  }
35927
- function setProperty(object2, path22, value) {
35928
- if (!isObject(object2) || typeof path22 !== "string") {
35927
+ function setProperty(object2, path24, value) {
35928
+ if (!isObject(object2) || typeof path24 !== "string") {
35929
35929
  return object2;
35930
35930
  }
35931
35931
  const root = object2;
35932
- const pathArray = getPathSegments(path22);
35932
+ const pathArray = getPathSegments(path24);
35933
35933
  for (let index = 0; index < pathArray.length; index++) {
35934
35934
  const key = pathArray[index];
35935
35935
  assertNotStringIndex(object2, key);
@@ -35942,11 +35942,11 @@ function setProperty(object2, path22, value) {
35942
35942
  }
35943
35943
  return root;
35944
35944
  }
35945
- function deleteProperty(object2, path22) {
35946
- if (!isObject(object2) || typeof path22 !== "string") {
35945
+ function deleteProperty(object2, path24) {
35946
+ if (!isObject(object2) || typeof path24 !== "string") {
35947
35947
  return false;
35948
35948
  }
35949
- const pathArray = getPathSegments(path22);
35949
+ const pathArray = getPathSegments(path24);
35950
35950
  for (let index = 0; index < pathArray.length; index++) {
35951
35951
  const key = pathArray[index];
35952
35952
  assertNotStringIndex(object2, key);
@@ -35960,11 +35960,11 @@ function deleteProperty(object2, path22) {
35960
35960
  }
35961
35961
  }
35962
35962
  }
35963
- function hasProperty(object2, path22) {
35964
- if (!isObject(object2) || typeof path22 !== "string") {
35963
+ function hasProperty(object2, path24) {
35964
+ if (!isObject(object2) || typeof path24 !== "string") {
35965
35965
  return false;
35966
35966
  }
35967
- const pathArray = getPathSegments(path22);
35967
+ const pathArray = getPathSegments(path24);
35968
35968
  if (pathArray.length === 0) {
35969
35969
  return false;
35970
35970
  }
@@ -37133,8 +37133,8 @@ function detectAdapter(systemRoot) {
37133
37133
  // src/core/diff.ts
37134
37134
  var IGNORED_ITEMS = /* @__PURE__ */ new Set(["__pycache__", ".DS_Store", "Thumbs.db", ".gitkeep", "node_modules"]);
37135
37135
  var PruneModeReadError = class extends Error {
37136
- constructor(path22) {
37137
- super(`Cannot read ${path22} in prune mode \u2014 aborting to prevent accidental deletion`);
37136
+ constructor(path24) {
37137
+ super(`Cannot read ${path24} in prune mode \u2014 aborting to prevent accidental deletion`);
37138
37138
  this.name = "PruneModeReadError";
37139
37139
  }
37140
37140
  };
@@ -37365,7 +37365,7 @@ function mergeHookWrappers(existing, incoming) {
37365
37365
  if (!existingCommands.some((c) => incomingKeys.has(commandKey(c)))) return false;
37366
37366
  if (typeof existingWrapper2.matcher === "string" && typeof incomingWrapper.matcher === "string" && incomingTokens.size > 0) {
37367
37367
  const existingTokens = existingWrapper2.matcher.split("|").map((s) => s.trim()).filter(Boolean);
37368
- const hasOverlap = existingTokens.some((t3) => incomingTokens.has(t3));
37368
+ const hasOverlap = existingTokens.some((t2) => incomingTokens.has(t2));
37369
37369
  if (!hasOverlap) return false;
37370
37370
  }
37371
37371
  return true;
@@ -40118,7 +40118,7 @@ async function handleMissingEnvVars(missing) {
40118
40118
  if (missing.length === 0) {
40119
40119
  return true;
40120
40120
  }
40121
- const prompts6 = (await Promise.resolve().then(() => __toESM(require_prompts3(), 1))).default;
40121
+ const prompts7 = (await Promise.resolve().then(() => __toESM(require_prompts3(), 1))).default;
40122
40122
  const answers = {};
40123
40123
  for (const key of missing) {
40124
40124
  const config3 = REQUIRED_ENV_VARS[key];
@@ -40130,7 +40130,7 @@ async function handleMissingEnvVars(missing) {
40130
40130
  console.log(kleur_default.yellow(`
40131
40131
  \u26A0\uFE0F ${key} is required by a selected MCP server`));
40132
40132
  }
40133
- const { value } = await prompts6({
40133
+ const { value } = await prompts7({
40134
40134
  type: "text",
40135
40135
  name: "value",
40136
40136
  message: `Enter ${key}:`,
@@ -40343,8 +40343,8 @@ async function syncMcpServersWithCli(agent, mcpConfig, dryRun = false, prune = f
40343
40343
  }
40344
40344
  let selectedNames = toAdd.map(([name]) => name);
40345
40345
  if (!dryRun) {
40346
- const prompts6 = await Promise.resolve().then(() => __toESM(require_prompts3(), 1));
40347
- const { selected } = await prompts6.default({
40346
+ const prompts7 = await Promise.resolve().then(() => __toESM(require_prompts3(), 1));
40347
+ const { selected } = await prompts7.default({
40348
40348
  type: "multiselect",
40349
40349
  name: "selected",
40350
40350
  message: `Select MCP servers to install via ${agent} CLI:`,
@@ -40954,6 +40954,27 @@ function isPiInstalled() {
40954
40954
  const r = (0, import_node_child_process2.spawnSync)("pi", ["--version"], { encoding: "utf8", stdio: "pipe" });
40955
40955
  return r.status === 0;
40956
40956
  }
40957
+ function isPnpmInstalled() {
40958
+ return (0, import_node_child_process2.spawnSync)("pnpm", ["--version"], { encoding: "utf8", stdio: "pipe" }).status === 0;
40959
+ }
40960
+ function ensurePnpm2(dryRun) {
40961
+ if (isPnpmInstalled()) {
40962
+ const v = (0, import_node_child_process2.spawnSync)("pnpm", ["--version"], { encoding: "utf8", stdio: "pipe" });
40963
+ console.log(t.success(` \u2713 pnpm ${v.stdout.trim()} already installed`));
40964
+ return;
40965
+ }
40966
+ console.log(kleur_default.yellow(" pnpm not found \u2014 installing via npm..."));
40967
+ if (dryRun) {
40968
+ console.log(kleur_default.dim(" [DRY RUN] npm install -g pnpm"));
40969
+ return;
40970
+ }
40971
+ const r = (0, import_node_child_process2.spawnSync)("npm", ["install", "-g", "pnpm"], { stdio: "inherit" });
40972
+ if (r.status !== 0) {
40973
+ console.log(kleur_default.yellow(" \u26A0 Failed to install pnpm. Run: npm install -g pnpm"));
40974
+ } else {
40975
+ console.log(t.success(" \u2713 pnpm installed"));
40976
+ }
40977
+ }
40957
40978
  async function runPiInstall(dryRun = false) {
40958
40979
  const repoRoot = await findRepoRoot();
40959
40980
  const piConfigDir = import_path11.default.join(repoRoot, "config", "pi");
@@ -40975,6 +40996,7 @@ async function runPiInstall(dryRun = false) {
40975
40996
  const v = (0, import_node_child_process2.spawnSync)("pi", ["--version"], { encoding: "utf8" });
40976
40997
  console.log(t.success(` \u2713 pi ${v.stdout.trim()} already installed`));
40977
40998
  }
40999
+ ensurePnpm2(dryRun);
40978
41000
  let packages = [];
40979
41001
  if (await import_fs_extra11.default.pathExists(schemaPath)) {
40980
41002
  const schema = await import_fs_extra11.default.readJson(schemaPath);
@@ -41014,7 +41036,16 @@ async function runPiInstall(dryRun = false) {
41014
41036
  }
41015
41037
  }
41016
41038
  }
41017
- console.log("");
41039
+ const configFiles = ["models.json", "auth.json", "settings.json"];
41040
+ const missingConfig = configFiles.filter((f) => !require("fs").existsSync(import_path11.default.join(PI_AGENT_DIR, f)));
41041
+ if (missingConfig.length > 0) {
41042
+ console.log(kleur_default.yellow(`
41043
+ \u26A0 Pi is not fully configured (missing: ${missingConfig.join(", ")})`));
41044
+ console.log(kleur_default.yellow(" Run: xt pi setup to complete first-time configuration"));
41045
+ console.log(kleur_default.dim(" (API keys, model defaults, OAuth providers)\n"));
41046
+ } else {
41047
+ console.log("");
41048
+ }
41018
41049
  }
41019
41050
 
41020
41051
  // src/commands/install.ts
@@ -41340,8 +41371,8 @@ function createInstallCommand() {
41340
41371
  createMissingDirs: !dryRun
41341
41372
  });
41342
41373
  const { targets, syncMode } = ctx;
41343
- const claudeTargets = targets.filter((t3) => detectAgent(t3) === "claude");
41344
- const otherTargets = targets.filter((t3) => detectAgent(t3) !== "claude");
41374
+ const claudeTargets = targets.filter((t2) => detectAgent(t2) === "claude");
41375
+ const otherTargets = targets.filter((t2) => detectAgent(t2) !== "claude");
41345
41376
  if (!backport) {
41346
41377
  console.log(t.bold("\n \u2699 beads + dolt (workflow enforcement backend)"));
41347
41378
  console.log(t.muted(" beads is a git-backed issue tracker; dolt is its SQL+git storage backend."));
@@ -41569,6 +41600,13 @@ function resolveStatuslineScript() {
41569
41600
  const fallback = import_node_path5.default.join((0, import_node_os5.homedir)(), ".claude", "hooks", "statusline.mjs");
41570
41601
  return (0, import_node_fs4.existsSync)(fallback) ? fallback : null;
41571
41602
  }
41603
+ function writeSessionMeta(worktreePath, runtime) {
41604
+ try {
41605
+ const meta3 = { runtime, launchedAt: (/* @__PURE__ */ new Date()).toISOString() };
41606
+ (0, import_node_fs4.writeFileSync)(import_node_path5.default.join(worktreePath, ".session-meta.json"), JSON.stringify(meta3, null, 2));
41607
+ } catch {
41608
+ }
41609
+ }
41572
41610
  async function launchWorktreeSession(opts) {
41573
41611
  const { runtime, name } = opts;
41574
41612
  const cwd = process.cwd();
@@ -41608,6 +41646,7 @@ async function launchWorktreeSession(opts) {
41608
41646
  process.exit(1);
41609
41647
  }
41610
41648
  }
41649
+ writeSessionMeta(worktreePath, runtime);
41611
41650
  console.log(kleur_default.green(`
41612
41651
  \u2713 Worktree ready \u2014 launching ${runtime}...
41613
41652
  `));
@@ -41804,6 +41843,8 @@ function createInstallPiCommand() {
41804
41843
  console.log(t.success(` pi ${v.stdout.trim()} already installed
41805
41844
  `));
41806
41845
  }
41846
+ console.log(t.bold(" pnpm\n"));
41847
+ ensurePnpm();
41807
41848
  const schema = await import_fs_extra13.default.readJson(import_path13.default.join(piConfigDir, "install-schema.json"));
41808
41849
  const existing = readExistingPiValues(PI_AGENT_DIR2);
41809
41850
  const values = { ...existing };
@@ -43005,10 +43046,10 @@ function mergeDefs(...defs) {
43005
43046
  function cloneDef(schema) {
43006
43047
  return mergeDefs(schema._zod.def);
43007
43048
  }
43008
- function getElementAtPath(obj, path22) {
43009
- if (!path22)
43049
+ function getElementAtPath(obj, path24) {
43050
+ if (!path24)
43010
43051
  return obj;
43011
- return path22.reduce((acc, key) => acc?.[key], obj);
43052
+ return path24.reduce((acc, key) => acc?.[key], obj);
43012
43053
  }
43013
43054
  function promiseAllObject(promisesObj) {
43014
43055
  const keys = Object.keys(promisesObj);
@@ -43085,8 +43126,8 @@ function numKeys(data) {
43085
43126
  return keyCount;
43086
43127
  }
43087
43128
  var getParsedType = (data) => {
43088
- const t3 = typeof data;
43089
- switch (t3) {
43129
+ const t2 = typeof data;
43130
+ switch (t2) {
43090
43131
  case "undefined":
43091
43132
  return "undefined";
43092
43133
  case "string":
@@ -43125,7 +43166,7 @@ var getParsedType = (data) => {
43125
43166
  }
43126
43167
  return "object";
43127
43168
  default:
43128
- throw new Error(`Unknown data type: ${t3}`);
43169
+ throw new Error(`Unknown data type: ${t2}`);
43129
43170
  }
43130
43171
  };
43131
43172
  var propertyKeyTypes = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
@@ -43391,11 +43432,11 @@ function aborted(x, startIndex = 0) {
43391
43432
  }
43392
43433
  return false;
43393
43434
  }
43394
- function prefixIssues(path22, issues) {
43435
+ function prefixIssues(path24, issues) {
43395
43436
  return issues.map((iss) => {
43396
43437
  var _a2;
43397
43438
  (_a2 = iss).path ?? (_a2.path = []);
43398
- iss.path.unshift(path22);
43439
+ iss.path.unshift(path24);
43399
43440
  return iss;
43400
43441
  });
43401
43442
  }
@@ -43432,8 +43473,8 @@ function getLengthableOrigin(input) {
43432
43473
  return "unknown";
43433
43474
  }
43434
43475
  function parsedType(data) {
43435
- const t3 = typeof data;
43436
- switch (t3) {
43476
+ const t2 = typeof data;
43477
+ switch (t2) {
43437
43478
  case "number": {
43438
43479
  return Number.isNaN(data) ? "nan" : "number";
43439
43480
  }
@@ -43450,7 +43491,7 @@ function parsedType(data) {
43450
43491
  }
43451
43492
  }
43452
43493
  }
43453
- return t3;
43494
+ return t2;
43454
43495
  }
43455
43496
  function issue(...args) {
43456
43497
  const [iss, input, inst] = args;
@@ -43578,7 +43619,7 @@ function formatError(error49, mapper = (issue2) => issue2.message) {
43578
43619
  }
43579
43620
  function treeifyError(error49, mapper = (issue2) => issue2.message) {
43580
43621
  const result = { errors: [] };
43581
- const processError = (error50, path22 = []) => {
43622
+ const processError = (error50, path24 = []) => {
43582
43623
  var _a2, _b;
43583
43624
  for (const issue2 of error50.issues) {
43584
43625
  if (issue2.code === "invalid_union" && issue2.errors.length) {
@@ -43588,7 +43629,7 @@ function treeifyError(error49, mapper = (issue2) => issue2.message) {
43588
43629
  } else if (issue2.code === "invalid_element") {
43589
43630
  processError({ issues: issue2.issues }, issue2.path);
43590
43631
  } else {
43591
- const fullpath = [...path22, ...issue2.path];
43632
+ const fullpath = [...path24, ...issue2.path];
43592
43633
  if (fullpath.length === 0) {
43593
43634
  result.errors.push(mapper(issue2));
43594
43635
  continue;
@@ -43620,8 +43661,8 @@ function treeifyError(error49, mapper = (issue2) => issue2.message) {
43620
43661
  }
43621
43662
  function toDotPath(_path) {
43622
43663
  const segs = [];
43623
- const path22 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
43624
- for (const seg of path22) {
43664
+ const path24 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
43665
+ for (const seg of path24) {
43625
43666
  if (typeof seg === "number")
43626
43667
  segs.push(`[${seg}]`);
43627
43668
  else if (typeof seg === "symbol")
@@ -45160,12 +45201,12 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
45160
45201
  const unrecognized = [];
45161
45202
  const keySet = def.keySet;
45162
45203
  const _catchall = def.catchall._zod;
45163
- const t3 = _catchall.def.type;
45204
+ const t2 = _catchall.def.type;
45164
45205
  const isOptionalOut = _catchall.optout === "optional";
45165
45206
  for (const key in input) {
45166
45207
  if (keySet.has(key))
45167
45208
  continue;
45168
- if (t3 === "never") {
45209
+ if (t2 === "never") {
45169
45210
  unrecognized.push(key);
45170
45211
  continue;
45171
45212
  }
@@ -48272,16 +48313,16 @@ var error17 = () => {
48272
48313
  number: { unit: "", shortLabel: "\u05E7\u05D8\u05DF", longLabel: "\u05D2\u05D3\u05D5\u05DC" }
48273
48314
  // no unit
48274
48315
  };
48275
- const typeEntry = (t3) => t3 ? TypeNames[t3] : void 0;
48276
- const typeLabel = (t3) => {
48277
- const e = typeEntry(t3);
48316
+ const typeEntry = (t2) => t2 ? TypeNames[t2] : void 0;
48317
+ const typeLabel = (t2) => {
48318
+ const e = typeEntry(t2);
48278
48319
  if (e)
48279
48320
  return e.label;
48280
- return t3 ?? TypeNames.unknown.label;
48321
+ return t2 ?? TypeNames.unknown.label;
48281
48322
  };
48282
- const withDefinite = (t3) => `\u05D4${typeLabel(t3)}`;
48283
- const verbFor = (t3) => {
48284
- const e = typeEntry(t3);
48323
+ const withDefinite = (t2) => `\u05D4${typeLabel(t2)}`;
48324
+ const verbFor = (t2) => {
48325
+ const e = typeEntry(t2);
48285
48326
  const gender = e?.gender ?? "m";
48286
48327
  return gender === "f" ? "\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA" : "\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA";
48287
48328
  };
@@ -55598,13 +55639,13 @@ function resolveRef(ref, ctx) {
55598
55639
  if (!ref.startsWith("#")) {
55599
55640
  throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
55600
55641
  }
55601
- const path22 = ref.slice(1).split("/").filter(Boolean);
55602
- if (path22.length === 0) {
55642
+ const path24 = ref.slice(1).split("/").filter(Boolean);
55643
+ if (path24.length === 0) {
55603
55644
  return ctx.rootSchema;
55604
55645
  }
55605
55646
  const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
55606
- if (path22[0] === defsKey) {
55607
- const key = path22[1];
55647
+ if (path24[0] === defsKey) {
55648
+ const key = path24[1];
55608
55649
  if (!key || !ctx.defs[key]) {
55609
55650
  throw new Error(`Reference not found: ${ref}`);
55610
55651
  }
@@ -55676,8 +55717,8 @@ function convertBaseSchema(schema, ctx) {
55676
55717
  }
55677
55718
  const type = schema.type;
55678
55719
  if (Array.isArray(type)) {
55679
- const typeSchemas = type.map((t3) => {
55680
- const typeSchema = { ...schema, type: t3 };
55720
+ const typeSchemas = type.map((t2) => {
55721
+ const typeSchema = { ...schema, type: t2 };
55681
55722
  return convertBaseSchema(typeSchema, ctx);
55682
55723
  });
55683
55724
  if (typeSchemas.length === 0) {
@@ -56197,9 +56238,11 @@ function createHelpCommand() {
56197
56238
  " 1) Start a runtime session in a worktree:",
56198
56239
  " xt claude [name] or xt pi [name]",
56199
56240
  " 2) Do your work in that worktree/branch.",
56200
- " 3) Finish with:",
56241
+ " 3) If the session closes unexpectedly, re-attach:",
56242
+ " xt attach [slug]",
56243
+ " 4) Finish with:",
56201
56244
  " xt end",
56202
- " 4) Manage old worktrees when needed:",
56245
+ " 5) Manage old worktrees when needed:",
56203
56246
  " xt worktree list | xt worktree clean"
56204
56247
  ]));
56205
56248
  blocks.push(section("PRIMARY COMMANDS", [
@@ -56217,8 +56260,12 @@ function createHelpCommand() {
56217
56260
  " xtrm init",
56218
56261
  " Initialize project-level workflow setup.",
56219
56262
  "",
56220
- " xtrm docs show [filter] [--raw] [--json]",
56221
- " Show frontmatter for README/CHANGELOG/docs/*.md.",
56263
+ " xtrm docs --help",
56264
+ " Documentation inspection and drift-check submenu.",
56265
+ " Subcommands: show, list, cross-check",
56266
+ "",
56267
+ " xtrm docs cross-check [--days <n>] [--json]",
56268
+ " Validate docs against recent PR activity and closed bd issues.",
56222
56269
  "",
56223
56270
  " xtrm debug [options]",
56224
56271
  " Stream xtrm event log (tool calls, gates, session/bd lifecycle).",
@@ -56246,8 +56293,14 @@ function createHelpCommand() {
56246
56293
  " xt pi status | xt pi doctor | xt pi reload"
56247
56294
  ]));
56248
56295
  blocks.push(section("WORKTREE COMMANDS", [
56296
+ " xt attach [slug]",
56297
+ " Re-attach to an existing worktree and resume the Claude or Pi session.",
56298
+ " Picks the most recent worktree if no slug is given; shows a picker when",
56299
+ " multiple exist. Resumes with --continue (claude) or -c (pi).",
56300
+ "",
56249
56301
  " xt worktree list",
56250
- " List active xt/* worktrees and merge status.",
56302
+ " List active xt/* worktrees with runtime, last activity, last commit, and",
56303
+ " a ready-to-run resume hint.",
56251
56304
  " xt worktree clean [--yes/-y]",
56252
56305
  " Remove worktrees already merged into main.",
56253
56306
  " xt worktree remove <name> [--yes/-y]",
@@ -56261,7 +56314,8 @@ function createHelpCommand() {
56261
56314
  blocks.push(section("NOTES", [
56262
56315
  " - Banner is shown only for xtrm install.",
56263
56316
  " - For command-level details, run: xtrm <command> --help",
56264
- " - For subcommand details, run: xtrm <command> <subcommand> --help"
56317
+ " - For subcommand details, run: xtrm <command> <subcommand> --help",
56318
+ " - For docs workflow details, run: xtrm docs --help"
56265
56319
  ]));
56266
56320
  process.stdout.write(blocks.join("\n"));
56267
56321
  });
@@ -56572,13 +56626,44 @@ function bd(args, cwd) {
56572
56626
  return { ok: r.status === 0, out: (r.stdout ?? "").trim() };
56573
56627
  }
56574
56628
  function extractIssueIds(commitLog) {
56575
- const matches = commitLog.matchAll(/\(([a-z0-9]+-[a-z0-9]+-[a-z0-9]+)\)/g);
56576
- return [...new Set([...matches].map((m) => m[1]))];
56577
- }
56578
- function buildPrTitle(issues) {
56579
- if (issues.length === 0) return "session changes";
56580
- if (issues.length === 1) return issues[0].reason || issues[0].title;
56581
- return `${issues[0].reason || issues[0].title} (+${issues.length - 1} more)`;
56629
+ const matches = commitLog.matchAll(/\(([a-z0-9]+(?:-[a-z0-9]+)*(?:\.[0-9]+)?)\)/gi);
56630
+ return [...new Set([...matches].map((m) => m[1].toLowerCase()))];
56631
+ }
56632
+ function normalizePrTitle(input) {
56633
+ const trimmed = input.trim().replace(/[.\s]+$/g, "");
56634
+ if (!trimmed) return "Update worktree session";
56635
+ return trimmed.charAt(0).toUpperCase() + trimmed.slice(1);
56636
+ }
56637
+ function isGenericPrTitle(title) {
56638
+ return /^(session changes|update|updates|misc|wip|work in progress)$/i.test(title.trim());
56639
+ }
56640
+ function inferTitleFromChangedFiles(changedFiles) {
56641
+ const hasDocsCrossCheck = changedFiles.some((f) => f.includes("docs-cross-check"));
56642
+ const hasDocsCommand = changedFiles.some((f) => f === "cli/src/commands/docs.ts" || f === "cli/src/commands/help.ts");
56643
+ const hasSyncDocsSkill = changedFiles.some((f) => f === "skills/sync-docs/SKILL.md");
56644
+ const hasDocsPages = changedFiles.some((f) => f.startsWith("docs/") || f === "README.md" || f === "XTRM-GUIDE.md");
56645
+ const hasTests = changedFiles.some((f) => f.startsWith("cli/test/"));
56646
+ if (hasDocsCrossCheck && hasSyncDocsSkill) return "Add docs cross-check and integrate sync-docs workflow";
56647
+ if (hasDocsCrossCheck && hasTests) return "Add docs cross-check command and tests";
56648
+ if (hasDocsCommand && hasDocsPages && hasSyncDocsSkill) return "Integrate docs workflow across CLI, docs, and sync-docs";
56649
+ if (hasDocsCommand && hasDocsPages) return "Update docs workflow and CLI help";
56650
+ if (hasDocsPages) return "Update documentation";
56651
+ return "Update worktree session";
56652
+ }
56653
+ function buildPrTitle(issues, changedFiles) {
56654
+ if (issues.length === 0) return inferTitleFromChangedFiles(changedFiles);
56655
+ if (issues.length === 1) {
56656
+ const single = normalizePrTitle(issues[0].title || issues[0].reason || issues[0].id);
56657
+ return isGenericPrTitle(single) ? inferTitleFromChangedFiles(changedFiles) : single;
56658
+ }
56659
+ const titles = issues.map((i) => `${i.title} ${i.reason}`.toLowerCase());
56660
+ const hasCrossCheck = titles.some((t2) => t2.includes("cross-check"));
56661
+ const hasSyncDocs = titles.some((t2) => t2.includes("sync-docs"));
56662
+ const hasDocs = titles.some((t2) => t2.includes("docs"));
56663
+ if (hasCrossCheck && hasSyncDocs) return "Add docs cross-check and integrate sync-docs workflow";
56664
+ if (hasDocs) return "Update docs workflow and command surfaces";
56665
+ const multi = normalizePrTitle(issues[0].title || issues[0].reason || issues[0].id);
56666
+ return isGenericPrTitle(multi) ? inferTitleFromChangedFiles(changedFiles) : `${multi} (+${issues.length - 1} more)`;
56582
56667
  }
56583
56668
  function buildPrBody(issues, commitLog, diffStat, branch) {
56584
56669
  const lines = [];
@@ -56650,30 +56735,37 @@ function createEndCommand() {
56650
56735
  const issueIds = extractIssueIds(logResult.out);
56651
56736
  const issues = [];
56652
56737
  for (const id of issueIds) {
56653
- const showResult = bd(["show", id, "--json"], cwd);
56654
- if (showResult.ok) {
56738
+ const queryResult = bd(["query", `id=${id}`, "--all", "--json"], cwd);
56739
+ if (queryResult.ok) {
56655
56740
  try {
56656
- const data = JSON.parse(showResult.out);
56657
- issues.push({
56658
- id,
56659
- title: data.title ?? id,
56660
- description: data.description ?? "",
56661
- reason: data.close_reason ?? ""
56662
- });
56741
+ const data = JSON.parse(queryResult.out);
56742
+ const first = Array.isArray(data) ? data[0] : data;
56743
+ if (first) {
56744
+ issues.push({
56745
+ id,
56746
+ title: first.title ?? id,
56747
+ description: first.description ?? "",
56748
+ reason: first.close_reason ?? ""
56749
+ });
56750
+ continue;
56751
+ }
56663
56752
  } catch {
56664
- issues.push({ id, title: id, description: "", reason: "" });
56665
56753
  }
56666
56754
  }
56755
+ issues.push({ id, title: id, description: "", reason: "" });
56667
56756
  }
56668
56757
  if (issues.length > 0) {
56669
56758
  console.log(t.success(` \u2713 Found ${issues.length} closed issue(s): ${issueIds.join(", ")}`));
56759
+ } else if (issueIds.length > 0) {
56760
+ console.log(kleur_default.yellow(` \u26A0 Found issue references in commits but could not load bead details: ${issueIds.join(", ")}`));
56670
56761
  } else {
56671
56762
  console.log(kleur_default.dim(" \u25CB No beads issues found in commit log"));
56672
56763
  }
56673
56764
  if (opts.dryRun) {
56674
56765
  const fullLog2 = git(["log", `origin/${defaultBranch}..HEAD`, "--oneline"], cwd).out;
56675
56766
  const diffStat2 = git(["diff", `origin/${defaultBranch}`, "--stat"], cwd).out;
56676
- const prTitle2 = buildPrTitle(issues);
56767
+ const changedFiles2 = git(["diff", `origin/${defaultBranch}`, "--name-only"], cwd).out.split("\n").filter(Boolean);
56768
+ const prTitle2 = buildPrTitle(issues, changedFiles2);
56677
56769
  const prBody2 = buildPrBody(issues, fullLog2, diffStat2, branch);
56678
56770
  console.log(t.bold("\n [DRY RUN] PR preview\n"));
56679
56771
  console.log(` ${kleur_default.bold("Title:")} ${prTitle2}`);
@@ -56716,7 +56808,8 @@ function createEndCommand() {
56716
56808
  console.log(t.success(` \u2713 Pushed ${branch}`));
56717
56809
  const fullLog = git(["log", `origin/${defaultBranch}..HEAD`, "--oneline"], cwd).out;
56718
56810
  const diffStat = git(["diff", `origin/${defaultBranch}`, "--stat"], cwd).out;
56719
- const prTitle = buildPrTitle(issues);
56811
+ const changedFiles = git(["diff", `origin/${defaultBranch}`, "--name-only"], cwd).out.split("\n").filter(Boolean);
56812
+ const prTitle = buildPrTitle(issues, changedFiles);
56720
56813
  const prBody = buildPrBody(issues, fullLog, diffStat, branch);
56721
56814
  console.log(kleur_default.dim(" Creating PR..."));
56722
56815
  const prArgs = ["pr", "create", "--title", prTitle, "--body", prBody];
@@ -56804,6 +56897,27 @@ function listXtWorktrees(repoRoot) {
56804
56897
  if (current.path && current.branch?.startsWith("refs/heads/xt/")) {
56805
56898
  worktrees.push(current);
56806
56899
  }
56900
+ for (const wt of worktrees) {
56901
+ try {
56902
+ const raw = (0, import_node_fs5.readFileSync)((0, import_node_path6.join)(wt.path, ".session-meta.json"), "utf8");
56903
+ const meta3 = JSON.parse(raw);
56904
+ wt.runtime = meta3.runtime;
56905
+ wt.launchedAt = meta3.launchedAt;
56906
+ } catch {
56907
+ }
56908
+ const logR = (0, import_node_child_process8.spawnSync)("git", ["log", "-1", "--format=%ci%s", "HEAD"], {
56909
+ cwd: wt.path,
56910
+ encoding: "utf8",
56911
+ stdio: "pipe"
56912
+ });
56913
+ if (logR.status === 0 && logR.stdout.trim()) {
56914
+ const sep = logR.stdout.trim().indexOf("");
56915
+ if (sep !== -1) {
56916
+ wt.lastLogTime = new Date(logR.stdout.slice(0, sep).trim());
56917
+ wt.lastLogMsg = logR.stdout.slice(sep + 1).trim();
56918
+ }
56919
+ }
56920
+ }
56807
56921
  return worktrees;
56808
56922
  }
56809
56923
  function isMergedIntoMain(branch, repoRoot) {
@@ -56833,13 +56947,19 @@ function createWorktreeCommand() {
56833
56947
  `));
56834
56948
  for (const wt of worktrees) {
56835
56949
  const branch = wt.branch.replace("refs/heads/", "");
56950
+ const slug = branch.replace("xt/", "");
56836
56951
  const merged = isMergedIntoMain(wt.branch, repoRoot);
56837
56952
  const status = merged ? kleur_default.green("merged") : kleur_default.yellow("open");
56838
56953
  const prunable = wt.prunable ? kleur_default.dim(" [prunable]") : "";
56839
- console.log(` ${status} ${kleur_default.bold(branch)}${prunable}`);
56840
- console.log(kleur_default.dim(` ${wt.path}`));
56954
+ const runtimeBadge = wt.runtime ? kleur_default.cyan(` [${wt.runtime}]`) : "";
56955
+ const timeStr = wt.lastLogTime ? kleur_default.dim(wt.lastLogTime.toLocaleString()) : wt.launchedAt ? kleur_default.dim(new Date(wt.launchedAt).toLocaleString()) : "";
56956
+ const logLine = wt.lastLogMsg ? kleur_default.dim(` "${wt.lastLogMsg}"`) : "";
56957
+ console.log(` ${status}${runtimeBadge} ${kleur_default.bold(branch)}${prunable}`);
56958
+ if (timeStr) console.log(` last activity: ${timeStr}${logLine}`);
56959
+ console.log(kleur_default.dim(` path: ${wt.path}`));
56960
+ console.log(kleur_default.dim(` resume: xt attach ${slug}`));
56961
+ console.log("");
56841
56962
  }
56842
- console.log("");
56843
56963
  });
56844
56964
  cmd.command("clean").description("Remove worktrees whose branch has been merged into main").option("-y, --yes", "Skip confirmation prompt", false).action(async (opts) => {
56845
56965
  const repoRoot = getRepoRoot(process.cwd());
@@ -56938,10 +57058,91 @@ function clearStatuslineClaim(repoRoot) {
56938
57058
  }
56939
57059
  }
56940
57060
 
57061
+ // src/commands/attach.ts
57062
+ var import_prompts6 = __toESM(require_prompts3(), 1);
57063
+ var import_node_child_process9 = require("child_process");
57064
+ function createAttachCommand() {
57065
+ return new Command("attach").description("Re-attach to an existing xt worktree and resume the Claude or Pi session").argument("[name]", 'Worktree slug or branch name to attach to (e.g. "abc1" or "xt/abc1")').action(async (name) => {
57066
+ const repoRoot = getRepoRoot(process.cwd());
57067
+ const worktrees = listXtWorktrees(repoRoot);
57068
+ if (worktrees.length === 0) {
57069
+ console.log(kleur_default.dim("\n No xt worktrees found \u2014 start one with: xt claude\n"));
57070
+ return;
57071
+ }
57072
+ let target = worktrees[0];
57073
+ if (name) {
57074
+ const norm = name.startsWith("xt/") ? `refs/heads/${name}` : `refs/heads/xt/${name}`;
57075
+ const found = worktrees.find(
57076
+ (wt) => wt.path.endsWith(name) || wt.branch === norm || wt.branch === `refs/heads/${name}`
57077
+ );
57078
+ if (!found) {
57079
+ console.error(kleur_default.red(`
57080
+ \u2717 No xt worktree found matching "${name}"
57081
+ `));
57082
+ console.log(kleur_default.dim(" Run: xt worktree list\n"));
57083
+ process.exit(1);
57084
+ }
57085
+ target = found;
57086
+ } else if (worktrees.length > 1) {
57087
+ const choices = worktrees.map((wt) => {
57088
+ const branch2 = wt.branch.replace("refs/heads/", "");
57089
+ const slug = branch2.replace("xt/", "");
57090
+ const runtime2 = wt.runtime ? ` [${wt.runtime}]` : "";
57091
+ const time3 = wt.lastLogTime ? wt.lastLogTime.toLocaleString() : wt.launchedAt ? new Date(wt.launchedAt).toLocaleString() : "unknown";
57092
+ const msg = wt.lastLogMsg ? ` "${wt.lastLogMsg.slice(0, 50)}"` : "";
57093
+ return {
57094
+ title: `${branch2}${runtime2} \u2014 ${time3}${msg}`,
57095
+ value: slug
57096
+ };
57097
+ });
57098
+ const { picked } = await (0, import_prompts6.default)({
57099
+ type: "select",
57100
+ name: "picked",
57101
+ message: "Select worktree to attach",
57102
+ choices
57103
+ });
57104
+ if (!picked) {
57105
+ console.log(kleur_default.dim(" Cancelled\n"));
57106
+ return;
57107
+ }
57108
+ target = worktrees.find((wt) => wt.branch.endsWith(`/${picked}`)) ?? target;
57109
+ }
57110
+ const branch = target.branch.replace("refs/heads/", "");
57111
+ const runtime = target.runtime ?? await pickRuntime();
57112
+ const resumeArgs = runtime === "claude" ? ["--continue", "--dangerously-skip-permissions"] : ["-c"];
57113
+ console.log(t.bold(`
57114
+ Attaching to ${branch}`));
57115
+ console.log(kleur_default.dim(` runtime: ${runtime} (resuming session)`));
57116
+ console.log(kleur_default.dim(` path: ${target.path}
57117
+ `));
57118
+ const result = (0, import_node_child_process9.spawnSync)(runtime, resumeArgs, {
57119
+ cwd: target.path,
57120
+ stdio: "inherit"
57121
+ });
57122
+ process.exit(result.status ?? 0);
57123
+ });
57124
+ }
57125
+ async function pickRuntime() {
57126
+ const { runtime } = await (0, import_prompts6.default)({
57127
+ type: "select",
57128
+ name: "runtime",
57129
+ message: "No session metadata found \u2014 which runtime?",
57130
+ choices: [
57131
+ { title: "claude", value: "claude" },
57132
+ { title: "pi", value: "pi" }
57133
+ ],
57134
+ initial: 0
57135
+ });
57136
+ return runtime ?? "claude";
57137
+ }
57138
+
56941
57139
  // src/commands/docs.ts
57140
+ var import_fs_extra21 = __toESM(require_lib2(), 1);
57141
+ var import_path22 = __toESM(require("path"), 1);
57142
+
57143
+ // src/utils/docs-scanner.ts
56942
57144
  var import_fs_extra19 = __toESM(require_lib2(), 1);
56943
57145
  var import_path20 = __toESM(require("path"), 1);
56944
- var REQUIRED_FIELDS = /* @__PURE__ */ new Set(["title", "type", "status", "updated_at", "version"]);
56945
57146
  function parseFrontmatter(content) {
56946
57147
  const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
56947
57148
  if (!match) return null;
@@ -56953,31 +57154,349 @@ function parseFrontmatter(content) {
56953
57154
  const value = line.slice(colon + 1).trim().replace(/^["']|["']$/g, "");
56954
57155
  if (key) fm[key] = value;
56955
57156
  }
57157
+ const afterFrontmatter = content.slice(match[0].length).replace(/^\r?\n/, "");
57158
+ const firstPara = afterFrontmatter.split(/\r?\n\r?\n/)[0].replace(/\r?\n/g, " ").trim();
57159
+ if (firstPara && !firstPara.startsWith("#")) {
57160
+ fm.summary = firstPara.slice(0, 120);
57161
+ }
56956
57162
  return fm;
56957
57163
  }
57164
+ var ALWAYS_SKIP = /* @__PURE__ */ new Set(["node_modules", ".git", "dist", ".xtrm"]);
57165
+ function parseGitignorePatterns(content) {
57166
+ return content.split("\n").map((l) => l.trim()).filter((l) => l && !l.startsWith("#"));
57167
+ }
57168
+ function matchesGitignore(relativePath, patterns) {
57169
+ const normalized = relativePath.replace(/\\/g, "/");
57170
+ const basename2 = normalized.split("/").pop() ?? "";
57171
+ for (const raw of patterns) {
57172
+ const p = raw.endsWith("/") ? raw.slice(0, -1) : raw;
57173
+ if (p.includes("*")) {
57174
+ const regex2 = new RegExp("^" + p.replace(/\./g, "\\.").replace(/\*/g, "[^/]*") + "$");
57175
+ if (regex2.test(normalized) || regex2.test(basename2)) return true;
57176
+ } else {
57177
+ if (normalized === p || normalized.startsWith(p + "/") || basename2 === p) return true;
57178
+ }
57179
+ }
57180
+ return false;
57181
+ }
57182
+ async function scanDocFiles(repoRoot, options = {}) {
57183
+ const { dir, pattern, filter, recursive = true } = options;
57184
+ let gitignorePatterns = [];
57185
+ try {
57186
+ const raw = await import_fs_extra19.default.readFile(import_path20.default.join(repoRoot, ".gitignore"), "utf8");
57187
+ gitignorePatterns = parseGitignorePatterns(raw);
57188
+ } catch {
57189
+ }
57190
+ const results = [];
57191
+ const startDir = dir ? import_path20.default.join(repoRoot, dir) : repoRoot;
57192
+ async function walk(dirPath) {
57193
+ let entries;
57194
+ try {
57195
+ entries = await import_fs_extra19.default.readdir(dirPath, { withFileTypes: true });
57196
+ } catch {
57197
+ return;
57198
+ }
57199
+ for (const entry of entries) {
57200
+ const fullPath = import_path20.default.join(dirPath, entry.name);
57201
+ const relPath = import_path20.default.relative(repoRoot, fullPath).replace(/\\/g, "/");
57202
+ if (entry.isDirectory()) {
57203
+ if (ALWAYS_SKIP.has(entry.name)) continue;
57204
+ if (matchesGitignore(relPath, gitignorePatterns)) continue;
57205
+ if (recursive) await walk(fullPath);
57206
+ continue;
57207
+ }
57208
+ if (!entry.isFile() || !entry.name.endsWith(".md")) continue;
57209
+ if (matchesGitignore(relPath, gitignorePatterns)) continue;
57210
+ if (dir && !relPath.startsWith(dir.replace(/\\/g, "/"))) continue;
57211
+ if (pattern && !entry.name.includes(pattern)) continue;
57212
+ let docEntry;
57213
+ try {
57214
+ const stat = await import_fs_extra19.default.stat(fullPath);
57215
+ const content = await import_fs_extra19.default.readFile(fullPath, "utf8");
57216
+ const frontmatter = parseFrontmatter(content);
57217
+ if (filter && (!frontmatter || frontmatter[filter.field] !== filter.value)) continue;
57218
+ docEntry = {
57219
+ filePath: fullPath,
57220
+ relativePath: relPath,
57221
+ frontmatter,
57222
+ sizeBytes: stat.size,
57223
+ lastModified: stat.mtime
57224
+ };
57225
+ } catch (err) {
57226
+ if (filter) continue;
57227
+ docEntry = {
57228
+ filePath: fullPath,
57229
+ relativePath: relPath,
57230
+ frontmatter: null,
57231
+ sizeBytes: 0,
57232
+ lastModified: /* @__PURE__ */ new Date(0),
57233
+ parseError: err.message
57234
+ };
57235
+ }
57236
+ results.push(docEntry);
57237
+ }
57238
+ }
57239
+ await walk(startDir);
57240
+ return results;
57241
+ }
57242
+
57243
+ // src/utils/docs-cache.ts
57244
+ var import_fs_extra20 = __toESM(require_lib2(), 1);
57245
+ var import_path21 = __toESM(require("path"), 1);
57246
+ var CACHE_PATH = import_path21.default.join(".xtrm", "cache", "docs-list.json");
57247
+ var DEFAULT_TTL_MS = 6e4;
57248
+ async function readCache(repoRoot) {
57249
+ try {
57250
+ const raw = await import_fs_extra20.default.readFile(import_path21.default.join(repoRoot, CACHE_PATH), "utf8");
57251
+ const parsed = JSON.parse(raw);
57252
+ parsed.entries = parsed.entries.map((e) => ({
57253
+ ...e,
57254
+ lastModified: new Date(e.lastModified)
57255
+ }));
57256
+ return parsed;
57257
+ } catch {
57258
+ return null;
57259
+ }
57260
+ }
57261
+ async function writeCache(repoRoot, entries) {
57262
+ const cachePath = import_path21.default.join(repoRoot, CACHE_PATH);
57263
+ await import_fs_extra20.default.ensureDir(import_path21.default.dirname(cachePath));
57264
+ const cache = {
57265
+ timestamp: Date.now(),
57266
+ repoRoot,
57267
+ entries
57268
+ };
57269
+ await import_fs_extra20.default.writeFile(cachePath, JSON.stringify(cache, null, 2), "utf8");
57270
+ }
57271
+ function isCacheValid(cache, entries, ttlMs = DEFAULT_TTL_MS) {
57272
+ if (Date.now() - cache.timestamp > ttlMs) return false;
57273
+ for (const entry of entries) {
57274
+ if (entry.lastModified.getTime() > cache.timestamp) return false;
57275
+ }
57276
+ return true;
57277
+ }
57278
+
57279
+ // src/commands/docs-cross-check-gh.ts
57280
+ var import_node_child_process10 = require("child_process");
57281
+ function isGhAvailable() {
57282
+ return (0, import_node_child_process10.spawnSync)("gh", ["--version"], { stdio: "pipe", encoding: "utf8" }).status === 0;
57283
+ }
57284
+ function fetchRecentPrs(repoRoot, days) {
57285
+ if (!isGhAvailable()) {
57286
+ console.log(kleur_default.yellow(" \u26A0 gh CLI not found \u2014 skipping PR data (install gh to enable cross-check)"));
57287
+ return [];
57288
+ }
57289
+ const r = (0, import_node_child_process10.spawnSync)("gh", [
57290
+ "pr",
57291
+ "list",
57292
+ "--state",
57293
+ "merged",
57294
+ "--limit",
57295
+ "100",
57296
+ "--json",
57297
+ "number,title,mergedAt,url,headRefName"
57298
+ ], { stdio: "pipe", encoding: "utf8", cwd: repoRoot });
57299
+ if (r.status === 4) {
57300
+ console.log(kleur_default.yellow(" \u26A0 gh auth error \u2014 run: gh auth login"));
57301
+ return [];
57302
+ }
57303
+ if (r.status !== 0) {
57304
+ console.log(kleur_default.yellow(` \u26A0 gh pr list failed (exit ${r.status}) \u2014 skipping PR data`));
57305
+ return [];
57306
+ }
57307
+ let prs;
57308
+ try {
57309
+ prs = JSON.parse(r.stdout);
57310
+ } catch {
57311
+ console.log(kleur_default.yellow(" \u26A0 Failed to parse gh pr list output \u2014 skipping PR data"));
57312
+ return [];
57313
+ }
57314
+ const cutoff = Date.now() - days * 864e5;
57315
+ return prs.filter((pr) => pr.mergedAt && new Date(pr.mergedAt).getTime() >= cutoff);
57316
+ }
57317
+
57318
+ // src/commands/docs-cross-check-bd.ts
57319
+ var import_node_child_process11 = require("child_process");
57320
+ var _bdAvailable = null;
57321
+ function isBdAvailable() {
57322
+ if (_bdAvailable !== null) return _bdAvailable;
57323
+ const r = (0, import_node_child_process11.spawnSync)("bd", ["--version"], { stdio: "pipe", encoding: "utf8" });
57324
+ _bdAvailable = r.status === 0;
57325
+ return _bdAvailable;
57326
+ }
57327
+ function logBdWarning(message) {
57328
+ console.error(kleur_default.yellow(`[bd] ${message}`));
57329
+ }
57330
+ function fetchClosedBdIssues(days) {
57331
+ if (!isBdAvailable()) {
57332
+ logBdWarning("fetchClosedBdIssues: bd CLI not available, skipping issue fetch");
57333
+ return [];
57334
+ }
57335
+ const r = (0, import_node_child_process11.spawnSync)("bd", [
57336
+ "query",
57337
+ `status=closed AND updated>${days}d`,
57338
+ "--json"
57339
+ ], {
57340
+ encoding: "utf8",
57341
+ stdio: "pipe"
57342
+ });
57343
+ if (r.status !== 0) {
57344
+ const hint = r.stderr?.trim() || `exit code ${r.status}`;
57345
+ logBdWarning(`fetchClosedBdIssues: bd query failed (${hint})`);
57346
+ return [];
57347
+ }
57348
+ try {
57349
+ const data = JSON.parse(r.stdout ?? "[]");
57350
+ return data.map((issue2) => ({
57351
+ id: issue2.id,
57352
+ title: issue2.title,
57353
+ status: issue2.status,
57354
+ type: issue2.issue_type,
57355
+ closedAt: issue2.closed_at
57356
+ }));
57357
+ } catch (e) {
57358
+ logBdWarning(`fetchClosedBdIssues: JSON parse failed (${e instanceof Error ? e.message : "unknown error"})`);
57359
+ return [];
57360
+ }
57361
+ }
57362
+
57363
+ // src/commands/docs-cross-check-core.ts
57364
+ function detectStaleDocs(docs, prs, _days) {
57365
+ const findings = [];
57366
+ for (const doc of docs) {
57367
+ if (doc.parseError) continue;
57368
+ const docDate = doc.lastModified;
57369
+ const mergedAfter = prs.filter((pr) => {
57370
+ if (!pr.mergedAt) return false;
57371
+ return new Date(pr.mergedAt) > docDate;
57372
+ });
57373
+ if (mergedAfter.length > 0) {
57374
+ findings.push({
57375
+ severity: "warning",
57376
+ kind: "stale",
57377
+ docPath: doc.relativePath,
57378
+ message: `Doc not updated since ${mergedAfter.length} PR${mergedAfter.length > 1 ? "s" : ""} merged`,
57379
+ detail: mergedAfter.slice(0, 3).map((pr) => `#${pr.number}: ${pr.title}`).join("; ")
57380
+ });
57381
+ }
57382
+ const updatedAtStr = doc.frontmatter?.updated_at;
57383
+ if (updatedAtStr) {
57384
+ const updatedAt = new Date(updatedAtStr);
57385
+ if (!isNaN(updatedAt.getTime())) {
57386
+ const diffDays = Math.abs(docDate.getTime() - updatedAt.getTime()) / 864e5;
57387
+ if (diffDays > 7) {
57388
+ findings.push({
57389
+ severity: "info",
57390
+ kind: "stale",
57391
+ docPath: doc.relativePath,
57392
+ message: `Frontmatter updated_at differs from file mtime by ${Math.round(diffDays)} days`
57393
+ });
57394
+ }
57395
+ }
57396
+ }
57397
+ }
57398
+ return findings;
57399
+ }
57400
+ var BD_ISSUE_ID_REGEX = /[a-z0-9]+-[a-z0-9]{4}/gi;
57401
+ function detectCoverageGaps(docs, bdIssues, docContents) {
57402
+ const findings = [];
57403
+ const relevantIssues = bdIssues.filter(
57404
+ (issue2) => issue2.status === "closed" && (issue2.type === "feature" || issue2.type === "task")
57405
+ );
57406
+ if (relevantIssues.length === 0) return findings;
57407
+ const mentionedIds = /* @__PURE__ */ new Set();
57408
+ for (const doc of docs) {
57409
+ const fmStr = JSON.stringify(doc.frontmatter ?? {});
57410
+ for (const match of fmStr.matchAll(BD_ISSUE_ID_REGEX)) {
57411
+ mentionedIds.add(match[0].toLowerCase());
57412
+ }
57413
+ const content = docContents.get(doc.relativePath) ?? "";
57414
+ for (const match of content.matchAll(BD_ISSUE_ID_REGEX)) {
57415
+ mentionedIds.add(match[0].toLowerCase());
57416
+ }
57417
+ }
57418
+ for (const issue2 of relevantIssues) {
57419
+ const issueIdLower = issue2.id.toLowerCase();
57420
+ if (!mentionedIds.has(issueIdLower)) {
57421
+ findings.push({
57422
+ severity: "warning",
57423
+ kind: "coverage-gap",
57424
+ docPath: "",
57425
+ message: `Feature issue ${issue2.id} has no doc coverage`,
57426
+ detail: issue2.title
57427
+ });
57428
+ }
57429
+ }
57430
+ return findings;
57431
+ }
57432
+ function validateIssueReferences(docs, bdIssues, docContents) {
57433
+ const findings = [];
57434
+ const issueStatus = /* @__PURE__ */ new Map();
57435
+ for (const issue2 of bdIssues) {
57436
+ issueStatus.set(issue2.id.toLowerCase(), issue2.status);
57437
+ }
57438
+ for (const doc of docs) {
57439
+ const content = docContents.get(doc.relativePath) ?? "";
57440
+ const seenIds = /* @__PURE__ */ new Set();
57441
+ for (const match of content.matchAll(BD_ISSUE_ID_REGEX)) {
57442
+ const id = match[0].toLowerCase();
57443
+ if (seenIds.has(id)) continue;
57444
+ seenIds.add(id);
57445
+ const status = issueStatus.get(id);
57446
+ if (status && status !== "closed") {
57447
+ findings.push({
57448
+ severity: "info",
57449
+ kind: "ref-invalid",
57450
+ docPath: doc.relativePath,
57451
+ message: `References open issue ${id}`
57452
+ });
57453
+ }
57454
+ }
57455
+ }
57456
+ return findings;
57457
+ }
57458
+ var SEVERITY_ORDER = {
57459
+ critical: 0,
57460
+ warning: 1,
57461
+ info: 2
57462
+ };
57463
+ function buildReport(findings, docsChecked) {
57464
+ const sorted = [...findings].sort(
57465
+ (a, b) => (SEVERITY_ORDER[a.severity] ?? 2) - (SEVERITY_ORDER[b.severity] ?? 2)
57466
+ );
57467
+ return {
57468
+ docsChecked,
57469
+ findingsTotal: sorted.length,
57470
+ findings: sorted,
57471
+ generatedAt: (/* @__PURE__ */ new Date()).toISOString()
57472
+ };
57473
+ }
57474
+
57475
+ // src/commands/docs.ts
57476
+ var REQUIRED_FIELDS = /* @__PURE__ */ new Set(["title", "type", "status", "updated_at", "version"]);
56958
57477
  async function collectDocFiles(repoRoot, filterPattern) {
56959
57478
  const candidates = [];
56960
57479
  for (const name of ["README.md", "CHANGELOG.md"]) {
56961
- const p = import_path20.default.join(repoRoot, name);
56962
- if (await import_fs_extra19.default.pathExists(p)) candidates.push(p);
57480
+ const p = import_path22.default.join(repoRoot, name);
57481
+ if (await import_fs_extra21.default.pathExists(p)) candidates.push(p);
56963
57482
  }
56964
- const docsDir = import_path20.default.join(repoRoot, "docs");
56965
- if (await import_fs_extra19.default.pathExists(docsDir)) {
56966
- const entries = await import_fs_extra19.default.readdir(docsDir);
57483
+ const docsDir = import_path22.default.join(repoRoot, "docs");
57484
+ if (await import_fs_extra21.default.pathExists(docsDir)) {
57485
+ const entries = await import_fs_extra21.default.readdir(docsDir);
56967
57486
  for (const entry of entries) {
56968
- if (entry.endsWith(".md")) candidates.push(import_path20.default.join(docsDir, entry));
57487
+ if (entry.endsWith(".md")) candidates.push(import_path22.default.join(docsDir, entry));
56969
57488
  }
56970
57489
  }
56971
57490
  const results = [];
56972
57491
  for (const filePath of candidates) {
56973
- const rel = import_path20.default.relative(repoRoot, filePath);
56974
- if (filterPattern && !rel.includes(filterPattern) && !import_path20.default.basename(filePath).includes(filterPattern)) {
57492
+ const rel = import_path22.default.relative(repoRoot, filePath);
57493
+ if (filterPattern && !rel.includes(filterPattern) && !import_path22.default.basename(filePath).includes(filterPattern)) {
56975
57494
  continue;
56976
57495
  }
56977
57496
  let entry;
56978
57497
  try {
56979
- const stat = await import_fs_extra19.default.stat(filePath);
56980
- const content = await import_fs_extra19.default.readFile(filePath, "utf8");
57498
+ const stat = await import_fs_extra21.default.stat(filePath);
57499
+ const content = await import_fs_extra21.default.readFile(filePath, "utf8");
56981
57500
  const frontmatter = parseFrontmatter(content);
56982
57501
  entry = {
56983
57502
  filePath,
@@ -57034,8 +57553,43 @@ ${header}${meta3}`);
57034
57553
  console.log(` ${keyStr} ${valStr}`);
57035
57554
  }
57036
57555
  }
57556
+ function printCrossCheckReport(findings, docsChecked, total) {
57557
+ console.log(t.bold(`
57558
+ Docs cross-check
57559
+ `));
57560
+ console.log(kleur_default.gray(` ${docsChecked} docs checked, ${total} finding${total !== 1 ? "s" : ""}
57561
+ `));
57562
+ if (findings.length === 0) {
57563
+ console.log(` ${sym.ok} All docs current
57564
+ `);
57565
+ return;
57566
+ }
57567
+ const bySeverity = {
57568
+ critical: findings.filter((f) => f.severity === "critical"),
57569
+ warning: findings.filter((f) => f.severity === "warning"),
57570
+ info: findings.filter((f) => f.severity === "info")
57571
+ };
57572
+ for (const f of bySeverity.critical) {
57573
+ console.log(` ${kleur_default.red("\u2717")} ${kleur_default.red(f.docPath || "(coverage gap)")} ${f.message}`);
57574
+ if (f.detail) console.log(kleur_default.gray(` ${f.detail}`));
57575
+ }
57576
+ for (const f of bySeverity.warning) {
57577
+ console.log(` ${kleur_default.yellow("\u26A0")} ${kleur_default.yellow(f.docPath || "(coverage gap)")} ${f.message}`);
57578
+ if (f.detail) console.log(kleur_default.gray(` ${f.detail}`));
57579
+ }
57580
+ for (const f of bySeverity.info) {
57581
+ console.log(` ${kleur_default.gray("\u2139")} ${kleur_default.gray(f.docPath)} ${kleur_default.gray(f.message)}`);
57582
+ }
57583
+ const parts = [];
57584
+ if (bySeverity.critical.length > 0) parts.push(kleur_default.red(`${bySeverity.critical.length} critical`));
57585
+ if (bySeverity.warning.length > 0) parts.push(kleur_default.yellow(`${bySeverity.warning.length} warning${bySeverity.warning.length > 1 ? "s" : ""}`));
57586
+ if (bySeverity.info.length > 0) parts.push(kleur_default.gray(`${bySeverity.info.length} info`));
57587
+ console.log(kleur_default.gray(`
57588
+ ${parts.join(", ")}
57589
+ `));
57590
+ }
57037
57591
  function createDocsCommand() {
57038
- const docs = new Command("docs").description("Documentation management commands");
57592
+ const docs = new Command("docs").description("Documentation inspection and drift-check commands");
57039
57593
  docs.command("show [filter]").description("Display frontmatters for README, CHANGELOG, and docs/ files").option("--raw", "Output raw YAML frontmatter", false).option("--json", "Output JSON", false).action(async (filter, opts) => {
57040
57594
  const repoRoot = await findRepoRoot();
57041
57595
  const entries = await collectDocFiles(repoRoot, filter);
@@ -57063,11 +57617,122 @@ function createDocsCommand() {
57063
57617
  ${sym.ok} ${entries.length} file${entries.length !== 1 ? "s" : ""}` + (without > 0 ? kleur_default.gray(` (${without} without frontmatter)`) : "") + "\n"
57064
57618
  );
57065
57619
  });
57620
+ docs.command("list").description("List markdown docs with metadata summary, filters, and optional cache bypass").option("--dir <path>", "Filter to files under this directory").option("--pattern <glob>", "Filter by filename substring").option("--filter <field=value>", "Filter by frontmatter field, e.g. --filter type=service").option("--json", "Output JSON array", false).option("--no-cache", "Bypass cache and force fresh scan").action(async (opts) => {
57621
+ const repoRoot = await findRepoRoot();
57622
+ let fmFilter;
57623
+ if (opts.filter) {
57624
+ const sep = opts.filter.indexOf("=");
57625
+ if (sep !== -1) {
57626
+ fmFilter = { field: opts.filter.slice(0, sep), value: opts.filter.slice(sep + 1) };
57627
+ }
57628
+ }
57629
+ const scanOpts = { dir: opts.dir, pattern: opts.pattern, filter: fmFilter };
57630
+ let entries = [];
57631
+ let fromCache = false;
57632
+ if (opts.cache !== false) {
57633
+ const cached2 = await readCache(repoRoot);
57634
+ const fresh = await scanDocFiles(repoRoot, scanOpts);
57635
+ if (cached2 && isCacheValid(cached2, fresh)) {
57636
+ entries = fresh;
57637
+ fromCache = true;
57638
+ } else {
57639
+ entries = fresh;
57640
+ await writeCache(repoRoot, fresh);
57641
+ }
57642
+ } else {
57643
+ entries = await scanDocFiles(repoRoot, scanOpts);
57644
+ }
57645
+ if (entries.length === 0) {
57646
+ console.log(kleur_default.yellow("\n No documentation files found.\n"));
57647
+ return;
57648
+ }
57649
+ if (opts.json) {
57650
+ const output = entries.map((e) => ({
57651
+ path: e.relativePath,
57652
+ sizeBytes: e.sizeBytes,
57653
+ lastModified: e.lastModified.toISOString(),
57654
+ frontmatter: e.frontmatter,
57655
+ parseError: e.parseError ?? null
57656
+ }));
57657
+ console.log(JSON.stringify(output, null, 2));
57658
+ return;
57659
+ }
57660
+ const Table = require_cli_table3();
57661
+ const table = new Table({
57662
+ head: [
57663
+ kleur_default.bold("Path"),
57664
+ kleur_default.bold("Size"),
57665
+ kleur_default.bold("Modified"),
57666
+ kleur_default.bold("Title"),
57667
+ kleur_default.bold("Type")
57668
+ ],
57669
+ style: { head: [], border: [] }
57670
+ });
57671
+ let withoutFm = 0;
57672
+ for (const e of entries) {
57673
+ const hasFm = e.frontmatter && Object.keys(e.frontmatter).length > 0;
57674
+ if (!hasFm) withoutFm++;
57675
+ const row = [
57676
+ hasFm ? e.relativePath : kleur_default.gray(e.relativePath),
57677
+ kleur_default.dim(formatSize(e.sizeBytes)),
57678
+ kleur_default.dim(formatDate(e.lastModified)),
57679
+ hasFm ? e.frontmatter?.title ?? kleur_default.gray("\u2014") : kleur_default.gray("\u2014"),
57680
+ hasFm ? e.frontmatter?.type ?? kleur_default.gray("\u2014") : kleur_default.gray("\u2014")
57681
+ ];
57682
+ table.push(row);
57683
+ }
57684
+ console.log("\n" + table.toString());
57685
+ const cacheNote = fromCache ? kleur_default.dim(" (cached)") : "";
57686
+ const withoutNote = withoutFm > 0 ? kleur_default.gray(` (${withoutFm} without frontmatter)`) : "";
57687
+ console.log(`
57688
+ ${sym.ok} ${entries.length} file${entries.length !== 1 ? "s" : ""}${withoutNote}${cacheNote}
57689
+ `);
57690
+ });
57691
+ docs.command("cross-check").description("Validate docs against recent PR activity, issue coverage, and open issue refs").option("--days <n>", "Look-back window in days", "30").option("--json", "Output JSON", false).action(async (opts) => {
57692
+ try {
57693
+ const days = parseInt(opts.days, 10) || 30;
57694
+ const repoRoot = await findRepoRoot();
57695
+ const ghOk = isGhAvailable();
57696
+ const bdOk = isBdAvailable();
57697
+ if (!ghOk) {
57698
+ console.error(kleur_default.yellow("[gh] GitHub CLI not available, PR data will be empty"));
57699
+ }
57700
+ if (!bdOk) {
57701
+ console.error(kleur_default.yellow("[bd] bd CLI not available, issue data will be empty"));
57702
+ }
57703
+ const docEntries = await collectDocFiles(repoRoot);
57704
+ const docContents = /* @__PURE__ */ new Map();
57705
+ for (const doc of docEntries) {
57706
+ try {
57707
+ const content = await import_fs_extra21.default.readFile(doc.filePath, "utf8");
57708
+ docContents.set(doc.relativePath, content);
57709
+ } catch {
57710
+ }
57711
+ }
57712
+ const [prs, issues] = await Promise.all([
57713
+ Promise.resolve(fetchRecentPrs(repoRoot, days)),
57714
+ Promise.resolve(fetchClosedBdIssues(days))
57715
+ ]);
57716
+ const staleFindings = detectStaleDocs(docEntries, prs, days);
57717
+ const gapFindings = detectCoverageGaps(docEntries, issues, docContents);
57718
+ const refFindings = validateIssueReferences(docEntries, issues, docContents);
57719
+ const report = buildReport([...staleFindings, ...gapFindings, ...refFindings], docEntries.length);
57720
+ if (opts.json) {
57721
+ console.log(JSON.stringify(report, null, 2));
57722
+ } else {
57723
+ printCrossCheckReport(report.findings, report.docsChecked, report.findingsTotal);
57724
+ }
57725
+ } catch (err) {
57726
+ const msg = err instanceof Error ? err.message : String(err);
57727
+ console.error(kleur_default.red(`\u2717 Cross-check failed: ${msg}`));
57728
+ process.exit(1);
57729
+ }
57730
+ });
57066
57731
  return docs;
57067
57732
  }
57068
57733
 
57069
57734
  // src/commands/debug.ts
57070
- var import_node_child_process9 = require("child_process");
57735
+ var import_node_child_process12 = require("child_process");
57071
57736
  var import_node_fs6 = require("fs");
57072
57737
  var import_node_path7 = require("path");
57073
57738
  var KIND_LABELS = {
@@ -57208,14 +57873,14 @@ function buildWhere(opts, base) {
57208
57873
  clauses.push(`session_id LIKE '${s}%'`);
57209
57874
  }
57210
57875
  if (opts.type) {
57211
- const t3 = opts.type.replace(/'/g, "''");
57212
- clauses.push(`kind LIKE '${t3}.%' OR kind = '${t3}'`);
57876
+ const t2 = opts.type.replace(/'/g, "''");
57877
+ clauses.push(`kind LIKE '${t2}.%' OR kind = '${t2}'`);
57213
57878
  }
57214
57879
  return clauses.length ? clauses.join(" AND ") : "";
57215
57880
  }
57216
57881
  function queryEvents(dbPath, where, limit) {
57217
57882
  const sql = `SELECT id,ts,session_id,runtime,worktree,kind,tool_name,outcome,issue_id,duration_ms,data FROM events${where ? ` WHERE ${where}` : ""} ORDER BY id ASC LIMIT ${limit}`;
57218
- const result = (0, import_node_child_process9.spawnSync)("sqlite3", [dbPath, "-json", sql], {
57883
+ const result = (0, import_node_child_process12.spawnSync)("sqlite3", [dbPath, "-json", sql], {
57219
57884
  stdio: ["pipe", "pipe", "pipe"],
57220
57885
  encoding: "utf8",
57221
57886
  timeout: 5e3
@@ -57366,8 +58031,8 @@ function gradientLine(line) {
57366
58031
  let out = "";
57367
58032
  const len = line.length;
57368
58033
  for (let i = 0; i < len; i++) {
57369
- const t3 = len > 1 ? i / (len - 1) : 0;
57370
- const hue = HUE_START + t3 * (HUE_END - HUE_START);
58034
+ const t2 = len > 1 ? i / (len - 1) : 0;
58035
+ const hue = HUE_START + t2 * (HUE_END - HUE_START);
57371
58036
  const [r, g, b] = hslToRgb(hue, SAT, LIG);
57372
58037
  out += `\x1B[38;2;${r};${g};${b}m` + line[i];
57373
58038
  }
@@ -57465,6 +58130,7 @@ program2.addCommand(createResetCommand());
57465
58130
  program2.addCommand(createCleanCommand());
57466
58131
  program2.addCommand(createEndCommand());
57467
58132
  program2.addCommand(createWorktreeCommand());
58133
+ program2.addCommand(createAttachCommand());
57468
58134
  program2.addCommand(createDocsCommand());
57469
58135
  program2.addCommand(createDebugCommand());
57470
58136
  program2.addCommand(createHelpCommand());