@sinoia/hubdoc-tools 1.6.1 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli.js +1146 -760
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -925,8 +925,8 @@ var require_command = __commonJS({
925
925
  "node_modules/commander/lib/command.js"(exports2) {
926
926
  var EventEmitter3 = require("events").EventEmitter;
927
927
  var childProcess = require("child_process");
928
- var path22 = require("path");
929
- var fs18 = require("fs");
928
+ var path24 = require("path");
929
+ var fs20 = require("fs");
930
930
  var process3 = require("process");
931
931
  var { Argument: Argument2, humanReadableArgName } = require_argument();
932
932
  var { CommanderError: CommanderError2 } = require_error();
@@ -1749,10 +1749,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
1749
1749
  let launchWithNode = false;
1750
1750
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1751
1751
  function findFile(baseDir, baseName) {
1752
- const localBin = path22.resolve(baseDir, baseName);
1753
- if (fs18.existsSync(localBin)) return localBin;
1754
- if (sourceExt.includes(path22.extname(baseName))) return void 0;
1755
- const foundExt = sourceExt.find((ext2) => fs18.existsSync(`${localBin}${ext2}`));
1752
+ const localBin = path24.resolve(baseDir, baseName);
1753
+ if (fs20.existsSync(localBin)) return localBin;
1754
+ if (sourceExt.includes(path24.extname(baseName))) return void 0;
1755
+ const foundExt = sourceExt.find((ext2) => fs20.existsSync(`${localBin}${ext2}`));
1756
1756
  if (foundExt) return `${localBin}${foundExt}`;
1757
1757
  return void 0;
1758
1758
  }
@@ -1763,23 +1763,23 @@ Expecting one of '${allowedValues.join("', '")}'`);
1763
1763
  if (this._scriptPath) {
1764
1764
  let resolvedScriptPath;
1765
1765
  try {
1766
- resolvedScriptPath = fs18.realpathSync(this._scriptPath);
1766
+ resolvedScriptPath = fs20.realpathSync(this._scriptPath);
1767
1767
  } catch (err) {
1768
1768
  resolvedScriptPath = this._scriptPath;
1769
1769
  }
1770
- executableDir = path22.resolve(path22.dirname(resolvedScriptPath), executableDir);
1770
+ executableDir = path24.resolve(path24.dirname(resolvedScriptPath), executableDir);
1771
1771
  }
1772
1772
  if (executableDir) {
1773
1773
  let localFile = findFile(executableDir, executableFile);
1774
1774
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
1775
- const legacyName = path22.basename(this._scriptPath, path22.extname(this._scriptPath));
1775
+ const legacyName = path24.basename(this._scriptPath, path24.extname(this._scriptPath));
1776
1776
  if (legacyName !== this._name) {
1777
1777
  localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
1778
1778
  }
1779
1779
  }
1780
1780
  executableFile = localFile || executableFile;
1781
1781
  }
1782
- launchWithNode = sourceExt.includes(path22.extname(executableFile));
1782
+ launchWithNode = sourceExt.includes(path24.extname(executableFile));
1783
1783
  let proc2;
1784
1784
  if (process3.platform !== "win32") {
1785
1785
  if (launchWithNode) {
@@ -2562,7 +2562,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
2562
2562
  * @return {Command}
2563
2563
  */
2564
2564
  nameFromFilename(filename) {
2565
- this._name = path22.basename(filename, path22.extname(filename));
2565
+ this._name = path24.basename(filename, path24.extname(filename));
2566
2566
  return this;
2567
2567
  }
2568
2568
  /**
@@ -2576,9 +2576,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
2576
2576
  * @param {string} [path]
2577
2577
  * @return {string|null|Command}
2578
2578
  */
2579
- executableDir(path23) {
2580
- if (path23 === void 0) return this._executableDir;
2581
- this._executableDir = path23;
2579
+ executableDir(path25) {
2580
+ if (path25 === void 0) return this._executableDir;
2581
+ this._executableDir = path25;
2582
2582
  return this;
2583
2583
  }
2584
2584
  /**
@@ -3638,15 +3638,15 @@ var require_route = __commonJS({
3638
3638
  };
3639
3639
  }
3640
3640
  function wrapConversion(toModel, graph) {
3641
- const path22 = [graph[toModel].parent, toModel];
3641
+ const path24 = [graph[toModel].parent, toModel];
3642
3642
  let fn = conversions[graph[toModel].parent][toModel];
3643
3643
  let cur = graph[toModel].parent;
3644
3644
  while (graph[cur].parent) {
3645
- path22.unshift(graph[cur].parent);
3645
+ path24.unshift(graph[cur].parent);
3646
3646
  fn = link(conversions[graph[cur].parent][cur], fn);
3647
3647
  cur = graph[cur].parent;
3648
3648
  }
3649
- fn.conversion = path22;
3649
+ fn.conversion = path24;
3650
3650
  return fn;
3651
3651
  }
3652
3652
  module2.exports = function(fromModel) {
@@ -3886,7 +3886,7 @@ var require_has_flag = __commonJS({
3886
3886
  var require_supports_color = __commonJS({
3887
3887
  "node_modules/supports-color/index.js"(exports2, module2) {
3888
3888
  "use strict";
3889
- var os5 = require("os");
3889
+ var os7 = require("os");
3890
3890
  var tty = require("tty");
3891
3891
  var hasFlag = require_has_flag();
3892
3892
  var { env } = process;
@@ -3934,7 +3934,7 @@ var require_supports_color = __commonJS({
3934
3934
  return min;
3935
3935
  }
3936
3936
  if (process.platform === "win32") {
3937
- const osRelease = os5.release().split(".");
3937
+ const osRelease = os7.release().split(".");
3938
3938
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
3939
3939
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
3940
3940
  }
@@ -4085,14 +4085,14 @@ var require_templates = __commonJS({
4085
4085
  }
4086
4086
  return results;
4087
4087
  }
4088
- function buildStyle(chalk26, styles) {
4088
+ function buildStyle(chalk27, styles) {
4089
4089
  const enabled = {};
4090
4090
  for (const layer of styles) {
4091
4091
  for (const style of layer.styles) {
4092
4092
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
4093
4093
  }
4094
4094
  }
4095
- let current = chalk26;
4095
+ let current = chalk27;
4096
4096
  for (const [styleName, styles2] of Object.entries(enabled)) {
4097
4097
  if (!Array.isArray(styles2)) {
4098
4098
  continue;
@@ -4104,7 +4104,7 @@ var require_templates = __commonJS({
4104
4104
  }
4105
4105
  return current;
4106
4106
  }
4107
- module2.exports = (chalk26, temporary) => {
4107
+ module2.exports = (chalk27, temporary) => {
4108
4108
  const styles = [];
4109
4109
  const chunks = [];
4110
4110
  let chunk = [];
@@ -4114,13 +4114,13 @@ var require_templates = __commonJS({
4114
4114
  } else if (style) {
4115
4115
  const string = chunk.join("");
4116
4116
  chunk = [];
4117
- chunks.push(styles.length === 0 ? string : buildStyle(chalk26, styles)(string));
4117
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk27, styles)(string));
4118
4118
  styles.push({ inverse, styles: parseStyle(style) });
4119
4119
  } else if (close3) {
4120
4120
  if (styles.length === 0) {
4121
4121
  throw new Error("Found extraneous } in Chalk template literal");
4122
4122
  }
4123
- chunks.push(buildStyle(chalk26, styles)(chunk.join("")));
4123
+ chunks.push(buildStyle(chalk27, styles)(chunk.join("")));
4124
4124
  chunk = [];
4125
4125
  styles.pop();
4126
4126
  } else {
@@ -4168,16 +4168,16 @@ var require_source = __commonJS({
4168
4168
  }
4169
4169
  };
4170
4170
  var chalkFactory = (options) => {
4171
- const chalk27 = {};
4172
- applyOptions(chalk27, options);
4173
- chalk27.template = (...arguments_) => chalkTag(chalk27.template, ...arguments_);
4174
- Object.setPrototypeOf(chalk27, Chalk.prototype);
4175
- Object.setPrototypeOf(chalk27.template, chalk27);
4176
- chalk27.template.constructor = () => {
4171
+ const chalk28 = {};
4172
+ applyOptions(chalk28, options);
4173
+ chalk28.template = (...arguments_) => chalkTag(chalk28.template, ...arguments_);
4174
+ Object.setPrototypeOf(chalk28, Chalk.prototype);
4175
+ Object.setPrototypeOf(chalk28.template, chalk28);
4176
+ chalk28.template.constructor = () => {
4177
4177
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
4178
4178
  };
4179
- chalk27.template.Instance = ChalkClass;
4180
- return chalk27.template;
4179
+ chalk28.template.Instance = ChalkClass;
4180
+ return chalk28.template;
4181
4181
  };
4182
4182
  function Chalk(options) {
4183
4183
  return chalkFactory(options);
@@ -4288,7 +4288,7 @@ var require_source = __commonJS({
4288
4288
  return openAll + string + closeAll;
4289
4289
  };
4290
4290
  var template;
4291
- var chalkTag = (chalk27, ...strings) => {
4291
+ var chalkTag = (chalk28, ...strings) => {
4292
4292
  const [firstString] = strings;
4293
4293
  if (!isArray2(firstString) || !isArray2(firstString.raw)) {
4294
4294
  return strings.join(" ");
@@ -4304,14 +4304,14 @@ var require_source = __commonJS({
4304
4304
  if (template === void 0) {
4305
4305
  template = require_templates();
4306
4306
  }
4307
- return template(chalk27, parts2.join(""));
4307
+ return template(chalk28, parts2.join(""));
4308
4308
  };
4309
4309
  Object.defineProperties(Chalk.prototype, styles);
4310
- var chalk26 = Chalk();
4311
- chalk26.supportsColor = stdoutColor;
4312
- chalk26.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
4313
- chalk26.stderr.supportsColor = stderrColor;
4314
- module2.exports = chalk26;
4310
+ var chalk27 = Chalk();
4311
+ chalk27.supportsColor = stdoutColor;
4312
+ chalk27.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
4313
+ chalk27.stderr.supportsColor = stderrColor;
4314
+ module2.exports = chalk27;
4315
4315
  }
4316
4316
  });
4317
4317
 
@@ -4369,54 +4369,54 @@ var require_polyfills = __commonJS({
4369
4369
  }
4370
4370
  var chdir;
4371
4371
  module2.exports = patch;
4372
- function patch(fs18) {
4372
+ function patch(fs20) {
4373
4373
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
4374
- patchLchmod(fs18);
4375
- }
4376
- if (!fs18.lutimes) {
4377
- patchLutimes(fs18);
4378
- }
4379
- fs18.chown = chownFix(fs18.chown);
4380
- fs18.fchown = chownFix(fs18.fchown);
4381
- fs18.lchown = chownFix(fs18.lchown);
4382
- fs18.chmod = chmodFix(fs18.chmod);
4383
- fs18.fchmod = chmodFix(fs18.fchmod);
4384
- fs18.lchmod = chmodFix(fs18.lchmod);
4385
- fs18.chownSync = chownFixSync(fs18.chownSync);
4386
- fs18.fchownSync = chownFixSync(fs18.fchownSync);
4387
- fs18.lchownSync = chownFixSync(fs18.lchownSync);
4388
- fs18.chmodSync = chmodFixSync(fs18.chmodSync);
4389
- fs18.fchmodSync = chmodFixSync(fs18.fchmodSync);
4390
- fs18.lchmodSync = chmodFixSync(fs18.lchmodSync);
4391
- fs18.stat = statFix(fs18.stat);
4392
- fs18.fstat = statFix(fs18.fstat);
4393
- fs18.lstat = statFix(fs18.lstat);
4394
- fs18.statSync = statFixSync(fs18.statSync);
4395
- fs18.fstatSync = statFixSync(fs18.fstatSync);
4396
- fs18.lstatSync = statFixSync(fs18.lstatSync);
4397
- if (fs18.chmod && !fs18.lchmod) {
4398
- fs18.lchmod = function(path22, mode, cb) {
4374
+ patchLchmod(fs20);
4375
+ }
4376
+ if (!fs20.lutimes) {
4377
+ patchLutimes(fs20);
4378
+ }
4379
+ fs20.chown = chownFix(fs20.chown);
4380
+ fs20.fchown = chownFix(fs20.fchown);
4381
+ fs20.lchown = chownFix(fs20.lchown);
4382
+ fs20.chmod = chmodFix(fs20.chmod);
4383
+ fs20.fchmod = chmodFix(fs20.fchmod);
4384
+ fs20.lchmod = chmodFix(fs20.lchmod);
4385
+ fs20.chownSync = chownFixSync(fs20.chownSync);
4386
+ fs20.fchownSync = chownFixSync(fs20.fchownSync);
4387
+ fs20.lchownSync = chownFixSync(fs20.lchownSync);
4388
+ fs20.chmodSync = chmodFixSync(fs20.chmodSync);
4389
+ fs20.fchmodSync = chmodFixSync(fs20.fchmodSync);
4390
+ fs20.lchmodSync = chmodFixSync(fs20.lchmodSync);
4391
+ fs20.stat = statFix(fs20.stat);
4392
+ fs20.fstat = statFix(fs20.fstat);
4393
+ fs20.lstat = statFix(fs20.lstat);
4394
+ fs20.statSync = statFixSync(fs20.statSync);
4395
+ fs20.fstatSync = statFixSync(fs20.fstatSync);
4396
+ fs20.lstatSync = statFixSync(fs20.lstatSync);
4397
+ if (fs20.chmod && !fs20.lchmod) {
4398
+ fs20.lchmod = function(path24, mode, cb) {
4399
4399
  if (cb) process.nextTick(cb);
4400
4400
  };
4401
- fs18.lchmodSync = function() {
4401
+ fs20.lchmodSync = function() {
4402
4402
  };
4403
4403
  }
4404
- if (fs18.chown && !fs18.lchown) {
4405
- fs18.lchown = function(path22, uid, gid, cb) {
4404
+ if (fs20.chown && !fs20.lchown) {
4405
+ fs20.lchown = function(path24, uid, gid, cb) {
4406
4406
  if (cb) process.nextTick(cb);
4407
4407
  };
4408
- fs18.lchownSync = function() {
4408
+ fs20.lchownSync = function() {
4409
4409
  };
4410
4410
  }
4411
4411
  if (platform === "win32") {
4412
- fs18.rename = typeof fs18.rename !== "function" ? fs18.rename : (function(fs$rename) {
4412
+ fs20.rename = typeof fs20.rename !== "function" ? fs20.rename : (function(fs$rename) {
4413
4413
  function rename(from3, to, cb) {
4414
4414
  var start = Date.now();
4415
4415
  var backoff = 0;
4416
4416
  fs$rename(from3, to, function CB(er) {
4417
4417
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
4418
4418
  setTimeout(function() {
4419
- fs18.stat(to, function(stater, st) {
4419
+ fs20.stat(to, function(stater, st) {
4420
4420
  if (stater && stater.code === "ENOENT")
4421
4421
  fs$rename(from3, to, CB);
4422
4422
  else
@@ -4432,9 +4432,9 @@ var require_polyfills = __commonJS({
4432
4432
  }
4433
4433
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
4434
4434
  return rename;
4435
- })(fs18.rename);
4435
+ })(fs20.rename);
4436
4436
  }
4437
- fs18.read = typeof fs18.read !== "function" ? fs18.read : (function(fs$read) {
4437
+ fs20.read = typeof fs20.read !== "function" ? fs20.read : (function(fs$read) {
4438
4438
  function read3(fd, buffer, offset, length, position, callback_) {
4439
4439
  var callback;
4440
4440
  if (callback_ && typeof callback_ === "function") {
@@ -4442,22 +4442,22 @@ var require_polyfills = __commonJS({
4442
4442
  callback = function(er, _2, __) {
4443
4443
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
4444
4444
  eagCounter++;
4445
- return fs$read.call(fs18, fd, buffer, offset, length, position, callback);
4445
+ return fs$read.call(fs20, fd, buffer, offset, length, position, callback);
4446
4446
  }
4447
4447
  callback_.apply(this, arguments);
4448
4448
  };
4449
4449
  }
4450
- return fs$read.call(fs18, fd, buffer, offset, length, position, callback);
4450
+ return fs$read.call(fs20, fd, buffer, offset, length, position, callback);
4451
4451
  }
4452
4452
  if (Object.setPrototypeOf) Object.setPrototypeOf(read3, fs$read);
4453
4453
  return read3;
4454
- })(fs18.read);
4455
- fs18.readSync = typeof fs18.readSync !== "function" ? fs18.readSync : /* @__PURE__ */ (function(fs$readSync) {
4454
+ })(fs20.read);
4455
+ fs20.readSync = typeof fs20.readSync !== "function" ? fs20.readSync : /* @__PURE__ */ (function(fs$readSync) {
4456
4456
  return function(fd, buffer, offset, length, position) {
4457
4457
  var eagCounter = 0;
4458
4458
  while (true) {
4459
4459
  try {
4460
- return fs$readSync.call(fs18, fd, buffer, offset, length, position);
4460
+ return fs$readSync.call(fs20, fd, buffer, offset, length, position);
4461
4461
  } catch (er) {
4462
4462
  if (er.code === "EAGAIN" && eagCounter < 10) {
4463
4463
  eagCounter++;
@@ -4467,11 +4467,11 @@ var require_polyfills = __commonJS({
4467
4467
  }
4468
4468
  }
4469
4469
  };
4470
- })(fs18.readSync);
4471
- function patchLchmod(fs19) {
4472
- fs19.lchmod = function(path22, mode, callback) {
4473
- fs19.open(
4474
- path22,
4470
+ })(fs20.readSync);
4471
+ function patchLchmod(fs21) {
4472
+ fs21.lchmod = function(path24, mode, callback) {
4473
+ fs21.open(
4474
+ path24,
4475
4475
  constants.O_WRONLY | constants.O_SYMLINK,
4476
4476
  mode,
4477
4477
  function(err, fd) {
@@ -4479,80 +4479,80 @@ var require_polyfills = __commonJS({
4479
4479
  if (callback) callback(err);
4480
4480
  return;
4481
4481
  }
4482
- fs19.fchmod(fd, mode, function(err2) {
4483
- fs19.close(fd, function(err22) {
4482
+ fs21.fchmod(fd, mode, function(err2) {
4483
+ fs21.close(fd, function(err22) {
4484
4484
  if (callback) callback(err2 || err22);
4485
4485
  });
4486
4486
  });
4487
4487
  }
4488
4488
  );
4489
4489
  };
4490
- fs19.lchmodSync = function(path22, mode) {
4491
- var fd = fs19.openSync(path22, constants.O_WRONLY | constants.O_SYMLINK, mode);
4490
+ fs21.lchmodSync = function(path24, mode) {
4491
+ var fd = fs21.openSync(path24, constants.O_WRONLY | constants.O_SYMLINK, mode);
4492
4492
  var threw = true;
4493
4493
  var ret;
4494
4494
  try {
4495
- ret = fs19.fchmodSync(fd, mode);
4495
+ ret = fs21.fchmodSync(fd, mode);
4496
4496
  threw = false;
4497
4497
  } finally {
4498
4498
  if (threw) {
4499
4499
  try {
4500
- fs19.closeSync(fd);
4500
+ fs21.closeSync(fd);
4501
4501
  } catch (er) {
4502
4502
  }
4503
4503
  } else {
4504
- fs19.closeSync(fd);
4504
+ fs21.closeSync(fd);
4505
4505
  }
4506
4506
  }
4507
4507
  return ret;
4508
4508
  };
4509
4509
  }
4510
- function patchLutimes(fs19) {
4511
- if (constants.hasOwnProperty("O_SYMLINK") && fs19.futimes) {
4512
- fs19.lutimes = function(path22, at, mt, cb) {
4513
- fs19.open(path22, constants.O_SYMLINK, function(er, fd) {
4510
+ function patchLutimes(fs21) {
4511
+ if (constants.hasOwnProperty("O_SYMLINK") && fs21.futimes) {
4512
+ fs21.lutimes = function(path24, at, mt, cb) {
4513
+ fs21.open(path24, constants.O_SYMLINK, function(er, fd) {
4514
4514
  if (er) {
4515
4515
  if (cb) cb(er);
4516
4516
  return;
4517
4517
  }
4518
- fs19.futimes(fd, at, mt, function(er2) {
4519
- fs19.close(fd, function(er22) {
4518
+ fs21.futimes(fd, at, mt, function(er2) {
4519
+ fs21.close(fd, function(er22) {
4520
4520
  if (cb) cb(er2 || er22);
4521
4521
  });
4522
4522
  });
4523
4523
  });
4524
4524
  };
4525
- fs19.lutimesSync = function(path22, at, mt) {
4526
- var fd = fs19.openSync(path22, constants.O_SYMLINK);
4525
+ fs21.lutimesSync = function(path24, at, mt) {
4526
+ var fd = fs21.openSync(path24, constants.O_SYMLINK);
4527
4527
  var ret;
4528
4528
  var threw = true;
4529
4529
  try {
4530
- ret = fs19.futimesSync(fd, at, mt);
4530
+ ret = fs21.futimesSync(fd, at, mt);
4531
4531
  threw = false;
4532
4532
  } finally {
4533
4533
  if (threw) {
4534
4534
  try {
4535
- fs19.closeSync(fd);
4535
+ fs21.closeSync(fd);
4536
4536
  } catch (er) {
4537
4537
  }
4538
4538
  } else {
4539
- fs19.closeSync(fd);
4539
+ fs21.closeSync(fd);
4540
4540
  }
4541
4541
  }
4542
4542
  return ret;
4543
4543
  };
4544
- } else if (fs19.futimes) {
4545
- fs19.lutimes = function(_a, _b, _c, cb) {
4544
+ } else if (fs21.futimes) {
4545
+ fs21.lutimes = function(_a, _b, _c, cb) {
4546
4546
  if (cb) process.nextTick(cb);
4547
4547
  };
4548
- fs19.lutimesSync = function() {
4548
+ fs21.lutimesSync = function() {
4549
4549
  };
4550
4550
  }
4551
4551
  }
4552
4552
  function chmodFix(orig) {
4553
4553
  if (!orig) return orig;
4554
4554
  return function(target, mode, cb) {
4555
- return orig.call(fs18, target, mode, function(er) {
4555
+ return orig.call(fs20, target, mode, function(er) {
4556
4556
  if (chownErOk(er)) er = null;
4557
4557
  if (cb) cb.apply(this, arguments);
4558
4558
  });
@@ -4562,7 +4562,7 @@ var require_polyfills = __commonJS({
4562
4562
  if (!orig) return orig;
4563
4563
  return function(target, mode) {
4564
4564
  try {
4565
- return orig.call(fs18, target, mode);
4565
+ return orig.call(fs20, target, mode);
4566
4566
  } catch (er) {
4567
4567
  if (!chownErOk(er)) throw er;
4568
4568
  }
@@ -4571,7 +4571,7 @@ var require_polyfills = __commonJS({
4571
4571
  function chownFix(orig) {
4572
4572
  if (!orig) return orig;
4573
4573
  return function(target, uid, gid, cb) {
4574
- return orig.call(fs18, target, uid, gid, function(er) {
4574
+ return orig.call(fs20, target, uid, gid, function(er) {
4575
4575
  if (chownErOk(er)) er = null;
4576
4576
  if (cb) cb.apply(this, arguments);
4577
4577
  });
@@ -4581,7 +4581,7 @@ var require_polyfills = __commonJS({
4581
4581
  if (!orig) return orig;
4582
4582
  return function(target, uid, gid) {
4583
4583
  try {
4584
- return orig.call(fs18, target, uid, gid);
4584
+ return orig.call(fs20, target, uid, gid);
4585
4585
  } catch (er) {
4586
4586
  if (!chownErOk(er)) throw er;
4587
4587
  }
@@ -4601,13 +4601,13 @@ var require_polyfills = __commonJS({
4601
4601
  }
4602
4602
  if (cb) cb.apply(this, arguments);
4603
4603
  }
4604
- return options ? orig.call(fs18, target, options, callback) : orig.call(fs18, target, callback);
4604
+ return options ? orig.call(fs20, target, options, callback) : orig.call(fs20, target, callback);
4605
4605
  };
4606
4606
  }
4607
4607
  function statFixSync(orig) {
4608
4608
  if (!orig) return orig;
4609
4609
  return function(target, options) {
4610
- var stats = options ? orig.call(fs18, target, options) : orig.call(fs18, target);
4610
+ var stats = options ? orig.call(fs20, target, options) : orig.call(fs20, target);
4611
4611
  if (stats) {
4612
4612
  if (stats.uid < 0) stats.uid += 4294967296;
4613
4613
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -4636,16 +4636,16 @@ var require_legacy_streams = __commonJS({
4636
4636
  "node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
4637
4637
  var Stream2 = require("stream").Stream;
4638
4638
  module2.exports = legacy;
4639
- function legacy(fs18) {
4639
+ function legacy(fs20) {
4640
4640
  return {
4641
4641
  ReadStream,
4642
4642
  WriteStream
4643
4643
  };
4644
- function ReadStream(path22, options) {
4645
- if (!(this instanceof ReadStream)) return new ReadStream(path22, options);
4644
+ function ReadStream(path24, options) {
4645
+ if (!(this instanceof ReadStream)) return new ReadStream(path24, options);
4646
4646
  Stream2.call(this);
4647
4647
  var self2 = this;
4648
- this.path = path22;
4648
+ this.path = path24;
4649
4649
  this.fd = null;
4650
4650
  this.readable = true;
4651
4651
  this.paused = false;
@@ -4679,7 +4679,7 @@ var require_legacy_streams = __commonJS({
4679
4679
  });
4680
4680
  return;
4681
4681
  }
4682
- fs18.open(this.path, this.flags, this.mode, function(err, fd) {
4682
+ fs20.open(this.path, this.flags, this.mode, function(err, fd) {
4683
4683
  if (err) {
4684
4684
  self2.emit("error", err);
4685
4685
  self2.readable = false;
@@ -4690,10 +4690,10 @@ var require_legacy_streams = __commonJS({
4690
4690
  self2._read();
4691
4691
  });
4692
4692
  }
4693
- function WriteStream(path22, options) {
4694
- if (!(this instanceof WriteStream)) return new WriteStream(path22, options);
4693
+ function WriteStream(path24, options) {
4694
+ if (!(this instanceof WriteStream)) return new WriteStream(path24, options);
4695
4695
  Stream2.call(this);
4696
- this.path = path22;
4696
+ this.path = path24;
4697
4697
  this.fd = null;
4698
4698
  this.writable = true;
4699
4699
  this.flags = "w";
@@ -4718,7 +4718,7 @@ var require_legacy_streams = __commonJS({
4718
4718
  this.busy = false;
4719
4719
  this._queue = [];
4720
4720
  if (this.fd === null) {
4721
- this._open = fs18.open;
4721
+ this._open = fs20.open;
4722
4722
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
4723
4723
  this.flush();
4724
4724
  }
@@ -4753,7 +4753,7 @@ var require_clone = __commonJS({
4753
4753
  // node_modules/graceful-fs/graceful-fs.js
4754
4754
  var require_graceful_fs = __commonJS({
4755
4755
  "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
4756
- var fs18 = require("fs");
4756
+ var fs20 = require("fs");
4757
4757
  var polyfills = require_polyfills();
4758
4758
  var legacy = require_legacy_streams();
4759
4759
  var clone = require_clone();
@@ -4785,12 +4785,12 @@ var require_graceful_fs = __commonJS({
4785
4785
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
4786
4786
  console.error(m);
4787
4787
  };
4788
- if (!fs18[gracefulQueue]) {
4788
+ if (!fs20[gracefulQueue]) {
4789
4789
  queue = global[gracefulQueue] || [];
4790
- publishQueue(fs18, queue);
4791
- fs18.close = (function(fs$close) {
4790
+ publishQueue(fs20, queue);
4791
+ fs20.close = (function(fs$close) {
4792
4792
  function close3(fd, cb) {
4793
- return fs$close.call(fs18, fd, function(err) {
4793
+ return fs$close.call(fs20, fd, function(err) {
4794
4794
  if (!err) {
4795
4795
  resetQueue();
4796
4796
  }
@@ -4802,48 +4802,48 @@ var require_graceful_fs = __commonJS({
4802
4802
  value: fs$close
4803
4803
  });
4804
4804
  return close3;
4805
- })(fs18.close);
4806
- fs18.closeSync = (function(fs$closeSync) {
4805
+ })(fs20.close);
4806
+ fs20.closeSync = (function(fs$closeSync) {
4807
4807
  function closeSync(fd) {
4808
- fs$closeSync.apply(fs18, arguments);
4808
+ fs$closeSync.apply(fs20, arguments);
4809
4809
  resetQueue();
4810
4810
  }
4811
4811
  Object.defineProperty(closeSync, previousSymbol, {
4812
4812
  value: fs$closeSync
4813
4813
  });
4814
4814
  return closeSync;
4815
- })(fs18.closeSync);
4815
+ })(fs20.closeSync);
4816
4816
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
4817
4817
  process.on("exit", function() {
4818
- debug(fs18[gracefulQueue]);
4819
- require("assert").equal(fs18[gracefulQueue].length, 0);
4818
+ debug(fs20[gracefulQueue]);
4819
+ require("assert").equal(fs20[gracefulQueue].length, 0);
4820
4820
  });
4821
4821
  }
4822
4822
  }
4823
4823
  var queue;
4824
4824
  if (!global[gracefulQueue]) {
4825
- publishQueue(global, fs18[gracefulQueue]);
4826
- }
4827
- module2.exports = patch(clone(fs18));
4828
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs18.__patched) {
4829
- module2.exports = patch(fs18);
4830
- fs18.__patched = true;
4831
- }
4832
- function patch(fs19) {
4833
- polyfills(fs19);
4834
- fs19.gracefulify = patch;
4835
- fs19.createReadStream = createReadStream3;
4836
- fs19.createWriteStream = createWriteStream;
4837
- var fs$readFile = fs19.readFile;
4838
- fs19.readFile = readFile;
4839
- function readFile(path22, options, cb) {
4825
+ publishQueue(global, fs20[gracefulQueue]);
4826
+ }
4827
+ module2.exports = patch(clone(fs20));
4828
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs20.__patched) {
4829
+ module2.exports = patch(fs20);
4830
+ fs20.__patched = true;
4831
+ }
4832
+ function patch(fs21) {
4833
+ polyfills(fs21);
4834
+ fs21.gracefulify = patch;
4835
+ fs21.createReadStream = createReadStream3;
4836
+ fs21.createWriteStream = createWriteStream;
4837
+ var fs$readFile = fs21.readFile;
4838
+ fs21.readFile = readFile;
4839
+ function readFile(path24, options, cb) {
4840
4840
  if (typeof options === "function")
4841
4841
  cb = options, options = null;
4842
- return go$readFile(path22, options, cb);
4843
- function go$readFile(path23, options2, cb2, startTime) {
4844
- return fs$readFile(path23, options2, function(err) {
4842
+ return go$readFile(path24, options, cb);
4843
+ function go$readFile(path25, options2, cb2, startTime) {
4844
+ return fs$readFile(path25, options2, function(err) {
4845
4845
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
4846
- enqueue([go$readFile, [path23, options2, cb2], err, startTime || Date.now(), Date.now()]);
4846
+ enqueue([go$readFile, [path25, options2, cb2], err, startTime || Date.now(), Date.now()]);
4847
4847
  else {
4848
4848
  if (typeof cb2 === "function")
4849
4849
  cb2.apply(this, arguments);
@@ -4851,16 +4851,16 @@ var require_graceful_fs = __commonJS({
4851
4851
  });
4852
4852
  }
4853
4853
  }
4854
- var fs$writeFile = fs19.writeFile;
4855
- fs19.writeFile = writeFile;
4856
- function writeFile(path22, data, options, cb) {
4854
+ var fs$writeFile = fs21.writeFile;
4855
+ fs21.writeFile = writeFile;
4856
+ function writeFile(path24, data, options, cb) {
4857
4857
  if (typeof options === "function")
4858
4858
  cb = options, options = null;
4859
- return go$writeFile(path22, data, options, cb);
4860
- function go$writeFile(path23, data2, options2, cb2, startTime) {
4861
- return fs$writeFile(path23, data2, options2, function(err) {
4859
+ return go$writeFile(path24, data, options, cb);
4860
+ function go$writeFile(path25, data2, options2, cb2, startTime) {
4861
+ return fs$writeFile(path25, data2, options2, function(err) {
4862
4862
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
4863
- enqueue([go$writeFile, [path23, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
4863
+ enqueue([go$writeFile, [path25, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
4864
4864
  else {
4865
4865
  if (typeof cb2 === "function")
4866
4866
  cb2.apply(this, arguments);
@@ -4868,17 +4868,17 @@ var require_graceful_fs = __commonJS({
4868
4868
  });
4869
4869
  }
4870
4870
  }
4871
- var fs$appendFile = fs19.appendFile;
4871
+ var fs$appendFile = fs21.appendFile;
4872
4872
  if (fs$appendFile)
4873
- fs19.appendFile = appendFile;
4874
- function appendFile(path22, data, options, cb) {
4873
+ fs21.appendFile = appendFile;
4874
+ function appendFile(path24, data, options, cb) {
4875
4875
  if (typeof options === "function")
4876
4876
  cb = options, options = null;
4877
- return go$appendFile(path22, data, options, cb);
4878
- function go$appendFile(path23, data2, options2, cb2, startTime) {
4879
- return fs$appendFile(path23, data2, options2, function(err) {
4877
+ return go$appendFile(path24, data, options, cb);
4878
+ function go$appendFile(path25, data2, options2, cb2, startTime) {
4879
+ return fs$appendFile(path25, data2, options2, function(err) {
4880
4880
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
4881
- enqueue([go$appendFile, [path23, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
4881
+ enqueue([go$appendFile, [path25, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
4882
4882
  else {
4883
4883
  if (typeof cb2 === "function")
4884
4884
  cb2.apply(this, arguments);
@@ -4886,9 +4886,9 @@ var require_graceful_fs = __commonJS({
4886
4886
  });
4887
4887
  }
4888
4888
  }
4889
- var fs$copyFile = fs19.copyFile;
4889
+ var fs$copyFile = fs21.copyFile;
4890
4890
  if (fs$copyFile)
4891
- fs19.copyFile = copyFile;
4891
+ fs21.copyFile = copyFile;
4892
4892
  function copyFile(src, dest, flags, cb) {
4893
4893
  if (typeof flags === "function") {
4894
4894
  cb = flags;
@@ -4906,34 +4906,34 @@ var require_graceful_fs = __commonJS({
4906
4906
  });
4907
4907
  }
4908
4908
  }
4909
- var fs$readdir = fs19.readdir;
4910
- fs19.readdir = readdir2;
4909
+ var fs$readdir = fs21.readdir;
4910
+ fs21.readdir = readdir2;
4911
4911
  var noReaddirOptionVersions = /^v[0-5]\./;
4912
- function readdir2(path22, options, cb) {
4912
+ function readdir2(path24, options, cb) {
4913
4913
  if (typeof options === "function")
4914
4914
  cb = options, options = null;
4915
- var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path23, options2, cb2, startTime) {
4916
- return fs$readdir(path23, fs$readdirCallback(
4917
- path23,
4915
+ var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path25, options2, cb2, startTime) {
4916
+ return fs$readdir(path25, fs$readdirCallback(
4917
+ path25,
4918
4918
  options2,
4919
4919
  cb2,
4920
4920
  startTime
4921
4921
  ));
4922
- } : function go$readdir2(path23, options2, cb2, startTime) {
4923
- return fs$readdir(path23, options2, fs$readdirCallback(
4924
- path23,
4922
+ } : function go$readdir2(path25, options2, cb2, startTime) {
4923
+ return fs$readdir(path25, options2, fs$readdirCallback(
4924
+ path25,
4925
4925
  options2,
4926
4926
  cb2,
4927
4927
  startTime
4928
4928
  ));
4929
4929
  };
4930
- return go$readdir(path22, options, cb);
4931
- function fs$readdirCallback(path23, options2, cb2, startTime) {
4930
+ return go$readdir(path24, options, cb);
4931
+ function fs$readdirCallback(path25, options2, cb2, startTime) {
4932
4932
  return function(err, files2) {
4933
4933
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
4934
4934
  enqueue([
4935
4935
  go$readdir,
4936
- [path23, options2, cb2],
4936
+ [path25, options2, cb2],
4937
4937
  err,
4938
4938
  startTime || Date.now(),
4939
4939
  Date.now()
@@ -4948,21 +4948,21 @@ var require_graceful_fs = __commonJS({
4948
4948
  }
4949
4949
  }
4950
4950
  if (process.version.substr(0, 4) === "v0.8") {
4951
- var legStreams = legacy(fs19);
4951
+ var legStreams = legacy(fs21);
4952
4952
  ReadStream = legStreams.ReadStream;
4953
4953
  WriteStream = legStreams.WriteStream;
4954
4954
  }
4955
- var fs$ReadStream = fs19.ReadStream;
4955
+ var fs$ReadStream = fs21.ReadStream;
4956
4956
  if (fs$ReadStream) {
4957
4957
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
4958
4958
  ReadStream.prototype.open = ReadStream$open;
4959
4959
  }
4960
- var fs$WriteStream = fs19.WriteStream;
4960
+ var fs$WriteStream = fs21.WriteStream;
4961
4961
  if (fs$WriteStream) {
4962
4962
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
4963
4963
  WriteStream.prototype.open = WriteStream$open;
4964
4964
  }
4965
- Object.defineProperty(fs19, "ReadStream", {
4965
+ Object.defineProperty(fs21, "ReadStream", {
4966
4966
  get: function() {
4967
4967
  return ReadStream;
4968
4968
  },
@@ -4972,7 +4972,7 @@ var require_graceful_fs = __commonJS({
4972
4972
  enumerable: true,
4973
4973
  configurable: true
4974
4974
  });
4975
- Object.defineProperty(fs19, "WriteStream", {
4975
+ Object.defineProperty(fs21, "WriteStream", {
4976
4976
  get: function() {
4977
4977
  return WriteStream;
4978
4978
  },
@@ -4983,7 +4983,7 @@ var require_graceful_fs = __commonJS({
4983
4983
  configurable: true
4984
4984
  });
4985
4985
  var FileReadStream = ReadStream;
4986
- Object.defineProperty(fs19, "FileReadStream", {
4986
+ Object.defineProperty(fs21, "FileReadStream", {
4987
4987
  get: function() {
4988
4988
  return FileReadStream;
4989
4989
  },
@@ -4994,7 +4994,7 @@ var require_graceful_fs = __commonJS({
4994
4994
  configurable: true
4995
4995
  });
4996
4996
  var FileWriteStream = WriteStream;
4997
- Object.defineProperty(fs19, "FileWriteStream", {
4997
+ Object.defineProperty(fs21, "FileWriteStream", {
4998
4998
  get: function() {
4999
4999
  return FileWriteStream;
5000
5000
  },
@@ -5004,7 +5004,7 @@ var require_graceful_fs = __commonJS({
5004
5004
  enumerable: true,
5005
5005
  configurable: true
5006
5006
  });
5007
- function ReadStream(path22, options) {
5007
+ function ReadStream(path24, options) {
5008
5008
  if (this instanceof ReadStream)
5009
5009
  return fs$ReadStream.apply(this, arguments), this;
5010
5010
  else
@@ -5024,7 +5024,7 @@ var require_graceful_fs = __commonJS({
5024
5024
  }
5025
5025
  });
5026
5026
  }
5027
- function WriteStream(path22, options) {
5027
+ function WriteStream(path24, options) {
5028
5028
  if (this instanceof WriteStream)
5029
5029
  return fs$WriteStream.apply(this, arguments), this;
5030
5030
  else
@@ -5042,22 +5042,22 @@ var require_graceful_fs = __commonJS({
5042
5042
  }
5043
5043
  });
5044
5044
  }
5045
- function createReadStream3(path22, options) {
5046
- return new fs19.ReadStream(path22, options);
5045
+ function createReadStream3(path24, options) {
5046
+ return new fs21.ReadStream(path24, options);
5047
5047
  }
5048
- function createWriteStream(path22, options) {
5049
- return new fs19.WriteStream(path22, options);
5048
+ function createWriteStream(path24, options) {
5049
+ return new fs21.WriteStream(path24, options);
5050
5050
  }
5051
- var fs$open = fs19.open;
5052
- fs19.open = open3;
5053
- function open3(path22, flags, mode, cb) {
5051
+ var fs$open = fs21.open;
5052
+ fs21.open = open3;
5053
+ function open3(path24, flags, mode, cb) {
5054
5054
  if (typeof mode === "function")
5055
5055
  cb = mode, mode = null;
5056
- return go$open(path22, flags, mode, cb);
5057
- function go$open(path23, flags2, mode2, cb2, startTime) {
5058
- return fs$open(path23, flags2, mode2, function(err, fd) {
5056
+ return go$open(path24, flags, mode, cb);
5057
+ function go$open(path25, flags2, mode2, cb2, startTime) {
5058
+ return fs$open(path25, flags2, mode2, function(err, fd) {
5059
5059
  if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
5060
- enqueue([go$open, [path23, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
5060
+ enqueue([go$open, [path25, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
5061
5061
  else {
5062
5062
  if (typeof cb2 === "function")
5063
5063
  cb2.apply(this, arguments);
@@ -5065,20 +5065,20 @@ var require_graceful_fs = __commonJS({
5065
5065
  });
5066
5066
  }
5067
5067
  }
5068
- return fs19;
5068
+ return fs21;
5069
5069
  }
5070
5070
  function enqueue(elem) {
5071
5071
  debug("ENQUEUE", elem[0].name, elem[1]);
5072
- fs18[gracefulQueue].push(elem);
5072
+ fs20[gracefulQueue].push(elem);
5073
5073
  retry();
5074
5074
  }
5075
5075
  var retryTimer;
5076
5076
  function resetQueue() {
5077
5077
  var now = Date.now();
5078
- for (var i = 0; i < fs18[gracefulQueue].length; ++i) {
5079
- if (fs18[gracefulQueue][i].length > 2) {
5080
- fs18[gracefulQueue][i][3] = now;
5081
- fs18[gracefulQueue][i][4] = now;
5078
+ for (var i = 0; i < fs20[gracefulQueue].length; ++i) {
5079
+ if (fs20[gracefulQueue][i].length > 2) {
5080
+ fs20[gracefulQueue][i][3] = now;
5081
+ fs20[gracefulQueue][i][4] = now;
5082
5082
  }
5083
5083
  }
5084
5084
  retry();
@@ -5086,9 +5086,9 @@ var require_graceful_fs = __commonJS({
5086
5086
  function retry() {
5087
5087
  clearTimeout(retryTimer);
5088
5088
  retryTimer = void 0;
5089
- if (fs18[gracefulQueue].length === 0)
5089
+ if (fs20[gracefulQueue].length === 0)
5090
5090
  return;
5091
- var elem = fs18[gracefulQueue].shift();
5091
+ var elem = fs20[gracefulQueue].shift();
5092
5092
  var fn = elem[0];
5093
5093
  var args = elem[1];
5094
5094
  var err = elem[2];
@@ -5110,7 +5110,7 @@ var require_graceful_fs = __commonJS({
5110
5110
  debug("RETRY", fn.name, args);
5111
5111
  fn.apply(null, args.concat([startTime]));
5112
5112
  } else {
5113
- fs18[gracefulQueue].push(elem);
5113
+ fs20[gracefulQueue].push(elem);
5114
5114
  }
5115
5115
  }
5116
5116
  if (retryTimer === void 0) {
@@ -5125,7 +5125,7 @@ var require_fs = __commonJS({
5125
5125
  "node_modules/fs-extra/lib/fs/index.js"(exports2) {
5126
5126
  "use strict";
5127
5127
  var u = require_universalify().fromCallback;
5128
- var fs18 = require_graceful_fs();
5128
+ var fs20 = require_graceful_fs();
5129
5129
  var api = [
5130
5130
  "access",
5131
5131
  "appendFile",
@@ -5166,26 +5166,26 @@ var require_fs = __commonJS({
5166
5166
  "utimes",
5167
5167
  "writeFile"
5168
5168
  ].filter((key) => {
5169
- return typeof fs18[key] === "function";
5169
+ return typeof fs20[key] === "function";
5170
5170
  });
5171
- Object.assign(exports2, fs18);
5171
+ Object.assign(exports2, fs20);
5172
5172
  api.forEach((method) => {
5173
- exports2[method] = u(fs18[method]);
5173
+ exports2[method] = u(fs20[method]);
5174
5174
  });
5175
5175
  exports2.exists = function(filename, callback) {
5176
5176
  if (typeof callback === "function") {
5177
- return fs18.exists(filename, callback);
5177
+ return fs20.exists(filename, callback);
5178
5178
  }
5179
5179
  return new Promise((resolve) => {
5180
- return fs18.exists(filename, resolve);
5180
+ return fs20.exists(filename, resolve);
5181
5181
  });
5182
5182
  };
5183
5183
  exports2.read = function(fd, buffer, offset, length, position, callback) {
5184
5184
  if (typeof callback === "function") {
5185
- return fs18.read(fd, buffer, offset, length, position, callback);
5185
+ return fs20.read(fd, buffer, offset, length, position, callback);
5186
5186
  }
5187
5187
  return new Promise((resolve, reject) => {
5188
- fs18.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
5188
+ fs20.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
5189
5189
  if (err) return reject(err);
5190
5190
  resolve({ bytesRead, buffer: buffer2 });
5191
5191
  });
@@ -5193,10 +5193,10 @@ var require_fs = __commonJS({
5193
5193
  };
5194
5194
  exports2.write = function(fd, buffer, ...args) {
5195
5195
  if (typeof args[args.length - 1] === "function") {
5196
- return fs18.write(fd, buffer, ...args);
5196
+ return fs20.write(fd, buffer, ...args);
5197
5197
  }
5198
5198
  return new Promise((resolve, reject) => {
5199
- fs18.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
5199
+ fs20.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
5200
5200
  if (err) return reject(err);
5201
5201
  resolve({ bytesWritten, buffer: buffer2 });
5202
5202
  });
@@ -5204,10 +5204,10 @@ var require_fs = __commonJS({
5204
5204
  };
5205
5205
  exports2.readv = function(fd, buffers, ...args) {
5206
5206
  if (typeof args[args.length - 1] === "function") {
5207
- return fs18.readv(fd, buffers, ...args);
5207
+ return fs20.readv(fd, buffers, ...args);
5208
5208
  }
5209
5209
  return new Promise((resolve, reject) => {
5210
- fs18.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
5210
+ fs20.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
5211
5211
  if (err) return reject(err);
5212
5212
  resolve({ bytesRead, buffers: buffers2 });
5213
5213
  });
@@ -5215,17 +5215,17 @@ var require_fs = __commonJS({
5215
5215
  };
5216
5216
  exports2.writev = function(fd, buffers, ...args) {
5217
5217
  if (typeof args[args.length - 1] === "function") {
5218
- return fs18.writev(fd, buffers, ...args);
5218
+ return fs20.writev(fd, buffers, ...args);
5219
5219
  }
5220
5220
  return new Promise((resolve, reject) => {
5221
- fs18.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
5221
+ fs20.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
5222
5222
  if (err) return reject(err);
5223
5223
  resolve({ bytesWritten, buffers: buffers2 });
5224
5224
  });
5225
5225
  });
5226
5226
  };
5227
- if (typeof fs18.realpath.native === "function") {
5228
- exports2.realpath.native = u(fs18.realpath.native);
5227
+ if (typeof fs20.realpath.native === "function") {
5228
+ exports2.realpath.native = u(fs20.realpath.native);
5229
5229
  } else {
5230
5230
  process.emitWarning(
5231
5231
  "fs.realpath.native is not a function. Is fs being monkey-patched?",
@@ -5240,10 +5240,10 @@ var require_fs = __commonJS({
5240
5240
  var require_utils = __commonJS({
5241
5241
  "node_modules/fs-extra/lib/mkdirs/utils.js"(exports2, module2) {
5242
5242
  "use strict";
5243
- var path22 = require("path");
5243
+ var path24 = require("path");
5244
5244
  module2.exports.checkPath = function checkPath(pth) {
5245
5245
  if (process.platform === "win32") {
5246
- const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path22.parse(pth).root, ""));
5246
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path24.parse(pth).root, ""));
5247
5247
  if (pathHasInvalidWinCharacters) {
5248
5248
  const error = new Error(`Path contains invalid characters: ${pth}`);
5249
5249
  error.code = "EINVAL";
@@ -5258,7 +5258,7 @@ var require_utils = __commonJS({
5258
5258
  var require_make_dir = __commonJS({
5259
5259
  "node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
5260
5260
  "use strict";
5261
- var fs18 = require_fs();
5261
+ var fs20 = require_fs();
5262
5262
  var { checkPath } = require_utils();
5263
5263
  var getMode = (options) => {
5264
5264
  const defaults3 = { mode: 511 };
@@ -5267,14 +5267,14 @@ var require_make_dir = __commonJS({
5267
5267
  };
5268
5268
  module2.exports.makeDir = async (dir, options) => {
5269
5269
  checkPath(dir);
5270
- return fs18.mkdir(dir, {
5270
+ return fs20.mkdir(dir, {
5271
5271
  mode: getMode(options),
5272
5272
  recursive: true
5273
5273
  });
5274
5274
  };
5275
5275
  module2.exports.makeDirSync = (dir, options) => {
5276
5276
  checkPath(dir);
5277
- return fs18.mkdirSync(dir, {
5277
+ return fs20.mkdirSync(dir, {
5278
5278
  mode: getMode(options),
5279
5279
  recursive: true
5280
5280
  });
@@ -5306,13 +5306,13 @@ var require_path_exists = __commonJS({
5306
5306
  "node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
5307
5307
  "use strict";
5308
5308
  var u = require_universalify().fromPromise;
5309
- var fs18 = require_fs();
5310
- function pathExists3(path22) {
5311
- return fs18.access(path22).then(() => true).catch(() => false);
5309
+ var fs20 = require_fs();
5310
+ function pathExists3(path24) {
5311
+ return fs20.access(path24).then(() => true).catch(() => false);
5312
5312
  }
5313
5313
  module2.exports = {
5314
5314
  pathExists: u(pathExists3),
5315
- pathExistsSync: fs18.existsSync
5315
+ pathExistsSync: fs20.existsSync
5316
5316
  };
5317
5317
  }
5318
5318
  });
@@ -5321,16 +5321,16 @@ var require_path_exists = __commonJS({
5321
5321
  var require_utimes = __commonJS({
5322
5322
  "node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
5323
5323
  "use strict";
5324
- var fs18 = require_fs();
5324
+ var fs20 = require_fs();
5325
5325
  var u = require_universalify().fromPromise;
5326
- async function utimesMillis(path22, atime, mtime) {
5327
- const fd = await fs18.open(path22, "r+");
5326
+ async function utimesMillis(path24, atime, mtime) {
5327
+ const fd = await fs20.open(path24, "r+");
5328
5328
  let closeErr = null;
5329
5329
  try {
5330
- await fs18.futimes(fd, atime, mtime);
5330
+ await fs20.futimes(fd, atime, mtime);
5331
5331
  } finally {
5332
5332
  try {
5333
- await fs18.close(fd);
5333
+ await fs20.close(fd);
5334
5334
  } catch (e) {
5335
5335
  closeErr = e;
5336
5336
  }
@@ -5339,10 +5339,10 @@ var require_utimes = __commonJS({
5339
5339
  throw closeErr;
5340
5340
  }
5341
5341
  }
5342
- function utimesMillisSync(path22, atime, mtime) {
5343
- const fd = fs18.openSync(path22, "r+");
5344
- fs18.futimesSync(fd, atime, mtime);
5345
- return fs18.closeSync(fd);
5342
+ function utimesMillisSync(path24, atime, mtime) {
5343
+ const fd = fs20.openSync(path24, "r+");
5344
+ fs20.futimesSync(fd, atime, mtime);
5345
+ return fs20.closeSync(fd);
5346
5346
  }
5347
5347
  module2.exports = {
5348
5348
  utimesMillis: u(utimesMillis),
@@ -5355,11 +5355,11 @@ var require_utimes = __commonJS({
5355
5355
  var require_stat = __commonJS({
5356
5356
  "node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
5357
5357
  "use strict";
5358
- var fs18 = require_fs();
5359
- var path22 = require("path");
5358
+ var fs20 = require_fs();
5359
+ var path24 = require("path");
5360
5360
  var u = require_universalify().fromPromise;
5361
5361
  function getStats(src, dest, opts) {
5362
- const statFunc = opts.dereference ? (file) => fs18.stat(file, { bigint: true }) : (file) => fs18.lstat(file, { bigint: true });
5362
+ const statFunc = opts.dereference ? (file) => fs20.stat(file, { bigint: true }) : (file) => fs20.lstat(file, { bigint: true });
5363
5363
  return Promise.all([
5364
5364
  statFunc(src),
5365
5365
  statFunc(dest).catch((err) => {
@@ -5370,7 +5370,7 @@ var require_stat = __commonJS({
5370
5370
  }
5371
5371
  function getStatsSync(src, dest, opts) {
5372
5372
  let destStat;
5373
- const statFunc = opts.dereference ? (file) => fs18.statSync(file, { bigint: true }) : (file) => fs18.lstatSync(file, { bigint: true });
5373
+ const statFunc = opts.dereference ? (file) => fs20.statSync(file, { bigint: true }) : (file) => fs20.lstatSync(file, { bigint: true });
5374
5374
  const srcStat = statFunc(src);
5375
5375
  try {
5376
5376
  destStat = statFunc(dest);
@@ -5384,8 +5384,8 @@ var require_stat = __commonJS({
5384
5384
  const { srcStat, destStat } = await getStats(src, dest, opts);
5385
5385
  if (destStat) {
5386
5386
  if (areIdentical(srcStat, destStat)) {
5387
- const srcBaseName = path22.basename(src);
5388
- const destBaseName = path22.basename(dest);
5387
+ const srcBaseName = path24.basename(src);
5388
+ const destBaseName = path24.basename(dest);
5389
5389
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
5390
5390
  return { srcStat, destStat, isChangingCase: true };
5391
5391
  }
@@ -5407,8 +5407,8 @@ var require_stat = __commonJS({
5407
5407
  const { srcStat, destStat } = getStatsSync(src, dest, opts);
5408
5408
  if (destStat) {
5409
5409
  if (areIdentical(srcStat, destStat)) {
5410
- const srcBaseName = path22.basename(src);
5411
- const destBaseName = path22.basename(dest);
5410
+ const srcBaseName = path24.basename(src);
5411
+ const destBaseName = path24.basename(dest);
5412
5412
  if (funcName === "move" && srcBaseName !== destBaseName && srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
5413
5413
  return { srcStat, destStat, isChangingCase: true };
5414
5414
  }
@@ -5427,12 +5427,12 @@ var require_stat = __commonJS({
5427
5427
  return { srcStat, destStat };
5428
5428
  }
5429
5429
  async function checkParentPaths(src, srcStat, dest, funcName) {
5430
- const srcParent = path22.resolve(path22.dirname(src));
5431
- const destParent = path22.resolve(path22.dirname(dest));
5432
- if (destParent === srcParent || destParent === path22.parse(destParent).root) return;
5430
+ const srcParent = path24.resolve(path24.dirname(src));
5431
+ const destParent = path24.resolve(path24.dirname(dest));
5432
+ if (destParent === srcParent || destParent === path24.parse(destParent).root) return;
5433
5433
  let destStat;
5434
5434
  try {
5435
- destStat = await fs18.stat(destParent, { bigint: true });
5435
+ destStat = await fs20.stat(destParent, { bigint: true });
5436
5436
  } catch (err) {
5437
5437
  if (err.code === "ENOENT") return;
5438
5438
  throw err;
@@ -5443,12 +5443,12 @@ var require_stat = __commonJS({
5443
5443
  return checkParentPaths(src, srcStat, destParent, funcName);
5444
5444
  }
5445
5445
  function checkParentPathsSync(src, srcStat, dest, funcName) {
5446
- const srcParent = path22.resolve(path22.dirname(src));
5447
- const destParent = path22.resolve(path22.dirname(dest));
5448
- if (destParent === srcParent || destParent === path22.parse(destParent).root) return;
5446
+ const srcParent = path24.resolve(path24.dirname(src));
5447
+ const destParent = path24.resolve(path24.dirname(dest));
5448
+ if (destParent === srcParent || destParent === path24.parse(destParent).root) return;
5449
5449
  let destStat;
5450
5450
  try {
5451
- destStat = fs18.statSync(destParent, { bigint: true });
5451
+ destStat = fs20.statSync(destParent, { bigint: true });
5452
5452
  } catch (err) {
5453
5453
  if (err.code === "ENOENT") return;
5454
5454
  throw err;
@@ -5462,8 +5462,8 @@ var require_stat = __commonJS({
5462
5462
  return destStat.ino !== void 0 && destStat.dev !== void 0 && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev;
5463
5463
  }
5464
5464
  function isSrcSubdir(src, dest) {
5465
- const srcArr = path22.resolve(src).split(path22.sep).filter((i) => i);
5466
- const destArr = path22.resolve(dest).split(path22.sep).filter((i) => i);
5465
+ const srcArr = path24.resolve(src).split(path24.sep).filter((i) => i);
5466
+ const destArr = path24.resolve(dest).split(path24.sep).filter((i) => i);
5467
5467
  return srcArr.every((cur, i) => destArr[i] === cur);
5468
5468
  }
5469
5469
  function errMsg(src, dest, funcName) {
@@ -5515,8 +5515,8 @@ var require_async = __commonJS({
5515
5515
  var require_copy = __commonJS({
5516
5516
  "node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
5517
5517
  "use strict";
5518
- var fs18 = require_fs();
5519
- var path22 = require("path");
5518
+ var fs20 = require_fs();
5519
+ var path24 = require("path");
5520
5520
  var { mkdirs } = require_mkdirs();
5521
5521
  var { pathExists: pathExists3 } = require_path_exists();
5522
5522
  var { utimesMillis } = require_utimes();
@@ -5539,7 +5539,7 @@ var require_copy = __commonJS({
5539
5539
  await stat3.checkParentPaths(src, srcStat, dest, "copy");
5540
5540
  const include = await runFilter(src, dest, opts);
5541
5541
  if (!include) return;
5542
- const destParent = path22.dirname(dest);
5542
+ const destParent = path24.dirname(dest);
5543
5543
  const dirExists = await pathExists3(destParent);
5544
5544
  if (!dirExists) {
5545
5545
  await mkdirs(destParent);
@@ -5551,7 +5551,7 @@ var require_copy = __commonJS({
5551
5551
  return opts.filter(src, dest);
5552
5552
  }
5553
5553
  async function getStatsAndPerformCopy(destStat, src, dest, opts) {
5554
- const statFn = opts.dereference ? fs18.stat : fs18.lstat;
5554
+ const statFn = opts.dereference ? fs20.stat : fs20.lstat;
5555
5555
  const srcStat = await statFn(src);
5556
5556
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
5557
5557
  if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -5563,7 +5563,7 @@ var require_copy = __commonJS({
5563
5563
  async function onFile(srcStat, destStat, src, dest, opts) {
5564
5564
  if (!destStat) return copyFile(srcStat, src, dest, opts);
5565
5565
  if (opts.overwrite) {
5566
- await fs18.unlink(dest);
5566
+ await fs20.unlink(dest);
5567
5567
  return copyFile(srcStat, src, dest, opts);
5568
5568
  }
5569
5569
  if (opts.errorOnExist) {
@@ -5571,29 +5571,29 @@ var require_copy = __commonJS({
5571
5571
  }
5572
5572
  }
5573
5573
  async function copyFile(srcStat, src, dest, opts) {
5574
- await fs18.copyFile(src, dest);
5574
+ await fs20.copyFile(src, dest);
5575
5575
  if (opts.preserveTimestamps) {
5576
5576
  if (fileIsNotWritable(srcStat.mode)) {
5577
5577
  await makeFileWritable(dest, srcStat.mode);
5578
5578
  }
5579
- const updatedSrcStat = await fs18.stat(src);
5579
+ const updatedSrcStat = await fs20.stat(src);
5580
5580
  await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
5581
5581
  }
5582
- return fs18.chmod(dest, srcStat.mode);
5582
+ return fs20.chmod(dest, srcStat.mode);
5583
5583
  }
5584
5584
  function fileIsNotWritable(srcMode) {
5585
5585
  return (srcMode & 128) === 0;
5586
5586
  }
5587
5587
  function makeFileWritable(dest, srcMode) {
5588
- return fs18.chmod(dest, srcMode | 128);
5588
+ return fs20.chmod(dest, srcMode | 128);
5589
5589
  }
5590
5590
  async function onDir(srcStat, destStat, src, dest, opts) {
5591
5591
  if (!destStat) {
5592
- await fs18.mkdir(dest);
5592
+ await fs20.mkdir(dest);
5593
5593
  }
5594
- await asyncIteratorConcurrentProcess(await fs18.opendir(src), async (item) => {
5595
- const srcItem = path22.join(src, item.name);
5596
- const destItem = path22.join(dest, item.name);
5594
+ await asyncIteratorConcurrentProcess(await fs20.opendir(src), async (item) => {
5595
+ const srcItem = path24.join(src, item.name);
5596
+ const destItem = path24.join(dest, item.name);
5597
5597
  const include = await runFilter(srcItem, destItem, opts);
5598
5598
  if (include) {
5599
5599
  const { destStat: destStat2 } = await stat3.checkPaths(srcItem, destItem, "copy", opts);
@@ -5601,26 +5601,26 @@ var require_copy = __commonJS({
5601
5601
  }
5602
5602
  });
5603
5603
  if (!destStat) {
5604
- await fs18.chmod(dest, srcStat.mode);
5604
+ await fs20.chmod(dest, srcStat.mode);
5605
5605
  }
5606
5606
  }
5607
5607
  async function onLink(destStat, src, dest, opts) {
5608
- let resolvedSrc = await fs18.readlink(src);
5608
+ let resolvedSrc = await fs20.readlink(src);
5609
5609
  if (opts.dereference) {
5610
- resolvedSrc = path22.resolve(process.cwd(), resolvedSrc);
5610
+ resolvedSrc = path24.resolve(process.cwd(), resolvedSrc);
5611
5611
  }
5612
5612
  if (!destStat) {
5613
- return fs18.symlink(resolvedSrc, dest);
5613
+ return fs20.symlink(resolvedSrc, dest);
5614
5614
  }
5615
5615
  let resolvedDest = null;
5616
5616
  try {
5617
- resolvedDest = await fs18.readlink(dest);
5617
+ resolvedDest = await fs20.readlink(dest);
5618
5618
  } catch (e) {
5619
- if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs18.symlink(resolvedSrc, dest);
5619
+ if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs20.symlink(resolvedSrc, dest);
5620
5620
  throw e;
5621
5621
  }
5622
5622
  if (opts.dereference) {
5623
- resolvedDest = path22.resolve(process.cwd(), resolvedDest);
5623
+ resolvedDest = path24.resolve(process.cwd(), resolvedDest);
5624
5624
  }
5625
5625
  if (stat3.isSrcSubdir(resolvedSrc, resolvedDest)) {
5626
5626
  throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
@@ -5628,8 +5628,8 @@ var require_copy = __commonJS({
5628
5628
  if (stat3.isSrcSubdir(resolvedDest, resolvedSrc)) {
5629
5629
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
5630
5630
  }
5631
- await fs18.unlink(dest);
5632
- return fs18.symlink(resolvedSrc, dest);
5631
+ await fs20.unlink(dest);
5632
+ return fs20.symlink(resolvedSrc, dest);
5633
5633
  }
5634
5634
  module2.exports = copy;
5635
5635
  }
@@ -5639,8 +5639,8 @@ var require_copy = __commonJS({
5639
5639
  var require_copy_sync = __commonJS({
5640
5640
  "node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
5641
5641
  "use strict";
5642
- var fs18 = require_graceful_fs();
5643
- var path22 = require("path");
5642
+ var fs20 = require_graceful_fs();
5643
+ var path24 = require("path");
5644
5644
  var mkdirsSync = require_mkdirs().mkdirsSync;
5645
5645
  var utimesMillisSync = require_utimes().utimesMillisSync;
5646
5646
  var stat3 = require_stat();
@@ -5661,12 +5661,12 @@ var require_copy_sync = __commonJS({
5661
5661
  const { srcStat, destStat } = stat3.checkPathsSync(src, dest, "copy", opts);
5662
5662
  stat3.checkParentPathsSync(src, srcStat, dest, "copy");
5663
5663
  if (opts.filter && !opts.filter(src, dest)) return;
5664
- const destParent = path22.dirname(dest);
5665
- if (!fs18.existsSync(destParent)) mkdirsSync(destParent);
5664
+ const destParent = path24.dirname(dest);
5665
+ if (!fs20.existsSync(destParent)) mkdirsSync(destParent);
5666
5666
  return getStats(destStat, src, dest, opts);
5667
5667
  }
5668
5668
  function getStats(destStat, src, dest, opts) {
5669
- const statSync = opts.dereference ? fs18.statSync : fs18.lstatSync;
5669
+ const statSync = opts.dereference ? fs20.statSync : fs20.lstatSync;
5670
5670
  const srcStat = statSync(src);
5671
5671
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
5672
5672
  else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -5681,14 +5681,14 @@ var require_copy_sync = __commonJS({
5681
5681
  }
5682
5682
  function mayCopyFile(srcStat, src, dest, opts) {
5683
5683
  if (opts.overwrite) {
5684
- fs18.unlinkSync(dest);
5684
+ fs20.unlinkSync(dest);
5685
5685
  return copyFile(srcStat, src, dest, opts);
5686
5686
  } else if (opts.errorOnExist) {
5687
5687
  throw new Error(`'${dest}' already exists`);
5688
5688
  }
5689
5689
  }
5690
5690
  function copyFile(srcStat, src, dest, opts) {
5691
- fs18.copyFileSync(src, dest);
5691
+ fs20.copyFileSync(src, dest);
5692
5692
  if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
5693
5693
  return setDestMode(dest, srcStat.mode);
5694
5694
  }
@@ -5703,10 +5703,10 @@ var require_copy_sync = __commonJS({
5703
5703
  return setDestMode(dest, srcMode | 128);
5704
5704
  }
5705
5705
  function setDestMode(dest, srcMode) {
5706
- return fs18.chmodSync(dest, srcMode);
5706
+ return fs20.chmodSync(dest, srcMode);
5707
5707
  }
5708
5708
  function setDestTimestamps(src, dest) {
5709
- const updatedSrcStat = fs18.statSync(src);
5709
+ const updatedSrcStat = fs20.statSync(src);
5710
5710
  return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
5711
5711
  }
5712
5712
  function onDir(srcStat, destStat, src, dest, opts) {
@@ -5714,12 +5714,12 @@ var require_copy_sync = __commonJS({
5714
5714
  return copyDir(src, dest, opts);
5715
5715
  }
5716
5716
  function mkDirAndCopy(srcMode, src, dest, opts) {
5717
- fs18.mkdirSync(dest);
5717
+ fs20.mkdirSync(dest);
5718
5718
  copyDir(src, dest, opts);
5719
5719
  return setDestMode(dest, srcMode);
5720
5720
  }
5721
5721
  function copyDir(src, dest, opts) {
5722
- const dir = fs18.opendirSync(src);
5722
+ const dir = fs20.opendirSync(src);
5723
5723
  try {
5724
5724
  let dirent;
5725
5725
  while ((dirent = dir.readSync()) !== null) {
@@ -5730,29 +5730,29 @@ var require_copy_sync = __commonJS({
5730
5730
  }
5731
5731
  }
5732
5732
  function copyDirItem(item, src, dest, opts) {
5733
- const srcItem = path22.join(src, item);
5734
- const destItem = path22.join(dest, item);
5733
+ const srcItem = path24.join(src, item);
5734
+ const destItem = path24.join(dest, item);
5735
5735
  if (opts.filter && !opts.filter(srcItem, destItem)) return;
5736
5736
  const { destStat } = stat3.checkPathsSync(srcItem, destItem, "copy", opts);
5737
5737
  return getStats(destStat, srcItem, destItem, opts);
5738
5738
  }
5739
5739
  function onLink(destStat, src, dest, opts) {
5740
- let resolvedSrc = fs18.readlinkSync(src);
5740
+ let resolvedSrc = fs20.readlinkSync(src);
5741
5741
  if (opts.dereference) {
5742
- resolvedSrc = path22.resolve(process.cwd(), resolvedSrc);
5742
+ resolvedSrc = path24.resolve(process.cwd(), resolvedSrc);
5743
5743
  }
5744
5744
  if (!destStat) {
5745
- return fs18.symlinkSync(resolvedSrc, dest);
5745
+ return fs20.symlinkSync(resolvedSrc, dest);
5746
5746
  } else {
5747
5747
  let resolvedDest;
5748
5748
  try {
5749
- resolvedDest = fs18.readlinkSync(dest);
5749
+ resolvedDest = fs20.readlinkSync(dest);
5750
5750
  } catch (err) {
5751
- if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs18.symlinkSync(resolvedSrc, dest);
5751
+ if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs20.symlinkSync(resolvedSrc, dest);
5752
5752
  throw err;
5753
5753
  }
5754
5754
  if (opts.dereference) {
5755
- resolvedDest = path22.resolve(process.cwd(), resolvedDest);
5755
+ resolvedDest = path24.resolve(process.cwd(), resolvedDest);
5756
5756
  }
5757
5757
  if (stat3.isSrcSubdir(resolvedSrc, resolvedDest)) {
5758
5758
  throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`);
@@ -5764,8 +5764,8 @@ var require_copy_sync = __commonJS({
5764
5764
  }
5765
5765
  }
5766
5766
  function copyLink(resolvedSrc, dest) {
5767
- fs18.unlinkSync(dest);
5768
- return fs18.symlinkSync(resolvedSrc, dest);
5767
+ fs20.unlinkSync(dest);
5768
+ return fs20.symlinkSync(resolvedSrc, dest);
5769
5769
  }
5770
5770
  module2.exports = copySync;
5771
5771
  }
@@ -5787,13 +5787,13 @@ var require_copy2 = __commonJS({
5787
5787
  var require_remove = __commonJS({
5788
5788
  "node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
5789
5789
  "use strict";
5790
- var fs18 = require_graceful_fs();
5790
+ var fs20 = require_graceful_fs();
5791
5791
  var u = require_universalify().fromCallback;
5792
- function remove(path22, callback) {
5793
- fs18.rm(path22, { recursive: true, force: true }, callback);
5792
+ function remove(path24, callback) {
5793
+ fs20.rm(path24, { recursive: true, force: true }, callback);
5794
5794
  }
5795
- function removeSync(path22) {
5796
- fs18.rmSync(path22, { recursive: true, force: true });
5795
+ function removeSync(path24) {
5796
+ fs20.rmSync(path24, { recursive: true, force: true });
5797
5797
  }
5798
5798
  module2.exports = {
5799
5799
  remove: u(remove),
@@ -5807,28 +5807,28 @@ var require_empty = __commonJS({
5807
5807
  "node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
5808
5808
  "use strict";
5809
5809
  var u = require_universalify().fromPromise;
5810
- var fs18 = require_fs();
5811
- var path22 = require("path");
5810
+ var fs20 = require_fs();
5811
+ var path24 = require("path");
5812
5812
  var mkdir = require_mkdirs();
5813
5813
  var remove = require_remove();
5814
5814
  var emptyDir = u(async function emptyDir2(dir) {
5815
5815
  let items;
5816
5816
  try {
5817
- items = await fs18.readdir(dir);
5817
+ items = await fs20.readdir(dir);
5818
5818
  } catch {
5819
5819
  return mkdir.mkdirs(dir);
5820
5820
  }
5821
- return Promise.all(items.map((item) => remove.remove(path22.join(dir, item))));
5821
+ return Promise.all(items.map((item) => remove.remove(path24.join(dir, item))));
5822
5822
  });
5823
5823
  function emptyDirSync(dir) {
5824
5824
  let items;
5825
5825
  try {
5826
- items = fs18.readdirSync(dir);
5826
+ items = fs20.readdirSync(dir);
5827
5827
  } catch {
5828
5828
  return mkdir.mkdirsSync(dir);
5829
5829
  }
5830
5830
  items.forEach((item) => {
5831
- item = path22.join(dir, item);
5831
+ item = path24.join(dir, item);
5832
5832
  remove.removeSync(item);
5833
5833
  });
5834
5834
  }
@@ -5846,52 +5846,52 @@ var require_file = __commonJS({
5846
5846
  "node_modules/fs-extra/lib/ensure/file.js"(exports2, module2) {
5847
5847
  "use strict";
5848
5848
  var u = require_universalify().fromPromise;
5849
- var path22 = require("path");
5850
- var fs18 = require_fs();
5849
+ var path24 = require("path");
5850
+ var fs20 = require_fs();
5851
5851
  var mkdir = require_mkdirs();
5852
5852
  async function createFile(file) {
5853
5853
  let stats;
5854
5854
  try {
5855
- stats = await fs18.stat(file);
5855
+ stats = await fs20.stat(file);
5856
5856
  } catch {
5857
5857
  }
5858
5858
  if (stats && stats.isFile()) return;
5859
- const dir = path22.dirname(file);
5859
+ const dir = path24.dirname(file);
5860
5860
  let dirStats = null;
5861
5861
  try {
5862
- dirStats = await fs18.stat(dir);
5862
+ dirStats = await fs20.stat(dir);
5863
5863
  } catch (err) {
5864
5864
  if (err.code === "ENOENT") {
5865
5865
  await mkdir.mkdirs(dir);
5866
- await fs18.writeFile(file, "");
5866
+ await fs20.writeFile(file, "");
5867
5867
  return;
5868
5868
  } else {
5869
5869
  throw err;
5870
5870
  }
5871
5871
  }
5872
5872
  if (dirStats.isDirectory()) {
5873
- await fs18.writeFile(file, "");
5873
+ await fs20.writeFile(file, "");
5874
5874
  } else {
5875
- await fs18.readdir(dir);
5875
+ await fs20.readdir(dir);
5876
5876
  }
5877
5877
  }
5878
5878
  function createFileSync(file) {
5879
5879
  let stats;
5880
5880
  try {
5881
- stats = fs18.statSync(file);
5881
+ stats = fs20.statSync(file);
5882
5882
  } catch {
5883
5883
  }
5884
5884
  if (stats && stats.isFile()) return;
5885
- const dir = path22.dirname(file);
5885
+ const dir = path24.dirname(file);
5886
5886
  try {
5887
- if (!fs18.statSync(dir).isDirectory()) {
5888
- fs18.readdirSync(dir);
5887
+ if (!fs20.statSync(dir).isDirectory()) {
5888
+ fs20.readdirSync(dir);
5889
5889
  }
5890
5890
  } catch (err) {
5891
5891
  if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
5892
5892
  else throw err;
5893
5893
  }
5894
- fs18.writeFileSync(file, "");
5894
+ fs20.writeFileSync(file, "");
5895
5895
  }
5896
5896
  module2.exports = {
5897
5897
  createFile: u(createFile),
@@ -5905,50 +5905,50 @@ var require_link = __commonJS({
5905
5905
  "node_modules/fs-extra/lib/ensure/link.js"(exports2, module2) {
5906
5906
  "use strict";
5907
5907
  var u = require_universalify().fromPromise;
5908
- var path22 = require("path");
5909
- var fs18 = require_fs();
5908
+ var path24 = require("path");
5909
+ var fs20 = require_fs();
5910
5910
  var mkdir = require_mkdirs();
5911
5911
  var { pathExists: pathExists3 } = require_path_exists();
5912
5912
  var { areIdentical } = require_stat();
5913
5913
  async function createLink(srcpath, dstpath) {
5914
5914
  let dstStat;
5915
5915
  try {
5916
- dstStat = await fs18.lstat(dstpath);
5916
+ dstStat = await fs20.lstat(dstpath);
5917
5917
  } catch {
5918
5918
  }
5919
5919
  let srcStat;
5920
5920
  try {
5921
- srcStat = await fs18.lstat(srcpath);
5921
+ srcStat = await fs20.lstat(srcpath);
5922
5922
  } catch (err) {
5923
5923
  err.message = err.message.replace("lstat", "ensureLink");
5924
5924
  throw err;
5925
5925
  }
5926
5926
  if (dstStat && areIdentical(srcStat, dstStat)) return;
5927
- const dir = path22.dirname(dstpath);
5927
+ const dir = path24.dirname(dstpath);
5928
5928
  const dirExists = await pathExists3(dir);
5929
5929
  if (!dirExists) {
5930
5930
  await mkdir.mkdirs(dir);
5931
5931
  }
5932
- await fs18.link(srcpath, dstpath);
5932
+ await fs20.link(srcpath, dstpath);
5933
5933
  }
5934
5934
  function createLinkSync(srcpath, dstpath) {
5935
5935
  let dstStat;
5936
5936
  try {
5937
- dstStat = fs18.lstatSync(dstpath);
5937
+ dstStat = fs20.lstatSync(dstpath);
5938
5938
  } catch {
5939
5939
  }
5940
5940
  try {
5941
- const srcStat = fs18.lstatSync(srcpath);
5941
+ const srcStat = fs20.lstatSync(srcpath);
5942
5942
  if (dstStat && areIdentical(srcStat, dstStat)) return;
5943
5943
  } catch (err) {
5944
5944
  err.message = err.message.replace("lstat", "ensureLink");
5945
5945
  throw err;
5946
5946
  }
5947
- const dir = path22.dirname(dstpath);
5948
- const dirExists = fs18.existsSync(dir);
5949
- if (dirExists) return fs18.linkSync(srcpath, dstpath);
5947
+ const dir = path24.dirname(dstpath);
5948
+ const dirExists = fs20.existsSync(dir);
5949
+ if (dirExists) return fs20.linkSync(srcpath, dstpath);
5950
5950
  mkdir.mkdirsSync(dir);
5951
- return fs18.linkSync(srcpath, dstpath);
5951
+ return fs20.linkSync(srcpath, dstpath);
5952
5952
  }
5953
5953
  module2.exports = {
5954
5954
  createLink: u(createLink),
@@ -5961,14 +5961,14 @@ var require_link = __commonJS({
5961
5961
  var require_symlink_paths = __commonJS({
5962
5962
  "node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
5963
5963
  "use strict";
5964
- var path22 = require("path");
5965
- var fs18 = require_fs();
5964
+ var path24 = require("path");
5965
+ var fs20 = require_fs();
5966
5966
  var { pathExists: pathExists3 } = require_path_exists();
5967
5967
  var u = require_universalify().fromPromise;
5968
5968
  async function symlinkPaths(srcpath, dstpath) {
5969
- if (path22.isAbsolute(srcpath)) {
5969
+ if (path24.isAbsolute(srcpath)) {
5970
5970
  try {
5971
- await fs18.lstat(srcpath);
5971
+ await fs20.lstat(srcpath);
5972
5972
  } catch (err) {
5973
5973
  err.message = err.message.replace("lstat", "ensureSymlink");
5974
5974
  throw err;
@@ -5978,8 +5978,8 @@ var require_symlink_paths = __commonJS({
5978
5978
  toDst: srcpath
5979
5979
  };
5980
5980
  }
5981
- const dstdir = path22.dirname(dstpath);
5982
- const relativeToDst = path22.join(dstdir, srcpath);
5981
+ const dstdir = path24.dirname(dstpath);
5982
+ const relativeToDst = path24.join(dstdir, srcpath);
5983
5983
  const exists = await pathExists3(relativeToDst);
5984
5984
  if (exists) {
5985
5985
  return {
@@ -5988,39 +5988,39 @@ var require_symlink_paths = __commonJS({
5988
5988
  };
5989
5989
  }
5990
5990
  try {
5991
- await fs18.lstat(srcpath);
5991
+ await fs20.lstat(srcpath);
5992
5992
  } catch (err) {
5993
5993
  err.message = err.message.replace("lstat", "ensureSymlink");
5994
5994
  throw err;
5995
5995
  }
5996
5996
  return {
5997
5997
  toCwd: srcpath,
5998
- toDst: path22.relative(dstdir, srcpath)
5998
+ toDst: path24.relative(dstdir, srcpath)
5999
5999
  };
6000
6000
  }
6001
6001
  function symlinkPathsSync(srcpath, dstpath) {
6002
- if (path22.isAbsolute(srcpath)) {
6003
- const exists2 = fs18.existsSync(srcpath);
6002
+ if (path24.isAbsolute(srcpath)) {
6003
+ const exists2 = fs20.existsSync(srcpath);
6004
6004
  if (!exists2) throw new Error("absolute srcpath does not exist");
6005
6005
  return {
6006
6006
  toCwd: srcpath,
6007
6007
  toDst: srcpath
6008
6008
  };
6009
6009
  }
6010
- const dstdir = path22.dirname(dstpath);
6011
- const relativeToDst = path22.join(dstdir, srcpath);
6012
- const exists = fs18.existsSync(relativeToDst);
6010
+ const dstdir = path24.dirname(dstpath);
6011
+ const relativeToDst = path24.join(dstdir, srcpath);
6012
+ const exists = fs20.existsSync(relativeToDst);
6013
6013
  if (exists) {
6014
6014
  return {
6015
6015
  toCwd: relativeToDst,
6016
6016
  toDst: srcpath
6017
6017
  };
6018
6018
  }
6019
- const srcExists = fs18.existsSync(srcpath);
6019
+ const srcExists = fs20.existsSync(srcpath);
6020
6020
  if (!srcExists) throw new Error("relative srcpath does not exist");
6021
6021
  return {
6022
6022
  toCwd: srcpath,
6023
- toDst: path22.relative(dstdir, srcpath)
6023
+ toDst: path24.relative(dstdir, srcpath)
6024
6024
  };
6025
6025
  }
6026
6026
  module2.exports = {
@@ -6034,13 +6034,13 @@ var require_symlink_paths = __commonJS({
6034
6034
  var require_symlink_type = __commonJS({
6035
6035
  "node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
6036
6036
  "use strict";
6037
- var fs18 = require_fs();
6037
+ var fs20 = require_fs();
6038
6038
  var u = require_universalify().fromPromise;
6039
6039
  async function symlinkType(srcpath, type) {
6040
6040
  if (type) return type;
6041
6041
  let stats;
6042
6042
  try {
6043
- stats = await fs18.lstat(srcpath);
6043
+ stats = await fs20.lstat(srcpath);
6044
6044
  } catch {
6045
6045
  return "file";
6046
6046
  }
@@ -6050,7 +6050,7 @@ var require_symlink_type = __commonJS({
6050
6050
  if (type) return type;
6051
6051
  let stats;
6052
6052
  try {
6053
- stats = fs18.lstatSync(srcpath);
6053
+ stats = fs20.lstatSync(srcpath);
6054
6054
  } catch {
6055
6055
  return "file";
6056
6056
  }
@@ -6068,8 +6068,8 @@ var require_symlink = __commonJS({
6068
6068
  "node_modules/fs-extra/lib/ensure/symlink.js"(exports2, module2) {
6069
6069
  "use strict";
6070
6070
  var u = require_universalify().fromPromise;
6071
- var path22 = require("path");
6072
- var fs18 = require_fs();
6071
+ var path24 = require("path");
6072
+ var fs20 = require_fs();
6073
6073
  var { mkdirs, mkdirsSync } = require_mkdirs();
6074
6074
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
6075
6075
  var { symlinkType, symlinkTypeSync } = require_symlink_type();
@@ -6078,44 +6078,44 @@ var require_symlink = __commonJS({
6078
6078
  async function createSymlink(srcpath, dstpath, type) {
6079
6079
  let stats;
6080
6080
  try {
6081
- stats = await fs18.lstat(dstpath);
6081
+ stats = await fs20.lstat(dstpath);
6082
6082
  } catch {
6083
6083
  }
6084
6084
  if (stats && stats.isSymbolicLink()) {
6085
6085
  const [srcStat, dstStat] = await Promise.all([
6086
- fs18.stat(srcpath),
6087
- fs18.stat(dstpath)
6086
+ fs20.stat(srcpath),
6087
+ fs20.stat(dstpath)
6088
6088
  ]);
6089
6089
  if (areIdentical(srcStat, dstStat)) return;
6090
6090
  }
6091
6091
  const relative = await symlinkPaths(srcpath, dstpath);
6092
6092
  srcpath = relative.toDst;
6093
6093
  const toType = await symlinkType(relative.toCwd, type);
6094
- const dir = path22.dirname(dstpath);
6094
+ const dir = path24.dirname(dstpath);
6095
6095
  if (!await pathExists3(dir)) {
6096
6096
  await mkdirs(dir);
6097
6097
  }
6098
- return fs18.symlink(srcpath, dstpath, toType);
6098
+ return fs20.symlink(srcpath, dstpath, toType);
6099
6099
  }
6100
6100
  function createSymlinkSync(srcpath, dstpath, type) {
6101
6101
  let stats;
6102
6102
  try {
6103
- stats = fs18.lstatSync(dstpath);
6103
+ stats = fs20.lstatSync(dstpath);
6104
6104
  } catch {
6105
6105
  }
6106
6106
  if (stats && stats.isSymbolicLink()) {
6107
- const srcStat = fs18.statSync(srcpath);
6108
- const dstStat = fs18.statSync(dstpath);
6107
+ const srcStat = fs20.statSync(srcpath);
6108
+ const dstStat = fs20.statSync(dstpath);
6109
6109
  if (areIdentical(srcStat, dstStat)) return;
6110
6110
  }
6111
6111
  const relative = symlinkPathsSync(srcpath, dstpath);
6112
6112
  srcpath = relative.toDst;
6113
6113
  type = symlinkTypeSync(relative.toCwd, type);
6114
- const dir = path22.dirname(dstpath);
6115
- const exists = fs18.existsSync(dir);
6116
- if (exists) return fs18.symlinkSync(srcpath, dstpath, type);
6114
+ const dir = path24.dirname(dstpath);
6115
+ const exists = fs20.existsSync(dir);
6116
+ if (exists) return fs20.symlinkSync(srcpath, dstpath, type);
6117
6117
  mkdirsSync(dir);
6118
- return fs18.symlinkSync(srcpath, dstpath, type);
6118
+ return fs20.symlinkSync(srcpath, dstpath, type);
6119
6119
  }
6120
6120
  module2.exports = {
6121
6121
  createSymlink: u(createSymlink),
@@ -6182,9 +6182,9 @@ var require_jsonfile = __commonJS({
6182
6182
  if (typeof options === "string") {
6183
6183
  options = { encoding: options };
6184
6184
  }
6185
- const fs18 = options.fs || _fs;
6185
+ const fs20 = options.fs || _fs;
6186
6186
  const shouldThrow = "throws" in options ? options.throws : true;
6187
- let data = await universalify.fromCallback(fs18.readFile)(file, options);
6187
+ let data = await universalify.fromCallback(fs20.readFile)(file, options);
6188
6188
  data = stripBom(data);
6189
6189
  let obj;
6190
6190
  try {
@@ -6204,10 +6204,10 @@ var require_jsonfile = __commonJS({
6204
6204
  if (typeof options === "string") {
6205
6205
  options = { encoding: options };
6206
6206
  }
6207
- const fs18 = options.fs || _fs;
6207
+ const fs20 = options.fs || _fs;
6208
6208
  const shouldThrow = "throws" in options ? options.throws : true;
6209
6209
  try {
6210
- let content = fs18.readFileSync(file, options);
6210
+ let content = fs20.readFileSync(file, options);
6211
6211
  content = stripBom(content);
6212
6212
  return JSON.parse(content, options.reviver);
6213
6213
  } catch (err) {
@@ -6220,15 +6220,15 @@ var require_jsonfile = __commonJS({
6220
6220
  }
6221
6221
  }
6222
6222
  async function _writeFile(file, obj, options = {}) {
6223
- const fs18 = options.fs || _fs;
6223
+ const fs20 = options.fs || _fs;
6224
6224
  const str = stringify(obj, options);
6225
- await universalify.fromCallback(fs18.writeFile)(file, str, options);
6225
+ await universalify.fromCallback(fs20.writeFile)(file, str, options);
6226
6226
  }
6227
6227
  var writeFile = universalify.fromPromise(_writeFile);
6228
6228
  function writeFileSync2(file, obj, options = {}) {
6229
- const fs18 = options.fs || _fs;
6229
+ const fs20 = options.fs || _fs;
6230
6230
  const str = stringify(obj, options);
6231
- return fs18.writeFileSync(file, str, options);
6231
+ return fs20.writeFileSync(file, str, options);
6232
6232
  }
6233
6233
  module2.exports = {
6234
6234
  readFile,
@@ -6259,23 +6259,23 @@ var require_output_file = __commonJS({
6259
6259
  "node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
6260
6260
  "use strict";
6261
6261
  var u = require_universalify().fromPromise;
6262
- var fs18 = require_fs();
6263
- var path22 = require("path");
6262
+ var fs20 = require_fs();
6263
+ var path24 = require("path");
6264
6264
  var mkdir = require_mkdirs();
6265
6265
  var pathExists3 = require_path_exists().pathExists;
6266
6266
  async function outputFile(file, data, encoding = "utf-8") {
6267
- const dir = path22.dirname(file);
6267
+ const dir = path24.dirname(file);
6268
6268
  if (!await pathExists3(dir)) {
6269
6269
  await mkdir.mkdirs(dir);
6270
6270
  }
6271
- return fs18.writeFile(file, data, encoding);
6271
+ return fs20.writeFile(file, data, encoding);
6272
6272
  }
6273
6273
  function outputFileSync(file, ...args) {
6274
- const dir = path22.dirname(file);
6275
- if (!fs18.existsSync(dir)) {
6274
+ const dir = path24.dirname(file);
6275
+ if (!fs20.existsSync(dir)) {
6276
6276
  mkdir.mkdirsSync(dir);
6277
6277
  }
6278
- fs18.writeFileSync(file, ...args);
6278
+ fs20.writeFileSync(file, ...args);
6279
6279
  }
6280
6280
  module2.exports = {
6281
6281
  outputFile: u(outputFile),
@@ -6334,8 +6334,8 @@ var require_json = __commonJS({
6334
6334
  var require_move = __commonJS({
6335
6335
  "node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
6336
6336
  "use strict";
6337
- var fs18 = require_fs();
6338
- var path22 = require("path");
6337
+ var fs20 = require_fs();
6338
+ var path24 = require("path");
6339
6339
  var { copy } = require_copy2();
6340
6340
  var { remove } = require_remove();
6341
6341
  var { mkdirp } = require_mkdirs();
@@ -6345,8 +6345,8 @@ var require_move = __commonJS({
6345
6345
  const overwrite = opts.overwrite || opts.clobber || false;
6346
6346
  const { srcStat, isChangingCase = false } = await stat3.checkPaths(src, dest, "move", opts);
6347
6347
  await stat3.checkParentPaths(src, srcStat, dest, "move");
6348
- const destParent = path22.dirname(dest);
6349
- const parsedParentPath = path22.parse(destParent);
6348
+ const destParent = path24.dirname(dest);
6349
+ const parsedParentPath = path24.parse(destParent);
6350
6350
  if (parsedParentPath.root !== destParent) {
6351
6351
  await mkdirp(destParent);
6352
6352
  }
@@ -6361,7 +6361,7 @@ var require_move = __commonJS({
6361
6361
  }
6362
6362
  }
6363
6363
  try {
6364
- await fs18.rename(src, dest);
6364
+ await fs20.rename(src, dest);
6365
6365
  } catch (err) {
6366
6366
  if (err.code !== "EXDEV") {
6367
6367
  throw err;
@@ -6386,8 +6386,8 @@ var require_move = __commonJS({
6386
6386
  var require_move_sync = __commonJS({
6387
6387
  "node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
6388
6388
  "use strict";
6389
- var fs18 = require_graceful_fs();
6390
- var path22 = require("path");
6389
+ var fs20 = require_graceful_fs();
6390
+ var path24 = require("path");
6391
6391
  var copySync = require_copy2().copySync;
6392
6392
  var removeSync = require_remove().removeSync;
6393
6393
  var mkdirpSync = require_mkdirs().mkdirpSync;
@@ -6397,12 +6397,12 @@ var require_move_sync = __commonJS({
6397
6397
  const overwrite = opts.overwrite || opts.clobber || false;
6398
6398
  const { srcStat, isChangingCase = false } = stat3.checkPathsSync(src, dest, "move", opts);
6399
6399
  stat3.checkParentPathsSync(src, srcStat, dest, "move");
6400
- if (!isParentRoot(dest)) mkdirpSync(path22.dirname(dest));
6400
+ if (!isParentRoot(dest)) mkdirpSync(path24.dirname(dest));
6401
6401
  return doRename(src, dest, overwrite, isChangingCase);
6402
6402
  }
6403
6403
  function isParentRoot(dest) {
6404
- const parent = path22.dirname(dest);
6405
- const parsedPath = path22.parse(parent);
6404
+ const parent = path24.dirname(dest);
6405
+ const parsedPath = path24.parse(parent);
6406
6406
  return parsedPath.root === parent;
6407
6407
  }
6408
6408
  function doRename(src, dest, overwrite, isChangingCase) {
@@ -6411,12 +6411,12 @@ var require_move_sync = __commonJS({
6411
6411
  removeSync(dest);
6412
6412
  return rename(src, dest, overwrite);
6413
6413
  }
6414
- if (fs18.existsSync(dest)) throw new Error("dest already exists.");
6414
+ if (fs20.existsSync(dest)) throw new Error("dest already exists.");
6415
6415
  return rename(src, dest, overwrite);
6416
6416
  }
6417
6417
  function rename(src, dest, overwrite) {
6418
6418
  try {
6419
- fs18.renameSync(src, dest);
6419
+ fs20.renameSync(src, dest);
6420
6420
  } catch (err) {
6421
6421
  if (err.code !== "EXDEV") throw err;
6422
6422
  return moveAcrossDevice(src, dest, overwrite);
@@ -18202,19 +18202,19 @@ var require_is_unicode_supported = __commonJS({
18202
18202
  var require_log_symbols = __commonJS({
18203
18203
  "node_modules/log-symbols/index.js"(exports2, module2) {
18204
18204
  "use strict";
18205
- var chalk26 = require_source();
18205
+ var chalk27 = require_source();
18206
18206
  var isUnicodeSupported2 = require_is_unicode_supported();
18207
18207
  var main = {
18208
- info: chalk26.blue("\u2139"),
18209
- success: chalk26.green("\u2714"),
18210
- warning: chalk26.yellow("\u26A0"),
18211
- error: chalk26.red("\u2716")
18208
+ info: chalk27.blue("\u2139"),
18209
+ success: chalk27.green("\u2714"),
18210
+ warning: chalk27.yellow("\u26A0"),
18211
+ error: chalk27.red("\u2716")
18212
18212
  };
18213
18213
  var fallback = {
18214
- info: chalk26.blue("i"),
18215
- success: chalk26.green("\u221A"),
18216
- warning: chalk26.yellow("\u203C"),
18217
- error: chalk26.red("\xD7")
18214
+ info: chalk27.blue("i"),
18215
+ success: chalk27.green("\u221A"),
18216
+ warning: chalk27.yellow("\u203C"),
18217
+ error: chalk27.red("\xD7")
18218
18218
  };
18219
18219
  module2.exports = isUnicodeSupported2() ? main : fallback;
18220
18220
  }
@@ -21682,7 +21682,7 @@ var require_ora = __commonJS({
21682
21682
  "node_modules/ora/index.js"(exports2, module2) {
21683
21683
  "use strict";
21684
21684
  var readline2 = require("readline");
21685
- var chalk26 = require_source();
21685
+ var chalk27 = require_source();
21686
21686
  var cliCursor = require_cli_cursor();
21687
21687
  var cliSpinners = require_cli_spinners();
21688
21688
  var logSymbols = require_log_symbols();
@@ -21879,7 +21879,7 @@ var require_ora = __commonJS({
21879
21879
  const { frames } = this.spinner;
21880
21880
  let frame = frames[this.frameIndex];
21881
21881
  if (this.color) {
21882
- frame = chalk26[this.color](frame);
21882
+ frame = chalk27[this.color](frame);
21883
21883
  }
21884
21884
  this.frameIndex = ++this.frameIndex % frames.length;
21885
21885
  const fullPrefixText = typeof this.prefixText === "string" && this.prefixText !== "" ? this.prefixText + " " : "";
@@ -27580,10 +27580,10 @@ var require_lib2 = __commonJS({
27580
27580
  exports2.analyse = analyse;
27581
27581
  var detectFile = (filepath, opts = {}) => new Promise((resolve, reject) => {
27582
27582
  let fd;
27583
- const fs18 = (0, node_1.default)();
27583
+ const fs20 = (0, node_1.default)();
27584
27584
  const handler = (err, buffer) => {
27585
27585
  if (fd) {
27586
- fs18.closeSync(fd);
27586
+ fs20.closeSync(fd);
27587
27587
  }
27588
27588
  if (err) {
27589
27589
  reject(err);
@@ -27595,9 +27595,9 @@ var require_lib2 = __commonJS({
27595
27595
  };
27596
27596
  const sampleSize = (opts === null || opts === void 0 ? void 0 : opts.sampleSize) || 0;
27597
27597
  if (sampleSize > 0) {
27598
- fd = fs18.openSync(filepath, "r");
27598
+ fd = fs20.openSync(filepath, "r");
27599
27599
  let sample = Buffer.allocUnsafe(sampleSize);
27600
- fs18.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
27600
+ fs20.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
27601
27601
  if (err) {
27602
27602
  handler(err, null);
27603
27603
  } else {
@@ -27609,22 +27609,22 @@ var require_lib2 = __commonJS({
27609
27609
  });
27610
27610
  return;
27611
27611
  }
27612
- fs18.readFile(filepath, handler);
27612
+ fs20.readFile(filepath, handler);
27613
27613
  });
27614
27614
  exports2.detectFile = detectFile;
27615
27615
  var detectFileSync = (filepath, opts = {}) => {
27616
- const fs18 = (0, node_1.default)();
27616
+ const fs20 = (0, node_1.default)();
27617
27617
  if (opts && opts.sampleSize) {
27618
- const fd = fs18.openSync(filepath, "r");
27618
+ const fd = fs20.openSync(filepath, "r");
27619
27619
  let sample = Buffer.allocUnsafe(opts.sampleSize);
27620
- const bytesRead = fs18.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
27620
+ const bytesRead = fs20.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
27621
27621
  if (bytesRead < opts.sampleSize) {
27622
27622
  sample = sample.subarray(0, bytesRead);
27623
27623
  }
27624
- fs18.closeSync(fd);
27624
+ fs20.closeSync(fd);
27625
27625
  return (0, exports2.detect)(sample);
27626
27626
  }
27627
- return (0, exports2.detect)(fs18.readFileSync(filepath));
27627
+ return (0, exports2.detect)(fs20.readFileSync(filepath));
27628
27628
  };
27629
27629
  exports2.detectFileSync = detectFileSync;
27630
27630
  exports2.default = {
@@ -40388,11 +40388,11 @@ var require_mime_types = __commonJS({
40388
40388
  }
40389
40389
  return exts[0];
40390
40390
  }
40391
- function lookup(path22) {
40392
- if (!path22 || typeof path22 !== "string") {
40391
+ function lookup(path24) {
40392
+ if (!path24 || typeof path24 !== "string") {
40393
40393
  return false;
40394
40394
  }
40395
- var extension2 = extname3("x." + path22).toLowerCase().substr(1);
40395
+ var extension2 = extname3("x." + path24).toLowerCase().substr(1);
40396
40396
  if (!extension2) {
40397
40397
  return false;
40398
40398
  }
@@ -41497,11 +41497,11 @@ var require_form_data = __commonJS({
41497
41497
  "use strict";
41498
41498
  var CombinedStream = require_combined_stream();
41499
41499
  var util3 = require("util");
41500
- var path22 = require("path");
41500
+ var path24 = require("path");
41501
41501
  var http4 = require("http");
41502
41502
  var https2 = require("https");
41503
41503
  var parseUrl = require("url").parse;
41504
- var fs18 = require("fs");
41504
+ var fs20 = require("fs");
41505
41505
  var Stream2 = require("stream").Stream;
41506
41506
  var crypto4 = require("crypto");
41507
41507
  var mime = require_mime_types();
@@ -41568,7 +41568,7 @@ var require_form_data = __commonJS({
41568
41568
  if (value2.end != void 0 && value2.end != Infinity && value2.start != void 0) {
41569
41569
  callback(null, value2.end + 1 - (value2.start ? value2.start : 0));
41570
41570
  } else {
41571
- fs18.stat(value2.path, function(err, stat3) {
41571
+ fs20.stat(value2.path, function(err, stat3) {
41572
41572
  if (err) {
41573
41573
  callback(err);
41574
41574
  return;
@@ -41625,11 +41625,11 @@ var require_form_data = __commonJS({
41625
41625
  FormData5.prototype._getContentDisposition = function(value2, options) {
41626
41626
  var filename;
41627
41627
  if (typeof options.filepath === "string") {
41628
- filename = path22.normalize(options.filepath).replace(/\\/g, "/");
41628
+ filename = path24.normalize(options.filepath).replace(/\\/g, "/");
41629
41629
  } else if (options.filename || value2 && (value2.name || value2.path)) {
41630
- filename = path22.basename(options.filename || value2 && (value2.name || value2.path));
41630
+ filename = path24.basename(options.filename || value2 && (value2.name || value2.path));
41631
41631
  } else if (value2 && value2.readable && hasOwn(value2, "httpVersion")) {
41632
- filename = path22.basename(value2.client._httpMessage.path || "");
41632
+ filename = path24.basename(value2.client._httpMessage.path || "");
41633
41633
  }
41634
41634
  if (filename) {
41635
41635
  return 'filename="' + filename + '"';
@@ -43115,9 +43115,9 @@ var require_package = __commonJS({
43115
43115
  // node_modules/dotenv/lib/main.js
43116
43116
  var require_main = __commonJS({
43117
43117
  "node_modules/dotenv/lib/main.js"(exports2, module2) {
43118
- var fs18 = require("fs");
43119
- var path22 = require("path");
43120
- var os5 = require("os");
43118
+ var fs20 = require("fs");
43119
+ var path24 = require("path");
43120
+ var os7 = require("os");
43121
43121
  var crypto4 = require("crypto");
43122
43122
  var packageJson = require_package();
43123
43123
  var version = packageJson.version;
@@ -43224,7 +43224,7 @@ var require_main = __commonJS({
43224
43224
  if (options && options.path && options.path.length > 0) {
43225
43225
  if (Array.isArray(options.path)) {
43226
43226
  for (const filepath of options.path) {
43227
- if (fs18.existsSync(filepath)) {
43227
+ if (fs20.existsSync(filepath)) {
43228
43228
  possibleVaultPath = filepath.endsWith(".vault") ? filepath : `${filepath}.vault`;
43229
43229
  }
43230
43230
  }
@@ -43232,15 +43232,15 @@ var require_main = __commonJS({
43232
43232
  possibleVaultPath = options.path.endsWith(".vault") ? options.path : `${options.path}.vault`;
43233
43233
  }
43234
43234
  } else {
43235
- possibleVaultPath = path22.resolve(process.cwd(), ".env.vault");
43235
+ possibleVaultPath = path24.resolve(process.cwd(), ".env.vault");
43236
43236
  }
43237
- if (fs18.existsSync(possibleVaultPath)) {
43237
+ if (fs20.existsSync(possibleVaultPath)) {
43238
43238
  return possibleVaultPath;
43239
43239
  }
43240
43240
  return null;
43241
43241
  }
43242
43242
  function _resolveHome(envPath) {
43243
- return envPath[0] === "~" ? path22.join(os5.homedir(), envPath.slice(1)) : envPath;
43243
+ return envPath[0] === "~" ? path24.join(os7.homedir(), envPath.slice(1)) : envPath;
43244
43244
  }
43245
43245
  function _configVault(options) {
43246
43246
  const debug = Boolean(options && options.debug);
@@ -43257,7 +43257,7 @@ var require_main = __commonJS({
43257
43257
  return { parsed };
43258
43258
  }
43259
43259
  function configDotenv(options) {
43260
- const dotenvPath = path22.resolve(process.cwd(), ".env");
43260
+ const dotenvPath = path24.resolve(process.cwd(), ".env");
43261
43261
  let encoding = "utf8";
43262
43262
  const debug = Boolean(options && options.debug);
43263
43263
  const quiet = options && "quiet" in options ? options.quiet : true;
@@ -43281,13 +43281,13 @@ var require_main = __commonJS({
43281
43281
  }
43282
43282
  let lastError;
43283
43283
  const parsedAll = {};
43284
- for (const path23 of optionPaths) {
43284
+ for (const path25 of optionPaths) {
43285
43285
  try {
43286
- const parsed = DotenvModule.parse(fs18.readFileSync(path23, { encoding }));
43286
+ const parsed = DotenvModule.parse(fs20.readFileSync(path25, { encoding }));
43287
43287
  DotenvModule.populate(parsedAll, parsed, options);
43288
43288
  } catch (e) {
43289
43289
  if (debug) {
43290
- _debug(`Failed to load ${path23} ${e.message}`);
43290
+ _debug(`Failed to load ${path25} ${e.message}`);
43291
43291
  }
43292
43292
  lastError = e;
43293
43293
  }
@@ -43302,7 +43302,7 @@ var require_main = __commonJS({
43302
43302
  const shortPaths = [];
43303
43303
  for (const filePath of optionPaths) {
43304
43304
  try {
43305
- const relative = path22.relative(process.cwd(), filePath);
43305
+ const relative = path24.relative(process.cwd(), filePath);
43306
43306
  shortPaths.push(relative);
43307
43307
  } catch (e) {
43308
43308
  if (debug) {
@@ -44287,11 +44287,11 @@ var require_file_writer = __commonJS({
44287
44287
  var FileWriter = (
44288
44288
  /** @class */
44289
44289
  (function() {
44290
- function FileWriter2(path22, append2, encoding) {
44290
+ function FileWriter2(path24, append2, encoding) {
44291
44291
  if (encoding === void 0) {
44292
44292
  encoding = DEFAULT_ENCODING;
44293
44293
  }
44294
- this.path = path22;
44294
+ this.path = path24;
44295
44295
  this.append = append2;
44296
44296
  this.encoding = encoding;
44297
44297
  }
@@ -44431,13 +44431,13 @@ var require_csv_writer = __commonJS({
44431
44431
  var CsvWriter = (
44432
44432
  /** @class */
44433
44433
  (function() {
44434
- function CsvWriter2(csvStringifier, path22, encoding, append2) {
44434
+ function CsvWriter2(csvStringifier, path24, encoding, append2) {
44435
44435
  if (append2 === void 0) {
44436
44436
  append2 = DEFAULT_INITIAL_APPEND_FLAG;
44437
44437
  }
44438
44438
  this.csvStringifier = csvStringifier;
44439
44439
  this.append = append2;
44440
- this.fileWriter = new file_writer_1.FileWriter(path22, this.append, encoding);
44440
+ this.fileWriter = new file_writer_1.FileWriter(path24, this.append, encoding);
44441
44441
  }
44442
44442
  CsvWriter2.prototype.writeRecords = function(records) {
44443
44443
  return __awaiter(this, void 0, void 0, function() {
@@ -50708,14 +50708,14 @@ var require_yn = __commonJS({
50708
50708
  var require_create_require = __commonJS({
50709
50709
  "node_modules/create-require/create-require.js"(exports2, module2) {
50710
50710
  var nativeModule = require("module");
50711
- var path22 = require("path");
50712
- var fs18 = require("fs");
50711
+ var path24 = require("path");
50712
+ var fs20 = require("fs");
50713
50713
  function createRequire(filename) {
50714
50714
  if (!filename) {
50715
50715
  filename = process.cwd();
50716
50716
  }
50717
50717
  if (isDir(filename)) {
50718
- filename = path22.join(filename, "index.js");
50718
+ filename = path24.join(filename, "index.js");
50719
50719
  }
50720
50720
  if (nativeModule.createRequire) {
50721
50721
  return nativeModule.createRequire(filename);
@@ -50728,13 +50728,13 @@ var require_create_require = __commonJS({
50728
50728
  function _createRequire(filename) {
50729
50729
  const mod = new nativeModule.Module(filename, null);
50730
50730
  mod.filename = filename;
50731
- mod.paths = nativeModule.Module._nodeModulePaths(path22.dirname(filename));
50731
+ mod.paths = nativeModule.Module._nodeModulePaths(path24.dirname(filename));
50732
50732
  mod._compile("module.exports = require;", filename);
50733
50733
  return mod.exports;
50734
50734
  }
50735
- function isDir(path23) {
50735
+ function isDir(path25) {
50736
50736
  try {
50737
- const stat3 = fs18.lstatSync(path23);
50737
+ const stat3 = fs20.lstatSync(path25);
50738
50738
  return stat3.isDirectory();
50739
50739
  } catch (e) {
50740
50740
  return false;
@@ -50750,17 +50750,17 @@ var require_v8_compile_cache = __commonJS({
50750
50750
  "use strict";
50751
50751
  var Module = require("module");
50752
50752
  var crypto4 = require("crypto");
50753
- var fs18 = require("fs");
50754
- var path22 = require("path");
50753
+ var fs20 = require("fs");
50754
+ var path24 = require("path");
50755
50755
  var vm = require("vm");
50756
- var os5 = require("os");
50756
+ var os7 = require("os");
50757
50757
  var hasOwnProperty2 = Object.prototype.hasOwnProperty;
50758
50758
  var FileSystemBlobStore = class {
50759
50759
  constructor(directory, prefix) {
50760
50760
  const name = prefix ? slashEscape(prefix + ".") : "";
50761
- this._blobFilename = path22.join(directory, name + "BLOB");
50762
- this._mapFilename = path22.join(directory, name + "MAP");
50763
- this._lockFilename = path22.join(directory, name + "LOCK");
50761
+ this._blobFilename = path24.join(directory, name + "BLOB");
50762
+ this._mapFilename = path24.join(directory, name + "MAP");
50763
+ this._lockFilename = path24.join(directory, name + "LOCK");
50764
50764
  this._directory = directory;
50765
50765
  this._load();
50766
50766
  }
@@ -50812,22 +50812,22 @@ var require_v8_compile_cache = __commonJS({
50812
50812
  const mapToStore = JSON.stringify(dump[1]);
50813
50813
  try {
50814
50814
  mkdirpSync(this._directory);
50815
- fs18.writeFileSync(this._lockFilename, "LOCK", { flag: "wx" });
50815
+ fs20.writeFileSync(this._lockFilename, "LOCK", { flag: "wx" });
50816
50816
  } catch (error) {
50817
50817
  return false;
50818
50818
  }
50819
50819
  try {
50820
- fs18.writeFileSync(this._blobFilename, blobToStore);
50821
- fs18.writeFileSync(this._mapFilename, mapToStore);
50820
+ fs20.writeFileSync(this._blobFilename, blobToStore);
50821
+ fs20.writeFileSync(this._mapFilename, mapToStore);
50822
50822
  } finally {
50823
- fs18.unlinkSync(this._lockFilename);
50823
+ fs20.unlinkSync(this._lockFilename);
50824
50824
  }
50825
50825
  return true;
50826
50826
  }
50827
50827
  _load() {
50828
50828
  try {
50829
- this._storedBlob = fs18.readFileSync(this._blobFilename);
50830
- this._storedMap = JSON.parse(fs18.readFileSync(this._mapFilename));
50829
+ this._storedBlob = fs20.readFileSync(this._blobFilename);
50830
+ this._storedMap = JSON.parse(fs20.readFileSync(this._mapFilename));
50831
50831
  } catch (e) {
50832
50832
  this._storedBlob = Buffer.alloc(0);
50833
50833
  this._storedMap = {};
@@ -50891,7 +50891,7 @@ var require_v8_compile_cache = __commonJS({
50891
50891
  require2.main = process.mainModule;
50892
50892
  require2.extensions = Module._extensions;
50893
50893
  require2.cache = Module._cache;
50894
- const dirname = path22.dirname(filename);
50894
+ const dirname = path24.dirname(filename);
50895
50895
  const compiledWrapper = self2._moduleCompile(filename, content);
50896
50896
  const args = [mod.exports, require2, mod, filename, dirname, process, global, Buffer];
50897
50897
  return compiledWrapper.apply(mod.exports, args);
@@ -50948,18 +50948,18 @@ var require_v8_compile_cache = __commonJS({
50948
50948
  }
50949
50949
  };
50950
50950
  function mkdirpSync(p_) {
50951
- _mkdirpSync(path22.resolve(p_), 511);
50951
+ _mkdirpSync(path24.resolve(p_), 511);
50952
50952
  }
50953
50953
  function _mkdirpSync(p, mode) {
50954
50954
  try {
50955
- fs18.mkdirSync(p, mode);
50955
+ fs20.mkdirSync(p, mode);
50956
50956
  } catch (err0) {
50957
50957
  if (err0.code === "ENOENT") {
50958
- _mkdirpSync(path22.dirname(p));
50958
+ _mkdirpSync(path24.dirname(p));
50959
50959
  _mkdirpSync(p);
50960
50960
  } else {
50961
50961
  try {
50962
- const stat3 = fs18.statSync(p);
50962
+ const stat3 = fs20.statSync(p);
50963
50963
  if (!stat3.isDirectory()) {
50964
50964
  throw err0;
50965
50965
  }
@@ -50991,7 +50991,7 @@ var require_v8_compile_cache = __commonJS({
50991
50991
  }
50992
50992
  const dirname = typeof process.getuid === "function" ? "v8-compile-cache-" + process.getuid() : "v8-compile-cache";
50993
50993
  const version = typeof process.versions.v8 === "string" ? process.versions.v8 : typeof process.versions.chakracore === "string" ? "chakracore-" + process.versions.chakracore : "node-" + process.version;
50994
- const cacheDir = path22.join(os5.tmpdir(), dirname, version);
50994
+ const cacheDir = path24.join(os7.tmpdir(), dirname, version);
50995
50995
  return cacheDir;
50996
50996
  }
50997
50997
  function getMainName() {
@@ -51199,11 +51199,11 @@ var require_ts_internals = __commonJS({
51199
51199
  }
51200
51200
  return { getExtendsConfigPath };
51201
51201
  }
51202
- function isRootedDiskPath(path22) {
51203
- return (0, path_1.isAbsolute)(path22);
51202
+ function isRootedDiskPath(path24) {
51203
+ return (0, path_1.isAbsolute)(path24);
51204
51204
  }
51205
- function combinePaths(path22, ...paths) {
51206
- return (0, util_1.normalizeSlashes)((0, path_1.resolve)(path22, ...paths.filter((path23) => path23)));
51205
+ function combinePaths(path24, ...paths) {
51206
+ return (0, util_1.normalizeSlashes)((0, path_1.resolve)(path24, ...paths.filter((path25) => path25)));
51207
51207
  }
51208
51208
  function getNormalizedAbsolutePath(fileName, currentDirectory) {
51209
51209
  return (0, util_1.normalizeSlashes)(currentDirectory != null ? (0, path_1.resolve)(currentDirectory, fileName) : (0, path_1.resolve)(fileName));
@@ -51253,12 +51253,12 @@ var require_ts_internals = __commonJS({
51253
51253
  doubleAsteriskRegexFragment: "(/.+?)?",
51254
51254
  replaceWildcardCharacter: (match2) => replaceWildcardCharacter(match2, excludeMatcher.singleAsteriskRegexFragment)
51255
51255
  };
51256
- function getNormalizedPathComponents(path22, currentDirectory) {
51257
- return reducePathComponents(getPathComponents(path22, currentDirectory));
51256
+ function getNormalizedPathComponents(path24, currentDirectory) {
51257
+ return reducePathComponents(getPathComponents(path24, currentDirectory));
51258
51258
  }
51259
- function getPathComponents(path22, currentDirectory = "") {
51260
- path22 = combinePaths(currentDirectory, path22);
51261
- return pathComponents(path22, getRootLength(path22));
51259
+ function getPathComponents(path24, currentDirectory = "") {
51260
+ path24 = combinePaths(currentDirectory, path24);
51261
+ return pathComponents(path24, getRootLength(path24));
51262
51262
  }
51263
51263
  function reducePathComponents(components) {
51264
51264
  if (!some(components))
@@ -51283,64 +51283,64 @@ var require_ts_internals = __commonJS({
51283
51283
  }
51284
51284
  return reduced;
51285
51285
  }
51286
- function getRootLength(path22) {
51287
- const rootLength = getEncodedRootLength(path22);
51286
+ function getRootLength(path24) {
51287
+ const rootLength = getEncodedRootLength(path24);
51288
51288
  return rootLength < 0 ? ~rootLength : rootLength;
51289
51289
  }
51290
- function getEncodedRootLength(path22) {
51291
- if (!path22)
51290
+ function getEncodedRootLength(path24) {
51291
+ if (!path24)
51292
51292
  return 0;
51293
- const ch0 = path22.charCodeAt(0);
51293
+ const ch0 = path24.charCodeAt(0);
51294
51294
  if (ch0 === 47 || ch0 === 92) {
51295
- if (path22.charCodeAt(1) !== ch0)
51295
+ if (path24.charCodeAt(1) !== ch0)
51296
51296
  return 1;
51297
- const p1 = path22.indexOf(ch0 === 47 ? directorySeparator : altDirectorySeparator, 2);
51297
+ const p1 = path24.indexOf(ch0 === 47 ? directorySeparator : altDirectorySeparator, 2);
51298
51298
  if (p1 < 0)
51299
- return path22.length;
51299
+ return path24.length;
51300
51300
  return p1 + 1;
51301
51301
  }
51302
- if (isVolumeCharacter(ch0) && path22.charCodeAt(1) === 58) {
51303
- const ch2 = path22.charCodeAt(2);
51302
+ if (isVolumeCharacter(ch0) && path24.charCodeAt(1) === 58) {
51303
+ const ch2 = path24.charCodeAt(2);
51304
51304
  if (ch2 === 47 || ch2 === 92)
51305
51305
  return 3;
51306
- if (path22.length === 2)
51306
+ if (path24.length === 2)
51307
51307
  return 2;
51308
51308
  }
51309
- const schemeEnd = path22.indexOf(urlSchemeSeparator);
51309
+ const schemeEnd = path24.indexOf(urlSchemeSeparator);
51310
51310
  if (schemeEnd !== -1) {
51311
51311
  const authorityStart = schemeEnd + urlSchemeSeparator.length;
51312
- const authorityEnd = path22.indexOf(directorySeparator, authorityStart);
51312
+ const authorityEnd = path24.indexOf(directorySeparator, authorityStart);
51313
51313
  if (authorityEnd !== -1) {
51314
- const scheme = path22.slice(0, schemeEnd);
51315
- const authority = path22.slice(authorityStart, authorityEnd);
51316
- if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path22.charCodeAt(authorityEnd + 1))) {
51317
- const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path22, authorityEnd + 2);
51314
+ const scheme = path24.slice(0, schemeEnd);
51315
+ const authority = path24.slice(authorityStart, authorityEnd);
51316
+ if (scheme === "file" && (authority === "" || authority === "localhost") && isVolumeCharacter(path24.charCodeAt(authorityEnd + 1))) {
51317
+ const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path24, authorityEnd + 2);
51318
51318
  if (volumeSeparatorEnd !== -1) {
51319
- if (path22.charCodeAt(volumeSeparatorEnd) === 47) {
51319
+ if (path24.charCodeAt(volumeSeparatorEnd) === 47) {
51320
51320
  return ~(volumeSeparatorEnd + 1);
51321
51321
  }
51322
- if (volumeSeparatorEnd === path22.length) {
51322
+ if (volumeSeparatorEnd === path24.length) {
51323
51323
  return ~volumeSeparatorEnd;
51324
51324
  }
51325
51325
  }
51326
51326
  }
51327
51327
  return ~(authorityEnd + 1);
51328
51328
  }
51329
- return ~path22.length;
51329
+ return ~path24.length;
51330
51330
  }
51331
51331
  return 0;
51332
51332
  }
51333
- function hasTrailingDirectorySeparator(path22) {
51334
- return path22.length > 0 && isAnyDirectorySeparator(path22.charCodeAt(path22.length - 1));
51333
+ function hasTrailingDirectorySeparator(path24) {
51334
+ return path24.length > 0 && isAnyDirectorySeparator(path24.charCodeAt(path24.length - 1));
51335
51335
  }
51336
51336
  function isAnyDirectorySeparator(charCode) {
51337
51337
  return charCode === 47 || charCode === 92;
51338
51338
  }
51339
- function removeTrailingDirectorySeparator(path22) {
51340
- if (hasTrailingDirectorySeparator(path22)) {
51341
- return path22.substr(0, path22.length - 1);
51339
+ function removeTrailingDirectorySeparator(path24) {
51340
+ if (hasTrailingDirectorySeparator(path24)) {
51341
+ return path24.substr(0, path24.length - 1);
51342
51342
  }
51343
- return path22;
51343
+ return path24;
51344
51344
  }
51345
51345
  var directorySeparator = "/";
51346
51346
  var altDirectorySeparator = "\\";
@@ -51373,9 +51373,9 @@ var require_ts_internals = __commonJS({
51373
51373
  }
51374
51374
  return false;
51375
51375
  }
51376
- function pathComponents(path22, rootLength) {
51377
- const root = path22.substring(0, rootLength);
51378
- const rest = path22.substring(rootLength).split(directorySeparator);
51376
+ function pathComponents(path24, rootLength) {
51377
+ const root = path24.substring(0, rootLength);
51378
+ const rest = path24.substring(rootLength).split(directorySeparator);
51379
51379
  if (rest.length && !lastOrUndefined(rest))
51380
51380
  rest.pop();
51381
51381
  return [root, ...rest];
@@ -51649,7 +51649,7 @@ var require_configuration = __commonJS({
51649
51649
  const options = filterRecognizedTsConfigTsNodeOptions(config2["ts-node"]).recognized;
51650
51650
  if (options.require) {
51651
51651
  const tsconfigRelativeResolver = (0, util_1.createProjectLocalResolveHelper)((0, path_1.dirname)(configPath));
51652
- options.require = options.require.map((path22) => tsconfigRelativeResolver(path22, false));
51652
+ options.require = options.require.map((path24) => tsconfigRelativeResolver(path24, false));
51653
51653
  }
51654
51654
  if (options.scopeDir) {
51655
51655
  options.scopeDir = (0, path_1.resolve)(basePath2, options.scopeDir);
@@ -51801,14 +51801,14 @@ var require_module_type_classifier = __commonJS({
51801
51801
  }
51802
51802
  };
51803
51803
  const auto = classifications.package;
51804
- function classifyModuleNonCached(path22) {
51805
- const matched = matchPatterns(patternTypePairs, (_2) => _2.pattern, path22);
51804
+ function classifyModuleNonCached(path24) {
51805
+ const matched = matchPatterns(patternTypePairs, (_2) => _2.pattern, path24);
51806
51806
  if (matched)
51807
51807
  return classifications[matched.type];
51808
51808
  return auto;
51809
51809
  }
51810
51810
  const classifyModule = (0, util_1.cachedLookup)(classifyModuleNonCached);
51811
- function classifyModuleAuto(path22) {
51811
+ function classifyModuleAuto(path24) {
51812
51812
  return auto;
51813
51813
  }
51814
51814
  return {
@@ -52028,12 +52028,12 @@ var require_node_nativemodule = __commonJS({
52028
52028
  // node_modules/ts-node/dist-raw/node-internalBinding-fs.js
52029
52029
  var require_node_internalBinding_fs = __commonJS({
52030
52030
  "node_modules/ts-node/dist-raw/node-internalBinding-fs.js"(exports2, module2) {
52031
- var fs18 = require("fs");
52031
+ var fs20 = require("fs");
52032
52032
  var { versionGteLt } = require_util2();
52033
- function internalModuleReadJSON(path22) {
52033
+ function internalModuleReadJSON(path24) {
52034
52034
  let string;
52035
52035
  try {
52036
- string = fs18.readFileSync(path22, "utf8");
52036
+ string = fs20.readFileSync(path24, "utf8");
52037
52037
  } catch (e) {
52038
52038
  if (e.code === "ENOENT") return [];
52039
52039
  throw e;
@@ -52041,15 +52041,15 @@ var require_node_internalBinding_fs = __commonJS({
52041
52041
  const containsKeys = true;
52042
52042
  return [string, containsKeys];
52043
52043
  }
52044
- function internalModuleStat(path22) {
52045
- const stat3 = fs18.statSync(path22, { throwIfNoEntry: false });
52044
+ function internalModuleStat(path24) {
52045
+ const stat3 = fs20.statSync(path24, { throwIfNoEntry: false });
52046
52046
  if (!stat3) return -1;
52047
52047
  if (stat3.isFile()) return 0;
52048
52048
  if (stat3.isDirectory()) return 1;
52049
52049
  }
52050
- function internalModuleStatInefficient(path22) {
52050
+ function internalModuleStatInefficient(path24) {
52051
52051
  try {
52052
- const stat3 = fs18.statSync(path22);
52052
+ const stat3 = fs20.statSync(path24);
52053
52053
  if (stat3.isFile()) return 0;
52054
52054
  if (stat3.isDirectory()) return 1;
52055
52055
  } catch (e) {
@@ -52357,7 +52357,7 @@ var require_node_internal_modules_cjs_helpers = __commonJS({
52357
52357
  var require_node_internal_errors = __commonJS({
52358
52358
  "node_modules/ts-node/dist-raw/node-internal-errors.js"(exports2) {
52359
52359
  "use strict";
52360
- var path22 = require("path");
52360
+ var path24 = require("path");
52361
52361
  exports2.codes = {
52362
52362
  ERR_INPUT_TYPE_NOT_ALLOWED: createErrorCtor(joinArgs("ERR_INPUT_TYPE_NOT_ALLOWED")),
52363
52363
  ERR_INVALID_ARG_VALUE: createErrorCtor(joinArgs("ERR_INVALID_ARG_VALUE")),
@@ -52365,8 +52365,8 @@ var require_node_internal_errors = __commonJS({
52365
52365
  ERR_INVALID_PACKAGE_CONFIG: createErrorCtor(joinArgs("ERR_INVALID_PACKAGE_CONFIG")),
52366
52366
  ERR_INVALID_PACKAGE_TARGET: createErrorCtor(joinArgs("ERR_INVALID_PACKAGE_TARGET")),
52367
52367
  ERR_MANIFEST_DEPENDENCY_MISSING: createErrorCtor(joinArgs("ERR_MANIFEST_DEPENDENCY_MISSING")),
52368
- ERR_MODULE_NOT_FOUND: createErrorCtor((path23, base, type = "package") => {
52369
- return `Cannot find ${type} '${path23}' imported from ${base}`;
52368
+ ERR_MODULE_NOT_FOUND: createErrorCtor((path25, base, type = "package") => {
52369
+ return `Cannot find ${type} '${path25}' imported from ${base}`;
52370
52370
  }),
52371
52371
  ERR_PACKAGE_IMPORT_NOT_DEFINED: createErrorCtor(joinArgs("ERR_PACKAGE_IMPORT_NOT_DEFINED")),
52372
52372
  ERR_PACKAGE_PATH_NOT_EXPORTED: createErrorCtor(joinArgs("ERR_PACKAGE_PATH_NOT_EXPORTED")),
@@ -52402,11 +52402,11 @@ var require_node_internal_errors = __commonJS({
52402
52402
  return err;
52403
52403
  }
52404
52404
  function getErrRequireEsmMessage(filename, parentPath = null, packageJsonPath = null) {
52405
- const ext2 = path22.extname(filename);
52405
+ const ext2 = path24.extname(filename);
52406
52406
  let msg = `Must use import to load ES Module: ${filename}`;
52407
52407
  if (parentPath && packageJsonPath) {
52408
- const path23 = require("path");
52409
- const basename3 = path23.basename(filename) === path23.basename(parentPath) ? filename : path23.basename(filename);
52408
+ const path25 = require("path");
52409
+ const basename3 = path25.basename(filename) === path25.basename(parentPath) ? filename : path25.basename(filename);
52410
52410
  msg += `
52411
52411
  require() of ES modules is not supported.
52412
52412
  require() of ${filename} ${parentPath ? `from ${parentPath} ` : ""}is an ES module file as it is a ${ext2} file whose nearest parent package.json contains "type": "module" which defines all ${ext2} files in that package scope as ES modules.
@@ -52453,9 +52453,9 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52453
52453
  } = require_node_primordials();
52454
52454
  var { NativeModule } = require_node_nativemodule();
52455
52455
  var { pathToFileURL, fileURLToPath: fileURLToPath3 } = require("url");
52456
- var fs18 = require("fs");
52457
- var path22 = require("path");
52458
- var { sep: sep2 } = path22;
52456
+ var fs20 = require("fs");
52457
+ var path24 = require("path");
52458
+ var { sep: sep2 } = path24;
52459
52459
  var { internalModuleStat } = require_node_internalBinding_fs();
52460
52460
  var packageJsonReader = require_node_internal_modules_package_json_reader();
52461
52461
  var {
@@ -52478,7 +52478,7 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52478
52478
  var isWindows = process.platform === "win32";
52479
52479
  var statCache = null;
52480
52480
  function stat3(filename) {
52481
- filename = path22.toNamespacedPath(filename);
52481
+ filename = path24.toNamespacedPath(filename);
52482
52482
  if (statCache !== null) {
52483
52483
  const result2 = statCache.get(filename);
52484
52484
  if (result2 !== void 0) return result2;
@@ -52492,7 +52492,7 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52492
52492
  var moduleParentCache = new SafeWeakMap();
52493
52493
  var packageJsonCache = new SafeMap();
52494
52494
  function readPackage(requestPath) {
52495
- const jsonPath = path22.resolve(requestPath, "package.json");
52495
+ const jsonPath = path24.resolve(requestPath, "package.json");
52496
52496
  const existing = packageJsonCache.get(jsonPath);
52497
52497
  if (existing !== void 0) return existing;
52498
52498
  const result = packageJsonReader.read(jsonPath);
@@ -52546,22 +52546,22 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52546
52546
  const tmp = readPackage(requestPath);
52547
52547
  const pkg = tmp != null ? tmp.main : void 0;
52548
52548
  if (!pkg) {
52549
- return tryExtensions(path22.resolve(requestPath, "index"), exts, isMain);
52549
+ return tryExtensions(path24.resolve(requestPath, "index"), exts, isMain);
52550
52550
  }
52551
- const filename = path22.resolve(requestPath, pkg);
52552
- let actual = tryReplacementExtensions(filename, isMain) || tryFile(filename, isMain) || tryExtensions(filename, exts, isMain) || tryExtensions(path22.resolve(filename, "index"), exts, isMain);
52551
+ const filename = path24.resolve(requestPath, pkg);
52552
+ let actual = tryReplacementExtensions(filename, isMain) || tryFile(filename, isMain) || tryExtensions(filename, exts, isMain) || tryExtensions(path24.resolve(filename, "index"), exts, isMain);
52553
52553
  if (actual === false) {
52554
- actual = tryExtensions(path22.resolve(requestPath, "index"), exts, isMain);
52554
+ actual = tryExtensions(path24.resolve(requestPath, "index"), exts, isMain);
52555
52555
  if (!actual) {
52556
52556
  const err = new Error(
52557
52557
  `Cannot find module '${filename}'. Please verify that the package.json has a valid "main" entry`
52558
52558
  );
52559
52559
  err.code = "MODULE_NOT_FOUND";
52560
- err.path = path22.resolve(requestPath, "package.json");
52560
+ err.path = path24.resolve(requestPath, "package.json");
52561
52561
  err.requestPath = originalPath;
52562
52562
  throw err;
52563
52563
  } else {
52564
- const jsonPath = path22.resolve(requestPath, "package.json");
52564
+ const jsonPath = path24.resolve(requestPath, "package.json");
52565
52565
  process.emitWarning(
52566
52566
  `Invalid 'main' field in '${jsonPath}' of '${pkg}'. Please either fix that or report it to the module author`,
52567
52567
  "DeprecationWarning",
@@ -52576,12 +52576,12 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52576
52576
  const rc = stat3(requestPath);
52577
52577
  if (rc !== 0) return;
52578
52578
  if (preserveSymlinks && !isMain) {
52579
- return path22.resolve(requestPath);
52579
+ return path24.resolve(requestPath);
52580
52580
  }
52581
52581
  return toRealPath(requestPath);
52582
52582
  }
52583
52583
  function toRealPath(requestPath) {
52584
- return fs18.realpathSync(requestPath, {
52584
+ return fs20.realpathSync(requestPath, {
52585
52585
  // [internalFS.realpathCacheKey]: realpathCache
52586
52586
  });
52587
52587
  }
@@ -52635,7 +52635,7 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52635
52635
  return parent.filename;
52636
52636
  } else if (parent.id === "<repl>" || parent.id === "internal/preload") {
52637
52637
  try {
52638
- return process.cwd() + path22.sep;
52638
+ return process.cwd() + path24.sep;
52639
52639
  } catch {
52640
52640
  return false;
52641
52641
  }
@@ -52673,7 +52673,7 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52673
52673
  const { 1: name, 2: expansion = "" } = StringPrototypeMatch(request, EXPORTS_PATTERN) || [];
52674
52674
  if (!name)
52675
52675
  return;
52676
- const pkgPath = path22.resolve(nmPath, name);
52676
+ const pkgPath = path24.resolve(nmPath, name);
52677
52677
  const pkg = readPackage(pkgPath);
52678
52678
  if (pkg != null && pkg.exports != null) {
52679
52679
  try {
@@ -52697,7 +52697,7 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52697
52697
  const Module_pathCache_set = hasModulePathCache ? (cacheKey, value2) => Module._pathCache[cacheKey] = value2 : (cacheKey) => Module_pathCache[cacheKey] = value;
52698
52698
  const trailingSlashRegex = /(?:^|\/)\.?\.$/;
52699
52699
  const Module_findPath = function _findPath(request, paths, isMain) {
52700
- const absoluteRequest = path22.isAbsolute(request);
52700
+ const absoluteRequest = path24.isAbsolute(request);
52701
52701
  if (absoluteRequest) {
52702
52702
  paths = [""];
52703
52703
  } else if (!paths || paths.length === 0) {
@@ -52720,19 +52720,19 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52720
52720
  if (exportsResolved)
52721
52721
  return exportsResolved;
52722
52722
  }
52723
- const _basePath = path22.resolve(curPath, request);
52723
+ const _basePath = path24.resolve(curPath, request);
52724
52724
  let filename;
52725
52725
  const [rc, basePath] = statReplacementExtensions(_basePath);
52726
52726
  if (!trailingSlash) {
52727
52727
  if (rc === 0) {
52728
52728
  if (!isMain) {
52729
52729
  if (preserveSymlinks) {
52730
- filename = path22.resolve(basePath);
52730
+ filename = path24.resolve(basePath);
52731
52731
  } else {
52732
52732
  filename = toRealPath(basePath);
52733
52733
  }
52734
52734
  } else if (preserveSymlinksMain) {
52735
- filename = path22.resolve(basePath);
52735
+ filename = path24.resolve(basePath);
52736
52736
  } else {
52737
52737
  filename = toRealPath(basePath);
52738
52738
  }
@@ -52769,8 +52769,8 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52769
52769
  const fakeParent = new Module("", null);
52770
52770
  paths = [];
52771
52771
  for (let i = 0; i < options.paths.length; i++) {
52772
- const path23 = options.paths[i];
52773
- fakeParent.paths = Module._nodeModulePaths(path23);
52772
+ const path25 = options.paths[i];
52773
+ fakeParent.paths = Module._nodeModulePaths(path25);
52774
52774
  const lookupPaths = Module._resolveLookupPaths(request, fakeParent);
52775
52775
  for (let j = 0; j < lookupPaths.length; j++) {
52776
52776
  if (!ArrayPrototypeIncludes(paths, lookupPaths[j]))
@@ -52843,15 +52843,15 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52843
52843
  return actual;
52844
52844
  const err = createEsmNotFoundErr(
52845
52845
  filename,
52846
- path22.resolve(pkgPath, "package.json")
52846
+ path24.resolve(pkgPath, "package.json")
52847
52847
  );
52848
52848
  throw err;
52849
52849
  }
52850
- function createEsmNotFoundErr(request, path23) {
52850
+ function createEsmNotFoundErr(request, path25) {
52851
52851
  const err = new Error(`Cannot find module '${request}'`);
52852
52852
  err.code = "MODULE_NOT_FOUND";
52853
- if (path23)
52854
- err.path = path23;
52853
+ if (path25)
52854
+ err.path = path25;
52855
52855
  return err;
52856
52856
  }
52857
52857
  return {
@@ -52868,7 +52868,7 @@ var require_node_internal_modules_cjs_loader = __commonJS({
52868
52868
  if ((ext2 === ".cts" || ext2 === ".cjs") && tsNodeClassification.moduleType === "auto") return;
52869
52869
  if (ext2 === ".mts" || ext2 === ".mjs" || tsNodeClassification.moduleType === "esm" || pkg && pkg.data && pkg.data.type === "module") {
52870
52870
  const parentPath = module3.parent && module3.parent.filename;
52871
- const packageJsonPath = pkg ? path22.resolve(pkg.path, "package.json") : null;
52871
+ const packageJsonPath = pkg ? path24.resolve(pkg.path, "package.json") : null;
52872
52872
  throw createErrRequireEsm(filename, parentPath, packageJsonPath);
52873
52873
  }
52874
52874
  }
@@ -59661,10 +59661,10 @@ var require_base = __commonJS({
59661
59661
  }
59662
59662
  return components;
59663
59663
  }
59664
- function clonePath(path22) {
59664
+ function clonePath(path24) {
59665
59665
  return {
59666
- newPos: path22.newPos,
59667
- components: path22.components.slice(0)
59666
+ newPos: path24.newPos,
59667
+ components: path24.components.slice(0)
59668
59668
  };
59669
59669
  }
59670
59670
  }
@@ -61361,8 +61361,8 @@ ${module_1.builtinModules.filter((name) => !name.startsWith("_") && !name.includ
61361
61361
  }
61362
61362
  exports2.createRepl = createRepl;
61363
61363
  var EvalState = class {
61364
- constructor(path22) {
61365
- this.path = path22;
61364
+ constructor(path24) {
61365
+ this.path = path24;
61366
61366
  this.input = "";
61367
61367
  this.output = "";
61368
61368
  this.version = 0;
@@ -61371,23 +61371,23 @@ ${module_1.builtinModules.filter((name) => !name.startsWith("_") && !name.includ
61371
61371
  };
61372
61372
  exports2.EvalState = EvalState;
61373
61373
  function createEvalAwarePartialHost(state, composeWith) {
61374
- function readFile(path22) {
61375
- if (path22 === state.path)
61374
+ function readFile(path24) {
61375
+ if (path24 === state.path)
61376
61376
  return state.input;
61377
61377
  if (composeWith === null || composeWith === void 0 ? void 0 : composeWith.readFile)
61378
- return composeWith.readFile(path22);
61378
+ return composeWith.readFile(path24);
61379
61379
  try {
61380
- return (0, fs_1.readFileSync)(path22, "utf8");
61380
+ return (0, fs_1.readFileSync)(path24, "utf8");
61381
61381
  } catch (err) {
61382
61382
  }
61383
61383
  }
61384
- function fileExists(path22) {
61385
- if (path22 === state.path)
61384
+ function fileExists(path24) {
61385
+ if (path24 === state.path)
61386
61386
  return true;
61387
61387
  if (composeWith === null || composeWith === void 0 ? void 0 : composeWith.fileExists)
61388
- return composeWith.fileExists(path22);
61388
+ return composeWith.fileExists(path24);
61389
61389
  try {
61390
- const stats = (0, fs_1.statSync)(path22);
61390
+ const stats = (0, fs_1.statSync)(path24);
61391
61391
  return stats.isFile() || stats.isFIFO();
61392
61392
  } catch (err) {
61393
61393
  return false;
@@ -62242,16 +62242,16 @@ var require_resolve_uri_umd = __commonJS({
62242
62242
  }
62243
62243
  function parseFileUrl(input) {
62244
62244
  const match2 = fileRegex.exec(input);
62245
- const path22 = match2[2];
62246
- return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path22) ? path22 : "/" + path22, match2[3] || "", match2[4] || "");
62245
+ const path24 = match2[2];
62246
+ return makeUrl("file:", "", match2[1] || "", "", isAbsolutePath(path24) ? path24 : "/" + path24, match2[3] || "", match2[4] || "");
62247
62247
  }
62248
- function makeUrl(scheme, user, host, port, path22, query, hash) {
62248
+ function makeUrl(scheme, user, host, port, path24, query, hash) {
62249
62249
  return {
62250
62250
  scheme,
62251
62251
  user,
62252
62252
  host,
62253
62253
  port,
62254
- path: path22,
62254
+ path: path24,
62255
62255
  query,
62256
62256
  hash,
62257
62257
  type: 7
@@ -62281,11 +62281,11 @@ var require_resolve_uri_umd = __commonJS({
62281
62281
  url2.type = input ? input.startsWith("?") ? 3 : input.startsWith("#") ? 2 : 4 : 1;
62282
62282
  return url2;
62283
62283
  }
62284
- function stripPathFilename(path22) {
62285
- if (path22.endsWith("/.."))
62286
- return path22;
62287
- const index = path22.lastIndexOf("/");
62288
- return path22.slice(0, index + 1);
62284
+ function stripPathFilename(path24) {
62285
+ if (path24.endsWith("/.."))
62286
+ return path24;
62287
+ const index = path24.lastIndexOf("/");
62288
+ return path24.slice(0, index + 1);
62289
62289
  }
62290
62290
  function mergePaths(url2, base) {
62291
62291
  normalizePath(base, base.type);
@@ -62323,14 +62323,14 @@ var require_resolve_uri_umd = __commonJS({
62323
62323
  pieces[pointer++] = piece;
62324
62324
  positive++;
62325
62325
  }
62326
- let path22 = "";
62326
+ let path24 = "";
62327
62327
  for (let i = 1; i < pointer; i++) {
62328
- path22 += "/" + pieces[i];
62328
+ path24 += "/" + pieces[i];
62329
62329
  }
62330
- if (!path22 || addTrailingSlash && !path22.endsWith("/..")) {
62331
- path22 += "/";
62330
+ if (!path24 || addTrailingSlash && !path24.endsWith("/..")) {
62331
+ path24 += "/";
62332
62332
  }
62333
- url2.path = path22;
62333
+ url2.path = path24;
62334
62334
  }
62335
62335
  function resolve(input, base) {
62336
62336
  if (!input && !base)
@@ -62371,13 +62371,13 @@ var require_resolve_uri_umd = __commonJS({
62371
62371
  case 3:
62372
62372
  return queryHash;
62373
62373
  case 4: {
62374
- const path22 = url2.path.slice(1);
62375
- if (!path22)
62374
+ const path24 = url2.path.slice(1);
62375
+ if (!path24)
62376
62376
  return queryHash || ".";
62377
- if (isRelative(base || input) && !isRelative(path22)) {
62378
- return "./" + path22 + queryHash;
62377
+ if (isRelative(base || input) && !isRelative(path24)) {
62378
+ return "./" + path24 + queryHash;
62379
62379
  }
62380
- return path22 + queryHash;
62380
+ return path24 + queryHash;
62381
62381
  }
62382
62382
  case 5:
62383
62383
  return url2.path + queryHash;
@@ -62406,11 +62406,11 @@ var require_trace_mapping_umd = __commonJS({
62406
62406
  base += "/";
62407
62407
  return resolveUri__default["default"](input, base);
62408
62408
  }
62409
- function stripFilename(path22) {
62410
- if (!path22)
62409
+ function stripFilename(path24) {
62410
+ if (!path24)
62411
62411
  return "";
62412
- const index = path22.lastIndexOf("/");
62413
- return path22.slice(0, index + 1);
62412
+ const index = path24.lastIndexOf("/");
62413
+ return path24.slice(0, index + 1);
62414
62414
  }
62415
62415
  const COLUMN = 0;
62416
62416
  const SOURCES_INDEX = 1;
@@ -62815,14 +62815,14 @@ var require_trace_mapping_umd = __commonJS({
62815
62815
  var require_source_map_support = __commonJS({
62816
62816
  "node_modules/@cspotcode/source-map-support/source-map-support.js"(exports2, module2) {
62817
62817
  var { TraceMap, originalPositionFor, AnyMap } = require_trace_mapping_umd();
62818
- var path22 = require("path");
62818
+ var path24 = require("path");
62819
62819
  var { fileURLToPath: fileURLToPath3, pathToFileURL } = require("url");
62820
62820
  var util3 = require("util");
62821
- var fs18;
62821
+ var fs20;
62822
62822
  try {
62823
- fs18 = require("fs");
62824
- if (!fs18.existsSync || !fs18.readFileSync) {
62825
- fs18 = null;
62823
+ fs20 = require("fs");
62824
+ if (!fs20.existsSync || !fs20.readFileSync) {
62825
+ fs20 = null;
62826
62826
  }
62827
62827
  } catch (err) {
62828
62828
  }
@@ -62960,27 +62960,27 @@ var require_source_map_support = __commonJS({
62960
62960
  };
62961
62961
  }
62962
62962
  var retrieveFile = handlerExec(sharedData.retrieveFileHandlers, sharedData.internalRetrieveFileHandlers);
62963
- sharedData.internalRetrieveFileHandlers.push(function(path23) {
62964
- path23 = path23.trim();
62965
- if (/^file:/.test(path23)) {
62966
- path23 = path23.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
62963
+ sharedData.internalRetrieveFileHandlers.push(function(path25) {
62964
+ path25 = path25.trim();
62965
+ if (/^file:/.test(path25)) {
62966
+ path25 = path25.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
62967
62967
  return drive ? "" : (
62968
62968
  // file:///C:/dir/file -> C:/dir/file
62969
62969
  "/"
62970
62970
  );
62971
62971
  });
62972
62972
  }
62973
- const key = getCacheKey(path23);
62973
+ const key = getCacheKey(path25);
62974
62974
  if (hasFileContentsCacheFromKey(key)) {
62975
62975
  return getFileContentsCacheFromKey(key);
62976
62976
  }
62977
62977
  var contents = "";
62978
62978
  try {
62979
- if (!fs18) {
62979
+ if (!fs20) {
62980
62980
  var xhr = new XMLHttpRequest();
62981
62981
  xhr.open(
62982
62982
  "GET",
62983
- path23,
62983
+ path25,
62984
62984
  /** async */
62985
62985
  false
62986
62986
  );
@@ -62988,12 +62988,12 @@ var require_source_map_support = __commonJS({
62988
62988
  if (xhr.readyState === 4 && xhr.status === 200) {
62989
62989
  contents = xhr.responseText;
62990
62990
  }
62991
- } else if (fs18.existsSync(path23)) {
62992
- contents = fs18.readFileSync(path23, "utf8");
62991
+ } else if (fs20.existsSync(path25)) {
62992
+ contents = fs20.readFileSync(path25, "utf8");
62993
62993
  }
62994
62994
  } catch (er) {
62995
62995
  }
62996
- return setFileContentsCache(path23, contents);
62996
+ return setFileContentsCache(path25, contents);
62997
62997
  });
62998
62998
  function supportRelativeURL(file, url2) {
62999
62999
  if (!file) return url2;
@@ -63002,12 +63002,12 @@ var require_source_map_support = __commonJS({
63002
63002
  if (isAbsoluteUrl(url2) || isSchemeRelativeUrl(url2)) {
63003
63003
  return new URL(url2, file).toString();
63004
63004
  }
63005
- if (path22.isAbsolute(url2)) {
63005
+ if (path24.isAbsolute(url2)) {
63006
63006
  return new URL(pathToFileURL(url2), file).toString();
63007
63007
  }
63008
63008
  return new URL(url2.replace(/\\/g, "/"), file).toString();
63009
63009
  }
63010
- if (path22.isAbsolute(file)) {
63010
+ if (path24.isAbsolute(file)) {
63011
63011
  if (isFileUrl(url2)) {
63012
63012
  return fileURLToPath3(url2);
63013
63013
  }
@@ -63017,15 +63017,15 @@ var require_source_map_support = __commonJS({
63017
63017
  if (isAbsoluteUrl(url2)) {
63018
63018
  return url2;
63019
63019
  }
63020
- if (path22.isAbsolute(url2)) {
63021
- return path22.normalize(url2);
63020
+ if (path24.isAbsolute(url2)) {
63021
+ return path24.normalize(url2);
63022
63022
  }
63023
- return path22.join(file, "..", decodeURI(url2));
63023
+ return path24.join(file, "..", decodeURI(url2));
63024
63024
  }
63025
63025
  if (isAbsoluteUrl(url2) || isSchemeRelativeUrl(url2)) {
63026
63026
  return url2;
63027
63027
  }
63028
- return path22.join(file, "..", url2);
63028
+ return path24.join(file, "..", url2);
63029
63029
  } catch (e) {
63030
63030
  return url2;
63031
63031
  }
@@ -63034,8 +63034,8 @@ var require_source_map_support = __commonJS({
63034
63034
  try {
63035
63035
  if (isAbsoluteUrl(matchStyleOf) || isSchemeRelativeUrl(matchStyleOf)) {
63036
63036
  if (isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) return pathOrUrl;
63037
- if (path22.isAbsolute(pathOrUrl)) return pathToFileURL(pathOrUrl).toString();
63038
- } else if (path22.isAbsolute(matchStyleOf)) {
63037
+ if (path24.isAbsolute(pathOrUrl)) return pathToFileURL(pathOrUrl).toString();
63038
+ } else if (path24.isAbsolute(matchStyleOf)) {
63039
63039
  if (isAbsoluteUrl(pathOrUrl) || isSchemeRelativeUrl(pathOrUrl)) {
63040
63040
  return fileURLToPath3(new URL(pathOrUrl, "file://"));
63041
63041
  }
@@ -63284,7 +63284,7 @@ var require_source_map_support = __commonJS({
63284
63284
  }
63285
63285
  var kIsNodeError = void 0;
63286
63286
  try {
63287
- path22.resolve(123);
63287
+ path24.resolve(123);
63288
63288
  } catch (e) {
63289
63289
  const symbols = Object.getOwnPropertySymbols(e);
63290
63290
  const symbol = symbols.find(function(s) {
@@ -63330,9 +63330,9 @@ var require_source_map_support = __commonJS({
63330
63330
  var column = +match2[3];
63331
63331
  var contents = getFileContentsCache(source);
63332
63332
  const sourceAsPath = tryFileURLToPath(source);
63333
- if (!contents && fs18 && fs18.existsSync(sourceAsPath)) {
63333
+ if (!contents && fs20 && fs20.existsSync(sourceAsPath)) {
63334
63334
  try {
63335
- contents = fs18.readFileSync(sourceAsPath, "utf8");
63335
+ contents = fs20.readFileSync(sourceAsPath, "utf8");
63336
63336
  } catch (er) {
63337
63337
  contents = "";
63338
63338
  }
@@ -63629,27 +63629,27 @@ Update this package.json to use a subpath pattern like "${match2}*".`,
63629
63629
  const statSupportsThrowIfNoEntry = versionGteLt(process.versions.node, "15.3.0") || versionGteLt(process.versions.node, "14.17.0", "15.0.0");
63630
63630
  const tryStatSync = statSupportsThrowIfNoEntry ? tryStatSyncWithoutErrors : tryStatSyncWithErrors;
63631
63631
  const statsIfNotFound = new Stats();
63632
- function tryStatSyncWithoutErrors(path22) {
63633
- const stats = statSync(path22, { throwIfNoEntry: false });
63632
+ function tryStatSyncWithoutErrors(path24) {
63633
+ const stats = statSync(path24, { throwIfNoEntry: false });
63634
63634
  if (stats != null) return stats;
63635
63635
  return statsIfNotFound;
63636
63636
  }
63637
- function tryStatSyncWithErrors(path22) {
63637
+ function tryStatSyncWithErrors(path24) {
63638
63638
  try {
63639
- return statSync(path22);
63639
+ return statSync(path24);
63640
63640
  } catch {
63641
63641
  return statsIfNotFound;
63642
63642
  }
63643
63643
  }
63644
- function getPackageConfig(path22, specifier, base) {
63645
- const existing = packageJSONCache.get(path22);
63644
+ function getPackageConfig(path24, specifier, base) {
63645
+ const existing = packageJSONCache.get(path24);
63646
63646
  if (existing !== void 0) {
63647
63647
  return existing;
63648
63648
  }
63649
- const source = packageJsonReader.read(path22).string;
63649
+ const source = packageJsonReader.read(path24).string;
63650
63650
  if (source === void 0) {
63651
63651
  const packageConfig2 = {
63652
- pjsonPath: path22,
63652
+ pjsonPath: path24,
63653
63653
  exists: false,
63654
63654
  main: void 0,
63655
63655
  name: void 0,
@@ -63657,7 +63657,7 @@ Update this package.json to use a subpath pattern like "${match2}*".`,
63657
63657
  exports: void 0,
63658
63658
  imports: void 0
63659
63659
  };
63660
- packageJSONCache.set(path22, packageConfig2);
63660
+ packageJSONCache.set(path24, packageConfig2);
63661
63661
  return packageConfig2;
63662
63662
  }
63663
63663
  let packageJSON;
@@ -63665,7 +63665,7 @@ Update this package.json to use a subpath pattern like "${match2}*".`,
63665
63665
  packageJSON = JSONParse(source);
63666
63666
  } catch (error) {
63667
63667
  throw new ERR_INVALID_PACKAGE_CONFIG(
63668
- path22,
63668
+ path24,
63669
63669
  (base ? `"${specifier}" from ` : "") + fileURLToPath3(base || specifier),
63670
63670
  error.message
63671
63671
  );
@@ -63677,7 +63677,7 @@ Update this package.json to use a subpath pattern like "${match2}*".`,
63677
63677
  if (typeof name !== "string") name = void 0;
63678
63678
  if (type !== "module" && type !== "commonjs") type = "none";
63679
63679
  const packageConfig = {
63680
- pjsonPath: path22,
63680
+ pjsonPath: path24,
63681
63681
  exists: true,
63682
63682
  main,
63683
63683
  name,
@@ -63685,7 +63685,7 @@ Update this package.json to use a subpath pattern like "${match2}*".`,
63685
63685
  exports: exports3,
63686
63686
  imports
63687
63687
  };
63688
- packageJSONCache.set(path22, packageConfig);
63688
+ packageJSONCache.set(path24, packageConfig);
63689
63689
  return packageConfig;
63690
63690
  }
63691
63691
  function getPackageScopeConfig(resolved) {
@@ -63801,10 +63801,10 @@ Update this package.json to use a subpath pattern like "${match2}*".`,
63801
63801
  fileURLToPath3(base)
63802
63802
  );
63803
63803
  if (experimentalSpecifierResolution === "node") {
63804
- const path23 = fileURLToPath3(resolved);
63804
+ const path25 = fileURLToPath3(resolved);
63805
63805
  let file2 = resolveExtensionsWithTryExactName(resolved);
63806
63806
  if (file2 !== void 0) return file2;
63807
- if (!StringPrototypeEndsWith(path23, "/")) {
63807
+ if (!StringPrototypeEndsWith(path25, "/")) {
63808
63808
  file2 = resolveIndex(new URL3(`${resolved}/`));
63809
63809
  if (file2 !== void 0) return file2;
63810
63810
  } else {
@@ -63817,15 +63817,15 @@ Update this package.json to use a subpath pattern like "${match2}*".`,
63817
63817
  );
63818
63818
  }
63819
63819
  const file = resolveReplacementExtensions(resolved) || resolved;
63820
- const path22 = fileURLToPath3(file);
63821
- const stats = tryStatSync(StringPrototypeEndsWith(path22, "/") ? StringPrototypeSlice(path22, -1) : path22);
63820
+ const path24 = fileURLToPath3(file);
63821
+ const stats = tryStatSync(StringPrototypeEndsWith(path24, "/") ? StringPrototypeSlice(path24, -1) : path24);
63822
63822
  if (stats.isDirectory()) {
63823
- const err = new ERR_UNSUPPORTED_DIR_IMPORT(path22, fileURLToPath3(base));
63823
+ const err = new ERR_UNSUPPORTED_DIR_IMPORT(path24, fileURLToPath3(base));
63824
63824
  err.url = String(resolved);
63825
63825
  throw err;
63826
63826
  } else if (!stats.isFile()) {
63827
63827
  throw new ERR_MODULE_NOT_FOUND(
63828
- path22 || resolved.pathname,
63828
+ path24 || resolved.pathname,
63829
63829
  fileURLToPath3(base),
63830
63830
  "module"
63831
63831
  );
@@ -64872,15 +64872,15 @@ ${diagnosticText}`);
64872
64872
  environment: "node",
64873
64873
  retrieveFile(pathOrUrl) {
64874
64874
  var _a3;
64875
- let path22 = pathOrUrl;
64876
- if (experimentalEsmLoader && path22.startsWith("file://")) {
64875
+ let path24 = pathOrUrl;
64876
+ if (experimentalEsmLoader && path24.startsWith("file://")) {
64877
64877
  try {
64878
- path22 = (0, url_1.fileURLToPath)(path22);
64878
+ path24 = (0, url_1.fileURLToPath)(path24);
64879
64879
  } catch (e) {
64880
64880
  }
64881
64881
  }
64882
- path22 = (0, util_1.normalizeSlashes)(path22);
64883
- return ((_a3 = outputCache.get(path22)) === null || _a3 === void 0 ? void 0 : _a3.content) || "";
64882
+ path24 = (0, util_1.normalizeSlashes)(path24);
64883
+ return ((_a3 = outputCache.get(path24)) === null || _a3 === void 0 ? void 0 : _a3.content) || "";
64884
64884
  },
64885
64885
  redirectConflictingLibrary: true,
64886
64886
  onConflictingLibraryRedirect(request, parent, isMain, options2, redirectedRequest) {
@@ -64906,10 +64906,10 @@ ${diagnosticText}`);
64906
64906
  if (configDiagnosticList.length)
64907
64907
  reportTSError(configDiagnosticList);
64908
64908
  const jsxEmitPreserve = config.options.jsx === ts.JsxEmit.Preserve;
64909
- function getEmitExtension(path22) {
64910
- const lastDotIndex = path22.lastIndexOf(".");
64909
+ function getEmitExtension(path24) {
64910
+ const lastDotIndex = path24.lastIndexOf(".");
64911
64911
  if (lastDotIndex >= 0) {
64912
- const ext2 = path22.slice(lastDotIndex);
64912
+ const ext2 = path24.slice(lastDotIndex);
64913
64913
  switch (ext2) {
64914
64914
  case ".js":
64915
64915
  case ".ts":
@@ -65124,14 +65124,14 @@ This is usually the result of a faulty configuration or import. Make sure there
65124
65124
  const diagnosticList = filterDiagnostics(diagnostics, diagnosticFilters);
65125
65125
  if (diagnosticList.length)
65126
65126
  reportTSError(diagnosticList);
65127
- const result = builderProgram.emit(sourceFile, (path22, file, writeByteOrderMark) => {
65128
- if (path22.endsWith(".map")) {
65127
+ const result = builderProgram.emit(sourceFile, (path24, file, writeByteOrderMark) => {
65128
+ if (path24.endsWith(".map")) {
65129
65129
  outMap = file;
65130
65130
  } else {
65131
65131
  outText = file;
65132
65132
  }
65133
65133
  if (options.emit)
65134
- sys.writeFile(path22, file, writeByteOrderMark);
65134
+ sys.writeFile(path24, file, writeByteOrderMark);
65135
65135
  }, void 0, void 0, customTransformers);
65136
65136
  if (result.emitSkipped) {
65137
65137
  return [void 0, void 0, true];
@@ -65296,8 +65296,8 @@ This is usually the result of a faulty configuration or import. Make sure there
65296
65296
  function createIgnore(ignoreBaseDir, ignore) {
65297
65297
  return (fileName) => {
65298
65298
  const relname = (0, path_1.relative)(ignoreBaseDir, fileName);
65299
- const path22 = (0, util_1.normalizeSlashes)(relname);
65300
- return ignore.some((x) => x.test(path22));
65299
+ const path24 = (0, util_1.normalizeSlashes)(relname);
65300
+ return ignore.some((x) => x.test(path24));
65301
65301
  };
65302
65302
  }
65303
65303
  function registerExtensions(preferTsExts, extensions, service, originalJsHandler) {
@@ -65815,7 +65815,7 @@ var require_has_flag2 = __commonJS({
65815
65815
  var require_supports_colors = __commonJS({
65816
65816
  "node_modules/@colors/colors/lib/system/supports-colors.js"(exports2, module2) {
65817
65817
  "use strict";
65818
- var os5 = require("os");
65818
+ var os7 = require("os");
65819
65819
  var hasFlag = require_has_flag2();
65820
65820
  var env = process.env;
65821
65821
  var forceColor = void 0;
@@ -65853,7 +65853,7 @@ var require_supports_colors = __commonJS({
65853
65853
  }
65854
65854
  var min = forceColor ? 1 : 0;
65855
65855
  if (process.platform === "win32") {
65856
- var osRelease = os5.release().split(".");
65856
+ var osRelease = os7.release().split(".");
65857
65857
  if (Number(process.versions.node.split(".")[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
65858
65858
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
65859
65859
  }
@@ -67121,9 +67121,9 @@ var {
67121
67121
  } = import_index.default;
67122
67122
 
67123
67123
  // apps/cli/cli.ts
67124
- var import_chalk25 = __toESM(require_source());
67125
- var import_path17 = __toESM(require("path"));
67126
- var import_fs_extra15 = __toESM(require_lib());
67124
+ var import_chalk26 = __toESM(require_source());
67125
+ var import_path19 = __toESM(require("path"));
67126
+ var import_fs_extra17 = __toESM(require_lib());
67127
67127
 
67128
67128
  // apps/cli/utils/operation-logger.ts
67129
67129
  var import_fs_extra = __toESM(require_lib());
@@ -69480,9 +69480,9 @@ var fetchAsyncQuestionProperty = function(question, prop, answers) {
69480
69480
 
69481
69481
  // node_modules/inquirer/lib/ui/prompt.js
69482
69482
  var _ = {
69483
- set: (obj, path22 = "", value2) => {
69483
+ set: (obj, path24 = "", value2) => {
69484
69484
  let pointer = obj;
69485
- path22.split(".").forEach((key, index, arr) => {
69485
+ path24.split(".").forEach((key, index, arr) => {
69486
69486
  if (key === "__proto__" || key === "constructor") return;
69487
69487
  if (index === arr.length - 1) {
69488
69488
  pointer[key] = value2;
@@ -69492,8 +69492,8 @@ var _ = {
69492
69492
  pointer = pointer[key];
69493
69493
  });
69494
69494
  },
69495
- get: (obj, path22 = "", defaultValue) => {
69496
- const travel = (regexp) => String.prototype.split.call(path22, regexp).filter(Boolean).reduce(
69495
+ get: (obj, path24 = "", defaultValue) => {
69496
+ const travel = (regexp) => String.prototype.split.call(path24, regexp).filter(Boolean).reduce(
69497
69497
  // @ts-expect-error implicit any on res[key]
69498
69498
  (res, key) => res !== null && res !== void 0 ? res[key] : res,
69499
69499
  obj
@@ -70372,9 +70372,9 @@ function isVisitable(thing) {
70372
70372
  function removeBrackets(key) {
70373
70373
  return utils_default.endsWith(key, "[]") ? key.slice(0, -2) : key;
70374
70374
  }
70375
- function renderKey(path22, key, dots) {
70376
- if (!path22) return key;
70377
- return path22.concat(key).map(function each(token2, i) {
70375
+ function renderKey(path24, key, dots) {
70376
+ if (!path24) return key;
70377
+ return path24.concat(key).map(function each(token2, i) {
70378
70378
  token2 = removeBrackets(token2);
70379
70379
  return !dots && i ? "[" + token2 + "]" : token2;
70380
70380
  }).join(dots ? "." : "");
@@ -70422,9 +70422,9 @@ function toFormData(obj, formData, options) {
70422
70422
  }
70423
70423
  return value2;
70424
70424
  }
70425
- function defaultVisitor(value2, key, path22) {
70425
+ function defaultVisitor(value2, key, path24) {
70426
70426
  let arr = value2;
70427
- if (value2 && !path22 && typeof value2 === "object") {
70427
+ if (value2 && !path24 && typeof value2 === "object") {
70428
70428
  if (utils_default.endsWith(key, "{}")) {
70429
70429
  key = metaTokens ? key : key.slice(0, -2);
70430
70430
  value2 = JSON.stringify(value2);
@@ -70443,7 +70443,7 @@ function toFormData(obj, formData, options) {
70443
70443
  if (isVisitable(value2)) {
70444
70444
  return true;
70445
70445
  }
70446
- formData.append(renderKey(path22, key, dots), convertValue(value2));
70446
+ formData.append(renderKey(path24, key, dots), convertValue(value2));
70447
70447
  return false;
70448
70448
  }
70449
70449
  const stack = [];
@@ -70452,10 +70452,10 @@ function toFormData(obj, formData, options) {
70452
70452
  convertValue,
70453
70453
  isVisitable
70454
70454
  });
70455
- function build(value2, path22) {
70455
+ function build(value2, path24) {
70456
70456
  if (utils_default.isUndefined(value2)) return;
70457
70457
  if (stack.indexOf(value2) !== -1) {
70458
- throw Error("Circular reference detected in " + path22.join("."));
70458
+ throw Error("Circular reference detected in " + path24.join("."));
70459
70459
  }
70460
70460
  stack.push(value2);
70461
70461
  utils_default.forEach(value2, function each(el, key) {
@@ -70463,11 +70463,11 @@ function toFormData(obj, formData, options) {
70463
70463
  formData,
70464
70464
  el,
70465
70465
  utils_default.isString(key) ? key.trim() : key,
70466
- path22,
70466
+ path24,
70467
70467
  exposedHelpers
70468
70468
  );
70469
70469
  if (result === true) {
70470
- build(el, path22 ? path22.concat(key) : [key]);
70470
+ build(el, path24 ? path24.concat(key) : [key]);
70471
70471
  }
70472
70472
  });
70473
70473
  stack.pop();
@@ -70679,7 +70679,7 @@ var platform_default = {
70679
70679
  // node_modules/axios/lib/helpers/toURLEncodedForm.js
70680
70680
  function toURLEncodedForm(data, options) {
70681
70681
  return toFormData_default(data, new platform_default.classes.URLSearchParams(), {
70682
- visitor: function(value2, key, path22, helpers) {
70682
+ visitor: function(value2, key, path24, helpers) {
70683
70683
  if (platform_default.isNode && utils_default.isBuffer(value2)) {
70684
70684
  this.append(key, value2.toString("base64"));
70685
70685
  return false;
@@ -70709,11 +70709,11 @@ function arrayToObject(arr) {
70709
70709
  return obj;
70710
70710
  }
70711
70711
  function formDataToJSON(formData) {
70712
- function buildPath(path22, value2, target, index) {
70713
- let name = path22[index++];
70712
+ function buildPath(path24, value2, target, index) {
70713
+ let name = path24[index++];
70714
70714
  if (name === "__proto__") return true;
70715
70715
  const isNumericKey = Number.isFinite(+name);
70716
- const isLast = index >= path22.length;
70716
+ const isLast = index >= path24.length;
70717
70717
  name = !name && utils_default.isArray(target) ? target.length : name;
70718
70718
  if (isLast) {
70719
70719
  if (utils_default.hasOwnProp(target, name)) {
@@ -70726,7 +70726,7 @@ function formDataToJSON(formData) {
70726
70726
  if (!target[name] || !utils_default.isObject(target[name])) {
70727
70727
  target[name] = [];
70728
70728
  }
70729
- const result = buildPath(path22, value2, target[name], index);
70729
+ const result = buildPath(path24, value2, target[name], index);
70730
70730
  if (result && utils_default.isArray(target[name])) {
70731
70731
  target[name] = arrayToObject(target[name]);
70732
70732
  }
@@ -72048,9 +72048,9 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
72048
72048
  auth = urlUsername + ":" + urlPassword;
72049
72049
  }
72050
72050
  auth && headers.delete("authorization");
72051
- let path22;
72051
+ let path24;
72052
72052
  try {
72053
- path22 = buildURL(
72053
+ path24 = buildURL(
72054
72054
  parsed.pathname + parsed.search,
72055
72055
  config.params,
72056
72056
  config.paramsSerializer
@@ -72068,7 +72068,7 @@ var http_default = isHttpAdapterSupported && function httpAdapter(config) {
72068
72068
  false
72069
72069
  );
72070
72070
  const options = {
72071
- path: path22,
72071
+ path: path24,
72072
72072
  method,
72073
72073
  headers: headers.toJSON(),
72074
72074
  agents: { http: config.httpAgent, https: config.httpsAgent },
@@ -72304,14 +72304,14 @@ var isURLSameOrigin_default = platform_default.hasStandardBrowserEnv ? /* @__PUR
72304
72304
  var cookies_default = platform_default.hasStandardBrowserEnv ? (
72305
72305
  // Standard browser envs support document.cookie
72306
72306
  {
72307
- write(name, value2, expires, path22, domain, secure, sameSite) {
72307
+ write(name, value2, expires, path24, domain, secure, sameSite) {
72308
72308
  if (typeof document === "undefined") return;
72309
72309
  const cookie = [`${name}=${encodeURIComponent(value2)}`];
72310
72310
  if (utils_default.isNumber(expires)) {
72311
72311
  cookie.push(`expires=${new Date(expires).toUTCString()}`);
72312
72312
  }
72313
- if (utils_default.isString(path22)) {
72314
- cookie.push(`path=${path22}`);
72313
+ if (utils_default.isString(path24)) {
72314
+ cookie.push(`path=${path24}`);
72315
72315
  }
72316
72316
  if (utils_default.isString(domain)) {
72317
72317
  cookie.push(`domain=${domain}`);
@@ -81993,12 +81993,12 @@ var PathBase = class {
81993
81993
  /**
81994
81994
  * Get the Path object referenced by the string path, resolved from this Path
81995
81995
  */
81996
- resolve(path22) {
81997
- if (!path22) {
81996
+ resolve(path24) {
81997
+ if (!path24) {
81998
81998
  return this;
81999
81999
  }
82000
- const rootPath = this.getRootString(path22);
82001
- const dir = path22.substring(rootPath.length);
82000
+ const rootPath = this.getRootString(path24);
82001
+ const dir = path24.substring(rootPath.length);
82002
82002
  const dirParts = dir.split(this.splitSep);
82003
82003
  const result = rootPath ? this.getRoot(rootPath).#resolveParts(dirParts) : this.#resolveParts(dirParts);
82004
82004
  return result;
@@ -82750,8 +82750,8 @@ var PathWin32 = class _PathWin32 extends PathBase {
82750
82750
  /**
82751
82751
  * @internal
82752
82752
  */
82753
- getRootString(path22) {
82754
- return import_node_path2.win32.parse(path22).root;
82753
+ getRootString(path24) {
82754
+ return import_node_path2.win32.parse(path24).root;
82755
82755
  }
82756
82756
  /**
82757
82757
  * @internal
@@ -82797,8 +82797,8 @@ var PathPosix = class _PathPosix extends PathBase {
82797
82797
  /**
82798
82798
  * @internal
82799
82799
  */
82800
- getRootString(path22) {
82801
- return path22.startsWith("/") ? "/" : "";
82800
+ getRootString(path24) {
82801
+ return path24.startsWith("/") ? "/" : "";
82802
82802
  }
82803
82803
  /**
82804
82804
  * @internal
@@ -82847,8 +82847,8 @@ var PathScurryBase = class {
82847
82847
  *
82848
82848
  * @internal
82849
82849
  */
82850
- constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs18 = defaultFS } = {}) {
82851
- this.#fs = fsFromOption(fs18);
82850
+ constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs20 = defaultFS } = {}) {
82851
+ this.#fs = fsFromOption(fs20);
82852
82852
  if (cwd instanceof URL || cwd.startsWith("file://")) {
82853
82853
  cwd = (0, import_node_url.fileURLToPath)(cwd);
82854
82854
  }
@@ -82887,11 +82887,11 @@ var PathScurryBase = class {
82887
82887
  /**
82888
82888
  * Get the depth of a provided path, string, or the cwd
82889
82889
  */
82890
- depth(path22 = this.cwd) {
82891
- if (typeof path22 === "string") {
82892
- path22 = this.cwd.resolve(path22);
82890
+ depth(path24 = this.cwd) {
82891
+ if (typeof path24 === "string") {
82892
+ path24 = this.cwd.resolve(path24);
82893
82893
  }
82894
- return path22.depth();
82894
+ return path24.depth();
82895
82895
  }
82896
82896
  /**
82897
82897
  * Return the cache of child entries. Exposed so subclasses can create
@@ -83378,9 +83378,9 @@ var PathScurryBase = class {
83378
83378
  process3();
83379
83379
  return results;
83380
83380
  }
83381
- chdir(path22 = this.cwd) {
83381
+ chdir(path24 = this.cwd) {
83382
83382
  const oldCwd = this.cwd;
83383
- this.cwd = typeof path22 === "string" ? this.cwd.resolve(path22) : path22;
83383
+ this.cwd = typeof path24 === "string" ? this.cwd.resolve(path24) : path24;
83384
83384
  this.cwd[setAsCwd](oldCwd);
83385
83385
  }
83386
83386
  };
@@ -83406,8 +83406,8 @@ var PathScurryWin32 = class extends PathScurryBase {
83406
83406
  /**
83407
83407
  * @internal
83408
83408
  */
83409
- newRoot(fs18) {
83410
- return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs18 });
83409
+ newRoot(fs20) {
83410
+ return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs20 });
83411
83411
  }
83412
83412
  /**
83413
83413
  * Return true if the provided path string is an absolute path
@@ -83435,8 +83435,8 @@ var PathScurryPosix = class extends PathScurryBase {
83435
83435
  /**
83436
83436
  * @internal
83437
83437
  */
83438
- newRoot(fs18) {
83439
- return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs18 });
83438
+ newRoot(fs20) {
83439
+ return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs20 });
83440
83440
  }
83441
83441
  /**
83442
83442
  * Return true if the provided path string is an absolute path
@@ -83736,8 +83736,8 @@ var MatchRecord = class {
83736
83736
  }
83737
83737
  // match, absolute, ifdir
83738
83738
  entries() {
83739
- return [...this.store.entries()].map(([path22, n]) => [
83740
- path22,
83739
+ return [...this.store.entries()].map(([path24, n]) => [
83740
+ path24,
83741
83741
  !!(n & 2),
83742
83742
  !!(n & 1)
83743
83743
  ]);
@@ -83942,9 +83942,9 @@ var GlobUtil = class {
83942
83942
  signal;
83943
83943
  maxDepth;
83944
83944
  includeChildMatches;
83945
- constructor(patterns, path22, opts) {
83945
+ constructor(patterns, path24, opts) {
83946
83946
  this.patterns = patterns;
83947
- this.path = path22;
83947
+ this.path = path24;
83948
83948
  this.opts = opts;
83949
83949
  this.#sep = !opts.posix && opts.platform === "win32" ? "\\" : "/";
83950
83950
  this.includeChildMatches = opts.includeChildMatches !== false;
@@ -83963,11 +83963,11 @@ var GlobUtil = class {
83963
83963
  });
83964
83964
  }
83965
83965
  }
83966
- #ignored(path22) {
83967
- return this.seen.has(path22) || !!this.#ignore?.ignored?.(path22);
83966
+ #ignored(path24) {
83967
+ return this.seen.has(path24) || !!this.#ignore?.ignored?.(path24);
83968
83968
  }
83969
- #childrenIgnored(path22) {
83970
- return !!this.#ignore?.childrenIgnored?.(path22);
83969
+ #childrenIgnored(path24) {
83970
+ return !!this.#ignore?.childrenIgnored?.(path24);
83971
83971
  }
83972
83972
  // backpressure mechanism
83973
83973
  pause() {
@@ -84182,8 +84182,8 @@ var GlobUtil = class {
84182
84182
  };
84183
84183
  var GlobWalker = class extends GlobUtil {
84184
84184
  matches = /* @__PURE__ */ new Set();
84185
- constructor(patterns, path22, opts) {
84186
- super(patterns, path22, opts);
84185
+ constructor(patterns, path24, opts) {
84186
+ super(patterns, path24, opts);
84187
84187
  }
84188
84188
  matchEmit(e) {
84189
84189
  this.matches.add(e);
@@ -84220,8 +84220,8 @@ var GlobWalker = class extends GlobUtil {
84220
84220
  };
84221
84221
  var GlobStream = class extends GlobUtil {
84222
84222
  results;
84223
- constructor(patterns, path22, opts) {
84224
- super(patterns, path22, opts);
84223
+ constructor(patterns, path24, opts) {
84224
+ super(patterns, path24, opts);
84225
84225
  this.results = new Minipass({
84226
84226
  signal: this.signal,
84227
84227
  objectMode: true
@@ -84703,8 +84703,8 @@ var CsvManager = class {
84703
84703
  /**
84704
84704
  * Set nested value in object using dot notation (e.g., "parent.child.key")
84705
84705
  */
84706
- setNestedValue(obj, path22, value2) {
84707
- const keys = path22.split(".");
84706
+ setNestedValue(obj, path24, value2) {
84707
+ const keys = path24.split(".");
84708
84708
  let current = obj;
84709
84709
  for (let i = 0; i < keys.length - 1; i++) {
84710
84710
  const key = keys[i];
@@ -85995,8 +85995,8 @@ var CsvManager2 = class {
85995
85995
  /**
85996
85996
  * Set nested value in object using dot notation (e.g., "parent.child.key")
85997
85997
  */
85998
- setNestedValue(obj, path22, value2) {
85999
- const keys = path22.split(".");
85998
+ setNestedValue(obj, path24, value2) {
85999
+ const keys = path24.split(".");
86000
86000
  let current = obj;
86001
86001
  for (let i = 0; i < keys.length - 1; i++) {
86002
86002
  const key = keys[i];
@@ -87141,7 +87141,10 @@ async function handlePluginImport(mappingFile, options) {
87141
87141
  }
87142
87142
 
87143
87143
  // apps/cli/cli/handlers/auth-handlers.ts
87144
- var import_os3 = __toESM(require("os"));
87144
+ var import_os4 = __toESM(require("os"));
87145
+ var import_path15 = __toESM(require("path"));
87146
+ var import_fs_extra13 = __toESM(require_lib());
87147
+ var import_chalk24 = __toESM(require_source());
87145
87148
  var import_child_process4 = require("child_process");
87146
87149
 
87147
87150
  // apps/cli/cli/output/index.ts
@@ -87180,8 +87183,8 @@ function truncate(value2, max) {
87180
87183
  if (!max || value2.length <= max) return value2;
87181
87184
  return value2.slice(0, max - 1) + "\u2026";
87182
87185
  }
87183
- function get(obj, path22) {
87184
- return path22.split(".").reduce((acc, k) => acc == null ? acc : acc[k], obj);
87186
+ function get(obj, path24) {
87187
+ return path24.split(".").reduce((acc, k) => acc == null ? acc : acc[k], obj);
87185
87188
  }
87186
87189
  function printTable(rows, columns) {
87187
87190
  if (!rows || rows.length === 0) {
@@ -87422,6 +87425,110 @@ async function buildApiContext(out) {
87422
87425
  };
87423
87426
  }
87424
87427
 
87428
+ // apps/cli/services/device-auth-service.ts
87429
+ var import_os3 = __toESM(require("os"));
87430
+ var DEVICE_START_PATH = "/api/v1/cli/auth/device";
87431
+ var DEVICE_POLL_PATH = "/api/v1/cli/auth/device/poll";
87432
+ var defaultSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
87433
+ var DeviceAuthService = class {
87434
+ constructor(apiUrl, version = "cli") {
87435
+ const base = apiUrl.startsWith("http") ? apiUrl : `https://${apiUrl}`;
87436
+ this.client = axios_default.create({
87437
+ baseURL: base.replace(/\/$/, ""),
87438
+ headers: {
87439
+ Accept: "application/json",
87440
+ // The parenthetical platform is what the backend uses to name the
87441
+ // generated PAT ("hubdoc-cli (darwin)"), via CliSession#pat_name_for.
87442
+ "User-Agent": `hubdoc-cli/${version} (${import_os3.default.platform()})`
87443
+ }
87444
+ });
87445
+ }
87446
+ /** POST /api/v1/cli/auth/device — open a new device authorization session. */
87447
+ async start() {
87448
+ try {
87449
+ const res = await this.client.post(DEVICE_START_PATH);
87450
+ return res.data;
87451
+ } catch (err) {
87452
+ if (err?.response) {
87453
+ const data = err.response.data || {};
87454
+ throw new Error(
87455
+ `Failed to start device flow: ${data.error || err.response.status} ${data.error_description || ""}`.trim()
87456
+ );
87457
+ }
87458
+ throw new Error(`Failed to start device flow: ${err.message}`);
87459
+ }
87460
+ }
87461
+ /** POST /api/v1/cli/auth/device/poll — one poll attempt, mapped to a PollResult. */
87462
+ async pollOnce(deviceCode) {
87463
+ try {
87464
+ const res = await this.client.post(DEVICE_POLL_PATH, {
87465
+ device_code: deviceCode
87466
+ });
87467
+ return { status: "ok", token: res.data };
87468
+ } catch (err) {
87469
+ const data = err?.response?.data;
87470
+ const code = data?.error;
87471
+ switch (code) {
87472
+ case "authorization_pending":
87473
+ return { status: "pending" };
87474
+ case "slow_down":
87475
+ return { status: "slow_down" };
87476
+ case "access_denied":
87477
+ return { status: "denied", error: code };
87478
+ case "expired_token":
87479
+ return { status: "expired", error: code };
87480
+ case "already_consumed":
87481
+ return { status: "consumed", error: code };
87482
+ default:
87483
+ if (err?.response) {
87484
+ throw new Error(
87485
+ `Device poll failed: ${code || err.response.status} ${data?.error_description || ""}`.trim()
87486
+ );
87487
+ }
87488
+ throw new Error(`Device poll failed: ${err.message}`);
87489
+ }
87490
+ }
87491
+ }
87492
+ /**
87493
+ * Poll until the user approves, the code expires, or the timeout is hit.
87494
+ * Honors `slow_down` by widening the interval (RFC 8628 §3.5).
87495
+ */
87496
+ async pollUntilDone(deviceCode, opts) {
87497
+ const sleep = opts.sleep || defaultSleep;
87498
+ let intervalMs = Math.max(1, opts.interval) * 1e3;
87499
+ const caps = [Date.now() + opts.expiresIn * 1e3];
87500
+ if (opts.timeoutMs != null) caps.push(Date.now() + opts.timeoutMs);
87501
+ const deadline = Math.min(...caps);
87502
+ for (; ; ) {
87503
+ const result = await this.pollOnce(deviceCode);
87504
+ switch (result.status) {
87505
+ case "ok":
87506
+ return result.token;
87507
+ case "pending":
87508
+ break;
87509
+ case "slow_down":
87510
+ intervalMs += 5e3;
87511
+ break;
87512
+ case "denied":
87513
+ throw new Error("Device authorization was denied or revoked.");
87514
+ case "expired":
87515
+ throw new Error("Device code expired. Run `hubdoc login --start` again.");
87516
+ case "consumed":
87517
+ throw new Error(
87518
+ "This device code was already used. Run `hubdoc login --start` again."
87519
+ );
87520
+ }
87521
+ opts.onTick?.();
87522
+ if (Date.now() + intervalMs >= deadline) {
87523
+ throw new Error(
87524
+ "Timed out waiting for device approval. Run `hubdoc login --start` again."
87525
+ );
87526
+ }
87527
+ await sleep(intervalMs);
87528
+ }
87529
+ }
87530
+ };
87531
+
87425
87532
  // apps/cli/cli/handlers/auth-handlers.ts
87426
87533
  function decodeJwtPayload(token2) {
87427
87534
  const parts2 = token2.split(".");
@@ -87479,7 +87586,7 @@ async function handleTokenSet(token2, opts) {
87479
87586
  out.fail(new Error("Token cannot be empty"));
87480
87587
  }
87481
87588
  const trimmed = token2.trim();
87482
- const configManager = new ConfigManager(import_os3.default.homedir());
87589
+ const configManager = new ConfigManager(import_os4.default.homedir());
87483
87590
  const existing = await configManager.loadConfig() || {};
87484
87591
  const apiUrl = opts.apiUrl || existing.apiUrl || process.env.HUBDOC_API_URL || "http://localhost:3000";
87485
87592
  if (opts.keychain) {
@@ -87519,6 +87626,134 @@ async function handleTokenSet(token2, opts) {
87519
87626
  await configManager.saveConfig(next);
87520
87627
  out.ok("Token saved", { apiUrl, storage: "config", tokenLength: trimmed.length });
87521
87628
  }
87629
+ var DEVICE_SESSION_FILE = import_path15.default.join(import_os4.default.homedir(), ".hubdoc-tools", "device-session.json");
87630
+ async function resolveApiUrl(opts) {
87631
+ if (opts.apiUrl) return opts.apiUrl;
87632
+ const config = await new ConfigManager(import_os4.default.homedir()).loadConfig();
87633
+ return config?.apiUrl || process.env.HUBDOC_API_URL;
87634
+ }
87635
+ async function persistDeviceToken(apiUrl, token2) {
87636
+ const configManager = new ConfigManager(import_os4.default.homedir());
87637
+ const existing = await configManager.loadConfig() || {};
87638
+ const next = {
87639
+ ...existing,
87640
+ apiUrl,
87641
+ token: token2.access_token,
87642
+ tokenType: token2.token_type || "Bearer",
87643
+ tokenExpiresIn: token2.expires_in,
87644
+ tokenGenerated: (/* @__PURE__ */ new Date()).toISOString(),
87645
+ // Device flow yields a long-lived PAT — no refresh token to keep.
87646
+ refreshToken: void 0
87647
+ };
87648
+ await configManager.saveConfig(next);
87649
+ }
87650
+ function parseTimeoutMs(timeout) {
87651
+ if (!timeout) return void 0;
87652
+ const seconds = Number(timeout);
87653
+ return Number.isFinite(seconds) && seconds > 0 ? seconds * 1e3 : void 0;
87654
+ }
87655
+ async function handleLogin(opts) {
87656
+ const out = output(opts);
87657
+ if (opts.poll) {
87658
+ await handleLoginPoll(out, opts);
87659
+ return;
87660
+ }
87661
+ const apiUrl = await resolveApiUrl(opts);
87662
+ if (!apiUrl) {
87663
+ out.fail(new Error("No API URL configured. Pass --api-url=... or set HUBDOC_API_URL."));
87664
+ }
87665
+ const service = new DeviceAuthService(apiUrl);
87666
+ let start;
87667
+ try {
87668
+ start = await service.start();
87669
+ } catch (err) {
87670
+ out.fail(err);
87671
+ }
87672
+ if (opts.start) {
87673
+ const pending = {
87674
+ apiUrl,
87675
+ deviceCode: start.device_code,
87676
+ userCode: start.user_code,
87677
+ expiresAt: new Date(Date.now() + start.expires_in * 1e3).toISOString(),
87678
+ interval: start.interval
87679
+ };
87680
+ await import_fs_extra13.default.outputJson(DEVICE_SESSION_FILE, pending, { spaces: 2 });
87681
+ out.ok(
87682
+ "Device authorization started. Approve it in a browser, then run `hubdoc login --poll`.",
87683
+ {
87684
+ user_code: start.user_code,
87685
+ verification_uri_complete: start.verification_uri_complete,
87686
+ verification_uri: start.verification_uri,
87687
+ expires_in: start.expires_in,
87688
+ interval: start.interval
87689
+ }
87690
+ );
87691
+ return;
87692
+ }
87693
+ printActivationPrompt(out, opts, start.user_code, start.verification_uri_complete);
87694
+ try {
87695
+ const token2 = await service.pollUntilDone(start.device_code, {
87696
+ interval: start.interval,
87697
+ expiresIn: start.expires_in,
87698
+ timeoutMs: parseTimeoutMs(opts.timeout)
87699
+ });
87700
+ await persistDeviceToken(apiUrl, token2);
87701
+ out.ok("Logged in to HubDoc.", {
87702
+ apiUrl,
87703
+ user: token2.user,
87704
+ tokenExpiresIn: token2.expires_in,
87705
+ storage: "config"
87706
+ });
87707
+ } catch (err) {
87708
+ out.fail(err);
87709
+ }
87710
+ }
87711
+ async function handleLoginPoll(out, opts) {
87712
+ let pending;
87713
+ try {
87714
+ pending = await import_fs_extra13.default.readJson(DEVICE_SESSION_FILE);
87715
+ } catch {
87716
+ out.fail(new Error("No pending device session. Run `hubdoc login --start` first."));
87717
+ }
87718
+ const remainingMs = new Date(pending.expiresAt).getTime() - Date.now();
87719
+ if (remainingMs <= 0) {
87720
+ await import_fs_extra13.default.remove(DEVICE_SESSION_FILE).catch(() => void 0);
87721
+ out.fail(new Error("Device session expired. Run `hubdoc login --start` again."));
87722
+ }
87723
+ const service = new DeviceAuthService(pending.apiUrl);
87724
+ try {
87725
+ const token2 = await service.pollUntilDone(pending.deviceCode, {
87726
+ interval: pending.interval || 5,
87727
+ expiresIn: Math.ceil(remainingMs / 1e3),
87728
+ timeoutMs: parseTimeoutMs(opts.timeout)
87729
+ });
87730
+ await persistDeviceToken(pending.apiUrl, token2);
87731
+ await import_fs_extra13.default.remove(DEVICE_SESSION_FILE).catch(() => void 0);
87732
+ out.ok("Logged in to HubDoc.", {
87733
+ apiUrl: pending.apiUrl,
87734
+ user: token2.user,
87735
+ tokenExpiresIn: token2.expires_in,
87736
+ storage: "config"
87737
+ });
87738
+ } catch (err) {
87739
+ out.fail(err);
87740
+ }
87741
+ }
87742
+ function printActivationPrompt(out, opts, userCode, verificationUri) {
87743
+ if (opts.json) {
87744
+ process.stderr.write(
87745
+ `Open ${verificationUri} and confirm the code ${userCode}
87746
+ `
87747
+ );
87748
+ return;
87749
+ }
87750
+ process.stdout.write(
87751
+ "\n" + import_chalk24.default.bold("To sign in to HubDoc:\n") + ` 1. Open ${import_chalk24.default.cyan(verificationUri)}
87752
+ 2. Confirm the code ${import_chalk24.default.bold.yellow(userCode)}
87753
+
87754
+ ` + import_chalk24.default.gray("Waiting for approval... (Ctrl+C to abort)\n")
87755
+ );
87756
+ }
87522
87757
  function platformOpenCommand(url2) {
87523
87758
  if (process.platform === "darwin") return `open "${url2}"`;
87524
87759
  if (process.platform === "win32") return `start "" "${url2}"`;
@@ -87528,7 +87763,7 @@ async function handleTokenOpen(opts) {
87528
87763
  const out = output(opts);
87529
87764
  let apiUrl = opts.apiUrl || process.env.HUBDOC_API_URL;
87530
87765
  if (!apiUrl) {
87531
- const configManager = new ConfigManager(import_os3.default.homedir());
87766
+ const configManager = new ConfigManager(import_os4.default.homedir());
87532
87767
  const config = await configManager.loadConfig();
87533
87768
  apiUrl = config?.apiUrl;
87534
87769
  }
@@ -87547,6 +87782,147 @@ async function handleTokenOpen(opts) {
87547
87782
  out.ok(`Opened ${url2}`, { url: url2 });
87548
87783
  }
87549
87784
 
87785
+ // apps/cli/cli/handlers/skill-handlers.ts
87786
+ var import_os5 = __toESM(require("os"));
87787
+ var import_path16 = __toESM(require("path"));
87788
+ var import_fs_extra14 = __toESM(require_lib());
87789
+
87790
+ // apps/cli/cli/skills/hubdoc-auth-skill.ts
87791
+ var HUBDOC_AUTH_SKILL_NAME = "hubdoc-auth";
87792
+ var HUBDOC_AUTH_SKILL_FILENAME = "SKILL.md";
87793
+ var HUBDOC_AUTH_SKILL_CONTENT = `---
87794
+ name: hubdoc-auth
87795
+ description: >-
87796
+ Authenticate the HubDoc CLI (\`hubdoc\`) from a shell with no browser \u2014 e.g. an
87797
+ AI agent behind a chatbot. Use when the user wants to log in / sign in to
87798
+ HubDoc, when a \`hubdoc\` command fails with "No API token configured" or a 401,
87799
+ or when a token has expired. Drives the OAuth 2.0 Device Authorization Grant:
87800
+ relay a short code + URL to the user, then poll until they approve.
87801
+ ---
87802
+
87803
+ # HubDoc headless login (device flow)
87804
+
87805
+ The \`hubdoc\` CLI talks to a HubDoc instance using a bearer token stored in
87806
+ \`~/.hubdoc-config.json\`. On a machine with no browser you cannot run the normal
87807
+ OAuth redirect flow, so use the **device authorization grant**: the CLI shows a
87808
+ short code and a URL, the human approves it from any already-logged-in browser
87809
+ (phone, laptop, \u2026), and the CLI picks up a Personal Access Token.
87810
+
87811
+ ## When to use
87812
+
87813
+ - The user asks to "log in", "sign in", "connect" to HubDoc.
87814
+ - A \`hubdoc\` command returns \`No API token configured\`, \`401\`, or \`403\`.
87815
+ - The stored token has expired (device-flow PATs last ~30 days).
87816
+
87817
+ ## Prerequisites
87818
+
87819
+ - The \`hubdoc\` CLI is on \`PATH\` (verify with \`hubdoc --version\`).
87820
+ - The target instance is known via \`HUBDOC_API_URL\` **or** passed as
87821
+ \`--api-url https://<instance>\`. If neither is set, ask the user which HubDoc
87822
+ instance to connect to before starting.
87823
+
87824
+ ## Procedure (two phases \u2014 do not skip the relay step)
87825
+
87826
+ 1. **Start the session** and capture the code:
87827
+
87828
+ \`\`\`bash
87829
+ hubdoc login --start --json
87830
+ \`\`\`
87831
+
87832
+ This prints a JSON object like:
87833
+
87834
+ \`\`\`json
87835
+ {
87836
+ "ok": true,
87837
+ "data": {
87838
+ "user_code": "WDJB-MJHT",
87839
+ "verification_uri_complete": "https://<instance>/cli/activation/new?code=WDJB-MJHT",
87840
+ "verification_uri": "https://<instance>/cli/activation/new",
87841
+ "expires_in": 600,
87842
+ "interval": 5
87843
+ }
87844
+ }
87845
+ \`\`\`
87846
+
87847
+ 2. **Relay to the user.** Show them the \`verification_uri_complete\` link and the
87848
+ \`user_code\`, and ask them to open it in a browser where they are logged in to
87849
+ HubDoc and confirm the code. Example message:
87850
+
87851
+ > Open **https://<instance>/cli/activation/new?code=WDJB-MJHT** in your
87852
+ > browser and confirm the code **WDJB-MJHT** to finish signing in.
87853
+
87854
+ 3. **Poll until approved.** This blocks until the user confirms (or the code
87855
+ expires, ~10 min):
87856
+
87857
+ \`\`\`bash
87858
+ hubdoc login --poll --json
87859
+ \`\`\`
87860
+
87861
+ On success it prints \`{ "ok": true, ... }\` and the token is saved to
87862
+ \`~/.hubdoc-config.json\`. If it reports the session expired or was denied,
87863
+ start over at step 1.
87864
+
87865
+ 4. **Verify** the session works:
87866
+
87867
+ \`\`\`bash
87868
+ hubdoc whoami --json
87869
+ \`\`\`
87870
+
87871
+ ## One-shot variant (interactive humans only)
87872
+
87873
+ \`hubdoc login\` (no flag) prints the code and blocks until approval in a single
87874
+ command. Prefer the two-phase \`--start\` / \`--poll\` flow when acting as an agent
87875
+ so you can relay the code before blocking.
87876
+
87877
+ ## Notes
87878
+
87879
+ - The token is a long-lived Personal Access Token named \`hubdoc-cli (<os>)\`,
87880
+ visible and revocable at \`https://<instance>/profile/personal-access-tokens\`.
87881
+ - There is no refresh token: when it expires, just run the flow again.
87882
+ - After authenticating, use the CLI normally \u2014 \`hubdoc --help\` lists commands
87883
+ (\`hubdoc workspaces ls\`, \`hubdoc files ...\`, \`hubdoc import ...\`, etc.). Add
87884
+ \`--json\` to any command for machine-readable output.
87885
+ `;
87886
+
87887
+ // apps/cli/cli/handlers/skill-handlers.ts
87888
+ function resolveSkillsDir(opts) {
87889
+ if (opts.path) return import_path16.default.resolve(opts.path);
87890
+ if (opts.project) return import_path16.default.join(process.cwd(), ".claude", "skills");
87891
+ return import_path16.default.join(import_os5.default.homedir(), ".claude", "skills");
87892
+ }
87893
+ async function handleSkillInstall(opts) {
87894
+ const out = output(opts);
87895
+ const skillsDir = resolveSkillsDir(opts);
87896
+ const skillDir = import_path16.default.join(skillsDir, HUBDOC_AUTH_SKILL_NAME);
87897
+ const target = import_path16.default.join(skillDir, HUBDOC_AUTH_SKILL_FILENAME);
87898
+ if (await import_fs_extra14.default.pathExists(target) && !opts.force) {
87899
+ out.fail(
87900
+ new Error(
87901
+ `Skill already installed at ${target}. Re-run with --force to overwrite.`
87902
+ )
87903
+ );
87904
+ }
87905
+ try {
87906
+ await import_fs_extra14.default.outputFile(target, HUBDOC_AUTH_SKILL_CONTENT);
87907
+ } catch (err) {
87908
+ out.fail(new Error(`Failed to write skill: ${err.message}`));
87909
+ }
87910
+ out.ok(`Installed the ${HUBDOC_AUTH_SKILL_NAME} skill`, {
87911
+ skill: HUBDOC_AUTH_SKILL_NAME,
87912
+ path: target,
87913
+ scope: opts.path ? "custom" : opts.project ? "project" : "user",
87914
+ hint: 'Restart Claude Code (or reload skills) to pick it up, then ask it to "log in to HubDoc".'
87915
+ });
87916
+ }
87917
+ async function handleSkillShow(opts) {
87918
+ const out = output(opts);
87919
+ if (opts.json) {
87920
+ out.show({ skill: HUBDOC_AUTH_SKILL_NAME, content: HUBDOC_AUTH_SKILL_CONTENT });
87921
+ return;
87922
+ }
87923
+ process.stdout.write(HUBDOC_AUTH_SKILL_CONTENT);
87924
+ }
87925
+
87550
87926
  // apps/cli/cli/handlers/workspace-handlers.ts
87551
87927
  var WORKSPACE_COLUMNS = [
87552
87928
  { header: "ID", key: "id" },
@@ -87797,15 +88173,15 @@ async function handleFoldersDelete(id, opts) {
87797
88173
  }
87798
88174
 
87799
88175
  // apps/cli/cli/handlers/file-handlers.ts
87800
- var import_fs_extra13 = __toESM(require_lib());
87801
- var import_path15 = __toESM(require("path"));
88176
+ var import_fs_extra15 = __toESM(require_lib());
88177
+ var import_path17 = __toESM(require("path"));
87802
88178
  var import_form_data3 = __toESM(require_form_data());
87803
88179
 
87804
88180
  // apps/cli/services/chunked-uploader.ts
87805
- var import_chalk24 = __toESM(require_source());
88181
+ var import_chalk25 = __toESM(require_source());
87806
88182
  var crypto3 = __toESM(require("crypto"));
87807
- var fs14 = __toESM(require_lib());
87808
- var path18 = __toESM(require("path"));
88183
+ var fs16 = __toESM(require_lib());
88184
+ var path20 = __toESM(require("path"));
87809
88185
 
87810
88186
  // apps/cli/api/base.ts
87811
88187
  var BASE_PATH2 = "http://localhost:3000".replace(/\/+$/, "");
@@ -88204,14 +88580,14 @@ var ChunkedUploader2 = class _ChunkedUploader {
88204
88580
  async uploadFile(options) {
88205
88581
  const { filePath, workspaceId, folderId, metadata, chunkSize, onProgress } = options;
88206
88582
  try {
88207
- if (!await fs14.pathExists(filePath)) {
88583
+ if (!await fs16.pathExists(filePath)) {
88208
88584
  throw new Error(`File not found: ${filePath}`);
88209
88585
  }
88210
- const stats = await fs14.stat(filePath);
88586
+ const stats = await fs16.stat(filePath);
88211
88587
  const fileSize = stats.size;
88212
- const filename = path18.basename(filePath);
88588
+ const filename = path20.basename(filePath);
88213
88589
  const contentType = this.getContentType(filePath);
88214
- console.log(import_chalk24.default.blue(`\u{1F4E6} Preparing chunked upload for ${filename} (${this.formatBytes(fileSize)})`));
88590
+ console.log(import_chalk25.default.blue(`\u{1F4E6} Preparing chunked upload for ${filename} (${this.formatBytes(fileSize)})`));
88215
88591
  const session = await this.initializeSession(
88216
88592
  filename,
88217
88593
  fileSize,
@@ -88221,7 +88597,7 @@ var ChunkedUploader2 = class _ChunkedUploader {
88221
88597
  folderId,
88222
88598
  metadata
88223
88599
  );
88224
- console.log(import_chalk24.default.cyan(` Session created: ${session.upload_id} (${session.total_chunks} chunks)`));
88600
+ console.log(import_chalk25.default.cyan(` Session created: ${session.upload_id} (${session.total_chunks} chunks)`));
88225
88601
  const chunks = this.prepareChunks(fileSize, session.chunk_size);
88226
88602
  const uploadProgress = {
88227
88603
  uploadId: session.upload_id,
@@ -88240,11 +88616,11 @@ var ChunkedUploader2 = class _ChunkedUploader {
88240
88616
  uploadProgress,
88241
88617
  onProgress
88242
88618
  );
88243
- console.log(import_chalk24.default.cyan(` Calculating checksum...`));
88619
+ console.log(import_chalk25.default.cyan(` Calculating checksum...`));
88244
88620
  const checksum = await this.calculateMD5(filePath);
88245
- console.log(import_chalk24.default.cyan(` Finalizing upload...`));
88621
+ console.log(import_chalk25.default.cyan(` Finalizing upload...`));
88246
88622
  const result = await this.completeUpload(session.upload_id, checksum);
88247
- console.log(import_chalk24.default.green(`\u2705 Chunked upload completed: ${filename}`));
88623
+ console.log(import_chalk25.default.green(`\u2705 Chunked upload completed: ${filename}`));
88248
88624
  uploadProgress.status = "completed";
88249
88625
  uploadProgress.progress = 100;
88250
88626
  if (onProgress) {
@@ -88256,7 +88632,7 @@ var ChunkedUploader2 = class _ChunkedUploader {
88256
88632
  objectKey: result.object_key
88257
88633
  };
88258
88634
  } catch (error) {
88259
- console.error(import_chalk24.default.red(`\u274C Chunked upload failed: ${error.message}`));
88635
+ console.error(import_chalk25.default.red(`\u274C Chunked upload failed: ${error.message}`));
88260
88636
  return {
88261
88637
  success: false,
88262
88638
  uploadId: "",
@@ -88324,7 +88700,7 @@ var ChunkedUploader2 = class _ChunkedUploader {
88324
88700
  if (onProgress) {
88325
88701
  onProgress({ ...progress });
88326
88702
  }
88327
- console.log(import_chalk24.default.gray(` Chunk ${chunk.index}/${chunks.length} uploaded (${progress.progress.toFixed(1)}%)`));
88703
+ console.log(import_chalk25.default.gray(` Chunk ${chunk.index}/${chunks.length} uploaded (${progress.progress.toFixed(1)}%)`));
88328
88704
  }).catch((error) => {
88329
88705
  throw new Error(`Chunk ${chunk.index} upload failed: ${error.message}`);
88330
88706
  }).finally(() => {
@@ -88345,11 +88721,11 @@ var ChunkedUploader2 = class _ChunkedUploader {
88345
88721
  for (let attempt = 0; attempt <= _ChunkedUploader.MAX_RETRY_PER_CHUNK; attempt++) {
88346
88722
  try {
88347
88723
  const buffer = Buffer.alloc(chunk.size);
88348
- const fd = await fs14.open(filePath, "r");
88724
+ const fd = await fs16.open(filePath, "r");
88349
88725
  try {
88350
- await fs14.read(fd, buffer, 0, chunk.size, chunk.start);
88726
+ await fs16.read(fd, buffer, 0, chunk.size, chunk.start);
88351
88727
  } finally {
88352
- await fs14.close(fd);
88728
+ await fs16.close(fd);
88353
88729
  }
88354
88730
  await this.axiosClient.patch(
88355
88731
  `/api/v1/documents/chunked_uploads/${uploadId}/chunks/${chunk.index}`,
@@ -88364,7 +88740,7 @@ var ChunkedUploader2 = class _ChunkedUploader {
88364
88740
  } catch (error) {
88365
88741
  lastError = error;
88366
88742
  if (attempt < _ChunkedUploader.MAX_RETRY_PER_CHUNK) {
88367
- console.log(import_chalk24.default.yellow(` \u26A0\uFE0F Chunk ${chunk.index} failed, retrying (${attempt + 1}/${_ChunkedUploader.MAX_RETRY_PER_CHUNK})...`));
88743
+ console.log(import_chalk25.default.yellow(` \u26A0\uFE0F Chunk ${chunk.index} failed, retrying (${attempt + 1}/${_ChunkedUploader.MAX_RETRY_PER_CHUNK})...`));
88368
88744
  await this.sleep(1e3 * (attempt + 1));
88369
88745
  }
88370
88746
  }
@@ -88394,7 +88770,7 @@ var ChunkedUploader2 = class _ChunkedUploader {
88394
88770
  async calculateMD5(filePath) {
88395
88771
  return new Promise((resolve, reject) => {
88396
88772
  const hash = crypto3.createHash("md5");
88397
- const stream5 = fs14.createReadStream(filePath);
88773
+ const stream5 = fs16.createReadStream(filePath);
88398
88774
  stream5.on("data", (data) => hash.update(data));
88399
88775
  stream5.on("end", () => resolve(hash.digest("base64")));
88400
88776
  stream5.on("error", reject);
@@ -88404,7 +88780,7 @@ var ChunkedUploader2 = class _ChunkedUploader {
88404
88780
  * Get content type from file extension
88405
88781
  */
88406
88782
  getContentType(filePath) {
88407
- const ext2 = path18.extname(filePath).toLowerCase();
88783
+ const ext2 = path20.extname(filePath).toLowerCase();
88408
88784
  const mimeTypes = {
88409
88785
  ".pdf": "application/pdf",
88410
88786
  ".doc": "application/msword",
@@ -88487,7 +88863,7 @@ async function handleFilesShow(id, opts) {
88487
88863
  }
88488
88864
  async function uploadDirect(ctx, filePath, fileName, opts, metadata) {
88489
88865
  const form = new import_form_data3.default();
88490
- form.append("uploaded_file", import_fs_extra13.default.createReadStream(filePath), {
88866
+ form.append("uploaded_file", import_fs_extra15.default.createReadStream(filePath), {
88491
88867
  filename: fileName,
88492
88868
  contentType: "application/octet-stream"
88493
88869
  });
@@ -88532,18 +88908,18 @@ async function uploadChunked(ctx, filePath, opts, metadata, out) {
88532
88908
  async function handleFilesUpload(filePath, opts) {
88533
88909
  const out = output(opts);
88534
88910
  const ctx = await buildApiContext(out);
88535
- const resolved = import_path15.default.resolve(filePath);
88536
- if (!await import_fs_extra13.default.pathExists(resolved)) {
88911
+ const resolved = import_path17.default.resolve(filePath);
88912
+ if (!await import_fs_extra15.default.pathExists(resolved)) {
88537
88913
  out.fail(new Error(`File not found: ${filePath}`));
88538
88914
  }
88539
- const stats = await import_fs_extra13.default.stat(resolved);
88915
+ const stats = await import_fs_extra15.default.stat(resolved);
88540
88916
  if (!stats.isFile()) {
88541
88917
  out.fail(new Error(`Not a regular file: ${filePath}`));
88542
88918
  }
88543
88919
  if (!opts.folder && !opts.workspace) {
88544
88920
  out.note("No --folder or --workspace specified; server will use defaults");
88545
88921
  }
88546
- const fileName = (opts.name || import_path15.default.basename(resolved)).normalize("NFC");
88922
+ const fileName = (opts.name || import_path17.default.basename(resolved)).normalize("NFC");
88547
88923
  const metadata = parseJsonOpt3("metadata", opts.metadata, out);
88548
88924
  const useChunked = !!opts.chunked || stats.size >= CHUNKED_THRESHOLD;
88549
88925
  try {
@@ -88562,8 +88938,8 @@ async function handleFilesUpload(filePath, opts) {
88562
88938
  }
88563
88939
  }
88564
88940
  async function streamToFile(stream5, targetPath) {
88565
- await import_fs_extra13.default.ensureDir(import_path15.default.dirname(import_path15.default.resolve(targetPath)));
88566
- const writer = import_fs_extra13.default.createWriteStream(targetPath);
88941
+ await import_fs_extra15.default.ensureDir(import_path17.default.dirname(import_path17.default.resolve(targetPath)));
88942
+ const writer = import_fs_extra15.default.createWriteStream(targetPath);
88567
88943
  stream5.pipe(writer);
88568
88944
  await new Promise((resolve, reject) => {
88569
88945
  writer.on("finish", resolve);
@@ -88582,7 +88958,7 @@ async function handleFilesDownload(id, opts) {
88582
88958
  out.fail(err);
88583
88959
  }
88584
88960
  const fileName = meta?.name || `document-${id}`;
88585
- const targetPath = import_path15.default.resolve(opts.to || fileName);
88961
+ const targetPath = import_path17.default.resolve(opts.to || fileName);
88586
88962
  try {
88587
88963
  const res = await ctx.axios.get(`/api/v1/documents/documents/${id}/blob`, {
88588
88964
  responseType: "stream"
@@ -88861,8 +89237,8 @@ async function handleComposedExport(id, opts) {
88861
89237
  }
88862
89238
 
88863
89239
  // apps/cli/cli/handlers/part-handlers.ts
88864
- var import_fs_extra14 = __toESM(require_lib());
88865
- var import_path16 = __toESM(require("path"));
89240
+ var import_fs_extra16 = __toESM(require_lib());
89241
+ var import_path18 = __toESM(require("path"));
88866
89242
  var partsBase = (cdId) => `/api/v1/documents/composed_documents/${encodeURIComponent(cdId)}/parts`;
88867
89243
  var PART_COLUMNS = [
88868
89244
  { header: "ID", key: "id" },
@@ -88915,11 +89291,11 @@ async function handlePartsUpdate(id, opts) {
88915
89291
  const body = {};
88916
89292
  if (opts.content !== void 0) body.content = opts.content;
88917
89293
  if (opts.contentFile !== void 0) {
88918
- const resolved = import_path16.default.resolve(opts.contentFile);
88919
- if (!await import_fs_extra14.default.pathExists(resolved)) {
89294
+ const resolved = import_path18.default.resolve(opts.contentFile);
89295
+ if (!await import_fs_extra16.default.pathExists(resolved)) {
88920
89296
  out.fail(new Error(`Content file not found: ${opts.contentFile}`));
88921
89297
  }
88922
- body.content = await import_fs_extra14.default.readFile(resolved, "utf8");
89298
+ body.content = await import_fs_extra16.default.readFile(resolved, "utf8");
88923
89299
  }
88924
89300
  if (opts.status !== void 0) body.status = opts.status;
88925
89301
  if (opts.title !== void 0) body.title = opts.title;
@@ -89454,15 +89830,15 @@ async function handlePermissionsShow(id, opts) {
89454
89830
  // apps/cli/cli.ts
89455
89831
  var getVersion = () => {
89456
89832
  try {
89457
- if (true) return "1.6.1";
89833
+ if (true) return "1.7.0";
89458
89834
  } catch {
89459
89835
  }
89460
89836
  for (const candidate of [
89461
- import_path17.default.join(__dirname, "package.json"),
89462
- import_path17.default.join(__dirname, "..", "package.json")
89837
+ import_path19.default.join(__dirname, "package.json"),
89838
+ import_path19.default.join(__dirname, "..", "package.json")
89463
89839
  ]) {
89464
89840
  try {
89465
- return import_fs_extra15.default.readJsonSync(candidate).version;
89841
+ return import_fs_extra17.default.readJsonSync(candidate).version;
89466
89842
  } catch {
89467
89843
  }
89468
89844
  }
@@ -89482,18 +89858,18 @@ program2.command("run").description("Run HubDoc tool with engine selection (lega
89482
89858
  if (options.interactive || (!options.engine || options.engine === "filesystem")) {
89483
89859
  selectedEngine = await runEngineSelection(options.interactive);
89484
89860
  }
89485
- console.log(import_chalk25.default.blue(`\u{1F680} Starting HubDoc Tool with ${selectedEngine} engine...`));
89861
+ console.log(import_chalk26.default.blue(`\u{1F680} Starting HubDoc Tool with ${selectedEngine} engine...`));
89486
89862
  logger.log("INFO", "INIT", selectedEngine, `Starting HubDoc Tool with ${selectedEngine} engine`, {
89487
89863
  options: { ...options, logFile: logger.getLogPath() }
89488
89864
  });
89489
89865
  await handleEngineOperation(selectedEngine, options, logger);
89490
89866
  logger.completeOperation(true);
89491
- console.log(import_chalk25.default.green(`\u2705 Operation completed. Log: ${logger.getLogPath()}`));
89867
+ console.log(import_chalk26.default.green(`\u2705 Operation completed. Log: ${logger.getLogPath()}`));
89492
89868
  } catch (error) {
89493
89869
  logger.log("ERROR", "FAILED", options.engine || "unknown", `Operation failed: ${error.message}`, { error: error.stack });
89494
89870
  logger.completeOperation(false);
89495
- console.error(import_chalk25.default.red(`\u274C Error: ${error.message}`));
89496
- console.error(import_chalk25.default.gray(`\u{1F4C4} Check log file: ${logger.getLogPath()}`));
89871
+ console.error(import_chalk26.default.red(`\u274C Error: ${error.message}`));
89872
+ console.error(import_chalk26.default.gray(`\u{1F4C4} Check log file: ${logger.getLogPath()}`));
89497
89873
  process.exit(1);
89498
89874
  }
89499
89875
  });
@@ -89507,7 +89883,7 @@ Examples:
89507
89883
  try {
89508
89884
  await handleGenerateMapping(sourceDir, options);
89509
89885
  } catch (error) {
89510
- console.error(import_chalk25.default.red(`\u274C Error: ${error.message}`));
89886
+ console.error(import_chalk26.default.red(`\u274C Error: ${error.message}`));
89511
89887
  process.exit(1);
89512
89888
  }
89513
89889
  });
@@ -89522,7 +89898,7 @@ Examples:
89522
89898
  try {
89523
89899
  await handleImport(options);
89524
89900
  } catch (error) {
89525
- console.error(import_chalk25.default.red(`\u274C Import failed: ${error.message}`));
89901
+ console.error(import_chalk26.default.red(`\u274C Import failed: ${error.message}`));
89526
89902
  process.exit(1);
89527
89903
  }
89528
89904
  });
@@ -89530,7 +89906,7 @@ program2.command("export").description("Export documents from HubDoc").option("-
89530
89906
  try {
89531
89907
  await handleExport(options);
89532
89908
  } catch (error) {
89533
- console.error(import_chalk25.default.red(`\u274C Export failed: ${error.message}`));
89909
+ console.error(import_chalk26.default.red(`\u274C Export failed: ${error.message}`));
89534
89910
  process.exit(1);
89535
89911
  }
89536
89912
  });
@@ -89538,7 +89914,7 @@ program2.command("plugins").description("Manage document source plugins").action
89538
89914
  try {
89539
89915
  await handlePlugins();
89540
89916
  } catch (error) {
89541
- console.error(import_chalk25.default.red(`\u274C Error: ${error.message}`));
89917
+ console.error(import_chalk26.default.red(`\u274C Error: ${error.message}`));
89542
89918
  process.exit(1);
89543
89919
  }
89544
89920
  });
@@ -89546,7 +89922,7 @@ program2.command("connect").description("Create a connection to an external docu
89546
89922
  try {
89547
89923
  await handleConnect(plugin, options);
89548
89924
  } catch (error) {
89549
- console.error(import_chalk25.default.red(`\u274C Failed to create connection: ${error.message}`));
89925
+ console.error(import_chalk26.default.red(`\u274C Failed to create connection: ${error.message}`));
89550
89926
  process.exit(1);
89551
89927
  }
89552
89928
  });
@@ -89554,7 +89930,7 @@ program2.command("plugin-scan").description("Scan external source and generate m
89554
89930
  try {
89555
89931
  await handlePluginScan(connectionId, options);
89556
89932
  } catch (error) {
89557
- console.error(import_chalk25.default.red(`\u274C Plugin scan failed: ${error.message}`));
89933
+ console.error(import_chalk26.default.red(`\u274C Plugin scan failed: ${error.message}`));
89558
89934
  process.exit(1);
89559
89935
  }
89560
89936
  });
@@ -89562,13 +89938,16 @@ program2.command("plugin-import").description("Import documents from external so
89562
89938
  try {
89563
89939
  await handlePluginImport(mappingFile, options);
89564
89940
  } catch (error) {
89565
- console.error(import_chalk25.default.red(`\u274C Plugin import failed: ${error.message}`));
89941
+ console.error(import_chalk26.default.red(`\u274C Plugin import failed: ${error.message}`));
89566
89942
  process.exit(1);
89567
89943
  }
89568
89944
  });
89569
89945
  program2.command("whoami").description("Show the authenticated user (LLM-friendly)").action(async (options) => {
89570
89946
  await handleWhoami(withGlobals(options));
89571
89947
  });
89948
+ program2.command("login").description("Sign in via OAuth device flow (no browser needed on this machine)").option("--device", "Use the device authorization grant (default)").option("--start", "Open a device session, print the code, then exit (for agents)").option("--poll", "Resume the pending device session and wait for approval").option("--timeout <seconds>", "Max seconds to wait for approval while polling").option("--api-url <url>", "API URL (defaults to current config or HUBDOC_API_URL)").action(async (options) => {
89949
+ await handleLogin(withGlobals(options));
89950
+ });
89572
89951
  var token = program2.command("token").description("Manage API tokens");
89573
89952
  token.command("set <token>").description("Persist an API token (config file by default, OS keychain with --keychain)").option("--api-url <url>", "API URL (defaults to current config or HUBDOC_API_URL)").option("--keychain", "Store in OS keychain via keytar (Keychain / libsecret / Credential Vault) instead of plaintext config").action(async (tokenValue, options) => {
89574
89953
  await handleTokenSet(tokenValue, withGlobals(options));
@@ -89576,6 +89955,13 @@ token.command("set <token>").description("Persist an API token (config file by d
89576
89955
  token.command("open").description("Open the Corex Personal Access Tokens UI in the default browser").option("--api-url <url>", "API URL (defaults to current config or HUBDOC_API_URL)").action(async (options) => {
89577
89956
  await handleTokenOpen(withGlobals(options));
89578
89957
  });
89958
+ var skill = program2.command("skill").description("Manage the bundled Claude Code skill");
89959
+ skill.command("install").description("Install the hubdoc-auth skill into ~/.claude/skills (or a project)").option("--project", "Install into ./.claude/skills instead of the user home").option("--path <dir>", "Explicit skills directory (overrides --project)").option("--force", "Overwrite an existing SKILL.md").action(async (options) => {
89960
+ await handleSkillInstall(withGlobals(options));
89961
+ });
89962
+ skill.command("show").description("Print the hubdoc-auth skill markdown").action(async (options) => {
89963
+ await handleSkillShow(withGlobals(options));
89964
+ });
89579
89965
  var workspaces = program2.command("workspaces").description("Manage workspaces");
89580
89966
  workspaces.command("ls").description("List workspaces").action(async (options) => {
89581
89967
  await handleWorkspacesList(withGlobals(options));